* README.md:
	* DiscImageChef.Partitions/GPT.cs:
	* DiscImageChef.Partitions/DiscImageChef.Partitions.csproj:
	  Added support for EFI GPT. Fixes #8.

	* commandline:

	* DiscImageChef.Decoders/SCSI/Sense.cs:
	  Corrected handling when sense contains multiple repeated
	  sense codes, in a not clean way (just ignoring repeats).

	* DiscImageChef.Filesystems/Acorn.cs:
	  Added exception catching and unsigned values to correct
	  Acorn DiscRecord structure. Fixes #34

	* DiscImageChef/Commands/DeviceReport.cs:
	  Check for 36 blocks in long block search in all cases.

	* DiscImageChef/Commands/DumpMedia.cs:
	  Only try the persistent pass one time. If it didn't correct
	  in the previous cycle it won't magically do now.
	Sort unreadalbe sectors before printing them.
This commit is contained in:
2016-02-05 19:24:48 +00:00
parent a090c8f46c
commit 5bc9dd3c10
13 changed files with 423 additions and 15 deletions

View File

@@ -67,18 +67,18 @@ namespace DiscImageChef.Plugins
public byte bootoption;
public byte lowsector;
public byte nzones;
public short zone_spare;
public int root;
public ushort zone_spare;
public uint root;
public uint disc_size;
public short disc_id;
public ushort disc_id;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)]
public byte[] disc_name;
public int disc_type;
public uint disc_type;
public uint disc_size_high;
public byte flags;
public byte nzones_high;
public int format_version;
public int root_size;
public uint format_version;
public uint root_size;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] reserved;
}
@@ -96,10 +96,18 @@ namespace DiscImageChef.Plugins
sbSector = ADFS_SB_POS / imagePlugin.GetSectorSize();
byte[] sector = imagePlugin.ReadSector(sbSector + partitionStart);
DiscRecord drSb;
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
DiscRecord drSb = (DiscRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiscRecord));
handle.Free();
try
{
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
drSb = (DiscRecord)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiscRecord));
handle.Free();
}
catch
{
return false;
}
if (drSb.log2secsize < 8 || drSb.log2secsize > 10)
return false;