]> err.no Git - util-linux/commitdiff
libblkid: topology - ignore non-blockdevs
authorKarel Zak <kzak@redhat.com>
Mon, 19 Oct 2009 13:39:31 +0000 (15:39 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 19 Oct 2009 13:39:31 +0000 (15:39 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/topology/topology.c

index 32d800f4458cd5ce6182d181c3843a25484034a9..d1fb86f53a74a190449ce37db45128a710e5fbcd 100644 (file)
@@ -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"));