mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Reformatted.
This commit is contained in:
@@ -63,7 +63,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
duration = 0;
|
||||
sense = false;
|
||||
|
||||
if (buffer == null)
|
||||
if(buffer == null)
|
||||
return -1;
|
||||
|
||||
ScsiPassThroughDirectAndSenseBuffer sptd_sb = new ScsiPassThroughDirectAndSenseBuffer();
|
||||
@@ -88,7 +88,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
(uint)Marshal.SizeOf(sptd_sb), ref k, IntPtr.Zero);
|
||||
DateTime end = DateTime.Now;
|
||||
|
||||
if (hasError)
|
||||
if(hasError)
|
||||
error = Marshal.GetLastWin32Error();
|
||||
|
||||
Marshal.Copy(sptd_sb.sptd.DataBuffer, buffer, 0, buffer.Length);
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
[MarshalAs(UnmanagedType.U4)] FileAttributes flagsAndAttributes,
|
||||
IntPtr templateFile);
|
||||
|
||||
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint="ioctl", CharSet = CharSet.Auto)]
|
||||
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "ioctl", CharSet = CharSet.Auto)]
|
||||
internal static extern bool DeviceIoControlScsi(
|
||||
SafeFileHandle hDevice,
|
||||
WindowsIoctl IoControlCode,
|
||||
@@ -66,7 +66,7 @@ namespace DiscImageChef.Devices.Windows
|
||||
IntPtr Overlapped
|
||||
);
|
||||
|
||||
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint="ioctl", CharSet = CharSet.Auto)]
|
||||
[DllImport("Kernel32.dll", SetLastError = true, EntryPoint = "ioctl", CharSet = CharSet.Auto)]
|
||||
internal static extern bool DeviceIoControlAta(
|
||||
SafeFileHandle hDevice,
|
||||
WindowsIoctl IoControlCode,
|
||||
|
||||
@@ -89,20 +89,30 @@ namespace DiscImageChef.Devices.Windows
|
||||
struct AtaTaskFile
|
||||
{
|
||||
// Fields for commands sent
|
||||
[FieldOffset(0)] public byte Features;
|
||||
[FieldOffset(6)] public byte Command;
|
||||
[FieldOffset(0)]
|
||||
public byte Features;
|
||||
[FieldOffset(6)]
|
||||
public byte Command;
|
||||
|
||||
// Fields on command return
|
||||
[FieldOffset(0)] public byte Error;
|
||||
[FieldOffset(6)] public byte Status;
|
||||
[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;
|
||||
[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