From f4f4fb206199651f7c7d51cab2832c386bf97a05 Mon Sep 17 00:00:00 2001 From: Satoru Takeuchi Date: Fri, 18 Mar 2016 10:31:32 +0900 Subject: btrfs-progs: inspect subvolid-resolve: fix argument parsing "inspect-internal subvolid-resolve" doesn't work from the following commit. commit 176aeca9a148 ("btrfs-progs: add getopt stubs where needed") It's because 1st argument, subvolid, is also used for the pathname of filesystem. 2nd argument should be used for this purpose instead. * actual result ================================================== # ./btrfs inspect-internal subvolid-resolve 260 /btrfs ERROR: cannot access '260': No such file or directory ================================================== * expected result ================================================== # btrfs inspect-internal subvolid-resolve 260 /btrfs snap ================================================== Signed-off-by: Satoru Takeuchi Signed-off-by: David Sterba --- cmds-inspect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-inspect.c') diff --git a/cmds-inspect.c b/cmds-inspect.c index 04e1ae86..6045985f 100644 --- a/cmds-inspect.c +++ b/cmds-inspect.c @@ -273,7 +273,7 @@ static int cmd_inspect_subvolid_resolve(int argc, char **argv) if (check_argc_exact(argc - optind, 2)) usage(cmd_inspect_subvolid_resolve_usage); - fd = btrfs_open_dir(argv[optind], &dirstream, 1); + fd = btrfs_open_dir(argv[optind + 1], &dirstream, 1); if (fd < 0) { ret = -ENOENT; goto out; -- cgit v1.2.3