diff --git a/Aaru.Core/Devices/Report/PCMCIA.cs b/Aaru.Core/Devices/Report/PCMCIA.cs
index 728c9b895..f24322df2 100644
--- a/Aaru.Core/Devices/Report/PCMCIA.cs
+++ b/Aaru.Core/Devices/Report/PCMCIA.cs
@@ -32,6 +32,7 @@
using Aaru.CommonTypes.Metadata;
using Aaru.Decoders.PCMCIA;
+using Tuple = Aaru.Decoders.PCMCIA.Tuple;
namespace Aaru.Core.Devices.Report;
diff --git a/Aaru.Core/Error.cs b/Aaru.Core/Error.cs
index 18d2e50f8..b2ca80dd3 100644
--- a/Aaru.Core/Error.cs
+++ b/Aaru.Core/Error.cs
@@ -31,6 +31,7 @@
// ****************************************************************************/
using Aaru.CommonTypes.Interop;
+using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
namespace Aaru.Core;
diff --git a/Aaru.Core/Sidecar/Files.cs b/Aaru.Core/Sidecar/Files.cs
index 4d6a99895..2a1047ce5 100644
--- a/Aaru.Core/Sidecar/Files.cs
+++ b/Aaru.Core/Sidecar/Files.cs
@@ -38,6 +38,8 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Console;
+using Directory = Aaru.CommonTypes.AaruMetadata.Directory;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Core;
diff --git a/Aaru.Database/Context.cs b/Aaru.Database/Context.cs
index 10633bc1c..ce66719ea 100644
--- a/Aaru.Database/Context.cs
+++ b/Aaru.Database/Context.cs
@@ -32,6 +32,8 @@
using Aaru.Database.Models;
using Microsoft.EntityFrameworkCore;
+using OperatingSystem = Aaru.Database.Models.OperatingSystem;
+using Version = Aaru.Database.Models.Version;
namespace Aaru.Database;
diff --git a/Aaru.Decryption/DVD/CSS.cs b/Aaru.Decryption/DVD/CSS.cs
index 101e78e54..3bb70ded6 100644
--- a/Aaru.Decryption/DVD/CSS.cs
+++ b/Aaru.Decryption/DVD/CSS.cs
@@ -51,6 +51,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Decoders.DVD;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Decryption.DVD;
@@ -431,36 +432,36 @@ public class CSS
/// The encrypted key.
public static void EncryptKey(DvdCssKeyType keyType, uint variant, byte[] challenge, out byte[] key)
{
- var bits = new byte[30];
- var scratch = new byte[10];
- byte index = sizeof(byte) * 30;
- var temp1 = new byte[5];
- var temp2 = new byte[5];
- byte carry = 0;
+ byte[] bits = new byte[30];
+ byte[] scratch = new byte[10];
+ byte index = sizeof(byte) * 30;
+ byte[] temp1 = new byte[5];
+ byte[] temp2 = new byte[5];
+ byte carry = 0;
key = new byte[5];
- for(var i = 9; i >= 0; --i) scratch[i] = challenge[_permutationChallenge[(uint)keyType, i]];
+ for(int i = 9; i >= 0; --i) scratch[i] = challenge[_permutationChallenge[(uint)keyType, i]];
- var cssVariant = (byte)(keyType == 0 ? variant : _permutationVariant[(uint)keyType - 1, variant]);
+ byte cssVariant = (byte)(keyType == 0 ? variant : _permutationVariant[(uint)keyType - 1, variant]);
- for(var i = 5; --i >= 0;) temp1[i] = (byte)(scratch[5 + i] ^ _secret[i] ^ _encryptTable2[i]);
+ for(int i = 5; --i >= 0;) temp1[i] = (byte)(scratch[5 + i] ^ _secret[i] ^ _encryptTable2[i]);
- var lfsr0 = (uint)(temp1[0] << 17 | temp1[1] << 9 | (temp1[2] & ~7) << 1 | 8 | temp1[2] & 7);
- var lfsr1 = (uint)(temp1[3] << 9 | 0x100 | temp1[4]);
+ uint lfsr0 = (uint)(temp1[0] << 17 | temp1[1] << 9 | (temp1[2] & ~7) << 1 | 8 | temp1[2] & 7);
+ uint lfsr1 = (uint)(temp1[3] << 9 | 0x100 | temp1[4]);
do
{
byte val = 0;
- for(var bit = 0; bit < 8; ++bit)
+ for(int bit = 0; bit < 8; ++bit)
{
- var oLfsr0 = (byte)((lfsr0 >> 24 ^ lfsr0 >> 21 ^ lfsr0 >> 20 ^ lfsr0 >> 12) & 1);
+ byte oLfsr0 = (byte)((lfsr0 >> 24 ^ lfsr0 >> 21 ^ lfsr0 >> 20 ^ lfsr0 >> 12) & 1);
lfsr0 = lfsr0 << 1 | oLfsr0;
- var oLfsr1 = (byte)((lfsr1 >> 16 ^ lfsr1 >> 2) & 1);
+ byte oLfsr1 = (byte)((lfsr1 >> 16 ^ lfsr1 >> 2) & 1);
lfsr1 = lfsr1 << 1 | oLfsr1;
- var combined = (byte)(Convert.ToByte(oLfsr1 == 0) + carry + Convert.ToByte(oLfsr0 == 0));
+ byte combined = (byte)(Convert.ToByte(oLfsr1 == 0) + carry + Convert.ToByte(oLfsr0 == 0));
carry = (byte)(combined >> 1 & 1);
val |= (byte)((combined & 1) << bit);
}
@@ -468,10 +469,10 @@ public class CSS
bits[--index] = val;
} while(index > 0);
- var cse = (byte)(_variants[cssVariant] ^ _encryptTable2[cssVariant]);
- var term = 0;
+ byte cse = (byte)(_variants[cssVariant] ^ _encryptTable2[cssVariant]);
+ int term = 0;
- for(var i = 5; --i >= 0; term = scratch[i])
+ for(int i = 5; --i >= 0; term = scratch[i])
{
index = (byte)(bits[25 + i] ^ scratch[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -482,7 +483,7 @@ public class CSS
temp1[4] ^= temp1[0];
term = 0;
- for(var i = 5; --i >= 0; term = temp1[i])
+ for(int i = 5; --i >= 0; term = temp1[i])
{
index = (byte)(bits[20 + i] ^ temp1[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -493,7 +494,7 @@ public class CSS
temp2[4] ^= temp2[0];
term = 0;
- for(var i = 5; --i >= 0; term = temp2[i])
+ for(int i = 5; --i >= 0; term = temp2[i])
{
index = (byte)(bits[15 + i] ^ temp2[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -505,7 +506,7 @@ public class CSS
temp1[4] ^= temp1[0];
term = 0;
- for(var i = 5; --i >= 0; term = temp1[i])
+ for(int i = 5; --i >= 0; term = temp1[i])
{
index = (byte)(bits[10 + i] ^ temp1[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -517,7 +518,7 @@ public class CSS
temp2[4] ^= temp2[0];
term = 0;
- for(var i = 5; --i >= 0; term = temp2[i])
+ for(int i = 5; --i >= 0; term = temp2[i])
{
index = (byte)(bits[5 + i] ^ temp2[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -528,7 +529,7 @@ public class CSS
temp1[4] ^= temp1[0];
term = 0;
- for(var i = 5; --i >= 0; term = temp1[i])
+ for(int i = 5; --i >= 0; term = temp1[i])
{
index = (byte)(bits[i] ^ temp1[i]);
index = (byte)(_encryptTable1[index] ^ ~_encryptTable2[index] ^ cse);
@@ -545,12 +546,12 @@ public class CSS
static void DecryptKey(byte invert, byte[] cryptoKey, byte[] encryptedKey, out byte[] decryptedKey)
{
decryptedKey = new byte[5];
- var k = new byte[5];
+ byte[] k = new byte[5];
- var lfsr1Lo = (uint)(cryptoKey[0] | 0x100);
+ uint lfsr1Lo = (uint)(cryptoKey[0] | 0x100);
uint lfsr1Hi = cryptoKey[1];
- var lfsr0 = (uint)((cryptoKey[4] << 17 | cryptoKey[3] << 9 | cryptoKey[2] << 1) + 8 - (cryptoKey[2] & 7));
+ uint lfsr0 = (uint)((cryptoKey[4] << 17 | cryptoKey[3] << 9 | cryptoKey[2] << 1) + 8 - (cryptoKey[2] & 7));
lfsr0 = (uint)(_cssTable4[lfsr0 & 0xff] << 24 |
_cssTable4[lfsr0 >> 8 & 0xff] << 16 |
@@ -561,11 +562,11 @@ public class CSS
for(uint i = 0; i < 5; i++)
{
- var oLfsr1 = (byte)(_cssTable2[lfsr1Hi] ^ _cssTable3[lfsr1Lo]);
+ byte oLfsr1 = (byte)(_cssTable2[lfsr1Hi] ^ _cssTable3[lfsr1Lo]);
lfsr1Hi = lfsr1Lo >> 1;
lfsr1Lo = (lfsr1Lo & 1) << 8 ^ oLfsr1;
oLfsr1 = _cssTable4[oLfsr1];
- var oLfsr0 = (byte)((((lfsr0 >> 8 ^ lfsr0) >> 1 ^ lfsr0) >> 3 ^ lfsr0) >> 7);
+ byte oLfsr0 = (byte)((((lfsr0 >> 8 ^ lfsr0) >> 1 ^ lfsr0) >> 3 ^ lfsr0) >> 7);
lfsr0 = lfsr0 >> 8 | (uint)oLfsr0 << 24;
combined += (uint)((oLfsr0 ^ invert) + oLfsr1);
k[i] = (byte)(combined & 0xff);
@@ -631,7 +632,7 @@ public class CSS
if(cmiData != null && cmiData.All(static cmi => (cmi & 0x80) >> 7 == 0) || keyData.All(static k => k == 0))
return sectorData;
- var decryptedBuffer = new byte[sectorData.Length];
+ byte[] decryptedBuffer = new byte[sectorData.Length];
for(uint i = 0; i < blocks; i++)
{
@@ -669,7 +670,7 @@ public class CSS
if(cmiData != null && cmiData.All(static cmi => (cmi & 0x80) >> 7 == 0) || keyData.All(static k => k == 0))
return sectorData;
- var decryptedBuffer = new byte[sectorData.Length];
+ byte[] decryptedBuffer = new byte[sectorData.Length];
for(uint i = 0; i < blocks; i++)
{
@@ -824,7 +825,7 @@ public class CSS
// If we found an adequate pattern.
if(bestPattern <= 0 || bestPatternLength <= 3 || bestPatternLength / bestPattern < 2) return false;
- var offset = (int)(0x80 - bestPatternLength / bestPattern * bestPattern);
+ int offset = (int)(0x80 - bestPatternLength / bestPattern * bestPattern);
int result = RecoverTitleKey(0,
sector.Skip(0x80).Take(sector.Length - 0x80).ToArray(),
@@ -848,10 +849,10 @@ public class CSS
static int RecoverTitleKey(uint start, byte[] encryptedBytes, byte[] decryptedBytes, byte[] sectorSeed,
out byte[] key)
{
- var buffer = new byte[10];
- long iTry;
- uint i;
- int exit = -1;
+ byte[] buffer = new byte[10];
+ long iTry;
+ uint i;
+ int exit = -1;
key = new byte[5];
for(i = 0; i < 10; i++) buffer[i] = (byte)(_cssTable1[encryptedBytes[i]] ^ decryptedBytes[i]);
@@ -959,7 +960,7 @@ public class CSS
/// The title key.
static byte[] FindTitleKey(IOpticalMediaImage input, ulong startSector, ulong sectorsToSearch = 20000)
{
- var titleKey = new byte[5];
+ byte[] titleKey = new byte[5];
for(ulong i = 0; i < sectorsToSearch; i++)
{
@@ -984,7 +985,7 @@ public class CSS
public static byte[] GenerateTitleKeys(IOpticalMediaImage input, List partitions, ulong trackSectors,
IReadOnlyFilesystem fs)
{
- var keys = new byte[trackSectors * 5];
+ byte[] keys = new byte[trackSectors * 5];
foreach(Partition partition in partitions)
{
diff --git a/Aaru.Devices/Device/Variables.cs b/Aaru.Devices/Device/Variables.cs
index 7513ade5c..b82e6a168 100644
--- a/Aaru.Devices/Device/Variables.cs
+++ b/Aaru.Devices/Device/Variables.cs
@@ -31,8 +31,8 @@
// ****************************************************************************/
using Aaru.CommonTypes.Enums;
-using Aaru.CommonTypes.Interop;
using Aaru.CommonTypes.Structs.Devices.SCSI;
+using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
namespace Aaru.Devices;
diff --git a/Aaru.Dto/Aaru.Dto.csproj b/Aaru.Dto/Aaru.Dto.csproj
index 8d71c81e1..45b77c5d3 100644
--- a/Aaru.Dto/Aaru.Dto.csproj
+++ b/Aaru.Dto/Aaru.Dto.csproj
@@ -6,16 +6,7 @@
Library
Aaru.Dto
Aaru.Dto
- $(Version)
- true
- 6.0.0-alpha10
- Claunia.com
- Copyright © 2011-2025 Natalia Portillo
- Aaru Data Preservation Suite
Aaru.Dto
- $(Version)
- net10.0
- latest
Data transfer objects used to interchange data between Aaru and Aaru.Server.
https://github.com/aaru-dps/
LGPL-2.1-only
@@ -26,8 +17,6 @@
true
snupkg
Natalia Portillo <claunia@claunia.com>
- true
- true
CS1591;CS1574
@@ -46,46 +35,6 @@
LICENSE.LGPL
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
diff --git a/Aaru.Filesystems/AppleDOS/Super.cs b/Aaru.Filesystems/AppleDOS/Super.cs
index 23a8cc7c2..f6007670a 100644
--- a/Aaru.Filesystems/AppleDOS/Super.cs
+++ b/Aaru.Filesystems/AppleDOS/Super.cs
@@ -30,11 +30,11 @@ using System.Collections.Generic;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Console;
using Aaru.Helpers;
using Claunia.Encoding;
using Encoding = System.Text.Encoding;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/AppleMFS/Super.cs b/Aaru.Filesystems/AppleMFS/Super.cs
index 3e2ca094d..355f13b84 100644
--- a/Aaru.Filesystems/AppleMFS/Super.cs
+++ b/Aaru.Filesystems/AppleMFS/Super.cs
@@ -32,8 +32,8 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Helpers;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -84,7 +84,7 @@ public sealed partial class AppleMFS
_volMdb.drNxtFNum = BigEndianBitConverter.ToUInt32(_mdbBlocks, 0x01E);
_volMdb.drFreeBks = BigEndianBitConverter.ToUInt16(_mdbBlocks, 0x022);
_volMdb.drVNSiz = _mdbBlocks[0x024];
- var variableSize = new byte[_volMdb.drVNSiz + 1];
+ byte[] variableSize = new byte[_volMdb.drVNSiz + 1];
Array.Copy(_mdbBlocks, 0x024, variableSize, 0, _volMdb.drVNSiz + 1);
_volMdb.drVN = StringHandlers.PascalToString(variableSize, _encoding);
@@ -105,10 +105,10 @@ public sealed partial class AppleMFS
_blockMapBytes = new byte[bytesInBlockMap];
Array.Copy(wholeMdb, BYTES_BEFORE_BLOCK_MAP, _blockMapBytes, 0, _blockMapBytes.Length);
- var offset = 0;
+ int offset = 0;
_blockMap = new uint[_volMdb.drNmAlBlks + 2 + 1];
- for(var i = 2; i < _volMdb.drNmAlBlks + 2; i += 8)
+ for(int i = 2; i < _volMdb.drNmAlBlks + 2; i += 8)
{
uint tmp1 = 0;
uint tmp2 = 0;
@@ -163,7 +163,7 @@ public sealed partial class AppleMFS
_mounted = true;
- var bbSig = BigEndianBitConverter.ToUInt16(_bootBlocks, 0x000);
+ ushort bbSig = BigEndianBitConverter.ToUInt16(_bootBlocks, 0x000);
if(bbSig != AppleCommon.BB_MAGIC) _bootBlocks = null;
diff --git a/Aaru.Filesystems/CBM/CBM.cs b/Aaru.Filesystems/CBM/CBM.cs
index 497017e62..4b13da78b 100644
--- a/Aaru.Filesystems/CBM/CBM.cs
+++ b/Aaru.Filesystems/CBM/CBM.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/CBM/File.cs b/Aaru.Filesystems/CBM/File.cs
index da68dec90..147ce51b7 100644
--- a/Aaru.Filesystems/CBM/File.cs
+++ b/Aaru.Filesystems/CBM/File.cs
@@ -30,6 +30,7 @@ using System;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/CBM/Structs.cs b/Aaru.Filesystems/CBM/Structs.cs
index 037f31297..166d763a2 100644
--- a/Aaru.Filesystems/CBM/Structs.cs
+++ b/Aaru.Filesystems/CBM/Structs.cs
@@ -28,7 +28,7 @@
using System.Runtime.InteropServices;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/CPM/CPM.cs b/Aaru.Filesystems/CPM/CPM.cs
index 62e9a076e..9626a1727 100644
--- a/Aaru.Filesystems/CPM/CPM.cs
+++ b/Aaru.Filesystems/CPM/CPM.cs
@@ -36,6 +36,7 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/CPM/File.cs b/Aaru.Filesystems/CPM/File.cs
index b180701e6..93320b28c 100644
--- a/Aaru.Filesystems/CPM/File.cs
+++ b/Aaru.Filesystems/CPM/File.cs
@@ -31,6 +31,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Helpers;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/FAT/FAT.cs b/Aaru.Filesystems/FAT/FAT.cs
index 318711030..b3bc19812 100644
--- a/Aaru.Filesystems/FAT/FAT.cs
+++ b/Aaru.Filesystems/FAT/FAT.cs
@@ -32,7 +32,7 @@ using System.Globalization;
using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/FATX/FATX.cs b/Aaru.Filesystems/FATX/FATX.cs
index 04810b400..eeef2faa7 100644
--- a/Aaru.Filesystems/FATX/FATX.cs
+++ b/Aaru.Filesystems/FATX/FATX.cs
@@ -33,7 +33,7 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/FATX/Super.cs b/Aaru.Filesystems/FATX/Super.cs
index 36e218d4f..9594239ae 100644
--- a/Aaru.Filesystems/FATX/Super.cs
+++ b/Aaru.Filesystems/FATX/Super.cs
@@ -34,9 +34,9 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Console;
using Aaru.Helpers;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Marshal = Aaru.Helpers.Marshal;
using Partition = Aaru.CommonTypes.Partition;
@@ -156,8 +156,9 @@ public sealed partial class XboxFatPlugin
_fat32 = MemoryMarshal.Cast(buffer).ToArray();
if(!_littleEndian)
- for(var i = 0; i < _fat32.Length; i++)
- _fat32[i] = Swapping.Swap(_fat32[i]);
+ {
+ for(int i = 0; i < _fat32.Length; i++) _fat32[i] = Swapping.Swap(_fat32[i]);
+ }
AaruConsole.DebugWriteLine(MODULE_NAME, "fat32[0] == FATX32_ID = {0}", _fat32[0] == FATX32_ID);
@@ -187,8 +188,9 @@ public sealed partial class XboxFatPlugin
_fat16 = MemoryMarshal.Cast(buffer).ToArray();
if(!_littleEndian)
- for(var i = 0; i < _fat16.Length; i++)
- _fat16[i] = Swapping.Swap(_fat16[i]);
+ {
+ for(int i = 0; i < _fat16.Length; i++) _fat16[i] = Swapping.Swap(_fat16[i]);
+ }
AaruConsole.DebugWriteLine(MODULE_NAME, "fat16[0] == FATX16_ID = {0}", _fat16[0] == FATX16_ID);
@@ -208,11 +210,11 @@ public sealed partial class XboxFatPlugin
if(rootDirectoryClusters is null) return ErrorNumber.InvalidArgument;
- var rootDirectoryBuffer = new byte[_bytesPerCluster * rootDirectoryClusters.Length];
+ byte[] rootDirectoryBuffer = new byte[_bytesPerCluster * rootDirectoryClusters.Length];
AaruConsole.DebugWriteLine(MODULE_NAME, Localization.Reading_root_directory);
- for(var i = 0; i < rootDirectoryClusters.Length; i++)
+ for(int i = 0; i < rootDirectoryClusters.Length; i++)
{
errno = imagePlugin.ReadSectors(_firstClusterSector + (rootDirectoryClusters[i] - 1) * _sectorsPerCluster,
_sectorsPerCluster,
@@ -225,7 +227,7 @@ public sealed partial class XboxFatPlugin
_rootDirectory = new Dictionary();
- var pos = 0;
+ int pos = 0;
while(pos < rootDirectoryBuffer.Length)
{
diff --git a/Aaru.Filesystems/ISO9660/ISO9660.cs b/Aaru.Filesystems/ISO9660/ISO9660.cs
index 17a940226..fa202c44b 100644
--- a/Aaru.Filesystems/ISO9660/ISO9660.cs
+++ b/Aaru.Filesystems/ISO9660/ISO9660.cs
@@ -33,7 +33,7 @@ using System.Diagnostics.CodeAnalysis;
using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs
index 88cea266d..27c0992ae 100644
--- a/Aaru.Filesystems/ISO9660/Super.cs
+++ b/Aaru.Filesystems/ISO9660/Super.cs
@@ -37,10 +37,10 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Console;
using Aaru.Decoders.Sega;
using Aaru.Helpers;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -54,8 +54,8 @@ public sealed partial class ISO9660
Dictionary options, string @namespace)
{
_encoding = encoding ?? Encoding.GetEncoding(1252);
- var vdMagic = new byte[5]; // Volume Descriptor magic "CD001"
- var hsMagic = new byte[5]; // Volume Descriptor magic "CDROM"
+ byte[] vdMagic = new byte[5]; // Volume Descriptor magic "CD001"
+ byte[] hsMagic = new byte[5]; // Volume Descriptor magic "CDROM"
options ??= GetDefaultOptions();
@@ -119,7 +119,7 @@ public sealed partial class ISO9660
int xaOff = vdSector.Length == 2336 ? 8 : 0;
Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5);
_highSierra = _encoding.GetString(hsMagic) == HIGH_SIERRA_MAGIC;
- var hsOff = 0;
+ int hsOff = 0;
if(_highSierra) hsOff = 8;
@@ -359,7 +359,7 @@ public sealed partial class ISO9660
if(errno != ErrorNumber.NoError) return errno;
- var pvdWrongRoot = false;
+ bool pvdWrongRoot = false;
if(_highSierra)
{
@@ -382,7 +382,7 @@ public sealed partial class ISO9660
Localization
.PVD_does_not_point_to_correct_root_directory_checking_path_table);
- var pathTableWrongRoot = false;
+ bool pathTableWrongRoot = false;
rootLocation = _pathTable[0].Extent;
@@ -617,7 +617,7 @@ public sealed partial class ISO9660
Timestamp = decodedVd.CreationTime
});
- for(var i = 0; i < bvdSectors.Count; i++)
+ for(int i = 0; i < bvdSectors.Count; i++)
{
_rootDirectoryCache.Add(i == 0 ? "$BOOT" : $"$BOOT_{i}",
new DecodedDirectoryEntry
@@ -629,7 +629,7 @@ public sealed partial class ISO9660
});
}
- for(var i = 0; i < pvdSectors.Count; i++)
+ for(int i = 0; i < pvdSectors.Count; i++)
{
_rootDirectoryCache.Add(i == 0 ? "$PVD" : $"$PVD{i}",
new DecodedDirectoryEntry
@@ -641,7 +641,7 @@ public sealed partial class ISO9660
});
}
- for(var i = 0; i < svdSectors.Count; i++)
+ for(int i = 0; i < svdSectors.Count; i++)
{
_rootDirectoryCache.Add(i == 0 ? "$SVD" : $"$SVD_{i}",
new DecodedDirectoryEntry
@@ -653,7 +653,7 @@ public sealed partial class ISO9660
});
}
- for(var i = 0; i < evdSectors.Count; i++)
+ for(int i = 0; i < evdSectors.Count; i++)
{
_rootDirectoryCache.Add(i == 0 ? "$EVD" : $"$EVD_{i}",
new DecodedDirectoryEntry
@@ -665,7 +665,7 @@ public sealed partial class ISO9660
});
}
- for(var i = 0; i < vpdSectors.Count; i++)
+ for(int i = 0; i < vpdSectors.Count; i++)
{
_rootDirectoryCache.Add(i == 0 ? "$VPD" : $"$VPD_{i}",
new DecodedDirectoryEntry
diff --git a/Aaru.Filesystems/LisaFS/Dir.cs b/Aaru.Filesystems/LisaFS/Dir.cs
index da13fa1fd..f3f14bfb2 100644
--- a/Aaru.Filesystems/LisaFS/Dir.cs
+++ b/Aaru.Filesystems/LisaFS/Dir.cs
@@ -38,6 +38,7 @@ using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Decoders;
using Aaru.Helpers;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
@@ -150,7 +151,7 @@ public sealed partial class LisaFS
if(error != ErrorNumber.NoError) return error;
- var offset = 0;
+ int offset = 0;
List catalogV2 = [];
// For each entry on the catalog
@@ -281,7 +282,7 @@ public sealed partial class LisaFS
// Foreach catalog block
foreach(byte[] buf in catalogBlocks)
{
- var offset = 0;
+ int offset = 0;
// Traverse all entries
while(offset + 64 <= buf.Length)
diff --git a/Aaru.Filesystems/LisaFS/File.cs b/Aaru.Filesystems/LisaFS/File.cs
index 879561dd2..d12c942fc 100644
--- a/Aaru.Filesystems/LisaFS/File.cs
+++ b/Aaru.Filesystems/LisaFS/File.cs
@@ -33,6 +33,7 @@ using Aaru.CommonTypes.Structs;
using Aaru.Console;
using Aaru.Decoders;
using Aaru.Helpers;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
@@ -219,12 +220,13 @@ 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;
- var count = 0;
+ int count = 0;
if(fileId == FILEID_SRECORD)
{
@@ -407,11 +409,11 @@ public sealed partial class LisaFS
else
sectorSize = (int)_device.Info.SectorSize;
- var temp = new byte[file.length * sectorSize];
+ byte[] temp = new byte[file.length * sectorSize];
- var offset = 0;
+ int offset = 0;
- for(var i = 0; i < file.extents.Length; i++)
+ for(int i = 0; i < file.extents.Length; i++)
{
ErrorNumber errno = !tags
? _device.ReadSectors((ulong)file.extents[i].start +
@@ -435,8 +437,9 @@ 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;
@@ -520,7 +523,7 @@ public sealed partial class LisaFS
}
}
- for(var lvl = 0; lvl < pathElements.Length; lvl++)
+ for(int lvl = 0; lvl < pathElements.Length; lvl++)
{
string wantedFilename = pathElements[0].Replace('-', '/');
diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs
index ecb566a7f..589027142 100644
--- a/Aaru.Filesystems/LisaFS/Super.cs
+++ b/Aaru.Filesystems/LisaFS/Super.cs
@@ -31,12 +31,12 @@ using System.Collections.Generic;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Console;
using Aaru.Decoders;
using Aaru.Helpers;
using Claunia.Encoding;
using Encoding = System.Text.Encoding;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -97,7 +97,7 @@ public sealed partial class LisaFS
if(errno != ErrorNumber.NoError) return errno;
_mddf = new MDDF();
- var pString = new byte[33];
+ byte[] pString = new byte[33];
_mddf.fsversion = BigEndianBitConverter.ToUInt16(sector, 0x00);
_mddf.volid = BigEndianBitConverter.ToUInt64(sector, 0x02);
@@ -112,7 +112,7 @@ public sealed partial class LisaFS
_mddf.unknown2 = sector[0x4F];
_mddf.machine_id = BigEndianBitConverter.ToUInt32(sector, 0x50);
_mddf.master_copy_id = BigEndianBitConverter.ToUInt32(sector, 0x54);
- var lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58);
+ uint lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x58);
_mddf.dtvc = DateHandlers.LisaToDateTime(lisaTime);
lisaTime = BigEndianBitConverter.ToUInt32(sector, 0x5C);
_mddf.dtcc = DateHandlers.LisaToDateTime(lisaTime);
diff --git a/Aaru.Filesystems/Opera/File.cs b/Aaru.Filesystems/Opera/File.cs
index 102ee20c1..8f6811b2a 100644
--- a/Aaru.Filesystems/Opera/File.cs
+++ b/Aaru.Filesystems/Opera/File.cs
@@ -33,6 +33,7 @@ using System.Linq;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
@@ -194,7 +195,7 @@ public sealed partial class OperaFS
if(pieces.Length == 0) return ErrorNumber.InvalidArgument;
- var parentPath = string.Join("/", pieces, 0, pieces.Length - 1);
+ string parentPath = string.Join("/", pieces, 0, pieces.Length - 1);
if(!_directoryCache.TryGetValue(parentPath, out _))
{
diff --git a/Aaru.Filesystems/Opera/Opera.cs b/Aaru.Filesystems/Opera/Opera.cs
index 8f8220b19..ed23aaaea 100644
--- a/Aaru.Filesystems/Opera/Opera.cs
+++ b/Aaru.Filesystems/Opera/Opera.cs
@@ -32,7 +32,7 @@ using System.Text;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/Opera/Super.cs b/Aaru.Filesystems/Opera/Super.cs
index 16791fb3d..54a216de0 100644
--- a/Aaru.Filesystems/Opera/Super.cs
+++ b/Aaru.Filesystems/Opera/Super.cs
@@ -33,6 +33,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Helpers;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -92,7 +93,7 @@ public sealed partial class OperaFS
};
_image = imagePlugin;
- var firstRootBlock = BigEndianBitConverter.ToInt32(sbSector, Marshal.SizeOf());
+ int firstRootBlock = BigEndianBitConverter.ToInt32(sbSector, Marshal.SizeOf());
_rootDirectoryCache = DecodeDirectory(firstRootBlock);
_directoryCache = new Dictionary>();
_mounted = true;
diff --git a/Aaru.Filesystems/UCSDPascal/File.cs b/Aaru.Filesystems/UCSDPascal/File.cs
index 7f9eead4f..a3523f3f3 100644
--- a/Aaru.Filesystems/UCSDPascal/File.cs
+++ b/Aaru.Filesystems/UCSDPascal/File.cs
@@ -32,6 +32,7 @@ using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Helpers;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Filesystems;
diff --git a/Aaru.Filesystems/UCSDPascal/Super.cs b/Aaru.Filesystems/UCSDPascal/Super.cs
index 122bcbb36..137ab8387 100644
--- a/Aaru.Filesystems/UCSDPascal/Super.cs
+++ b/Aaru.Filesystems/UCSDPascal/Super.cs
@@ -35,10 +35,10 @@ using System.Collections.Generic;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
-using Aaru.CommonTypes.Structs;
using Aaru.Helpers;
using Claunia.Encoding;
using Encoding = System.Text.Encoding;
+using FileSystemInfo = Aaru.CommonTypes.Structs.FileSystemInfo;
using Partition = Aaru.CommonTypes.Partition;
namespace Aaru.Filesystems;
@@ -100,7 +100,7 @@ public sealed partial class PascalPlugin
if(errno != ErrorNumber.NoError) return errno;
- var offset = 26;
+ int offset = 26;
_fileEntries = [];
diff --git a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs
index 6d215285e..1306dc76e 100644
--- a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs
+++ b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs
@@ -43,6 +43,7 @@ using Avalonia.Controls;
using Avalonia.Platform.Storage;
using JetBrains.Annotations;
using ReactiveUI;
+using Tuple = Aaru.Decoders.PCMCIA.Tuple;
namespace Aaru.Gui.ViewModels.Tabs;
diff --git a/Aaru.Tests/Issues/FsExtractIssueTest.cs b/Aaru.Tests/Issues/FsExtractIssueTest.cs
index 67e3da101..5355d8508 100644
--- a/Aaru.Tests/Issues/FsExtractIssueTest.cs
+++ b/Aaru.Tests/Issues/FsExtractIssueTest.cs
@@ -7,6 +7,7 @@ using Aaru.CommonTypes.Interfaces;
using Aaru.CommonTypes.Structs;
using Aaru.Core;
using NUnit.Framework;
+using FileAttributes = Aaru.CommonTypes.Structs.FileAttributes;
namespace Aaru.Tests.Issues;
@@ -68,9 +69,9 @@ public abstract class FsExtractIssueTest
});
}
- var filesystemFound = false;
+ bool filesystemFound = false;
- for(var i = 0; i < partitions.Count; i++)
+ for(int i = 0; i < partitions.Count; i++)
{
Core.Filesystems.Identify(imageFormat, out List idPlugins, partitions[i]);
@@ -171,7 +172,7 @@ public abstract class FsExtractIssueTest
}
}
- var buffer = new byte[stat.Length];
+ byte[] buffer = new byte[stat.Length];
ErrorNumber ret = fs.OpenFile(path + "/" + entry, out IFileNode fileNode);
Assert.That(ret,