From fd1de40165e91775b8af30029f8cec198d4ed665 Mon Sep 17 00:00:00 2001 From: Timothy Manning Date: Fri, 4 Jun 2021 10:18:59 +1200 Subject: [PATCH] Added comments to yaffs_DoUtimre Signed-off-by: Timothy Manning --- direct/yaffsfs.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/direct/yaffsfs.c b/direct/yaffsfs.c index d1e4e4e..2c1ac42 100644 --- 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 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; -- 2.30.2