mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
* CICMMetadata:
Updated to last upstream. * DiscImageChef.CommonTypes/MediaTypeFromSCSI.cs: Added DDS-2, DDS-3, DDS-4 with no medium type code. * DiscImageChef.Devices/Device/ScsiCommands/SPC.cs: Added REQUEST SENSE command. * DiscImageChef.Devices/Device/ScsiCommands/SSC.cs: Added SPACE command. * DiscImageChef.Devices/Enums.cs: Added enumeration for SPACE command codes. * DiscImageChef.Metadata/MediaType.cs: Added support for DDS, DDS-2, DDS-3, DDS-4.
This commit is contained in:
@@ -978,6 +978,28 @@ namespace DiscImageChef.Devices
|
||||
|
||||
return sense;
|
||||
}
|
||||
|
||||
public bool Space(out byte[] senseBuffer, SscSpaceCodes code, int count, uint timeout, out double duration)
|
||||
{
|
||||
senseBuffer = new byte[32];
|
||||
byte[] cdb = new byte[6];
|
||||
byte[] buffer = new byte[0];
|
||||
bool sense;
|
||||
byte[] count_b = BitConverter.GetBytes(count);
|
||||
|
||||
cdb[0] = (byte)ScsiCommands.Space;
|
||||
cdb[1] = (byte)((byte)code & 0x0F);
|
||||
cdb[2] = count_b[2];
|
||||
cdb[3] = count_b[1];
|
||||
cdb[4] = count_b[0];
|
||||
|
||||
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.None, out duration, out sense);
|
||||
error = lastError != 0;
|
||||
|
||||
DicConsole.DebugWriteLine("SCSI Device", "SPACE took {0} ms.", duration);
|
||||
|
||||
return sense;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user