Skip to content

Commit 65ae160

Browse files
nabijaczleweliRageLtMan
authored andcommitted
zfs_ids_to_path: print correct wrong values
Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Pavel Zakharov <[email protected]> Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes openzfs#11859
1 parent a452cba commit 65ae160

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/zfs_ids_to_path/zfs_ids_to_path.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ main(int argc, char **argv)
6363

6464
uint64_t objset, object;
6565
if (sscanf(argv[1], "%llu", (u_longlong_t *)&objset) != 1) {
66-
(void) fprintf(stderr, "Invalid objset id: %s\n", argv[2]);
66+
(void) fprintf(stderr, "Invalid objset id: %s\n", argv[1]);
6767
usage(2);
6868
}
6969
if (sscanf(argv[2], "%llu", (u_longlong_t *)&object) != 1) {
70-
(void) fprintf(stderr, "Invalid object id: %s\n", argv[3]);
70+
(void) fprintf(stderr, "Invalid object id: %s\n", argv[2]);
7171
usage(3);
7272
}
7373
if ((g_zfs = libzfs_init()) == NULL) {
@@ -76,7 +76,7 @@ main(int argc, char **argv)
7676
}
7777
zpool_handle_t *pool = zpool_open(g_zfs, argv[0]);
7878
if (pool == NULL) {
79-
fprintf(stderr, "Could not open pool %s\n", argv[1]);
79+
fprintf(stderr, "Could not open pool %s\n", argv[0]);
8080
libzfs_fini(g_zfs);
8181
return (5);
8282
}

0 commit comments

Comments
 (0)