fdisk_sun: fix corrupted partition data with blank disk
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sat, 9 Feb 2013 19:12:25 +0000 (21:12 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 10 Feb 2013 23:22:48 +0000 (00:22 +0100)
After creating Sun disk label for the first time for a blank disk,
the partition table appears corrupted because current_label_type will
never get set to a proper type. Fix this by calling check_sun_label()
after BusyBox has created the label.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/fdisk_sun.c

index e7fcc067cd87a2cc92565f4aacbcd4eee258b5f3..d11c54012312ce3277aedf56920c74a1e91c5e74 100644 (file)
@@ -348,6 +348,7 @@ create_sunlabel(void)
 
        set_all_unchanged();
        set_changed(0);
+       check_sun_label();
        get_boot(CREATE_EMPTY_SUN);
 }