From 0dbd99fb3e117cd5f87eda492b6b4fab1b5bea23 Mon Sep 17 00:00:00 2001 From: Goffredo Baroncelli Date: Wed, 15 Jun 2011 21:55:25 +0200 Subject: [PATCH] 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 | 2 +- btrfs_cmds.c | 47 ++++++++++++++++++++++++++++++++++++++++++----- man/btrfs.8.in | 27 ++++++++++++++++----------- utils.c | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ utils.h | 2 ++ 5 files changed, 119 insertions(+), 17 deletions(-) diff --git a/btrfs.c b/btrfs.c index a48f07b..c16dc60 100644 --- a/btrfs.c +++ b/btrfs.c @@ -109,7 +109,7 @@ static struct Command commands[] = { NULL }, { do_show_filesystem, 999, - "filesystem show", "[||