X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=direct%2Fyaffs_attribs.c;h=5486bdd142b9512ab1cabe65b14cec0f5d772c30;hp=de8e451eeb8b50d17bad8a994e36690d123191b7;hb=HEAD;hpb=b4d5215f18486403d16f2e776000e43eba052f40 diff --git a/direct/yaffs_attribs.c b/direct/yaffs_attribs.c index de8e451..e798a88 100644 --- a/direct/yaffs_attribs.c +++ b/direct/yaffs_attribs.c @@ -1,8 +1,7 @@ /* * YAFFS: Yet Another Flash File System. A NAND-flash specific file system. * - * Copyright (C) 2002-2011 Aleph One Ltd. - * for Toby Churchill Ltd and Brightstar Engineering + * Copyright (C) 2002-2018 Aleph One Ltd. * * Created by Charles Manning * @@ -16,6 +15,7 @@ void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh) { + #ifdef CONFIG_YAFFS_WINCE obj->win_atime[0] = oh->win_atime[0]; obj->win_ctime[0] = oh->win_ctime[0]; @@ -26,9 +26,11 @@ void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh) #else obj->yst_uid = oh->yst_uid; obj->yst_gid = oh->yst_gid; - obj->yst_atime = oh->yst_atime; - obj->yst_mtime = oh->yst_mtime; - obj->yst_ctime = oh->yst_ctime; + + obj->yst_ctime = yaffs_oh_ctime_fetch(oh); + obj->yst_mtime = yaffs_oh_mtime_fetch(oh); + obj->yst_atime = yaffs_oh_atime_fetch(oh); + obj->yst_rdev = oh->yst_rdev; #endif } @@ -46,9 +48,11 @@ void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj) #else oh->yst_uid = obj->yst_uid; oh->yst_gid = obj->yst_gid; - oh->yst_atime = obj->yst_atime; - oh->yst_mtime = obj->yst_mtime; - oh->yst_ctime = obj->yst_ctime; + + yaffs_oh_ctime_load(obj, oh); + yaffs_oh_mtime_load(obj, oh); + yaffs_oh_atime_load(obj, oh); + oh->yst_rdev = obj->yst_rdev; #endif } @@ -82,8 +86,8 @@ void yaffs_load_current_time(struct yaffs_obj *obj, int do_a, int do_c) obj->yst_mtime = Y_CURRENT_TIME; if (do_a) - obj->yst_atime = obj->yst_atime; + obj->yst_atime = obj->yst_mtime; if (do_c) - obj->yst_ctime = obj->yst_atime; + obj->yst_ctime = obj->yst_mtime; #endif }