* DiscImageChef.Devices/Device/Constructor.cs:

Added support for USB on Linux.

	* DiscImageChef/Commands/DeviceInfo.cs:
	* DiscImageChef.Devices/Device/Variables.cs:
	  Added support for USB detection and metadata.

	* DiscImageChef.Devices/Linux/Extern.cs:
	* DiscImageChef.Devices/Linux/Command.cs:
	  Added readlink(3) support, for getting symlink destinations.
This commit is contained in:
2015-12-31 16:12:22 +00:00
parent da29ec63eb
commit eac5aae66c
7 changed files with 255 additions and 0 deletions

View File

@@ -56,6 +56,12 @@ namespace DiscImageChef.Devices.Linux
[DllImport("libc", EntryPoint="ioctl", SetLastError = true)]
internal static extern int ioctlSg(int fd, LinuxIoctl request, ref sg_io_hdr_t value);
[DllImport("libc", CharSet = CharSet.Ansi, SetLastError = true)]
internal static extern int readlink(string path, System.IntPtr buf, int bufsize);
[DllImport("libc", CharSet = CharSet.Ansi, EntryPoint="readlink", SetLastError = true)]
internal static extern long readlink64(string path, System.IntPtr buf, long bufsize);
}
}