yaffs: More clean up
[yaffs2.git] / yaffs_yaffs1.c
index 89d570e14e6edf08ba9737ad9ea5db0c01042d1c..059d12515eb89b5431ff7ca6b087ee8ee32968c1 100644 (file)
@@ -17,7 +17,7 @@
 #include "yaffs_bitmap.h"
 #include "yaffs_getblockinfo.h"
 #include "yaffs_nand.h"
 #include "yaffs_bitmap.h"
 #include "yaffs_getblockinfo.h"
 #include "yaffs_nand.h"
-
+#include "yaffs_attribs.h"
 
 int yaffs1_scan(struct yaffs_dev *dev)
 {
 
 int yaffs1_scan(struct yaffs_dev *dev)
 {
@@ -259,21 +259,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                        in->variant_type = oh->type;
 
                                        in->yst_mode = oh->yst_mode;
                                        in->variant_type = oh->type;
 
                                        in->yst_mode = oh->yst_mode;
-#ifdef CONFIG_YAFFS_WINCE
-                                       in->win_atime[0] = oh->win_atime[0];
-                                       in->win_ctime[0] = oh->win_ctime[0];
-                                       in->win_mtime[0] = oh->win_mtime[0];
-                                       in->win_atime[1] = oh->win_atime[1];
-                                       in->win_ctime[1] = oh->win_ctime[1];
-                                       in->win_mtime[1] = oh->win_mtime[1];
-#else
-                                       in->yst_uid = oh->yst_uid;
-                                       in->yst_gid = oh->yst_gid;
-                                       in->yst_atime = oh->yst_atime;
-                                       in->yst_mtime = oh->yst_mtime;
-                                       in->yst_ctime = oh->yst_ctime;
-                                       in->yst_rdev = oh->yst_rdev;
-#endif
+                                       yaffs_load_attribs(in, oh);
                                        in->hdr_chunk = chunk;
                                        in->serial = tags.serial_number;
 
                                        in->hdr_chunk = chunk;
                                        in->serial = tags.serial_number;
 
@@ -284,21 +270,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                        in->variant_type = oh->type;
 
                                        in->yst_mode = oh->yst_mode;
                                        in->variant_type = oh->type;
 
                                        in->yst_mode = oh->yst_mode;
-#ifdef CONFIG_YAFFS_WINCE
-                                       in->win_atime[0] = oh->win_atime[0];
-                                       in->win_ctime[0] = oh->win_ctime[0];
-                                       in->win_mtime[0] = oh->win_mtime[0];
-                                       in->win_atime[1] = oh->win_atime[1];
-                                       in->win_ctime[1] = oh->win_ctime[1];
-                                       in->win_mtime[1] = oh->win_mtime[1];
-#else
-                                       in->yst_uid = oh->yst_uid;
-                                       in->yst_gid = oh->yst_gid;
-                                       in->yst_atime = oh->yst_atime;
-                                       in->yst_mtime = oh->yst_mtime;
-                                       in->yst_ctime = oh->yst_ctime;
-                                       in->yst_rdev = oh->yst_rdev;
-#endif
+                                       yaffs_load_attribs(in, oh);
                                        in->hdr_chunk = chunk;
                                        in->serial = tags.serial_number;
 
                                        in->hdr_chunk = chunk;
                                        in->serial = tags.serial_number;
 
@@ -320,7 +292,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                /* Set up as a directory */
                                                parent->variant_type =
                                                        YAFFS_OBJECT_TYPE_DIRECTORY;
                                                /* Set up as a directory */
                                                parent->variant_type =
                                                        YAFFS_OBJECT_TYPE_DIRECTORY;
-                                               YINIT_LIST_HEAD(&parent->variant.
+                                               INIT_LIST_HEAD(&parent->variant.
                                                                dir_variant.
                                                                children);
                                        } else if (!parent || parent->variant_type !=
                                                                dir_variant.
                                                                children);
                                        } else if (!parent || parent->variant_type !=
@@ -367,7 +339,7 @@ int yaffs1_scan(struct yaffs_dev *dev)
                                                        equiv_id =
                                                        oh->equiv_id;
                                                in->hard_links.next =
                                                        equiv_id =
                                                        oh->equiv_id;
                                                in->hard_links.next =
-                                                       (struct ylist_head *)
+                                                       (struct list_head *)
                                                        hard_list;
                                                hard_list = in;
                                                break;
                                                        hard_list;
                                                hard_list = in;
                                                break;