From a03611ce8c09a026063887ead7daaf76fe378ea1 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 23 Sep 2009 11:28:28 +0200 Subject: [PATCH] libblkid: cleanup topology fallback Signed-off-by: Karel Zak --- shlibs/blkid/src/topology/dm.c | 5 +---- shlibs/blkid/src/topology/evms.c | 4 +--- shlibs/blkid/src/topology/md.c | 4 +--- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/shlibs/blkid/src/topology/dm.c b/shlibs/blkid/src/topology/dm.c index 138c9f4b..ac7ce63d 100644 --- a/shlibs/blkid/src/topology/dm.c +++ b/shlibs/blkid/src/topology/dm.c @@ -22,12 +22,9 @@ #include "topology.h" - static int is_dm_device(dev_t devno) { - if (blkid_driver_has_major("device-mapper", major(devno))) - return 1; - return 0; + return blkid_driver_has_major("device-mapper", major(devno)); } static int probe_dm_tp(blkid_probe pr, const struct blkid_idmag *mag) diff --git a/shlibs/blkid/src/topology/evms.c b/shlibs/blkid/src/topology/evms.c index 9f6c48df..7e796915 100644 --- a/shlibs/blkid/src/topology/evms.c +++ b/shlibs/blkid/src/topology/evms.c @@ -34,9 +34,7 @@ static int is_evms_device(dev_t devno) { if (major(devno) == EVMS_MAJOR) return 1; - if (blkid_driver_has_major("evms", major(devno))) - return 1; - return 0; + return blkid_driver_has_major("evms", major(devno)); } static int probe_evms_tp(blkid_probe pr, const struct blkid_idmag *mag) diff --git a/shlibs/blkid/src/topology/md.c b/shlibs/blkid/src/topology/md.c index e084720f..77116163 100644 --- a/shlibs/blkid/src/topology/md.c +++ b/shlibs/blkid/src/topology/md.c @@ -65,9 +65,7 @@ static int is_md_device(dev_t devno) { if (major(devno) == MD_MAJOR) return 1; - if (blkid_driver_has_major("md", major(devno))) - return 1; - return 0; + return blkid_driver_has_major("md", major(devno)); } static int probe_md_tp(blkid_probe pr, const struct blkid_idmag *mag) -- 2.39.5