General refactor.

This commit is contained in:
2018-06-20 22:22:21 +01:00
parent dc1884f5d8
commit ec8b309670
93 changed files with 850 additions and 1015 deletions

View File

@@ -56,12 +56,10 @@ namespace DiscImageChef.Filesystems
{
ulong hdrSector = HEADER_POS / imagePlugin.Info.SectorSize;
FossilHeader hdr;
if(partition.Start + hdrSector > imagePlugin.Info.Sectors) return false;
byte[] sector = imagePlugin.ReadSector(partition.Start + hdrSector);
hdr = BigEndianMarshal.ByteArrayToStructureBigEndian<FossilHeader>(sector);
FossilHeader hdr = BigEndianMarshal.ByteArrayToStructureBigEndian<FossilHeader>(sector);
DicConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic,
FOSSIL_HDR_MAGIC);
@@ -79,10 +77,8 @@ namespace DiscImageChef.Filesystems
ulong hdrSector = HEADER_POS / imagePlugin.Info.SectorSize;
FossilHeader hdr;
byte[] sector = imagePlugin.ReadSector(partition.Start + hdrSector);
hdr = BigEndianMarshal.ByteArrayToStructureBigEndian<FossilHeader>(sector);
FossilHeader hdr = BigEndianMarshal.ByteArrayToStructureBigEndian<FossilHeader>(sector);
DicConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic,
FOSSIL_HDR_MAGIC);