From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: [PATCH 1/4] btrfs-progs: Avoid interpreting options after "--" when getting unit mode
Date: Mon, 14 Mar 2016 09:02:34 +0900 [thread overview]
Message-ID: <56E5FF9A.4020609@jp.fujitsu.com> (raw)
* actual result
======================================
# ./btrfs device usage -- -m /btrfs
/dev/sdf1, ID: 1
Device size: 95367.41MiB
Data,single: 2056.00MiB
Metadata,DUP: 2048.00MiB
System,DUP: 16.00MiB
Unallocated: 91247.41MiB
======================================
* expected result
======================================
# ./btrfs device usage -- -m /btrfs
ERROR: can't access '-m': No such file or directory
======================================
Signed-off-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
---
This patch can be applied to devel branch (commit: 31266d0ef811).
---
utils.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/utils.c b/utils.c
index d7ceaa8..77f0f68 100644
--- a/utils.c
+++ b/utils.c
@@ -3024,6 +3024,9 @@ unsigned int get_unit_mode_from_arg(int *argc, char *argv[], int df_mode)
int arg_end;
for (arg_i = 0; arg_i < *argc; arg_i++) {
+ if (!strcmp(argv[arg_i], "--"))
+ break;
+
if (!strcmp(argv[arg_i], "--raw")) {
unit_mode = UNITS_RAW;
argv[arg_i] = NULL;
--
2.7.0
next reply other threads:[~2016-03-14 0:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-14 0:02 Satoru Takeuchi [this message]
2016-03-14 0:12 ` [PATCH 2/4] btrfs-progs: fix a reression that "property" with -t option doesn't work Satoru Takeuchi
2016-03-14 12:23 ` David Sterba
2016-03-15 23:28 ` Satoru Takeuchi
2016-03-14 0:15 ` [PATCH 3/4] btrfs-progs: Fix a regression that btrfs filesystem label " Satoru Takeuchi
2016-03-14 12:19 ` David Sterba
2016-03-14 0:27 ` [PATCH 4/4] btrfs-progs: "device ready" accepts just one device Satoru Takeuchi
2016-03-14 12:05 ` David Sterba
2016-04-25 11:59 ` David Sterba
2016-03-14 12:28 ` [PATCH 1/4] btrfs-progs: Avoid interpreting options after "--" when getting unit mode David Sterba
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=56E5FF9A.4020609@jp.fujitsu.com \
--to=takeuchi_satoru@jp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.