[Yaffs] patch: mkyaffsimage - incorrect argc check

Frank Rowand frowand@mvista.com
Mon, 22 Nov 2004 15:54:02 -0800


This is a multi-part message in MIME format.
--------------000304010109050407030607
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

The usage for mkyaffsimage is:

   mkyaffsimage dir image_file [convert]

The check for the value of argc fails when the convert argument is
not provided.  The attached patch allows the convert argument to
be ommitted.

-Frank
-- 
Frank Rowand <frank_rowand@mvista.com>
MontaVista Software, Inc

--------------000304010109050407030607
Content-Type: text/plain;
 name="yaffs_userland_06_mkyaffsimage_argc.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="yaffs_userland_06_mkyaffsimage_argc.patch"

Index: yaffs/utils/mkyaffsimage.c
===================================================================
--- yaffs.orig/utils/mkyaffsimage.c
+++ yaffs/utils/mkyaffsimage.c
@@ -535,7 +535,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");

--------------000304010109050407030607--