projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/64_and_32_bit_time_tests'
[yaffs2.git]
/
direct
/
yaffsfs.c
diff --git
a/direct/yaffsfs.c
b/direct/yaffsfs.c
index d1e4e4efa76185ade34bffeef842c6044e53fca6..2c1ac42eba1c8cefad544e6c8f7d79d37d96674e 100644
(file)
--- a/
direct/yaffsfs.c
+++ b/
direct/yaffsfs.c
@@
-1943,17
+1943,21
@@
static int yaffsfs_DoUtime(struct yaffs_obj *obj,
}
#if !CONFIG_YAFFS_WINCE
}
#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;
}
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;
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;
obj->dirty = 1;
result = yaffs_flush_file(obj, 0, 0, 0);
retVal = result == YAFFS_OK ? 0 : -1;