[parted-devel] [PATCH] Prefer DOS partition table over MAC

Phillip Susi psusi at ubuntu.com
Tue Jun 12 15:53:36 BST 2018


Most live cds these days use a hybrid DOS/ISO/MAC image.  When written
to a USB stick it then causes parted to complain that the sector size
is supposed to be 2k according to the MAC table, but is 512 bytes.
Fix this by probing the DOS partition table first and using that.
---
 NEWS                  | 3 +++
 libparted/libparted.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index ee6efb6d..76831102 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,9 @@ GNU parted NEWS                                    -*- outline -*-
 
 ** Bug Fixes
 
+  Recognize DOS partition tables before MAC to avoid confusion with
+  hybrid ISO/DOS/MAC images that most live cds use.
+
   Fix atari disklabel false positives by probing other labels first.
 
   Fix resizepart to adjust the end to be -1 sector when using iec
diff --git a/libparted/libparted.c b/libparted/libparted.c
index 3bd071d0..0540dbdb 100644
--- a/libparted/libparted.c
+++ b/libparted/libparted.c
@@ -91,8 +91,8 @@ init_disk_types ()
 #ifdef ENABLE_PC98
 	ped_disk_pc98_init ();
 #endif
-	ped_disk_msdos_init ();
 	ped_disk_mac_init ();
+	ped_disk_msdos_init ();
 	ped_disk_gpt_init ();
 	ped_disk_dvh_init ();
 	ped_disk_bsd_init ();
-- 
2.17.1




More information about the parted-devel mailing list