From 4640baab69cdc53926e25260ffb4d02b07cb96d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= Date: Wed, 7 Apr 2021 19:06:42 +0200 Subject: [PATCH] zfs_ids_to_path: print correct wrong values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Brian Behlendorf Reviewed-by: Pavel Zakharov Reviewed-by: Ryan Moeller Signed-off-by: Ahelenia ZiemiaƄska Closes #11859 --- cmd/zfs_ids_to_path/zfs_ids_to_path.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/zfs_ids_to_path/zfs_ids_to_path.c b/cmd/zfs_ids_to_path/zfs_ids_to_path.c index 8eea4c5b03..1d3bb6b29e 100644 --- a/cmd/zfs_ids_to_path/zfs_ids_to_path.c +++ b/cmd/zfs_ids_to_path/zfs_ids_to_path.c @@ -63,11 +63,11 @@ main(int argc, char **argv) uint64_t objset, object; if (sscanf(argv[1], "%llu", (u_longlong_t *)&objset) != 1) { - (void) fprintf(stderr, "Invalid objset id: %s\n", argv[2]); + (void) fprintf(stderr, "Invalid objset id: %s\n", argv[1]); usage(2); } if (sscanf(argv[2], "%llu", (u_longlong_t *)&object) != 1) { - (void) fprintf(stderr, "Invalid object id: %s\n", argv[3]); + (void) fprintf(stderr, "Invalid object id: %s\n", argv[2]); usage(3); } if ((g_zfs = libzfs_init()) == NULL) { @@ -76,7 +76,7 @@ main(int argc, char **argv) } zpool_handle_t *pool = zpool_open(g_zfs, argv[0]); if (pool == NULL) { - fprintf(stderr, "Could not open pool %s\n", argv[1]); + fprintf(stderr, "Could not open pool %s\n", argv[0]); libzfs_fini(g_zfs); return (5); }