Code cleanup.

This commit is contained in:
2018-06-22 08:08:38 +01:00
parent 82f474c7e3
commit 88da8fc019
581 changed files with 22423 additions and 20839 deletions

View File

@@ -45,7 +45,7 @@ namespace DiscImageChef.Partitions
const int PT_VALID = 1;
public string Name => "DEC disklabel";
public Guid Id => new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F");
public Guid Id => new Guid("58CEC3B7-3B93-4D47-86EE-D6DADE9D444F");
public bool GetInformation(IMediaImage imagePlugin, out List<Partition> partitions, ulong sectorOffset)
{
@@ -67,12 +67,12 @@ namespace DiscImageChef.Partitions
foreach(Partition part in table.pt_part.Select(entry => new Partition
{
Start = entry.pi_blkoff,
Offset = (ulong)(entry.pi_blkoff * sector.Length),
Size = (ulong)entry.pi_nblocks,
Length = (ulong)(entry.pi_nblocks * sector.Length),
Start = entry.pi_blkoff,
Offset = (ulong)(entry.pi_blkoff * sector.Length),
Size = (ulong)entry.pi_nblocks,
Length = (ulong)(entry.pi_nblocks * sector.Length),
Sequence = counter,
Scheme = Name
Scheme = Name
}).Where(part => part.Size > 0))
{
partitions.Add(part);
@@ -85,16 +85,18 @@ namespace DiscImageChef.Partitions
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct DECLabel
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 440)] public byte[] padding;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 440)]
public byte[] padding;
public int pt_magic;
public int pt_valid;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DECPartition[] pt_part;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public DECPartition[] pt_part;
}
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct DECPartition
{
public int pi_nblocks;
public int pi_nblocks;
public uint pi_blkoff;
}
}