From 69b3afc0b5e2676ccb78d374dc539fbb8e6bf721 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 1 Feb 2011 09:38:33 +0100 Subject: [PATCH] libblkid: check for swap or DM cow on small devices The 1MiB limit for swap and COW is useless for Fedora LiveDVD where is 938KiB COW device. Reported-by: Milan Broz Signed-off-by: Karel Zak --- shlibs/blkid/src/superblocks/superblocks.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/shlibs/blkid/src/superblocks/superblocks.c b/shlibs/blkid/src/superblocks/superblocks.c index d1deb5eaf6..a1e1d36077 100644 --- a/shlibs/blkid/src/superblocks/superblocks.c +++ b/shlibs/blkid/src/superblocks/superblocks.c @@ -334,14 +334,13 @@ static int superblocks_probe(blkid_probe pr, struct blkid_chain *chn) mag = id->magics ? &id->magics[0] : NULL; - /* don't probe for RAIDs, swap or journal on floppies */ + /* don't probe for RAIDs, swap or journal on CD/DVDs */ if ((id->usage & (BLKID_USAGE_RAID | BLKID_USAGE_OTHER)) && - blkid_probe_is_tiny(pr)) + blkid_probe_is_cdrom(pr)) continue; - /* don't probe for RAIDs, swap or journal on floppies or CD/DVDs */ - if ((id->usage & (BLKID_USAGE_RAID | BLKID_USAGE_OTHER)) && - (blkid_probe_is_tiny(pr) || blkid_probe_is_cdrom(pr))) + /* don't probe for RAIDs on floppies */ + if ((id->usage & BLKID_USAGE_RAID) && blkid_probe_is_tiny(pr)) continue; DBG(DEBUG_LOWPROBE, printf("[%d] %s:\n", i, id->name)); -- 2.47.3