diff options
author | Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> | 2016-03-18 10:31:32 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-03-18 14:14:03 +0100 |
commit | f4f4fb206199651f7c7d51cab2832c386bf97a05 (patch) | |
tree | 63855ac8b5a36ab3c559ad603a879563e32b1f12 /cmds-inspect.c | |
parent | 5bec887333d4845ed8c7bcaaaadbda81e2c2aca9 (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.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |