* DiscImageChef.Decoders/SCSI/Modes.cs:

Check for vendor pages not following page format (even if
	  they must).

	* DiscImageChef.Devices/Device/Constructor.cs:
	  Some devices (at least smsc usb-floppy) crash and reset when
	  receiving ata over the ATA PASS-THROUGH scsi command. This
	  will check for SCSI compliance first giving devices time to
	  reset.

	* DiscImageChef.Devices/Device/ScsiCommands.cs:
	  Some devices (smsc usb floppies) return the real command
	  result size disregarding allocation length and generating a
	  buffer overflow.

	* DiscImageChef.Devices/Enums.cs:
	  Added some vendor commands for Plextor and HL-DT-ST devices.

	* DiscImageChef/Commands/DeviceInfo.cs:
	  Mode sense should be written even if it can't be decoded.
This commit is contained in:
2015-11-05 06:50:02 +00:00
parent 626c9062eb
commit 361b8977b0
8 changed files with 110 additions and 49 deletions

View File

@@ -1,3 +1,8 @@
2015-11-05 Natalia Portillo <claunia@claunia.com>
* Commands/DeviceInfo.cs:
Mode sense should be written even if it can't be decoded.
2015-11-02 Natalia Portillo <claunia@claunia.com>
* Options.cs:

View File

@@ -349,16 +349,16 @@ namespace DiscImageChef.Commands
decMode = Decoders.SCSI.Modes.DecodeMode6(modeBuf, devType);
}
if (decMode.HasValue)
if (!sense)
{
if(!string.IsNullOrEmpty(options.OutputPrefix))
if (!string.IsNullOrEmpty(options.OutputPrefix))
{
if (!File.Exists(options.OutputPrefix + "_scsi_modesense.bin"))
{
try
{
DicConsole.DebugWriteLine("Device-Info command", "Writing SCSI MODE SENSE to {0}{1}", options.OutputPrefix, "_scsi_modesense.bin");
outputFs = new FileStream(options.OutputPrefix +"_scsi_modesense.bin", FileMode.CreateNew);
outputFs = new FileStream(options.OutputPrefix + "_scsi_modesense.bin", FileMode.CreateNew);
outputFs.Write(modeBuf, 0, modeBuf.Length);
outputFs.Close();
}
@@ -370,7 +370,10 @@ namespace DiscImageChef.Commands
else
DicConsole.ErrorWriteLine("Not overwriting file {0}{1}", options.OutputPrefix, "_scsi_modesense.bin");
}
}
if (decMode.HasValue)
{
DicConsole.WriteLine(Decoders.SCSI.Modes.PrettifyModeHeader(decMode.Value.Header, devType));
if (decMode.Value.Pages != null)
@@ -608,7 +611,7 @@ namespace DiscImageChef.Commands
{
try
{
DicConsole.DebugWriteLine("Device-Info command", "Writing SCSI MODE SENSE to {0}{1}", options.OutputPrefix, "_mmc_getconfiguration.bin");
DicConsole.DebugWriteLine("Device-Info command", "Writing MMC GET CONFIGURATION to {0}{1}", options.OutputPrefix, "_mmc_getconfiguration.bin");
outputFs = new FileStream(options.OutputPrefix +"_mmc_getconfiguration.bin", FileMode.CreateNew);
outputFs.Write(confBuf, 0, confBuf.Length);
outputFs.Close();