summaryrefslogtreecommitdiff
path: root/cmds-filesystem.c
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2014-09-13 09:21:21 +0800
committerDavid Sterba <dsterba@suse.cz>2014-10-10 10:38:34 +0200
commit5444864e5605090be1cdbfb690a9b429fb9c2203 (patch)
treeb43a778761ed9da9d06f494de6d14cca5f9fea9a /cmds-filesystem.c
parent0d84aa903a51c472f273b02da98da2f6160e4289 (diff)
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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/cmds-filesystem.c b/cmds-filesystem.c
index 1638f0bf..74e3f904 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);