From 6d2b1f82c2526a783c7eebf8b1b8596ce9285cbf Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 19 Oct 2009 15:39:31 +0200 Subject: [PATCH] libblkid: topology - ignore non-blockdevs Signed-off-by: Karel Zak --- shlibs/blkid/src/topology/topology.c | 3 +++ 1 file changed, 3 insertions(+) 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")); -- 2.39.5