[Yaffs] patch: mkyaffsimage - incorrect argc check

Top Page
Attachments:
Message as email
+ (text/plain)
+ yaffs_userland_06_mkyaffsimage_argc.patch (text/plain)
Delete this message
Reply to this message
Author: Frank Rowand
Date:  
To: yaffs
Subject: [Yaffs] patch: mkyaffsimage - incorrect argc check
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 <>
MontaVista Software, Inc
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");