[Yaffs] mkyaffs*image argument #3 optional

Todd Poynor tpoynor at mvista.com
Tue Dec 6 03:06:27 GMT 2005


Currently it is required to pass some string in place of the optional
"convert" parameter if conversion is not desired.  While getopt(3) would
be a more scalable longer-term solution, for now it is proposed to make the
third parameter optional.  Any disagreement?  Thanks -- Todd

Index: utils/mkyaffs2image.c
===================================================================
RCS file: /home/aleph1/cvs/yaffs2/utils/mkyaffs2image.c,v
retrieving revision 1.1
diff -u -r1.1 mkyaffs2image.c
--- utils/mkyaffs2image.c	2 Nov 2005 06:45:24 -0000	1.1
+++ utils/mkyaffs2image.c	6 Dec 2005 03:00:50 -0000
@@ -461,7 +461,7 @@
 	
 	printf("mkyaffs2image: image building tool for YAFFS2 built "__DATE__"\n");
 	
-	if(argc <= 3)
+	if(argc < 3)
 	{
 		printf("usage: mkyaffs2image dir image_file [convert]\n");
 		printf("           dir        the directory tree to be converted\n");
Index: utils/mkyaffsimage.c
===================================================================
RCS file: /home/aleph1/cvs/yaffs2/utils/mkyaffsimage.c,v
retrieving revision 1.1
diff -u -r1.1 mkyaffsimage.c
--- utils/mkyaffsimage.c	6 Dec 2005 02:43:01 -0000	1.1
+++ utils/mkyaffsimage.c	6 Dec 2005 03:00:50 -0000
@@ -532,7 +532,7 @@
 	
 	printf("mkyaffsimage: image building tool for YAFFS built "__DATE__"\n");
 	
-	if(argc <= 3)
+	if(argc < 3)
 	{
 		printf("usage: mkyaffsimage dir image_file [convert]\n");
 		printf("           dir        the directory tree to be converted\n");



More information about the yaffs mailing list