mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Code cleanup.
This commit is contained in:
@@ -83,9 +83,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadResetUsageCounter(string devPath, Device dev)
|
||||
{
|
||||
bool drive1 = false;
|
||||
bool drive1 = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -136,11 +136,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ/RESET USAGE COUNTER to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -216,11 +216,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DATA BUFFER to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -286,10 +286,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void SetErrorThreshold(string devPath, Device dev)
|
||||
{
|
||||
bool drive1 = false;
|
||||
byte threshold = 0;
|
||||
bool drive1 = false;
|
||||
byte threshold = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -297,7 +297,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for SET ERROR THRESHOLD command:");
|
||||
DicConsole.WriteLine("Drive 1?: {0}", drive1);
|
||||
DicConsole.WriteLine("Drive 1?: {0}", drive1);
|
||||
DicConsole.WriteLine("Error threshold: {0}", threshold);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -352,9 +352,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SET ERROR THRESHOLD to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("SET ERROR THRESHOLD decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -402,10 +402,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Translate(string devPath, Device dev)
|
||||
{
|
||||
bool drive1 = false;
|
||||
uint lba = 0;
|
||||
bool drive1 = false;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -414,7 +414,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for TRANSLATE command:");
|
||||
DicConsole.WriteLine("Drive 1?: {0}", drive1);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -467,11 +467,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending TRANSLATE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -75,9 +75,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void RequestBlockAddress(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -128,11 +128,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending REQUEST BLOCK ADDRESS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -200,10 +200,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void SeekBlock(string devPath, Device dev)
|
||||
{
|
||||
bool immediate = false;
|
||||
uint lba = 0;
|
||||
bool immediate = false;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -212,7 +212,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for SEEK BLOCK command:");
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -265,9 +265,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SEEK BLOCK to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("SEEK BLOCK decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -82,9 +82,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending PARK to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("PARK decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -137,9 +137,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending UNPARK to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("UNPARK decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -72,12 +72,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Display(string devPath, Device dev)
|
||||
{
|
||||
bool flash = false;
|
||||
FujitsuDisplayModes mode = FujitsuDisplayModes.Ready;
|
||||
string firstHalf = "DIC TEST";
|
||||
string secondHalf = "TEST DIC";
|
||||
string strDev;
|
||||
int item;
|
||||
bool flash = false;
|
||||
FujitsuDisplayModes mode = FujitsuDisplayModes.Ready;
|
||||
string firstHalf = "DIC TEST";
|
||||
string secondHalf = "TEST DIC";
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -147,9 +147,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending DISPLAY to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("DISPLAY decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -71,10 +71,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadDvdRaw(string devPath, Device dev)
|
||||
{
|
||||
uint count = 1;
|
||||
uint lba = 0;
|
||||
uint count = 1;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -82,7 +82,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ DVD (RAW) command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -136,11 +136,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DVD (RAW) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -71,14 +71,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadLong(string devPath, Device dev)
|
||||
{
|
||||
bool relative = false;
|
||||
uint address = 0;
|
||||
ushort length = 1;
|
||||
ushort bps = 512;
|
||||
bool physical = false;
|
||||
bool sectorCount = true;
|
||||
bool relative = false;
|
||||
uint address = 0;
|
||||
ushort length = 1;
|
||||
ushort bps = 512;
|
||||
bool physical = false;
|
||||
bool sectorCount = true;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -87,8 +87,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ LONG command:");
|
||||
DicConsole.WriteLine("{0} Block Address: {1}", physical ? "Physical" : "Logical", address);
|
||||
DicConsole.WriteLine("Relative?: {0}", relative);
|
||||
DicConsole.WriteLine("Will transfer {0} {1}", length, sectorCount ? "sectors" : "bytes");
|
||||
DicConsole.WriteLine("Relative?: {0}", relative);
|
||||
DicConsole.WriteLine("Will transfer {0} {1}", length, sectorCount ? "sectors" : "bytes");
|
||||
if(sectorCount) DicConsole.WriteLine("Expected sector size: {0} bytes", bps);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -185,11 +185,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LONG to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -84,9 +84,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ExtractSecuritySectors(string devPath, Device dev)
|
||||
{
|
||||
byte requestNumber = 0;
|
||||
byte requestNumber = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -137,11 +137,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending EXTRACT SS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -217,11 +217,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET FEATURE LIST to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("Features: {0}.", features);
|
||||
DicConsole.WriteLine("Features: {0}.", features);
|
||||
DicConsole.WriteLine("GET FEATURE LIST decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
@@ -267,8 +267,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
static void SetLockState(string devPath, Device dev)
|
||||
{
|
||||
KreonLockStates state = KreonLockStates.Locked;
|
||||
string strDev;
|
||||
int item;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -322,7 +322,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SET LOCK STATE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("SET LOCK STATE decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
@@ -365,9 +365,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending UNLOCK to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("UNLOCK decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -102,10 +102,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void GetConfiguration(string devPath, Device dev)
|
||||
{
|
||||
MmcGetConfigurationRt rt = MmcGetConfigurationRt.All;
|
||||
ushort startingFeatureNumber = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
MmcGetConfigurationRt rt = MmcGetConfigurationRt.All;
|
||||
ushort startingFeatureNumber = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -113,7 +113,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for GET CONFIGURATION command:");
|
||||
DicConsole.WriteLine("RT: {0}", rt);
|
||||
DicConsole.WriteLine("RT: {0}", rt);
|
||||
DicConsole.WriteLine("Feature number: {0}", startingFeatureNumber);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -171,11 +171,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET CONFIGURATION to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -219,7 +219,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
if(buffer != null)
|
||||
{
|
||||
Features.SeparatedFeatures ftr = Features.Separate(buffer);
|
||||
DicConsole.WriteLine("GET CONFIGURATION length is {0} bytes", ftr.DataLength);
|
||||
DicConsole.WriteLine("GET CONFIGURATION length is {0} bytes", ftr.DataLength);
|
||||
DicConsole.WriteLine("GET CONFIGURATION current profile is {0:X4}h", ftr.CurrentProfile);
|
||||
if(ftr.Descriptors != null)
|
||||
foreach(Features.FeatureDescriptor desc in ftr.Descriptors)
|
||||
@@ -505,10 +505,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void PreventAllowMediumRemoval(string devPath, Device dev)
|
||||
{
|
||||
bool prevent = false;
|
||||
bool persistent = false;
|
||||
bool prevent = false;
|
||||
bool persistent = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -516,7 +516,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for PREVENT ALLOW MEDIUM REMOVAL command:");
|
||||
DicConsole.WriteLine("Prevent removal?: {0}", prevent);
|
||||
DicConsole.WriteLine("Prevent removal?: {0}", prevent);
|
||||
DicConsole.WriteLine("Persistent value?: {0}", persistent);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -570,9 +570,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending PREVENT ALLOW MEDIUM REMOVAL to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("PREVENT ALLOW MEDIUM REMOVAL decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -620,20 +620,20 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCd(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
MmcSectorTypes sectorType = MmcSectorTypes.AllTypes;
|
||||
bool dap = false;
|
||||
bool relative = false;
|
||||
bool sync = false;
|
||||
MmcHeaderCodes header = MmcHeaderCodes.None;
|
||||
bool user = true;
|
||||
bool edc = false;
|
||||
MmcErrorField c2 = MmcErrorField.None;
|
||||
MmcSubchannel subchan = MmcSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
bool dap = false;
|
||||
bool relative = false;
|
||||
bool sync = false;
|
||||
MmcHeaderCodes header = MmcHeaderCodes.None;
|
||||
bool user = true;
|
||||
bool edc = false;
|
||||
MmcErrorField c2 = MmcErrorField.None;
|
||||
MmcSubchannel subchan = MmcSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -642,17 +642,18 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD command:");
|
||||
DicConsole.WriteLine("Address relative to current position?: {0}", relative);
|
||||
DicConsole.WriteLine("{1}: {0}", address, relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine("Sector type: {0}", sectorType);
|
||||
DicConsole.WriteLine("Process audio?: {0}", dap);
|
||||
DicConsole.WriteLine("Retrieve sync bytes?: {0}", sync);
|
||||
DicConsole.WriteLine("Header mode: {0}", header);
|
||||
DicConsole.WriteLine("Retrieve user data?: {0}", user);
|
||||
DicConsole.WriteLine("{1}: {0}", address,
|
||||
relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine("Sector type: {0}", sectorType);
|
||||
DicConsole.WriteLine("Process audio?: {0}", dap);
|
||||
DicConsole.WriteLine("Retrieve sync bytes?: {0}", sync);
|
||||
DicConsole.WriteLine("Header mode: {0}", header);
|
||||
DicConsole.WriteLine("Retrieve user data?: {0}", user);
|
||||
DicConsole.WriteLine("Retrieve EDC/ECC data?: {0}", edc);
|
||||
DicConsole.WriteLine("C2 mode: {0}", c2);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sector", blockSize);
|
||||
DicConsole.WriteLine("C2 mode: {0}", c2);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sector", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -820,11 +821,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -892,23 +893,23 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdMsf(string devPath, Device dev)
|
||||
{
|
||||
byte startFrame = 0;
|
||||
byte startSecond = 2;
|
||||
byte startMinute = 0;
|
||||
byte endFrame = 0;
|
||||
byte endSecond = 0;
|
||||
byte endMinute = 0;
|
||||
MmcSectorTypes sectorType = MmcSectorTypes.AllTypes;
|
||||
bool dap = false;
|
||||
bool sync = false;
|
||||
MmcHeaderCodes header = MmcHeaderCodes.None;
|
||||
bool user = true;
|
||||
bool edc = false;
|
||||
MmcErrorField c2 = MmcErrorField.None;
|
||||
MmcSubchannel subchan = MmcSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
byte startFrame = 0;
|
||||
byte startSecond = 2;
|
||||
byte startMinute = 0;
|
||||
byte endFrame = 0;
|
||||
byte endSecond = 0;
|
||||
byte endMinute = 0;
|
||||
MmcSectorTypes sectorType = MmcSectorTypes.AllTypes;
|
||||
bool dap = false;
|
||||
bool sync = false;
|
||||
MmcHeaderCodes header = MmcHeaderCodes.None;
|
||||
bool user = true;
|
||||
bool edc = false;
|
||||
MmcErrorField c2 = MmcErrorField.None;
|
||||
MmcSubchannel subchan = MmcSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -917,16 +918,16 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD MSF command:");
|
||||
DicConsole.WriteLine("Start: {0:D2}:{1:D2}:{2:D2}", startMinute, startSecond, startFrame);
|
||||
DicConsole.WriteLine("End: {0:D2}:{1:D2}:{2:D2}", endMinute, endSecond, endFrame);
|
||||
DicConsole.WriteLine("Sector type: {0}", sectorType);
|
||||
DicConsole.WriteLine("Process audio?: {0}", dap);
|
||||
DicConsole.WriteLine("Retrieve sync bytes?: {0}", sync);
|
||||
DicConsole.WriteLine("Header mode: {0}", header);
|
||||
DicConsole.WriteLine("Retrieve user data?: {0}", user);
|
||||
DicConsole.WriteLine("End: {0:D2}:{1:D2}:{2:D2}", endMinute, endSecond, endFrame);
|
||||
DicConsole.WriteLine("Sector type: {0}", sectorType);
|
||||
DicConsole.WriteLine("Process audio?: {0}", dap);
|
||||
DicConsole.WriteLine("Retrieve sync bytes?: {0}", sync);
|
||||
DicConsole.WriteLine("Header mode: {0}", header);
|
||||
DicConsole.WriteLine("Retrieve user data?: {0}", user);
|
||||
DicConsole.WriteLine("Retrieve EDC/ECC data?: {0}", edc);
|
||||
DicConsole.WriteLine("C2 mode: {0}", c2);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sector", blockSize);
|
||||
DicConsole.WriteLine("C2 mode: {0}", c2);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sector", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1117,7 +1118,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
start:
|
||||
uint startMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
uint endMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
uint endMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
System.Console.Clear();
|
||||
bool sense = dev.ReadCdMsf(out byte[] buffer, out byte[] senseBuffer, startMsf, endMsf, blockSize,
|
||||
sectorType, dap, sync, header, user, edc, c2, subchan, dev.Timeout,
|
||||
@@ -1126,11 +1127,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD MSF to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1199,8 +1200,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
static void ReadDiscInformation(string devPath, Device dev)
|
||||
{
|
||||
MmcDiscInformationDataTypes info = MmcDiscInformationDataTypes.DiscInformation;
|
||||
string strDev;
|
||||
int item;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1256,11 +1257,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DISC INFORMATION to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1340,12 +1341,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
static void ReadDiscStructure(string devPath, Device dev)
|
||||
{
|
||||
MmcDiscStructureMediaType mediaType = MmcDiscStructureMediaType.Dvd;
|
||||
MmcDiscStructureFormat format = MmcDiscStructureFormat.CapabilityList;
|
||||
uint address = 0;
|
||||
byte layer = 0;
|
||||
byte agid = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
MmcDiscStructureFormat format = MmcDiscStructureFormat.CapabilityList;
|
||||
uint address = 0;
|
||||
byte layer = 0;
|
||||
byte agid = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1354,10 +1355,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ DISC STRUCTURE command:");
|
||||
DicConsole.WriteLine("Media type: {0}", mediaType);
|
||||
DicConsole.WriteLine("Format: {0}", format);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine("Layer: {0}", layer);
|
||||
DicConsole.WriteLine("AGID: {0}", agid);
|
||||
DicConsole.WriteLine("Format: {0}", format);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine("Layer: {0}", layer);
|
||||
DicConsole.WriteLine("AGID: {0}", agid);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1497,11 +1498,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DISC STRUCTURE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1580,11 +1581,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadTocPmaAtip(string devPath, Device dev)
|
||||
{
|
||||
bool msf = false;
|
||||
byte format = 0;
|
||||
byte session = 0;
|
||||
bool msf = false;
|
||||
byte format = 0;
|
||||
byte session = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1593,8 +1594,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ TOC/PMA/ATIP command:");
|
||||
DicConsole.WriteLine("Return MSF values?: {0}", msf);
|
||||
DicConsole.WriteLine("Format byte: {0}", format);
|
||||
DicConsole.WriteLine("Session: {0}", session);
|
||||
DicConsole.WriteLine("Format byte: {0}", format);
|
||||
DicConsole.WriteLine("Session: {0}", session);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1657,11 +1658,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ TOC/PMA/ATIP to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1768,14 +1769,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void StartStopUnit(string devPath, Device dev)
|
||||
{
|
||||
bool immediate = false;
|
||||
bool changeFormatLayer = false;
|
||||
bool loadEject = false;
|
||||
bool start = false;
|
||||
byte formatLayer = 0;
|
||||
byte powerConditions = 0;
|
||||
bool immediate = false;
|
||||
bool changeFormatLayer = false;
|
||||
bool loadEject = false;
|
||||
bool start = false;
|
||||
byte formatLayer = 0;
|
||||
byte powerConditions = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1783,12 +1784,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for START STOP UNIT command:");
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Change format layer?: {0}", changeFormatLayer);
|
||||
DicConsole.WriteLine("Eject?: {0}", loadEject);
|
||||
DicConsole.WriteLine("Start?: {0}", start);
|
||||
DicConsole.WriteLine("Format layer: {0}", formatLayer);
|
||||
DicConsole.WriteLine("Power conditions: {0}", powerConditions);
|
||||
DicConsole.WriteLine("Eject?: {0}", loadEject);
|
||||
DicConsole.WriteLine("Start?: {0}", start);
|
||||
DicConsole.WriteLine("Format layer: {0}", formatLayer);
|
||||
DicConsole.WriteLine("Power conditions: {0}", powerConditions);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1881,9 +1882,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending START STOP UNIT to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("START STOP UNIT decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -71,10 +71,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdDa(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -82,7 +82,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD-DA command:");
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -136,11 +136,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD-DA to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -80,12 +80,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdDa(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
PioneerSubchannel subchan = PioneerSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
PioneerSubchannel subchan = PioneerSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -93,10 +93,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD-DA command:");
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -179,11 +179,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD-DA to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -251,16 +251,16 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdDaMsf(string devPath, Device dev)
|
||||
{
|
||||
byte startFrame = 0;
|
||||
byte startSecond = 2;
|
||||
byte startMinute = 0;
|
||||
byte endFrame = 0;
|
||||
byte endSecond = 0;
|
||||
byte endMinute = 0;
|
||||
PioneerSubchannel subchan = PioneerSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
byte startFrame = 0;
|
||||
byte startSecond = 2;
|
||||
byte startMinute = 0;
|
||||
byte endFrame = 0;
|
||||
byte endSecond = 0;
|
||||
byte endMinute = 0;
|
||||
PioneerSubchannel subchan = PioneerSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -269,9 +269,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD-DA MSF command:");
|
||||
DicConsole.WriteLine("Start: {0:D2}:{1:D2}:{2:D2}", startMinute, startSecond, startFrame);
|
||||
DicConsole.WriteLine("End: {0:D2}:{1:D2}:{2:D2}", endMinute, endSecond, endFrame);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine("End: {0:D2}:{1:D2}:{2:D2}", endMinute, endSecond, endFrame);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -388,7 +388,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
start:
|
||||
uint startMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
uint endMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
uint endMsf = (uint)((startMinute << 16) + (startSecond << 8) + startFrame);
|
||||
System.Console.Clear();
|
||||
bool sense = dev.PioneerReadCdDaMsf(out byte[] buffer, out byte[] senseBuffer, startMsf, endMsf, blockSize,
|
||||
subchan, dev.Timeout, out double duration);
|
||||
@@ -396,11 +396,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD-DA MSF to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -468,12 +468,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdXa(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
bool errorFlags = false;
|
||||
bool wholeSector = false;
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
bool errorFlags = false;
|
||||
bool wholeSector = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -481,10 +481,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD-XA command:");
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine("Include error flags?: {0}", errorFlags);
|
||||
DicConsole.WriteLine("Whole sector?: {0}", wholeSector);
|
||||
DicConsole.WriteLine("Whole sector?: {0}", wholeSector);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -557,11 +557,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD-XA to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -75,14 +75,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadLong(string devPath, Device dev)
|
||||
{
|
||||
bool relative = false;
|
||||
uint address = 0;
|
||||
ushort length = 1;
|
||||
ushort bps = 512;
|
||||
bool physical = false;
|
||||
bool sectorCount = true;
|
||||
bool relative = false;
|
||||
uint address = 0;
|
||||
ushort length = 1;
|
||||
ushort bps = 512;
|
||||
bool physical = false;
|
||||
bool sectorCount = true;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -91,8 +91,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ LONG command:");
|
||||
DicConsole.WriteLine("{0} Block Address: {1}", physical ? "Physical" : "Logical", address);
|
||||
DicConsole.WriteLine("Relative?: {0}", relative);
|
||||
DicConsole.WriteLine("Will transfer {0} {1}", length, sectorCount ? "sectors" : "bytes");
|
||||
DicConsole.WriteLine("Relative?: {0}", relative);
|
||||
DicConsole.WriteLine("Will transfer {0} {1}", length, sectorCount ? "sectors" : "bytes");
|
||||
if(sectorCount) DicConsole.WriteLine("Expected sector size: {0} bytes", bps);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -189,11 +189,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LONG to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -261,10 +261,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadSectorLocation(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
bool physical = false;
|
||||
uint address = 0;
|
||||
bool physical = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -325,11 +325,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ SECTOR LOCATION to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -124,9 +124,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void GetBookBitsetting(string devPath, Device dev)
|
||||
{
|
||||
bool dl = false;
|
||||
bool dl = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -177,11 +177,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET BOOK BITSETTING to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -257,11 +257,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET GIGAREC to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -335,11 +335,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET SECUREC to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -413,11 +413,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET SILENT MODE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -491,11 +491,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET SINGLE-SESSION / HIDE CD-R to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -569,11 +569,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET SPEEDREAD to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -648,11 +648,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET TEST WRITE DVD+ to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -718,9 +718,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void GetVariRec(string devPath, Device dev)
|
||||
{
|
||||
bool dvd = false;
|
||||
bool dvd = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -771,11 +771,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET VARIREC to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -851,11 +851,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending POWEREC GET SPEEDS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("PoweRec is {0}.", enabled ? "enabled" : "disabled");
|
||||
DicConsole.WriteLine("Speed: {0}", speed);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("PoweRec is {0}.", enabled ? "enabled" : "disabled");
|
||||
DicConsole.WriteLine("Speed: {0}", speed);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("POWEREC GET SPEEDS decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -901,12 +901,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCdDa(string devPath, Device dev)
|
||||
{
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
PlextorSubchannel subchan = PlextorSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
uint address = 0;
|
||||
uint length = 1;
|
||||
PlextorSubchannel subchan = PlextorSubchannel.None;
|
||||
uint blockSize = 2352;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -914,10 +914,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CD-DA command:");
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("LBA: {0}", address);
|
||||
DicConsole.WriteLine("Will transfer {0} sectors", length);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine("Subchannel mode: {0}", subchan);
|
||||
DicConsole.WriteLine("{0} bytes per sectors", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1002,11 +1002,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CD-DA to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1074,10 +1074,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadDvdRaw(string devPath, Device dev)
|
||||
{
|
||||
uint count = 1;
|
||||
uint lba = 0;
|
||||
uint count = 1;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1085,7 +1085,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ DVD (RAW) command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1139,11 +1139,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DVD (RAW) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1219,11 +1219,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ EEPROM to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1289,10 +1289,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadEepromBlock(string devPath, Device dev)
|
||||
{
|
||||
byte block = 0;
|
||||
byte block = 0;
|
||||
ushort blockSize = 256;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1301,7 +1301,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ EEPROM command:");
|
||||
DicConsole.WriteLine("EEPROM block to read: {0}", block);
|
||||
DicConsole.WriteLine("EEPROM block size: {0}", blockSize);
|
||||
DicConsole.WriteLine("EEPROM block size: {0}", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1354,11 +1354,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ EEPROM to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1434,11 +1434,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ EEPROM to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -99,11 +99,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read6(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -111,8 +111,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (6) command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -149,6 +149,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Max LBA is {0}, setting to {0}", 0x1FFFFF);
|
||||
lba = 0x1FFFFF;
|
||||
}
|
||||
|
||||
DicConsole.Write("Blocks to read (0 for 256 blocks)?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!byte.TryParse(strDev, out count))
|
||||
@@ -181,11 +182,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (6) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -253,17 +254,17 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read10(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool relative = false;
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool relative = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -272,14 +273,16 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (10) command:");
|
||||
DicConsole.WriteLine("Address relative to current position?: {0}", relative);
|
||||
DicConsole.WriteLine("{1}: {0}", lba, relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("{1}: {0}", lba,
|
||||
relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} blocks to read",
|
||||
count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from non-volatile cache?: {0}", fuaNv);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -402,11 +405,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -474,18 +477,18 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read12(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool relative = false;
|
||||
bool streaming = false;
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool relative = false;
|
||||
bool streaming = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -494,15 +497,17 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (12) command:");
|
||||
DicConsole.WriteLine("Address relative to current position?: {0}", relative);
|
||||
DicConsole.WriteLine("{1}: {0}", lba, relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("{1}: {0}", lba,
|
||||
relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} blocks to read",
|
||||
count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from non-volatile cache?: {0}", fuaNv);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine("Use streaming?: {0}", streaming);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine("Use streaming?: {0}", streaming);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -635,11 +640,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (12) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -707,17 +712,17 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read16(string devPath, Device dev)
|
||||
{
|
||||
ulong lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool streaming = false;
|
||||
ulong lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
byte rdprotect = 0;
|
||||
bool dpo = false;
|
||||
bool fua = false;
|
||||
bool fuaNv = false;
|
||||
byte groupNumber = 0;
|
||||
bool streaming = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -726,14 +731,15 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (16) command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("{0} blocks to read",
|
||||
count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("How to check protection information: {0}", rdprotect);
|
||||
DicConsole.WriteLine("Give lowest cache priority?: {0}", dpo);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from medium?: {0}", fua);
|
||||
DicConsole.WriteLine("Force bypassing cache and reading from non-volatile cache?: {0}", fuaNv);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine("Use streaming?: {0}", streaming);
|
||||
DicConsole.WriteLine("Group number: {0}", groupNumber);
|
||||
DicConsole.WriteLine("Use streaming?: {0}", streaming);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -856,11 +862,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -928,12 +934,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadLong10(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint lba = 0;
|
||||
ushort blockSize = 512;
|
||||
bool correct = false;
|
||||
bool relative = false;
|
||||
bool correct = false;
|
||||
bool relative = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -942,9 +948,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ LONG (10) command:");
|
||||
DicConsole.WriteLine("Address relative to current position?: {0}", relative);
|
||||
DicConsole.WriteLine("{1}: {0}", lba, relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Try to error correct block?: {0}", correct);
|
||||
DicConsole.WriteLine("{1}: {0}", lba, relative ? "Address" : "LBA");
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Try to error correct block?: {0}", correct);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -1017,11 +1023,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LONG (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1089,11 +1095,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadLong16(string devPath, Device dev)
|
||||
{
|
||||
ulong lba = 0;
|
||||
uint blockSize = 512;
|
||||
bool correct = false;
|
||||
ulong lba = 0;
|
||||
uint blockSize = 512;
|
||||
bool correct = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1101,8 +1107,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ LONG (16) command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Try to error correct block?: {0}", correct);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1166,11 +1172,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LONG (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1238,9 +1244,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Seek6(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1284,6 +1290,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Max LBA is {0}, setting to {0}", 0x1FFFFF);
|
||||
lba = 0x1FFFFF;
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: goto start;
|
||||
}
|
||||
@@ -1296,9 +1303,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SEEK (6) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("SEEK (6) decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -1346,9 +1353,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Seek10(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1398,9 +1405,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SEEK (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("SEEK (6) decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -72,15 +72,15 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadAttribute(string devPath, Device dev)
|
||||
{
|
||||
ushort element = 0;
|
||||
byte elementType = 0;
|
||||
byte volume = 0;
|
||||
byte partition = 0;
|
||||
ushort firstAttribute = 0;
|
||||
bool cache = false;
|
||||
ScsiAttributeAction action = ScsiAttributeAction.Values;
|
||||
string strDev;
|
||||
int item;
|
||||
ushort element = 0;
|
||||
byte elementType = 0;
|
||||
byte volume = 0;
|
||||
byte partition = 0;
|
||||
ushort firstAttribute = 0;
|
||||
bool cache = false;
|
||||
ScsiAttributeAction action = ScsiAttributeAction.Values;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -88,13 +88,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ ATTRIBUTE command:");
|
||||
DicConsole.WriteLine("Action: {0}", action);
|
||||
DicConsole.WriteLine("Element: {0}", element);
|
||||
DicConsole.WriteLine("Element type: {0}", elementType);
|
||||
DicConsole.WriteLine("Volume: {0}", volume);
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("Action: {0}", action);
|
||||
DicConsole.WriteLine("Element: {0}", element);
|
||||
DicConsole.WriteLine("Element type: {0}", elementType);
|
||||
DicConsole.WriteLine("Volume: {0}", volume);
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("First attribute: {0}", firstAttribute);
|
||||
DicConsole.WriteLine("Use cache?: {0}", cache);
|
||||
DicConsole.WriteLine("Use cache?: {0}", cache);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -202,11 +202,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ ATTRIBUTE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -115,11 +115,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending INQUIRY to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -196,9 +196,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void InquiryEvpd(string devPath, Device dev)
|
||||
{
|
||||
byte page = 1;
|
||||
byte page = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -249,11 +249,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending INQUIRY to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -321,12 +321,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ModeSense6(string devPath, Device dev)
|
||||
{
|
||||
bool dbd = false;
|
||||
bool dbd = false;
|
||||
ScsiModeSensePageControl pageControl = ScsiModeSensePageControl.Current;
|
||||
byte page = 0x3F;
|
||||
byte subpage = 0xFF;
|
||||
string strDev;
|
||||
int item;
|
||||
byte page = 0x3F;
|
||||
byte subpage = 0xFF;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -334,10 +334,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for MODE SENSE (6) command:");
|
||||
DicConsole.WriteLine("DBD?: {0}", dbd);
|
||||
DicConsole.WriteLine("DBD?: {0}", dbd);
|
||||
DicConsole.WriteLine("Page control: {0}", pageControl);
|
||||
DicConsole.WriteLine("Page: {0}", page);
|
||||
DicConsole.WriteLine("Subpage: {0}", subpage);
|
||||
DicConsole.WriteLine("Page: {0}", page);
|
||||
DicConsole.WriteLine("Subpage: {0}", subpage);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -414,11 +414,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending MODE SENSE (6) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -497,13 +497,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ModeSense10(string devPath, Device dev)
|
||||
{
|
||||
bool llba = false;
|
||||
bool dbd = false;
|
||||
bool llba = false;
|
||||
bool dbd = false;
|
||||
ScsiModeSensePageControl pageControl = ScsiModeSensePageControl.Current;
|
||||
byte page = 0x3F;
|
||||
byte subpage = 0xFF;
|
||||
string strDev;
|
||||
int item;
|
||||
byte page = 0x3F;
|
||||
byte subpage = 0xFF;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -511,11 +511,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for MODE SENSE (10) command:");
|
||||
DicConsole.WriteLine("LLBA?: {0}", llba);
|
||||
DicConsole.WriteLine("DBD?: {0}", dbd);
|
||||
DicConsole.WriteLine("LLBA?: {0}", llba);
|
||||
DicConsole.WriteLine("DBD?: {0}", dbd);
|
||||
DicConsole.WriteLine("Page control: {0}", pageControl);
|
||||
DicConsole.WriteLine("Page: {0}", page);
|
||||
DicConsole.WriteLine("Subpage: {0}", subpage);
|
||||
DicConsole.WriteLine("Page: {0}", page);
|
||||
DicConsole.WriteLine("Subpage: {0}", subpage);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -602,11 +602,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending MODE SENSE (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -686,8 +686,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
static void PreventAllowMediumRemoval(string devPath, Device dev)
|
||||
{
|
||||
ScsiPreventAllowMode mode = ScsiPreventAllowMode.Allow;
|
||||
string strDev;
|
||||
int item;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -743,7 +743,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending PREVENT ALLOW MEDIUM REMOVAL to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("PREVENT ALLOW MEDIUM REMOVAL decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
@@ -779,11 +779,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCapacity10(string devPath, Device dev)
|
||||
{
|
||||
bool relative = false;
|
||||
bool partial = false;
|
||||
uint address = 0;
|
||||
bool relative = false;
|
||||
bool partial = false;
|
||||
uint address = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -793,7 +793,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Parameters for READ CAPACITY (10) command:");
|
||||
DicConsole.WriteLine("Relative address?: {0}", relative);
|
||||
DicConsole.WriteLine("Partial capacity?: {0}", partial);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -856,11 +856,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CAPACITY (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -928,10 +928,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadCapacity16(string devPath, Device dev)
|
||||
{
|
||||
bool partial = false;
|
||||
ulong address = 0;
|
||||
bool partial = false;
|
||||
ulong address = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -940,7 +940,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ CAPACITY (16) command:");
|
||||
DicConsole.WriteLine("Partial capacity?: {0}", partial);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine("Address: {0}", address);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -993,11 +993,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ CAPACITY (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1073,11 +1073,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ MEDIA SERIAL NUMBER to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1143,9 +1143,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void RequestSense(string devPath, Device dev)
|
||||
{
|
||||
bool descriptor = false;
|
||||
bool descriptor = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1195,9 +1195,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending REQUEST SENSE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("REQUEST SENSE decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -1252,9 +1252,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending TEST UNIT READY to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("TEST UNIT READY decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -125,13 +125,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void LoadUnload(string devPath, Device dev)
|
||||
{
|
||||
bool load = true;
|
||||
bool immediate = false;
|
||||
bool retense = false;
|
||||
bool eot = false;
|
||||
bool hold = false;
|
||||
bool load = true;
|
||||
bool immediate = false;
|
||||
bool retense = false;
|
||||
bool eot = false;
|
||||
bool hold = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -139,11 +139,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for LOAD UNLOAD command:");
|
||||
DicConsole.WriteLine("Load?: {0}", load);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Retense?: {0}", retense);
|
||||
DicConsole.WriteLine("Load?: {0}", load);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Retense?: {0}", retense);
|
||||
DicConsole.WriteLine("End of tape?: {0}", eot);
|
||||
DicConsole.WriteLine("Hold?: {0}", hold);
|
||||
DicConsole.WriteLine("Hold?: {0}", hold);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -226,9 +226,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending LOAD UNLOAD to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("LOAD UNLOAD decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -276,13 +276,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Locate10(string devPath, Device dev)
|
||||
{
|
||||
bool blockType = true;
|
||||
bool immediate = false;
|
||||
bool changePartition = false;
|
||||
byte partition = 0;
|
||||
uint objectId = 0;
|
||||
bool blockType = true;
|
||||
bool immediate = false;
|
||||
bool changePartition = false;
|
||||
byte partition = 0;
|
||||
uint objectId = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -290,11 +290,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for LOCATE (10) command:");
|
||||
DicConsole.WriteLine("Locate block?: {0}", blockType);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Locate block?: {0}", blockType);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Change partition?: {0}", changePartition);
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("{1}: {0}", objectId, blockType ? "Block" : "Object");
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("{1}: {0}", objectId, blockType ? "Block" : "Object");
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -377,9 +377,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending LOCATE (10) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("LOCATE (10) decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -427,14 +427,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Locate16(string devPath, Device dev)
|
||||
{
|
||||
SscLogicalIdTypes destType = SscLogicalIdTypes.FileId;
|
||||
bool immediate = false;
|
||||
bool changePartition = false;
|
||||
bool bam = false;
|
||||
byte partition = 0;
|
||||
ulong objectId = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
SscLogicalIdTypes destType = SscLogicalIdTypes.FileId;
|
||||
bool immediate = false;
|
||||
bool changePartition = false;
|
||||
bool bam = false;
|
||||
byte partition = 0;
|
||||
ulong objectId = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -442,12 +442,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for LOCATE (16) command:");
|
||||
DicConsole.WriteLine("Object type: {0}", destType);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Object type: {0}", destType);
|
||||
DicConsole.WriteLine("Immediate?: {0}", immediate);
|
||||
DicConsole.WriteLine("Explicit identifier?: {0}", bam);
|
||||
DicConsole.WriteLine("Change partition?: {0}", changePartition);
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("Object identifier: {0}", objectId);
|
||||
DicConsole.WriteLine("Change partition?: {0}", changePartition);
|
||||
DicConsole.WriteLine("Partition: {0}", partition);
|
||||
DicConsole.WriteLine("Object identifier: {0}", objectId);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -544,9 +544,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending LOCATE (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("LOCATE (16) decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -594,12 +594,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read6(string devPath, Device dev)
|
||||
{
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -608,7 +608,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (6) command:");
|
||||
DicConsole.WriteLine("Fixed block size?: {0}", fixedLen);
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
if(fixedLen) DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine();
|
||||
@@ -657,6 +657,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
fixedLen ? "blocks" : "bytes");
|
||||
length = 0xFFFFFF;
|
||||
}
|
||||
|
||||
if(fixedLen)
|
||||
{
|
||||
DicConsole.Write("How many bytes to expect per block?: ");
|
||||
@@ -692,11 +693,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (6) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -764,14 +765,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read16(string devPath, Device dev)
|
||||
{
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint objectSize = 512;
|
||||
uint length = 1;
|
||||
byte partition = 0;
|
||||
ulong objectId = 0;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint objectSize = 512;
|
||||
uint length = 1;
|
||||
byte partition = 0;
|
||||
ulong objectId = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -780,9 +781,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ (16) command:");
|
||||
DicConsole.WriteLine("Fixed block size?: {0}", fixedLen);
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "objects" : "bytes");
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "objects" : "bytes");
|
||||
if(fixedLen) DicConsole.WriteLine("{0} bytes expected per object", objectSize);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Read object {0} from partition {1}", objectId, partition);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -830,6 +831,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
fixedLen ? "blocks" : "bytes");
|
||||
length = 0xFFFFFF;
|
||||
}
|
||||
|
||||
if(fixedLen)
|
||||
{
|
||||
DicConsole.Write("How many bytes to expect per object?: ");
|
||||
@@ -885,11 +887,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -965,11 +967,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ BLOCK LIMITS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1047,8 +1049,8 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
static void ReadPosition(string devPath, Device dev)
|
||||
{
|
||||
SscPositionForms responseForm = SscPositionForms.Short;
|
||||
string strDev;
|
||||
int item;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1106,9 +1108,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ POSITION to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("READ POSITION decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -1156,13 +1158,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadReverse6(string devPath, Device dev)
|
||||
{
|
||||
bool byteOrder = false;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
bool byteOrder = false;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1171,9 +1173,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ REVERSE (6) command:");
|
||||
DicConsole.WriteLine("Fixed block size?: {0}", fixedLen);
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
if(fixedLen) DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Drive should unreverse bytes?: {0}", byteOrder);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1221,6 +1223,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
fixedLen ? "blocks" : "bytes");
|
||||
length = 0xFFFFFF;
|
||||
}
|
||||
|
||||
if(fixedLen)
|
||||
{
|
||||
DicConsole.Write("How many bytes to expect per block?: ");
|
||||
@@ -1266,11 +1269,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ REVERSE (6) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1338,15 +1341,15 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReadReverse16(string devPath, Device dev)
|
||||
{
|
||||
bool byteOrder = false;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint objectSize = 512;
|
||||
uint length = 1;
|
||||
byte partition = 0;
|
||||
ulong objectId = 0;
|
||||
bool byteOrder = false;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint objectSize = 512;
|
||||
uint length = 1;
|
||||
byte partition = 0;
|
||||
ulong objectId = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1355,9 +1358,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ REVERSE (16) command:");
|
||||
DicConsole.WriteLine("Fixed block size?: {0}", fixedLen);
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "objects" : "bytes");
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "objects" : "bytes");
|
||||
if(fixedLen) DicConsole.WriteLine("{0} bytes expected per object", objectSize);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine("Read object {0} from partition {1}", objectId, partition);
|
||||
DicConsole.WriteLine("Drive should unreverse bytes?: {0}", byteOrder);
|
||||
DicConsole.WriteLine();
|
||||
@@ -1406,6 +1409,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
fixedLen ? "blocks" : "bytes");
|
||||
length = 0xFFFFFF;
|
||||
}
|
||||
|
||||
if(fixedLen)
|
||||
{
|
||||
DicConsole.Write("How many bytes to expect per object?: ");
|
||||
@@ -1471,11 +1475,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ REVERSE (16) to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1543,12 +1547,12 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void RecoverBufferedData(string devPath, Device dev)
|
||||
{
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
bool sili = false;
|
||||
bool fixedLen = true;
|
||||
uint blockSize = 512;
|
||||
uint length = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1557,7 +1561,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for RECOVER BUFFERED DATA command:");
|
||||
DicConsole.WriteLine("Fixed block size?: {0}", fixedLen);
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
DicConsole.WriteLine("Will read {0} {1}", length, fixedLen ? "blocks" : "bytes");
|
||||
if(fixedLen) DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Suppress length indicator?: {0}", sili);
|
||||
DicConsole.WriteLine();
|
||||
@@ -1606,6 +1610,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
fixedLen ? "blocks" : "bytes");
|
||||
length = 0xFFFFFF;
|
||||
}
|
||||
|
||||
if(fixedLen)
|
||||
{
|
||||
DicConsole.Write("How many bytes to expect per block?: ");
|
||||
@@ -1641,11 +1646,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending RECOVER BUFFERED DATA to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1713,10 +1718,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void ReportDensitySupport(string devPath, Device dev)
|
||||
{
|
||||
bool medium = false;
|
||||
bool current = false;
|
||||
bool medium = false;
|
||||
bool current = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1724,7 +1729,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for REPORT DENSITY SUPPORT command:");
|
||||
DicConsole.WriteLine("Report about medium types?: {0}", medium);
|
||||
DicConsole.WriteLine("Report about medium types?: {0}", medium);
|
||||
DicConsole.WriteLine("Report about current medium?: {0}", current);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1778,11 +1783,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending REPORT DENSITY SUPPORT to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -1864,9 +1869,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Rewind(string devPath, Device dev)
|
||||
{
|
||||
bool immediate = false;
|
||||
bool immediate = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1916,9 +1921,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending REWIND to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("REWIND decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -1966,10 +1971,10 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Space(string devPath, Device dev)
|
||||
{
|
||||
SscSpaceCodes what = SscSpaceCodes.LogicalBlock;
|
||||
int count = -1;
|
||||
string strDev;
|
||||
int item;
|
||||
SscSpaceCodes what = SscSpaceCodes.LogicalBlock;
|
||||
int count = -1;
|
||||
string strDev;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -1978,7 +1983,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for SPACE command:");
|
||||
DicConsole.WriteLine("What to space: {0}", what);
|
||||
DicConsole.WriteLine("How many: {0}", count);
|
||||
DicConsole.WriteLine("How many: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -2034,9 +2039,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending SPACE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("SPACE decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
@@ -2084,9 +2089,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void TrackSelect(string devPath, Device dev)
|
||||
{
|
||||
byte track = 1;
|
||||
byte track = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -2136,9 +2141,9 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending TRACK SELECT to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("TRACK SELECT decoded sense:");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
|
||||
@@ -87,23 +87,23 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read6(string devPath, Device dev, bool readlong)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
bool noDma = false;
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
bool noDma = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
{
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ {0}(6) command:", readlong ? "LONG " : "");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Inhibit DMA?: {0}", noDma);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Inhibit DMA?: {0}", noDma);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -139,6 +139,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
DicConsole.WriteLine("Max LBA is {0}, setting to {0}", 0x1FFFFF);
|
||||
lba = 0x1FFFFF;
|
||||
}
|
||||
|
||||
DicConsole.Write("Blocks to read (0 for 256 blocks)?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!byte.TryParse(strDev, out count))
|
||||
@@ -179,13 +180,13 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
readlong, dev.Timeout, out double duration);
|
||||
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ {0}(6) to the device:", readlong ? "LONG " : "");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -213,7 +214,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
return;
|
||||
case 1:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(6) response:", readlong ? "LONG " : "");
|
||||
if(buffer != null) PrintHex.PrintHexArray(buffer, 64);
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -223,7 +224,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
goto menu;
|
||||
case 2:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(6) sense:", readlong ? "LONG " : "");
|
||||
if(senseBuffer != null) PrintHex.PrintHexArray(senseBuffer, 64);
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -233,7 +234,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
goto menu;
|
||||
case 3:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(6) decoded sense:", readlong ? "LONG " : "");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -253,23 +254,23 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
|
||||
static void Read10(string devPath, Device dev, bool readlong)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
bool noDma = false;
|
||||
uint lba = 0;
|
||||
uint blockSize = 512;
|
||||
byte count = 1;
|
||||
bool noDma = false;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
{
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ {0}(10) command:", readlong ? "LONG " : "");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Inhibit DMA?: {0}", noDma);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("{0} blocks to read", count == 0 ? 256 : count);
|
||||
DicConsole.WriteLine("{0} bytes expected per block", blockSize);
|
||||
DicConsole.WriteLine("Inhibit DMA?: {0}", noDma);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -340,14 +341,14 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
readlong, dev.Timeout, out double duration);
|
||||
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ {0}(10) to the device:", readlong ? "LONG " : "");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Print buffer.");
|
||||
@@ -374,7 +375,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
return;
|
||||
case 1:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(10) response:", readlong ? "LONG " : "");
|
||||
if(buffer != null) PrintHex.PrintHexArray(buffer, 64);
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -384,7 +385,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
goto menu;
|
||||
case 2:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(10) sense:", readlong ? "LONG " : "");
|
||||
if(senseBuffer != null) PrintHex.PrintHexArray(senseBuffer, 64);
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -394,7 +395,7 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
goto menu;
|
||||
case 3:
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("READ {0}(10) decoded sense:", readlong ? "LONG " : "");
|
||||
DicConsole.Write("{0}", Sense.PrettifySense(senseBuffer));
|
||||
DicConsole.WriteLine("Press any key to continue...");
|
||||
@@ -423,11 +424,11 @@ namespace DiscImageChef.Tests.Devices.SCSI
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ/RESET USAGE COUNTER to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Buffer is {0} bytes.", buffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(buffer));
|
||||
DicConsole.WriteLine("Sense buffer is {0} bytes.", senseBuffer?.Length.ToString() ?? "null");
|
||||
DicConsole.WriteLine("Sense buffer is null or empty? {0}", ArrayHelpers.ArrayIsNullOrEmpty(senseBuffer));
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
Reference in New Issue
Block a user