diff options
author | Anand Jain <anand.jain@oracle.com> | 2014-09-13 09:21:21 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-10-10 10:38:34 +0200 |
commit | 5444864e5605090be1cdbfb690a9b429fb9c2203 (patch) | |
tree | b43a778761ed9da9d06f494de6d14cca5f9fea9a /cmds-filesystem.c | |
parent | 0d84aa903a51c472f273b02da98da2f6160e4289 (diff) | |
download | btrfs-progs-5444864e5605090be1cdbfb690a9b429fb9c2203.tar.gz |
btrfs-progs: remove BTRFS_SCAN_PROC scan method
The libblkid scan method which was introduced later, will also
scan devices under /proc/partitions. So we don't have to do
the explicit scan of the same.
Remove the scan method BTRFS_SCAN_PROC.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'cmds-filesystem.c')
-rw-r--r-- | cmds-filesystem.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 1638f0b..74e3f90 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -547,7 +547,8 @@ static int cmd_show(int argc, char **argv) struct list_head *cur_uuid; char *search = NULL; int ret; - int where = BTRFS_SCAN_LBLKID; + /* default, search both kernel and udev */ + int where = -1; int type = 0; char mp[BTRFS_PATH_NAME_MAX + 1]; char path[PATH_MAX]; @@ -568,7 +569,7 @@ static int cmd_show(int argc, char **argv) break; switch (c) { case 'd': - where = BTRFS_SCAN_PROC; + where = BTRFS_SCAN_LBLKID; break; case 'm': where = BTRFS_SCAN_MOUNTED; @@ -592,7 +593,7 @@ static int cmd_show(int argc, char **argv) * right away */ if (type == BTRFS_ARG_BLKDEV) { - if (where == BTRFS_SCAN_PROC) { + if (where == BTRFS_SCAN_LBLKID) { /* we need to do this because * legacy BTRFS_SCAN_DEV * provides /dev/dm-x paths @@ -623,7 +624,7 @@ static int cmd_show(int argc, char **argv) } } - if (where == BTRFS_SCAN_PROC) + if (where == BTRFS_SCAN_LBLKID) goto devs_only; /* show mounted btrfs */ @@ -638,7 +639,7 @@ static int cmd_show(int argc, char **argv) goto out; devs_only: - ret = scan_for_btrfs(where, !BTRFS_UPDATE_KERNEL); + ret = btrfs_scan_lblkid(!BTRFS_UPDATE_KERNEL); if (ret) { fprintf(stderr, "ERROR: %d while scanning\n", ret); |