summaryrefslogtreecommitdiff
path: root/cmds-fi-disk_usage.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2014-07-24 11:27:28 +0800
committerDavid Sterba <dsterba@suse.cz>2014-12-04 16:48:12 +0100
commitb11c8d639eba34d457046dd19c126e12da0865fd (patch)
tree6e5d1411bb32269eb079d598044649e6dd31f110 /cmds-fi-disk_usage.c
parentb2784b0fa15049608b128f42a3c56303e53dff84 (diff)
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>
Diffstat (limited to 'cmds-fi-disk_usage.c')
-rw-r--r--cmds-fi-disk_usage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c
index 98b6d7fc..6caa2824 100644
--- a/cmds-fi-disk_usage.c
+++ b/cmds-fi-disk_usage.c
@@ -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;
}