mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Starting with Linux 4.8 the SD/MMC OCR is shown also in /sys, so cache
it if present.
This commit is contained in:
@@ -171,6 +171,19 @@ namespace DiscImageChef.Devices
|
||||
return 0;
|
||||
}
|
||||
|
||||
if((command == (MmcCommands)SecureDigitalCommands.SendOperatingCondition ||
|
||||
command == MmcCommands.SendOpCond) && cachedOcr != null)
|
||||
{
|
||||
System.DateTime start = System.DateTime.Now;
|
||||
buffer = new byte[cachedOcr.Length];
|
||||
System.Array.Copy(cachedOcr, buffer, buffer.Length);
|
||||
response = new uint[4];
|
||||
sense = false;
|
||||
System.DateTime end = System.DateTime.Now;
|
||||
duration = (end - start).TotalMilliseconds;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Command.SendMmcCommand(platformID, fd, command, write, isApplication, flags, argument, blockSize, blocks,
|
||||
ref buffer, out response, out duration, out sense, timeout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user