mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
REFACTOR: Member or type can be made internal.
This commit is contained in:
@@ -348,7 +348,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct AppleDriverDescriptorMap
|
||||
struct AppleDriverDescriptorMap
|
||||
{
|
||||
/// <summary>Signature <see cref="DDM_MAGIC"/></summary>
|
||||
public ushort sbSig;
|
||||
@@ -369,7 +369,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct AppleDriverEntry
|
||||
struct AppleDriverEntry
|
||||
{
|
||||
/// <summary>First sector of the driver</summary>
|
||||
public uint ddBlock;
|
||||
@@ -380,7 +380,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct AppleOldDevicePartitionMap
|
||||
struct AppleOldDevicePartitionMap
|
||||
{
|
||||
/// <summary>Signature <see cref="APM_MAGIC_OLD"/></summary>
|
||||
public ushort pdSig;
|
||||
@@ -389,7 +389,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct AppleMapOldPartitionEntry
|
||||
struct AppleMapOldPartitionEntry
|
||||
{
|
||||
/// <summary>First sector of the partition</summary>
|
||||
public uint pdStart;
|
||||
@@ -400,7 +400,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[Flags]
|
||||
public enum AppleMapFlags : uint
|
||||
enum AppleMapFlags : uint
|
||||
{
|
||||
/// <summary>Partition is valid</summary>
|
||||
Valid = 0x01,
|
||||
@@ -429,7 +429,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct AppleMapPartitionEntry
|
||||
struct AppleMapPartitionEntry
|
||||
{
|
||||
/// <summary>Signature <see cref="APM_MAGIC"/></summary>
|
||||
public ushort signature;
|
||||
|
||||
@@ -266,7 +266,7 @@ namespace DiscImageChef.PartPlugins
|
||||
|
||||
/// <summary>Apricot Label.</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ApricotLabel
|
||||
struct ApricotLabel
|
||||
{
|
||||
/// <summary>Version of format which created disk</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] version;
|
||||
@@ -439,7 +439,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ApricotParameterBlock
|
||||
struct ApricotParameterBlock
|
||||
{
|
||||
/// <summary>Bytes per sector</summary>
|
||||
public ushort bps;
|
||||
|
||||
@@ -42,8 +42,8 @@ namespace DiscImageChef.PartPlugins
|
||||
{
|
||||
public class BSD : PartPlugin
|
||||
{
|
||||
public const uint DISKMAGIC = 0x82564557;
|
||||
public const uint DISKCIGAM = 0x57455682;
|
||||
const uint DISKMAGIC = 0x82564557;
|
||||
const uint DISKCIGAM = 0x57455682;
|
||||
/// <summary>Known sector locations for BSD disklabel</summary>
|
||||
readonly ulong[] labelLocations = {0, 1, 2, 9};
|
||||
/// <summary>Known byte offsets for BSD disklabel</summary>
|
||||
@@ -172,7 +172,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
/// <summary>Drive type</summary>
|
||||
public enum dType : ushort
|
||||
enum dType : ushort
|
||||
{
|
||||
/// <summary>SMD, XSMD</summary>
|
||||
SMD = 1,
|
||||
@@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
/// <summary>Filesystem type</summary>
|
||||
public enum fsType : byte
|
||||
internal enum fsType : byte
|
||||
{
|
||||
/// <summary>Unused entry</summary>
|
||||
Unused = 0,
|
||||
@@ -303,7 +303,7 @@ namespace DiscImageChef.PartPlugins
|
||||
/// Drive flags
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum dFlags : uint
|
||||
enum dFlags : uint
|
||||
{
|
||||
/// <summary>Removable media</summary>
|
||||
Removable = 0x01,
|
||||
@@ -320,7 +320,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct DiskLabel
|
||||
struct DiskLabel
|
||||
{
|
||||
/// <summary><see cref="DISKMAGIC"/></summary>
|
||||
public uint d_magic;
|
||||
@@ -385,7 +385,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct BSDPartition
|
||||
struct BSDPartition
|
||||
{
|
||||
/// <summary>Sectors in partition</summary>
|
||||
public uint p_size;
|
||||
@@ -401,7 +401,7 @@ namespace DiscImageChef.PartPlugins
|
||||
public ushort p_cpg;
|
||||
}
|
||||
|
||||
public static string fsTypeToString(fsType typ)
|
||||
internal static string fsTypeToString(fsType typ)
|
||||
{
|
||||
switch(typ)
|
||||
{
|
||||
@@ -438,7 +438,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
}
|
||||
|
||||
public static DiskLabel GetDiskLabel(byte[] disklabel)
|
||||
static DiskLabel GetDiskLabel(byte[] disklabel)
|
||||
{
|
||||
GCHandle handle = GCHandle.Alloc(disklabel, GCHandleType.Pinned);
|
||||
DiskLabel dl = (DiskLabel)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(DiskLabel));
|
||||
@@ -446,7 +446,7 @@ namespace DiscImageChef.PartPlugins
|
||||
return dl;
|
||||
}
|
||||
|
||||
public static DiskLabel SwapDiskLabel(DiskLabel disklabel)
|
||||
static DiskLabel SwapDiskLabel(DiskLabel disklabel)
|
||||
{
|
||||
DiskLabel dl = BigEndianMarshal.SwapStructureMembersEndian(disklabel);
|
||||
for(int i = 0; i < dl.d_drivedata.Length; i++) dl.d_drivedata[i] = Swapping.Swap(dl.d_drivedata[i]);
|
||||
|
||||
@@ -295,7 +295,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct GptHeader
|
||||
struct GptHeader
|
||||
{
|
||||
public ulong signature;
|
||||
public uint revision;
|
||||
@@ -314,7 +314,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
|
||||
public struct GptEntry
|
||||
struct GptEntry
|
||||
{
|
||||
public Guid partitionType;
|
||||
public Guid partitionId;
|
||||
|
||||
@@ -583,12 +583,12 @@ namespace DiscImageChef.PartPlugins
|
||||
return MBRTypes[type];
|
||||
}
|
||||
|
||||
public const ushort MBR_Magic = 0xAA55;
|
||||
public const ushort NEC_Magic = 0xA55A;
|
||||
public const ushort DM_Magic = 0x55AA;
|
||||
const ushort MBR_Magic = 0xAA55;
|
||||
const ushort NEC_Magic = 0xA55A;
|
||||
const ushort DM_Magic = 0x55AA;
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct MasterBootRecord
|
||||
struct MasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 446)] public byte[] boot_code;
|
||||
@@ -600,7 +600,7 @@ namespace DiscImageChef.PartPlugins
|
||||
|
||||
// TODO: IBM Boot Manager
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ExtendedBootRecord
|
||||
struct ExtendedBootRecord
|
||||
{
|
||||
/// <summary>Boot code, almost always unused</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 446)] public byte[] boot_code;
|
||||
@@ -611,7 +611,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct TimedMasterBootRecord
|
||||
struct TimedMasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 218)] public byte[] boot_code;
|
||||
@@ -634,7 +634,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct SerializedMasterBootRecord
|
||||
struct SerializedMasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 440)] public byte[] boot_code;
|
||||
@@ -649,7 +649,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct ModernMasterBootRecord
|
||||
struct ModernMasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 218)] public byte[] boot_code;
|
||||
@@ -676,7 +676,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct NecMasterBootRecord
|
||||
struct NecMasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 380)] public byte[] boot_code;
|
||||
@@ -689,7 +689,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct DiskManagerMasterBootRecord
|
||||
struct DiskManagerMasterBootRecord
|
||||
{
|
||||
/// <summary>Boot code</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 252)] public byte[] boot_code;
|
||||
@@ -702,7 +702,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct MBRPartitionEntry
|
||||
struct MBRPartitionEntry
|
||||
{
|
||||
/// <summary>Partition status, 0x80 or 0x00, else invalid</summary>
|
||||
public byte status;
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace DiscImageChef.PartPlugins
|
||||
/// NeXT v3 disklabel, 544 bytes
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct NeXTLabel
|
||||
struct NeXTLabel
|
||||
{
|
||||
/// <summary>Signature</summary>
|
||||
public uint dl_version;
|
||||
@@ -245,7 +245,7 @@ namespace DiscImageChef.PartPlugins
|
||||
/// NeXT v1 and v2 disklabel, 7224 bytes
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct NeXTLabelOld
|
||||
struct NeXTLabelOld
|
||||
{
|
||||
/// <summary>Signature</summary>
|
||||
public uint dl_version;
|
||||
@@ -271,7 +271,7 @@ namespace DiscImageChef.PartPlugins
|
||||
/// NeXT disktab and partitions, 498 bytes
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct NeXTDiskTab
|
||||
struct NeXTDiskTab
|
||||
{
|
||||
/// <summary>Drive name</summary>
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 24)] public byte[] d_name;
|
||||
@@ -317,7 +317,7 @@ namespace DiscImageChef.PartPlugins
|
||||
/// Partition entries, 44 bytes each
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 2)]
|
||||
public struct NeXTEntry
|
||||
struct NeXTEntry
|
||||
{
|
||||
/// <summary>Sector of start, counting from front porch</summary>
|
||||
public int p_base;
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct PDInfo
|
||||
struct PDInfo
|
||||
{
|
||||
public uint driveid; /*identifies the device type*/
|
||||
public uint sanity; /*verifies device sanity*/
|
||||
@@ -412,7 +412,7 @@ namespace DiscImageChef.PartPlugins
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct PDInfoOld
|
||||
struct PDInfoOld
|
||||
{
|
||||
public uint driveid; /*identifies the device type*/
|
||||
public uint sanity; /*verifies device sanity*/
|
||||
@@ -473,7 +473,7 @@ namespace DiscImageChef.PartPlugins
|
||||
public int p_size; /*# of blocks in partition*/
|
||||
};
|
||||
|
||||
public enum pTag : ushort
|
||||
enum pTag : ushort
|
||||
{
|
||||
/// <summary>empty</summary>
|
||||
V_UNUSED = 0x0000,
|
||||
@@ -533,7 +533,7 @@ namespace DiscImageChef.PartPlugins
|
||||
V_VOMASK = 0x300 /* mask for open and valid */
|
||||
}
|
||||
|
||||
public static string decodeUNIXTAG(pTag type, bool isNew)
|
||||
static string decodeUNIXTAG(pTag type, bool isNew)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user