projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added more testcases to the 64 bit time tests.
[yaffs2.git]
/
yaffs_attribs.c
diff --git
a/yaffs_attribs.c
b/yaffs_attribs.c
index 711941f137f554a2a32cd32edafd60049f7bc435..c441185a68dcb07a45b1bb2b829ffda8afe3ac12 100644
(file)
--- a/
yaffs_attribs.c
+++ b/
yaffs_attribs.c
@@
-1,8
+1,7
@@
/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
/*
* 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 <charles@aleph1.co.uk>
*
*
* Created by Charles Manning <charles@aleph1.co.uk>
*
@@
-22,13
+21,19
@@
#define IATTR_GID ia_gid.val
#endif
#define IATTR_GID ia_gid.val
#endif
+/*
+ * Loading attibs from/to object header assumes the object header
+ * is in cpu endian.
+ */
void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
{
obj->yst_uid = oh->yst_uid;
obj->yst_gid = oh->yst_gid;
void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
{
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;
}
obj->yst_rdev = oh->yst_rdev;
}
@@
-36,9
+41,11
@@
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
{
oh->yst_uid = obj->yst_uid;
oh->yst_gid = obj->yst_gid;
{
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;
}
oh->yst_rdev = obj->yst_rdev;
}
@@
-102,7
+109,6
@@
int yaffs_set_attribs(struct yaffs_obj *obj, struct iattr *attr)
yaffs_update_oh(obj, NULL, 1, 0, 0, NULL);
return YAFFS_OK;
yaffs_update_oh(obj, NULL, 1, 0, 0, NULL);
return YAFFS_OK;
-
}
int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr)
}
int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr)