diff options
author | Karel Zak | 2010-02-18 16:19:31 +0100 |
---|---|---|
committer | Karel Zak | 2010-02-18 16:19:31 +0100 |
commit | 5689113d8807820a7f4279a07157f5a3b4c7ad9a (patch) | |
tree | 98a288526ea37bf9b7e7906e12078e4efdae1f5f /shlibs/blkid/src/partitions/dos.c | |
parent | libblkid: add generic functions for sysfs attributes (diff) | |
download | kernel-qcow2-util-linux-5689113d8807820a7f4279a07157f5a3b4c7ad9a.tar.gz kernel-qcow2-util-linux-5689113d8807820a7f4279a07157f5a3b4c7ad9a.tar.xz kernel-qcow2-util-linux-5689113d8807820a7f4279a07157f5a3b4c7ad9a.zip |
libblkid: don't probe for nested PT on tiny disks (<=1.44MiB)
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/partitions/dos.c')
-rw-r--r-- | shlibs/blkid/src/partitions/dos.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/shlibs/blkid/src/partitions/dos.c b/shlibs/blkid/src/partitions/dos.c index ec2ca1ebe..f3e8a1983 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: |