From: Charles Manning Date: Mon, 26 Mar 2012 02:37:25 +0000 (+1300) Subject: Merge branch 'master' of ssh://www.aleph1.co.uk/home/aleph1/git/yaffs2 X-Git-Tag: pre-driver-refactoring~22 X-Git-Url: https://yaffs.net/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=95ff7ef3e08cf76d07b08cce3470d4840b27a8ea;hp=e49491a81d17bbede16583e9cd2498ede4ed2322 Merge branch 'master' of ssh://aleph1.co.uk/home/aleph1/git/yaffs2 --- diff --git a/utils/mkyaffs2image.c b/utils/mkyaffs2image.c index 5292b66..b46f285 100644 --- a/utils/mkyaffs2image.c +++ b/utils/mkyaffs2image.c @@ -242,7 +242,8 @@ static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh) oh->yst_mtime = SWAP32(oh->yst_mtime); oh->yst_ctime = SWAP32(oh->yst_ctime); - oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that! + oh->file_size_low = SWAP32(oh->file_size_low); // Aiee. An int... signed, at that! + oh->file_size_high = SWAP32(oh->file_size_high); // Aiee. An int... signed, at that! oh->equiv_id = SWAP32(oh->equiv_id); // alias - char array. oh->yst_rdev = SWAP32(oh->yst_rdev); @@ -300,7 +301,8 @@ static int write_object_header(int id, enum yaffs_obj_type t, struct stat *s, in if(t == YAFFS_OBJECT_TYPE_FILE) { - oh->file_size = s->st_size; + oh->file_size_low = s->st_size; + oh->file_size_high = (s->st_size >> 32); } if(t == YAFFS_OBJECT_TYPE_HARDLINK) diff --git a/utils/mkyaffsimage.c b/utils/mkyaffsimage.c index 5dbe51a..1d83595 100644 --- a/utils/mkyaffsimage.c +++ b/utils/mkyaffsimage.c @@ -45,8 +45,7 @@ typedef struct static objItem obj_list[MAX_OBJECTS]; -static int n_obj = 0; -static int obj_id = YAFFS_NOBJECT_BUCKETS + 1; +static int obj_alloc_id = YAFFS_NOBJECT_BUCKETS + 1; static int n_obj, nDirectories, nPages; @@ -283,7 +282,7 @@ static void object_header_little_to_big_endian(struct yaffs_obj_hdr* oh) oh->yst_mtime = SWAP32(oh->yst_mtime); oh->yst_ctime = SWAP32(oh->yst_ctime); - oh->file_size = SWAP32(oh->file_size); // Aiee. An int... signed, at that! + oh->file_size_low = SWAP32(oh->file_size_low); // Aiee. An int... signed, at that! oh->equiv_id = SWAP32(oh->equiv_id); // alias - char array. oh->yst_rdev = SWAP32(oh->yst_rdev); @@ -334,7 +333,7 @@ static int write_object_header(int obj_id, enum yaffs_obj_type t, struct stat *s if(t == YAFFS_OBJECT_TYPE_FILE) { - oh->file_size = s->st_size; + oh->file_size_low = s->st_size; } if(t == YAFFS_OBJECT_TYPE_HARDLINK) @@ -394,7 +393,7 @@ static int process_directory(int parent, const char *path) S_ISSOCK(stats.st_mode)) { - newObj = obj_id++; + newObj = obj_alloc_id++; n_obj++; printf("Object %d, %s is a ",newObj,full_name);