Give a better message from 'zpool get' with invalid pool name

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Don Brady <don.brady@klarasystems.com>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
Closes #15942
This commit is contained in:
Paul Dagnelie 2024-04-03 16:34:46 -07:00 committed by Tony Hutter
parent 5d859a2e22
commit 889152ce4a
1 changed files with 3 additions and 4 deletions

View File

@ -10637,11 +10637,10 @@ found:
} }
} else { } else {
/* /*
* The first arg isn't a pool name, * The first arg isn't the name of a valid pool.
*/ */
fprintf(stderr, gettext("missing pool name.\n")); fprintf(stderr, gettext("Cannot get properties of %s: "
fprintf(stderr, "\n"); "no such pool available.\n"), argv[0]);
usage(B_FALSE);
return (1); return (1);
} }