Lines Matching refs:obj
17 void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh) in yaffs_load_attribs() argument
19 obj->yst_uid = oh->yst_uid; in yaffs_load_attribs()
20 obj->yst_gid = oh->yst_gid; in yaffs_load_attribs()
21 obj->yst_atime = oh->yst_atime; in yaffs_load_attribs()
22 obj->yst_mtime = oh->yst_mtime; in yaffs_load_attribs()
23 obj->yst_ctime = oh->yst_ctime; in yaffs_load_attribs()
24 obj->yst_rdev = oh->yst_rdev; in yaffs_load_attribs()
28 void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj) in yaffs_load_attribs_oh() argument
31 oh->win_atime[0] = obj->win_atime[0]; in yaffs_load_attribs_oh()
32 oh->win_ctime[0] = obj->win_ctime[0]; in yaffs_load_attribs_oh()
33 oh->win_mtime[0] = obj->win_mtime[0]; in yaffs_load_attribs_oh()
34 oh->win_atime[1] = obj->win_atime[1]; in yaffs_load_attribs_oh()
35 oh->win_ctime[1] = obj->win_ctime[1]; in yaffs_load_attribs_oh()
36 oh->win_mtime[1] = obj->win_mtime[1]; in yaffs_load_attribs_oh()
38 oh->yst_uid = obj->yst_uid; in yaffs_load_attribs_oh()
39 oh->yst_gid = obj->yst_gid; in yaffs_load_attribs_oh()
40 oh->yst_atime = obj->yst_atime; in yaffs_load_attribs_oh()
41 oh->yst_mtime = obj->yst_mtime; in yaffs_load_attribs_oh()
42 oh->yst_ctime = obj->yst_ctime; in yaffs_load_attribs_oh()
43 oh->yst_rdev = obj->yst_rdev; in yaffs_load_attribs_oh()
48 void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev) in yaffs_attribs_init() argument
52 yfsd_win_file_time_now(obj->win_atime); in yaffs_attribs_init()
53 obj->win_ctime[0] = obj->win_mtime[0] = obj->win_atime[0]; in yaffs_attribs_init()
54 obj->win_ctime[1] = obj->win_mtime[1] = obj->win_atime[1]; in yaffs_attribs_init()
57 yaffs_load_current_time(obj, 1, 1); in yaffs_attribs_init()
58 obj->yst_rdev = rdev; in yaffs_attribs_init()
59 obj->yst_uid = uid; in yaffs_attribs_init()
60 obj->yst_gid = gid; in yaffs_attribs_init()
64 void yaffs_load_current_time(struct yaffs_obj *obj, int do_a, int do_c) in yaffs_load_current_time() argument
75 obj->yst_mtime = Y_CURRENT_TIME; in yaffs_load_current_time()
77 obj->yst_atime = obj->yst_atime; in yaffs_load_current_time()
79 obj->yst_ctime = obj->yst_atime; in yaffs_load_current_time()
83 loff_t yaffs_get_file_size(struct yaffs_obj *obj) in yaffs_get_file_size() argument
86 obj = yaffs_get_equivalent_obj(obj); in yaffs_get_file_size()
88 switch (obj->variant_type) { in yaffs_get_file_size()
90 return obj->variant.file_variant.file_size; in yaffs_get_file_size()
92 alias = obj->variant.symlink_variant.alias; in yaffs_get_file_size()
101 int yaffs_set_attribs(struct yaffs_obj *obj, struct iattr *attr) in yaffs_set_attribs() argument
106 obj->yst_mode = attr->ia_mode; in yaffs_set_attribs()
108 obj->yst_uid = attr->ia_uid; in yaffs_set_attribs()
110 obj->yst_gid = attr->ia_gid; in yaffs_set_attribs()
113 obj->yst_atime = Y_TIME_CONVERT(attr->ia_atime); in yaffs_set_attribs()
115 obj->yst_ctime = Y_TIME_CONVERT(attr->ia_ctime); in yaffs_set_attribs()
117 obj->yst_mtime = Y_TIME_CONVERT(attr->ia_mtime); in yaffs_set_attribs()
120 yaffs_resize_file(obj, attr->ia_size); in yaffs_set_attribs()
122 yaffs_update_oh(obj, NULL, 1, 0, 0, NULL); in yaffs_set_attribs()
128 int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr) in yaffs_get_attribs() argument
132 attr->ia_mode = obj->yst_mode; in yaffs_get_attribs()
134 attr->ia_uid = obj->yst_uid; in yaffs_get_attribs()
136 attr->ia_gid = obj->yst_gid; in yaffs_get_attribs()
139 Y_TIME_CONVERT(attr->ia_atime) = obj->yst_atime; in yaffs_get_attribs()
141 Y_TIME_CONVERT(attr->ia_ctime) = obj->yst_ctime; in yaffs_get_attribs()
143 Y_TIME_CONVERT(attr->ia_mtime) = obj->yst_mtime; in yaffs_get_attribs()
146 attr->ia_size = yaffs_get_file_size(obj); in yaffs_get_attribs()