2014-05-07 09:41:13 +00:00
|
|
|
---
|
|
|
|
libparted/labels/dos.c | 7 +++++++
|
|
|
|
1 file changed, 7 insertions(+)
|
|
|
|
|
2015-04-24 15:49:30 +00:00
|
|
|
Index: parted-3.2/libparted/labels/dos.c
|
2012-07-03 13:40:05 +00:00
|
|
|
===================================================================
|
2015-04-24 15:49:30 +00:00
|
|
|
--- parted-3.2.orig/libparted/labels/dos.c
|
|
|
|
+++ parted-3.2/libparted/labels/dos.c
|
|
|
|
@@ -1285,6 +1285,12 @@ msdos_write (const PedDisk* disk)
|
2012-07-03 13:40:05 +00:00
|
|
|
return 0;
|
|
|
|
DosRawTable *table = (DosRawTable *) s0;
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Some ARM devices, such as the OMAP3 series, have a buggy boot rom that
|
|
|
|
+ * simply goes into nirvana if it finds non-0 in the first 4 bytes of the SD
|
|
|
|
+ * card.
|
|
|
|
+ */
|
|
|
|
+#if defined(__x86_64__) || defined(__i386__)
|
|
|
|
/* either no bootrecord at all, or AIX IPL signature ... */
|
|
|
|
if ( (!table->boot_code[0]) ||
|
|
|
|
( table->boot_code[0] == (char) 0xc9 &&
|
2015-04-24 15:49:30 +00:00
|
|
|
@@ -1295,6 +1301,7 @@ msdos_write (const PedDisk* disk)
|
2012-07-03 13:40:05 +00:00
|
|
|
memset (table->boot_code, 0, 512);
|
|
|
|
memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
/* If there is no unique identifier, generate a random one */
|
|
|
|
if (!table->mbr_signature)
|