From 378d454543e5357754e8d6727dc12e8afd797ddc Mon Sep 17 00:00:00 2001 From: Steve Finney Date: Thu, 11 May 2006 15:33:12 -0700 Subject: MTD Utils. (Resubmit as attachment) Add a basic usage message to flash_erase.c. Signed-off-by: Steven Finney --- flash_erase.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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) -- cgit v1.2.3