Be more verbose when debugging all SCSI MMC commands.

This commit is contained in:
2020-01-09 00:47:41 +00:00
parent 8feed1c694
commit 45b9288250

View File

@@ -101,7 +101,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "GET CONFIGURATION took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "GET CONFIGURATION (Starting Feature Number: {1}, Return Type: {2}, Sense: {3}, Last Error: {4}) took {0} ms.", duration, startingFeatureNumber, rt, sense, LastError);
return sense;
}
@@ -187,8 +187,8 @@ namespace DiscImageChef.Devices
out sense);
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "READ DISC STRUCTURE took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ DISC STRUCTURE (Media Type: {1}, Address: {2}, Layer Number: {3}, Format: {4}, AGID: {5}, Sense: {6}, Last Error: {7}) took {0} ms.", duration, mediaType, address, layerNumber, format, agid, sense, LastError);
return sense;
}
@@ -311,7 +311,7 @@ namespace DiscImageChef.Devices
if(buffer.Length <= tmpBuffer.Length)
{
Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length);
DicConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.", msf, format, trackSessionNumber, duration);
return sense;
}
@@ -324,7 +324,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
duration += tmpDuration;
DicConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.", msf, format, trackSessionNumber, duration);
return sense;
}
@@ -371,7 +371,7 @@ namespace DiscImageChef.Devices
buffer = new byte[strctLength];
Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length);
DicConsole.DebugWriteLine("SCSI Device", "READ DISC INFORMATION took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ DISC INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.", duration);
return sense;
}
@@ -507,7 +507,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "READ CD MSF took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ CD MSF (Start MSF: {1}, End MSF: {2}, Block Size: {3}, Expected Sector Type: {4}, DAP: {5}, Sync: {6}, Headers: {7}, User Data: {8}, ECC/EDC: {9}, C2: {10}, Subchannel: {11}, Sense: {12}, LastError: {13}) took {0} ms.", duration, startMsf, endMsf, blockSize, expectedSectorType, dap, sync, headerCodes, userData, edcEcc, c2Error, subchannel, sense, LastError);
return sense;
}
@@ -538,7 +538,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL (Persistent: {1}, Prevent: {2}, Sense: {3}, LastError: {4}) took {0} ms.", duration, persistent, prevent, sense, LastError);
return sense;
}
@@ -588,7 +588,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "START STOP UNIT took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "START STOP UNIT (Immediate: {1}, FormatLayer: {2}, Power Conditions: {3}, Change Format Layer: {4}, Load/Eject: {5}, Start: {6}, Sense: {7}, Last Error: {8}) took {0} ms.", duration, immediate, formatLayer, powerConditions, changeFormatLayer, loadEject, start, sense, LastError);
return sense;
}
@@ -614,7 +614,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (MCN) took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (MCN, Sense {1}, Last Error {2}) took {0} ms.", duration, sense, LastError);
if(!sense &&
(buffer[8] & 0x80) == 0x80)
@@ -645,7 +645,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (ISRC) took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (ISRC, Track Number: {1}, Sense: {2}, Last Error: {3}) took {0} ms.", duration, trackNumber, sense, LastError);
if(!sense &&
(buffer[8] & 0x80) == 0x80)
@@ -673,7 +673,7 @@ namespace DiscImageChef.Devices
Error = LastError != 0;
DicConsole.DebugWriteLine("SCSI Device", "SET CD SPEED took {0} ms.", duration);
DicConsole.DebugWriteLine("SCSI Device", "SET CD SPEED (Rotational Control: {1}, Read Speed: {2}, Write Speed: {3}, Sense: {4}, Last Error: {4}) took {0} ms.", duration, rotationalControl, readSpeed, writeSpeed, sense, LastError);
return sense;
}