mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
REFACTOR: Removed unneeded value sets.
This commit is contained in:
@@ -62,10 +62,10 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
MhddLog mhddLog;
|
||||
IbgLog ibgLog;
|
||||
bool sense = false;
|
||||
ulong blocks = 0;
|
||||
ulong blocks;
|
||||
// TODO: Check subchannel support
|
||||
uint blockSize = 0;
|
||||
uint subSize = 0;
|
||||
uint blockSize;
|
||||
uint subSize;
|
||||
byte[] tmpBuf;
|
||||
FullTOC.CDFullTOC? toc = null;
|
||||
DateTime start;
|
||||
@@ -76,11 +76,11 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
double maxSpeed = double.MinValue;
|
||||
double minSpeed = double.MaxValue;
|
||||
Checksum dataChk;
|
||||
bool readcd = false;
|
||||
bool readcd;
|
||||
byte[] readBuffer;
|
||||
uint blocksToRead = 64;
|
||||
ulong errored = 0;
|
||||
DataFile dumpFile = null;
|
||||
DataFile dumpFile;
|
||||
bool aborted = false;
|
||||
System.Console.CancelKeyPress += (sender, e) => { e.Cancel = aborted = true; };
|
||||
|
||||
@@ -387,8 +387,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
dumpFile = new DataFile(outputPrefix + ".leadin.bin");
|
||||
dataChk = new Checksum();
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
|
||||
readBuffer = null;
|
||||
|
||||
dumpLog.WriteLine("Reading Lead-in");
|
||||
@@ -700,7 +698,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
break;
|
||||
}
|
||||
|
||||
double cmdDuration = 0;
|
||||
double cmdDuration;
|
||||
|
||||
DicConsole.Write("\rRetrying sector {0}, pass {1}, {3}{2}", badSector, pass + 1,
|
||||
forward ? "forward" : "reverse",
|
||||
@@ -742,8 +740,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
Modes.DecodedMode? currentMode = null;
|
||||
Modes.ModePage? currentModePage = null;
|
||||
byte[] md6 = null;
|
||||
byte[] md10 = null;
|
||||
byte[] md6;
|
||||
byte[] md10;
|
||||
|
||||
if(!runningPersistent && persistent)
|
||||
{
|
||||
|
||||
@@ -55,14 +55,13 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
ref MediaType dskType, bool separateSubchannel, ref Resume resume,
|
||||
ref DumpLog dumpLog, bool dumpLeadIn, Encoding encoding)
|
||||
{
|
||||
byte[] cmdBuf = null;
|
||||
byte[] senseBuf = null;
|
||||
bool sense = false;
|
||||
byte[] cmdBuf;
|
||||
byte[] senseBuf;
|
||||
bool sense;
|
||||
double duration;
|
||||
ulong blocks = 0;
|
||||
byte[] tmpBuf;
|
||||
bool compactDisc = true;
|
||||
ushort currentProfile = 0x0001;
|
||||
bool isXbox = false;
|
||||
Alcohol120 alcohol = new Alcohol120(outputPrefix);
|
||||
|
||||
@@ -76,7 +75,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
if(!sense)
|
||||
{
|
||||
Features.SeparatedFeatures ftr = Features.Separate(cmdBuf);
|
||||
currentProfile = ftr.CurrentProfile;
|
||||
dumpLog.WriteLine("Device reports current profile is 0x{0:X4}", ftr.CurrentProfile);
|
||||
|
||||
switch(ftr.CurrentProfile)
|
||||
|
||||
@@ -62,14 +62,14 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
MhddLog mhddLog;
|
||||
IbgLog ibgLog;
|
||||
byte[] cmdBuf = null;
|
||||
byte[] senseBuf = null;
|
||||
bool sense = false;
|
||||
byte[] cmdBuf;
|
||||
byte[] senseBuf;
|
||||
bool sense;
|
||||
double duration;
|
||||
ulong blocks = 0;
|
||||
uint blockSize = 0;
|
||||
uint logicalBlockSize = 0;
|
||||
uint physicalBlockSize = 0;
|
||||
ulong blocks;
|
||||
uint blockSize;
|
||||
uint logicalBlockSize;
|
||||
uint physicalBlockSize;
|
||||
byte scsiMediumType = 0;
|
||||
byte scsiDensityCode = 0;
|
||||
bool containsFloppyPage = false;
|
||||
@@ -85,7 +85,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
byte[] readBuffer;
|
||||
uint blocksToRead = 64;
|
||||
ulong errored = 0;
|
||||
DataFile dumpFile = null;
|
||||
DataFile dumpFile;
|
||||
bool aborted = false;
|
||||
System.Console.CancelKeyPress += (sender, e) => { e.Cancel = aborted = true; };
|
||||
|
||||
@@ -331,8 +331,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
|
||||
readBuffer = null;
|
||||
|
||||
if(alcohol != null && !dumpRaw)
|
||||
{
|
||||
alcohol.AddSessions(new[] {new Session {StartTrack = 1, EndTrack = 1, SessionSequence = 1}});
|
||||
@@ -461,8 +459,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
Modes.DecodedMode? currentMode = null;
|
||||
Modes.ModePage? currentModePage = null;
|
||||
byte[] md6 = null;
|
||||
byte[] md10 = null;
|
||||
byte[] md6;
|
||||
byte[] md10;
|
||||
|
||||
if(!runningPersistent && persistent)
|
||||
{
|
||||
|
||||
@@ -50,8 +50,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
bool dumpRaw, bool persistent, bool stopOnError, bool separateSubchannel,
|
||||
ref Resume resume, ref DumpLog dumpLog, bool dumpLeadIn, Encoding encoding)
|
||||
{
|
||||
byte[] senseBuf = null;
|
||||
bool sense = false;
|
||||
byte[] senseBuf;
|
||||
bool sense;
|
||||
MediaType dskType = MediaType.Unknown;
|
||||
int resets = 0;
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
bool aborted;
|
||||
MhddLog mhddLog;
|
||||
IbgLog ibgLog;
|
||||
bool sense = false;
|
||||
bool sense;
|
||||
ulong blocks = 0;
|
||||
uint blockSize = 0;
|
||||
uint blockSize;
|
||||
MediaType dskType = MediaType.Unknown;
|
||||
DateTime start;
|
||||
DateTime end;
|
||||
@@ -66,7 +66,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
double currentSpeed = 0;
|
||||
double maxSpeed = double.MinValue;
|
||||
double minSpeed = double.MaxValue;
|
||||
List<ulong> unreadableSectors = new List<ulong>();
|
||||
Checksum dataChk;
|
||||
|
||||
dev.RequestSense(out byte[] senseBuf, dev.Timeout, out double duration);
|
||||
@@ -372,8 +371,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
Checksum fileChk;
|
||||
List<TapePartitionType> partitions = new List<TapePartitionType>();
|
||||
List<TapeFileType> files = new List<TapeFileType>();
|
||||
TapeFileType currentTapeFile = new TapeFileType();
|
||||
TapePartitionType currentTapePartition = new TapePartitionType();
|
||||
TapeFileType currentTapeFile;
|
||||
TapePartitionType currentTapePartition;
|
||||
|
||||
DicConsole.WriteLine();
|
||||
DataFile dumpFile = new DataFile(outputPrefix + ".bin");
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
uint blocksToRead = 128;
|
||||
uint blockSize = 512;
|
||||
ulong blocks = 0;
|
||||
byte[] cid = null;
|
||||
byte[] cid;
|
||||
byte[] csd = null;
|
||||
byte[] ocr = null;
|
||||
byte[] ecsd = null;
|
||||
|
||||
@@ -62,8 +62,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
{
|
||||
MhddLog mhddLog;
|
||||
IbgLog ibgLog;
|
||||
bool sense = false;
|
||||
ulong blocks = 0;
|
||||
bool sense;
|
||||
ulong blocks;
|
||||
uint blockSize = 2048;
|
||||
uint blocksToRead = 64;
|
||||
ulong errored = 0;
|
||||
@@ -75,7 +75,7 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
double maxSpeed = double.MinValue;
|
||||
double minSpeed = double.MaxValue;
|
||||
Checksum dataChk;
|
||||
DataFile dumpFile = null;
|
||||
DataFile dumpFile;
|
||||
bool aborted = false;
|
||||
System.Console.CancelKeyPress += (sender, e) => { e.Cancel = aborted = true; };
|
||||
|
||||
@@ -332,8 +332,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
start = DateTime.UtcNow;
|
||||
|
||||
readBuffer = null;
|
||||
|
||||
double cmdDuration = 0;
|
||||
uint saveBlocksToRead = blocksToRead;
|
||||
DumpHardwareType currentTry = null;
|
||||
@@ -630,8 +628,6 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
break;
|
||||
}
|
||||
|
||||
cmdDuration = 0;
|
||||
|
||||
DicConsole.Write("\rRetrying sector {0}, pass {1}, {3}{2}", badSector, pass + 1,
|
||||
forward ? "forward" : "reverse",
|
||||
runningPersistent ? "recovering partial data, " : "");
|
||||
@@ -661,8 +657,8 @@ namespace DiscImageChef.Core.Devices.Dumping
|
||||
|
||||
Modes.DecodedMode? currentMode = null;
|
||||
Modes.ModePage? currentModePage = null;
|
||||
byte[] md6 = null;
|
||||
byte[] md10 = null;
|
||||
byte[] md6;
|
||||
byte[] md10;
|
||||
|
||||
if(!runningPersistent && persistent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user