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

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Don Brady <[email protected]>
Reviewed-by: Tony Nguyen <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
Closes #15942
This commit is contained in:
Paul Dagnelie authored and Tony Hutter committed 2024-04-29 13:50:05 -07:00
1 parent 5d859a2e22
commit 889152ce4a
1 file changed
+3 -4
+3 -4
View File
@@ -10637,11 +10637,10 @@ found:
}
} 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, "\n");
usage(B_FALSE);
fprintf(stderr, gettext("Cannot get properties of %s: "
"no such pool available.\n"), argv[0]);
return (1);
}