Starting with Linux 4.8 the SD/MMC OCR is shown also in /sys, so cache

it if present.
This commit is contained in:
2017-09-29 13:05:50 +00:00
parent a82071a3e3
commit bc72ff1642
3 changed files with 20 additions and 0 deletions

View File

@@ -211,6 +211,12 @@ namespace DiscImageChef.Devices
if(len == 0)
cachedScr = null;
}
if(System.IO.File.Exists("/sys/block/" + devPath + "/device/ocr"))
{
int len = ConvertFromHexASCII("/sys/block/" + devPath + "/device/ocr", out cachedOcr);
if(len == 0)
cachedOcr = null;
}
if(cachedCid != null)
{