From ca3e8d2b057b3efaa0ec224ef73d6c88ad7d67c1 Mon Sep 17 00:00:00 2001 From: Goffredo Baroncelli Date: Wed, 15 Jun 2011 21:55:25 +0200 Subject: [PATCH 30/32] Scan the devices listed in /proc/partitions During the commands: - btrfs filesystem show - btrfs device scan the devices "scanned" are extracted from /proc/partitions. This should avoid to scan devices not suitable for a btrfs filesystem like cdrom and floppy or to scan not existant devices. The old behavior (scan all the block devices under /dev) may be forced passing the "--all-devices" switch. --- btrfs.c | 4 +- btrfs_cmds.c | 47 ++++++++++++++++++++++++++++++++++++++++---- man/btrfs.8.in | 26 +++++++++++++++--------- utils.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ utils.h | 2 + 5 files changed, 120 insertions(+), 17 deletions(-) Index: btrfs-progs-v0.19-35-g1b444cd/btrfs.c =================================================================== --- btrfs-progs-v0.19-35-g1b444cd.orig/btrfs.c +++ btrfs-progs-v0.19-35-g1b444cd/btrfs.c @@ -104,7 +104,7 @@ static struct Command commands[] = { NULL }, { do_show_filesystem, 999, - "filesystem show", "[||