Added IOCTL skeletons.

This commit is contained in:
2015-10-05 21:20:25 +01:00
parent 1afeb5e545
commit 99d115b8dc
12 changed files with 301 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
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, int flags);
[DllImport("libc")]
internal static extern int close(int fd);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlInt(int fd, ulong request, out int value);
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlSg(int fd, ulong request, ref Structs.sg_io_hdr_t value);
}
}