From ca0141f325ec706d38a06f9aeb8e5eb6c6a8d09a Mon Sep 17 00:00:00 2001 From: Rob Norris Date: Tue, 8 Oct 2024 07:09:08 +1100 Subject: zpool/zfs: restore -V & --version options The -j option added a round of getopt, which didn't know the magic version flags. So just bypass the whole thing and go straight to the human output function for the special case. Sponsored-by: https://despairlabs.com/sponsor/ Reviewed-by: Brian Behlendorf Reviewed-by: Umer Saleem Signed-off-by: Rob Norris Closes #16615 Closes #16617 --- cmd/zpool/zpool_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd/zpool/zpool_main.c') diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index aa7da68aa..bc9f90cae 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -13613,7 +13613,7 @@ main(int argc, char **argv) * Special case '-V|--version' */ if ((strcmp(cmdname, "-V") == 0) || (strcmp(cmdname, "--version") == 0)) - return (zpool_do_version(argc, argv)); + return (zfs_version_print() != 0); /* * Special case 'help' -- cgit v1.2.3