mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Reformat code.
This commit is contained in:
@@ -53,63 +53,48 @@ namespace DiscImageChef.Filesystems
|
||||
{
|
||||
Name = "ECMA-67";
|
||||
PluginUUID = new Guid("62A2D44A-CBC1-4377-B4B6-28C5C92034A1");
|
||||
if(encoding == null)
|
||||
CurrentEncoding = Encoding.GetEncoding("iso-8859-1");
|
||||
else
|
||||
CurrentEncoding = encoding;
|
||||
if(encoding == null) CurrentEncoding = Encoding.GetEncoding("iso-8859-1");
|
||||
else CurrentEncoding = encoding;
|
||||
}
|
||||
|
||||
public ECMA67(ImagePlugin imagePlugin, Partition partition, Encoding encoding)
|
||||
{
|
||||
Name = "ECMA-67";
|
||||
PluginUUID = new Guid("62A2D44A-CBC1-4377-B4B6-28C5C92034A1");
|
||||
if(encoding == null)
|
||||
CurrentEncoding = Encoding.GetEncoding("iso-8859-1");
|
||||
else
|
||||
CurrentEncoding = encoding;
|
||||
if(encoding == null) CurrentEncoding = Encoding.GetEncoding("iso-8859-1");
|
||||
else CurrentEncoding = encoding;
|
||||
}
|
||||
|
||||
readonly byte[] ECMA67_Magic = { 0x56, 0x4F, 0x4C };
|
||||
readonly byte[] ECMA67_Magic = {0x56, 0x4F, 0x4C};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
struct VolumeLabel
|
||||
{
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public byte[] labelIdentifier;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] labelIdentifier;
|
||||
public byte labelNumber;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
|
||||
public byte[] volumeIdentifier;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] public byte[] volumeIdentifier;
|
||||
public byte volumeAccessibility;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)]
|
||||
public byte[] reserved1;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)]
|
||||
public byte[] owner;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)]
|
||||
public byte[] reserved2;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 26)] public byte[] reserved1;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)] public byte[] owner;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 20)] public byte[] reserved2;
|
||||
public byte surface;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)]
|
||||
public byte[] reserved3;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] reserved3;
|
||||
public byte recordLength;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)]
|
||||
public byte[] reserved4;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public byte[] reserved4;
|
||||
public byte fileLabelAllocation;
|
||||
public byte labelStandardVersion;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)]
|
||||
public byte[] reserved5;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 48)] public byte[] reserved5;
|
||||
}
|
||||
|
||||
public override bool Identify(ImagePlugin imagePlugin, Partition partition)
|
||||
{
|
||||
if(partition.Start > 0)
|
||||
return false;
|
||||
if(partition.Start > 0) return false;
|
||||
|
||||
if(partition.End < 8)
|
||||
return false;
|
||||
if(partition.End < 8) return false;
|
||||
|
||||
byte[] sector = imagePlugin.ReadSector(6);
|
||||
|
||||
if(sector.Length != 128)
|
||||
return false;
|
||||
if(sector.Length != 128) return false;
|
||||
|
||||
VolumeLabel vol = new VolumeLabel();
|
||||
IntPtr volPtr = Marshal.AllocHGlobal(Marshal.SizeOf(vol));
|
||||
|
||||
Reference in New Issue
Block a user