Files
Aaru/DiscImageChef.Devices/Linux/Extern.cs
Natalia Portillo 115bf5030f * DiscImageChef.Devices/Command.cs:
Add skeleton for send SCSI command method.

	* DiscImageChef.Devices/Linux/Command.cs:
	* DiscImageChef.Devices/Windows/Command.cs:
	  Added per-platform send SCSI command method.

	* DiscImageChef.sln:
	* DiscImageChef.Interop/DetectOS.cs:
	* DiscImageChef.Interop/PlatformID.cs:
	* DiscImageChef.Interop/Properties/AssemblyInfo.cs:
	* DiscImageChef.Interop/DiscImageChef.Interop.csproj:
	  Added code to detect OS.

	* DiscImageChef.Devices/DiscImageChef.Devices.csproj:
	  Added per-platform send SCSI command method.
	Add skeleton for send SCSI command method.

	* DiscImageChef.Devices/Linux/Extern.cs:
	* DiscImageChef.Devices/Windows/Extern.cs:
	  Enhanced externs.

	* DiscImageChef.Devices/Linux/Structs.cs:
	  Typo.
2015-10-12 06:25:49 +01:00

30 lines
1.1 KiB
C#

using System.Runtime.InteropServices;
namespace DiscImageChef.Devices.Linux
{
static class Extern
{
[DllImport("libc", CharSet = CharSet.Ansi, SetLastError = true)]
internal static extern int open(
string pathname,
[MarshalAs(UnmanagedType.U4)]
FileFlags flags);
[DllImport("libc")]
internal static extern int close(int fd);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlInt(int fd, LinuxIoctl request, out int value);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlSg(int fd, LinuxIoctl request, ref sg_io_hdr_t value);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlHdTaskfile(int fd, LinuxIoctl request, ref hd_drive_task_hdr value);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlHdTask(int fd, LinuxIoctl request, ref byte[] value);
}
}