aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Dagnelie <pcd@delphix.com>2024-04-03 23:34:46 +0000
committerTony Hutter <hutter2@llnl.gov>2024-04-29 20:50:05 +0000
commit889152ce4a8d82e5818384c3f95ef2446bea2621 (patch)
treed0ce89dc58fd52918ac42ceef8dccecd9cd76c84
parent5d859a2e22f8d2ff347803c4c8d025f7c6fd2ea9 (diff)
downloadsrc-889152ce4a8d82e5818384c3f95ef2446bea2621.tar.gz
src-889152ce4a8d82e5818384c3f95ef2446bea2621.zip
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
-rw-r--r--cmd/zpool/zpool_main.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 9b864219a4bf..5fa06b4bf208 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -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);
}