From: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
To: linux-btrfs@vger.kernel.org
Cc: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
Subject: [PATCH] Fix broken 'device scan' arguments parsing
Date: Tue, 8 Mar 2016 17:19:40 -0800 [thread overview]
Message-ID: <1457486380-4051-1-git-send-email-yauhen.kharuzhy@zavadatar.com> (raw)
commit 52179e4fea41e55f31c92cd033a0b53a5107b4f4 'btrfs-progs: unify argc
min/max checking' brokes 'btrfs device scan' command when no argument
was given. Fix this.
Signed-off-by: Yauhen Kharuzhy <yauhen.kharuzhy@zavadatar.com>
---
cmds-device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cmds-device.c b/cmds-device.c
index cb470af..94ffdc5 100644
--- a/cmds-device.c
+++ b/cmds-device.c
@@ -273,7 +273,7 @@ static int cmd_device_scan(int argc, char **argv)
if (all && check_argc_max(argc - optind, 1))
usage(cmd_device_scan_usage);
- if (all || argc - optind == 1) {
+ if (all || argc - optind == 0) {
printf("Scanning for Btrfs filesystems\n");
ret = btrfs_scan_lblkid();
error_on(ret, "error %d while scanning", ret);
--
2.5.0
next reply other threads:[~2016-03-09 1:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-09 1:19 Yauhen Kharuzhy [this message]
2016-03-09 8:24 ` [PATCH] Fix broken 'device scan' arguments parsing Satoru Takeuchi
2016-03-09 13:19 ` David Sterba
2016-03-09 13:35 ` 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=1457486380-4051-1-git-send-email-yauhen.kharuzhy@zavadatar.com \
--to=yauhen.kharuzhy@zavadatar.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).