parted/parted-wipeaix.patch
Petr Uzel 0b7af5fbb2 Accepting request 36773 from home:puzel:branches:Base:System
Copy from home:puzel:branches:Base:System/parted via accept of submit request 36773 revision 8.
Request was accepted with message:

OBS-URL: https://build.opensuse.org/request/show/36773
OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=19
2010-04-02 11:35:12 +00:00

20 lines
795 B
Diff

Index: parted-2.1/libparted/labels/dos.c
===================================================================
--- parted-2.1.orig/libparted/labels/dos.c 2010-02-02 13:26:28.000000000 +0100
+++ parted-2.1/libparted/labels/dos.c 2010-02-02 13:28:15.000000000 +0100
@@ -1187,7 +1187,13 @@ msdos_write (const PedDisk* disk)
return 0;
DosRawTable *table = (DosRawTable *) s0;
- if (!table->boot_code[0]) {
+ /* either no bootrecord at all, or AIX IPL signature ... */
+ 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));
}