]> err.no Git - util-linux/commitdiff
libblkid: don't probe for nested PT on tiny disks (<=1.44MiB)
authorKarel Zak <kzak@redhat.com>
Thu, 18 Feb 2010 15:19:31 +0000 (16:19 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 18 Feb 2010 15:19:31 +0000 (16:19 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/dos.c

index ec2ca1ebeeacdb2bcde462fee1485471ddd124db..f3e8a19839db1348791297f6ccb196d6fa948917 100644 (file)
@@ -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: