From: Karel Zak Date: Fri, 13 Aug 2010 07:59:31 +0000 (+0200) Subject: libblkid: wrong PT detection on RAID0 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a09f0933bb80c52ec1bc30a1678cef7e999aeff9;p=util-linux libblkid: wrong PT detection on RAID0 Reported-by: Yulia Kopkova Signed-off-by: Karel Zak --- diff --git a/shlibs/blkid/src/partitions/partitions.c b/shlibs/blkid/src/partitions/partitions.c index 5597181a..d6abc203 100644 --- a/shlibs/blkid/src/partitions/partitions.c +++ b/shlibs/blkid/src/partitions/partitions.c @@ -833,7 +833,7 @@ int blkid_probe_is_covered_by_pt(blkid_probe pr, for (i = 0; i < nparts; i++) { blkid_partition par = &ls->parts[i]; - if (par->start + par->size > pr->size) { + if (par->start + par->size > (pr->size >> 9)) { DBG(DEBUG_LOWPROBE, printf("partition #%d overflows " "device (off=%lu size=%lu)\n", par->partno, par->start, par->size));