summaryrefslogtreecommitdiff
path: root/cmds-inspect.c
diff options
context:
space:
mode:
authorSatoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>2016-03-18 10:31:32 +0900
committerDavid Sterba <dsterba@suse.com>2016-03-18 14:14:03 +0100
commitf4f4fb206199651f7c7d51cab2832c386bf97a05 (patch)
tree63855ac8b5a36ab3c559ad603a879563e32b1f12 /cmds-inspect.c
parent5bec887333d4845ed8c7bcaaaadbda81e2c2aca9 (diff)
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 <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'cmds-inspect.c')
-rw-r--r--cmds-inspect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-inspect.c b/cmds-inspect.c
index 04e1ae8..6045985 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;