From: Karel Zak Date: Wed, 23 Sep 2009 09:28:28 +0000 (+0200) Subject: libblkid: cleanup topology fallback X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a03611ce8c09a026063887ead7daaf76fe378ea1;p=util-linux libblkid: cleanup topology fallback Signed-off-by: Karel Zak --- 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)