mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Remove unneeded code.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user