linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Fix broken 'device scan' arguments parsing
@ 2016-03-09  1:19 Yauhen Kharuzhy
  2016-03-09  8:24 ` Satoru Takeuchi
  2016-03-09 13:35 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Yauhen Kharuzhy @ 2016-03-09  1:19 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Yauhen Kharuzhy

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-09 13:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-09  1:19 [PATCH] Fix broken 'device scan' arguments parsing Yauhen Kharuzhy
2016-03-09  8:24 ` Satoru Takeuchi
2016-03-09 13:19   ` David Sterba
2016-03-09 13:35 ` David Sterba

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).