From b6bbaa837271698f238a9264c4070416077fb67b Mon Sep 17 00:00:00 2001 From: Paul Dagnelie Date: Wed, 3 Apr 2024 16:34:46 -0700 Subject: [PATCH] Give a better message from 'zpool get' with invalid pool name Reviewed-by: Brian Behlendorf Reviewed-by: Don Brady Reviewed-by: Tony Nguyen Signed-off-by: Paul Dagnelie Closes #15942 --- cmd/zpool/zpool_main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index c85a5f2851..9df5df0328 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -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); }