[PATCH 3/3] flash_eraseall: make -? option the same as --help
Mike Frysinger
vapier.adi at gmail.com
Tue Jun 22 13:31:57 EDT 2010
On Thu, Jun 17, 2010 at 04:42, Shevchenko Andriy wrote:
> --- a/flash_eraseall.c
> +++ b/flash_eraseall.c
> @@ -192,8 +192,6 @@ int main (int argc, char *argv[])
>
> void process_options (int argc, char *argv[])
> {
> - int error = 0;
> -
> static const char *short_options = "jq";
> static const struct option long_options[] = {
> {"help", no_argument, 0, 0},
> @@ -233,15 +231,13 @@ void process_options (int argc, char *argv[])
> jffs2 = 1;
> break;
> case '?':
> - error = 1;
> + display_help();
> break;
> }
> }
NAK. this isnt "-?", that's the error case of getopt. look at the
invocation of getopt here ... ? is not a valid char.
also, your patch bombing seems screwed up as linux-mtd was bcc-ed.
-mike
More information about the linux-mtd
mailing list