mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
synced 2025-01-09 20:44:11 +08:00
btrfs-progs: output the correct path when fi-usage failed
When we exec the following cmd: # btrfs file usage -t <path> <-- an invalid path output: # ERROR: can't access '-t' should be: # ERROR: can't access 'path' Just replace the static 'argv[1]' with 'argv[i]'. Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
parent
b2784b0fa1
commit
b11c8d639e
@ -835,7 +835,7 @@ int cmd_filesystem_usage(int argc, char **argv)
|
||||
fd = open_file_or_dir(argv[i], &dirstream);
|
||||
if (fd < 0) {
|
||||
fprintf(stderr, "ERROR: can't access '%s'\n",
|
||||
argv[1]);
|
||||
argv[i]);
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user