From: Karel Zak Date: Thu, 18 Feb 2010 15:19:31 +0000 (+0100) Subject: libblkid: don't probe for nested PT on tiny disks (<=1.44MiB) X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5689113d8807820a7f4279a07157f5a3b4c7ad9a;p=util-linux libblkid: don't probe for nested PT on tiny disks (<=1.44MiB) Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/partitions/dos.c b/shlibs/blkid/src/partitions/dos.c index ec2ca1eb..f3e8a198 100644 --- a/shlibs/blkid/src/partitions/dos.c +++ b/shlibs/blkid/src/partitions/dos.c @@ -221,25 +221,26 @@ static int probe_dos_pt(blkid_probe pr, const struct blkid_idmag *mag) goto err; } - /* Parse subtypes (nested partitions) */ - for (p = p0, i = 0; i < 4; i++, p++) { - int n; - - if (!dos_partition_size(p) || is_extended(p)) - continue; + /* Parse subtypes (nested partitions) on large disks */ + if (!blkid_probe_is_tiny(pr)) { + for (p = p0, i = 0; i < 4; i++, p++) { + int n; - for (n = 0; n < ARRAY_SIZE(dos_nested); n++) { - if (dos_nested[n].type != p->sys_type) + if (!dos_partition_size(p) || is_extended(p)) continue; - if (blkid_partitions_do_subprobe(pr, - blkid_partlist_get_partition(ls, i), - dos_nested[n].id) == -1) - goto err; - break; + for (n = 0; n < ARRAY_SIZE(dos_nested); n++) { + if (dos_nested[n].type != p->sys_type) + continue; + + if (blkid_partitions_do_subprobe(pr, + blkid_partlist_get_partition(ls, i), + dos_nested[n].id) == -1) + goto err; + break; + } } } - return 0; nothing: