]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: check for swap or DM cow on small devices
authorKarel Zak <kzak@redhat.com>
Tue, 1 Feb 2011 08:38:33 +0000 (09:38 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 1 Feb 2011 08:38:33 +0000 (09:38 +0100)
The 1MiB limit for swap and COW is useless for Fedora LiveDVD where is
938KiB COW device.

Reported-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/superblocks/superblocks.c

index d1deb5eaf64a9d2689c0d5e3f99b68f23eff20ba..a1e1d36077c0642867df4c224465a52cd67b69fd 100644 (file)
@@ -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));