yaffs More quick tests and have also fixed a bugin yaffs_mount function.
[yaffs2.git] / yaffs_attribs.c
index 651a473..aaf4685 100644 (file)
@@ -11,7 +11,6 @@
  * published by the Free Software Foundation.
  */
 
-
 #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)
 {
-        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;
@@ -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)
 {
-        obj->yst_mtime = Y_CURRENT_TIME;
-        if(do_a)
-                obj->yst_atime = obj->yst_atime;
-        if(do_c)
-                obj->yst_ctime = obj->yst_atime;
+       obj->yst_mtime = Y_CURRENT_TIME;
+       if (do_a)
+               obj->yst_atime = obj->yst_atime;
+       if (do_c)
+               obj->yst_ctime = obj->yst_atime;
 }
 
 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;
 }
 
-
 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;
-               if(!alias)
+               if (!alias)
                        return 0;
-               return yaffs_strnlen(alias,YAFFS_MAX_ALIAS_LENGTH);
+               return yaffs_strnlen(alias, YAFFS_MAX_ALIAS_LENGTH);
        default:
                return 0;
        }
@@ -124,5 +122,3 @@ int yaffs_get_attribs(struct yaffs_obj *obj, struct iattr *attr)
 
        return YAFFS_OK;
 }
-
-