}
#if !CONFIG_YAFFS_WINCE
+ // if the the buffer is null then create one with the fields set to the current time.
if (!buf) {
local.actime = Y_CURRENT_TIME;
local.modtime = local.actime;
buf = &local;
}
+ // copy the buffer's time into the obj.
if (obj) {
int result;
obj->yst_atime = buf->actime;
obj->yst_mtime = buf->modtime;
+
+ // set the obj to dirty to cause it to be written to flash during the next flush operation.
obj->dirty = 1;
result = yaffs_flush_file(obj, 0, 0, 0);
retVal = result == YAFFS_OK ? 0 : -1;
{
int retVal = -1;
- if (yaffsfs_CheckMemRegion(path, 0, 0) < 0) {
- yaffsfs_SetError(-EFAULT);
- return -1;
- }
- if (yaffsfs_CheckPath(path) < 0) {
- yaffsfs_SetError(-ENAMETOOLONG);
- return -1;
+ if (!dev) {
+ if (yaffsfs_CheckMemRegion(path, 0, 0) < 0) {
+ yaffsfs_SetError(-EFAULT);
+ return -1;
+ }
+
+ if (yaffsfs_CheckPath(path) < 0) {
+ yaffsfs_SetError(-ENAMETOOLONG);
+ return -1;
+ }
}
yaffsfs_Lock();