mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Code cleanup.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user