From 4e85e481887abba8141ff43597c09b5f91d70ee4 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Wed, 20 Aug 2014 17:22:13 -0500 Subject: btrfs-progs: scan /proc/partitions not all of /dev with "-d" We can scan for btrfs devices in a few ways. By default libblkid is used for "device scan" and "filesystem show"; with the -m option only mounted filesystems are scanned, and with -d we physically read every system device. But there's no reason for the complexity of a descent through /dev; /proc/partitions has every device known to the kernel, so just use that when -d is specified. Signed-off-by: Eric Sandeen Reviewed-by: Anand Jain Signed-off-by: David Sterba --- cmds-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds-device.c') diff --git a/cmds-device.c b/cmds-device.c index 0475bf6b..b6470243 100644 --- a/cmds-device.c +++ b/cmds-device.c @@ -223,7 +223,7 @@ static int cmd_scan_dev(int argc, char **argv) break; switch (c) { case 'd': - where = BTRFS_SCAN_DEV; + where = BTRFS_SCAN_PROC; all = 1; break; default: -- cgit v1.2.3