mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* DiscImageChef.Devices/Device/AtaCommands/Ata28.cs:
Correct SEEK command to not transfer anything. * DiscImageChef.Devices/Device/AtaCommands/AtaCHS.cs: Correct SEEK command to not transfer anything. Added differentiation between READ and READ WITH RETRIES for CHS mode. Changed blocksize to unsigned on READ LONG. * DiscImageChef.Devices/Device/AtaCommands/MCPT.cs: Change MCPT enable and disable commands to use CHS registers. * DiscImageChef.Devices/Linux/Command.cs: Linux kernel granularity for SG_IO is only 1ms, use .NET counters for faster times. Solves "infinity" speeds on SSDs. * DiscImageChef/Commands/DumpMedia.cs: * DiscImageChef/Commands/MediaInfo.cs: * DiscImageChef/Commands/MediaScan.cs: * DiscImageChef.Metadata/DeviceReport.cs: * DiscImageChef/Commands/DeviceReport.cs: Added support for ATA devices. * DiscImageChef/Commands/DeviceInfo.cs: Added support for Media Card Pass Through detection and information.
This commit is contained in:
@@ -84,7 +84,9 @@ namespace DiscImageChef.Devices.Linux
|
||||
Marshal.Copy(cdb, 0, io_hdr.cmdp, cdb.Length);
|
||||
Marshal.Copy(senseBuffer, 0, io_hdr.sbp, senseBuffer.Length);
|
||||
|
||||
DateTime start = DateTime.UtcNow;
|
||||
int error = Extern.ioctlSg(fd, LinuxIoctl.SG_IO, ref io_hdr);
|
||||
DateTime end = DateTime.UtcNow;
|
||||
|
||||
if (error < 0)
|
||||
error = Marshal.GetLastWin32Error();
|
||||
@@ -95,7 +97,10 @@ namespace DiscImageChef.Devices.Linux
|
||||
|
||||
sense |= (io_hdr.info & SgInfo.OkMask) != SgInfo.Ok;
|
||||
|
||||
duration = (double)io_hdr.duration;
|
||||
if (io_hdr.duration > 0)
|
||||
duration = (double)io_hdr.duration;
|
||||
else
|
||||
duration = (end - start).TotalMilliseconds;
|
||||
|
||||
Marshal.FreeHGlobal(io_hdr.dxferp);
|
||||
Marshal.FreeHGlobal(io_hdr.cmdp);
|
||||
|
||||
Reference in New Issue
Block a user