#include "yaffs_bitmap.h"
#include "yaffs_getblockinfo.h"
#include "yaffs_nand.h"
+#include "yaffs_attribs.h"
-
-int yaffs1_scan(yaffs_dev_t *dev)
+int yaffs1_scan(struct yaffs_dev *dev)
{
- yaffs_ext_tags tags;
+ struct yaffs_ext_tags tags;
int blk;
int result;
int chunk;
int c;
int deleted;
- yaffs_block_state_t state;
- yaffs_obj_t *hard_list = NULL;
- yaffs_block_info_t *bi;
+ enum yaffs_block_state state;
+ struct yaffs_obj *hard_list = NULL;
+ struct yaffs_block_info *bi;
u32 seq_number;
- yaffs_obj_header *oh;
- yaffs_obj_t *in;
- yaffs_obj_t *parent;
+ struct yaffs_obj_hdr *oh;
+ struct yaffs_obj *in;
+ struct yaffs_obj *parent;
int alloc_failed = 0;
- struct yaffs_shadow_fixer_s *shadow_fixers = NULL;
+ struct yaffs_shadow_fixer *shadow_fixers = NULL;
u8 *chunk_data;
chunk_data,
NULL);
- oh = (yaffs_obj_header *) chunk_data;
+ oh = (struct yaffs_obj_hdr *) chunk_data;
in = yaffs_find_by_number(dev,
tags.obj_id);
if (in && oh->shadows_obj > 0) {
- struct yaffs_shadow_fixer_s *fixer;
- fixer = YMALLOC(sizeof(struct yaffs_shadow_fixer_s));
+ struct yaffs_shadow_fixer *fixer;
+ fixer = YMALLOC(sizeof(struct yaffs_shadow_fixer));
if (fixer) {
fixer->next = shadow_fixers;
shadow_fixers = fixer;
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->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;
/* 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 !=
equiv_id =
oh->equiv_id;
in->hard_links.next =
- (struct ylist_head *)
+ (struct list_head *)
hard_list;
hard_list = in;
break;
/* Fix up any shadowed objects */
{
- struct yaffs_shadow_fixer_s *fixer;
- yaffs_obj_t *obj;
+ struct yaffs_shadow_fixer *fixer;
+ struct yaffs_obj *obj;
while (shadow_fixers) {
fixer = shadow_fixers;