1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-29 08:08:37 +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:
Pete Zaitcev 2024-01-15 14:42:28 -07:00 committed by Warner Losh
parent daf26f9350
commit 11500481c8

View File

@ -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();