tools/env: fail on invalid options

Signed-off-by: Daniel Hobi <daniel.hobi@schmid-telecom.ch>
This commit is contained in:
Daniel Hobi 2010-09-16 14:36:09 +02:00 committed by Wolfgang Denk
parent 122bc08845
commit 29ccd7c312

View file

@ -105,6 +105,10 @@ main(int argc, char *argv[])
case 'h': case 'h':
usage(); usage();
return EXIT_SUCCESS; return EXIT_SUCCESS;
default: /* '?' */
fprintf(stderr, "Try `%s --help' for more information."
"\n", cmdname);
return EXIT_FAILURE;
} }
} }