[Yaffs] [PATCH 4/4] making mkyaffs2image more robust

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Chuck Coffing
Date:  
To: yaffs
Subject: [Yaffs] [PATCH 4/4] making mkyaffs2image more robust
Do not explicitly create a root directory in the image, to match the actual
behavior of the filesystem.

The yaffs filesystem creates root and several other fake directories in memory
(see yaffs_CreateInitialDirectories); they are neither created nor necessary in
the NAND.
Index: mkyaffs2image/mkyaffs2image.c
===================================================================
--- mkyaffs2image.orig/mkyaffs2image.c    2010-08-26 17:15:39.000000000 -0600
+++ mkyaffs2image/mkyaffs2image.c    2010-08-26 17:16:07.000000000 -0600
@@ -569,8 +569,7 @@
     }

    
     printf("Processing directory %s into image file %s\n",argv[1],argv[2]);
-    if(write_object_header(1, YAFFS_OBJECT_TYPE_DIRECTORY, &stats, 1,"", -1, NULL) == 0)
-        process_directory(YAFFS_OBJECTID_ROOT,argv[1]);
+    process_directory(YAFFS_OBJECTID_ROOT,argv[1]);

    
     pad_image();