linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
To: <linux-btrfs@vger.kernel.org>
Cc: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Subject: [PATCH v2 2/3] btrfs-progs: output the correct path when fi-usage failed
Date: Thu, 24 Jul 2014 11:27:28 +0800	[thread overview]
Message-ID: <1406172448-11454-1-git-send-email-guihc.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1406172114-10793-2-git-send-email-guihc.fnst@cn.fujitsu.com>

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>
---
changelog
	v1->v2: add missing signoff-by
---
 cmds-fi-disk_usage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmds-fi-disk_usage.c b/cmds-fi-disk_usage.c
index 78dc414..1f4c88e 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;
 		}
-- 
1.8.1.4


  reply	other threads:[~2014-07-24  3:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-24  3:21 [PATCH 1/3] btrfs-progs: fix wrong data ratio for raid56 in btrfs-file-usage Gui Hecheng
2014-07-24  3:21 ` [PATCH 2/3] btrfs-progs: output the correct path when fi-usage failed Gui Hecheng
2014-07-24  3:27   ` Gui Hecheng [this message]
2014-07-24  3:21 ` [PATCH 3/3] btrfs-progs: fix improper output msg for btrfs-fi-usage Gui Hecheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406172448-11454-1-git-send-email-guihc.fnst@cn.fujitsu.com \
    --to=guihc.fnst@cn.fujitsu.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).