mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +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:
Submodule CICMMetadata updated: ab5967fcff...3df79256d4
@@ -1,3 +1,8 @@
|
||||
2016-10-12 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* MediaTypeFromSCSI.cs: Added DDS-2, DDS-3, DDS-4 with no
|
||||
medium type code.
|
||||
|
||||
2016-08-21 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* MediaType.cs: Added missing NEC and SHARP floppy types.
|
||||
|
||||
@@ -639,6 +639,12 @@ namespace DiscImageChef.CommonTypes
|
||||
return MediaType.QIC120;
|
||||
case 0x10:
|
||||
return MediaType.QIC150;
|
||||
case 0x24:
|
||||
return MediaType.DDS2;
|
||||
case 0x25:
|
||||
return MediaType.DDS3;
|
||||
case 0x26:
|
||||
return MediaType.DDS4;
|
||||
case 0x28:
|
||||
return MediaType.IBM3490E;
|
||||
case 0x40:
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
2016-10-12 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* SPC.cs: Added REQUEST SENSE command.
|
||||
|
||||
* SSC.cs: Added SPACE command.
|
||||
|
||||
* Enums.cs: Added enumeration for SPACE command codes.
|
||||
|
||||
2016-10-10 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* SPC.cs: Corrected buffer size for MODE SENSE (6)
|
||||
|
||||
@@ -774,6 +774,34 @@ namespace DiscImageChef.Devices
|
||||
|
||||
return sense;
|
||||
}
|
||||
|
||||
public bool RequestSense(out byte[] buffer, uint timeout, out double duration)
|
||||
{
|
||||
return RequestSense(false, out buffer, timeout, out duration);
|
||||
}
|
||||
|
||||
public bool RequestSense(bool descriptor, out byte[] buffer, uint timeout, out double duration)
|
||||
{
|
||||
byte[] senseBuffer = new byte[32];
|
||||
byte[] cdb = new byte[6];
|
||||
buffer = new byte[252];
|
||||
bool sense;
|
||||
|
||||
cdb[0] = (byte)ScsiCommands.RequestSense;
|
||||
if(descriptor)
|
||||
cdb[1] = 0x01;
|
||||
cdb[2] = 0;
|
||||
cdb[3] = 0;
|
||||
cdb[4] = (byte)buffer.Length;
|
||||
cdb[5] = 0;
|
||||
|
||||
lastError = SendScsiCommand(cdb, ref buffer, out senseBuffer, timeout, ScsiDirection.In, out duration, out sense);
|
||||
error = lastError != 0;
|
||||
|
||||
DicConsole.DebugWriteLine("SCSI Device", "REQUEST SENSE took {0} ms.", duration);
|
||||
|
||||
return sense;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3432,5 +3432,28 @@ namespace DiscImageChef.Devices
|
||||
/// </summary>
|
||||
Half = 7
|
||||
}
|
||||
|
||||
// TODO: Check obsoletes
|
||||
public enum SscSpaceCodes : byte
|
||||
{
|
||||
/// <summary>
|
||||
/// Logical blocks
|
||||
/// </summary>
|
||||
LogicalBlock = 0,
|
||||
/// <summary>
|
||||
/// Filemarks
|
||||
/// </summary>
|
||||
Filemark = 1,
|
||||
/// <summary>
|
||||
/// Sequential filemarks
|
||||
/// </summary>
|
||||
SequentialFilemark = 2,
|
||||
/// <summary>
|
||||
/// End-of-data
|
||||
/// </summary>
|
||||
EndOfData = 3,
|
||||
Obsolete1 = 4,
|
||||
Obsolete2 = 5
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2016-10-12 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* MediaType.cs: Added support for DDS, DDS-2, DDS-3, DDS-4.
|
||||
|
||||
2016-08-09 Natalia Portillo <claunia@claunia.com>
|
||||
|
||||
* DiscImageChef.Metadata.csproj: Bumped version to 3.2.99.2.
|
||||
|
||||
@@ -679,6 +679,22 @@ namespace DiscImageChef.Metadata
|
||||
DiscType = "HDD";
|
||||
DiscSubType = "Priam DataTower";
|
||||
break;
|
||||
case CommonTypes.MediaType.DDS1:
|
||||
DiscType = "DDS";
|
||||
DiscSubType = "DDS";
|
||||
break;
|
||||
case CommonTypes.MediaType.DDS2:
|
||||
DiscType = "DDS";
|
||||
DiscSubType = "DDS-2";
|
||||
break;
|
||||
case CommonTypes.MediaType.DDS3:
|
||||
DiscType = "DDS";
|
||||
DiscSubType = "DDS-3";
|
||||
break;
|
||||
case CommonTypes.MediaType.DDS4:
|
||||
DiscType = "DDS";
|
||||
DiscSubType = "DDS-4";
|
||||
break;
|
||||
default:
|
||||
DiscType = "Unknown";
|
||||
DiscSubType = "Unknown";
|
||||
|
||||
Reference in New Issue
Block a user