From b11c8d639eba34d457046dd19c126e12da0865fd Mon Sep 17 00:00:00 2001 From: Gui Hecheng Date: Thu, 24 Jul 2014 11:27:28 +0800 Subject: btrfs-progs: output the correct path when fi-usage failed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we exec the following cmd: # btrfs file usage -t <-- 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 Signed-off-by: David Sterba --- cmds-fi-disk_usage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-fi-disk_usage.c') 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; } -- cgit v1.2.3