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:
@@ -104,8 +104,8 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending GET NATIVE MAX ADDRESS EXT to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Max LBA is {0}.", lba);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Max LBA is {0}.", lba);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Decode error registers.");
|
||||
@@ -148,10 +148,10 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadDmaExt(string devPath, Device dev)
|
||||
{
|
||||
ulong lba = 0;
|
||||
ulong lba = 0;
|
||||
ushort count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -159,7 +159,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ DMA EXT command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -194,10 +194,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
if(lba > 0xFFFFFFFFFFFF)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
lba = 0xFFFFFFFFFFFF;
|
||||
}
|
||||
|
||||
DicConsole.Write("How many sectors?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!ushort.TryParse(strDev, out count))
|
||||
@@ -220,9 +221,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ DMA EXT 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -279,11 +280,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadLogExt(string devPath, Device dev)
|
||||
{
|
||||
byte address = 0;
|
||||
ushort page = 0;
|
||||
ushort count = 1;
|
||||
byte address = 0;
|
||||
ushort page = 0;
|
||||
ushort count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -293,7 +294,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Parameters for READ LOG EXT command:");
|
||||
DicConsole.WriteLine("Log address: {0}", address);
|
||||
DicConsole.WriteLine("Page number: {0}", page);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -356,9 +357,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LOG EXT 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -415,11 +416,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadLogDmaExt(string devPath, Device dev)
|
||||
{
|
||||
byte address = 0;
|
||||
ushort page = 0;
|
||||
ushort count = 1;
|
||||
byte address = 0;
|
||||
ushort page = 0;
|
||||
ushort count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -429,7 +430,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Parameters for READ LOG DMA EXT command:");
|
||||
DicConsole.WriteLine("Log address: {0}", address);
|
||||
DicConsole.WriteLine("Page number: {0}", page);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -492,9 +493,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LOG DMA EXT 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -551,10 +552,10 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadMultipleExt(string devPath, Device dev)
|
||||
{
|
||||
ulong lba = 0;
|
||||
ulong lba = 0;
|
||||
ushort count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -562,7 +563,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ MULTIPLE EXT command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -597,10 +598,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
if(lba > 0xFFFFFFFFFFFF)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
lba = 0xFFFFFFFFFFFF;
|
||||
}
|
||||
|
||||
DicConsole.Write("How many sectors?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!ushort.TryParse(strDev, out count))
|
||||
@@ -623,9 +625,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ MULTIPLE EXT 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -691,8 +693,8 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ NATIVE MAX ADDRESS EXT to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Max LBA is {0}.", lba);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Max LBA is {0}.", lba);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Decode error registers.");
|
||||
@@ -735,10 +737,10 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadSectorsExt(string devPath, Device dev)
|
||||
{
|
||||
ulong lba = 0;
|
||||
ulong lba = 0;
|
||||
ushort count = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -746,7 +748,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
System.Console.Clear();
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for READ SECTORS EXT command:");
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("LBA: {0}", lba);
|
||||
DicConsole.WriteLine("Count: {0}", count);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -781,10 +783,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
if(lba > 0xFFFFFFFFFFFF)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFFFFFFF);
|
||||
lba = 0xFFFFFFFFFFFF;
|
||||
}
|
||||
|
||||
DicConsole.Write("How many sectors?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!ushort.TryParse(strDev, out count))
|
||||
@@ -807,9 +810,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ SECTORS EXT 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -79,9 +79,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending IDENTIFY PACKET DEVICE 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -88,8 +88,8 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending REQUEST EXTENDED ERROR CODE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Error code is {0}.", errorCode);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Error code is {0}.", errorCode);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Decode error registers.");
|
||||
@@ -133,10 +133,10 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
static void TranslateSectorChs(string devPath, Device dev)
|
||||
{
|
||||
ushort cylinder = 0;
|
||||
byte head = 0;
|
||||
byte sector = 1;
|
||||
byte head = 0;
|
||||
byte sector = 1;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -145,8 +145,8 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Parameters for TRANSLATE SECTOR command:");
|
||||
DicConsole.WriteLine("Cylinder: {0}", cylinder);
|
||||
DicConsole.WriteLine("Head: {0}", head);
|
||||
DicConsole.WriteLine("Sector: {0}", sector);
|
||||
DicConsole.WriteLine("Head: {0}", head);
|
||||
DicConsole.WriteLine("Sector: {0}", sector);
|
||||
DicConsole.WriteLine();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
DicConsole.WriteLine("1.- Change parameters.");
|
||||
@@ -192,6 +192,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Head cannot be bigger than 15. Setting it to 15...");
|
||||
head = 15;
|
||||
}
|
||||
|
||||
DicConsole.Write("What sector?: ");
|
||||
strDev = System.Console.ReadLine();
|
||||
if(!byte.TryParse(strDev, out sector))
|
||||
@@ -214,9 +215,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending TRANSLATE SECTOR 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -273,9 +274,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void TranslateSectorLba(string devPath, Device dev)
|
||||
{
|
||||
uint lba = 0;
|
||||
uint lba = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -317,10 +318,11 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
if(lba > 0xFFFFFFF)
|
||||
{
|
||||
DicConsole
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFF);
|
||||
.WriteLine("Logical block address cannot be bigger than {0}. Setting it to {0}...",
|
||||
0xFFFFFFF);
|
||||
lba = 0xFFFFFFF;
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: goto start;
|
||||
}
|
||||
@@ -334,9 +336,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending TRANSLATE SECTOR 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
|
||||
@@ -71,9 +71,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void CheckMediaCardType(string devPath, Device dev)
|
||||
{
|
||||
byte feature = 0;
|
||||
byte feature = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -125,7 +125,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending CHECK MEDIA CARD TYPE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("CHECK MEDIA CARD TYPE status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending DISABLE ATTRIBUTE AUTOSAVE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("DISABLE ATTRIBUTE AUTOSAVE status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
@@ -151,7 +151,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending DISABLE OPERATIONS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("DISABLE OPERATIONS status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
@@ -195,7 +195,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending ENABLE ATTRIBUTE AUTOSAVE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("ENABLE ATTRIBUTE AUTOSAVE status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
@@ -237,7 +237,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending ENABLE OPERATIONS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("ENABLE OPERATIONS status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
@@ -271,9 +271,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ExecuteOfflineImmediate(string devPath, Device dev)
|
||||
{
|
||||
byte subcommand = 0;
|
||||
byte subcommand = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -325,7 +325,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending EXECUTE OFF-LINE IMMEDIATE to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("EXECUTE OFF-LINE IMMEDIATE status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
@@ -369,9 +369,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -426,9 +426,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
|
||||
static void ReadLog(string devPath, Device dev)
|
||||
{
|
||||
byte address = 0;
|
||||
byte address = 0;
|
||||
string strDev;
|
||||
int item;
|
||||
int item;
|
||||
|
||||
parameters:
|
||||
while(true)
|
||||
@@ -479,9 +479,9 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
menu:
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending READ LOG 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("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();
|
||||
DicConsole.WriteLine("Choose what to do:");
|
||||
@@ -547,7 +547,7 @@ namespace DiscImageChef.Tests.Devices.ATA
|
||||
DicConsole.WriteLine("Device: {0}", devPath);
|
||||
DicConsole.WriteLine("Sending RETURN STATUS to the device:");
|
||||
DicConsole.WriteLine("Command took {0} ms.", duration);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("Sense is {0}.", sense);
|
||||
DicConsole.WriteLine("RETURN STATUS status registers:");
|
||||
DicConsole.Write("{0}", MainClass.DecodeAtaRegisters(errorRegisters));
|
||||
DicConsole.WriteLine();
|
||||
|
||||
Reference in New Issue
Block a user