Unlike what Inside Macintosh says, some implementations create

a Partition Map without a Driver Descriptor Map preceding it.
This commit is contained in:
2017-07-15 01:36:13 +01:00
parent bde737962f
commit 9f051e117c

View File

@@ -93,11 +93,10 @@ namespace DiscImageChef.PartPlugins
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbData = 0x{0:X8}", ddm.sbData);
DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDrvrCount = {0}", ddm.sbDrvrCount);
if(ddm.sbSig != DDM_MAGIC)
return false;
uint sequence = 0;
if(ddm.sbSig == DDM_MAGIC)
{
if(ddm.sbDrvrCount < max_drivers)
{
ddm.sbMap = new AppleDriverEntry[ddm.sbDrvrCount];
@@ -125,6 +124,7 @@ namespace DiscImageChef.PartPlugins
sequence++;
}
}
}
byte[] part_sector = imagePlugin.ReadSector(1);
AppleOldDevicePartitionMap old_map = BigEndianMarshal.ByteArrayToStructureBigEndian<AppleOldDevicePartitionMap>(part_sector);
@@ -167,7 +167,7 @@ namespace DiscImageChef.PartPlugins
sequence++;
}
return true;
return partitions.Count > 0;
}
AppleMapPartitionEntry entry;
@@ -203,7 +203,7 @@ namespace DiscImageChef.PartPlugins
sectors_to_read = entry_count + 2;
}
else
return true;
return partitions.Count > 0;
}
}
else
@@ -218,7 +218,7 @@ namespace DiscImageChef.PartPlugins
sectors_to_read = entry_count + 2;
}
else
return true;
return partitions.Count > 0;
}
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)]