REFACTOR: Remove unneeded code.

This commit is contained in:
2017-12-21 14:30:38 +00:00
parent 35ce7db892
commit dcd053b20d
343 changed files with 2842 additions and 2588 deletions

View File

@@ -33,7 +33,9 @@
using System;
using System.Runtime.InteropServices;
using System.Text;
using DiscImageChef.Decoders.ATA;
using DiscImageChef.Interop;
namespace DiscImageChef.Devices.Linux
{
@@ -382,7 +384,7 @@ namespace DiscImageChef.Devices.Linux
IntPtr buf = Marshal.AllocHGlobal(4096);
int resultSize;
if(Interop.DetectOS.Is64Bit())
if(DetectOS.Is64Bit())
{
long result64 = Extern.readlink64(path, buf, 4096);
if(result64 <= 0) return null;
@@ -400,7 +402,7 @@ namespace DiscImageChef.Devices.Linux
byte[] resultString = new byte[resultSize];
Marshal.Copy(buf, resultString, 0, resultSize);
Marshal.FreeHGlobal(buf);
return System.Text.Encoding.ASCII.GetString(resultString);
return Encoding.ASCII.GetString(resultString);
}
}
}

View File

@@ -54,10 +54,10 @@ namespace DiscImageChef.Devices.Linux
internal static extern int ioctlMmc(int fd, LinuxIoctl request, ref MmcIocCmd value);
[DllImport("libc", CharSet = CharSet.Ansi, SetLastError = true)]
internal static extern int readlink(string path, System.IntPtr buf, int bufsize);
internal static extern int readlink(string path, 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);
internal static extern long readlink64(string path, IntPtr buf, long bufsize);
[DllImport("libudev", CharSet = CharSet.Ansi, SetLastError = true)]
internal static extern IntPtr udev_new();