From: Steve Finney Date: Thu, 11 May 2006 22:33:12 +0000 (-0700) Subject: MTD Utils. (Resubmit as attachment) X-Git-Tag: v1.1.0~41 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=378d454543e5357754e8d6727dc12e8afd797ddc;p=mtd-utils.git MTD Utils. (Resubmit as attachment) Add a basic usage message to flash_erase.c. Signed-off-by: Steven Finney --- diff --git a/flash_erase.c b/flash_erase.c index 870cf40..cf263fe 100644 --- a/flash_erase.c +++ b/flash_erase.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -141,10 +142,10 @@ int main(int argc,char *argv[]) int unlock; int res = 0; - if (1 >= argc) - { - fprintf(stderr,"You must specify a device\n"); - return 16; + if (1 >= argc || !strcmp(argv[1], "-h") || !strcmp (argv[1], "--help") ) { + printf("Usage: flash_erase MTD-device [start] [cnt (# erase blocks)] [lock]\n" + " flash_erase -h | --help\n") ; + return 16 ; } if (argc > 2)