mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Unlike what Inside Macintosh says, some implementations create
a Partition Map without a Driver Descriptor Map preceding it.
This commit is contained in:
@@ -93,11 +93,10 @@ namespace DiscImageChef.PartPlugins
|
|||||||
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbData = 0x{0:X8}", ddm.sbData);
|
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbData = 0x{0:X8}", ddm.sbData);
|
||||||
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDrvrCount = {0}", ddm.sbDrvrCount);
|
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDrvrCount = {0}", ddm.sbDrvrCount);
|
||||||
|
|
||||||
if(ddm.sbSig != DDM_MAGIC)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
uint sequence = 0;
|
uint sequence = 0;
|
||||||
|
|
||||||
|
if(ddm.sbSig == DDM_MAGIC)
|
||||||
|
{
|
||||||
if(ddm.sbDrvrCount < max_drivers)
|
if(ddm.sbDrvrCount < max_drivers)
|
||||||
{
|
{
|
||||||
ddm.sbMap = new AppleDriverEntry[ddm.sbDrvrCount];
|
ddm.sbMap = new AppleDriverEntry[ddm.sbDrvrCount];
|
||||||
@@ -125,6 +124,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
sequence++;
|
sequence++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
byte[] part_sector = imagePlugin.ReadSector(1);
|
byte[] part_sector = imagePlugin.ReadSector(1);
|
||||||
AppleOldDevicePartitionMap old_map = BigEndianMarshal.ByteArrayToStructureBigEndian<AppleOldDevicePartitionMap>(part_sector);
|
AppleOldDevicePartitionMap old_map = BigEndianMarshal.ByteArrayToStructureBigEndian<AppleOldDevicePartitionMap>(part_sector);
|
||||||
@@ -167,7 +167,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
sequence++;
|
sequence++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return partitions.Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
AppleMapPartitionEntry entry;
|
AppleMapPartitionEntry entry;
|
||||||
@@ -203,7 +203,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
sectors_to_read = entry_count + 2;
|
sectors_to_read = entry_count + 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
return partitions.Count > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -218,7 +218,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
sectors_to_read = entry_count + 2;
|
sectors_to_read = entry_count + 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return true;
|
return partitions.Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] entries = imagePlugin.ReadSectors(0, sectors_to_read);
|
byte[] entries = imagePlugin.ReadSectors(0, sectors_to_read);
|
||||||
@@ -308,7 +308,7 @@ namespace DiscImageChef.PartPlugins
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return partitions.Count > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||||
|
|||||||
Reference in New Issue
Block a user