- Support setting boot flag in pMBR (bnc#872054): - drop: revert-gpt-add-commands-to-manipulate-pMBR-boot-flag.patch - add: libparted-copy-pmbr_boot-when-duplicating-GPT-disk.patch - refresh patches OBS-URL: https://build.opensuse.org/request/show/232154 OBS-URL: https://build.opensuse.org/package/show/Base:System/parted?expand=0&rev=90
30 lines
1012 B
Diff
30 lines
1012 B
Diff
---
|
|
libparted/labels/dos.c | 7 +++++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
Index: parted-3.1/libparted/labels/dos.c
|
|
===================================================================
|
|
--- parted-3.1.orig/libparted/labels/dos.c
|
|
+++ parted-3.1/libparted/labels/dos.c
|
|
@@ -1260,6 +1260,12 @@ msdos_write (const PedDisk* disk)
|
|
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 &&
|
|
@@ -1270,6 +1276,7 @@ msdos_write (const PedDisk* disk)
|
|
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)
|