]> err.no Git - util-linux/commitdiff
fdisk: fix freespace boundaries calculation on SGI disklabel
authorKarel Zak <kzak@redhat.com>
Mon, 29 Nov 2010 13:02:56 +0000 (14:02 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Nov 2010 13:02:56 +0000 (14:02 +0100)
Thanks to Aurelien Jarno <aurelien@aurel32.net>

Addresses: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=510130
Signed-off-by: Karel Zak <kzak@redhat.com>
fdisk/fdisksgilabel.c

index 3707a4cd1b6371ea3606560f4bb643e29ab4358b..3547195cafe8d55403954662059a4f981e28e276 100644 (file)
@@ -489,6 +489,9 @@ verify_sgi(int verbose)
                }
                start = sgi_get_start_sector(Index[i])
                        + sgi_get_num_sectors(Index[i]);
+               /* Align free space on cylinder boundary */
+               if (start % cylsize)
+                       start += cylsize - (start % cylsize);
                if (debug > 1) {
                        if (verbose)
                                printf("%2d:%12d\t%12d\t%12d\n", Index[i],