mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Add support for MD DATA drives in media info command.
This commit is contained in:
21
.idea/.idea.Aaru/.idea/contentModel.xml
generated
21
.idea/.idea.Aaru/.idea/contentModel.xml
generated
@@ -66,7 +66,13 @@
|
||||
<e p="Settings.StyleCop" t="Include" />
|
||||
<e p="aaruformat.xml" t="Include" />
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.0" t="Include">
|
||||
<e p="Aaru.AssemblyInfo.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
<e p="Aaru.Checksums" t="IncludeRecursive">
|
||||
<e p=".editorconfig" t="Include" />
|
||||
@@ -1284,7 +1290,15 @@
|
||||
</e>
|
||||
</e>
|
||||
<e p="bin" t="ExcludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive" />
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netcoreapp3.0" t="Include">
|
||||
<e p="Avalonia" t="Include">
|
||||
<e p="resources" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
</e>
|
||||
<e p="Aaru.Helpers" t="IncludeRecursive">
|
||||
<e p=".editorconfig" t="Include" />
|
||||
@@ -2101,6 +2115,9 @@
|
||||
<e p="obj" t="ExcludeRecursive">
|
||||
<e p="Debug" t="Include">
|
||||
<e p="netstandard2.0" t="Include">
|
||||
<e p="Avalonia" t="Include">
|
||||
<e p="resources" t="Include" />
|
||||
</e>
|
||||
<e p="OxyPlot.Avalonia.AssemblyInfo.cs" t="Include" />
|
||||
</e>
|
||||
</e>
|
||||
|
||||
@@ -268,6 +268,19 @@ namespace Aaru.Core.Media.Info
|
||||
DataFile.WriteTo("Media-Info command", outputPrefix, "_scsi_readattribute.bin", "SCSI READ ATTRIBUTE", seqBuf);
|
||||
}
|
||||
*/
|
||||
break;
|
||||
case PeripheralDeviceTypes.BridgingExpander
|
||||
when dev.Model.StartsWith("MDM", StringComparison.Ordinal) ||
|
||||
dev.Model.StartsWith("MDH", StringComparison.Ordinal):
|
||||
sense = dev.ReadCapacity(out cmdBuf, out senseBuf, dev.Timeout, out _);
|
||||
|
||||
if(!sense)
|
||||
{
|
||||
ReadCapacity = cmdBuf;
|
||||
Blocks = (ulong)((cmdBuf[0] << 24) + (cmdBuf[1] << 16) + (cmdBuf[2] << 8) + cmdBuf[3]);
|
||||
BlockSize = (uint)((cmdBuf[5] << 24) + (cmdBuf[5] << 16) + (cmdBuf[6] << 8) + cmdBuf[7]);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1390,17 +1403,15 @@ namespace Aaru.Core.Media.Info
|
||||
totalSize);
|
||||
|
||||
ulong middleZone =
|
||||
(totalSize -
|
||||
((PFI.Decode(cmdBuf).Value.Layer0EndPSN -
|
||||
PFI.Decode(cmdBuf).Value.DataAreaStartPSN) + 1) - gameSize) + 1;
|
||||
(totalSize - ((PFI.Decode(cmdBuf).Value.Layer0EndPSN -
|
||||
PFI.Decode(cmdBuf).Value.DataAreaStartPSN) + 1) - gameSize) + 1;
|
||||
|
||||
totalSize = l0Video + l1Video + (middleZone * 2) + gameSize;
|
||||
ulong layerBreak = l0Video + middleZone + (gameSize / 2);
|
||||
|
||||
XgdInfo = new XgdInfo
|
||||
{
|
||||
L0Video = l0Video, L1Video = l1Video, MiddleZone = middleZone,
|
||||
GameSize = gameSize,
|
||||
L0Video = l0Video, L1Video = l1Video, MiddleZone = middleZone, GameSize = gameSize,
|
||||
TotalSize = totalSize, LayerBreak = layerBreak
|
||||
};
|
||||
}
|
||||
|
||||
@@ -186,6 +186,9 @@ namespace Aaru.Commands.Media
|
||||
case PeripheralDeviceTypes.OpticalDevice:
|
||||
case PeripheralDeviceTypes.SimplifiedDevice:
|
||||
case PeripheralDeviceTypes.WriteOnceDevice:
|
||||
case PeripheralDeviceTypes.BridgingExpander
|
||||
when dev.Model.StartsWith("MDM", StringComparison.Ordinal) ||
|
||||
dev.Model.StartsWith("MDH", StringComparison.Ordinal):
|
||||
if(scsiInfo.ReadCapacity != null)
|
||||
DataFile.WriteTo("Media-Info command", outputPrefix, "_readcapacity.bin", "SCSI READ CAPACITY",
|
||||
scsiInfo.ReadCapacity);
|
||||
|
||||
Reference in New Issue
Block a user