2010-07-19 18:20:25 +00:00
|
|
|
Index: parted-2.3/libparted/labels/dos.c
|
2009-08-06 20:06:27 +00:00
|
|
|
===================================================================
|
2010-07-19 18:20:25 +00:00
|
|
|
--- parted-2.3.orig/libparted/labels/dos.c 2010-07-08 13:28:03.000000000 +0200
|
|
|
|
+++ parted-2.3/libparted/labels/dos.c 2010-07-08 13:28:13.000000000 +0200
|
|
|
|
@@ -1176,7 +1176,13 @@ msdos_write (const PedDisk* disk)
|
2010-04-02 11:35:12 +00:00
|
|
|
return 0;
|
|
|
|
DosRawTable *table = (DosRawTable *) s0;
|
2007-01-15 14:29:14 +00:00
|
|
|
|
2010-04-02 11:35:12 +00:00
|
|
|
- if (!table->boot_code[0]) {
|
2007-01-15 14:29:14 +00:00
|
|
|
+ /* either no bootrecord at all, or AIX IPL signature ... */
|
2010-04-02 11:35:12 +00:00
|
|
|
+ if ( (!table->boot_code[0]) ||
|
|
|
|
+ ( table->boot_code[0] == (char) 0xc9 &&
|
|
|
|
+ table->boot_code[1] == (char) 0xc2 &&
|
|
|
|
+ table->boot_code[2] == (char) 0xd4 &&
|
|
|
|
+ table->boot_code[3] == (char) 0xc1)
|
|
|
|
+ ) {
|
|
|
|
memset (table->boot_code, 0, 512);
|
|
|
|
memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
|
2009-08-06 20:06:27 +00:00
|
|
|
}
|