diff --git a/Aaru.Checksums/Adler32/neon.cs b/Aaru.Checksums/Adler32/neon.cs
index cc30cccfa..2057f373a 100644
--- a/Aaru.Checksums/Adler32/neon.cs
+++ b/Aaru.Checksums/Adler32/neon.cs
@@ -71,7 +71,7 @@ static class Neon
while(blocks != 0)
{
- uint n = Adler32Context.NMAX / blockSize; /* The NMAX constraint. */
+ uint n = Adler32Context.NMax / blockSize; /* The NMAX constraint. */
if(n > blocks) n = blocks;
@@ -196,8 +196,8 @@ static class Neon
/*
* Reduce.
*/
- s1 %= Adler32Context.ADLER_MODULE;
- s2 %= Adler32Context.ADLER_MODULE;
+ s1 %= Adler32Context.AdlerModule;
+ s2 %= Adler32Context.AdlerModule;
}
/*
@@ -228,9 +228,9 @@ static class Neon
while(len-- != 0) s2 += s1 += buf[bufPos++];
- if(s1 >= Adler32Context.ADLER_MODULE) s1 -= Adler32Context.ADLER_MODULE;
+ if(s1 >= Adler32Context.AdlerModule) s1 -= Adler32Context.AdlerModule;
- s2 %= Adler32Context.ADLER_MODULE;
+ s2 %= Adler32Context.AdlerModule;
}
/*
diff --git a/Aaru.Checksums/Adler32/ssse3.cs b/Aaru.Checksums/Adler32/ssse3.cs
index e9d1b71f7..e03300cd5 100644
--- a/Aaru.Checksums/Adler32/ssse3.cs
+++ b/Aaru.Checksums/Adler32/ssse3.cs
@@ -68,7 +68,7 @@ static class Ssse3
while(blocks != 0)
{
- uint n = Adler32Context.NMAX / blockSize; /* The NMAX constraint. */
+ uint n = Adler32Context.NMax / blockSize; /* The NMAX constraint. */
if(n > blocks) n = blocks;
@@ -142,8 +142,8 @@ static class Ssse3
/*
* Reduce.
*/
- s1 %= Adler32Context.ADLER_MODULE;
- s2 %= Adler32Context.ADLER_MODULE;
+ s1 %= Adler32Context.AdlerModule;
+ s2 %= Adler32Context.AdlerModule;
}
/*
@@ -174,9 +174,9 @@ static class Ssse3
while(len-- != 0) s2 += s1 += buf[bufPos++];
- if(s1 >= Adler32Context.ADLER_MODULE) s1 -= Adler32Context.ADLER_MODULE;
+ if(s1 >= Adler32Context.AdlerModule) s1 -= Adler32Context.AdlerModule;
- s2 %= Adler32Context.ADLER_MODULE;
+ s2 %= Adler32Context.AdlerModule;
}
/*
diff --git a/Aaru.Checksums/Adler32Context.cs b/Aaru.Checksums/Adler32Context.cs
index 6dc1135a4..cb9837330 100644
--- a/Aaru.Checksums/Adler32Context.cs
+++ b/Aaru.Checksums/Adler32Context.cs
@@ -54,8 +54,8 @@ namespace Aaru.Checksums;
[SuppressMessage("ReSharper", "UnusedMethodReturnValue.Global")]
public sealed partial class Adler32Context : IChecksum
{
- internal const ushort ADLER_MODULE = 65521;
- internal const uint NMAX = 5552;
+ internal const ushort AdlerModule = 65521;
+ internal const uint NMax = 5552;
readonly IntPtr _nativeContext;
readonly bool _useNative;
ushort _sum1, _sum2;
@@ -177,11 +177,11 @@ public sealed partial class Adler32Context : IChecksum
{
sum1 += data[dataOff];
- if(sum1 >= ADLER_MODULE) sum1 -= ADLER_MODULE;
+ if(sum1 >= AdlerModule) sum1 -= AdlerModule;
sum2 += sum1;
- if(sum2 >= ADLER_MODULE) sum2 -= ADLER_MODULE;
+ if(sum2 >= AdlerModule) sum2 -= AdlerModule;
preSum1 = (ushort)(sum1 & 0xFFFF);
preSum2 = (ushort)(sum2 & 0xFFFF);
@@ -197,9 +197,9 @@ public sealed partial class Adler32Context : IChecksum
sum2 += sum1;
}
- if(sum1 >= ADLER_MODULE) sum1 -= ADLER_MODULE;
+ if(sum1 >= AdlerModule) sum1 -= AdlerModule;
- sum2 %= ADLER_MODULE; /* only added so many ADLER_MODULE's */
+ sum2 %= AdlerModule; /* only added so many ADLER_MODULE's */
preSum1 = (ushort)(sum1 & 0xFFFF);
preSum2 = (ushort)(sum2 & 0xFFFF);
@@ -208,10 +208,10 @@ public sealed partial class Adler32Context : IChecksum
}
/* do length NMAX blocks -- requires just one modulo operation */
- while(len >= NMAX)
+ while(len >= NMax)
{
- len -= NMAX;
- uint n = NMAX / 16;
+ len -= NMax;
+ uint n = NMax / 16;
do
{
@@ -252,8 +252,8 @@ public sealed partial class Adler32Context : IChecksum
dataOff += 16;
} while(--n != 0);
- sum1 %= ADLER_MODULE;
- sum2 %= ADLER_MODULE;
+ sum1 %= AdlerModule;
+ sum2 %= AdlerModule;
}
/* do remaining bytes (less than NMAX, still just one modulo) */
@@ -305,8 +305,8 @@ public sealed partial class Adler32Context : IChecksum
sum2 += sum1;
}
- sum1 %= ADLER_MODULE;
- sum2 %= ADLER_MODULE;
+ sum1 %= AdlerModule;
+ sum2 %= AdlerModule;
}
preSum1 = (ushort)(sum1 & 0xFFFF);
diff --git a/Aaru.Checksums/CRC16CCITTContext.cs b/Aaru.Checksums/CRC16CCITTContext.cs
index c779af1df..4762c6d7a 100644
--- a/Aaru.Checksums/CRC16CCITTContext.cs
+++ b/Aaru.Checksums/CRC16CCITTContext.cs
@@ -41,9 +41,9 @@ namespace Aaru.Checksums;
public sealed class CRC16CcittContext : Crc16Context
{
/// CCITT CRC16 polynomial
- public const ushort CRC16_CCITT_POLY = 0x8408;
+ public const ushort CRC16CcittPoly = 0x8408;
/// CCITT CRC16 seed
- public const ushort CRC16_CCITT_SEED = 0x0000;
+ public const ushort CRC16CcittSeed = 0x0000;
static readonly ushort[][] _ccittCrc16Table =
[
[
@@ -226,11 +226,11 @@ public sealed class CRC16CcittContext : Crc16Context
/// Initializes an instance of the CRC16 with CCITT polynomial and seed.
///
- public CRC16CcittContext() : base(CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true) {}
+ public CRC16CcittContext() : base(CRC16CcittPoly, CRC16CcittSeed, _ccittCrc16Table, true) {}
- public string Name => Localization.CRC16_CCITT_Name;
- public Guid Id => new("4C3BD0D5-24BD-4D45-BC19-A90A5AA5CC9D");
- public string Author => Authors.NataliaPortillo;
+ public new string Name => Localization.CRC16_CCITT_Name;
+ public new Guid Id => new("4C3BD0D5-24BD-4D45-BC19-A90A5AA5CC9D");
+ public new string Author => Authors.NataliaPortillo;
/// Gets the hash of a file
/// File path.
@@ -245,14 +245,14 @@ public sealed class CRC16CcittContext : Crc16Context
/// File path.
/// Byte array of the hash value.
public static string File(string filename, out byte[] hash) =>
- File(filename, out hash, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true);
+ File(filename, out hash, CRC16CcittPoly, CRC16CcittSeed, _ccittCrc16Table, true);
/// Gets the hash of the specified data buffer.
/// Data buffer.
/// Length of the data buffer to hash.
/// Byte array of the hash value.
public static string Data(byte[] data, uint len, out byte[] hash) =>
- Data(data, len, out hash, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true);
+ Data(data, len, out hash, CRC16CcittPoly, CRC16CcittSeed, _ccittCrc16Table, true);
/// Gets the hash of the specified data buffer.
/// Data buffer.
@@ -262,5 +262,5 @@ public sealed class CRC16CcittContext : Crc16Context
/// Calculates the CCITT CRC16 of the specified buffer with the specified parameters
/// Buffer
public static ushort Calculate(byte[] buffer) =>
- Calculate(buffer, CRC16_CCITT_POLY, CRC16_CCITT_SEED, _ccittCrc16Table, true);
+ Calculate(buffer, CRC16CcittPoly, CRC16CcittSeed, _ccittCrc16Table, true);
}
\ No newline at end of file
diff --git a/Aaru.Checksums/CRC16Context.cs b/Aaru.Checksums/CRC16Context.cs
index f988f658f..f35c15ab9 100644
--- a/Aaru.Checksums/CRC16Context.cs
+++ b/Aaru.Checksums/CRC16Context.cs
@@ -61,11 +61,11 @@ public partial class Crc16Context : IChecksum
_useNative = Native.IsSupported;
- _useCcitt = polynomial == CRC16CcittContext.CRC16_CCITT_POLY &&
- seed == CRC16CcittContext.CRC16_CCITT_SEED &&
+ _useCcitt = polynomial == CRC16CcittContext.CRC16CcittPoly &&
+ seed == CRC16CcittContext.CRC16CcittSeed &&
inverse;
- _useIbm = polynomial == CRC16IbmContext.CRC16_IBM_POLY && seed == CRC16IbmContext.CRC16_IBM_SEED && !inverse;
+ _useIbm = polynomial == CRC16IbmContext.CRC16IbmPoly && seed == CRC16IbmContext.CRC16IbmSeed && !inverse;
if(_useCcitt && _useNative)
{
@@ -369,13 +369,11 @@ public partial class Crc16Context : IChecksum
{
bool useNative = Native.IsSupported;
- bool useCcitt = polynomial == CRC16CcittContext.CRC16_CCITT_POLY &&
- seed == CRC16CcittContext.CRC16_CCITT_SEED &&
+ bool useCcitt = polynomial == CRC16CcittContext.CRC16CcittPoly &&
+ seed == CRC16CcittContext.CRC16CcittSeed &&
inverse;
- bool useIbm = polynomial == CRC16IbmContext.CRC16_IBM_POLY &&
- seed == CRC16IbmContext.CRC16_IBM_SEED &&
- !inverse;
+ bool useIbm = polynomial == CRC16IbmContext.CRC16IbmPoly && seed == CRC16IbmContext.CRC16IbmSeed && !inverse;
IntPtr nativeContext = IntPtr.Zero;
@@ -474,13 +472,11 @@ public partial class Crc16Context : IChecksum
{
bool useNative = Native.IsSupported;
- bool useCcitt = polynomial == CRC16CcittContext.CRC16_CCITT_POLY &&
- seed == CRC16CcittContext.CRC16_CCITT_SEED &&
+ bool useCcitt = polynomial == CRC16CcittContext.CRC16CcittPoly &&
+ seed == CRC16CcittContext.CRC16CcittSeed &&
inverse;
- bool useIbm = polynomial == CRC16IbmContext.CRC16_IBM_POLY &&
- seed == CRC16IbmContext.CRC16_IBM_SEED &&
- !inverse;
+ bool useIbm = polynomial == CRC16IbmContext.CRC16IbmPoly && seed == CRC16IbmContext.CRC16IbmSeed && !inverse;
IntPtr nativeContext = IntPtr.Zero;
@@ -565,13 +561,11 @@ public partial class Crc16Context : IChecksum
{
bool useNative = Native.IsSupported;
- bool useCcitt = polynomial == CRC16CcittContext.CRC16_CCITT_POLY &&
- seed == CRC16CcittContext.CRC16_CCITT_SEED &&
+ bool useCcitt = polynomial == CRC16CcittContext.CRC16CcittPoly &&
+ seed == CRC16CcittContext.CRC16CcittSeed &&
inverse;
- bool useIbm = polynomial == CRC16IbmContext.CRC16_IBM_POLY &&
- seed == CRC16IbmContext.CRC16_IBM_SEED &&
- !inverse;
+ bool useIbm = polynomial == CRC16IbmContext.CRC16IbmPoly && seed == CRC16IbmContext.CRC16IbmSeed && !inverse;
IntPtr nativeContext = IntPtr.Zero;
diff --git a/Aaru.Checksums/CRC16IBMContext.cs b/Aaru.Checksums/CRC16IBMContext.cs
index c06c25e5e..1070befb0 100644
--- a/Aaru.Checksums/CRC16IBMContext.cs
+++ b/Aaru.Checksums/CRC16IBMContext.cs
@@ -42,8 +42,8 @@ namespace Aaru.Checksums;
[SuppressMessage("ReSharper", "MemberCanBeInternal")]
public sealed class CRC16IbmContext : Crc16Context
{
- internal const ushort CRC16_IBM_POLY = 0xA001;
- internal const ushort CRC16_IBM_SEED = 0x0000;
+ internal const ushort CRC16IbmPoly = 0xA001;
+ internal const ushort CRC16IbmSeed = 0x0000;
static readonly ushort[][] _ibmCrc16Table =
[
@@ -227,16 +227,11 @@ public sealed class CRC16IbmContext : Crc16Context
/// Initializes an instance of the CRC16 with IBM polynomial and seed.
///
- public CRC16IbmContext() : base(CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false) {}
+ public CRC16IbmContext() : base(CRC16IbmPoly, CRC16IbmSeed, _ibmCrc16Table, false) {}
- ///
- public string Name => Localization.CRC16_IBM_Name;
-
- ///
- public Guid Id => new("0470433E-0C78-4C37-8C9F-BD8E72340E78");
-
- ///
- public string Author => Authors.NataliaPortillo;
+ public new string Name => Localization.CRC16_IBM_Name;
+ public new Guid Id => new("0470433E-0C78-4C37-8C9F-BD8E72340E78");
+ public new string Author => Authors.NataliaPortillo;
/// Gets the hash of a file
/// File path.
@@ -253,14 +248,14 @@ public sealed class CRC16IbmContext : Crc16Context
/// File path.
/// Byte array of the hash value.
public static string File(string filename, out byte[] hash) =>
- File(filename, out hash, CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false);
+ File(filename, out hash, CRC16IbmPoly, CRC16IbmSeed, _ibmCrc16Table, false);
/// Gets the hash of the specified data buffer.
/// Data buffer.
/// Length of the data buffer to hash.
/// Byte array of the hash value.
public static string Data(byte[] data, uint len, out byte[] hash) =>
- Data(data, len, out hash, CRC16_IBM_POLY, CRC16_IBM_SEED, _ibmCrc16Table, false);
+ Data(data, len, out hash, CRC16IbmPoly, CRC16IbmSeed, _ibmCrc16Table, false);
/// Gets the hash of the specified data buffer.
/// Data buffer.
diff --git a/Aaru.Checksums/Fletcher32/neon.cs b/Aaru.Checksums/Fletcher32/neon.cs
index 0075df1f8..21e175818 100644
--- a/Aaru.Checksums/Fletcher32/neon.cs
+++ b/Aaru.Checksums/Fletcher32/neon.cs
@@ -71,7 +71,7 @@ static class Neon
while(blocks != 0)
{
- uint n = Fletcher32Context.NMAX / block_Size; /* The NMAX constraint. */
+ uint n = Fletcher32Context.Nmax / block_Size; /* The NMAX constraint. */
if(n > blocks) n = blocks;
@@ -200,8 +200,8 @@ static class Neon
/*
* Reduce.
*/
- s1 %= Fletcher32Context.FLETCHER_MODULE;
- s2 %= Fletcher32Context.FLETCHER_MODULE;
+ s1 %= Fletcher32Context.FletcherModule;
+ s2 %= Fletcher32Context.FletcherModule;
}
/*
@@ -232,9 +232,9 @@ static class Neon
while(len-- != 0) s2 += s1 += buf[bufPos++];
- if(s1 >= Fletcher32Context.FLETCHER_MODULE) s1 -= Fletcher32Context.FLETCHER_MODULE;
+ if(s1 >= Fletcher32Context.FletcherModule) s1 -= Fletcher32Context.FletcherModule;
- s2 %= Fletcher32Context.FLETCHER_MODULE;
+ s2 %= Fletcher32Context.FletcherModule;
}
/*
diff --git a/Aaru.Checksums/Fletcher32/ssse3.cs b/Aaru.Checksums/Fletcher32/ssse3.cs
index 3407e525b..8787b08a4 100644
--- a/Aaru.Checksums/Fletcher32/ssse3.cs
+++ b/Aaru.Checksums/Fletcher32/ssse3.cs
@@ -68,7 +68,7 @@ static class Ssse3
while(blocks != 0)
{
- uint n = Fletcher32Context.NMAX / block_Size; /* The NMAX constraint. */
+ uint n = Fletcher32Context.Nmax / block_Size; /* The NMAX constraint. */
if(n > blocks) n = blocks;
@@ -142,8 +142,8 @@ static class Ssse3
/*
* Reduce.
*/
- s1 %= Fletcher32Context.FLETCHER_MODULE;
- s2 %= Fletcher32Context.FLETCHER_MODULE;
+ s1 %= Fletcher32Context.FletcherModule;
+ s2 %= Fletcher32Context.FletcherModule;
}
/*
@@ -174,9 +174,9 @@ static class Ssse3
while(len-- != 0) s2 += s1 += buf[bufPos++];
- if(s1 >= Fletcher32Context.FLETCHER_MODULE) s1 -= Fletcher32Context.FLETCHER_MODULE;
+ if(s1 >= Fletcher32Context.FletcherModule) s1 -= Fletcher32Context.FletcherModule;
- s2 %= Fletcher32Context.FLETCHER_MODULE;
+ s2 %= Fletcher32Context.FletcherModule;
}
/*
diff --git a/Aaru.Checksums/FletcherContext.cs b/Aaru.Checksums/FletcherContext.cs
index ba19742a0..46c9696ab 100644
--- a/Aaru.Checksums/FletcherContext.cs
+++ b/Aaru.Checksums/FletcherContext.cs
@@ -52,8 +52,8 @@ namespace Aaru.Checksums;
[SuppressMessage("ReSharper", "UnusedMember.Global")]
public sealed partial class Fletcher32Context : IChecksum
{
- internal const ushort FLETCHER_MODULE = 0xFFFF;
- internal const uint NMAX = 5552;
+ internal const ushort FletcherModule = 0xFFFF;
+ internal const uint Nmax = 5552;
readonly IntPtr _nativeContext;
readonly bool _useNative;
ushort _sum1, _sum2;
@@ -175,11 +175,11 @@ public sealed partial class Fletcher32Context : IChecksum
{
sum1 += data[dataOff];
- if(sum1 >= FLETCHER_MODULE) sum1 -= FLETCHER_MODULE;
+ if(sum1 >= FletcherModule) sum1 -= FletcherModule;
sum2 += sum1;
- if(sum2 >= FLETCHER_MODULE) sum2 -= FLETCHER_MODULE;
+ if(sum2 >= FletcherModule) sum2 -= FletcherModule;
previousSum1 = (ushort)(sum1 & 0xFFFF);
previousSum2 = (ushort)(sum2 & 0xFFFF);
@@ -195,9 +195,9 @@ public sealed partial class Fletcher32Context : IChecksum
sum2 += sum1;
}
- if(sum1 >= FLETCHER_MODULE) sum1 -= FLETCHER_MODULE;
+ if(sum1 >= FletcherModule) sum1 -= FletcherModule;
- sum2 %= FLETCHER_MODULE; /* only added so many FLETCHER_MODULE's */
+ sum2 %= FletcherModule; /* only added so many FLETCHER_MODULE's */
previousSum1 = (ushort)(sum1 & 0xFFFF);
previousSum2 = (ushort)(sum2 & 0xFFFF);
@@ -206,10 +206,10 @@ public sealed partial class Fletcher32Context : IChecksum
}
/* do length NMAX blocks -- requires just one modulo operation */
- while(len >= NMAX)
+ while(len >= Nmax)
{
- len -= NMAX;
- uint n = NMAX / 16;
+ len -= Nmax;
+ uint n = Nmax / 16;
do
{
@@ -250,8 +250,8 @@ public sealed partial class Fletcher32Context : IChecksum
dataOff += 16;
} while(--n != 0);
- sum1 %= FLETCHER_MODULE;
- sum2 %= FLETCHER_MODULE;
+ sum1 %= FletcherModule;
+ sum2 %= FletcherModule;
}
/* do remaining bytes (less than NMAX, still just one modulo) */
@@ -303,8 +303,8 @@ public sealed partial class Fletcher32Context : IChecksum
sum2 += sum1;
}
- sum1 %= FLETCHER_MODULE;
- sum2 %= FLETCHER_MODULE;
+ sum1 %= FletcherModule;
+ sum2 %= FletcherModule;
}
previousSum1 = (ushort)(sum1 & 0xFFFF);
diff --git a/Aaru.Core/ArchiveInfo.cs b/Aaru.Core/ArchiveInfo.cs
index d63853e0d..d0a7efe85 100644
--- a/Aaru.Core/ArchiveInfo.cs
+++ b/Aaru.Core/ArchiveInfo.cs
@@ -40,8 +40,6 @@ namespace Aaru.Core;
/// Image information operations
public static class ArchiveInfo
{
- const string MODULE_NAME = "Archive information";
-
/// Prints archive information to console
/// Archive
public static void PrintArchiveInfo(IArchive imageFormat, IFilter filter, Encoding encoding)
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
index 4db667707..bf0aceeb3 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs
@@ -67,52 +67,52 @@ sealed partial class Dump
/// Dumps a compact disc
void CompactDisc()
{
- ExtentsULong audioExtents; // Extents with audio sectors
- ulong blocks; // Total number of positive sectors
- uint blockSize; // Size of the read sector in bytes
- CdOffset cdOffset; // Read offset from database
- byte[] cmdBuf; // Data buffer
- DumpHardware currentTry = null; // Current dump hardware try
- double currentSpeed = 0; // Current read speed
- int? discOffset = null; // Disc write offset
- ExtentsULong extents = null; // Extents
- bool hiddenData; // Hidden track is data
- IbgLog ibgLog; // IMGBurn log
- double imageWriteDuration = 0; // Duration of image write
- long lastSector; // Last sector number
+ ExtentsULong audioExtents; // Extents with audio sectors
+ ulong blocks; // Total number of positive sectors
+ uint blockSize; // Size of the read sector in bytes
+ CdOffset cdOffset; // Read offset from database
+ byte[] cmdBuf; // Data buffer
+ DumpHardware currentTry = null; // Current dump hardware try
+ double currentSpeed = 0; // Current read speed
+ int? discOffset = null; // Disc write offset
+ ExtentsULong extents = null; // Extents
+ bool hiddenData; // Hidden track is data
+ IbgLog ibgLog; // IMGBurn log
+ double imageWriteDuration = 0; // Duration of image write
+ long lastSector; // Last sector number
var leadOutExtents = new ExtentsULong(); // Lead-out extents
- Dictionary leadOutStarts = new(); // Lead-out starts
- double maxSpeed = double.MinValue; // Maximum speed
- MhddLog mhddLog; // MHDD log
- double minSpeed = double.MaxValue; // Minimum speed
- bool newTrim; // Is trim a new one?
- var offsetBytes = 0; // Read offset
- var read6 = false; // Device supports READ(6)
- var read10 = false; // Device supports READ(10)
- var read12 = false; // Device supports READ(12)
- var read16 = false; // Device supports READ(16)
- var readcd = true; // Device supports READ CD
- bool ret; // Image writing return status
- const uint sectorSize = 2352; // Full sector size
- var sectorsForOffset = 0; // Sectors needed to fix offset
- var sense = true; // Sense indicator
- int sessions; // Number of sessions in disc
- SubchannelLog subLog = null; // Subchannel log
- uint subSize = 0; // Subchannel size in bytes
- TrackSubchannelType subType = TrackSubchannelType.None; // Track subchannel type
- var supportsLongSectors = true; // Supports reading EDC and ECC
- bool supportsPqSubchannel; // Supports reading PQ subchannel
- bool supportsRwSubchannel; // Supports reading RW subchannel
- byte[] tmpBuf; // Temporary buffer
- FullTOC.CDFullTOC? toc; // Full CD TOC
- double totalDuration = 0; // Total commands duration
- Dictionary trackFlags = new(); // Track flags
- Track[] tracks; // Tracks in disc
- int firstTrackLastSession; // Number of first track in last session
- bool hiddenTrack; // Disc has a hidden track before track 1
- MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
- MmcSubchannel desiredSubchannel; // User requested subchannel
- var bcdSubchannel = false; // Subchannel positioning is in BCD
+ Dictionary leadOutStarts = new(); // Lead-out starts
+ double maxSpeed = double.MinValue; // Maximum speed
+ MhddLog mhddLog; // MHDD log
+ double minSpeed = double.MaxValue; // Minimum speed
+ bool newTrim; // Is trim a new one?
+ var offsetBytes = 0; // Read offset
+ var read6 = false; // Device supports READ(6)
+ var read10 = false; // Device supports READ(10)
+ var read12 = false; // Device supports READ(12)
+ var read16 = false; // Device supports READ(16)
+ var readcd = true; // Device supports READ CD
+ bool ret; // Image writing return status
+ const uint sectorSize = 2352; // Full sector size
+ var sectorsForOffset = 0; // Sectors needed to fix offset
+ var sense = true; // Sense indicator
+ int sessions; // Number of sessions in disc
+ SubchannelLog subLog = null; // Subchannel log
+ uint subSize = 0; // Subchannel size in bytes
+ TrackSubchannelType subType; // Track subchannel type
+ var supportsLongSectors = true; // Supports reading EDC and ECC
+ bool supportsPqSubchannel; // Supports reading PQ subchannel
+ bool supportsRwSubchannel; // Supports reading RW subchannel
+ byte[] tmpBuf; // Temporary buffer
+ FullTOC.CDFullTOC? toc; // Full CD TOC
+ double totalDuration = 0; // Total commands duration
+ Dictionary trackFlags = new(); // Track flags
+ Track[] tracks; // Tracks in disc
+ int firstTrackLastSession; // Number of first track in last session
+ bool hiddenTrack; // Disc has a hidden track before track 1
+ MmcSubchannel supportedSubchannel; // Drive's maximum supported subchannel
+ MmcSubchannel desiredSubchannel; // User requested subchannel
+ var bcdSubchannel = false; // Subchannel positioning is in BCD
Dictionary isrcs = new();
string mcn = null;
HashSet subchannelExtents = [];
@@ -375,13 +375,11 @@ sealed partial class Dump
UpdateStatus?.Invoke(Localization.Core.Drive_can_read_without_subchannel);
subSize = 0;
- subType = TrackSubchannelType.None;
break;
case MmcSubchannel.Raw:
_dumpLog.WriteLine(Localization.Core.Full_raw_subchannel_reading_supported);
UpdateStatus?.Invoke(Localization.Core.Full_raw_subchannel_reading_supported);
- subType = TrackSubchannelType.Raw;
subSize = 96;
break;
@@ -392,7 +390,6 @@ sealed partial class Dump
UpdateStatus?.Invoke(Localization.Core.WARNING_If_disc_says_CDG_CDEG_CDMIDI_dump_will_be_incorrect);
- subType = TrackSubchannelType.Q16;
subSize = 16;
break;
@@ -401,7 +398,8 @@ sealed partial class Dump
subType = desiredSubchannel switch
{
MmcSubchannel.None => TrackSubchannelType.None,
- MmcSubchannel.Raw or MmcSubchannel.Q16 => TrackSubchannelType.Raw
+ MmcSubchannel.Raw or MmcSubchannel.Q16 => TrackSubchannelType.Raw,
+ _ => throw new ArgumentOutOfRangeException()
};
blockSize = sectorSize + subSize;
@@ -1103,8 +1101,9 @@ sealed partial class Dump
foreach(int sub in _resume.BadSubchannels) subchannelExtents.Add(sub);
if(_resume.NextBlock < blocks)
- for(ulong i = _resume.NextBlock; i < blocks; i++)
- subchannelExtents.Add((int)i);
+ {
+ for(ulong i = _resume.NextBlock; i < blocks; i++) subchannelExtents.Add((int)i);
+ }
}
if(_resume.NextBlock > 0)
@@ -1593,8 +1592,9 @@ sealed partial class Dump
supportsLongSectors);
foreach(Tuple leadoutExtent in leadOutExtents.ToArray())
- for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++)
- subchannelExtents.Remove((int)e);
+ {
+ for(ulong e = leadoutExtent.Item1; e <= leadoutExtent.Item2; e++) subchannelExtents.Remove((int)e);
+ }
if(subchannelExtents.Count > 0 && _retryPasses > 0 && _retrySubchannel)
{
diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs
index 1c0e58d00..1e4a0abbf 100644
--- a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs
+++ b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs
@@ -145,7 +145,7 @@ partial class Dump
}
else
{
- if(dcMode6?.Pages != null)
+ if(dcMode6.Value.Pages != null)
{
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage => modePage is
{
@@ -469,8 +469,9 @@ partial class Dump
// MEDIUM ERROR, retry with ignore error below
if(decSense is { ASC: 0x11 })
- if(!sectorsNotEvenPartial.Contains(badSector))
- sectorsNotEvenPartial.Add(badSector);
+ {
+ if(!sectorsNotEvenPartial.Contains(badSector)) sectorsNotEvenPartial.Add(badSector);
+ }
}
// Because one block has been partially used to fix the offset
diff --git a/Aaru.Core/Devices/Dumping/SSC.cs b/Aaru.Core/Devices/Dumping/SSC.cs
index 036eb4d14..e686e9684 100644
--- a/Aaru.Core/Devices/Dumping/SSC.cs
+++ b/Aaru.Core/Devices/Dumping/SSC.cs
@@ -285,8 +285,9 @@ partial class Dump
Modes.DecodedMode? decMode = null;
if(!sense && !_dev.Error)
- if(Modes.DecodeMode10(cmdBuf, _dev.ScsiType).HasValue)
- decMode = Modes.DecodeMode10(cmdBuf, _dev.ScsiType);
+ {
+ if(Modes.DecodeMode10(cmdBuf, _dev.ScsiType).HasValue) decMode = Modes.DecodeMode10(cmdBuf, _dev.ScsiType);
+ }
UpdateStatus?.Invoke(Localization.Core.Requesting_MODE_SENSE_6);
@@ -314,8 +315,9 @@ partial class Dump
if(sense || _dev.Error) sense = _dev.ModeSense(out cmdBuf, out senseBuf, 5, out duration);
if(!sense && !_dev.Error)
- if(Modes.DecodeMode6(cmdBuf, _dev.ScsiType).HasValue)
- decMode = Modes.DecodeMode6(cmdBuf, _dev.ScsiType);
+ {
+ if(Modes.DecodeMode6(cmdBuf, _dev.ScsiType).HasValue) decMode = Modes.DecodeMode6(cmdBuf, _dev.ScsiType);
+ }
// TODO: Check partitions page
if(decMode.HasValue)
@@ -1249,7 +1251,7 @@ partial class Dump
var forward = false;
const bool runningPersistent = false;
- Modes.ModePage? currentModePage = null;
+ Modes.ModePage? currentModePage;
if(_persistent)
{
diff --git a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs
index 88ed80674..65d7a5599 100644
--- a/Aaru.Core/Devices/Dumping/Sbc/Dump.cs
+++ b/Aaru.Core/Devices/Dumping/Sbc/Dump.cs
@@ -94,7 +94,7 @@ partial class Dump
opticalDisc = dskType switch
{
MediaType.REV35 or MediaType.REV70 or MediaType.REV120 => false,
- _ => opticalDisc
+ _ => true
};
}
diff --git a/Aaru.Core/Devices/Dumping/Sbc/Error.cs b/Aaru.Core/Devices/Dumping/Sbc/Error.cs
index 1f44e0df9..f80397326 100644
--- a/Aaru.Core/Devices/Dumping/Sbc/Error.cs
+++ b/Aaru.Core/Devices/Dumping/Sbc/Error.cs
@@ -109,7 +109,7 @@ partial class Dump
}
else
{
- if(dcMode6?.Pages != null)
+ if(dcMode6.Value.Pages != null)
{
foreach(Modes.ModePage modePage in dcMode6.Value.Pages.Where(modePage => modePage is
{
diff --git a/Aaru.Core/ImageInfo.cs b/Aaru.Core/ImageInfo.cs
index 203ced6f4..842563af6 100644
--- a/Aaru.Core/ImageInfo.cs
+++ b/Aaru.Core/ImageInfo.cs
@@ -843,7 +843,7 @@ public static class ImageInfo
}
}
- if(imageFormat is IFluxImage fluxImage) AaruConsole.WriteLine(Localization.Core.Image_flux_captures);
+ if(imageFormat is IFluxImage) AaruConsole.WriteLine(Localization.Core.Image_flux_captures);
if(imageFormat is not IOpticalMediaImage opticalImage) return;
diff --git a/Aaru.Core/Remote.cs b/Aaru.Core/Remote.cs
index 5330bbc76..37768b8fd 100644
--- a/Aaru.Core/Remote.cs
+++ b/Aaru.Core/Remote.cs
@@ -124,8 +124,10 @@ public static class Remote
foreach(string migration in mctx.Database.GetPendingMigrations())
{
mctx.Database
+#pragma warning disable EF1002
.ExecuteSqlRaw($"INSERT INTO \"__EFMigrationsHistory\" (MigrationId, ProductVersion) VALUES ('{
migration}', '0.0.0')");
+#pragma warning restore EF1002
}
}
else
diff --git a/Aaru.Decoders/Localization/Localization.es.resx b/Aaru.Decoders/Localization/Localization.es.resx
index e6a84bfc2..1a9b82f99 100644
--- a/Aaru.Decoders/Localization/Localization.es.resx
+++ b/Aaru.Decoders/Localization/Localization.es.resx
@@ -8329,9 +8329,6 @@
La protección contra escritura está activada
-
-
- La protección contra escritura está activada
Valores completos del área de reserva: 0x{0:X2}
diff --git a/Aaru.Decoders/Localization/Localization.resx b/Aaru.Decoders/Localization/Localization.resx
index d140344c5..0bd5dd377 100644
--- a/Aaru.Decoders/Localization/Localization.resx
+++ b/Aaru.Decoders/Localization/Localization.resx
@@ -7453,9 +7453,6 @@
Port A link is down
-
-
- Port A uses Parallel SCSI Ultra-160 interface
Unknown port A transport type code {0}
diff --git a/Aaru.Decoders/PCMCIA/CIS.cs b/Aaru.Decoders/PCMCIA/CIS.cs
index a9878e115..663d51521 100644
--- a/Aaru.Decoders/PCMCIA/CIS.cs
+++ b/Aaru.Decoders/PCMCIA/CIS.cs
@@ -251,7 +251,7 @@ public static class CIS
continue;
}
- if(strings == null) strings = [];
+ strings ??= [];
strings.Add(StringHandlers.CToString(buffer.ToArray()));
buffer = [];
diff --git a/Aaru.Decoders/SCSI/Modes/0E.cs b/Aaru.Decoders/SCSI/Modes/0E.cs
index e7111e39b..4c0a8267b 100644
--- a/Aaru.Decoders/SCSI/Modes/0E.cs
+++ b/Aaru.Decoders/SCSI/Modes/0E.cs
@@ -130,7 +130,7 @@ public static partial class Modes
double blocks;
if(page.LBAFormat == 8)
- blocks = page.BlocksPerSecondOfAudio * (1 / 256);
+ blocks = page.BlocksPerSecondOfAudio * (1 / 256f);
else
blocks = page.BlocksPerSecondOfAudio;
diff --git a/Aaru.Decryption/DVD/CSS.cs b/Aaru.Decryption/DVD/CSS.cs
index 6c16ab63d..34132591f 100644
--- a/Aaru.Decryption/DVD/CSS.cs
+++ b/Aaru.Decryption/DVD/CSS.cs
@@ -912,8 +912,8 @@ public class CSS
for(i = 0; i < 4; i++)
{
- lfsr1Lo = lfsr0 & 0xff;
- lfsr0 = lfsr0 >> 8;
+ lfsr1Lo = lfsr0 & 0xff;
+ lfsr0 >>= 8;
for(uint j = 0; j < 256; j++)
{
diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs
index 405575de7..079e952ee 100644
--- a/Aaru.Devices/Device/MmcCommands/MMC.cs
+++ b/Aaru.Devices/Device/MmcCommands/MMC.cs
@@ -39,7 +39,7 @@ namespace Aaru.Devices;
public partial class Device
{
- protected static bool ReadMultipleBlockCannotSetBlockCount;
+ protected static bool _readMultipleBlockCannotSetBlockCount;
/// Reads the CSD register from a SecureDigital or MultiMediaCard device
/// Data buffer
@@ -212,7 +212,7 @@ public partial class Device
if(transferLength <= 1)
return ReadSingleBlock(out buffer, out response, lba, blockSize, byteAddressed, timeout, out duration);
- if(!ReadMultipleBlockCannotSetBlockCount)
+ if(!_readMultipleBlockCannotSetBlockCount)
{
sense = ReadMultipleBlock(out buffer,
out response,
@@ -224,7 +224,7 @@ public partial class Device
out duration);
}
- if(ReadMultipleBlockCannotSetBlockCount)
+ if(_readMultipleBlockCannotSetBlockCount)
{
return ReadMultipleUsingSingle(out buffer,
out response,
diff --git a/Aaru.Devices/Linux/Device.cs b/Aaru.Devices/Linux/Device.cs
index b0c1bbba9..ea6e68f79 100644
--- a/Aaru.Devices/Linux/Device.cs
+++ b/Aaru.Devices/Linux/Device.cs
@@ -96,7 +96,7 @@ partial class Device : Devices.Device
}
// Seems ioctl(2) does not allow the atomicity needed
- if(dev.PlatformId == PlatformID.Linux) ReadMultipleBlockCannotSetBlockCount = true;
+ if(dev.PlatformId == PlatformID.Linux) _readMultipleBlockCannotSetBlockCount = true;
dev.Type = DeviceType.Unknown;
dev.ScsiType = PeripheralDeviceTypes.UnknownDevice;
diff --git a/Aaru.Devices/Remote/Device.cs b/Aaru.Devices/Remote/Device.cs
index 675fcc8db..fbc261a19 100644
--- a/Aaru.Devices/Remote/Device.cs
+++ b/Aaru.Devices/Remote/Device.cs
@@ -132,7 +132,7 @@ public sealed partial class Device : Devices.Device
return null;
}
- if(dev._remote.ServerOperatingSystem == "Linux") ReadMultipleBlockCannotSetBlockCount = true;
+ if(dev._remote.ServerOperatingSystem == "Linux") _readMultipleBlockCannotSetBlockCount = true;
dev.Type = DeviceType.Unknown;
dev.ScsiType = PeripheralDeviceTypes.UnknownDevice;
diff --git a/Aaru.Filesystems/LisaFS/File.cs b/Aaru.Filesystems/LisaFS/File.cs
index b7c1f86ce..9e968a8ad 100644
--- a/Aaru.Filesystems/LisaFS/File.cs
+++ b/Aaru.Filesystems/LisaFS/File.cs
@@ -219,9 +219,8 @@ public sealed partial class LisaFS
if(!_mounted || !_debug) return ErrorNumber.AccessDenied;
if(fileId is > 4 or <= 0)
- {
- if(fileId != FILEID_BOOT_SIGNED && fileId != FILEID_LOADER_SIGNED) return ErrorNumber.InvalidArgument;
- }
+ if(fileId != FILEID_BOOT_SIGNED && fileId != FILEID_LOADER_SIGNED)
+ return ErrorNumber.InvalidArgument;
if(_systemFileCache.TryGetValue(fileId, out buf) && !tags) return ErrorNumber.NoError;
@@ -306,6 +305,7 @@ public sealed partial class LisaFS
if(fileId <= 4)
{
if(!_debug || fileId == 0) return ErrorNumber.NoSuchFile;
+
stat = new FileEntryInfo();
error = GetAttributes(fileId, out FileAttributes attrs);
@@ -435,9 +435,8 @@ public sealed partial class LisaFS
if(!tags)
{
if(_fileSizeCache.TryGetValue(fileId, out int realSize))
- {
- if(realSize > temp.Length) AaruConsole.ErrorWriteLine(Localization.File_0_gets_truncated, fileId);
- }
+ if(realSize > temp.Length)
+ AaruConsole.ErrorWriteLine(Localization.File_0_gets_truncated, fileId);
buf = temp;
diff --git a/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs b/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs
index 761940026..a939d53bd 100644
--- a/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs
+++ b/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs
@@ -149,8 +149,10 @@ public sealed class SplashWindowViewModel(SplashWindow view) : ViewModelBase
foreach(string migration in ctx.Database.GetPendingMigrations())
{
ctx.Database
+#pragma warning disable EF1002
.ExecuteSqlRaw($"INSERT INTO \"__EFMigrationsHistory\" (MigrationId, ProductVersion) VALUES ('{
migration}', '0.0.0')");
+#pragma warning restore EF1002
}
ctx.SaveChanges();
diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs
index af0bb7a81..1bf370106 100644
--- a/Aaru.Images/AaruFormat/Write.cs
+++ b/Aaru.Images/AaruFormat/Write.cs
@@ -1926,9 +1926,8 @@ public sealed partial class AaruFormat
// Fill FLAC block
if(remaining != 0)
- {
- for(var r = 0; r < remaining * 4; r++) _writingBuffer[_writingBufferPosition + r] = 0;
- }
+ for(var r = 0; r < remaining * 4; r++)
+ _writingBuffer[_writingBufferPosition + r] = 0;
compressedLength = FLAC.EncodeBuffer(_writingBuffer,
_compressedBuffer,
@@ -2720,9 +2719,8 @@ public sealed partial class AaruFormat
// Fill FLAC block
if(remaining != 0)
- {
- for(var r = 0; r < remaining * 4; r++) _writingBuffer[_writingBufferPosition + r] = 0;
- }
+ for(var r = 0; r < remaining * 4; r++)
+ _writingBuffer[_writingBufferPosition + r] = 0;
compressedLength = FLAC.EncodeBuffer(_writingBuffer,
_compressedBuffer,
@@ -5262,8 +5260,7 @@ public sealed partial class AaruFormat
foreach(IndexEntry entry in _index)
{
_structureBytes = new byte[Marshal.SizeOf()];
- IndexEntry indexEntry = entry;
- MemoryMarshal.Write(_structureBytes, in indexEntry);
+ MemoryMarshal.Write(_structureBytes, in entry);
blockStream.Write(_structureBytes, 0, _structureBytes.Length);
}
diff --git a/Aaru.Images/ByteAddressable/MasterSystem.cs b/Aaru.Images/ByteAddressable/MasterSystem.cs
index 53442426c..ca2459e61 100644
--- a/Aaru.Images/ByteAddressable/MasterSystem.cs
+++ b/Aaru.Images/ByteAddressable/MasterSystem.cs
@@ -92,7 +92,7 @@ public class MasterSystem : IByteAddressableImage
// Not sure but seems to be a multiple of at least this, maybe more
if(stream.Length % 8192 != 0) return ErrorNumber.InvalidArgument;
- var headerPosition = 0;
+ int headerPosition;
stream.Position = 0x7ff0;
var magicBytes = new byte[8];
diff --git a/Aaru.Images/DiskCopy42/Read.cs b/Aaru.Images/DiskCopy42/Read.cs
index 276e8dc87..0a74d51fe 100644
--- a/Aaru.Images/DiskCopy42/Read.cs
+++ b/Aaru.Images/DiskCopy42/Read.cs
@@ -235,8 +235,7 @@ public sealed partial class DiskCopy42
<= 28 => 18,
<= 34 => 17,
<= 41 => 16,
- <= 45 => 15,
- _ => sectorsToCopy
+ <= 45 => 15
};
Array.Copy(data,
diff --git a/Aaru.Images/DiskCopy42/Write.cs b/Aaru.Images/DiskCopy42/Write.cs
index 379299c05..86e4150c1 100644
--- a/Aaru.Images/DiskCopy42/Write.cs
+++ b/Aaru.Images/DiskCopy42/Write.cs
@@ -423,9 +423,9 @@ public sealed partial class DiskCopy42
}
///
- public bool SetImageInfo(ImageInfo imageInfo)
+ public bool SetImageInfo(ImageInfo info)
{
- header.DiskName = imageInfo.MediaTitle ?? "-Aaru converted image-";
+ header.DiskName = info.MediaTitle ?? "-Aaru converted image-";
return true;
}
diff --git a/Aaru.Images/KryoFlux/Read.cs b/Aaru.Images/KryoFlux/Read.cs
index 3d7612e9d..8232b50b3 100644
--- a/Aaru.Images/KryoFlux/Read.cs
+++ b/Aaru.Images/KryoFlux/Read.cs
@@ -93,10 +93,9 @@ public sealed partial class KryoFlux
if(!File.Exists(trackfile))
{
- if(cylinder == 0)
+ switch(cylinder)
{
- if(head == 0)
- {
+ case 0 when head == 0:
AaruConsole.DebugWriteLine(MODULE_NAME,
Localization
.Cannot_find_cyl_0_hd_0_supposing_only_top_head_was_dumped);
@@ -105,24 +104,21 @@ public sealed partial class KryoFlux
heads = 1;
continue;
- }
+ case 0:
+ AaruConsole.DebugWriteLine(MODULE_NAME,
+ Localization
+ .Cannot_find_cyl_0_hd_1_supposing_only_bottom_head_was_dumped);
- AaruConsole.DebugWriteLine(MODULE_NAME,
- Localization
- .Cannot_find_cyl_0_hd_1_supposing_only_bottom_head_was_dumped);
+ heads = 1;
- heads = 1;
+ continue;
+ case 1:
+ AaruConsole.DebugWriteLine(MODULE_NAME,
+ Localization.Cannot_find_cyl_1_supposing_double_stepping);
- continue;
- }
+ step = 2;
- if(cylinder == 1)
- {
- AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Cannot_find_cyl_1_supposing_double_stepping);
-
- step = 2;
-
- continue;
+ continue;
}
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Arrived_end_of_disk_at_cylinder_0, cylinder);
diff --git a/Aaru.Images/Localization/Localization.es.resx b/Aaru.Images/Localization/Localization.es.resx
index ac9255866..56ef84e1b 100644
--- a/Aaru.Images/Localization/Localization.es.resx
+++ b/Aaru.Images/Localization/Localization.es.resx
@@ -2949,4 +2949,7 @@
Crear una imagen dinámica, los sectores vacíos se ignoran
+
+ A2R
+
\ No newline at end of file
diff --git a/Aaru.Localization/Core.es.resx b/Aaru.Localization/Core.es.resx
index 637569d58..a36d0c8ed 100644
--- a/Aaru.Localization/Core.es.resx
+++ b/Aaru.Localization/Core.es.resx
@@ -942,9 +942,6 @@
Volcar discos de Xbox requiere una unidad con firmware Kreon.
-
-
- Volcar discos de Xbox requiere una unidad con firmware Kreon.
El formato de salida no soporta ATA IDENTIFY.
diff --git a/Aaru.Localization/UI.es.resx b/Aaru.Localization/UI.es.resx
index c76a10646..d6e69b21a 100644
--- a/Aaru.Localization/UI.es.resx
+++ b/Aaru.Localization/UI.es.resx
@@ -3026,4 +3026,7 @@ Probadores:
Excepción
+
+ CD PMA:
+
\ No newline at end of file
diff --git a/Aaru.Partitions/Atari.cs b/Aaru.Partitions/Atari.cs
index 49d653655..c4fcebe58 100644
--- a/Aaru.Partitions/Atari.cs
+++ b/Aaru.Partitions/Atari.cs
@@ -217,25 +217,23 @@ public sealed class AtariPartitions : IPartition
Offset = table.Entries[i].Start * sectorSize,
Start = table.Entries[i].Start,
Type = Encoding.ASCII.GetString(partType),
- Scheme = Name
+ Scheme = Name,
+ Description = type switch
+ {
+ TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
+ TYPE_BIG_GEMDOS => Localization.Atari_GEMDOS_partition_bigger_than_32_MiB,
+ TYPE_LINUX => Localization.Linux_partition,
+ TYPE_SWAP => Localization.Swap_partition,
+ TYPE_RAW => Localization.RAW_partition,
+ TYPE_NETBSD => Localization.NetBSD_partition,
+ TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
+ TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
+ TYPE_MAC => Localization.Macintosh_partition,
+ TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
+ _ => Localization.Unknown_partition_type
+ }
};
- part.Description = type switch
- {
- TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
- TYPE_BIG_GEMDOS => Localization
- .Atari_GEMDOS_partition_bigger_than_32_MiB,
- TYPE_LINUX => Localization.Linux_partition,
- TYPE_SWAP => Localization.Swap_partition,
- TYPE_RAW => Localization.RAW_partition,
- TYPE_NETBSD => Localization.NetBSD_partition,
- TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
- TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
- TYPE_MAC => Localization.Macintosh_partition,
- TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
- _ => Localization.Unknown_partition_type
- };
-
partitions.Add(part);
partitionSequence++;
}
@@ -308,25 +306,23 @@ public sealed class AtariPartitions : IPartition
Offset = extendedTable.Entries[j].Start * sectorSize,
Start = extendedTable.Entries[j].Start,
Type = Encoding.ASCII.GetString(partType),
- Scheme = Name
+ Scheme = Name,
+ Description = extendedType switch
+ {
+ TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
+ TYPE_BIG_GEMDOS => Localization.Atari_GEMDOS_partition_bigger_than_32_MiB,
+ TYPE_LINUX => Localization.Linux_partition,
+ TYPE_SWAP => Localization.Swap_partition,
+ TYPE_RAW => Localization.RAW_partition,
+ TYPE_NETBSD => Localization.NetBSD_partition,
+ TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
+ TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
+ TYPE_MAC => Localization.Macintosh_partition,
+ TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
+ _ => Localization.Unknown_partition_type
+ }
};
- part.Description = extendedType switch
- {
- TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
- TYPE_BIG_GEMDOS => Localization
- .Atari_GEMDOS_partition_bigger_than_32_MiB,
- TYPE_LINUX => Localization.Linux_partition,
- TYPE_SWAP => Localization.Swap_partition,
- TYPE_RAW => Localization.RAW_partition,
- TYPE_NETBSD => Localization.NetBSD_partition,
- TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
- TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
- TYPE_MAC => Localization.Macintosh_partition,
- TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
- _ => Localization.Unknown_partition_type
- };
-
partitions.Add(part);
partitionSequence++;
}
@@ -377,24 +373,23 @@ public sealed class AtariPartitions : IPartition
Offset = table.IcdEntries[i].Start * sectorSize,
Start = table.IcdEntries[i].Start,
Type = Encoding.ASCII.GetString(partType),
- Scheme = Name
+ Scheme = Name,
+ Description = type switch
+ {
+ TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
+ TYPE_BIG_GEMDOS => Localization.Atari_GEMDOS_partition_bigger_than_32_MiB,
+ TYPE_LINUX => Localization.Linux_partition,
+ TYPE_SWAP => Localization.Swap_partition,
+ TYPE_RAW => Localization.RAW_partition,
+ TYPE_NETBSD => Localization.NetBSD_partition,
+ TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
+ TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
+ TYPE_MAC => Localization.Macintosh_partition,
+ TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
+ _ => Localization.Unknown_partition_type
+ }
};
- part.Description = type switch
- {
- TYPE_GEMDOS => Localization.Atari_GEMDOS_partition,
- TYPE_BIG_GEMDOS => Localization.Atari_GEMDOS_partition_bigger_than_32_MiB,
- TYPE_LINUX => Localization.Linux_partition,
- TYPE_SWAP => Localization.Swap_partition,
- TYPE_RAW => Localization.RAW_partition,
- TYPE_NETBSD => Localization.NetBSD_partition,
- TYPE_NETBSD_SWAP => Localization.NetBSD_swap_partition,
- TYPE_SYSTEM_V => Localization.Atari_UNIX_partition,
- TYPE_MAC => Localization.Macintosh_partition,
- TYPE_MINIX or TYPE_MINIX2 => Localization.MINIX_partition,
- _ => Localization.Unknown_partition_type
- };
-
partitions.Add(part);
partitionSequence++;
}
diff --git a/Aaru/Main.cs b/Aaru/Main.cs
index e080519a2..cf60e17fb 100644
--- a/Aaru/Main.cs
+++ b/Aaru/Main.cs
@@ -137,8 +137,10 @@ class MainClass
foreach(string migration in ctx.Database.GetPendingMigrations())
{
ctx.Database
+#pragma warning disable EF1002
.ExecuteSqlRaw($"INSERT INTO \"__EFMigrationsHistory\" (MigrationId, ProductVersion) VALUES ('{
migration}', '0.0.0')");
+#pragma warning restore EF1002
}
ctx.SaveChanges();