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 GitHub
parent 756e10b0a1
commit b6bbaa8372
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10793,11 +10793,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);
}