[parted-devel] [PATCH] update comments in mac disk label code
Olaf Hering
olh at suse.de
Sat Apr 8 12:11:24 UTC 2006
Update comments in the mac label structs.
The address and the entry point of the boot data are 32bits. They are not used by MacOS.
Its also not a 64bit value, so it doesnt make sense to store them in long long variables.
Update the block0 layout. There are usually more than one driver if MacOS 9 or earlier
formated the drive. As stated in Devices-121.html, the info about them is stored in the Pad
area.
---
libparted/labels/mac.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
Index: parted-mainline/libparted/labels/mac.c
===================================================================
--- parted-mainline.orig/libparted/labels/mac.c
+++ parted-mainline/libparted/labels/mac.c
@@ -36,8 +36,8 @@
* Quik source)
*
* See also:
- * http://developer.apple.com/techpubs/mac/Devices/Devices-126.html
- * http://developer.apple.com/techpubs/mac/Devices/Devices-121.html
+ * http://developer.apple.com/documentation/mac/Devices/Devices-126.html
+ * http://developer.apple.com/documentation/mac/Devices/Devices-121.html
* http://devworld.apple.com/technotes/tn/tn1189.html
*
* Partition types:
@@ -52,8 +52,8 @@
* Apple_PRODOS ProDOS file system
* Apple_Free unused space
* Apple_Scratch empty
- * Apple_Void an unused partition map entry
- * Apple_Extra an unused partition map entry (AFAICT)
+ * Apple_Void padding for iso9660
+ * Apple_Extra an unused partition map entry
*
* Quick explanation:
* ------------------
@@ -107,16 +107,17 @@ typedef struct {
/* Driver descriptor structure, in block 0 */
typedef struct {
uint16_t signature; /* expected to be MAC_DRIVER_MAGIC */
- uint16_t block_size; /* usually 512 (occassionaly 2048?) */
+ uint16_t block_size; /* physical sector size */
uint32_t block_count; /* size of device in blocks */
- uint16_t dev_type; /* unused? */
- uint16_t dev_id; /* unused? */
- uint32_t data; /* unused? */
+ uint16_t dev_type; /* reserved */
+ uint16_t dev_id; /* reserved */
+ uint32_t data; /* reserved */
uint16_t driver_count; /* # of driver descriptor entries */
uint32_t start; /* first driver's starting block */
uint16_t size; /* size of driver in blocks */
uint16_t os_type; /* operating system type (MacOS = 1) */
- char reserved[486]; /* space reserved for the driver */
+ uint16_t specific[242]; /* info about additional drivers */
+ uint16_t unused; /* pad to 512 bytes */
} __attribute__ ((packed)) MacRawDisk;
typedef struct {
@@ -134,9 +135,9 @@ typedef struct {
PedSector data_region_length;
PedSector boot_region_length;
- long long boot_base_address;
- long long boot_entry_address;
- int boot_checksum;
+ uint32_t boot_base_address;
+ uint32_t boot_entry_address;
+ uint32_t boot_checksum;
uint32_t status;
uint32_t driver_sig;
@@ -582,7 +583,6 @@ _rawpart_analyse (MacRawPartition* raw_p
}
#endif /* !DISCOVER_ONLY */
- /* FIXME: should this add the high 32 bits (64 bit Macs?) */
mac_part_data->boot_base_address
= PED_BE32_TO_CPU (raw_part->boot_load);
mac_part_data->boot_entry_address
More information about the parted-devel
mailing list