mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix inconsistent naming.
This commit is contained in:
Submodule Aaru.CommonTypes updated: c63d5a5f44...488a9c12cb
@@ -37,7 +37,7 @@ namespace Aaru.Core.Logging
|
||||
/// </summary>
|
||||
public class SubchannelLog
|
||||
{
|
||||
const int _subSize = 96;
|
||||
const int SUB_SIZE = 96;
|
||||
readonly bool _bcd;
|
||||
readonly StreamWriter _logSw;
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Aaru.Core.Logging
|
||||
/// <param name="fixed">Set to <c>true</c> if the subchannel has been fixed, <c>false</c> if as is</param>
|
||||
public void WriteEntry(byte[] subchannel, bool raw, long startingLba, uint blocks, bool generated, bool @fixed)
|
||||
{
|
||||
if(subchannel.Length / _subSize != blocks)
|
||||
if(subchannel.Length / SUB_SIZE != blocks)
|
||||
{
|
||||
_logSw.WriteLine("Data length is invalid!");
|
||||
_logSw.Flush();
|
||||
|
||||
@@ -115,7 +115,7 @@ namespace Aaru.Core
|
||||
Sequence = (ulong)i
|
||||
};
|
||||
|
||||
const uint SECTORS_TO_READ = 512;
|
||||
const uint sectorsToRead = 512;
|
||||
ulong sectors = (ulong)_fs.Length / blockSize;
|
||||
ulong doneSectors = 0;
|
||||
|
||||
@@ -132,15 +132,15 @@ namespace Aaru.Core
|
||||
|
||||
byte[] sector;
|
||||
|
||||
if(sectors - doneSectors >= SECTORS_TO_READ)
|
||||
if(sectors - doneSectors >= sectorsToRead)
|
||||
{
|
||||
sector = new byte[SECTORS_TO_READ * blockSize];
|
||||
sector = new byte[sectorsToRead * blockSize];
|
||||
_fs.Read(sector, 0, sector.Length);
|
||||
|
||||
UpdateProgress2($"Hashing block {doneSectors} of {sectors} on file {i + 1} of {files.Count}",
|
||||
(long)doneSectors, (long)sectors);
|
||||
|
||||
doneSectors += SECTORS_TO_READ;
|
||||
doneSectors += sectorsToRead;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -452,7 +452,7 @@ namespace Aaru.Devices.Linux
|
||||
{
|
||||
duration = 0;
|
||||
sense = false;
|
||||
int off = 0;
|
||||
int off;
|
||||
|
||||
// Create array for buffers
|
||||
IntPtr[] bufferPointers = new IntPtr[commands.Length];
|
||||
|
||||
2
Aaru.Dto
2
Aaru.Dto
Submodule Aaru.Dto updated: 033842d8a1...35a6dd7b74
@@ -85,6 +85,7 @@ namespace Aaru.Filesystems
|
||||
|
||||
if(drSigWord == AppleCommon.HFSP_MAGIC) // "H+"
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
ushort xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E);
|
||||
|
||||
uint drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414);
|
||||
@@ -133,6 +134,7 @@ namespace Aaru.Filesystems
|
||||
|
||||
if(drSigWord == AppleCommon.HFSP_MAGIC) // "H+"
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
ushort xdrStABNt = BigEndianBitConverter.ToUInt16(vhSector, 0x47E);
|
||||
|
||||
uint drAlBlkSiz = BigEndianBitConverter.ToUInt32(vhSector, 0x414);
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Reflection;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
@@ -95,6 +96,7 @@ namespace Aaru.Filesystems
|
||||
}
|
||||
|
||||
/// <summary>CP/M disk definitions</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public sealed class CpmDefinitions
|
||||
{
|
||||
/// <summary>Timestamp of creation of the CP/M disk definitions list</summary>
|
||||
@@ -104,6 +106,7 @@ namespace Aaru.Filesystems
|
||||
}
|
||||
|
||||
/// <summary>CP/M disk definition</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public sealed class CpmDefinition
|
||||
{
|
||||
/// <summary>Maps the first 16 allocation blocks for reservation, high byte</summary>
|
||||
@@ -158,6 +161,7 @@ namespace Aaru.Filesystems
|
||||
}
|
||||
|
||||
/// <summary>Side descriptions</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public sealed class Side
|
||||
{
|
||||
/// <summary>Software interleaving mask, [1,3,0,2] means CP/M LBA 0 is physical sector 1, LBA 1 = 3, so on</summary>
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
// Copyright © 2011-2021 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// ReSharper disable NotAccessedField.Local
|
||||
@@ -39,6 +40,7 @@ namespace Aaru.Filesystems
|
||||
public sealed partial class CPM
|
||||
{
|
||||
/// <summary>Most of the times this structure is hard wired or generated by CP/M, not stored on disk</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
class DiscParameterBlock
|
||||
{
|
||||
/// <summary>First byte of allocation bitmap</summary>
|
||||
|
||||
@@ -49,11 +49,13 @@ namespace Aaru.Filesystems
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
public sealed class F2FS : IFilesystem
|
||||
{
|
||||
// ReSharper disable InconsistentNaming
|
||||
const uint F2FS_MAGIC = 0xF2F52010;
|
||||
const uint F2FS_SUPER_OFFSET = 1024;
|
||||
const uint F2FS_MIN_SECTOR = 512;
|
||||
const uint F2FS_MAX_SECTOR = 4096;
|
||||
const uint F2FS_BLOCK_SIZE = 4096;
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
/// <inheritdoc />
|
||||
public FileSystemType XmlFsType { get; private set; }
|
||||
@@ -122,6 +124,7 @@ namespace Aaru.Filesystems
|
||||
if(sector.Length < Marshal.SizeOf<Superblock>())
|
||||
return;
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
Superblock f2fsSb = Marshal.ByteArrayToStructureLittleEndian<Superblock>(sector);
|
||||
|
||||
if(f2fsSb.magic != F2FS_MAGIC)
|
||||
|
||||
@@ -327,11 +327,11 @@ namespace Aaru.Filesystems
|
||||
|
||||
byte fat2 = fatSector[1];
|
||||
byte fat3 = fatSector[2];
|
||||
ushort fat2ndCluster = (ushort)(((fat2 << 8) + fat3) & 0xFFF);
|
||||
ushort fatCluster2 = (ushort)(((fat2 << 8) + fat3) & 0xFFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("FAT plugin", "1st fat cluster 1 = {0:X3}", fat2ndCluster);
|
||||
AaruConsole.DebugWriteLine("FAT plugin", "1st fat cluster 1 = {0:X3}", fatCluster2);
|
||||
|
||||
if(fat2ndCluster < 0xFF0)
|
||||
if(fatCluster2 < 0xFF0)
|
||||
return false;
|
||||
|
||||
ulong fat2SectorNo = 0;
|
||||
@@ -399,9 +399,9 @@ namespace Aaru.Filesystems
|
||||
|
||||
fat2 = fat2Sector[1];
|
||||
fat3 = fat2Sector[2];
|
||||
fat2ndCluster = (ushort)(((fat2 << 8) + fat3) & 0xFFF);
|
||||
fatCluster2 = (ushort)(((fat2 << 8) + fat3) & 0xFFF);
|
||||
|
||||
if(fat2ndCluster < 0xFF0)
|
||||
if(fatCluster2 < 0xFF0)
|
||||
return false;
|
||||
|
||||
return fatId == fat2Sector[0];
|
||||
|
||||
@@ -839,10 +839,10 @@ namespace Aaru.Filesystems
|
||||
|
||||
_bytesPerCluster = _sectorsPerCluster * imagePlugin.Info.SectorSize;
|
||||
|
||||
ushort[] _firstFatEntries = new ushort[_statfs.Blocks];
|
||||
ushort[] _secondFatEntries = new ushort[_statfs.Blocks];
|
||||
bool _firstFatValid = true;
|
||||
bool _secondFatValid = true;
|
||||
ushort[] firstFatEntries = new ushort[_statfs.Blocks];
|
||||
ushort[] secondFatEntries = new ushort[_statfs.Blocks];
|
||||
bool firstFatValid = true;
|
||||
bool secondFatValid = true;
|
||||
|
||||
if(_fat12)
|
||||
{
|
||||
@@ -852,14 +852,14 @@ namespace Aaru.Filesystems
|
||||
|
||||
int pos = 0;
|
||||
|
||||
for(int i = 0; i + 3 < fatBytes.Length && pos < _firstFatEntries.Length; i += 3)
|
||||
for(int i = 0; i + 3 < fatBytes.Length && pos < firstFatEntries.Length; i += 3)
|
||||
{
|
||||
_firstFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]);
|
||||
firstFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]);
|
||||
|
||||
if(pos >= _firstFatEntries.Length)
|
||||
if(pos >= firstFatEntries.Length)
|
||||
break;
|
||||
|
||||
_firstFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF0) >> 4) + (fatBytes[i + 2] << 4));
|
||||
firstFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF0) >> 4) + (fatBytes[i + 2] << 4));
|
||||
}
|
||||
|
||||
fatBytes = imagePlugin.ReadSectors(_fatFirstSector + _sectorsPerFat, _sectorsPerFat);
|
||||
@@ -868,44 +868,44 @@ namespace Aaru.Filesystems
|
||||
|
||||
pos = 0;
|
||||
|
||||
for(int i = 0; i + 3 < fatBytes.Length && pos < _secondFatEntries.Length; i += 3)
|
||||
for(int i = 0; i + 3 < fatBytes.Length && pos < secondFatEntries.Length; i += 3)
|
||||
{
|
||||
_secondFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]);
|
||||
secondFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF) << 8) + fatBytes[i + 0]);
|
||||
|
||||
if(pos >= _secondFatEntries.Length)
|
||||
if(pos >= secondFatEntries.Length)
|
||||
break;
|
||||
|
||||
_secondFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF0) >> 4) + (fatBytes[i + 2] << 4));
|
||||
secondFatEntries[pos++] = (ushort)(((fatBytes[i + 1] & 0xF0) >> 4) + (fatBytes[i + 2] << 4));
|
||||
}
|
||||
|
||||
foreach(ushort entry in _firstFatEntries)
|
||||
foreach(ushort entry in firstFatEntries)
|
||||
{
|
||||
if(entry >= FAT12_RESERVED ||
|
||||
entry <= _statfs.Blocks)
|
||||
continue;
|
||||
|
||||
_firstFatValid = false;
|
||||
firstFatValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
foreach(ushort entry in _secondFatEntries)
|
||||
foreach(ushort entry in secondFatEntries)
|
||||
{
|
||||
if(entry >= FAT12_RESERVED ||
|
||||
entry <= _statfs.Blocks)
|
||||
continue;
|
||||
|
||||
_secondFatValid = false;
|
||||
secondFatValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(_firstFatValid == _secondFatValid)
|
||||
_fatEntries = _useFirstFat ? _firstFatEntries : _secondFatEntries;
|
||||
else if(_firstFatValid)
|
||||
_fatEntries = _firstFatEntries;
|
||||
if(firstFatValid == secondFatValid)
|
||||
_fatEntries = _useFirstFat ? firstFatEntries : secondFatEntries;
|
||||
else if(firstFatValid)
|
||||
_fatEntries = firstFatEntries;
|
||||
else
|
||||
_fatEntries = _secondFatEntries;
|
||||
_fatEntries = secondFatEntries;
|
||||
}
|
||||
else if(_fat16)
|
||||
{
|
||||
@@ -914,41 +914,41 @@ namespace Aaru.Filesystems
|
||||
byte[] fatBytes = imagePlugin.ReadSectors(_fatFirstSector, _sectorsPerFat);
|
||||
|
||||
AaruConsole.DebugWriteLine("FAT plugin", "Casting FAT");
|
||||
_firstFatEntries = MemoryMarshal.Cast<byte, ushort>(fatBytes).ToArray();
|
||||
firstFatEntries = MemoryMarshal.Cast<byte, ushort>(fatBytes).ToArray();
|
||||
|
||||
fatBytes = imagePlugin.ReadSectors(_fatFirstSector + _sectorsPerFat, _sectorsPerFat);
|
||||
|
||||
AaruConsole.DebugWriteLine("FAT plugin", "Casting FAT");
|
||||
_secondFatEntries = MemoryMarshal.Cast<byte, ushort>(fatBytes).ToArray();
|
||||
secondFatEntries = MemoryMarshal.Cast<byte, ushort>(fatBytes).ToArray();
|
||||
|
||||
foreach(ushort entry in _firstFatEntries)
|
||||
foreach(ushort entry in firstFatEntries)
|
||||
{
|
||||
if(entry >= FAT16_RESERVED ||
|
||||
entry <= _statfs.Blocks)
|
||||
continue;
|
||||
|
||||
_firstFatValid = false;
|
||||
firstFatValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
foreach(ushort entry in _secondFatEntries)
|
||||
foreach(ushort entry in secondFatEntries)
|
||||
{
|
||||
if(entry >= FAT16_RESERVED ||
|
||||
entry <= _statfs.Blocks)
|
||||
continue;
|
||||
|
||||
_secondFatValid = false;
|
||||
secondFatValid = false;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if(_firstFatValid == _secondFatValid)
|
||||
_fatEntries = _useFirstFat ? _firstFatEntries : _secondFatEntries;
|
||||
else if(_firstFatValid)
|
||||
_fatEntries = _firstFatEntries;
|
||||
if(firstFatValid == secondFatValid)
|
||||
_fatEntries = _useFirstFat ? firstFatEntries : secondFatEntries;
|
||||
else if(firstFatValid)
|
||||
_fatEntries = firstFatEntries;
|
||||
else
|
||||
_fatEntries = _secondFatEntries;
|
||||
_fatEntries = secondFatEntries;
|
||||
}
|
||||
|
||||
// TODO: Check how this affects international filenames
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes;
|
||||
@@ -203,6 +204,7 @@ namespace Aaru.Filesystems
|
||||
}
|
||||
|
||||
[Flags]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
enum Flags : uint
|
||||
{
|
||||
Unicode = 0x00000001, RemountRO = 0x00000002, Continue = 0x00000004,
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
|
||||
// ReSharper disable NotAccessedField.Local
|
||||
|
||||
@@ -43,6 +44,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// initialization the memory where it resides is not emptied so it tends to contain a lot of garbage. This has
|
||||
/// difficulted its reverse engineering.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct MDDF
|
||||
{
|
||||
/// <summary>0x00, Filesystem version</summary>
|
||||
@@ -215,6 +217,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// block there are previous and next block pointers, effectively making the V3 catalog a double-linked list. Garbage
|
||||
/// is not zeroed.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct CatalogEntry
|
||||
{
|
||||
/// <summary>0x00, seems to be 0x24 when the entry is valid</summary>
|
||||
@@ -247,6 +250,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
}
|
||||
|
||||
/// <summary>An extent indicating a start and a run of sectors.</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct Extent
|
||||
{
|
||||
public int start;
|
||||
@@ -259,6 +263,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// (0xFFFB) It spans a single sector on V2 and V3 but 2 sectors on V1. It contains all information about a file, and
|
||||
/// is indexed in the S-Records file. It also contains the label. Garbage is zeroed.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct ExtentFile
|
||||
{
|
||||
/// <summary>0x00, filename length</summary>
|
||||
@@ -355,6 +360,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// value (less than 0x200) variable field of unknown meaning and another one that seems to be flags, with values like
|
||||
/// 0, 1, 3 and 5.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct SRecord
|
||||
{
|
||||
/// <summary>0x00, block where ExtentsFile for this entry resides</summary>
|
||||
@@ -375,6 +381,7 @@ namespace Aaru.Filesystems.LisaFS
|
||||
/// forcing LisaOS to read the whole catalog. That or I missed the pointers. Empty entries just contain a 0-len
|
||||
/// filename. Garbage is not zeroed.
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct CatalogEntryV2
|
||||
{
|
||||
/// <summary>0x00, filename, 32-bytes, null-padded</summary>
|
||||
|
||||
@@ -184,7 +184,9 @@ namespace Aaru.Filesystems
|
||||
|
||||
int blockSize = locusSb.s_version == Version.SB_SB4096 ? 4096 : 1024;
|
||||
|
||||
// ReSharper disable once InconsistentNaming
|
||||
string s_fsmnt = StringHandlers.CToString(locusSb.s_fsmnt, Encoding);
|
||||
// ReSharper disable once InconsistentNaming
|
||||
string s_fpack = StringHandlers.CToString(locusSb.s_fpack, Encoding);
|
||||
|
||||
AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_magic = 0x{0:X8}", locusSb.s_magic);
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Aaru.Filesystems
|
||||
if(string.IsNullOrEmpty(entry.Key))
|
||||
return Errno.NoSuchFile;
|
||||
|
||||
if((entry.Value.entry.flags & FLAGS_MASK) != (int)FileFlags.Directory)
|
||||
if((entry.Value.Entry.flags & FLAGS_MASK) != (int)FileFlags.Directory)
|
||||
return Errno.NotDirectory;
|
||||
|
||||
string currentPath = pieces[0];
|
||||
@@ -94,7 +94,7 @@ namespace Aaru.Filesystems
|
||||
if(string.IsNullOrEmpty(entry.Key))
|
||||
return Errno.NoSuchFile;
|
||||
|
||||
if((entry.Value.entry.flags & FLAGS_MASK) != (int)FileFlags.Directory)
|
||||
if((entry.Value.Entry.flags & FLAGS_MASK) != (int)FileFlags.Directory)
|
||||
return Errno.NotDirectory;
|
||||
|
||||
currentPath = p == 0 ? pieces[0] : $"{currentPath}/{pieces[p]}";
|
||||
@@ -102,10 +102,10 @@ namespace Aaru.Filesystems
|
||||
if(_directoryCache.TryGetValue(currentPath, out currentDirectory))
|
||||
continue;
|
||||
|
||||
if(entry.Value.pointers.Length < 1)
|
||||
if(entry.Value.Pointers.Length < 1)
|
||||
return Errno.InvalidArgument;
|
||||
|
||||
currentDirectory = DecodeDirectory((int)entry.Value.pointers[0]);
|
||||
currentDirectory = DecodeDirectory((int)entry.Value.Pointers[0]);
|
||||
|
||||
_directoryCache.Add(currentPath, currentDirectory);
|
||||
}
|
||||
@@ -141,12 +141,12 @@ namespace Aaru.Filesystems
|
||||
|
||||
var entryWithPointers = new DirectoryEntryWithPointers
|
||||
{
|
||||
entry = entry,
|
||||
pointers = new uint[entry.last_copy + 1]
|
||||
Entry = entry,
|
||||
Pointers = new uint[entry.last_copy + 1]
|
||||
};
|
||||
|
||||
for(int i = 0; i <= entry.last_copy; i++)
|
||||
entryWithPointers.pointers[i] =
|
||||
entryWithPointers.Pointers[i] =
|
||||
BigEndianBitConverter.ToUInt32(data, off + _directoryEntrySize + (i * 4));
|
||||
|
||||
entries.Add(name, entryWithPointers);
|
||||
|
||||
@@ -53,11 +53,11 @@ namespace Aaru.Filesystems
|
||||
if(err != Errno.NoError)
|
||||
return err;
|
||||
|
||||
if((entry.entry.flags & FLAGS_MASK) == (uint)FileFlags.Directory &&
|
||||
if((entry.Entry.flags & FLAGS_MASK) == (uint)FileFlags.Directory &&
|
||||
!_debug)
|
||||
return Errno.IsDirectory;
|
||||
|
||||
deviceBlock = entry.pointers[0] + fileBlock;
|
||||
deviceBlock = entry.Pointers[0] + fileBlock;
|
||||
|
||||
return Errno.NoError;
|
||||
}
|
||||
@@ -93,31 +93,31 @@ namespace Aaru.Filesystems
|
||||
if(err != Errno.NoError)
|
||||
return err;
|
||||
|
||||
if((entry.entry.flags & FLAGS_MASK) == (uint)FileFlags.Directory &&
|
||||
if((entry.Entry.flags & FLAGS_MASK) == (uint)FileFlags.Directory &&
|
||||
!_debug)
|
||||
return Errno.IsDirectory;
|
||||
|
||||
if(entry.pointers.Length < 1)
|
||||
if(entry.Pointers.Length < 1)
|
||||
return Errno.InvalidArgument;
|
||||
|
||||
if(entry.entry.byte_count == 0)
|
||||
if(entry.Entry.byte_count == 0)
|
||||
{
|
||||
buf = new byte[0];
|
||||
|
||||
return Errno.NoError;
|
||||
}
|
||||
|
||||
if(offset >= entry.entry.byte_count)
|
||||
if(offset >= entry.Entry.byte_count)
|
||||
return Errno.InvalidArgument;
|
||||
|
||||
if(size + offset >= entry.entry.byte_count)
|
||||
size = entry.entry.byte_count - offset;
|
||||
if(size + offset >= entry.Entry.byte_count)
|
||||
size = entry.Entry.byte_count - offset;
|
||||
|
||||
long firstBlock = offset / entry.entry.block_size;
|
||||
long offsetInBlock = offset % entry.entry.block_size;
|
||||
long sizeInBlocks = (size + offsetInBlock) / entry.entry.block_size;
|
||||
long firstBlock = offset / entry.Entry.block_size;
|
||||
long offsetInBlock = offset % entry.Entry.block_size;
|
||||
long sizeInBlocks = (size + offsetInBlock) / entry.Entry.block_size;
|
||||
|
||||
if((size + offsetInBlock) % entry.entry.block_size > 0)
|
||||
if((size + offsetInBlock) % entry.Entry.block_size > 0)
|
||||
sizeInBlocks++;
|
||||
|
||||
uint fileBlockSizeRatio;
|
||||
@@ -125,11 +125,11 @@ namespace Aaru.Filesystems
|
||||
if(_image.Info.SectorSize == 2336 ||
|
||||
_image.Info.SectorSize == 2352 ||
|
||||
_image.Info.SectorSize == 2448)
|
||||
fileBlockSizeRatio = entry.entry.block_size / 2048;
|
||||
fileBlockSizeRatio = entry.Entry.block_size / 2048;
|
||||
else
|
||||
fileBlockSizeRatio = entry.entry.block_size / _image.Info.SectorSize;
|
||||
fileBlockSizeRatio = entry.Entry.block_size / _image.Info.SectorSize;
|
||||
|
||||
byte[] buffer = _image.ReadSectors((ulong)(entry.pointers[0] + (firstBlock * fileBlockSizeRatio)),
|
||||
byte[] buffer = _image.ReadSectors((ulong)(entry.Pointers[0] + (firstBlock * fileBlockSizeRatio)),
|
||||
(uint)(sizeInBlocks * fileBlockSizeRatio));
|
||||
|
||||
buf = new byte[size];
|
||||
@@ -151,7 +151,7 @@ namespace Aaru.Filesystems
|
||||
if(err != Errno.NoError)
|
||||
return err;
|
||||
|
||||
DirectoryEntry entry = entryWithPointers.entry;
|
||||
DirectoryEntry entry = entryWithPointers.Entry;
|
||||
|
||||
stat = new FileEntryInfo
|
||||
{
|
||||
@@ -160,7 +160,7 @@ namespace Aaru.Filesystems
|
||||
BlockSize = entry.block_size,
|
||||
Length = entry.byte_count,
|
||||
Inode = entry.id,
|
||||
Links = (ulong)entryWithPointers.pointers.Length
|
||||
Links = (ulong)entryWithPointers.Pointers.Length
|
||||
};
|
||||
|
||||
var flags = (FileFlags)(entry.flags & FLAGS_MASK);
|
||||
|
||||
@@ -113,8 +113,8 @@ namespace Aaru.Filesystems
|
||||
|
||||
class DirectoryEntryWithPointers
|
||||
{
|
||||
public DirectoryEntry entry;
|
||||
public uint[] pointers;
|
||||
public DirectoryEntry Entry;
|
||||
public uint[] Pointers;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -348,6 +348,7 @@ namespace Aaru.Filesystems
|
||||
}
|
||||
|
||||
/// <summary>ProDOS directory entry, decoded structure</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct Entry
|
||||
{
|
||||
/// <summary>Type of file pointed by this entry Offset 0x00, mask 0xF0</summary>
|
||||
@@ -383,6 +384,7 @@ namespace Aaru.Filesystems
|
||||
public ushort header_pointer;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct RootDirectoryHeader
|
||||
{
|
||||
/// <summary>Constant 0x0F Offset 0x04, mask 0xF0</summary>
|
||||
@@ -416,6 +418,7 @@ namespace Aaru.Filesystems
|
||||
public ushort total_blocks;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct DirectoryHeader
|
||||
{
|
||||
/// <summary>Constant 0x0E Offset 0x04, mask 0xF0</summary>
|
||||
@@ -448,6 +451,7 @@ namespace Aaru.Filesystems
|
||||
public byte parent_entry_length;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct DirectoryKeyBlock
|
||||
{
|
||||
/// <summary>Always 0 Offset 0x00, 2 bytes</summary>
|
||||
@@ -460,6 +464,7 @@ namespace Aaru.Filesystems
|
||||
public Entry[] entries;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct RootDirectoryKeyBlock
|
||||
{
|
||||
/// <summary>Always 0 Offset 0x00, 2 bytes</summary>
|
||||
@@ -472,6 +477,7 @@ namespace Aaru.Filesystems
|
||||
public Entry[] entries;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct DirectoryBlock
|
||||
{
|
||||
/// <summary>Pointer to previous directory block Offset 0x00, 2 bytes</summary>
|
||||
@@ -482,12 +488,14 @@ namespace Aaru.Filesystems
|
||||
public Entry[] entries;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct IndexBlock
|
||||
{
|
||||
/// <summary>Up to 256 pointers to blocks, 0 to indicate the block is sparsed (non-allocated)</summary>
|
||||
public ushort[] block_pointer;
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct MasterIndexBlock
|
||||
{
|
||||
/// <summary>Up to 128 pointers to index blocks</summary>
|
||||
|
||||
@@ -91,10 +91,10 @@ namespace Aaru.Filesystems
|
||||
return false;
|
||||
|
||||
// Check extents are not past device
|
||||
if(qnxSb.rootDir.di_first_xtnt.block + partition.Start >= partition.End ||
|
||||
qnxSb.inode.di_first_xtnt.block + partition.Start >= partition.End ||
|
||||
qnxSb.boot.di_first_xtnt.block + partition.Start >= partition.End ||
|
||||
qnxSb.altBoot.di_first_xtnt.block + partition.Start >= partition.End)
|
||||
if(qnxSb.rootDir.di_first_xtnt.Block + partition.Start >= partition.End ||
|
||||
qnxSb.inode.di_first_xtnt.Block + partition.Start >= partition.End ||
|
||||
qnxSb.boot.di_first_xtnt.Block + partition.Start >= partition.End ||
|
||||
qnxSb.altBoot.di_first_xtnt.Block + partition.Start >= partition.End)
|
||||
return false;
|
||||
|
||||
// Check inodes are in use
|
||||
@@ -214,8 +214,8 @@ namespace Aaru.Filesystems
|
||||
|
||||
struct Extent
|
||||
{
|
||||
public uint block;
|
||||
public uint length;
|
||||
public uint Block;
|
||||
public uint Length;
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
// ****************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Text;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
@@ -178,6 +179,7 @@ namespace Aaru.Filesystems
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct BiosParameterBlock
|
||||
{
|
||||
/// <summary>0x00, x86 jump (3 bytes), jumps to 0x60</summary>
|
||||
|
||||
@@ -127,6 +127,7 @@ namespace Aaru.Filesystems
|
||||
information = sb.ToString();
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct SuperBlock
|
||||
{
|
||||
/// <summary>0x00, 0x1BADFACE</summary>
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace Aaru.Gui.Controls
|
||||
// TODO: Writing one more than it should
|
||||
public sealed class BlockMap : ItemsControl
|
||||
{
|
||||
const int _blockSize = 15;
|
||||
const int BLOCK_SIZE = 15;
|
||||
public static readonly StyledProperty<ulong> BlocksProperty =
|
||||
AvaloniaProperty.Register<Border, ulong>(nameof(Blocks));
|
||||
|
||||
@@ -170,7 +170,7 @@ namespace Aaru.Gui.Controls
|
||||
{
|
||||
case nameof(Blocks):
|
||||
if(_maxBlocks == 0)
|
||||
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
|
||||
_maxBlocks = (ulong)(Width / BLOCK_SIZE * (Height / BLOCK_SIZE));
|
||||
|
||||
if(Blocks > _maxBlocks)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ namespace Aaru.Gui.Controls
|
||||
if((int?)_bitmap?.Size.Height != (int)Height ||
|
||||
(int?)_bitmap?.Size.Width != (int)Width)
|
||||
{
|
||||
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
|
||||
_maxBlocks = (ulong)(Width / BLOCK_SIZE * (Height / BLOCK_SIZE));
|
||||
CreateBitmap();
|
||||
}
|
||||
|
||||
@@ -327,12 +327,12 @@ namespace Aaru.Gui.Controls
|
||||
throw new ArgumentException("Duration cannot be negative or infinite", nameof(duration));
|
||||
|
||||
bool newContext = ctx is null;
|
||||
ulong clustersPerRow = (ulong)Width / _blockSize;
|
||||
ulong clustersPerRow = (ulong)Width / BLOCK_SIZE;
|
||||
ulong cluster = block / _clusterSize;
|
||||
ulong row = cluster / clustersPerRow;
|
||||
ulong column = cluster % clustersPerRow;
|
||||
ulong x = column * _blockSize;
|
||||
ulong y = row * _blockSize;
|
||||
ulong x = column * BLOCK_SIZE;
|
||||
ulong y = row * BLOCK_SIZE;
|
||||
var pen = new Pen(Foreground);
|
||||
|
||||
IBrush brush;
|
||||
@@ -365,13 +365,13 @@ namespace Aaru.Gui.Controls
|
||||
ctx = new DrawingContext(ctxi, false);
|
||||
}
|
||||
|
||||
ctx.FillRectangle(brush, new Rect(x, y, _blockSize, _blockSize));
|
||||
ctx.DrawRectangle(pen, new Rect(x, y, _blockSize, _blockSize));
|
||||
ctx.FillRectangle(brush, new Rect(x, y, BLOCK_SIZE, BLOCK_SIZE));
|
||||
ctx.DrawRectangle(pen, new Rect(x, y, BLOCK_SIZE, BLOCK_SIZE));
|
||||
|
||||
if(double.IsNaN(duration))
|
||||
{
|
||||
ctx.DrawLine(pen, new Point(x, y), new Point(x + _blockSize, y + _blockSize));
|
||||
ctx.DrawLine(pen, new Point(x, y + _blockSize), new Point(x + _blockSize, y));
|
||||
ctx.DrawLine(pen, new Point(x, y), new Point(x + BLOCK_SIZE, y + BLOCK_SIZE));
|
||||
ctx.DrawLine(pen, new Point(x, y + BLOCK_SIZE), new Point(x + BLOCK_SIZE, y));
|
||||
}
|
||||
|
||||
if(newContext)
|
||||
@@ -398,7 +398,7 @@ namespace Aaru.Gui.Controls
|
||||
void CreateBitmap()
|
||||
{
|
||||
if(_maxBlocks == 0)
|
||||
_maxBlocks = (ulong)(Width / _blockSize * (Height / _blockSize));
|
||||
_maxBlocks = (ulong)(Width / BLOCK_SIZE * (Height / BLOCK_SIZE));
|
||||
|
||||
_bitmap?.Dispose();
|
||||
|
||||
@@ -415,15 +415,15 @@ namespace Aaru.Gui.Controls
|
||||
using IDrawingContextImpl ctxi = _bitmap.CreateDrawingContext(null);
|
||||
using var ctx = new DrawingContext(ctxi, false);
|
||||
|
||||
ulong clustersPerRow = (ulong)Width / _blockSize;
|
||||
ulong clustersPerRow = (ulong)Width / BLOCK_SIZE;
|
||||
|
||||
bool allBlocksDrawn = false;
|
||||
|
||||
for(ulong y = 0; y < Height && !allBlocksDrawn; y += _blockSize)
|
||||
for(ulong y = 0; y < Height && !allBlocksDrawn; y += BLOCK_SIZE)
|
||||
{
|
||||
for(ulong x = 0; x < Width; x += _blockSize)
|
||||
for(ulong x = 0; x < Width; x += BLOCK_SIZE)
|
||||
{
|
||||
ulong currentBlockValue = (y * clustersPerRow / _blockSize) + (x / _blockSize);
|
||||
ulong currentBlockValue = (y * clustersPerRow / BLOCK_SIZE) + (x / BLOCK_SIZE);
|
||||
|
||||
if(currentBlockValue >= _maxBlocks ||
|
||||
currentBlockValue >= Blocks)
|
||||
@@ -433,7 +433,7 @@ namespace Aaru.Gui.Controls
|
||||
break;
|
||||
}
|
||||
|
||||
ctx.DrawRectangle(new Pen(Foreground), new Rect(x, y, _blockSize, _blockSize));
|
||||
ctx.DrawRectangle(new Pen(Foreground), new Rect(x, y, BLOCK_SIZE, BLOCK_SIZE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Aaru.DiscImages
|
||||
{
|
||||
public sealed partial class Alcohol120
|
||||
{
|
||||
const byte _maximumSupportedVersion = 1;
|
||||
const byte MAXIMUM_SUPPORTED_VERSION = 1;
|
||||
readonly byte[] _alcoholSignature =
|
||||
{
|
||||
0x4d, 0x45, 0x44, 0x49, 0x41, 0x20, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x4f, 0x52
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Aaru.DiscImages
|
||||
stream.Read(hdr, 0, 88);
|
||||
Header header = Marshal.ByteArrayToStructureLittleEndian<Header>(hdr);
|
||||
|
||||
return header.signature.SequenceEqual(_alcoholSignature) && header.version[0] <= _maximumSupportedVersion;
|
||||
return header.signature.SequenceEqual(_alcoholSignature) && header.version[0] <= MAXIMUM_SUPPORTED_VERSION;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ namespace Aaru.DiscImages
|
||||
AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.sessionOffset = {0}", _header.sessionOffset);
|
||||
AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.dpmOffset = {0}", _header.dpmOffset);
|
||||
|
||||
if(_header.version[0] > _maximumSupportedVersion)
|
||||
if(_header.version[0] > MAXIMUM_SUPPORTED_VERSION)
|
||||
return false;
|
||||
|
||||
stream.Seek(_header.sessionOffset, SeekOrigin.Begin);
|
||||
|
||||
@@ -327,7 +327,7 @@ namespace Aaru.DiscImages
|
||||
AaruConsole.DebugWriteLine("CDRDAO plugin", "Found {1}_CHANNEL_AUDIO at line {0}", lineNumber,
|
||||
matchStereo.Groups["num"].Value);
|
||||
|
||||
currentTrack.Flag_4Ch |= inTrack && matchStereo.Groups["num"].Value == "FOUR";
|
||||
currentTrack.Flag4Ch |= inTrack && matchStereo.Groups["num"].Value == "FOUR";
|
||||
}
|
||||
else if(matchIsrc.Success)
|
||||
{
|
||||
@@ -640,7 +640,7 @@ namespace Aaru.DiscImages
|
||||
AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tPostgap: {0} sectors",
|
||||
_discimage.Tracks[i].Postgap);
|
||||
|
||||
if(_discimage.Tracks[i].Flag_4Ch)
|
||||
if(_discimage.Tracks[i].Flag4Ch)
|
||||
AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack is flagged as quadraphonic");
|
||||
|
||||
if(_discimage.Tracks[i].FlagDcp)
|
||||
@@ -1130,7 +1130,7 @@ namespace Aaru.DiscImages
|
||||
if(aaruTrack.FlagPre)
|
||||
flags |= CdFlags.PreEmphasis;
|
||||
|
||||
if(aaruTrack.Flag_4Ch)
|
||||
if(aaruTrack.Flag4Ch)
|
||||
flags |= CdFlags.FourChannel;
|
||||
|
||||
return new[]
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Aaru.DiscImages
|
||||
/// <summary>Digical Copy Permitted</summary>
|
||||
public bool FlagDcp;
|
||||
/// <summary>Track is quadraphonic</summary>
|
||||
public bool Flag_4Ch;
|
||||
public bool Flag4Ch;
|
||||
/// <summary>Track has preemphasis</summary>
|
||||
public bool FlagPre;
|
||||
/// <summary>Bytes per sector</summary>
|
||||
|
||||
@@ -620,7 +620,7 @@ namespace Aaru.DiscImages
|
||||
FeatureUnsupportedImageException($"Found FLAGS field in incorrect place at line {lineNumber}");
|
||||
|
||||
currentTrack.FlagDcp |= matchFlags.Groups["dcp"].Value == "DCP";
|
||||
currentTrack.Flag4ch |= matchFlags.Groups["quad"].Value == "4CH";
|
||||
currentTrack.Flag4Ch |= matchFlags.Groups["quad"].Value == "4CH";
|
||||
currentTrack.FlagPre |= matchFlags.Groups["pre"].Value == "PRE";
|
||||
currentTrack.FlagScms |= matchFlags.Groups["scms"].Value == "SCMS";
|
||||
}
|
||||
@@ -1174,7 +1174,7 @@ namespace Aaru.DiscImages
|
||||
AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tPostgap: {0} sectors",
|
||||
_discImage.Tracks[i].Postgap);
|
||||
|
||||
if(_discImage.Tracks[i].Flag4ch)
|
||||
if(_discImage.Tracks[i].Flag4Ch)
|
||||
AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack is flagged as quadraphonic");
|
||||
|
||||
if(_discImage.Tracks[i].FlagDcp)
|
||||
@@ -1831,7 +1831,7 @@ namespace Aaru.DiscImages
|
||||
if(aaruTrack.FlagPre)
|
||||
flags |= CdFlags.PreEmphasis;
|
||||
|
||||
if(aaruTrack.Flag4ch)
|
||||
if(aaruTrack.Flag4Ch)
|
||||
flags |= CdFlags.FourChannel;
|
||||
|
||||
return new[]
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Aaru.DiscImages
|
||||
/// <summary>Track composer (from CD-Text)</summary>
|
||||
public string Composer;
|
||||
/// <summary>Track is quadraphonic</summary>
|
||||
public bool Flag4ch;
|
||||
public bool Flag4Ch;
|
||||
/// <summary>Digital Copy Permitted</summary>
|
||||
public bool FlagDcp;
|
||||
/// <summary>Track has pre-emphasis</summary>
|
||||
|
||||
@@ -35,15 +35,15 @@ namespace Aaru.DiscImages
|
||||
public sealed partial class Cpcdsk
|
||||
{
|
||||
/// <summary>Identifier for CPCEMU disk images, "MV - CPC" + usually : "EMU Disk-File\r\nDisk-Info\r\n" but not required</summary>
|
||||
const string _cpcdskId = "MV - CPCEMU Disk-File";
|
||||
const string CPCDSK_ID = "MV - CPCEMU Disk-File";
|
||||
|
||||
/// <summary>Identifier for DU54 disk images, "MV - CPC format Disk Image (DU54)"</summary>
|
||||
const string _du54Id = "MV - CPC format Disk Image (DU54)";
|
||||
const string DU54_ID = "MV - CPC format Disk Image (DU54)";
|
||||
|
||||
/// <summary>Identifier for Extended CPCEMU disk images</summary>
|
||||
const string _edskId = "EXTENDED CPC DSK File";
|
||||
const string EDSK_ID = "EXTENDED CPC DSK File";
|
||||
|
||||
/// <summary>Identifier for track information, </summary>
|
||||
const string _trackId = "Track-Info";
|
||||
const string TRACK_ID = "Track-Info";
|
||||
}
|
||||
}
|
||||
@@ -68,9 +68,9 @@ namespace Aaru.DiscImages
|
||||
|
||||
AaruConsole.DebugWriteLine("CPCDSK plugin", "magic = \"{0}\"", magic);
|
||||
|
||||
return string.Compare(_cpcdskId, magic, StringComparison.InvariantCultureIgnoreCase) == 0 ||
|
||||
string.Compare(_edskId, magic, StringComparison.InvariantCultureIgnoreCase) == 0 ||
|
||||
string.Compare(_du54Id, magic, StringComparison.InvariantCultureIgnoreCase) == 0;
|
||||
return string.Compare(CPCDSK_ID, magic, StringComparison.InvariantCultureIgnoreCase) == 0 ||
|
||||
string.Compare(EDSK_ID, magic, StringComparison.InvariantCultureIgnoreCase) == 0 ||
|
||||
string.Compare(DU54_ID, magic, StringComparison.InvariantCultureIgnoreCase) == 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -79,12 +79,12 @@ namespace Aaru.DiscImages
|
||||
|
||||
DiskInfo header = Marshal.ByteArrayToStructureLittleEndian<DiskInfo>(headerB);
|
||||
|
||||
if(string.Compare(_cpcdskId, magic, StringComparison.InvariantCultureIgnoreCase) != 0 &&
|
||||
string.Compare(_edskId, magic, StringComparison.InvariantCultureIgnoreCase) != 0 &&
|
||||
string.Compare(_du54Id, magic, StringComparison.InvariantCultureIgnoreCase) != 0)
|
||||
if(string.Compare(CPCDSK_ID, magic, StringComparison.InvariantCultureIgnoreCase) != 0 &&
|
||||
string.Compare(EDSK_ID, magic, StringComparison.InvariantCultureIgnoreCase) != 0 &&
|
||||
string.Compare(DU54_ID, magic, StringComparison.InvariantCultureIgnoreCase) != 0)
|
||||
return false;
|
||||
|
||||
_extended = string.Compare(_edskId, magic, StringComparison.InvariantCultureIgnoreCase) == 0;
|
||||
_extended = string.Compare(EDSK_ID, magic, StringComparison.InvariantCultureIgnoreCase) == 0;
|
||||
AaruConsole.DebugWriteLine("CPCDSK plugin", "Extended = {0}", _extended);
|
||||
|
||||
AaruConsole.DebugWriteLine("CPCDSK plugin", "magic = \"{0}\"", magic);
|
||||
@@ -132,7 +132,7 @@ namespace Aaru.DiscImages
|
||||
stream.Read(trackB, 0, 256);
|
||||
TrackInfo trackInfo = Marshal.ByteArrayToStructureLittleEndian<TrackInfo>(trackB);
|
||||
|
||||
if(string.Compare(_trackId, Encoding.ASCII.GetString(trackInfo.magic),
|
||||
if(string.Compare(TRACK_ID, Encoding.ASCII.GetString(trackInfo.magic),
|
||||
StringComparison.InvariantCultureIgnoreCase) != 0)
|
||||
{
|
||||
AaruConsole.ErrorWriteLine("Not the expected track info.");
|
||||
|
||||
@@ -34,9 +34,9 @@ namespace Aaru.DiscImages
|
||||
{
|
||||
public sealed partial class CopyTape
|
||||
{
|
||||
const string _blockRegex = @"^CPTP:BLK (?<blockSize>\d{6})\n$";
|
||||
const string _partialBlockRegex = @"^CPTP:BLK $";
|
||||
const string _filemarkRegex = @"^CPTP:MRK\n$";
|
||||
const string _endOfTapeRegex = @"^CPTP:EOT\n$";
|
||||
const string BLOCK_REGEX = @"^CPTP:BLK (?<blockSize>\d{6})\n$";
|
||||
const string PARTIAL_BLOCK_REGEX = @"^CPTP:BLK $";
|
||||
const string FILEMARK_REGEX = @"^CPTP:MRK\n$";
|
||||
const string END_OF_TAPE_REGEX = @"^CPTP:EOT\n$";
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ namespace Aaru.DiscImages
|
||||
|
||||
string mark = Encoding.ASCII.GetString(header);
|
||||
|
||||
var blockRx = new Regex(_blockRegex);
|
||||
var blockRx = new Regex(BLOCK_REGEX);
|
||||
Match blockMt = blockRx.Match(mark);
|
||||
|
||||
if(!blockMt.Success)
|
||||
|
||||
@@ -48,10 +48,10 @@ namespace Aaru.DiscImages
|
||||
public bool Open(IFilter imageFilter)
|
||||
{
|
||||
List<long> blockPositions = new List<long>();
|
||||
var partialBlockRx = new Regex(_partialBlockRegex);
|
||||
var blockRx = new Regex(_blockRegex);
|
||||
var filemarkRx = new Regex(_filemarkRegex);
|
||||
var eotRx = new Regex(_endOfTapeRegex);
|
||||
var partialBlockRx = new Regex(PARTIAL_BLOCK_REGEX);
|
||||
var blockRx = new Regex(BLOCK_REGEX);
|
||||
var filemarkRx = new Regex(FILEMARK_REGEX);
|
||||
var eotRx = new Regex(END_OF_TAPE_REGEX);
|
||||
|
||||
if(imageFilter.GetDataForkLength() <= 16)
|
||||
return false;
|
||||
@@ -174,7 +174,7 @@ namespace Aaru.DiscImages
|
||||
_imageStream.Position = _blockPositionCache[sectorAddress];
|
||||
|
||||
byte[] blockHeader = new byte[16];
|
||||
var blockRx = new Regex(_blockRegex);
|
||||
var blockRx = new Regex(BLOCK_REGEX);
|
||||
|
||||
_imageStream.Read(blockHeader, 0, 16);
|
||||
string mark = Encoding.ASCII.GetString(blockHeader);
|
||||
|
||||
@@ -68,13 +68,13 @@ namespace Aaru.DiscImages
|
||||
|
||||
// seek to start of the trackmap
|
||||
stream.Seek(TRACKMAP_OFFSET, SeekOrigin.Begin);
|
||||
numTracks = diskTypes[fHeader.diskType].cyl * diskTypes[fHeader.diskType].hd;
|
||||
trackLen = 512 * diskTypes[fHeader.diskType].spt;
|
||||
numTracks = _diskTypes[fHeader.diskType].cyl * _diskTypes[fHeader.diskType].hd;
|
||||
trackLen = 512 * _diskTypes[fHeader.diskType].spt;
|
||||
trackMap = new TrackInfo[numTracks];
|
||||
trackOffsets = new long[numTracks];
|
||||
|
||||
AaruConsole.DebugWriteLine("DiskDupe plugin", "Identified image with C/H/S = {0}/{1}/{2}",
|
||||
diskTypes[fHeader.diskType].cyl, diskTypes[fHeader.diskType].hd, diskTypes[fHeader.diskType].spt);
|
||||
_diskTypes[fHeader.diskType].cyl, _diskTypes[fHeader.diskType].hd, _diskTypes[fHeader.diskType].spt);
|
||||
|
||||
// read the trackmap and store the track offsets
|
||||
for (int i = 0; i < numTracks; i++)
|
||||
|
||||
@@ -58,11 +58,11 @@ namespace Aaru.DiscImages
|
||||
|
||||
AaruConsole.DebugWriteLine("DiskDupe Plugin",
|
||||
"Detected DiskDupe DDI image with {0} tracks and {1} sectors per track.",
|
||||
diskTypes[fHeader.diskType].cyl, diskTypes[fHeader.diskType].spt);
|
||||
_diskTypes[fHeader.diskType].cyl, _diskTypes[fHeader.diskType].spt);
|
||||
|
||||
_imageInfo.Cylinders = diskTypes[fHeader.diskType].cyl;
|
||||
_imageInfo.Heads = diskTypes[fHeader.diskType].hd;
|
||||
_imageInfo.SectorsPerTrack = diskTypes[fHeader.diskType].spt;
|
||||
_imageInfo.Cylinders = _diskTypes[fHeader.diskType].cyl;
|
||||
_imageInfo.Heads = _diskTypes[fHeader.diskType].hd;
|
||||
_imageInfo.SectorsPerTrack = _diskTypes[fHeader.diskType].spt;
|
||||
_imageInfo.SectorSize = 512; // only 512 bytes per sector supported
|
||||
_imageInfo.Sectors = _imageInfo.Heads * _imageInfo.Cylinders * _imageInfo.SectorsPerTrack;
|
||||
_imageInfo.ImageSize = _imageInfo.Sectors * _imageInfo.SectorSize;
|
||||
|
||||
@@ -39,13 +39,14 @@ namespace Aaru.DiscImages
|
||||
[SuppressMessage("ReSharper", "UnusedType.Local")]
|
||||
public sealed partial class DiskDupe
|
||||
{
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
struct DiskType {
|
||||
public byte cyl;
|
||||
public byte hd;
|
||||
public byte spt;
|
||||
}
|
||||
|
||||
readonly DiskType[] diskTypes = {
|
||||
readonly DiskType[] _diskTypes = {
|
||||
new DiskType { cyl = 0, hd = 0, spt = 0 }, // Type 0 - invalid
|
||||
new DiskType { cyl = 40, hd = 2, spt = 9 }, // Type 1 - 360k
|
||||
new DiskType { cyl = 80, hd = 2, spt = 15 }, // Type 2 - 1.2m
|
||||
|
||||
@@ -52,16 +52,16 @@ namespace Aaru.DiscImages
|
||||
byte[] hdr = new byte[stream.Length < 256 ? stream.Length : 256];
|
||||
stream.Read(hdr, 0, hdr.Length);
|
||||
|
||||
string hdr_str = StringHandlers.CToString(hdr, Encoding.ASCII);
|
||||
string hdrStr = StringHandlers.CToString(hdr, Encoding.ASCII);
|
||||
|
||||
// IMD for DOS
|
||||
Match imd = new Regex(REGEX_HEADER).Match(hdr_str);
|
||||
Match imd = new Regex(REGEX_HEADER).Match(hdrStr);
|
||||
|
||||
// SAMdisk
|
||||
Match sam = new Regex(REGEX_SAMDISK).Match(hdr_str);
|
||||
Match sam = new Regex(REGEX_SAMDISK).Match(hdrStr);
|
||||
|
||||
// z88dk
|
||||
Match z88dk = new Regex(REGEX_Z88DK).Match(hdr_str);
|
||||
Match z88dk = new Regex(REGEX_Z88DK).Match(hdrStr);
|
||||
|
||||
return imd.Success || sam.Success || z88dk.Success;
|
||||
}
|
||||
|
||||
@@ -37,15 +37,15 @@ namespace Aaru.DiscImages
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
public sealed partial class KryoFlux
|
||||
{
|
||||
const string _hostDate = "host_date";
|
||||
const string _hostTime = "host_time";
|
||||
const string _kfName = "name";
|
||||
const string _kfVersion = "version";
|
||||
const string _kfDate = "date";
|
||||
const string _kfTime = "time";
|
||||
const string _kfHwId = "hwid";
|
||||
const string _kfHwRv = "hwrv";
|
||||
const string _kfSck = "sck";
|
||||
const string _kfIck = "ick";
|
||||
const string HOST_DATE = "host_date";
|
||||
const string HOST_TIME = "host_time";
|
||||
const string KF_NAME = "name";
|
||||
const string KF_VERSION = "version";
|
||||
const string KF_DATE = "date";
|
||||
const string KF_TIME = "time";
|
||||
const string KF_HW_ID = "hwid";
|
||||
const string KF_HW_RV = "hwrv";
|
||||
const string KF_SCK = "sck";
|
||||
const string KF_ICK = "ick";
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ namespace Aaru.DiscImages
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
public sealed partial class KryoFlux
|
||||
{
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
enum BlockIds : byte
|
||||
{
|
||||
Flux2 = 0x00, Flux2_1 = 0x01, Flux2_2 = 0x02,
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Aaru.DiscImages
|
||||
// TODO: These variables have been made public so create-sidecar can access to this information until I define an API >4.0
|
||||
public SortedDictionary<byte, IFilter> tracks;
|
||||
|
||||
public KryoFlux() => imageInfo = new ImageInfo
|
||||
public KryoFlux() => _imageInfo = new ImageInfo
|
||||
{
|
||||
ReadableSectorTags = new List<SectorTagType>(),
|
||||
ReadableMediaTags = new List<MediaTagType>(),
|
||||
|
||||
@@ -39,9 +39,9 @@ namespace Aaru.DiscImages
|
||||
{
|
||||
public sealed partial class KryoFlux
|
||||
{
|
||||
ImageInfo imageInfo;
|
||||
ImageInfo _imageInfo;
|
||||
/// <inheritdoc />
|
||||
public ImageInfo Info => imageInfo;
|
||||
public ImageInfo Info => _imageInfo;
|
||||
/// <inheritdoc />
|
||||
public string Author => "Natalia Portillo";
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -132,8 +132,8 @@ namespace Aaru.DiscImages
|
||||
if(!trackFilter.IsOpened())
|
||||
throw new IOException("Could not open KryoFlux track file.");
|
||||
|
||||
imageInfo.CreationTime = DateTime.MaxValue;
|
||||
imageInfo.LastModificationTime = DateTime.MinValue;
|
||||
_imageInfo.CreationTime = DateTime.MaxValue;
|
||||
_imageInfo.LastModificationTime = DateTime.MinValue;
|
||||
|
||||
Stream trackStream = trackFilter.GetDataForkStream();
|
||||
|
||||
@@ -187,23 +187,23 @@ namespace Aaru.DiscImages
|
||||
|
||||
switch(kvp[0])
|
||||
{
|
||||
case _hostDate:
|
||||
case HOST_DATE:
|
||||
if(DateTime.TryParseExact(kvp[1], "yyyy.MM.dd", CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.AssumeLocal, out blockDate))
|
||||
foundDate = true;
|
||||
|
||||
break;
|
||||
case _hostTime:
|
||||
case HOST_TIME:
|
||||
DateTime.TryParseExact(kvp[1], "HH:mm:ss", CultureInfo.InvariantCulture,
|
||||
DateTimeStyles.AssumeLocal, out blockTime);
|
||||
|
||||
break;
|
||||
case _kfName:
|
||||
imageInfo.Application = kvp[1];
|
||||
case KF_NAME:
|
||||
_imageInfo.Application = kvp[1];
|
||||
|
||||
break;
|
||||
case _kfVersion:
|
||||
imageInfo.ApplicationVersion = kvp[1];
|
||||
case KF_VERSION:
|
||||
_imageInfo.ApplicationVersion = kvp[1];
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -217,10 +217,10 @@ namespace Aaru.DiscImages
|
||||
AaruConsole.DebugWriteLine("KryoFlux plugin", "Found timestamp: {0}", blockTimestamp);
|
||||
|
||||
if(blockTimestamp < Info.CreationTime)
|
||||
imageInfo.CreationTime = blockTimestamp;
|
||||
_imageInfo.CreationTime = blockTimestamp;
|
||||
|
||||
if(blockTimestamp > Info.LastModificationTime)
|
||||
imageInfo.LastModificationTime = blockTimestamp;
|
||||
_imageInfo.LastModificationTime = blockTimestamp;
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -249,8 +249,8 @@ namespace Aaru.DiscImages
|
||||
tracks.Add(t, trackFilter);
|
||||
}
|
||||
|
||||
imageInfo.Heads = heads;
|
||||
imageInfo.Cylinders = (uint)(tracks.Count / heads);
|
||||
_imageInfo.Heads = heads;
|
||||
_imageInfo.Cylinders = (uint)(tracks.Count / heads);
|
||||
|
||||
throw new NotImplementedException("Flux decoding is not yet implemented.");
|
||||
}
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace Aaru.DiscImages
|
||||
const ushort TD_ADV_COMP_MAGIC = 0x6474;
|
||||
|
||||
// DataRates
|
||||
const byte DATA_RATE_250KBPS = 0x00;
|
||||
const byte DATA_RATE_300KBPS = 0x01;
|
||||
const byte DATA_RATE_500KBPS = 0x02;
|
||||
const byte DATA_RATE_250_KBPS = 0x00;
|
||||
const byte DATA_RATE_300_KBPS = 0x01;
|
||||
const byte DATA_RATE_500_KBPS = 0x02;
|
||||
|
||||
// TeleDisk drive types
|
||||
const byte DRIVE_TYPE_525_HD_DD_DISK = 0x00;
|
||||
@@ -72,10 +72,12 @@ namespace Aaru.DiscImages
|
||||
const byte SECTOR_SIZE_128 = 0x00;
|
||||
const byte SECTOR_SIZE_256 = 0x01;
|
||||
const byte SECTOR_SIZE_512 = 0x02;
|
||||
// ReSharper disable InconsistentNaming
|
||||
const byte SECTOR_SIZE_1K = 0x03;
|
||||
const byte SECTOR_SIZE_2K = 0x04;
|
||||
const byte SECTOR_SIZE_4K = 0x05;
|
||||
const byte SECTOR_SIZE_8K = 0x06;
|
||||
// ReSharper restore InconsistentNaming
|
||||
|
||||
// Flags
|
||||
// Address mark repeats inside same track
|
||||
|
||||
@@ -91,9 +91,9 @@ namespace Aaru.DiscImages
|
||||
if(_header.Sequence != 0x00)
|
||||
return false;
|
||||
|
||||
if(_header.DataRate != DATA_RATE_250KBPS &&
|
||||
_header.DataRate != DATA_RATE_300KBPS &&
|
||||
_header.DataRate != DATA_RATE_500KBPS)
|
||||
if(_header.DataRate != DATA_RATE_250_KBPS &&
|
||||
_header.DataRate != DATA_RATE_300_KBPS &&
|
||||
_header.DataRate != DATA_RATE_500_KBPS)
|
||||
return false;
|
||||
|
||||
return _header.DriveType == DRIVE_TYPE_35_DD || _header.DriveType == DRIVE_TYPE_35_ED ||
|
||||
|
||||
@@ -104,9 +104,9 @@ namespace Aaru.DiscImages
|
||||
if(_header.Sequence != 0x00)
|
||||
return false;
|
||||
|
||||
if(_header.DataRate != DATA_RATE_250KBPS &&
|
||||
_header.DataRate != DATA_RATE_300KBPS &&
|
||||
_header.DataRate != DATA_RATE_500KBPS)
|
||||
if(_header.DataRate != DATA_RATE_250_KBPS &&
|
||||
_header.DataRate != DATA_RATE_300_KBPS &&
|
||||
_header.DataRate != DATA_RATE_500_KBPS)
|
||||
return false;
|
||||
|
||||
if(_header.DriveType != DRIVE_TYPE_35_DD &&
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Aaru.DiscImages
|
||||
FileHeader fheader = Marshal.ByteArrayToStructureLittleEndian<FileHeader>(header);
|
||||
|
||||
/* check the signature */
|
||||
if(Encoding.ASCII.GetString(fheader.signature).TrimEnd('\x00') != _fileSignature)
|
||||
if(Encoding.ASCII.GetString(fheader.signature).TrimEnd('\x00') != FILE_SIGNATURE)
|
||||
return false;
|
||||
|
||||
/* Some sanity checks on the values we just read. */
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Aaru.DiscImages
|
||||
public sealed partial class WCDiskImage
|
||||
{
|
||||
/// <summary>The expected signature of a proper image file.</summary>
|
||||
const string _fileSignature = "WC DISK IMAGE\x1a\x1a";
|
||||
const string FILE_SIGNATURE = "WC DISK IMAGE\x1a\x1a";
|
||||
|
||||
/// <summary>The global header of a WCDiskImage file</summary>
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
|
||||
@@ -1530,28 +1530,28 @@ namespace Aaru.DiscImages
|
||||
if(sectorAddress + length > _imageInfo.Sectors)
|
||||
throw new ArgumentOutOfRangeException(nameof(length), "Requested more sectors than available");
|
||||
|
||||
const uint SECTOR_SIZE = 2352;
|
||||
const uint sectorSize = 2352;
|
||||
uint sectorSkip = 0;
|
||||
|
||||
if(_hasSubchannel)
|
||||
sectorSkip += 96;
|
||||
|
||||
byte[] buffer = new byte[SECTOR_SIZE * length];
|
||||
byte[] buffer = new byte[sectorSize * length];
|
||||
|
||||
Stream stream = _rawImageFilter.GetDataForkStream();
|
||||
var br = new BinaryReader(stream);
|
||||
|
||||
br.BaseStream.Seek((long)(sectorAddress * (SECTOR_SIZE + sectorSkip)), SeekOrigin.Begin);
|
||||
br.BaseStream.Seek((long)(sectorAddress * (sectorSize + sectorSkip)), SeekOrigin.Begin);
|
||||
|
||||
if(sectorSkip == 0)
|
||||
buffer = br.ReadBytes((int)(SECTOR_SIZE * length));
|
||||
buffer = br.ReadBytes((int)(sectorSize * length));
|
||||
else
|
||||
for(int i = 0; i < length; i++)
|
||||
{
|
||||
byte[] sector = br.ReadBytes((int)SECTOR_SIZE);
|
||||
byte[] sector = br.ReadBytes((int)sectorSize);
|
||||
br.BaseStream.Seek(sectorSkip, SeekOrigin.Current);
|
||||
|
||||
Array.Copy(sector, 0, buffer, i * SECTOR_SIZE, SECTOR_SIZE);
|
||||
Array.Copy(sector, 0, buffer, i * sectorSize, sectorSize);
|
||||
}
|
||||
|
||||
return buffer;
|
||||
|
||||
@@ -47,18 +47,18 @@ namespace Aaru.Partitions
|
||||
/// </summary>
|
||||
public sealed class AtariPartitions : IPartition
|
||||
{
|
||||
const uint TypeGEMDOS = 0x0047454D;
|
||||
const uint TypeBigGEMDOS = 0x0042474D;
|
||||
const uint TypeExtended = 0x0058474D;
|
||||
const uint TypeLinux = 0x004C4E58;
|
||||
const uint TypeSwap = 0x00535750;
|
||||
const uint TypeRAW = 0x00524157;
|
||||
const uint TypeNetBSD = 0x004E4244;
|
||||
const uint TypeNetBSDSwap = 0x004E4253;
|
||||
const uint TypeSysV = 0x00554E58;
|
||||
const uint TypeMac = 0x004D4143;
|
||||
const uint TypeMinix = 0x004D4958;
|
||||
const uint TypeMinix2 = 0x004D4E58;
|
||||
const uint TYPE_GEMDOS = 0x0047454D;
|
||||
const uint TYPE_BIG_GEMDOS = 0x0042474D;
|
||||
const uint TYPE_EXTENDED = 0x0058474D;
|
||||
const uint TYPE_LINUX = 0x004C4E58;
|
||||
const uint TYPE_SWAP = 0x00535750;
|
||||
const uint TYPE_RAW = 0x00524157;
|
||||
const uint TYPE_NETBSD = 0x004E4244;
|
||||
const uint TYPE_NETBSD_SWAP = 0x004E4253;
|
||||
const uint TYPE_SYSTEM_V = 0x00554E58;
|
||||
const uint TYPE_MAC = 0x004D4143;
|
||||
const uint TYPE_MINIX = 0x004D4958;
|
||||
const uint TYPE_MINIX2 = 0x004D4E58;
|
||||
|
||||
/// <inheritdoc />
|
||||
public string Name => "Atari partitions";
|
||||
@@ -79,101 +79,101 @@ namespace Aaru.Partitions
|
||||
|
||||
var table = new AtariTable
|
||||
{
|
||||
boot = new byte[342],
|
||||
icdEntries = new AtariEntry[8],
|
||||
unused = new byte[12],
|
||||
entries = new AtariEntry[4]
|
||||
Boot = new byte[342],
|
||||
IcdEntries = new AtariEntry[8],
|
||||
Unused = new byte[12],
|
||||
Entries = new AtariEntry[4]
|
||||
};
|
||||
|
||||
Array.Copy(sector, 0, table.boot, 0, 342);
|
||||
Array.Copy(sector, 0, table.Boot, 0, 342);
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
table.icdEntries[i].type = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 0);
|
||||
table.icdEntries[i].start = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 4);
|
||||
table.icdEntries[i].length = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 8);
|
||||
table.IcdEntries[i].Type = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 0);
|
||||
table.IcdEntries[i].Start = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 4);
|
||||
table.IcdEntries[i].Length = BigEndianBitConverter.ToUInt32(sector, 342 + (i * 12) + 8);
|
||||
}
|
||||
|
||||
Array.Copy(sector, 438, table.unused, 0, 12);
|
||||
Array.Copy(sector, 438, table.Unused, 0, 12);
|
||||
|
||||
table.size = BigEndianBitConverter.ToUInt32(sector, 450);
|
||||
table.Size = BigEndianBitConverter.ToUInt32(sector, 450);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
table.entries[i].type = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 0);
|
||||
table.entries[i].start = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 4);
|
||||
table.entries[i].length = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 8);
|
||||
table.Entries[i].Type = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 0);
|
||||
table.Entries[i].Start = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 4);
|
||||
table.Entries[i].Length = BigEndianBitConverter.ToUInt32(sector, 454 + (i * 12) + 8);
|
||||
}
|
||||
|
||||
table.badStart = BigEndianBitConverter.ToUInt32(sector, 502);
|
||||
table.badLength = BigEndianBitConverter.ToUInt32(sector, 506);
|
||||
table.checksum = BigEndianBitConverter.ToUInt16(sector, 510);
|
||||
table.BadStart = BigEndianBitConverter.ToUInt32(sector, 502);
|
||||
table.BadLength = BigEndianBitConverter.ToUInt32(sector, 506);
|
||||
table.Checksum = BigEndianBitConverter.ToUInt16(sector, 510);
|
||||
|
||||
var sha1Ctx = new Sha1Context();
|
||||
sha1Ctx.Update(table.boot);
|
||||
sha1Ctx.Update(table.Boot);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "Boot code SHA1: {0}", sha1Ctx.End());
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].flag = 0x{1:X2}", i,
|
||||
(table.icdEntries[i].type & 0xFF000000) >> 24);
|
||||
(table.IcdEntries[i].Type & 0xFF000000) >> 24);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].type = 0x{1:X6}", i,
|
||||
table.icdEntries[i].type & 0x00FFFFFF);
|
||||
table.IcdEntries[i].Type & 0x00FFFFFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].start = {1}", i,
|
||||
table.icdEntries[i].start);
|
||||
table.IcdEntries[i].Start);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].length = {1}", i,
|
||||
table.icdEntries[i].length);
|
||||
table.IcdEntries[i].Length);
|
||||
}
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.size = {0}", table.size);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.size = {0}", table.Size);
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].flag = 0x{1:X2}", i,
|
||||
(table.entries[i].type & 0xFF000000) >> 24);
|
||||
(table.Entries[i].Type & 0xFF000000) >> 24);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].type = 0x{1:X6}", i,
|
||||
table.entries[i].type & 0x00FFFFFF);
|
||||
table.Entries[i].Type & 0x00FFFFFF);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].start = {1}", i,
|
||||
table.entries[i].start);
|
||||
table.Entries[i].Start);
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].length = {1}", i,
|
||||
table.entries[i].length);
|
||||
table.Entries[i].Length);
|
||||
}
|
||||
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.badStart = {0}", table.badStart);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.badLength = {0}", table.badLength);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.checksum = 0x{0:X4}", table.checksum);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.badStart = {0}", table.BadStart);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.badLength = {0}", table.BadLength);
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin", "table.checksum = 0x{0:X4}", table.Checksum);
|
||||
|
||||
bool validTable = false;
|
||||
ulong partitionSequence = 0;
|
||||
|
||||
for(int i = 0; i < 4; i++)
|
||||
{
|
||||
uint type = table.entries[i].type & 0x00FFFFFF;
|
||||
uint type = table.Entries[i].Type & 0x00FFFFFF;
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TypeGEMDOS:
|
||||
case TypeBigGEMDOS:
|
||||
case TypeLinux:
|
||||
case TypeSwap:
|
||||
case TypeRAW:
|
||||
case TypeNetBSD:
|
||||
case TypeNetBSDSwap:
|
||||
case TypeSysV:
|
||||
case TypeMac:
|
||||
case TypeMinix:
|
||||
case TypeMinix2:
|
||||
case TYPE_GEMDOS:
|
||||
case TYPE_BIG_GEMDOS:
|
||||
case TYPE_LINUX:
|
||||
case TYPE_SWAP:
|
||||
case TYPE_RAW:
|
||||
case TYPE_NETBSD:
|
||||
case TYPE_NETBSD_SWAP:
|
||||
case TYPE_SYSTEM_V:
|
||||
case TYPE_MAC:
|
||||
case TYPE_MINIX:
|
||||
case TYPE_MINIX2:
|
||||
validTable = true;
|
||||
|
||||
if(table.entries[i].start <= imagePlugin.Info.Sectors)
|
||||
if(table.Entries[i].Start <= imagePlugin.Info.Sectors)
|
||||
{
|
||||
if(table.entries[i].start + table.entries[i].length > imagePlugin.Info.Sectors)
|
||||
if(table.Entries[i].Start + table.Entries[i].Length > imagePlugin.Info.Sectors)
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin",
|
||||
"WARNING: End of partition goes beyond device size");
|
||||
|
||||
@@ -190,56 +190,56 @@ namespace Aaru.Partitions
|
||||
|
||||
var part = new Partition
|
||||
{
|
||||
Size = table.entries[i].length * sectorSize,
|
||||
Length = table.entries[i].length,
|
||||
Size = table.Entries[i].Length * sectorSize,
|
||||
Length = table.Entries[i].Length,
|
||||
Sequence = partitionSequence,
|
||||
Name = "",
|
||||
Offset = table.entries[i].start * sectorSize,
|
||||
Start = table.entries[i].start,
|
||||
Offset = table.Entries[i].Start * sectorSize,
|
||||
Start = table.Entries[i].Start,
|
||||
Type = Encoding.ASCII.GetString(partType),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TypeGEMDOS:
|
||||
case TYPE_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition";
|
||||
|
||||
break;
|
||||
case TypeBigGEMDOS:
|
||||
case TYPE_BIG_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition bigger than 32 MiB";
|
||||
|
||||
break;
|
||||
case TypeLinux:
|
||||
case TYPE_LINUX:
|
||||
part.Description = "Linux partition";
|
||||
|
||||
break;
|
||||
case TypeSwap:
|
||||
case TYPE_SWAP:
|
||||
part.Description = "Swap partition";
|
||||
|
||||
break;
|
||||
case TypeRAW:
|
||||
case TYPE_RAW:
|
||||
part.Description = "RAW partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSD:
|
||||
case TYPE_NETBSD:
|
||||
part.Description = "NetBSD partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSDSwap:
|
||||
case TYPE_NETBSD_SWAP:
|
||||
part.Description = "NetBSD swap partition";
|
||||
|
||||
break;
|
||||
case TypeSysV:
|
||||
case TYPE_SYSTEM_V:
|
||||
part.Description = "Atari UNIX partition";
|
||||
|
||||
break;
|
||||
case TypeMac:
|
||||
case TYPE_MAC:
|
||||
part.Description = "Macintosh partition";
|
||||
|
||||
break;
|
||||
case TypeMinix:
|
||||
case TypeMinix2:
|
||||
case TYPE_MINIX:
|
||||
case TYPE_MINIX2:
|
||||
part.Description = "MINIX partition";
|
||||
|
||||
break;
|
||||
@@ -254,46 +254,46 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
break;
|
||||
case TypeExtended:
|
||||
byte[] extendedSector = imagePlugin.ReadSector(table.entries[i].start);
|
||||
case TYPE_EXTENDED:
|
||||
byte[] extendedSector = imagePlugin.ReadSector(table.Entries[i].Start);
|
||||
var extendedTable = new AtariTable();
|
||||
extendedTable.entries = new AtariEntry[4];
|
||||
extendedTable.Entries = new AtariEntry[4];
|
||||
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
extendedTable.entries[j].type =
|
||||
extendedTable.Entries[j].Type =
|
||||
BigEndianBitConverter.ToUInt32(extendedSector, 454 + (j * 12) + 0);
|
||||
|
||||
extendedTable.entries[j].start =
|
||||
extendedTable.Entries[j].Start =
|
||||
BigEndianBitConverter.ToUInt32(extendedSector, 454 + (j * 12) + 4);
|
||||
|
||||
extendedTable.entries[j].length =
|
||||
extendedTable.Entries[j].Length =
|
||||
BigEndianBitConverter.ToUInt32(extendedSector, 454 + (j * 12) + 8);
|
||||
}
|
||||
|
||||
for(int j = 0; j < 4; j++)
|
||||
{
|
||||
uint extendedType = extendedTable.entries[j].type & 0x00FFFFFF;
|
||||
uint extendedType = extendedTable.Entries[j].Type & 0x00FFFFFF;
|
||||
|
||||
if(extendedType != TypeGEMDOS &&
|
||||
extendedType != TypeBigGEMDOS &&
|
||||
extendedType != TypeLinux &&
|
||||
extendedType != TypeSwap &&
|
||||
extendedType != TypeRAW &&
|
||||
extendedType != TypeNetBSD &&
|
||||
extendedType != TypeNetBSDSwap &&
|
||||
extendedType != TypeSysV &&
|
||||
extendedType != TypeMac &&
|
||||
extendedType != TypeMinix &&
|
||||
extendedType != TypeMinix2)
|
||||
if(extendedType != TYPE_GEMDOS &&
|
||||
extendedType != TYPE_BIG_GEMDOS &&
|
||||
extendedType != TYPE_LINUX &&
|
||||
extendedType != TYPE_SWAP &&
|
||||
extendedType != TYPE_RAW &&
|
||||
extendedType != TYPE_NETBSD &&
|
||||
extendedType != TYPE_NETBSD_SWAP &&
|
||||
extendedType != TYPE_SYSTEM_V &&
|
||||
extendedType != TYPE_MAC &&
|
||||
extendedType != TYPE_MINIX &&
|
||||
extendedType != TYPE_MINIX2)
|
||||
continue;
|
||||
|
||||
validTable = true;
|
||||
|
||||
if(extendedTable.entries[j].start > imagePlugin.Info.Sectors)
|
||||
if(extendedTable.Entries[j].Start > imagePlugin.Info.Sectors)
|
||||
continue;
|
||||
|
||||
if(extendedTable.entries[j].start + extendedTable.entries[j].length >
|
||||
if(extendedTable.Entries[j].Start + extendedTable.Entries[j].Length >
|
||||
imagePlugin.Info.Sectors)
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin",
|
||||
"WARNING: End of partition goes beyond device size");
|
||||
@@ -311,56 +311,56 @@ namespace Aaru.Partitions
|
||||
|
||||
var part = new Partition
|
||||
{
|
||||
Size = extendedTable.entries[j].length * sectorSize,
|
||||
Length = extendedTable.entries[j].length,
|
||||
Size = extendedTable.Entries[j].Length * sectorSize,
|
||||
Length = extendedTable.Entries[j].Length,
|
||||
Sequence = partitionSequence,
|
||||
Name = "",
|
||||
Offset = extendedTable.entries[j].start * sectorSize,
|
||||
Start = extendedTable.entries[j].start,
|
||||
Offset = extendedTable.Entries[j].Start * sectorSize,
|
||||
Start = extendedTable.Entries[j].Start,
|
||||
Type = Encoding.ASCII.GetString(partType),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
switch(extendedType)
|
||||
{
|
||||
case TypeGEMDOS:
|
||||
case TYPE_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition";
|
||||
|
||||
break;
|
||||
case TypeBigGEMDOS:
|
||||
case TYPE_BIG_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition bigger than 32 MiB";
|
||||
|
||||
break;
|
||||
case TypeLinux:
|
||||
case TYPE_LINUX:
|
||||
part.Description = "Linux partition";
|
||||
|
||||
break;
|
||||
case TypeSwap:
|
||||
case TYPE_SWAP:
|
||||
part.Description = "Swap partition";
|
||||
|
||||
break;
|
||||
case TypeRAW:
|
||||
case TYPE_RAW:
|
||||
part.Description = "RAW partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSD:
|
||||
case TYPE_NETBSD:
|
||||
part.Description = "NetBSD partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSDSwap:
|
||||
case TYPE_NETBSD_SWAP:
|
||||
part.Description = "NetBSD swap partition";
|
||||
|
||||
break;
|
||||
case TypeSysV:
|
||||
case TYPE_SYSTEM_V:
|
||||
part.Description = "Atari UNIX partition";
|
||||
|
||||
break;
|
||||
case TypeMac:
|
||||
case TYPE_MAC:
|
||||
part.Description = "Macintosh partition";
|
||||
|
||||
break;
|
||||
case TypeMinix:
|
||||
case TypeMinix2:
|
||||
case TYPE_MINIX:
|
||||
case TYPE_MINIX2:
|
||||
part.Description = "MINIX partition";
|
||||
|
||||
break;
|
||||
@@ -383,25 +383,25 @@ namespace Aaru.Partitions
|
||||
|
||||
for(int i = 0; i < 8; i++)
|
||||
{
|
||||
uint type = table.icdEntries[i].type & 0x00FFFFFF;
|
||||
uint type = table.IcdEntries[i].Type & 0x00FFFFFF;
|
||||
|
||||
if(type != TypeGEMDOS &&
|
||||
type != TypeBigGEMDOS &&
|
||||
type != TypeLinux &&
|
||||
type != TypeSwap &&
|
||||
type != TypeRAW &&
|
||||
type != TypeNetBSD &&
|
||||
type != TypeNetBSDSwap &&
|
||||
type != TypeSysV &&
|
||||
type != TypeMac &&
|
||||
type != TypeMinix &&
|
||||
type != TypeMinix2)
|
||||
if(type != TYPE_GEMDOS &&
|
||||
type != TYPE_BIG_GEMDOS &&
|
||||
type != TYPE_LINUX &&
|
||||
type != TYPE_SWAP &&
|
||||
type != TYPE_RAW &&
|
||||
type != TYPE_NETBSD &&
|
||||
type != TYPE_NETBSD_SWAP &&
|
||||
type != TYPE_SYSTEM_V &&
|
||||
type != TYPE_MAC &&
|
||||
type != TYPE_MINIX &&
|
||||
type != TYPE_MINIX2)
|
||||
continue;
|
||||
|
||||
if(table.icdEntries[i].start > imagePlugin.Info.Sectors)
|
||||
if(table.IcdEntries[i].Start > imagePlugin.Info.Sectors)
|
||||
continue;
|
||||
|
||||
if(table.icdEntries[i].start + table.icdEntries[i].length > imagePlugin.Info.Sectors)
|
||||
if(table.IcdEntries[i].Start + table.IcdEntries[i].Length > imagePlugin.Info.Sectors)
|
||||
AaruConsole.DebugWriteLine("Atari partition plugin",
|
||||
"WARNING: End of partition goes beyond device size");
|
||||
|
||||
@@ -418,56 +418,56 @@ namespace Aaru.Partitions
|
||||
|
||||
var part = new Partition
|
||||
{
|
||||
Size = table.icdEntries[i].length * sectorSize,
|
||||
Length = table.icdEntries[i].length,
|
||||
Size = table.IcdEntries[i].Length * sectorSize,
|
||||
Length = table.IcdEntries[i].Length,
|
||||
Sequence = partitionSequence,
|
||||
Name = "",
|
||||
Offset = table.icdEntries[i].start * sectorSize,
|
||||
Start = table.icdEntries[i].start,
|
||||
Offset = table.IcdEntries[i].Start * sectorSize,
|
||||
Start = table.IcdEntries[i].Start,
|
||||
Type = Encoding.ASCII.GetString(partType),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case TypeGEMDOS:
|
||||
case TYPE_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition";
|
||||
|
||||
break;
|
||||
case TypeBigGEMDOS:
|
||||
case TYPE_BIG_GEMDOS:
|
||||
part.Description = "Atari GEMDOS partition bigger than 32 MiB";
|
||||
|
||||
break;
|
||||
case TypeLinux:
|
||||
case TYPE_LINUX:
|
||||
part.Description = "Linux partition";
|
||||
|
||||
break;
|
||||
case TypeSwap:
|
||||
case TYPE_SWAP:
|
||||
part.Description = "Swap partition";
|
||||
|
||||
break;
|
||||
case TypeRAW:
|
||||
case TYPE_RAW:
|
||||
part.Description = "RAW partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSD:
|
||||
case TYPE_NETBSD:
|
||||
part.Description = "NetBSD partition";
|
||||
|
||||
break;
|
||||
case TypeNetBSDSwap:
|
||||
case TYPE_NETBSD_SWAP:
|
||||
part.Description = "NetBSD swap partition";
|
||||
|
||||
break;
|
||||
case TypeSysV:
|
||||
case TYPE_SYSTEM_V:
|
||||
part.Description = "Atari UNIX partition";
|
||||
|
||||
break;
|
||||
case TypeMac:
|
||||
case TYPE_MAC:
|
||||
part.Description = "Macintosh partition";
|
||||
|
||||
break;
|
||||
case TypeMinix:
|
||||
case TypeMinix2:
|
||||
case TYPE_MINIX:
|
||||
case TYPE_MINIX2:
|
||||
part.Description = "MINIX partition";
|
||||
|
||||
break;
|
||||
@@ -488,31 +488,31 @@ namespace Aaru.Partitions
|
||||
struct AtariEntry
|
||||
{
|
||||
/// <summary>First byte flag, three bytes type in ASCII. Flag bit 0 = active Flag bit 7 = bootable</summary>
|
||||
public uint type;
|
||||
public uint Type;
|
||||
/// <summary>Starting sector</summary>
|
||||
public uint start;
|
||||
public uint Start;
|
||||
/// <summary>Length in sectors</summary>
|
||||
public uint length;
|
||||
public uint Length;
|
||||
}
|
||||
|
||||
struct AtariTable
|
||||
{
|
||||
/// <summary>Boot code for 342 bytes</summary>
|
||||
public byte[] boot;
|
||||
public byte[] Boot;
|
||||
/// <summary>8 extra entries for ICDPro driver</summary>
|
||||
public AtariEntry[] icdEntries;
|
||||
public AtariEntry[] IcdEntries;
|
||||
/// <summary>Unused, 12 bytes</summary>
|
||||
public byte[] unused;
|
||||
public byte[] Unused;
|
||||
/// <summary>Disk size in sectors</summary>
|
||||
public uint size;
|
||||
public uint Size;
|
||||
/// <summary>4 partition entries</summary>
|
||||
public AtariEntry[] entries;
|
||||
public AtariEntry[] Entries;
|
||||
/// <summary>Starting sector of bad block list</summary>
|
||||
public uint badStart;
|
||||
public uint BadStart;
|
||||
/// <summary>Length in sectors of bad block list</summary>
|
||||
public uint badLength;
|
||||
public uint BadLength;
|
||||
/// <summary>Checksum for bootable disks</summary>
|
||||
public ushort checksum;
|
||||
public ushort Checksum;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -172,7 +172,7 @@ namespace Aaru.Partitions
|
||||
AaruConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_size = {0}", dl.d_partitions[i].p_size);
|
||||
|
||||
AaruConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_fstype = {0} ({1})",
|
||||
dl.d_partitions[i].p_fstype, fsTypeToString(dl.d_partitions[i].p_fstype));
|
||||
dl.d_partitions[i].p_fstype, FSTypeToString(dl.d_partitions[i].p_fstype));
|
||||
|
||||
var part = new Partition
|
||||
{
|
||||
@@ -180,7 +180,7 @@ namespace Aaru.Partitions
|
||||
Offset = dl.d_partitions[i].p_offset * dl.d_secsize,
|
||||
Length = dl.d_partitions[i].p_size * dl.d_secsize / imagePlugin.Info.SectorSize,
|
||||
Size = dl.d_partitions[i].p_size * dl.d_secsize,
|
||||
Type = fsTypeToString(dl.d_partitions[i].p_fstype),
|
||||
Type = FSTypeToString(dl.d_partitions[i].p_fstype),
|
||||
Sequence = counter,
|
||||
Scheme = Name
|
||||
};
|
||||
@@ -208,7 +208,7 @@ namespace Aaru.Partitions
|
||||
return partitions.Count > 0;
|
||||
}
|
||||
|
||||
internal static string fsTypeToString(fsType typ)
|
||||
internal static string FSTypeToString(fsType typ)
|
||||
{
|
||||
switch(typ)
|
||||
{
|
||||
@@ -262,6 +262,7 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
/// <summary>Drive type</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
enum dType : ushort
|
||||
{
|
||||
/// <summary>SMD, XSMD</summary>
|
||||
@@ -311,6 +312,7 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
/// <summary>Filesystem type</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
internal enum fsType : byte
|
||||
{
|
||||
/// <summary>Unused entry</summary>
|
||||
@@ -390,6 +392,7 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
/// <summary>Drive flags</summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
[Flags]
|
||||
enum dFlags : uint
|
||||
{
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Aaru.Partitions
|
||||
Sequence = counter,
|
||||
Scheme = Name,
|
||||
Type = (BSD.fsType)entry.p_fstype == BSD.fsType.Other ? entry.p_type_uuid.ToString()
|
||||
: BSD.fsTypeToString((BSD.fsType)entry.p_fstype)
|
||||
: BSD.FSTypeToString((BSD.fsType)entry.p_fstype)
|
||||
};
|
||||
|
||||
if(entry.p_bsize % imagePlugin.Info.SectorSize > 0)
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace Aaru.Partitions
|
||||
/// </summary>
|
||||
public sealed class Human68K : IPartition
|
||||
{
|
||||
// ReSharper disable once InconsistentNaming
|
||||
const uint X68K_MAGIC = 0x5836384B;
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace Aaru.Partitions
|
||||
const ushort NEC_MAGIC = 0xA55A;
|
||||
const ushort DM_MAGIC = 0x55AA;
|
||||
|
||||
static readonly string[] MbrTypes =
|
||||
static readonly string[] _mbrTypes =
|
||||
{
|
||||
// 0x00
|
||||
"Empty", "FAT12", "XENIX root", "XENIX /usr",
|
||||
@@ -687,7 +687,7 @@ namespace Aaru.Partitions
|
||||
return anyMnx;
|
||||
}
|
||||
|
||||
static string DecodeMbrType(byte type) => MbrTypes[type];
|
||||
static string DecodeMbrType(byte type) => _mbrTypes[type];
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
readonly struct MasterBootRecord
|
||||
|
||||
@@ -130,14 +130,18 @@ namespace Aaru.Partitions
|
||||
/// <summary>Type ID for NetBSD unused root partition, "NBR\0"</summary>
|
||||
const uint TYPEID_NETBSD_ROOT_UNUSED = 0x4E425200;
|
||||
/// <summary>Type ID for NetBSD 4.2 FFS root partition, "NBR\7"</summary>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
const uint TYPEID_NETBSD_ROOT_42FFS = 0x4E425207;
|
||||
/// <summary>Type ID for NetBSD 4.4 LFS root partition, "NBR\9"</summary>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
const uint TYPEID_NETBSD_ROOT_44LFS = 0x4E425209;
|
||||
/// <summary>Type ID for NetBSD unused user partition, "NBR\0"</summary>
|
||||
const uint TYPEID_NETBSD_USER_UNUSED = 0x4E425500;
|
||||
/// <summary>Type ID for NetBSD 4.2 FFS user partition, "NBR\7"</summary>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
const uint TYPEID_NETBSD_USER_42FFS = 0x4E425507;
|
||||
/// <summary>Type ID for NetBSD 4.4 LFS user partition, "NBR\9"</summary>
|
||||
// ReSharper disable once InconsistentNaming
|
||||
const uint TYPEID_NETBSD_USER_44LFS = 0x4E425509;
|
||||
/// <summary>Type ID for NetBSD swap partition</summary>
|
||||
const uint TYPEID_NETBSD_SWAP = 0x4E425300;
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
@@ -45,6 +46,7 @@ namespace Aaru.Partitions
|
||||
/// <summary>
|
||||
/// Implements decoding of historic UNIX static partitions
|
||||
/// </summary>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
public sealed class UNIX : IPartition
|
||||
{
|
||||
readonly Partition[] RA60 =
|
||||
|
||||
@@ -376,7 +376,7 @@ namespace Aaru.Partitions
|
||||
Offset = (ulong)(parts[i].p_start * bps),
|
||||
Size = (ulong)(parts[i].p_size * bps),
|
||||
Sequence = (ulong)i,
|
||||
Type = $"UNIX: {decodeUNIXTAG(parts[i].p_tag, !useOld)}",
|
||||
Type = $"UNIX: {DecodeUnixtag(parts[i].p_tag, !useOld)}",
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
@@ -417,7 +417,7 @@ namespace Aaru.Partitions
|
||||
return partitions.Count > 0;
|
||||
}
|
||||
|
||||
static string decodeUNIXTAG(pTag type, bool isNew)
|
||||
static string DecodeUnixtag(pTag type, bool isNew)
|
||||
{
|
||||
switch(type)
|
||||
{
|
||||
@@ -547,6 +547,7 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
[StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
// ReSharper disable once InconsistentNaming
|
||||
struct partition
|
||||
{
|
||||
public pTag p_tag; /*ID tag of partition*/
|
||||
@@ -555,6 +556,7 @@ namespace Aaru.Partitions
|
||||
public int p_size; /*# of blocks in partition*/
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
enum pTag : ushort
|
||||
{
|
||||
/// <summary>empty</summary>
|
||||
@@ -604,6 +606,7 @@ namespace Aaru.Partitions
|
||||
}
|
||||
|
||||
[Flags]
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||
enum pFlag : ushort
|
||||
{
|
||||
/* Partition permission flags */ V_UNMNT = 0x01, /* Unmountable partition */ V_RONLY = 0x10, /* Read only */
|
||||
|
||||
@@ -47,23 +47,22 @@ namespace Aaru.Partitions
|
||||
[SuppressMessage("ReSharper", "UnusedMember.Local")]
|
||||
public sealed class Xbox : IPartition
|
||||
{
|
||||
const uint XboxCigam = 0x46415458;
|
||||
const uint XboxMagic = 0x58544146;
|
||||
const long MemoryUnitDataOff = 0x7FF000;
|
||||
const long Xbox360SecuritySectorOff = 0x2000;
|
||||
const long Xbox360SystemCacheOff = 0x80000;
|
||||
const long Xbox360GameCacheOff = 0x8008000;
|
||||
const long Xbox368SysExtOff = 0x10C080000;
|
||||
const long Xbox360SysExt2Off = 0x118EB0000;
|
||||
const long Xbox360CompatOff = 0x120EB0000;
|
||||
const long Xbox360DataOff = 0x130EB0000;
|
||||
const long Xbox360SecuritySectorLen = 0x80000;
|
||||
const long Xbox360SystemCacheLen = 0x80000000;
|
||||
const long Xbox360GameCacheLen = 0xA0E30000;
|
||||
const long Xbox368SysExtLen = 0xCE30000;
|
||||
const long Xbox360SysExt2Len = 0x8000000;
|
||||
const long Xbox360CompatLen = 0x10000000;
|
||||
|
||||
const uint XBOX_CIGAM = 0x46415458;
|
||||
const uint XBOX_MAGIC = 0x58544146;
|
||||
const long MEMORY_UNIT_DATA_OFF = 0x7FF000;
|
||||
const long XBOX360_SECURITY_SECTOR_OFF = 0x2000;
|
||||
const long XBOX360_SYSTEM_CACHE_OFF = 0x80000;
|
||||
const long XBOX360_GAME_CACHE_OFF = 0x8008000;
|
||||
const long XBOX368_SYS_EXT_OFF = 0x10C080000;
|
||||
const long XBOX360_SYS_EXT2_OFF = 0x118EB0000;
|
||||
const long XBOX360_COMPAT_OFF = 0x120EB0000;
|
||||
const long XBOX_360DATA_OFF = 0x130EB0000;
|
||||
const long XBOX360_SECURITY_SECTOR_LEN = 0x80000;
|
||||
const long XBOX360_SYSTEM_CACHE_LEN = 0x80000000;
|
||||
const long XBOX360_GAME_CACHE_LEN = 0xA0E30000;
|
||||
const long XBOX368_SYS_EXT_LEN = 0xCE30000;
|
||||
const long XBOX360_SYS_EXT2_LEN = 0x8000000;
|
||||
const long XBOX360_COMPAT_LEN = 0x10000000;
|
||||
const uint XBOX360_DEVKIT_MAGIC = 0x00020000;
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -124,18 +123,18 @@ namespace Aaru.Partitions
|
||||
|
||||
uint temp;
|
||||
|
||||
if(imagePlugin.Info.Sectors > (ulong)(MemoryUnitDataOff / imagePlugin.Info.SectorSize))
|
||||
if(imagePlugin.Info.Sectors > (ulong)(MEMORY_UNIT_DATA_OFF / imagePlugin.Info.SectorSize))
|
||||
{
|
||||
sector = imagePlugin.ReadSector((ulong)(MemoryUnitDataOff / imagePlugin.Info.SectorSize));
|
||||
sector = imagePlugin.ReadSector((ulong)(MEMORY_UNIT_DATA_OFF / imagePlugin.Info.SectorSize));
|
||||
temp = BitConverter.ToUInt32(sector, 0);
|
||||
|
||||
if(temp == XboxCigam)
|
||||
if(temp == XBOX_CIGAM)
|
||||
{
|
||||
var sysCachePart = new Partition
|
||||
{
|
||||
Description = "System cache",
|
||||
Size = MemoryUnitDataOff,
|
||||
Length = (ulong)(MemoryUnitDataOff / imagePlugin.Info.SectorSize),
|
||||
Size = MEMORY_UNIT_DATA_OFF,
|
||||
Length = (ulong)(MEMORY_UNIT_DATA_OFF / imagePlugin.Info.SectorSize),
|
||||
Sequence = 1,
|
||||
Offset = 0,
|
||||
Start = 0,
|
||||
@@ -145,10 +144,10 @@ namespace Aaru.Partitions
|
||||
var dataPart = new Partition
|
||||
{
|
||||
Description = "Data volume",
|
||||
Size = (imagePlugin.Info.Sectors * imagePlugin.Info.SectorSize) - MemoryUnitDataOff,
|
||||
Size = (imagePlugin.Info.Sectors * imagePlugin.Info.SectorSize) - MEMORY_UNIT_DATA_OFF,
|
||||
Length = imagePlugin.Info.Sectors - sysCachePart.Length,
|
||||
Sequence = 2,
|
||||
Offset = MemoryUnitDataOff,
|
||||
Offset = MEMORY_UNIT_DATA_OFF,
|
||||
Start = sysCachePart.Length,
|
||||
Scheme = Name
|
||||
};
|
||||
@@ -160,79 +159,79 @@ namespace Aaru.Partitions
|
||||
}
|
||||
}
|
||||
|
||||
if(imagePlugin.Info.Sectors <= (ulong)(Xbox360DataOff / imagePlugin.Info.SectorSize))
|
||||
if(imagePlugin.Info.Sectors <= (ulong)(XBOX_360DATA_OFF / imagePlugin.Info.SectorSize))
|
||||
return false;
|
||||
|
||||
{
|
||||
sector = imagePlugin.ReadSector((ulong)(Xbox360DataOff / imagePlugin.Info.SectorSize));
|
||||
sector = imagePlugin.ReadSector((ulong)(XBOX_360DATA_OFF / imagePlugin.Info.SectorSize));
|
||||
temp = BitConverter.ToUInt32(sector, 0);
|
||||
|
||||
if(temp != XboxCigam)
|
||||
if(temp != XBOX_CIGAM)
|
||||
return false;
|
||||
|
||||
var securityPart = new Partition
|
||||
{
|
||||
Description = "Security sectors",
|
||||
Size = Xbox360SecuritySectorLen,
|
||||
Length = (ulong)(Xbox360SecuritySectorLen / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX360_SECURITY_SECTOR_LEN,
|
||||
Length = (ulong)(XBOX360_SECURITY_SECTOR_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 1,
|
||||
Offset = Xbox360SecuritySectorOff,
|
||||
Start = (ulong)(Xbox360SecuritySectorOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX360_SECURITY_SECTOR_OFF,
|
||||
Start = (ulong)(XBOX360_SECURITY_SECTOR_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
var sysCachePart = new Partition
|
||||
{
|
||||
Description = "System cache",
|
||||
Size = Xbox360SystemCacheLen,
|
||||
Length = (ulong)(Xbox360SystemCacheLen / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX360_SYSTEM_CACHE_LEN,
|
||||
Length = (ulong)(XBOX360_SYSTEM_CACHE_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 2,
|
||||
Offset = Xbox360SystemCacheOff,
|
||||
Start = (ulong)(Xbox360SystemCacheOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX360_SYSTEM_CACHE_OFF,
|
||||
Start = (ulong)(XBOX360_SYSTEM_CACHE_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
var gameCachePart = new Partition
|
||||
{
|
||||
Description = "Game cache",
|
||||
Size = Xbox360GameCacheLen,
|
||||
Length = (ulong)(Xbox360GameCacheLen / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX360_GAME_CACHE_LEN,
|
||||
Length = (ulong)(XBOX360_GAME_CACHE_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 3,
|
||||
Offset = Xbox360GameCacheOff,
|
||||
Start = (ulong)(Xbox360GameCacheOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX360_GAME_CACHE_OFF,
|
||||
Start = (ulong)(XBOX360_GAME_CACHE_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
var sysExtPart = new Partition
|
||||
{
|
||||
Description = "System volume",
|
||||
Size = Xbox368SysExtLen,
|
||||
Length = (ulong)(Xbox368SysExtLen / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX368_SYS_EXT_LEN,
|
||||
Length = (ulong)(XBOX368_SYS_EXT_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 4,
|
||||
Offset = Xbox368SysExtOff,
|
||||
Start = (ulong)(Xbox368SysExtOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX368_SYS_EXT_OFF,
|
||||
Start = (ulong)(XBOX368_SYS_EXT_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
var sysExt2Part = new Partition
|
||||
{
|
||||
Description = "System volume 2",
|
||||
Size = Xbox360SysExt2Len,
|
||||
Length = (ulong)(Xbox360SysExt2Len / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX360_SYS_EXT2_LEN,
|
||||
Length = (ulong)(XBOX360_SYS_EXT2_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 5,
|
||||
Offset = Xbox360SysExt2Off,
|
||||
Start = (ulong)(Xbox360SysExt2Off / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX360_SYS_EXT2_OFF,
|
||||
Start = (ulong)(XBOX360_SYS_EXT2_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
var xbox1Part = new Partition
|
||||
{
|
||||
Description = "Xbox backwards compatibility",
|
||||
Size = Xbox360CompatLen,
|
||||
Length = (ulong)(Xbox360CompatLen / imagePlugin.Info.SectorSize),
|
||||
Size = XBOX360_COMPAT_LEN,
|
||||
Length = (ulong)(XBOX360_COMPAT_LEN / imagePlugin.Info.SectorSize),
|
||||
Sequence = 6,
|
||||
Offset = Xbox360CompatOff,
|
||||
Start = (ulong)(Xbox360CompatOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX360_COMPAT_OFF,
|
||||
Start = (ulong)(XBOX360_COMPAT_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
@@ -240,8 +239,8 @@ namespace Aaru.Partitions
|
||||
{
|
||||
Description = "Data volume",
|
||||
Sequence = 7,
|
||||
Offset = Xbox360DataOff,
|
||||
Start = (ulong)(Xbox360DataOff / imagePlugin.Info.SectorSize),
|
||||
Offset = XBOX_360DATA_OFF,
|
||||
Start = (ulong)(XBOX_360DATA_OFF / imagePlugin.Info.SectorSize),
|
||||
Scheme = Name
|
||||
};
|
||||
|
||||
|
||||
@@ -178,50 +178,93 @@
|
||||
</TypePattern>
|
||||
</Patterns></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AAIP/@EntryIndexedValue">AAIP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ADFS/@EntryIndexedValue">ADFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AFFS/@EntryIndexedValue">AFFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AODOS/@EntryIndexedValue">AODOS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AP/@EntryIndexedValue">AP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=APFS/@EntryIndexedValue">APFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=APM/@EntryIndexedValue">APM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ATA/@EntryIndexedValue">ATA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ATAPI/@EntryIndexedValue">ATAPI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BAM/@EntryIndexedValue">BAM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BFS/@EntryIndexedValue">BFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BSD/@EntryIndexedValue">BSD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BT/@EntryIndexedValue">BT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=BTRFS/@EntryIndexedValue">BTRFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CBM/@EntryIndexedValue">CBM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CHS/@EntryIndexedValue">CHS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CID/@EntryIndexedValue">CID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CPM/@EntryIndexedValue">CPM</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CSD/@EntryIndexedValue">CSD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CSS/@EntryIndexedValue">CSS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DEC/@EntryIndexedValue">DEC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=DOS/@EntryIndexedValue">DOS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ECC/@EntryIndexedValue">ECC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ECMA/@EntryIndexedValue">ECMA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EFI/@EntryIndexedValue">EFI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EFS/@EntryIndexedValue">EFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=EOF/@EntryIndexedValue">EOF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ESDI/@EntryIndexedValue">ESDI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FAT/@EntryIndexedValue">FAT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FIFO/@EntryIndexedValue">FIFO</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=FS/@EntryIndexedValue">FS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GID/@EntryIndexedValue">GID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=GPT/@EntryIndexedValue">GPT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HAMMER/@EntryIndexedValue">HAMMER</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HFS/@EntryIndexedValue">HFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HPFS/@EntryIndexedValue">HPFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HPIB/@EntryIndexedValue">HPIB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=HPOFS/@EntryIndexedValue">HPOFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ID/@EntryIndexedValue">ID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=INI/@EntryIndexedValue">INI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ISO/@EntryIndexedValue">ISO</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ISRC/@EntryIndexedValue">ISRC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JFS/@EntryIndexedValue">JFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=KF/@EntryIndexedValue">KF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LBA/@EntryIndexedValue">LBA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LFCR/@EntryIndexedValue">LFCR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LFN/@EntryIndexedValue">LFN</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LIF/@EntryIndexedValue">LIF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LSN/@EntryIndexedValue">LSN</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=LZMA/@EntryIndexedValue">LZMA</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MBR/@EntryIndexedValue">MBR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MDD/@EntryIndexedValue">MDD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MDDF/@EntryIndexedValue">MDDF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MFS/@EntryIndexedValue">MFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MMC/@EntryIndexedValue">MMC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=MSCP/@EntryIndexedValue">MSCP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NILFS/@EntryIndexedValue">NILFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NTFS/@EntryIndexedValue">NTFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=NV/@EntryIndexedValue">NV</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OCR/@EntryIndexedValue">OCR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ODS/@EntryIndexedValue">ODS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=OS/@EntryIndexedValue">OS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PC/@EntryIndexedValue">PC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PCFX/@EntryIndexedValue">PCFX</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PDP/@EntryIndexedValue">PDP</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PFS/@EntryIndexedValue">PFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=QNX/@EntryIndexedValue">QNX</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RAID/@EntryIndexedValue">RAID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RBF/@EntryIndexedValue">RBF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RDB/@EntryIndexedValue">RDB</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RPC/@EntryIndexedValue">RPC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=RT/@EntryIndexedValue">RT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SCR/@EntryIndexedValue">SCR</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SCSI/@EntryIndexedValue">SCSI</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SFS/@EntryIndexedValue">SFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SMD/@EntryIndexedValue">SMD</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ST/@EntryIndexedValue">ST</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UDF/@EntryIndexedValue">UDF</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UID/@EntryIndexedValue">UID</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=UNICOS/@EntryIndexedValue">UNICOS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VTOC/@EntryIndexedValue">VTOC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=VTX/@EntryIndexedValue">VTX</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=WC/@EntryIndexedValue">WC</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XENIX/@EntryIndexedValue">XENIX</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XFS/@EntryIndexedValue">XFS</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XT/@EntryIndexedValue">XT</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=XZ/@EntryIndexedValue">XZ</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=ZFS/@EntryIndexedValue">ZFS</s:String>
|
||||
<s:String x:Key="/Default/Environment/Hierarchy/Build/BuildTool/CustomBuildToolPath/@EntryValue">/opt/dotnet/sdk/3.0.100/MSBuild.dll</s:String>
|
||||
<s:Int64 x:Key="/Default/Environment/Hierarchy/Build/BuildTool/MsbuildVersion/@EntryValue">1048576</s:Int64>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAlwaysTreatStructAsNotReorderableMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -486,6 +529,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sydex/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=syjet/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=syquest/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=tarlabnor/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tata/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Tele/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Torito/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -343,8 +343,6 @@ namespace Aaru.Commands.Image
|
||||
foreach(ChecksumType chk in trackChecksum.End())
|
||||
AaruConsole.WriteLine("Track {0}'s {1}: {2}", currentTrack.TrackSequence,
|
||||
chk.type, chk.Value);
|
||||
|
||||
previousTrackEnd = currentTrack.TrackEndSector;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user