From: Karel Zak Date: Mon, 19 Oct 2009 13:39:31 +0000 (+0200) Subject: libblkid: topology - ignore non-blockdevs X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d2b1f82c2526a783c7eebf8b1b8596ce9285cbf;p=util-linux libblkid: topology - ignore non-blockdevs Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/topology/topology.c b/shlibs/blkid/src/topology/topology.c index 32d800f4..d1fb86f5 100644 --- a/shlibs/blkid/src/topology/topology.c +++ b/shlibs/blkid/src/topology/topology.c @@ -135,6 +135,9 @@ static int topology_probe(blkid_probe pr, struct blkid_chain *chn) if (!pr || chn->idx < -1) return -1; + if (!S_ISBLK(pr->mode)) + return -1; /* nothing, works with block devices only */ + if (chn->binary) { DBG(DEBUG_LOWPROBE, printf("initialize topology binary data\n"));