projects
/
yaffs2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
yaffs: Add utils header file
[yaffs2.git]
/
yaffs_attribs.c
diff --git
a/yaffs_attribs.c
b/yaffs_attribs.c
index 651a473f7f53b50972a3eb9f56dfe9d307f9abe6..fe914e558b64cba94ef599e8b463cde40bf8117b 100644
(file)
--- a/
yaffs_attribs.c
+++ b/
yaffs_attribs.c
@@
-1,7
+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-201
0
Aleph One Ltd.
+ * Copyright (C) 2002-201
1
Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
@@
-11,7
+11,6
@@
* published by the Free Software Foundation.
*/
* published by the Free Software Foundation.
*/
-
#include "yaffs_guts.h"
#include "yaffs_attribs.h"
#include "yaffs_guts.h"
#include "yaffs_attribs.h"
@@
-27,7
+26,7
@@
void yaffs_load_attribs(struct yaffs_obj *obj, struct yaffs_obj_hdr *oh)
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
{
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
{
-
oh->yst_uid = obj->yst_uid;
+ 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_gid = obj->yst_gid;
oh->yst_atime = obj->yst_atime;
oh->yst_mtime = obj->yst_mtime;
@@
-38,22
+37,21
@@
void yaffs_load_attribs_oh(struct yaffs_obj_hdr *oh, struct yaffs_obj *obj)
void yaffs_load_current_time(struct yaffs_obj *obj, int do_a, int do_c)
{
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_a
time;
-
if
(do_c)
-
obj->yst_ctime = obj->yst_a
time;
+ obj->yst_mtime = Y_CURRENT_TIME;
+
if
(do_a)
+
obj->yst_atime = obj->yst_m
time;
+
if
(do_c)
+
obj->yst_ctime = obj->yst_m
time;
}
void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev)
{
}
void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev)
{
- yaffs_load_current_time(obj,
1,
1);
+ yaffs_load_current_time(obj,
1,
1);
obj->yst_rdev = rdev;
obj->yst_uid = uid;
obj->yst_gid = gid;
}
obj->yst_rdev = rdev;
obj->yst_uid = uid;
obj->yst_gid = gid;
}
-
loff_t yaffs_get_file_size(struct yaffs_obj *obj)
{
YCHAR *alias = NULL;
loff_t yaffs_get_file_size(struct yaffs_obj *obj)
{
YCHAR *alias = NULL;
@@
-64,9
+62,9
@@
loff_t yaffs_get_file_size(struct yaffs_obj *obj)
return obj->variant.file_variant.file_size;
case YAFFS_OBJECT_TYPE_SYMLINK:
alias = obj->variant.symlink_variant.alias;
return obj->variant.file_variant.file_size;
case YAFFS_OBJECT_TYPE_SYMLINK:
alias = obj->variant.symlink_variant.alias;
- if(!alias)
+ if
(!alias)
return 0;
return 0;
- return
yaffs_strnlen(alias,
YAFFS_MAX_ALIAS_LENGTH);
+ return
strnlen(alias,
YAFFS_MAX_ALIAS_LENGTH);
default:
return 0;
}
default:
return 0;
}
@@
-124,5
+122,3
@@
int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr)
return YAFFS_OK;
}
return YAFFS_OK;
}
-
-