mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-26 20:12:44 +00:00
mptable: improve error reporting for invalid commands
mptable ignores arguments with matching first letters, report errors when it gets garbate. PR: 38727 Reviewed by: imp
This commit is contained in:
parent
daf26f9350
commit
11500481c8
@ -183,19 +183,21 @@ main( int argc, char *argv[] )
|
||||
if ( strcmp( optarg, "mesg") == 0 )
|
||||
dmesg = 1;
|
||||
else
|
||||
dmesg = 0;
|
||||
usage();
|
||||
break;
|
||||
case 'h':
|
||||
if ( strcmp( optarg, "elp") == 0 )
|
||||
usage();
|
||||
break;
|
||||
usage();
|
||||
case 'g':
|
||||
if ( strcmp( optarg, "rope") == 0 )
|
||||
grope = 1;
|
||||
else
|
||||
usage();
|
||||
break;
|
||||
case 'v':
|
||||
if ( strcmp( optarg, "erbose") == 0 )
|
||||
verbose = 1;
|
||||
else
|
||||
usage();
|
||||
break;
|
||||
default:
|
||||
usage();
|
||||
|
Loading…
Reference in New Issue
Block a user