]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: (dos) use check() for dos-comaptible mode only
authorKarel Zak <kzak@redhat.com>
Tue, 24 Jun 2014 07:40:56 +0000 (09:40 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 24 Jun 2014 07:40:56 +0000 (09:40 +0200)
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index f3b162af17f78b0186d5e29785f78bb6675ccd62..a8d4337d7904758c998b7db9c3ba74fc3b99a8c2 100644 (file)
@@ -1153,6 +1153,9 @@ static void check(struct fdisk_context *cxt, size_t n,
 {
        unsigned int total, real_s, real_c;
 
+       if (!is_dos_compatible(cxt))
+               return;
+
        real_s = sector(s) - 1;
        real_c = cylinder(s, c);
        total = (real_c * cxt->geom.heads + h) * cxt->geom.sectors + real_s;