diff --git a/Aaru.Checksums b/Aaru.Checksums
index 18c1903d2..5764c3d84 160000
--- a/Aaru.Checksums
+++ b/Aaru.Checksums
@@ -1 +1 @@
-Subproject commit 18c1903d2f762bbd904113f9c12b051478573d2a
+Subproject commit 5764c3d844e1fb252cec9a287b5a6ef6c8876be4
diff --git a/Aaru.Core/Devices/Dumping/MiniDisc.cs b/Aaru.Core/Devices/Dumping/MiniDisc.cs
index f89a06370..4525eda17 100644
--- a/Aaru.Core/Devices/Dumping/MiniDisc.cs
+++ b/Aaru.Core/Devices/Dumping/MiniDisc.cs
@@ -109,7 +109,7 @@ partial class Dump
return;
}
- MediaType dskType = MediaType.MDData;
+ const MediaType dskType = MediaType.MDData;
if(scsiReader.FindReadCommand())
{
@@ -524,7 +524,7 @@ partial class Dump
if(dcMode6?.Pages != null)
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage =>
- modePage.Page == 0x01 && modePage.Subpage == 0x00))
+ modePage.Page == 0x01 && modePage.Subpage == 0x00))
currentModePage = modePage;
}
diff --git a/Aaru.Core/Devices/Dumping/SSC.cs b/Aaru.Core/Devices/Dumping/SSC.cs
index 4bdc0371c..163d801bb 100644
--- a/Aaru.Core/Devices/Dumping/SSC.cs
+++ b/Aaru.Core/Devices/Dumping/SSC.cs
@@ -1100,9 +1100,9 @@ partial class Dump
_retryPasses > 0 &&
(canLocate || canLocateLong))
{
- var pass = 1;
- var forward = false;
- var runningPersistent = false;
+ var pass = 1;
+ var forward = false;
+ const bool runningPersistent = false;
Modes.ModePage? currentModePage = null;
diff --git a/Aaru.Core/Devices/Dumping/SecureDigital.cs b/Aaru.Core/Devices/Dumping/SecureDigital.cs
index 92f22bde1..cc6cbd881 100644
--- a/Aaru.Core/Devices/Dumping/SecureDigital.cs
+++ b/Aaru.Core/Devices/Dumping/SecureDigital.cs
@@ -756,9 +756,9 @@ public partial class Dump
!_aborted &&
_retryPasses > 0)
{
- var pass = 1;
- var forward = true;
- var runningPersistent = false;
+ var pass = 1;
+ var forward = true;
+ const bool runningPersistent = false;
InitProgress?.Invoke();
repeatRetryLba:
diff --git a/Aaru.Core/Devices/Report/ATA.cs b/Aaru.Core/Devices/Report/ATA.cs
index 2fd70d43e..52269774c 100644
--- a/Aaru.Core/Devices/Report/ATA.cs
+++ b/Aaru.Core/Devices/Report/ATA.cs
@@ -563,7 +563,7 @@ public sealed partial class DeviceReport
capabilities.Manufacturer = ataId.MediaManufacturer;
}
- ulong checkCorrectRead = 0;
+ const ulong checkCorrectRead = 0;
Spectre.ProgressSingleSpinner(ctx =>
{
diff --git a/Aaru.Core/Sidecar/BlockMedia.cs b/Aaru.Core/Sidecar/BlockMedia.cs
index 11905248e..e4c8c41b3 100644
--- a/Aaru.Core/Sidecar/BlockMedia.cs
+++ b/Aaru.Core/Sidecar/BlockMedia.cs
@@ -393,9 +393,9 @@ public sealed partial class Sidecar
// For fast debugging, skip checksum
//goto skipImageChecksum;
- uint sectorsToRead = 64;
- ulong sectors = image.Info.Sectors;
- ulong doneSectors = 0;
+ const uint sectorsToRead = 64;
+ ulong sectors = image.Info.Sectors;
+ ulong doneSectors = 0;
InitProgress2();
@@ -495,9 +495,9 @@ public sealed partial class Sidecar
// For fast debugging, skip checksum
//goto skipImageChecksum;
- uint sectorsToRead = 64;
- ulong sectors = tapePartition.LastBlock - tapePartition.FirstBlock + 1;
- ulong doneSectors = 0;
+ const uint sectorsToRead = 64;
+ ulong sectors = tapePartition.LastBlock - tapePartition.FirstBlock + 1;
+ ulong doneSectors = 0;
InitProgress2();
@@ -595,9 +595,9 @@ public sealed partial class Sidecar
// For fast debugging, skip checksum
//goto skipImageChecksum;
- uint sectorsToRead = 64;
- ulong sectors = tapeFile.LastBlock - tapeFile.FirstBlock + 1;
- ulong doneSectors = 0;
+ const uint sectorsToRead = 64;
+ ulong sectors = tapeFile.LastBlock - tapeFile.FirstBlock + 1;
+ ulong doneSectors = 0;
InitProgress2();
diff --git a/Aaru.Core/Sidecar/OpticalDisc.cs b/Aaru.Core/Sidecar/OpticalDisc.cs
index 4dfa5bad8..47577030d 100644
--- a/Aaru.Core/Sidecar/OpticalDisc.cs
+++ b/Aaru.Core/Sidecar/OpticalDisc.cs
@@ -336,9 +336,9 @@ public sealed partial class Sidecar
xmlTrk.BytesPerSector = (uint)trk.BytesPerSector;
- uint sectorsToRead = 512;
- ulong sectors = xmlTrk.EndSector - xmlTrk.StartSector + 1;
- ulong doneSectors = 0;
+ const uint sectorsToRead = 512;
+ ulong sectors = xmlTrk.EndSector - xmlTrk.StartSector + 1;
+ ulong doneSectors = 0;
// If there is only one track, and it's the same as the image file (e.g. ".iso" files), don't re-checksum.
if(image.Id == new Guid("12345678-AAAA-BBBB-CCCC-123456789000") &&
diff --git a/Aaru.Decoders b/Aaru.Decoders
index f0bee36d9..e449e5345 160000
--- a/Aaru.Decoders
+++ b/Aaru.Decoders
@@ -1 +1 @@
-Subproject commit f0bee36d9eddd7435f05e20587c18ff2d32b46ed
+Subproject commit e449e534545e4a8a30902ea3b72ec28832416715
diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs
index 43de1d9c3..dafad9b70 100644
--- a/Aaru.Devices/Device/MmcCommands/MMC.cs
+++ b/Aaru.Devices/Device/MmcCommands/MMC.cs
@@ -222,7 +222,6 @@ public partial class Device
ushort transferLength, bool byteAddressed, uint timeout, out double duration)
{
buffer = new byte[transferLength * blockSize];
- double setDuration = 0;
uint address;
response = null;
@@ -239,10 +238,7 @@ public partial class Device
Error = LastError != 0;
if(transferLength > 1)
- {
- duration += setDuration;
AaruConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration);
- }
else
AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration);
diff --git a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
index 0e10ff229..d3a1e0bae 100644
--- a/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
+++ b/Aaru.Devices/Device/ScsiCommands/MiniDisc.cs
@@ -49,7 +49,7 @@ public partial class Device
/// true if the command failed and contains the sense buffer.
public bool MiniDiscReadDataTOC(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
- ushort transferLength = 2336;
+ const ushort transferLength = 2336;
senseBuffer = new byte[64];
var cdb = new byte[10];
@@ -80,7 +80,7 @@ public partial class Device
public bool MiniDiscReadUserTOC(out byte[] buffer, out byte[] senseBuffer, uint sector, uint timeout,
out double duration)
{
- ushort transferLength = 2336;
+ const ushort transferLength = 2336;
senseBuffer = new byte[64];
var cdb = new byte[10];
@@ -113,7 +113,7 @@ public partial class Device
/// true if the command failed and contains the sense buffer.
public bool MiniDiscD5(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
- ushort transferLength = 4;
+ const ushort transferLength = 4;
senseBuffer = new byte[64];
var cdb = new byte[10];
@@ -167,7 +167,7 @@ public partial class Device
/// true if the command failed and contains the sense buffer.
public bool MiniDiscReadPosition(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
- ushort transferLength = 4;
+ const ushort transferLength = 4;
senseBuffer = new byte[64];
var cdb = new byte[10];
@@ -196,7 +196,7 @@ public partial class Device
/// true if the command failed and contains the sense buffer.
public bool MiniDiscGetType(out byte[] buffer, out byte[] senseBuffer, uint timeout, out double duration)
{
- ushort transferLength = 8;
+ const ushort transferLength = 8;
senseBuffer = new byte[64];
var cdb = new byte[10];
diff --git a/Aaru.Images/BLU/Read.cs b/Aaru.Images/BLU/Read.cs
index 765ad151b..79418a826 100644
--- a/Aaru.Images/BLU/Read.cs
+++ b/Aaru.Images/BLU/Read.cs
@@ -167,17 +167,15 @@ public sealed partial class Blu
if(sectorAddress + length > _imageInfo.Sectors)
return ErrorNumber.OutOfRange;
- var ms = new MemoryStream();
- var seek = 0;
- var read = 0x200;
- int skip = _bptag;
+ var ms = new MemoryStream();
+ const int read = 0x200;
+ int skip = _bptag;
Stream stream = _bluImageFilter.GetDataForkStream();
stream.Seek((long)((sectorAddress + 1) * _imageHeader.BytesPerBlock), SeekOrigin.Begin);
for(var i = 0; i < length; i++)
{
- stream.Seek(seek, SeekOrigin.Current);
var sector = new byte[read];
stream.Read(sector, 0, read);
ms.Write(sector, 0, read);
@@ -206,10 +204,9 @@ public sealed partial class Blu
if(sectorAddress + length > _imageInfo.Sectors)
return ErrorNumber.SectorNotFound;
- var ms = new MemoryStream();
- var seek = 0x200;
- int read = _bptag;
- var skip = 0;
+ var ms = new MemoryStream();
+ const int seek = 0x200;
+ int read = _bptag;
Stream stream = _bluImageFilter.GetDataForkStream();
stream.Seek((long)((sectorAddress + 1) * _imageHeader.BytesPerBlock), SeekOrigin.Begin);
@@ -220,7 +217,6 @@ public sealed partial class Blu
var sector = new byte[read];
stream.Read(sector, 0, read);
ms.Write(sector, 0, read);
- stream.Seek(skip, SeekOrigin.Current);
}
buffer = ms.ToArray();
diff --git a/Aaru.Images/CDRDAO/Read.cs b/Aaru.Images/CDRDAO/Read.cs
index 67f8a731a..32ded6ec5 100644
--- a/Aaru.Images/CDRDAO/Read.cs
+++ b/Aaru.Images/CDRDAO/Read.cs
@@ -688,8 +688,6 @@ public sealed partial class Cdrdao
for(var i = 0; i < _discimage.Tracks.Count; i++)
{
- ulong index0Len = 0;
-
if(_discimage.Tracks[i].Sequence == 1 &&
i != 0)
{
@@ -704,8 +702,8 @@ public sealed partial class Cdrdao
Description = $"Track {_discimage.Tracks[i].Sequence}.",
Name = _discimage.Tracks[i].Title,
Start = _discimage.Tracks[i].StartSector,
- Size = (_discimage.Tracks[i].Sectors - index0Len) * _discimage.Tracks[i].Bps,
- Length = _discimage.Tracks[i].Sectors - index0Len,
+ Size = _discimage.Tracks[i].Sectors * _discimage.Tracks[i].Bps,
+ Length = _discimage.Tracks[i].Sectors,
Sequence = partitionSequence,
Offset = byteOffset,
Type = _discimage.Tracks[i].Tracktype
diff --git a/Aaru.Images/CDRWin/Properties.cs b/Aaru.Images/CDRWin/Properties.cs
index b03352452..ee54dbfbc 100644
--- a/Aaru.Images/CDRWin/Properties.cs
+++ b/Aaru.Images/CDRWin/Properties.cs
@@ -76,9 +76,9 @@ public sealed partial class CdrWin
{
List