Add a basic usage message to flash_erase.c.
Signed-off-by: Steven Finney <sfinney@healthhero.com>
#include <stdio.h>
#include <fcntl.h>
#include <time.h>
+#include <string.h>
#include <sys/ioctl.h>
#include <sys/mount.h>
#include <mtd/mtd-user.h>
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)