mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Added ATA IOCTLs.
This commit is contained in:
@@ -20,14 +20,51 @@ namespace DiscImageChef.Devices.Windows
|
||||
public IntPtr DataBuffer;
|
||||
public uint SenseInfoOffset;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
|
||||
public byte[] Cdb;
|
||||
public byte[] Cdb;
|
||||
};
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
struct ScsiPassThroughDirectAndSenseBuffer {
|
||||
struct ScsiPassThroughDirectAndSenseBuffer
|
||||
{
|
||||
public ScsiPassThroughDirect sptd;
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
|
||||
public byte[] SenseBuf;
|
||||
}
|
||||
|
||||
struct AtaPassThroughDirect
|
||||
{
|
||||
public ushort Length;
|
||||
public AtaFlags AtaFlags;
|
||||
public byte PathId;
|
||||
public byte TargetId;
|
||||
public byte Lun;
|
||||
public byte ReservedAsUchar;
|
||||
public uint DataTransferLength;
|
||||
public uint TimeOutValue;
|
||||
public uint ReservedAsUlong;
|
||||
public IntPtr DataBuffer;
|
||||
public AtaTaskFile PreviousTaskFile;
|
||||
public AtaTaskFile CurrentTaskFile;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
struct AtaTaskFile
|
||||
{
|
||||
// Fields for commands sent
|
||||
[FieldOffset(0)] public byte Features;
|
||||
[FieldOffset(6)] public byte Command;
|
||||
|
||||
// Fields on command return
|
||||
[FieldOffset(0)] public byte Error;
|
||||
[FieldOffset(6)] public byte Status;
|
||||
|
||||
// Common fields
|
||||
[FieldOffset(1)] public byte SectorCount;
|
||||
[FieldOffset(2)] public byte SectorNumber;
|
||||
[FieldOffset(3)] public byte CylinderLow;
|
||||
[FieldOffset(4)] public byte CylinderHigh;
|
||||
[FieldOffset(5)] public byte DeviceHead;
|
||||
[FieldOffset(7)] public byte Reserved;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user