mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Ensure controller or namespace node name is specified before trying to
access it. While here, also fix the identify usage message to show the -v and -x parameters. Sponsored by: Intel MFC after: 3 days
This commit is contained in:
parent
9c0871b260
commit
08c29873bf
2 changed files with 5 additions and 1 deletions
|
|
@ -259,6 +259,10 @@ identify(int argc, char *argv[])
|
|||
|
||||
while (getopt(argc, argv, "vx") != -1) ;
|
||||
|
||||
/* Check that a controller or namespace was specified. */
|
||||
if (optind >= argc)
|
||||
identify_usage();
|
||||
|
||||
target = argv[optind];
|
||||
|
||||
optreset = 1;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
" nvmecontrol devlist\n"
|
||||
|
||||
#define IDENTIFY_USAGE \
|
||||
" nvmecontrol identify <controller id|namespace id>\n"
|
||||
" nvmecontrol identify [-x [-v]] <controller id|namespace id>\n"
|
||||
|
||||
#define PERFTEST_USAGE \
|
||||
" nvmecontrol perftest <-n num_threads> <-o read|write>\n" \
|
||||
|
|
|
|||
Loading…
Reference in a new issue