From 9cfef45856afb27c264966063de47971d323452a Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Mon, 20 Jul 2020 04:34:16 +0100 Subject: [PATCH] Code cleanup. --- Aaru.Checksums | 2 +- Aaru.CommonTypes | 2 +- Aaru.Core/Checksum.cs | 108 +- Aaru.Core/Devices/Dumping/ATA.cs | 26 +- Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs | 15 +- .../Devices/Dumping/CompactDisc/Error.cs | 33 +- .../Devices/Dumping/CompactDisc/Tracks.cs | 23 +- Aaru.Core/Devices/Dumping/Dump.cs | 2 +- Aaru.Core/Devices/Dumping/MMC.cs | 67 +- Aaru.Core/Devices/Dumping/Metadata.cs | 3 +- Aaru.Core/Devices/Dumping/MiniDisc.cs | 46 +- .../PlayStationPortable/MemoryStick.cs | 46 +- .../Dumping/PlayStationPortable/UMD.cs | 54 +- Aaru.Core/Devices/Dumping/ResumeSupport.cs | 24 +- Aaru.Core/Devices/Dumping/SBC.cs | 108 +- Aaru.Core/Devices/Dumping/SSC.cs | 24 +- Aaru.Core/Devices/Dumping/SecureDigital.cs | 22 +- Aaru.Core/Devices/Dumping/XGD.cs | 39 +- Aaru.Core/Devices/Report/ATA.cs | 29 +- Aaru.Core/Devices/Report/FireWire.cs | 4 +- Aaru.Core/Devices/Report/SSC.cs | 24 +- Aaru.Core/Devices/Report/Scsi.cs | 10 +- Aaru.Core/Devices/Report/USB.cs | 7 +- Aaru.Core/Devices/Scanning/SecureDigital.cs | 3 +- Aaru.Core/Entropy.cs | 3 +- Aaru.Core/Logging/MHDDLog.cs | 3 +- Aaru.Core/Media/Info/ScsiInfo.cs | 8 +- Aaru.Core/Remote.cs | 10 +- Aaru.Core/Sidecar/AudioMedia.cs | 11 +- Aaru.Core/Sidecar/BlockMedia.cs | 75 +- Aaru.Core/Sidecar/BlockTape.cs | 24 +- Aaru.Core/Sidecar/Files.cs | 4 +- Aaru.Core/Sidecar/LinearMedia.cs | 8 +- Aaru.Core/Sidecar/OpticalDisc.cs | 67 +- Aaru.Core/Statistics.cs | 223 ++- .../20181126222301_DeviceReportV2.cs | 145 +- .../20181127013131_CorrectReportsDbSet.cs | 18 +- .../20181221015906_NameValueStatistics.cs | 25 +- ...0181221040408_OperatingSystemStatistics.cs | 3 +- ...DataForIdentifyInquiryAndModesInReports.cs | 6 +- .../20181224044809_StoreUsbIdsInDatabase.cs | 6 +- .../20191207184342_AddRemoteStats.cs | 19 +- ...0710170129_AddGdRomSwapDiscCapabilities.cs | 3 +- Aaru.Decoders | 2 +- Aaru.Devices/Device/AtaCommands/Ata28.cs | 45 +- Aaru.Devices/Device/AtaCommands/Ata48.cs | 39 +- Aaru.Devices/Device/AtaCommands/AtaCHS.cs | 53 +- Aaru.Devices/Device/AtaCommands/Cfa.cs | 17 +- Aaru.Devices/Device/AtaCommands/MCPT.cs | 3 +- Aaru.Devices/Device/AtaCommands/Smart.cs | 43 +- Aaru.Devices/Device/Constructor.cs | 20 +- Aaru.Devices/Remote/Remote.cs | 129 +- Aaru.Devices/Windows/Command.cs | 41 +- Aaru.Devices/Windows/ListDevices.cs | 9 +- Aaru.Devices/Windows/Usb.cs | 30 +- Aaru.Filesystems/AODOS.cs | 15 +- Aaru.Filesystems/APFS.cs | 6 +- Aaru.Filesystems/Acorn.cs | 7 +- Aaru.Filesystems/AmigaDOS.cs | 6 +- Aaru.Filesystems/AppleDOS/Info.cs | 6 +- Aaru.Filesystems/AppleDOS/Super.cs | 18 +- Aaru.Filesystems/AppleMFS/File.cs | 15 +- Aaru.Filesystems/AppleMFS/Super.cs | 9 +- Aaru.Filesystems/AtheOS.cs | 12 +- Aaru.Filesystems/BFS.cs | 12 +- Aaru.Filesystems/BTRFS.cs | 9 +- Aaru.Filesystems/CBM.cs | 4 +- Aaru.Filesystems/CPM/Definitions.cs | 6 +- Aaru.Filesystems/CPM/File.cs | 3 +- Aaru.Filesystems/CPM/Info.cs | 433 +++-- Aaru.Filesystems/CPM/Super.cs | 14 +- Aaru.Filesystems/Cram.cs | 9 +- Aaru.Filesystems/ECMA67.cs | 6 +- Aaru.Filesystems/EFS.cs | 6 +- Aaru.Filesystems/F2FS.cs | 6 +- Aaru.Filesystems/FAT/BPB.cs | 6 +- Aaru.Filesystems/FAT/Consts.cs | 2 +- Aaru.Filesystems/FAT/File.cs | 4 +- Aaru.Filesystems/FAT/Info.cs | 3 +- Aaru.Filesystems/FAT/Super.cs | 14 +- Aaru.Filesystems/FATX/File.cs | 14 +- Aaru.Filesystems/FATX/Info.cs | 3 +- Aaru.Filesystems/FATX/Super.cs | 17 +- Aaru.Filesystems/Fossil.cs | 4 +- Aaru.Filesystems/HAMMER.cs | 4 +- Aaru.Filesystems/HPOFS/Info.cs | 6 +- Aaru.Filesystems/ISO9660/Dir.cs | 50 +- Aaru.Filesystems/ISO9660/File.cs | 8 +- Aaru.Filesystems/ISO9660/Info.cs | 20 +- Aaru.Filesystems/ISO9660/PathTable.cs | 10 +- Aaru.Filesystems/ISO9660/Super.cs | 51 +- Aaru.Filesystems/JFS.cs | 10 +- Aaru.Filesystems/LIF.cs | 10 +- Aaru.Filesystems/LisaFS/Dir.cs | 74 +- Aaru.Filesystems/LisaFS/Super.cs | 10 +- Aaru.Filesystems/Locus.cs | 45 +- Aaru.Filesystems/MicroDOS.cs | 8 +- Aaru.Filesystems/NILFS2.cs | 13 +- Aaru.Filesystems/ODS.cs | 3 +- Aaru.Filesystems/Opera/Dir.cs | 3 +- Aaru.Filesystems/Opera/File.cs | 7 +- Aaru.Filesystems/Opera/Info.cs | 6 +- Aaru.Filesystems/Opera/Super.cs | 18 +- Aaru.Filesystems/PCFX.cs | 14 +- Aaru.Filesystems/ProDOS.cs | 13 +- Aaru.Filesystems/QNX4.cs | 4 +- Aaru.Filesystems/QNX6.cs | 21 +- Aaru.Filesystems/RT11.cs | 8 +- Aaru.Filesystems/ReFS.cs | 5 +- Aaru.Filesystems/Reiser4.cs | 8 +- Aaru.Filesystems/SFS.cs | 4 +- Aaru.Filesystems/SolarFS.cs | 17 +- Aaru.Filesystems/Squash.cs | 12 +- Aaru.Filesystems/UCSDPascal/File.cs | 12 +- Aaru.Filesystems/UCSDPascal/Info.cs | 15 +- Aaru.Filesystems/UCSDPascal/Super.cs | 24 +- Aaru.Filesystems/UDF.cs | 40 +- Aaru.Filesystems/UNICOS.cs | 9 +- Aaru.Filesystems/UNIXBFS.cs | 15 +- Aaru.Filesystems/VMfs.cs | 3 +- Aaru.Filesystems/VxFS.cs | 6 +- Aaru.Filesystems/XFS.cs | 16 +- Aaru.Filesystems/Xia.cs | 6 +- Aaru.Filesystems/dump.cs | 3 +- Aaru.Filesystems/ext2FS.cs | 9 +- Aaru.Filesystems/extFS.cs | 13 +- Aaru.Gui/ConsoleHandler.cs | 20 +- Aaru.Gui/Models/FileModel.cs | 23 +- Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs | 7 +- .../ViewModels/Dialogs/EncodingsViewModel.cs | 6 +- .../ViewModels/Dialogs/PluginsViewModel.cs | 24 +- .../ViewModels/Dialogs/SettingsViewModel.cs | 15 +- .../ViewModels/Dialogs/StatisticsViewModel.cs | 34 +- .../ViewModels/Panels/ImageInfoViewModel.cs | 11 +- .../Panels/SubdirectoryViewModel.cs | 7 +- .../Tabs/CompactDiscInfoViewModel.cs | 3 +- .../ViewModels/Tabs/PcmciaInfoViewModel.cs | 3 +- Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs | 13 +- .../Windows/DecodeMediaTagsViewModel.cs | 3 +- .../Windows/ImageChecksumViewModel.cs | 11 +- .../Windows/ImageConvertViewModel.cs | 32 +- .../Windows/ImageEntropyViewModel.cs | 2 +- .../Windows/ImageSidecarViewModel.cs | 3 +- .../ViewModels/Windows/MainWindowViewModel.cs | 57 +- .../ViewModels/Windows/MediaDumpViewModel.cs | 12 +- .../Windows/SplashWindowViewModel.cs | 5 +- Aaru.Images/AaruFormat/AaruFormat.cs | 26 +- Aaru.Images/AaruFormat/Read.cs | 47 +- Aaru.Images/AaruFormat/Write.cs | 258 ++- Aaru.Images/Alcohol120/Alcohol120.cs | 26 +- Aaru.Images/Alcohol120/Constants.cs | 3 +- Aaru.Images/Alcohol120/Properties.cs | 19 +- Aaru.Images/Alcohol120/Read.cs | 28 +- Aaru.Images/Alcohol120/Write.cs | 156 +- Aaru.Images/Anex86/Anex86.cs | 30 +- Aaru.Images/Anex86/Write.cs | 8 +- Aaru.Images/Apple2MG/Apple2MG.cs | 30 +- Aaru.Images/Apple2MG/Write.cs | 16 +- Aaru.Images/AppleDOS/AppleDOS.cs | 30 +- Aaru.Images/AppleDOS/Write.cs | 10 +- Aaru.Images/AppleNIB/AppleNIB.cs | 30 +- Aaru.Images/AppleNIB/Read.cs | 3 +- Aaru.Images/Apridisk/Apridisk.cs | 30 +- Aaru.Images/Apridisk/Write.cs | 34 +- Aaru.Images/BLU/BLU.cs | 30 +- Aaru.Images/BLU/Write.cs | 4 +- Aaru.Images/BlindWrite4/BlindWrite4.cs | 25 +- Aaru.Images/BlindWrite4/Read.cs | 14 +- Aaru.Images/BlindWrite5/BlindWrite5.cs | 25 +- Aaru.Images/BlindWrite5/Read.cs | 3 +- Aaru.Images/BlindWrite5/Structs.cs | 2 +- Aaru.Images/CDRDAO/CDRDAO.cs | 22 +- Aaru.Images/CDRDAO/Properties.cs | 10 +- Aaru.Images/CDRDAO/Read.cs | 21 +- Aaru.Images/CDRDAO/Write.cs | 7 +- Aaru.Images/CDRWin/CDRWin.cs | 22 +- Aaru.Images/CDRWin/Constants.cs | 14 +- Aaru.Images/CDRWin/Properties.cs | 18 +- Aaru.Images/CDRWin/Read.cs | 41 +- Aaru.Images/CDRWin/Write.cs | 19 +- Aaru.Images/CHD/CHD.cs | 23 +- Aaru.Images/CHD/Read.cs | 4 +- Aaru.Images/CPCDSK/CPCDSK.cs | 30 +- Aaru.Images/CisCopy/CisCopy.cs | 30 +- Aaru.Images/CisCopy/Write.cs | 4 +- Aaru.Images/CloneCD/CloneCD.cs | 25 +- Aaru.Images/CloneCD/Read.cs | 26 +- Aaru.Images/CloneCD/Write.cs | 57 +- Aaru.Images/CopyQM/CopyQM.cs | 30 +- Aaru.Images/CopyTape/CopyTape.cs | 25 +- Aaru.Images/CopyTape/Read.cs | 9 +- Aaru.Images/CopyTape/Write.cs | 4 +- Aaru.Images/D88/D88.cs | 30 +- Aaru.Images/DART/DART.cs | 30 +- Aaru.Images/DIM/DIM.cs | 30 +- Aaru.Images/DiscFerret/DiscFerret.cs | 30 +- Aaru.Images/DiscJuggler/DiscJuggler.cs | 22 +- Aaru.Images/DiscJuggler/Read.cs | 11 +- Aaru.Images/DiskCopy42/DiskCopy42.cs | 30 +- Aaru.Images/DiskCopy42/Read.cs | 3 +- Aaru.Images/DiskCopy42/Write.cs | 4 +- Aaru.Images/DriDiskCopy/DriDiskCopy.cs | 19 +- Aaru.Images/DriDiskCopy/Write.cs | 19 +- Aaru.Images/GDI/GDI.cs | 22 +- Aaru.Images/GDI/Properties.cs | 20 +- Aaru.Images/GDI/Read.cs | 32 +- Aaru.Images/HDCopy/HDCopy.cs | 30 +- Aaru.Images/IMD/IMD.cs | 30 +- Aaru.Images/KryoFlux/KryoFlux.cs | 30 +- Aaru.Images/MaxiDisk/MaxiDisk.cs | 19 +- Aaru.Images/MaxiDisk/Write.cs | 15 +- Aaru.Images/NDIF/NDIF.cs | 30 +- Aaru.Images/NHDr0/NHDr0.cs | 30 +- Aaru.Images/NHDr0/Write.cs | 13 +- Aaru.Images/Nero/Nero.cs | 3 +- Aaru.Images/Nero/Read.cs | 98 +- Aaru.Images/Parallels/Parallels.cs | 30 +- Aaru.Images/Parallels/Write.cs | 14 +- Aaru.Images/PartClone/PartClone.cs | 21 +- Aaru.Images/Partimage/Partimage.cs | 21 +- Aaru.Images/QCOW/QCOW.cs | 30 +- Aaru.Images/QCOW/Write.cs | 12 +- Aaru.Images/QCOW2/QCOW2.cs | 30 +- Aaru.Images/QCOW2/Write.cs | 12 +- Aaru.Images/QED/QED.cs | 30 +- Aaru.Images/QED/Write.cs | 12 +- Aaru.Images/RayDIM/RayDIM.cs | 21 +- Aaru.Images/RayDIM/Write.cs | 15 +- Aaru.Images/RsIde/RsIde.cs | 30 +- Aaru.Images/RsIde/Write.cs | 30 +- Aaru.Images/SaveDskF/Identify.cs | 5 +- Aaru.Images/SaveDskF/SaveDskF.cs | 30 +- Aaru.Images/SaveDskF/Write.cs | 14 +- Aaru.Images/SuperCardPro/Read.cs | 3 +- Aaru.Images/SuperCardPro/SuperCardPro.cs | 30 +- Aaru.Images/T98/T98.cs | 30 +- Aaru.Images/T98/Write.cs | 4 +- Aaru.Images/TeleDisk/Read.cs | 12 +- Aaru.Images/TeleDisk/TeleDisk.cs | 21 +- Aaru.Images/UDIF/Read.cs | 7 +- Aaru.Images/UDIF/UDIF.cs | 30 +- Aaru.Images/UDIF/Write.cs | 43 +- Aaru.Images/UkvFdi/UkvFdi.cs | 30 +- Aaru.Images/VDI/VDI.cs | 30 +- Aaru.Images/VDI/Write.cs | 20 +- Aaru.Images/VHD/Read.cs | 12 +- Aaru.Images/VHD/VHD.cs | 30 +- Aaru.Images/VHD/Write.cs | 17 +- Aaru.Images/VHDX/Read.cs | 6 +- Aaru.Images/VHDX/VHDX.cs | 30 +- Aaru.Images/VMware/Constants.cs | 9 +- Aaru.Images/VMware/Read.cs | 9 +- Aaru.Images/VMware/VMware.cs | 30 +- Aaru.Images/VMware/Write.cs | 4 +- Aaru.Images/Virtual98/Virtual98.cs | 30 +- Aaru.Images/Virtual98/Write.cs | 17 +- Aaru.Images/WCDiskImage/WCDiskImage.cs | 30 +- Aaru.Images/ZZZRawImage/Properties.cs | 28 +- Aaru.Images/ZZZRawImage/Read.cs | 40 +- Aaru.Images/ZZZRawImage/Write.cs | 4 +- Aaru.Images/ZZZRawImage/ZZZRawImage.cs | 30 +- Aaru.Partitions/Acorn.cs | 13 +- Aaru.Partitions/AppleMap.cs | 37 +- Aaru.Partitions/Apricot.cs | 11 +- Aaru.Partitions/Atari.cs | 36 +- Aaru.Partitions/BSD.cs | 3 +- Aaru.Partitions/DEC.cs | 6 +- Aaru.Partitions/DragonFlyBSD.cs | 5 +- Aaru.Partitions/GPT.cs | 6 +- Aaru.Partitions/Human68k.cs | 9 +- Aaru.Partitions/NeXT.cs | 7 +- Aaru.Partitions/PC98.cs | 3 +- Aaru.Partitions/Plan9.cs | 12 +- Aaru.Partitions/RDB.cs | 67 +- Aaru.Partitions/RioKarma.cs | 9 +- Aaru.Partitions/SGI.cs | 6 +- Aaru.Partitions/Sun.cs | 11 +- Aaru.Partitions/UNIX.cs | 1140 ++++++++--- Aaru.Partitions/VTOC.cs | 15 +- Aaru.Partitions/XENIX.cs | 5 +- Aaru.Partitions/Xbox.cs | 79 +- Aaru.Settings/Settings.cs | 18 +- Aaru.Tests.Devices/DecodeATARegisters.cs | 5 +- Aaru.Tests/Filesystems/ADFS.cs | 5 +- Aaru.Tests/Filesystems/AFFS.cs | 5 +- Aaru.Tests/Filesystems/AFS.cs | 5 +- Aaru.Tests/Filesystems/AOFS.cs | 5 +- Aaru.Tests/Filesystems/BeFS.cs | 5 +- Aaru.Tests/Filesystems/COHERENT.cs | 5 +- Aaru.Tests/Filesystems/DTFS.cs | 5 +- Aaru.Tests/Filesystems/EAFS.cs | 5 +- Aaru.Tests/Filesystems/FAT12.cs | 10 +- Aaru.Tests/Filesystems/FAT16.cs | 5 +- Aaru.Tests/Filesystems/FATX.cs | 4 +- Aaru.Tests/Filesystems/HFS.cs | 5 +- Aaru.Tests/Filesystems/HPOFS.cs | 5 +- Aaru.Tests/Filesystems/HTFS.cs | 5 +- Aaru.Tests/Filesystems/ISO9660.cs | 5 +- Aaru.Tests/Filesystems/LisaFS.cs | 5 +- Aaru.Tests/Filesystems/Locus.cs | 5 +- Aaru.Tests/Filesystems/MFS.cs | 5 +- Aaru.Tests/Filesystems/MINIX.cs | 15 +- Aaru.Tests/Filesystems/QNX4.cs | 5 +- Aaru.Tests/Filesystems/SysV.cs | 5 +- Aaru.Tests/Filesystems/UDF.cs | 10 +- Aaru.Tests/Filesystems/UFS.cs | 5 +- Aaru.Tests/Filesystems/UNIXBFS.cs | 5 +- Aaru.Tests/Filesystems/XENIX.cs | 5 +- Aaru.Tests/Filesystems/ZFS.cs | 5 +- Aaru.Tests/Partitions/Acorn.cs | 40 +- Aaru.Tests/Partitions/AppleMap.cs | 1680 +++++++++++++---- Aaru.Tests/Partitions/Atari.cs | 230 ++- Aaru.Tests/Partitions/BSD.cs | 290 ++- Aaru.Tests/Partitions/GPT.cs | 89 +- Aaru.Tests/Partitions/MBR.cs | 1560 +++++++++++---- Aaru.Tests/Partitions/MINIX.cs | 40 +- Aaru.Tests/Partitions/PC98.cs | 272 ++- Aaru.Tests/Partitions/RDB.cs | 150 +- Aaru.Tests/Partitions/SGI.cs | 144 +- Aaru.Tests/Partitions/Sun.cs | 80 +- Aaru.Tests/Partitions/VTOC.cs | 128 +- Aaru.Tests/Partitions/Xbox.cs | 16 +- Aaru/Commands/Configure.cs | 20 +- Aaru/Commands/Database/Update.cs | 6 +- Aaru/Commands/Device/DeviceReport.cs | 17 +- Aaru/Commands/Device/Info.cs | 7 +- Aaru/Commands/Device/List.cs | 4 +- Aaru/Commands/Filesystem/ExtractFiles.cs | 22 +- Aaru/Commands/Filesystem/Ls.cs | 22 +- Aaru/Commands/Image/Analyze.cs | 18 +- Aaru/Commands/Image/Checksum.cs | 46 +- Aaru/Commands/Image/Compare.cs | 8 +- Aaru/Commands/Image/Convert.cs | 111 +- Aaru/Commands/Image/CreateSidecar.cs | 13 +- Aaru/Commands/Image/Decode.cs | 16 +- Aaru/Commands/Image/Entropy.cs | 13 +- Aaru/Commands/Image/Info.cs | 4 +- Aaru/Commands/Image/Print.cs | 16 +- Aaru/Commands/Image/Verify.cs | 10 +- Aaru/Commands/ListEncodings.cs | 6 +- Aaru/Commands/Media/Dump.cs | 76 +- Aaru/Commands/Media/Info.cs | 7 +- Aaru/Commands/Media/Scan.cs | 10 +- Aaru/Commands/Remote.cs | 4 +- Aaru/Main.cs | 5 +- 345 files changed, 9384 insertions(+), 3725 deletions(-) diff --git a/Aaru.Checksums b/Aaru.Checksums index 659ee8d2d..0e61e1c76 160000 --- a/Aaru.Checksums +++ b/Aaru.Checksums @@ -1 +1 @@ -Subproject commit 659ee8d2d003e7ccc3b8ef4677b6ba52e541c087 +Subproject commit 0e61e1c76a6f1f11deb8d7ad6240f1e703c95b4a diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes index eac6cbca7..3e38c369b 160000 --- a/Aaru.CommonTypes +++ b/Aaru.CommonTypes @@ -1 +1 @@ -Subproject commit eac6cbca7ae5eee846719796540d714f6ec5cce8 +Subproject commit 3e38c369b30c95ad1c97ffc42795c8dd671579f0 diff --git a/Aaru.Core/Checksum.cs b/Aaru.Core/Checksum.cs index 71289a394..2bc4c15f7 100644 --- a/Aaru.Core/Checksum.cs +++ b/Aaru.Core/Checksum.cs @@ -363,7 +363,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.adler32, Value = adler32Ctx.End() + type = ChecksumTypeType.adler32, + Value = adler32Ctx.End() }; chks.Add(chk); @@ -373,7 +374,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc16, Value = crc16Ctx.End() + type = ChecksumTypeType.crc16, + Value = crc16Ctx.End() }; chks.Add(chk); @@ -383,7 +385,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc32, Value = crc32Ctx.End() + type = ChecksumTypeType.crc32, + Value = crc32Ctx.End() }; chks.Add(chk); @@ -393,7 +396,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc64, Value = crc64Ctx.End() + type = ChecksumTypeType.crc64, + Value = crc64Ctx.End() }; chks.Add(chk); @@ -403,7 +407,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.md5, Value = md5Ctx.End() + type = ChecksumTypeType.md5, + Value = md5Ctx.End() }; chks.Add(chk); @@ -413,7 +418,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha1, Value = sha1Ctx.End() + type = ChecksumTypeType.sha1, + Value = sha1Ctx.End() }; chks.Add(chk); @@ -423,7 +429,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha256, Value = sha256Ctx.End() + type = ChecksumTypeType.sha256, + Value = sha256Ctx.End() }; chks.Add(chk); @@ -433,7 +440,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha384, Value = sha384Ctx.End() + type = ChecksumTypeType.sha384, + Value = sha384Ctx.End() }; chks.Add(chk); @@ -443,7 +451,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha512, Value = sha512Ctx.End() + type = ChecksumTypeType.sha512, + Value = sha512Ctx.End() }; chks.Add(chk); @@ -453,7 +462,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.spamsum, Value = ssctx.End() + type = ChecksumTypeType.spamsum, + Value = ssctx.End() }; chks.Add(chk); @@ -463,7 +473,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.fletcher16, Value = f16Ctx.End() + type = ChecksumTypeType.fletcher16, + Value = f16Ctx.End() }; chks.Add(chk); @@ -474,7 +485,8 @@ namespace Aaru.Core chk = new ChecksumType { - type = ChecksumTypeType.fletcher32, Value = f32Ctx.End() + type = ChecksumTypeType.fletcher32, + Value = f32Ctx.End() }; chks.Add(chk); @@ -516,7 +528,8 @@ namespace Aaru.Core var adlerPktData = new HashPacket { - Context = adler32CtxData, Data = data + Context = adler32CtxData, + Data = data }; adlerThreadData.Start(adlerPktData); @@ -528,7 +541,8 @@ namespace Aaru.Core var crc16PktData = new HashPacket { - Context = crc16CtxData, Data = data + Context = crc16CtxData, + Data = data }; crc16ThreadData.Start(crc16PktData); @@ -540,7 +554,8 @@ namespace Aaru.Core var crc32PktData = new HashPacket { - Context = crc32CtxData, Data = data + Context = crc32CtxData, + Data = data }; crc32ThreadData.Start(crc32PktData); @@ -552,7 +567,8 @@ namespace Aaru.Core var crc64PktData = new HashPacket { - Context = crc64CtxData, Data = data + Context = crc64CtxData, + Data = data }; crc64ThreadData.Start(crc64PktData); @@ -564,7 +580,8 @@ namespace Aaru.Core var md5PktData = new HashPacket { - Context = md5CtxData, Data = data + Context = md5CtxData, + Data = data }; md5ThreadData.Start(md5PktData); @@ -576,7 +593,8 @@ namespace Aaru.Core var sha1PktData = new HashPacket { - Context = sha1CtxData, Data = data + Context = sha1CtxData, + Data = data }; sha1ThreadData.Start(sha1PktData); @@ -588,7 +606,8 @@ namespace Aaru.Core var sha256PktData = new HashPacket { - Context = sha256CtxData, Data = data + Context = sha256CtxData, + Data = data }; sha256ThreadData.Start(sha256PktData); @@ -600,7 +619,8 @@ namespace Aaru.Core var sha384PktData = new HashPacket { - Context = sha384CtxData, Data = data + Context = sha384CtxData, + Data = data }; sha384ThreadData.Start(sha384PktData); @@ -612,7 +632,8 @@ namespace Aaru.Core var sha512PktData = new HashPacket { - Context = sha512CtxData, Data = data + Context = sha512CtxData, + Data = data }; sha512ThreadData.Start(sha512PktData); @@ -624,7 +645,8 @@ namespace Aaru.Core var spamsumPktData = new HashPacket { - Context = ssctxData, Data = data + Context = ssctxData, + Data = data }; spamsumThreadData.Start(spamsumPktData); @@ -636,7 +658,8 @@ namespace Aaru.Core var f16PktData = new HashPacket { - Context = f16CtxData, Data = data + Context = f16CtxData, + Data = data }; f16ThreadData.Start(f16PktData); @@ -648,7 +671,8 @@ namespace Aaru.Core var f32PktData = new HashPacket { - Context = f32CtxData, Data = data + Context = f32CtxData, + Data = data }; f32ThreadData.Start(f32PktData); @@ -674,7 +698,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.adler32, Value = adler32CtxData.End() + type = ChecksumTypeType.adler32, + Value = adler32CtxData.End() }; dataChecksums.Add(chk); @@ -684,7 +709,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc16, Value = crc16CtxData.End() + type = ChecksumTypeType.crc16, + Value = crc16CtxData.End() }; dataChecksums.Add(chk); @@ -694,7 +720,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc32, Value = crc32CtxData.End() + type = ChecksumTypeType.crc32, + Value = crc32CtxData.End() }; dataChecksums.Add(chk); @@ -704,7 +731,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.crc64, Value = crc64CtxData.End() + type = ChecksumTypeType.crc64, + Value = crc64CtxData.End() }; dataChecksums.Add(chk); @@ -714,7 +742,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.md5, Value = md5CtxData.End() + type = ChecksumTypeType.md5, + Value = md5CtxData.End() }; dataChecksums.Add(chk); @@ -724,7 +753,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha1, Value = sha1CtxData.End() + type = ChecksumTypeType.sha1, + Value = sha1CtxData.End() }; dataChecksums.Add(chk); @@ -734,7 +764,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha256, Value = sha256CtxData.End() + type = ChecksumTypeType.sha256, + Value = sha256CtxData.End() }; dataChecksums.Add(chk); @@ -744,7 +775,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha384, Value = sha384CtxData.End() + type = ChecksumTypeType.sha384, + Value = sha384CtxData.End() }; dataChecksums.Add(chk); @@ -754,7 +786,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.sha512, Value = sha512CtxData.End() + type = ChecksumTypeType.sha512, + Value = sha512CtxData.End() }; dataChecksums.Add(chk); @@ -764,7 +797,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.spamsum, Value = ssctxData.End() + type = ChecksumTypeType.spamsum, + Value = ssctxData.End() }; dataChecksums.Add(chk); @@ -774,7 +808,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.fletcher16, Value = f16CtxData.End() + type = ChecksumTypeType.fletcher16, + Value = f16CtxData.End() }; dataChecksums.Add(chk); @@ -784,7 +819,8 @@ namespace Aaru.Core { chk = new ChecksumType { - type = ChecksumTypeType.fletcher32, Value = f32CtxData.End() + type = ChecksumTypeType.fletcher32, + Value = f32CtxData.End() }; dataChecksums.Add(chk); diff --git a/Aaru.Core/Devices/Dumping/ATA.cs b/Aaru.Core/Devices/Dumping/ATA.cs index 5cf7912d0..0110d5515 100644 --- a/Aaru.Core/Devices/Dumping/ATA.cs +++ b/Aaru.Core/Devices/Dumping/ATA.cs @@ -587,7 +587,8 @@ namespace Aaru.Core.Devices.Dumping // TODO: Non-removable var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -659,12 +660,14 @@ namespace Aaru.Core.Devices.Dumping if(ret) sidecar.BlockMedia[0].USB = new USBType { - ProductID = _dev.UsbProductId, VendorID = _dev.UsbVendorId, Descriptors = - new DumpType - { - Image = _outputPath, Size = (ulong)_dev.UsbDescriptors.Length, - Checksums = Checksum.GetChecksums(_dev.UsbDescriptors).ToArray() - } + ProductID = _dev.UsbProductId, + VendorID = _dev.UsbVendorId, + Descriptors = new DumpType + { + Image = _outputPath, + Size = (ulong)_dev.UsbDescriptors.Length, + Checksums = Checksum.GetChecksums(_dev.UsbDescriptors).ToArray() + } }; } @@ -680,7 +683,8 @@ namespace Aaru.Core.Devices.Dumping { CIS = new DumpType { - Image = _outputPath, Size = (ulong)_dev.Cis.Length, + Image = _outputPath, + Size = (ulong)_dev.Cis.Length, Checksums = Checksum.GetChecksums(_dev.Cis).ToArray() } }; @@ -736,7 +740,8 @@ namespace Aaru.Core.Devices.Dumping { Identify = new DumpType { - Image = _outputPath, Size = (ulong)cmdBuf.Length, + Image = _outputPath, + Size = (ulong)cmdBuf.Length, Checksums = Checksum.GetChecksums(cmdBuf).ToArray() } }; @@ -766,7 +771,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) { UpdateStatus?. diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs index a6dc08dab..c31b1b86d 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs @@ -515,10 +515,14 @@ namespace Aaru.Core.Devices.Dumping { new Track { - TrackSequence = 0, TrackSession = 1, TrackType = hiddenData ? TrackType.Data : TrackType.Audio, - TrackStartSector = 0, TrackBytesPerSector = (int)sectorSize, - TrackRawBytesPerSector = (int)sectorSize, TrackSubchannelType = subType, - TrackEndSector = tracks.First(t => t.TrackSequence == 1).TrackStartSector - 1 + TrackSequence = 0, + TrackSession = 1, + TrackType = hiddenData ? TrackType.Data : TrackType.Audio, + TrackStartSector = 0, + TrackBytesPerSector = (int)sectorSize, + TrackRawBytesPerSector = (int)sectorSize, + TrackSubchannelType = subType, + TrackEndSector = tracks.First(t => t.TrackSequence == 1).TrackStartSector - 1 } }; @@ -1231,7 +1235,8 @@ namespace Aaru.Core.Devices.Dumping // TODO: Disc ID var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs index 83079ceaf..120d5023e 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs @@ -141,27 +141,36 @@ namespace Aaru.Core.Devices.Dumping { pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 32, Parameter = 0x00 + PS = false, + ReadRetryCount = 32, + Parameter = 0x00 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) }; } pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 255, Parameter = 0x20 + PS = false, + ReadRetryCount = 255, + Parameter = 0x20 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } } }; @@ -345,16 +354,21 @@ namespace Aaru.Core.Devices.Dumping { var pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 255, Parameter = 0x01 + PS = false, + ReadRetryCount = 255, + Parameter = 0x01 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } } }; @@ -452,7 +466,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs index 3896edcef..5c09bbddc 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Tracks.cs @@ -111,7 +111,8 @@ namespace Aaru.Core.Devices.Dumping { trackList.Add(new Track { - TrackSequence = trk.POINT, TrackSession = trk.SessionNumber, + TrackSequence = trk.POINT, + TrackSession = trk.SessionNumber, TrackType = (TocControl)(trk.CONTROL & 0x0D) == TocControl.DataTrack || (TocControl)(trk.CONTROL & 0x0D) == TocControl.DataTrackIncremental ? TrackType.Data : TrackType.Audio, @@ -202,12 +203,15 @@ namespace Aaru.Core.Devices.Dumping { trackList.Add(new Track { - TrackSequence = trk.TrackNumber, TrackSession = 1, + TrackSequence = trk.TrackNumber, + TrackSession = 1, TrackType = (TocControl)(trk.CONTROL & 0x0D) == TocControl.DataTrack || (TocControl)(trk.CONTROL & 0x0D) == TocControl.DataTrackIncremental ? TrackType.Data : TrackType.Audio, - TrackStartSector = trk.TrackStartAddress, TrackBytesPerSector = (int)sectorSize, - TrackRawBytesPerSector = (int)sectorSize, TrackSubchannelType = subType + TrackStartSector = trk.TrackStartAddress, + TrackBytesPerSector = (int)sectorSize, + TrackRawBytesPerSector = (int)sectorSize, + TrackSubchannelType = subType }); trackFlags?.Add(trk.TrackNumber, trk.CONTROL); @@ -230,10 +234,13 @@ namespace Aaru.Core.Devices.Dumping trackList.Add(new Track { - TrackSequence = 1, TrackSession = 1, TrackType = leadoutTrackType, - TrackStartSector = 0, - TrackBytesPerSector = (int)sectorSize, TrackRawBytesPerSector = (int)sectorSize, - TrackSubchannelType = subType + TrackSequence = 1, + TrackSession = 1, + TrackType = leadoutTrackType, + TrackStartSector = 0, + TrackBytesPerSector = (int)sectorSize, + TrackRawBytesPerSector = (int)sectorSize, + TrackSubchannelType = subType }); trackFlags?.Add(1, (byte)(leadoutTrackType == TrackType.Audio ? 0 : 4)); diff --git a/Aaru.Core/Devices/Dumping/Dump.cs b/Aaru.Core/Devices/Dumping/Dump.cs index 232c77c37..465a16db3 100644 --- a/Aaru.Core/Devices/Dumping/Dump.cs +++ b/Aaru.Core/Devices/Dumping/Dump.cs @@ -67,6 +67,7 @@ namespace Aaru.Core.Devices.Dumping readonly bool _fixSubchannelPosition; readonly bool _force; readonly Dictionary _formatOptions; + readonly bool _generateSubchannels; readonly bool _metadata; readonly string _outputPath; readonly IWritableImage _outputPlugin; @@ -84,7 +85,6 @@ namespace Aaru.Core.Devices.Dumping Database.Models.Device _dbDev; // Device database entry bool _dumpFirstTrackPregap; bool _fixOffset; - readonly bool _generateSubchannels; uint _maximumReadable; // Maximum number of sectors drive can read at once Resume _resume; Sidecar _sidecarClass; diff --git a/Aaru.Core/Devices/Dumping/MMC.cs b/Aaru.Core/Devices/Dumping/MMC.cs index 1856f30f3..10e77ef30 100644 --- a/Aaru.Core/Devices/Dumping/MMC.cs +++ b/Aaru.Core/Devices/Dumping/MMC.cs @@ -701,7 +701,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVD_PFI: sidecar.OpticalDisc[0].PFI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -709,7 +710,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVD_DMI: sidecar.OpticalDisc[0].DMI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -718,7 +720,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.HDDVD_CPI: sidecar.OpticalDisc[0].CMI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -738,7 +741,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.BD_BCA: sidecar.OpticalDisc[0].BCA = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -747,7 +751,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVDRAM_DDS: sidecar.OpticalDisc[0].DDS = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -756,7 +761,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.BD_SpareArea: sidecar.OpticalDisc[0].SAI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -764,7 +770,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVDR_PreRecordedInfo: sidecar.OpticalDisc[0].PRI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -772,7 +779,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVD_MediaIdentifier: sidecar.OpticalDisc[0].MediaID = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -780,7 +788,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVDR_PFI: sidecar.OpticalDisc[0].PFIR = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -788,7 +797,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DVD_ADIP: sidecar.OpticalDisc[0].ADIP = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -796,7 +806,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.DCB: sidecar.OpticalDisc[0].DCB = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -804,7 +815,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.BD_DI: sidecar.OpticalDisc[0].DI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -817,9 +829,12 @@ namespace Aaru.Core.Devices.Dumping { new XboxSecuritySectorsType { - RequestNumber = 0, RequestVersion = 1, SecuritySectors = new DumpType + RequestNumber = 0, + RequestVersion = 1, + SecuritySectors = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() } } @@ -832,7 +847,8 @@ namespace Aaru.Core.Devices.Dumping sidecar.OpticalDisc[0].Xbox.PFI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -843,7 +859,8 @@ namespace Aaru.Core.Devices.Dumping sidecar.OpticalDisc[0].Xbox.DMI = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -851,7 +868,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.CD_FullTOC: sidecar.OpticalDisc[0].TOC = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -859,7 +877,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.CD_ATIP: sidecar.OpticalDisc[0].ATIP = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -867,7 +886,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.CD_PMA: sidecar.OpticalDisc[0].PMA = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -875,7 +895,8 @@ namespace Aaru.Core.Devices.Dumping case MediaTagType.CD_TEXT: sidecar.OpticalDisc[0].LeadInCdText = new DumpType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() }; @@ -885,7 +906,8 @@ namespace Aaru.Core.Devices.Dumping { new BorderType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() } }; @@ -896,7 +918,8 @@ namespace Aaru.Core.Devices.Dumping { new BorderType { - Image = outputPath, Size = (ulong)tag.Value.Length, + Image = outputPath, + Size = (ulong)tag.Value.Length, Checksums = Checksum.GetChecksums(tag.Value).ToArray() } }; diff --git a/Aaru.Core/Devices/Dumping/Metadata.cs b/Aaru.Core/Devices/Dumping/Metadata.cs index 3ee9f81fe..fdf0af836 100644 --- a/Aaru.Core/Devices/Dumping/Metadata.cs +++ b/Aaru.Core/Devices/Dumping/Metadata.cs @@ -113,7 +113,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) _dumpLog.WriteLine("Found filesystem {0} at sector {1}", filesystem.type, filesystem.start); diff --git a/Aaru.Core/Devices/Dumping/MiniDisc.cs b/Aaru.Core/Devices/Dumping/MiniDisc.cs index 8fe635887..7647748d8 100644 --- a/Aaru.Core/Devices/Dumping/MiniDisc.cs +++ b/Aaru.Core/Devices/Dumping/MiniDisc.cs @@ -511,31 +511,50 @@ namespace Aaru.Core.Devices.Dumping { pg = new Modes.ModePage_01 { - PS = false, AWRE = true, ARRE = true, TB = false, - RC = false, EER = true, PER = false, DTE = true, - DCR = false, ReadRetryCount = 32 + PS = false, + AWRE = true, + ARRE = true, + TB = false, + RC = false, + EER = true, + PER = false, + DTE = true, + DCR = false, + ReadRetryCount = 32 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) }; } pg = new Modes.ModePage_01 { - PS = false, AWRE = false, ARRE = false, TB = true, - RC = false, EER = true, PER = false, DTE = false, - DCR = false, ReadRetryCount = 255 + PS = false, + AWRE = false, + ARRE = false, + TB = true, + RC = false, + EER = true, + PER = false, + DTE = false, + DCR = false, + ReadRetryCount = 255 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) } } }; @@ -615,7 +634,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } @@ -643,7 +663,8 @@ namespace Aaru.Core.Devices.Dumping var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -725,7 +746,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) { UpdateStatus?.Invoke($"Found filesystem {filesystem.type} at sector {filesystem.start}"); diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs index 90f68e313..4ac400f42 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/MemoryStick.cs @@ -371,31 +371,50 @@ namespace Aaru.Core.Devices.Dumping { pg = new Modes.ModePage_01 { - PS = false, AWRE = true, ARRE = true, TB = false, - RC = false, EER = true, PER = false, DTE = true, - DCR = false, ReadRetryCount = 32 + PS = false, + AWRE = true, + ARRE = true, + TB = false, + RC = false, + EER = true, + PER = false, + DTE = true, + DCR = false, + ReadRetryCount = 32 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) }; } pg = new Modes.ModePage_01 { - PS = false, AWRE = false, ARRE = false, TB = true, - RC = false, EER = true, PER = false, DTE = false, - DCR = false, ReadRetryCount = 255 + PS = false, + AWRE = false, + ARRE = false, + TB = true, + RC = false, + EER = true, + PER = false, + DTE = false, + DCR = false, + ReadRetryCount = 255 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) } } }; @@ -477,7 +496,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } @@ -503,7 +523,8 @@ namespace Aaru.Core.Devices.Dumping var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -587,7 +608,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) { UpdateStatus?.Invoke($"Found filesystem {filesystem.type} at sector {filesystem.start}"); diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs index 1705a10e1..a6a384b31 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable/UMD.cs @@ -156,9 +156,13 @@ namespace Aaru.Core.Devices.Dumping { new Track { - TrackBytesPerSector = (int)BLOCK_SIZE, TrackEndSector = blocks - 1, TrackSequence = 1, - TrackRawBytesPerSector = (int)BLOCK_SIZE, TrackSubchannelType = TrackSubchannelType.None, - TrackSession = 1, TrackType = TrackType.Data + TrackBytesPerSector = (int)BLOCK_SIZE, + TrackEndSector = blocks - 1, + TrackSequence = 1, + TrackRawBytesPerSector = (int)BLOCK_SIZE, + TrackSubchannelType = TrackSubchannelType.None, + TrackSession = 1, + TrackType = TrackType.Data } }); @@ -372,31 +376,50 @@ namespace Aaru.Core.Devices.Dumping { pg = new Modes.ModePage_01 { - PS = false, AWRE = true, ARRE = true, TB = false, - RC = false, EER = true, PER = false, DTE = true, - DCR = false, ReadRetryCount = 32 + PS = false, + AWRE = true, + ARRE = true, + TB = false, + RC = false, + EER = true, + PER = false, + DTE = true, + DCR = false, + ReadRetryCount = 32 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) }; } pg = new Modes.ModePage_01 { - PS = false, AWRE = false, ARRE = false, TB = true, - RC = false, EER = true, PER = false, DTE = false, - DCR = false, ReadRetryCount = 255 + PS = false, + AWRE = false, + ARRE = false, + TB = true, + RC = false, + EER = true, + PER = false, + DTE = false, + DCR = false, + ReadRetryCount = 255 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) } } }; @@ -480,7 +503,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } @@ -506,7 +530,9 @@ namespace Aaru.Core.Devices.Dumping var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion(), MediaPartNumber = mediaPartNumber + Application = "Aaru", + ApplicationVersion = Version.GetVersion(), + MediaPartNumber = mediaPartNumber }; if(!_outputPlugin.SetMetadata(metadata)) diff --git a/Aaru.Core/Devices/Dumping/ResumeSupport.cs b/Aaru.Core/Devices/Dumping/ResumeSupport.cs index 9b6ab5c76..b1ff8da71 100644 --- a/Aaru.Core/Devices/Dumping/ResumeSupport.cs +++ b/Aaru.Core/Devices/Dumping/ResumeSupport.cs @@ -131,9 +131,11 @@ namespace Aaru.Core.Devices.Dumping currentTry = new DumpHardwareType { - Software = CommonTypes.Metadata.Version.GetSoftwareType(), Manufacturer = manufacturer, - Model = model, Serial = serial, - Firmware = firmware + Software = CommonTypes.Metadata.Version.GetSoftwareType(), + Manufacturer = manufacturer, + Model = model, + Serial = serial, + Firmware = firmware }; resume.Tries.Add(currentTry); @@ -143,16 +145,20 @@ namespace Aaru.Core.Devices.Dumping { resume = new Resume { - Tries = new List(), CreationDate = DateTime.UtcNow, - BadBlocks = new List(), - LastBlock = isTape ? 0 : blocks - 1, Tape = isTape + Tries = new List(), + CreationDate = DateTime.UtcNow, + BadBlocks = new List(), + LastBlock = isTape ? 0 : blocks - 1, + Tape = isTape }; currentTry = new DumpHardwareType { - Software = CommonTypes.Metadata.Version.GetSoftwareType(), Manufacturer = manufacturer, - Model = model, Serial = serial, - Firmware = firmware + Software = CommonTypes.Metadata.Version.GetSoftwareType(), + Manufacturer = manufacturer, + Model = model, + Serial = serial, + Firmware = firmware }; resume.Tries.Add(currentTry); diff --git a/Aaru.Core/Devices/Dumping/SBC.cs b/Aaru.Core/Devices/Dumping/SBC.cs index 38a54b0bd..d9f60fe5e 100644 --- a/Aaru.Core/Devices/Dumping/SBC.cs +++ b/Aaru.Core/Devices/Dumping/SBC.cs @@ -449,9 +449,11 @@ namespace Aaru.Core.Devices.Dumping { TrackSequence = trkInfo.LogicalTrackNumber, TrackSession = (ushort)(canStoreNotCdSessions ? trkInfo.SessionNumber : 1), - TrackType = TrackType.Data, TrackStartSector = trkInfo.LogicalTrackStartAddress, + TrackType = TrackType.Data, + TrackStartSector = trkInfo.LogicalTrackStartAddress, TrackEndSector = (trkInfo.LogicalTrackSize + trkInfo.LogicalTrackStartAddress) - 1, - TrackRawBytesPerSector = (int)blockSize, TrackBytesPerSector = (int)blockSize, + TrackRawBytesPerSector = (int)blockSize, + TrackBytesPerSector = (int)blockSize, TrackSubchannelType = TrackSubchannelType.None }; @@ -487,10 +489,13 @@ namespace Aaru.Core.Devices.Dumping { new Track { - TrackBytesPerSector = (int)blockSize, TrackEndSector = blocks - 1, - TrackSequence = 1, TrackRawBytesPerSector = (int)blockSize, - TrackSubchannelType = TrackSubchannelType.None, TrackSession = 1, - TrackType = TrackType.Data + TrackBytesPerSector = (int)blockSize, + TrackEndSector = blocks - 1, + TrackSequence = 1, + TrackRawBytesPerSector = (int)blockSize, + TrackSubchannelType = TrackSubchannelType.None, + TrackSession = 1, + TrackType = TrackType.Data } }); } @@ -807,26 +812,39 @@ namespace Aaru.Core.Devices.Dumping { pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 32, Parameter = 0x00 + PS = false, + ReadRetryCount = 32, + Parameter = 0x00 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) }; } else { pg = new Modes.ModePage_01 { - PS = false, AWRE = true, ARRE = true, TB = false, - RC = false, EER = true, PER = false, DTE = true, - DCR = false, ReadRetryCount = 32 + PS = false, + AWRE = true, + ARRE = true, + TB = false, + RC = false, + EER = true, + PER = false, + DTE = true, + DCR = false, + ReadRetryCount = 32 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) }; } } @@ -835,16 +853,21 @@ namespace Aaru.Core.Devices.Dumping { pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 255, Parameter = 0x20 + PS = false, + ReadRetryCount = 255, + Parameter = 0x20 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } } }; @@ -856,18 +879,28 @@ namespace Aaru.Core.Devices.Dumping { pg = new Modes.ModePage_01 { - PS = false, AWRE = false, ARRE = false, TB = true, - RC = false, EER = true, PER = false, DTE = false, - DCR = false, ReadRetryCount = 255 + PS = false, + AWRE = false, + ARRE = false, + TB = true, + RC = false, + EER = true, + PER = false, + DTE = false, + DCR = false, + ReadRetryCount = 255 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01(pg) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01(pg) } } }; @@ -954,7 +987,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } @@ -1152,7 +1186,8 @@ namespace Aaru.Core.Devices.Dumping // TODO: Non-removable drive information var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -1238,12 +1273,14 @@ namespace Aaru.Core.Devices.Dumping if(_outputPlugin.SupportedMediaTags.Contains(MediaTagType.USB_Descriptors)) sidecar.BlockMedia[0].USB = new USBType { - ProductID = _dev.UsbProductId, VendorID = _dev.UsbVendorId, Descriptors = - new DumpType - { - Image = _outputPath, Size = (ulong)_dev.UsbDescriptors.Length, - Checksums = Checksum.GetChecksums(_dev.UsbDescriptors).ToArray() - } + ProductID = _dev.UsbProductId, + VendorID = _dev.UsbVendorId, + Descriptors = new DumpType + { + Image = _outputPath, + Size = (ulong)_dev.UsbDescriptors.Length, + Checksums = Checksum.GetChecksums(_dev.UsbDescriptors).ToArray() + } }; byte[] cmdBuf; @@ -1258,7 +1295,8 @@ namespace Aaru.Core.Devices.Dumping { Identify = new DumpType { - Image = _outputPath, Size = (ulong)cmdBuf.Length, + Image = _outputPath, + Size = (ulong)cmdBuf.Length, Checksums = Checksum.GetChecksums(cmdBuf).ToArray() } }; @@ -1273,7 +1311,8 @@ namespace Aaru.Core.Devices.Dumping { Inquiry = new DumpType { - Image = _outputPath, Size = (ulong)cmdBuf.Length, + Image = _outputPath, + Size = (ulong)cmdBuf.Length, Checksums = Checksum.GetChecksums(cmdBuf).ToArray() } }; @@ -1331,7 +1370,8 @@ namespace Aaru.Core.Devices.Dumping if(_outputPlugin.SupportedMediaTags.Contains(MediaTagType.SCSI_MODESENSE_10)) sidecar.BlockMedia[0].SCSI.ModeSense10 = new DumpType { - Image = _outputPath, Size = (ulong)cmdBuf.Length, + Image = _outputPath, + Size = (ulong)cmdBuf.Length, Checksums = Checksum.GetChecksums(cmdBuf).ToArray() }; @@ -1354,7 +1394,8 @@ namespace Aaru.Core.Devices.Dumping if(_outputPlugin.SupportedMediaTags.Contains(MediaTagType.SCSI_MODESENSE_6)) sidecar.BlockMedia[0].SCSI.ModeSense = new DumpType { - Image = _outputPath, Size = (ulong)cmdBuf.Length, + Image = _outputPath, + Size = (ulong)cmdBuf.Length, Checksums = Checksum.GetChecksums(cmdBuf).ToArray() }; } @@ -1371,7 +1412,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) { UpdateStatus?.Invoke($"Found filesystem {filesystem.type} at sector {filesystem.start}"); diff --git a/Aaru.Core/Devices/Dumping/SSC.cs b/Aaru.Core/Devices/Dumping/SSC.cs index 35e4f5412..6e0993821 100644 --- a/Aaru.Core/Devices/Dumping/SSC.cs +++ b/Aaru.Core/Devices/Dumping/SSC.cs @@ -764,12 +764,15 @@ namespace Aaru.Core.Devices.Dumping var currentTapeFile = new TapeFile { - File = currentFile, FirstBlock = currentBlock, Partition = currentPartition + File = currentFile, + FirstBlock = currentBlock, + Partition = currentPartition }; var currentTapePartition = new TapePartition { - Number = currentPartition, FirstBlock = currentBlock + Number = currentPartition, + FirstBlock = currentBlock }; if((canLocate || canLocateLong) && @@ -834,12 +837,15 @@ namespace Aaru.Core.Devices.Dumping currentTapeFile = new TapeFile { - File = currentFile, FirstBlock = currentBlock, Partition = currentPartition + File = currentFile, + FirstBlock = currentBlock, + Partition = currentPartition }; currentTapePartition = new TapePartition { - Number = currentPartition, FirstBlock = currentBlock + Number = currentPartition, + FirstBlock = currentBlock }; UpdateStatus?.Invoke($"Seeking to partition {currentPartition}"); @@ -958,7 +964,9 @@ namespace Aaru.Core.Devices.Dumping currentTapeFile = new TapeFile { - File = currentFile, FirstBlock = currentBlock, Partition = currentPartition + File = currentFile, + FirstBlock = currentBlock, + Partition = currentPartition }; UpdateStatus?.Invoke($"Changed to file {currentFile} at block {currentBlock}"); @@ -1219,7 +1227,8 @@ namespace Aaru.Core.Devices.Dumping // TODO: Media Serial Number var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -1309,7 +1318,8 @@ namespace Aaru.Core.Devices.Dumping if(filesystems.Count > 0) foreach(var filesystem in filesystems.Select(o => new { - o.start, o.type + o.start, + o.type }).Distinct()) { UpdateStatus?.Invoke($"Found filesystem {filesystem.type} at sector {filesystem.start}"); diff --git a/Aaru.Core/Devices/Dumping/SecureDigital.cs b/Aaru.Core/Devices/Dumping/SecureDigital.cs index 519a5aff0..6a1309ced 100644 --- a/Aaru.Core/Devices/Dumping/SecureDigital.cs +++ b/Aaru.Core/Devices/Dumping/SecureDigital.cs @@ -559,7 +559,8 @@ namespace Aaru.Core.Devices.Dumping // TODO: Drive info var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -655,7 +656,9 @@ namespace Aaru.Core.Devices.Dumping cidDump = new DumpType { - Image = _outputPath, Size = (ulong)cid.Length, Checksums = Checksum.GetChecksums(cid).ToArray() + Image = _outputPath, + Size = (ulong)cid.Length, + Checksums = Checksum.GetChecksums(cid).ToArray() }; ret = @@ -680,7 +683,9 @@ namespace Aaru.Core.Devices.Dumping { csdDump = new DumpType { - Image = _outputPath, Size = (ulong)csd.Length, Checksums = Checksum.GetChecksums(csd).ToArray() + Image = _outputPath, + Size = (ulong)csd.Length, + Checksums = Checksum.GetChecksums(csd).ToArray() }; ret = @@ -705,7 +710,8 @@ namespace Aaru.Core.Devices.Dumping { sidecar.BlockMedia[0].MultiMediaCard.ExtendedCSD = new DumpType { - Image = _outputPath, Size = (ulong)ecsd.Length, + Image = _outputPath, + Size = (ulong)ecsd.Length, Checksums = Checksum.GetChecksums(ecsd).ToArray() }; @@ -728,7 +734,9 @@ namespace Aaru.Core.Devices.Dumping { ocrDump = new DumpType { - Image = _outputPath, Size = (ulong)ocr.Length, Checksums = Checksum.GetChecksums(ocr).ToArray() + Image = _outputPath, + Size = (ulong)ocr.Length, + Checksums = Checksum.GetChecksums(ocr).ToArray() }; ret = @@ -753,7 +761,9 @@ namespace Aaru.Core.Devices.Dumping { sidecar.BlockMedia[0].SecureDigital.SCR = new DumpType { - Image = _outputPath, Size = (ulong)scr.Length, Checksums = Checksum.GetChecksums(scr).ToArray() + Image = _outputPath, + Size = (ulong)scr.Length, + Checksums = Checksum.GetChecksums(scr).ToArray() }; ret = _outputPlugin.WriteMediaTag(scr, MediaTagType.SD_SCR); diff --git a/Aaru.Core/Devices/Dumping/XGD.cs b/Aaru.Core/Devices/Dumping/XGD.cs index 0d349bd8b..813b8f4b6 100644 --- a/Aaru.Core/Devices/Dumping/XGD.cs +++ b/Aaru.Core/Devices/Dumping/XGD.cs @@ -493,9 +493,13 @@ namespace Aaru.Core.Devices.Dumping { new Track { - TrackBytesPerSector = (int)BLOCK_SIZE, TrackEndSector = blocks - 1, TrackSequence = 1, - TrackRawBytesPerSector = (int)BLOCK_SIZE, TrackSubchannelType = TrackSubchannelType.None, - TrackSession = 1, TrackType = TrackType.Data + TrackBytesPerSector = (int)BLOCK_SIZE, + TrackEndSector = blocks - 1, + TrackSequence = 1, + TrackRawBytesPerSector = (int)BLOCK_SIZE, + TrackSubchannelType = TrackSubchannelType.None, + TrackSession = 1, + TrackType = TrackType.Data } }); @@ -1002,27 +1006,36 @@ namespace Aaru.Core.Devices.Dumping { pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 0x20, Parameter = 0x00 + PS = false, + ReadRetryCount = 0x20, + Parameter = 0x00 }; currentModePage = new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) }; } pgMmc = new Modes.ModePage_01_MMC { - PS = false, ReadRetryCount = 255, Parameter = 0x20 + PS = false, + ReadRetryCount = 255, + Parameter = 0x20 }; var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { new Modes.ModePage { - Page = 0x01, Subpage = 0x00, PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) + Page = 0x01, + Subpage = 0x00, + PageResponse = Modes.EncodeModePage_01_MMC(pgMmc) } } }; @@ -1109,7 +1122,8 @@ namespace Aaru.Core.Devices.Dumping { var md = new Modes.DecodedMode { - Header = new Modes.ModeHeader(), Pages = new[] + Header = new Modes.ModeHeader(), + Pages = new[] { currentModePage.Value } @@ -1167,7 +1181,8 @@ namespace Aaru.Core.Devices.Dumping var metadata = new CommonTypes.Structs.ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion() + Application = "Aaru", + ApplicationVersion = Version.GetVersion() }; if(!_outputPlugin.SetMetadata(metadata)) @@ -1199,7 +1214,9 @@ namespace Aaru.Core.Devices.Dumping { var layers = new LayersType { - type = LayersTypeType.OTP, typeSpecified = true, Sectors = new SectorsType[1] + type = LayersTypeType.OTP, + typeSpecified = true, + Sectors = new SectorsType[1] }; layers.Sectors[0] = new SectorsType diff --git a/Aaru.Core/Devices/Report/ATA.cs b/Aaru.Core/Devices/Report/ATA.cs index 8880b39fb..c0fc9ce3f 100644 --- a/Aaru.Core/Devices/Report/ATA.cs +++ b/Aaru.Core/Devices/Report/ATA.cs @@ -73,7 +73,9 @@ namespace Aaru.Core.Devices.Report { mediaTest.CHS = new Chs { - Cylinders = ataId.Cylinders, Heads = ataId.Heads, Sectors = ataId.SectorsPerTrack + Cylinders = ataId.Cylinders, + Heads = ataId.Heads, + Sectors = ataId.SectorsPerTrack }; mediaTest.Blocks = (ulong)(ataId.Cylinders * ataId.Heads * ataId.SectorsPerTrack); @@ -85,7 +87,8 @@ namespace Aaru.Core.Devices.Report { mediaTest.CurrentCHS = new Chs { - Cylinders = ataId.CurrentCylinders, Heads = ataId.CurrentHeads, + Cylinders = ataId.CurrentCylinders, + Heads = ataId.CurrentHeads, Sectors = ataId.CurrentSectorsPerTrack }; @@ -351,8 +354,7 @@ namespace Aaru.Core.Devices.Report _dev.Timeout, out _); mediaTest.SupportsReadLongRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && - readBuf.Length > 0 && - BitConverter.ToUInt64(readBuf, 0) != + readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; AaruConsole.DebugWriteLine("ATA Report", @@ -414,7 +416,9 @@ namespace Aaru.Core.Devices.Report { capabilities.CHS = new Chs { - Cylinders = ataId.Cylinders, Heads = ataId.Heads, Sectors = ataId.SectorsPerTrack + Cylinders = ataId.Cylinders, + Heads = ataId.Heads, + Sectors = ataId.SectorsPerTrack }; capabilities.Blocks = (ulong)(ataId.Cylinders * ataId.Heads * ataId.SectorsPerTrack); @@ -426,7 +430,8 @@ namespace Aaru.Core.Devices.Report { capabilities.CurrentCHS = new Chs { - Cylinders = ataId.CurrentCylinders, Heads = ataId.CurrentHeads, + Cylinders = ataId.CurrentCylinders, + Heads = ataId.CurrentHeads, Sectors = ataId.CurrentSectorsPerTrack }; @@ -665,10 +670,8 @@ namespace Aaru.Core.Devices.Report sense = _dev.ReadLong(out readBuf, out errorChs, false, 0, 0, 1, capabilities.LongBlockSize ?? 0, _dev.Timeout, out _); - capabilities.SupportsReadLong = !sense && (errorChs.Status & 0x01) != 0x01 && - errorChs.Error == 0 && - readBuf.Length > 0 && - BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; + capabilities.SupportsReadLong = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && + readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); @@ -681,8 +684,7 @@ namespace Aaru.Core.Devices.Report _dev.Timeout, out _); capabilities.SupportsReadLongRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && - readBuf.Length > 0 && - BitConverter.ToUInt64(readBuf, 0) != + readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", @@ -710,8 +712,7 @@ namespace Aaru.Core.Devices.Report out _); capabilities.SupportsReadLongRetryLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && - readBuf.Length > 0 && - BitConverter.ToUInt64(readBuf, 0) != + readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", diff --git a/Aaru.Core/Devices/Report/FireWire.cs b/Aaru.Core/Devices/Report/FireWire.cs index 87a4c303d..5548ed3a8 100644 --- a/Aaru.Core/Devices/Report/FireWire.cs +++ b/Aaru.Core/Devices/Report/FireWire.cs @@ -40,7 +40,9 @@ namespace Aaru.Core.Devices.Report /// Fills a device report with parameters specific to a FireWire device public FireWire FireWireReport() => new FireWire { - Manufacturer = _dev.FireWireVendorName, Product = _dev.FireWireModelName, ProductID = _dev.FireWireModel, + Manufacturer = _dev.FireWireVendorName, + Product = _dev.FireWireModelName, + ProductID = _dev.FireWireModel, VendorID = _dev.FireWireVendor }; } diff --git a/Aaru.Core/Devices/Report/SSC.cs b/Aaru.Core/Devices/Report/SSC.cs index b65587e65..e02a361f7 100644 --- a/Aaru.Core/Devices/Report/SSC.cs +++ b/Aaru.Core/Devices/Report/SSC.cs @@ -82,11 +82,13 @@ namespace Aaru.Core.Devices.Report Capacity = dsh.Value.descriptors[i].capacity, DefaultDensity = dsh.Value.descriptors[i].defaultDensity, Description = dsh.Value.descriptors[i].description, - Duplicate = dsh.Value.descriptors[i].duplicate, Name = dsh.Value.descriptors[i].name, + Duplicate = dsh.Value.descriptors[i].duplicate, + Name = dsh.Value.descriptors[i].name, Organization = dsh.Value.descriptors[i].organization, PrimaryCode = dsh.Value.descriptors[i].primaryCode, SecondaryCode = dsh.Value.descriptors[i].secondaryCode, - Tracks = dsh.Value.descriptors[i].tracks, Width = dsh.Value.descriptors[i].width, + Tracks = dsh.Value.descriptors[i].tracks, + Width = dsh.Value.descriptors[i].width, Writable = dsh.Value.descriptors[i].writable }; @@ -111,9 +113,12 @@ namespace Aaru.Core.Devices.Report { array2[i] = new SscSupportedMedia { - Description = mtsh.Value.descriptors[i].description, Length = mtsh.Value.descriptors[i].length, - MediumType = mtsh.Value.descriptors[i].mediumType, Name = mtsh.Value.descriptors[i].name, - Organization = mtsh.Value.descriptors[i].organization, Width = mtsh.Value.descriptors[i].width + Description = mtsh.Value.descriptors[i].description, + Length = mtsh.Value.descriptors[i].length, + MediumType = mtsh.Value.descriptors[i].mediumType, + Name = mtsh.Value.descriptors[i].name, + Organization = mtsh.Value.descriptors[i].organization, + Width = mtsh.Value.descriptors[i].width }; if(mtsh.Value.descriptors[i].densityCodes == null) @@ -192,11 +197,13 @@ namespace Aaru.Core.Devices.Report Capacity = dsh.Value.descriptors[i].capacity, DefaultDensity = dsh.Value.descriptors[i].defaultDensity, Description = dsh.Value.descriptors[i].description, - Duplicate = dsh.Value.descriptors[i].duplicate, Name = dsh.Value.descriptors[i].name, + Duplicate = dsh.Value.descriptors[i].duplicate, + Name = dsh.Value.descriptors[i].name, Organization = dsh.Value.descriptors[i].organization, PrimaryCode = dsh.Value.descriptors[i].primaryCode, SecondaryCode = dsh.Value.descriptors[i].secondaryCode, - Tracks = dsh.Value.descriptors[i].tracks, Width = dsh.Value.descriptors[i].width, + Tracks = dsh.Value.descriptors[i].tracks, + Width = dsh.Value.descriptors[i].width, Writable = dsh.Value.descriptors[i].writable }; @@ -221,7 +228,8 @@ namespace Aaru.Core.Devices.Report { Description = mtsh.Value.descriptors[i].description, Length = mtsh.Value.descriptors[i].length, - MediumType = mtsh.Value.descriptors[i].mediumType, Name = mtsh.Value.descriptors[i].name, + MediumType = mtsh.Value.descriptors[i].mediumType, + Name = mtsh.Value.descriptors[i].name, Organization = mtsh.Value.descriptors[i].organization, Width = mtsh.Value.descriptors[i].width }; diff --git a/Aaru.Core/Devices/Report/Scsi.cs b/Aaru.Core/Devices/Report/Scsi.cs index 629098a85..6eeb95772 100644 --- a/Aaru.Core/Devices/Report/Scsi.cs +++ b/Aaru.Core/Devices/Report/Scsi.cs @@ -145,7 +145,8 @@ namespace Aaru.Core.Devices.Report var evpd = new ScsiPage { - page = page, value = buffer + page = page, + value = buffer }; evpds.Add(evpd); @@ -326,7 +327,8 @@ namespace Aaru.Core.Devices.Report report.SCSI.ModeSense = new ScsiMode { - BlankCheckEnabled = decMode.Value.Header.EBC, DPOandFUA = decMode.Value.Header.DPOFUA, + BlankCheckEnabled = decMode.Value.Header.EBC, + DPOandFUA = decMode.Value.Header.DPOFUA, WriteProtected = decMode.Value.Header.WriteProtected }; @@ -345,7 +347,9 @@ namespace Aaru.Core.Devices.Report { var modePage = new ScsiPage { - page = page.Page, subpage = page.Subpage, value = page.PageResponse + page = page.Page, + subpage = page.Subpage, + value = page.PageResponse }; modePages.Add(modePage); diff --git a/Aaru.Core/Devices/Report/USB.cs b/Aaru.Core/Devices/Report/USB.cs index 4939dc3b0..21869d324 100644 --- a/Aaru.Core/Devices/Report/USB.cs +++ b/Aaru.Core/Devices/Report/USB.cs @@ -42,8 +42,11 @@ namespace Aaru.Core.Devices.Report { var usbReport = new Usb { - Manufacturer = _dev.UsbManufacturerString, Product = _dev.UsbProductString, - ProductID = _dev.UsbProductId, VendorID = _dev.UsbVendorId, Descriptors = _dev.UsbDescriptors + Manufacturer = _dev.UsbManufacturerString, + Product = _dev.UsbProductString, + ProductID = _dev.UsbProductId, + VendorID = _dev.UsbVendorId, + Descriptors = _dev.UsbDescriptors }; return usbReport; diff --git a/Aaru.Core/Devices/Scanning/SecureDigital.cs b/Aaru.Core/Devices/Scanning/SecureDigital.cs index f6664565d..583aaa333 100644 --- a/Aaru.Core/Devices/Scanning/SecureDigital.cs +++ b/Aaru.Core/Devices/Scanning/SecureDigital.cs @@ -240,8 +240,7 @@ namespace Aaru.Core.Devices.Scanning mhddLog.Close(); ibgLog.Close(_dev, results.Blocks, blockSize, (end - start).TotalSeconds, currentSpeed * 1024, - (blockSize * (double)(results.Blocks + 1)) / 1024 / - (results.ProcessingTime / 1000), + (blockSize * (double)(results.Blocks + 1)) / 1024 / (results.ProcessingTime / 1000), _devicePath); InitProgress?.Invoke(); diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs index 6983f93ff..78e77d193 100644 --- a/Aaru.Core/Entropy.cs +++ b/Aaru.Core/Entropy.cs @@ -81,7 +81,8 @@ namespace Aaru.Core { var trackEntropy = new EntropyResults { - Track = currentTrack.TrackSequence, Entropy = 0 + Track = currentTrack.TrackSequence, + Entropy = 0 }; UpdateProgressEvent?. diff --git a/Aaru.Core/Logging/MHDDLog.cs b/Aaru.Core/Logging/MHDDLog.cs index 45707449b..0007f461e 100644 --- a/Aaru.Core/Logging/MHDDLog.cs +++ b/Aaru.Core/Logging/MHDDLog.cs @@ -112,8 +112,7 @@ namespace Aaru.Core.Logging byte[] scanblocksizeBytes = Encoding.ASCII.GetBytes(scanblocksize); byte[] verBytes = Encoding.ASCII.GetBytes(MHDD_VER); - uint pointer = (uint)(deviceBytes.Length + modeBytes.Length + fwBytes.Length + - snBytes.Length + + uint pointer = (uint)(deviceBytes.Length + modeBytes.Length + fwBytes.Length + snBytes.Length + sectorsBytes.Length + sectorsizeBytes.Length + scanblocksizeBytes.Length + verBytes.Length + (2 * 9) + // New lines 4); // Pointer diff --git a/Aaru.Core/Media/Info/ScsiInfo.cs b/Aaru.Core/Media/Info/ScsiInfo.cs index f284b4e33..f20b8d27b 100644 --- a/Aaru.Core/Media/Info/ScsiInfo.cs +++ b/Aaru.Core/Media/Info/ScsiInfo.cs @@ -1382,8 +1382,12 @@ namespace Aaru.Core.Media.Info XgdInfo = new XgdInfo { - L0Video = l0Video, L1Video = l1Video, MiddleZone = middleZone, GameSize = gameSize, - TotalSize = totalSize, LayerBreak = layerBreak + L0Video = l0Video, + L1Video = l1Video, + MiddleZone = middleZone, + GameSize = gameSize, + TotalSize = totalSize, + LayerBreak = layerBreak }; } } diff --git a/Aaru.Core/Remote.cs b/Aaru.Core/Remote.cs index 275593377..048c89a69 100644 --- a/Aaru.Core/Remote.cs +++ b/Aaru.Core/Remote.cs @@ -332,8 +332,9 @@ namespace Aaru.Core existing = new Device(device) { - Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead, - CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc + Id = device.Id, + OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead, + CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc }; mctx.Devices.Add(existing); @@ -344,8 +345,9 @@ namespace Aaru.Core mctx.Devices.Add(new Device(device) { - Id = device.Id, OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead, - CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc + Id = device.Id, + OptimalMultipleSectorsRead = device.OptimalMultipleSectorsRead, + CanReadGdRomUsingSwapDisc = device.CanReadGdRomUsingSwapDisc }); } } diff --git a/Aaru.Core/Sidecar/AudioMedia.cs b/Aaru.Core/Sidecar/AudioMedia.cs index 35fab1f44..fd2540de1 100644 --- a/Aaru.Core/Sidecar/AudioMedia.cs +++ b/Aaru.Core/Sidecar/AudioMedia.cs @@ -58,11 +58,16 @@ namespace Aaru.Core { new AudioMediaType { - Checksums = imgChecksums.ToArray(), Image = new ImageType + Checksums = imgChecksums.ToArray(), + Image = new ImageType { - format = image.Format, offset = 0, offsetSpecified = true, Value = Path.GetFileName(imagePath) + format = image.Format, + offset = 0, + offsetSpecified = true, + Value = Path.GetFileName(imagePath) }, - Size = (ulong)fi.Length, Sequence = new SequenceType + Size = (ulong)fi.Length, + Sequence = new SequenceType { MediaTitle = image.Info.MediaTitle } diff --git a/Aaru.Core/Sidecar/BlockMedia.cs b/Aaru.Core/Sidecar/BlockMedia.cs index 207112f0a..0f223f101 100644 --- a/Aaru.Core/Sidecar/BlockMedia.cs +++ b/Aaru.Core/Sidecar/BlockMedia.cs @@ -71,11 +71,16 @@ namespace Aaru.Core { new BlockMediaType { - Checksums = imgChecksums.ToArray(), Image = new ImageType + Checksums = imgChecksums.ToArray(), + Image = new ImageType { - format = image.Format, offset = 0, offsetSpecified = true, Value = Path.GetFileName(imagePath) + format = image.Format, + offset = 0, + offsetSpecified = true, + Value = Path.GetFileName(imagePath) }, - Size = (ulong)fi.Length, Sequence = new SequenceType + Size = (ulong)fi.Length, + Sequence = new SequenceType { MediaTitle = image.Info.MediaTitle } @@ -134,7 +139,8 @@ namespace Aaru.Core { CIS = new DumpType { - Checksums = Checksum.GetChecksums(cis).ToArray(), Size = (ulong)cis.Length + Checksums = Checksum.GetChecksums(cis).ToArray(), + Size = (ulong)cis.Length } }; @@ -395,8 +401,10 @@ namespace Aaru.Core { var thisPartition = new TapePartitionType { - Image = sidecar.BlockMedia[0].Image, Sequence = tapePartition.Number, - StartBlock = tapePartition.FirstBlock, EndBlock = tapePartition.LastBlock + Image = sidecar.BlockMedia[0].Image, + Sequence = tapePartition.Number, + StartBlock = tapePartition.FirstBlock, + EndBlock = tapePartition.LastBlock }; if(tapeImage.TapePartitions.Count == 1) @@ -466,9 +474,12 @@ namespace Aaru.Core { var thisFile = new TapeFileType { - Sequence = tapeFile.File, StartBlock = tapeFile.FirstBlock, - EndBlock = tapeFile.LastBlock, - Image = sidecar.BlockMedia[0].Image, Size = 0, BlockSize = 0 + Sequence = tapeFile.File, + StartBlock = tapeFile.FirstBlock, + EndBlock = tapeFile.LastBlock, + Image = sidecar.BlockMedia[0].Image, + Size = 0, + BlockSize = 0 }; if(tapeImage.Files.Count(f => f.Partition == tapePartition.Number) == 1) @@ -569,9 +580,12 @@ namespace Aaru.Core sidecar.BlockMedia[0].FileSystemInformation[i] = new PartitionType { - Description = partitions[i].Description, EndSector = partitions[i].End, - Name = partitions[i].Name, Sequence = (uint)partitions[i].Sequence, - StartSector = partitions[i].Start, Type = partitions[i].Type + Description = partitions[i].Description, + EndSector = partitions[i].End, + Name = partitions[i].Name, + Sequence = (uint)partitions[i].Sequence, + StartSector = partitions[i].Start, + Type = partitions[i].Type }; List lstFs = new List(); @@ -618,13 +632,15 @@ namespace Aaru.Core sidecar.BlockMedia[0].FileSystemInformation[0] = new PartitionType { - StartSector = 0, EndSector = image.Info.Sectors - 1 + StartSector = 0, + EndSector = image.Info.Sectors - 1 }; var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; List lstFs = new List(); @@ -875,12 +891,14 @@ namespace Aaru.Core var scpBlockTrackType = new BlockTrackType { - Cylinder = t / image.Info.Heads, Head = (ushort)(t % image.Info.Heads), Image = - new ImageType - { - format = scpImage.Format, Value = Path.GetFileName(scpFilePath), - offset = scpImage.Header.offsets[t] - } + Cylinder = t / image.Info.Heads, + Head = (ushort)(t % image.Info.Heads), + Image = new ImageType + { + format = scpImage.Format, + Value = Path.GetFileName(scpFilePath), + offset = scpImage.Header.offsets[t] + } }; if(scpBlockTrackType.Cylinder < image.Info.Cylinders) @@ -981,7 +999,8 @@ namespace Aaru.Core var kfBlockTrackType = new BlockTrackType { - Cylinder = kvp.Key / image.Info.Heads, Head = (ushort)(kvp.Key % image.Info.Heads), + Cylinder = kvp.Key / image.Info.Heads, + Head = (ushort)(kvp.Key % image.Info.Heads), Image = new ImageType { format = kfImage.Format, @@ -1067,11 +1086,13 @@ namespace Aaru.Core var dfiBlockTrackType = new BlockTrackType { - Cylinder = (uint)(t / image.Info.Heads), Head = (ushort)(t % image.Info.Heads), Image = - new ImageType - { - format = dfiImage.Format, Value = Path.GetFileName(dfiFilePath) - } + Cylinder = (uint)(t / image.Info.Heads), + Head = (ushort)(t % image.Info.Heads), + Image = new ImageType + { + format = dfiImage.Format, + Value = Path.GetFileName(dfiFilePath) + } }; if(dfiBlockTrackType.Cylinder < image.Info.Cylinders) diff --git a/Aaru.Core/Sidecar/BlockTape.cs b/Aaru.Core/Sidecar/BlockTape.cs index a337ea269..61c28deb7 100644 --- a/Aaru.Core/Sidecar/BlockTape.cs +++ b/Aaru.Core/Sidecar/BlockTape.cs @@ -52,19 +52,27 @@ namespace Aaru.Core { Image = new ImageType { - format = "Directory", offsetSpecified = false, Value = folderName + format = "Directory", + offsetSpecified = false, + Value = folderName }, Sequence = new SequenceType { - MediaTitle = folderName, MediaSequence = 1, TotalMedia = 1 + MediaTitle = folderName, + MediaSequence = 1, + TotalMedia = 1 }, - PhysicalBlockSize = blockSize, LogicalBlockSize = blockSize, TapeInformation = new[] + PhysicalBlockSize = blockSize, + LogicalBlockSize = blockSize, + TapeInformation = new[] { new TapePartitionType { Image = new ImageType { - format = "Directory", offsetSpecified = false, Value = folderName + format = "Directory", + offsetSpecified = false, + Value = folderName } } } @@ -94,10 +102,14 @@ namespace Aaru.Core { Image = new ImageType { - format = "Raw disk image (sector by sector copy)", offset = 0, + format = "Raw disk image (sector by sector copy)", + offset = 0, Value = Path.GetFileName(files[i]) }, - Size = (ulong)fs.Length, BlockSize = blockSize, StartBlock = currentBlock, Sequence = (ulong)i + Size = (ulong)fs.Length, + BlockSize = blockSize, + StartBlock = currentBlock, + Sequence = (ulong)i }; const uint SECTORS_TO_READ = 512; diff --git a/Aaru.Core/Sidecar/Files.cs b/Aaru.Core/Sidecar/Files.cs index 5cef1e033..e2dbf91df 100644 --- a/Aaru.Core/Sidecar/Files.cs +++ b/Aaru.Core/Sidecar/Files.cs @@ -310,7 +310,9 @@ namespace Aaru.Core xattrTypes.Add(new ExtendedAttributeType { - Checksums = xattrChkWorker.End().ToArray(), length = (ulong)data.Length, name = xattr + Checksums = xattrChkWorker.End().ToArray(), + length = (ulong)data.Length, + name = xattr }); } diff --git a/Aaru.Core/Sidecar/LinearMedia.cs b/Aaru.Core/Sidecar/LinearMedia.cs index cec933d97..d5638e148 100644 --- a/Aaru.Core/Sidecar/LinearMedia.cs +++ b/Aaru.Core/Sidecar/LinearMedia.cs @@ -57,9 +57,13 @@ namespace Aaru.Core { new LinearMediaType { - Checksums = imgChecksums.ToArray(), Image = new ImageType + Checksums = imgChecksums.ToArray(), + Image = new ImageType { - format = image.Format, offset = 0, offsetSpecified = true, Value = Path.GetFileName(imagePath) + format = image.Format, + offset = 0, + offsetSpecified = true, + Value = Path.GetFileName(imagePath) }, Size = (ulong)fi.Length } diff --git a/Aaru.Core/Sidecar/OpticalDisc.cs b/Aaru.Core/Sidecar/OpticalDisc.cs index 3dbbaec9b..fab038e2c 100644 --- a/Aaru.Core/Sidecar/OpticalDisc.cs +++ b/Aaru.Core/Sidecar/OpticalDisc.cs @@ -70,11 +70,16 @@ namespace Aaru.Core { new OpticalDiscType { - Checksums = imgChecksums.ToArray(), Image = new ImageType + Checksums = imgChecksums.ToArray(), + Image = new ImageType { - format = image.Format, offset = 0, offsetSpecified = true, Value = Path.GetFileName(imagePath) + format = image.Format, + offset = 0, + offsetSpecified = true, + Value = Path.GetFileName(imagePath) }, - Size = (ulong)fi.Length, Sequence = new SequenceType + Size = (ulong)fi.Length, + Sequence = new SequenceType { MediaTitle = image.Info.MediaTitle } @@ -182,7 +187,8 @@ namespace Aaru.Core sidecar.OpticalDisc[0].Dimensions = new DimensionsType { - Diameter = 120, Thickness = 1.2 + Diameter = 120, + Thickness = 1.2 }; } else if(DMI.IsXbox360(image.ReadDiskTag(MediaTagType.DVD_DMI))) @@ -191,7 +197,8 @@ namespace Aaru.Core sidecar.OpticalDisc[0].Dimensions = new DimensionsType { - Diameter = 120, Thickness = 1.2 + Diameter = 120, + Thickness = 1.2 }; } @@ -366,7 +373,9 @@ namespace Aaru.Core { new XboxSecuritySectorsType { - RequestNumber = 0, RequestVersion = 1, SecuritySectors = new DumpType + RequestNumber = 0, + RequestVersion = 1, + SecuritySectors = new DumpType { Image = Path.GetFileName(imagePath), Checksums = Checksum. @@ -508,7 +517,8 @@ namespace Aaru.Core xmlTrk.Sequence = new TrackSequenceType { - Session = trk.TrackSession, TrackNumber = trk.TrackSequence + Session = trk.TrackSession, + TrackNumber = trk.TrackSequence }; xmlTrk.StartSector = trk.TrackStartSector; @@ -537,7 +547,8 @@ namespace Aaru.Core xmlTrk.Image = new ImageType { - Value = Path.GetFileName(trk.TrackFile), format = trk.TrackFileType + Value = Path.GetFileName(trk.TrackFile), + format = trk.TrackFileType }; if(trk.TrackFileOffset > 0) @@ -722,9 +733,12 @@ namespace Aaru.Core { xmlTrk.FileSystemInformation[i] = new PartitionType { - Description = trkPartitions[i].Description, EndSector = trkPartitions[i].End, - Name = trkPartitions[i].Name, Sequence = (uint)trkPartitions[i].Sequence, - StartSector = trkPartitions[i].Start, Type = trkPartitions[i].Type + Description = trkPartitions[i].Description, + EndSector = trkPartitions[i].End, + Name = trkPartitions[i].Name, + Sequence = (uint)trkPartitions[i].Sequence, + StartSector = trkPartitions[i].Start, + Type = trkPartitions[i].Type }; List lstFs = new List(); @@ -781,15 +795,19 @@ namespace Aaru.Core { xmlTrk.FileSystemInformation[0] = new PartitionType { - EndSector = xmlTrk.EndSector, StartSector = xmlTrk.StartSector + EndSector = xmlTrk.EndSector, + StartSector = xmlTrk.StartSector }; List lstFs = new List(); var xmlPart = new Partition { - Start = xmlTrk.StartSector, Length = (xmlTrk.EndSector - xmlTrk.StartSector) + 1, - Type = xmlTrk.TrackType1.ToString(), Size = xmlTrk.Size, Sequence = xmlTrk.Sequence.TrackNumber + Start = xmlTrk.StartSector, + Length = (xmlTrk.EndSector - xmlTrk.StartSector) + 1, + Type = xmlTrk.TrackType1.ToString(), + Size = xmlTrk.Size, + Sequence = xmlTrk.Sequence.TrackNumber }; foreach(IFilesystem plugin in plugins.PluginsList.Values) @@ -878,7 +896,8 @@ namespace Aaru.Core { xmlTrk.Indexes = trk.Indexes?.OrderBy(i => i.Key).Select(i => new TrackIndexType { - index = i.Key, Value = i.Value + index = i.Key, + Value = i.Value }).ToArray(); } @@ -922,15 +941,19 @@ namespace Aaru.Core { new ExtentType { - Start = 0, End = image.Info.Sectors + Start = 0, + End = image.Info.Sectors } }, - Manufacturer = image.Info.DriveManufacturer, Model = image.Info.DriveModel, - Firmware = image.Info.DriveFirmwareRevision, Serial = image.Info.DriveSerialNumber, Software = - new SoftwareType - { - Name = image.Info.Application, Version = image.Info.ApplicationVersion - } + Manufacturer = image.Info.DriveManufacturer, + Model = image.Info.DriveModel, + Firmware = image.Info.DriveFirmwareRevision, + Serial = image.Info.DriveSerialNumber, + Software = new SoftwareType + { + Name = image.Info.Application, + Version = image.Info.ApplicationVersion + } } }; } diff --git a/Aaru.Core/Statistics.cs b/Aaru.Core/Statistics.cs index cbf0fde35..f08d1c085 100644 --- a/Aaru.Core/Statistics.cs +++ b/Aaru.Core/Statistics.cs @@ -86,7 +86,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "analyze" && c.Synchronized) ?? new Command { - Name = "analyze", Synchronized = true + Name = "analyze", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Analyze; @@ -99,7 +100,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "checksum" && c.Synchronized) ?? new Command { - Name = "checksum", Synchronized = true + Name = "checksum", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Checksum; @@ -112,7 +114,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "compare" && c.Synchronized) ?? new Command { - Name = "compare", Synchronized = true + Name = "compare", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Compare; @@ -125,7 +128,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "convert-image" && c.Synchronized) ?? new Command { - Name = "convert-image", Synchronized = true + Name = "convert-image", + Synchronized = true }; command.Count += (ulong)allStats.Commands.ConvertImage; @@ -138,7 +142,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "create-sidecar" && c.Synchronized) ?? new Command { - Name = "create-sidecar", Synchronized = true + Name = "create-sidecar", + Synchronized = true }; command.Count += (ulong)allStats.Commands.CreateSidecar; @@ -151,7 +156,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "decode" && c.Synchronized) ?? new Command { - Name = "decode", Synchronized = true + Name = "decode", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Decode; @@ -164,7 +170,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "device-info" && c.Synchronized) ?? new Command { - Name = "device-info", Synchronized = true + Name = "device-info", + Synchronized = true }; command.Count += (ulong)allStats.Commands.DeviceInfo; @@ -177,7 +184,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "device-report" && c.Synchronized) ?? new Command { - Name = "device-report", Synchronized = true + Name = "device-report", + Synchronized = true }; command.Count += (ulong)allStats.Commands.DeviceReport; @@ -190,7 +198,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "dump-media" && c.Synchronized) ?? new Command { - Name = "dump-media", Synchronized = true + Name = "dump-media", + Synchronized = true }; command.Count += (ulong)allStats.Commands.DumpMedia; @@ -203,7 +212,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "entropy" && c.Synchronized) ?? new Command { - Name = "entropy", Synchronized = true + Name = "entropy", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Entropy; @@ -216,7 +226,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "extract-files" && c.Synchronized) ?? new Command { - Name = "extract-files", Synchronized = true + Name = "extract-files", + Synchronized = true }; command.Count += (ulong)allStats.Commands.ExtractFiles; @@ -229,7 +240,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "formats" && c.Synchronized) ?? new Command { - Name = "formats", Synchronized = true + Name = "formats", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Formats; @@ -242,7 +254,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "image-info" && c.Synchronized) ?? new Command { - Name = "image-info", Synchronized = true + Name = "image-info", + Synchronized = true }; command.Count += (ulong)allStats.Commands.ImageInfo; @@ -255,7 +268,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "list-devices" && c.Synchronized) ?? new Command { - Name = "list-devices", Synchronized = true + Name = "list-devices", + Synchronized = true }; command.Count += (ulong)allStats.Commands.ListDevices; @@ -268,7 +282,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "list-encodings" && c.Synchronized) ?? new Command { - Name = "list-encodings", Synchronized = true + Name = "list-encodings", + Synchronized = true }; command.Count += (ulong)allStats.Commands.ListEncodings; @@ -280,7 +295,8 @@ namespace Aaru.Core Command command = ctx.Commands.FirstOrDefault(c => c.Name == "ls" && c.Synchronized) ?? new Command { - Name = "ls", Synchronized = true + Name = "ls", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Ls; @@ -293,7 +309,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "media-info" && c.Synchronized) ?? new Command { - Name = "media-info", Synchronized = true + Name = "media-info", + Synchronized = true }; command.Count += (ulong)allStats.Commands.MediaInfo; @@ -306,7 +323,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "media-scan" && c.Synchronized) ?? new Command { - Name = "media-scan", Synchronized = true + Name = "media-scan", + Synchronized = true }; command.Count += (ulong)allStats.Commands.MediaScan; @@ -319,7 +337,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "printhex" && c.Synchronized) ?? new Command { - Name = "printhex", Synchronized = true + Name = "printhex", + Synchronized = true }; command.Count += (ulong)allStats.Commands.PrintHex; @@ -332,7 +351,8 @@ namespace Aaru.Core ctx.Commands.FirstOrDefault(c => c.Name == "verify" && c.Synchronized) ?? new Command { - Name = "verify", Synchronized = true + Name = "verify", + Synchronized = true }; command.Count += (ulong)allStats.Commands.Verify; @@ -352,7 +372,8 @@ namespace Aaru.Core c.Version == operatingSystem.version && c.Synchronized) ?? new OperatingSystem { - Name = operatingSystem.name, Version = operatingSystem.version, + Name = operatingSystem.name, + Version = operatingSystem.version, Synchronized = true }; @@ -370,7 +391,8 @@ namespace Aaru.Core ctx.Versions.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new Version { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -387,7 +409,8 @@ namespace Aaru.Core ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new Filesystem { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -404,7 +427,8 @@ namespace Aaru.Core ctx.Partitions.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new Partition { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -421,7 +445,8 @@ namespace Aaru.Core ctx.Filesystems.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new Filesystem { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -438,7 +463,8 @@ namespace Aaru.Core ctx.MediaFormats.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new MediaFormat { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -454,7 +480,8 @@ namespace Aaru.Core Filter existing = ctx.Filters.FirstOrDefault(c => c.Name == nvs.name && c.Synchronized) ?? new Filter { - Name = nvs.name, Synchronized = true + Name = nvs.name, + Synchronized = true }; existing.Count += (ulong)nvs.Value; @@ -471,8 +498,11 @@ namespace Aaru.Core ctx.SeenDevices.Add(new DeviceStat { - Bus = device.Bus, Manufacturer = device.Manufacturer, Model = device.Model, - Revision = device.Revision, Synchronized = true + Bus = device.Bus, + Manufacturer = device.Manufacturer, + Model = device.Model, + Revision = device.Revision, + Synchronized = true }); } @@ -486,7 +516,9 @@ namespace Aaru.Core ctx.Medias.FirstOrDefault(c => c.Type == media.type && c.Real == media.real && c.Synchronized) ?? new Database.Models.Media { - Type = media.type, Real = media.real, Synchronized = true + Type = media.type, + Real = media.real, + Synchronized = true }; existing.Count += (ulong)media.Value; @@ -506,13 +538,17 @@ namespace Aaru.Core ctx.OperatingSystems.Add(new OperatingSystem { - Name = DetectOS.GetRealPlatformID().ToString(), Synchronized = false, - Version = DetectOS.GetVersion(), Count = 1 + Name = DetectOS.GetRealPlatformID().ToString(), + Synchronized = false, + Version = DetectOS.GetVersion(), + Count = 1 }); ctx.Versions.Add(new Version { - Name = CommonTypes.Interop.Version.GetVersion(), Synchronized = false, Count = 1 + Name = CommonTypes.Interop.Version.GetVersion(), + Synchronized = false, + Count = 1 }); ctx.SaveChanges(); @@ -581,7 +617,8 @@ namespace Aaru.Core Distinct()) dto.Commands.Add(new NameValueStats { - name = nvs, Value = ctx.Commands.LongCount(c => !c.Synchronized && c.Name == nvs) + name = nvs, + Value = ctx.Commands.LongCount(c => !c.Synchronized && c.Name == nvs) }); } @@ -593,7 +630,8 @@ namespace Aaru.Core Distinct()) dto.Filesystems.Add(new NameValueStats { - name = nvs, Value = ctx.Filesystems.LongCount(c => !c.Synchronized && c.Name == nvs) + name = nvs, + Value = ctx.Filesystems.LongCount(c => !c.Synchronized && c.Name == nvs) }); } @@ -605,7 +643,8 @@ namespace Aaru.Core ) dto.Filters.Add(new NameValueStats { - name = nvs, Value = ctx.Filters.LongCount(c => !c.Synchronized && c.Name == nvs) + name = nvs, + Value = ctx.Filters.LongCount(c => !c.Synchronized && c.Name == nvs) }); } @@ -630,7 +669,8 @@ namespace Aaru.Core Distinct()) dto.Partitions.Add(new NameValueStats { - name = nvs, Value = ctx.Partitions.LongCount(c => !c.Synchronized && c.Name == nvs) + name = nvs, + Value = ctx.Partitions.LongCount(c => !c.Synchronized && c.Name == nvs) }); } @@ -642,7 +682,8 @@ namespace Aaru.Core Distinct()) dto.Versions.Add(new NameValueStats { - name = nvs, Value = ctx.Versions.LongCount(c => !c.Synchronized && c.Name == nvs) + name = nvs, + Value = ctx.Versions.LongCount(c => !c.Synchronized && c.Name == nvs) }); } @@ -656,14 +697,16 @@ namespace Aaru.Core if(ctx.Medias.Any(c => !c.Synchronized && c.Type == media && c.Real)) dto.Medias.Add(new MediaStats { - real = true, type = media, + real = true, + type = media, Value = ctx.Medias.LongCount(c => !c.Synchronized && c.Type == media && c.Real) }); if(ctx.Medias.Any(c => !c.Synchronized && c.Type == media && !c.Real)) dto.Medias.Add(new MediaStats { - real = false, type = media, + real = false, + type = media, Value = ctx.Medias.LongCount(c => !c.Synchronized && c.Type == media && !c.Real) }); } @@ -676,8 +719,10 @@ namespace Aaru.Core foreach(DeviceStat device in ctx.SeenDevices.Where(c => !c.Synchronized)) dto.Devices.Add(new DeviceStats { - Bus = device.Bus, Manufacturer = device.Manufacturer, - ManufacturerSpecified = !(device.Manufacturer is null), Model = device.Model, + Bus = device.Bus, + Manufacturer = device.Manufacturer, + ManufacturerSpecified = !(device.Manufacturer is null), + Model = device.Model, Revision = device.Revision }); } @@ -696,7 +741,8 @@ namespace Aaru.Core Select(c => c.Version).Distinct()) dto.OperatingSystems.Add(new OsStats { - name = osName, version = osVersion, + name = osName, + version = osVersion, Value = ctx.OperatingSystems.LongCount(c => !c.Synchronized && c.Name == osName && c.Version == osVersion) @@ -719,7 +765,8 @@ namespace Aaru.Core Select(c => c.Version).Distinct()) dto.RemoteApplications.Add(new OsStats { - name = remoteAppName, version = remoteAppVersion, + name = remoteAppName, + version = remoteAppVersion, Value = ctx.RemoteApplications.LongCount(c => !c.Synchronized && c.Name == remoteAppName && c.Version == remoteAppVersion) @@ -754,7 +801,8 @@ namespace Aaru.Core Select(c => c.Version).Distinct()) dto.RemoteOperatingSystems.Add(new OsStats { - name = remoteOsName, version = remoteOsVersion, + name = remoteOsName, + version = remoteOsVersion, Value = ctx.RemoteOperatingSystems.LongCount(c => !c.Synchronized && c.Name == remoteOsName && c.Version == remoteOsVersion) @@ -808,7 +856,8 @@ namespace Aaru.Core Command existing = ctx.Commands.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new Command { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += (ulong)ctx.Commands.LongCount(c => !c.Synchronized && c.Name == nvs); @@ -824,7 +873,8 @@ namespace Aaru.Core ctx.Filesystems.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new Filesystem { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += @@ -843,7 +893,8 @@ namespace Aaru.Core Filter existing = ctx.Filters.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new Filter { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += (ulong)ctx.Filters.LongCount(c => !c.Synchronized && c.Name == nvs); @@ -859,7 +910,8 @@ namespace Aaru.Core ctx.MediaFormats.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new MediaFormat { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += @@ -878,7 +930,8 @@ namespace Aaru.Core Partition existing = ctx.Partitions.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new Partition { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += @@ -895,7 +948,8 @@ namespace Aaru.Core Version existing = ctx.Versions.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new Version { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += (ulong)ctx.Versions.LongCount(c => !c.Synchronized && c.Name == nvs); @@ -913,7 +967,9 @@ namespace Aaru.Core ctx.Medias.FirstOrDefault(c => c.Synchronized && c.Type == media && c.Real) ?? new Database.Models.Media { - Synchronized = true, Type = media, Real = true + Synchronized = true, + Type = media, + Real = true }; existing.Count += @@ -933,7 +989,9 @@ namespace Aaru.Core ctx.Medias.FirstOrDefault(c => c.Synchronized && c.Type == media && !c.Real) ?? new Database.Models.Media { - Synchronized = true, Type = media, Real = false + Synchronized = true, + Type = media, + Real = false }; existing.Count += @@ -968,7 +1026,9 @@ namespace Aaru.Core c.Version == osVersion) ?? new OperatingSystem { - Synchronized = true, Version = osVersion, Name = osName + Synchronized = true, + Version = osVersion, + Name = osName }; existing.Count += @@ -1002,7 +1062,9 @@ namespace Aaru.Core c.Version == remoteAppVersion) ?? new RemoteApplication { - Synchronized = true, Version = remoteAppVersion, Name = remoteAppName + Synchronized = true, + Version = remoteAppVersion, + Name = remoteAppName }; existing.Count += @@ -1030,7 +1092,8 @@ namespace Aaru.Core ctx.RemoteArchitectures.FirstOrDefault(c => c.Synchronized && c.Name == nvs) ?? new RemoteArchitecture { - Name = nvs, Synchronized = true + Name = nvs, + Synchronized = true }; existing.Count += @@ -1057,7 +1120,9 @@ namespace Aaru.Core c.Version == remoteOsVersion) ?? new RemoteOperatingSystem { - Synchronized = true, Version = remoteOsVersion, Name = remoteOsName + Synchronized = true, + Version = remoteOsVersion, + Name = remoteOsName }; existing.Count += @@ -1189,7 +1254,9 @@ namespace Aaru.Core ctx.Commands.Add(new Command { - Name = command, Synchronized = false, Count = 1 + Name = command, + Synchronized = false, + Count = 1 }); try @@ -1218,7 +1285,9 @@ namespace Aaru.Core ctx.Filesystems.Add(new Filesystem { - Name = filesystem, Synchronized = false, Count = 1 + Name = filesystem, + Synchronized = false, + Count = 1 }); try @@ -1247,7 +1316,9 @@ namespace Aaru.Core ctx.Partitions.Add(new Partition { - Name = partition, Synchronized = false, Count = 1 + Name = partition, + Synchronized = false, + Count = 1 }); try @@ -1276,7 +1347,9 @@ namespace Aaru.Core ctx.Filters.Add(new Filter { - Name = filter, Synchronized = false, Count = 1 + Name = filter, + Synchronized = false, + Count = 1 }); try @@ -1305,7 +1378,9 @@ namespace Aaru.Core ctx.MediaFormats.Add(new MediaFormat { - Name = format, Synchronized = false, Count = 1 + Name = format, + Synchronized = false, + Count = 1 }); try @@ -1344,7 +1419,10 @@ namespace Aaru.Core ctx.SeenDevices.Add(new DeviceStat { - Bus = deviceBus, Manufacturer = dev.Manufacturer, Model = dev.Model, Revision = dev.FirmwareRevision, + Bus = deviceBus, + Manufacturer = dev.Manufacturer, + Model = dev.Model, + Revision = dev.FirmwareRevision, Synchronized = false }); @@ -1372,7 +1450,10 @@ namespace Aaru.Core ctx.Medias.Add(new Database.Models.Media { - Real = real, Synchronized = false, Type = type.ToString(), Count = 1 + Real = real, + Synchronized = false, + Type = type.ToString(), + Count = 1 }); try @@ -1398,17 +1479,25 @@ namespace Aaru.Core ctx.RemoteApplications.Add(new RemoteApplication { - Count = 1, Name = serverApplication, Synchronized = false, Version = serverVersion + Count = 1, + Name = serverApplication, + Synchronized = false, + Version = serverVersion }); ctx.RemoteArchitectures.Add(new RemoteArchitecture { - Count = 1, Name = serverArchitecture, Synchronized = false + Count = 1, + Name = serverArchitecture, + Synchronized = false }); ctx.RemoteOperatingSystems.Add(new RemoteOperatingSystem { - Count = 1, Name = serverOperatingSystem, Synchronized = false, Version = serverOperatingSystemVersion + Count = 1, + Name = serverOperatingSystem, + Synchronized = false, + Version = serverOperatingSystemVersion }); try diff --git a/Aaru.Database/Migrations/20181126222301_DeviceReportV2.cs b/Aaru.Database/Migrations/20181126222301_DeviceReportV2.cs index ae9cf77f9..00fb8da04 100644 --- a/Aaru.Database/Migrations/20181126222301_DeviceReportV2.cs +++ b/Aaru.Database/Migrations/20181126222301_DeviceReportV2.cs @@ -11,7 +11,8 @@ namespace Aaru.Database.Migrations { Id = table.Column().Annotation("Sqlite:Autoincrement", true), Cylinders = table.Column(), - Heads = table.Column(), Sectors = table.Column() + Heads = table.Column(), + Sectors = table.Column() }, constraints: table => { table.PrimaryKey("PK_Chs", x => x.Id); @@ -132,18 +133,29 @@ namespace Aaru.Database.Migrations EmbeddedChanger = table.Column(), ErrorRecoveryPage = table.Column(), FirmwareDate = table.Column(nullable: true), - LoadingMechanismType = table.Column(nullable: true), Locked = table.Column(), - LogicalBlockSize = table.Column(nullable: true), MultiRead = table.Column(), + LoadingMechanismType = table.Column(nullable: true), + Locked = table.Column(), + LogicalBlockSize = table.Column(nullable: true), + MultiRead = table.Column(), PhysicalInterfaceStandardNumber = table.Column(nullable: true), - PreventJumper = table.Column(), SupportsAACS = table.Column(), - SupportsBusEncryption = table.Column(), SupportsC2 = table.Column(), - SupportsCPRM = table.Column(), SupportsCSS = table.Column(), - SupportsDAP = table.Column(), SupportsDeviceBusyEvent = table.Column(), - SupportsHybridDiscs = table.Column(), SupportsModePage1Ch = table.Column(), - SupportsOSSC = table.Column(), SupportsPWP = table.Column(), - SupportsSWPP = table.Column(), SupportsSecurDisc = table.Column(), - SupportsSeparateVolume = table.Column(), SupportsVCPS = table.Column(), - SupportsWriteInhibitDCB = table.Column(), SupportsWriteProtectPAC = table.Column(), + PreventJumper = table.Column(), + SupportsAACS = table.Column(), + SupportsBusEncryption = table.Column(), + SupportsC2 = table.Column(), + SupportsCPRM = table.Column(), + SupportsCSS = table.Column(), + SupportsDAP = table.Column(), + SupportsDeviceBusyEvent = table.Column(), + SupportsHybridDiscs = table.Column(), + SupportsModePage1Ch = table.Column(), + SupportsOSSC = table.Column(), + SupportsPWP = table.Column(), + SupportsSWPP = table.Column(), + SupportsSecurDisc = table.Column(), + SupportsSeparateVolume = table.Column(), + SupportsVCPS = table.Column(), + SupportsWriteInhibitDCB = table.Column(), + SupportsWriteProtectPAC = table.Column(), VolumeLevels = table.Column(nullable: true) }, constraints: table => { @@ -153,8 +165,10 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("MmcSd", table => new { Id = table.Column().Annotation("Sqlite:Autoincrement", true), - CID = table.Column(nullable: true), CSD = table.Column(nullable: true), - OCR = table.Column(nullable: true), SCR = table.Column(nullable: true), + CID = table.Column(nullable: true), + CSD = table.Column(nullable: true), + OCR = table.Column(nullable: true), + SCR = table.Column(nullable: true), ExtendedCSD = table.Column(nullable: true) }, constraints: table => { @@ -163,37 +177,57 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("ModePage_2A", table => new { - PS = table.Column(), MultiSession = table.Column(), + PS = table.Column(), + MultiSession = table.Column(), Mode2Form2 = table.Column(), - Mode2Form1 = table.Column(), AudioPlay = table.Column(), + Mode2Form1 = table.Column(), + AudioPlay = table.Column(), ISRC = table.Column(), - UPC = table.Column(), C2Pointer = table.Column(), - DeinterlaveSubchannel = table.Column(), Subchannel = table.Column(), - AccurateCDDA = table.Column(), CDDACommand = table.Column(), - LoadingMechanism = table.Column(), Eject = table.Column(), - PreventJumper = table.Column(), LockState = table.Column(), + UPC = table.Column(), + C2Pointer = table.Column(), + DeinterlaveSubchannel = table.Column(), + Subchannel = table.Column(), + AccurateCDDA = table.Column(), + CDDACommand = table.Column(), + LoadingMechanism = table.Column(), + Eject = table.Column(), + PreventJumper = table.Column(), + LockState = table.Column(), Lock = table.Column(), - SeparateChannelMute = table.Column(), SeparateChannelVolume = table.Column(), - MaximumSpeed = table.Column(), SupportedVolumeLevels = table.Column(), - BufferSize = table.Column(), CurrentSpeed = table.Column(), - Method2 = table.Column(), ReadCDRW = table.Column(), + SeparateChannelMute = table.Column(), + SeparateChannelVolume = table.Column(), + MaximumSpeed = table.Column(), + SupportedVolumeLevels = table.Column(), + BufferSize = table.Column(), + CurrentSpeed = table.Column(), + Method2 = table.Column(), + ReadCDRW = table.Column(), ReadCDR = table.Column(), - WriteCDRW = table.Column(), WriteCDR = table.Column(), + WriteCDRW = table.Column(), + WriteCDR = table.Column(), DigitalPort2 = table.Column(), - DigitalPort1 = table.Column(), Composite = table.Column(), + DigitalPort1 = table.Column(), + Composite = table.Column(), SSS = table.Column(), - SDP = table.Column(), Length = table.Column(), + SDP = table.Column(), + Length = table.Column(), LSBF = table.Column(), - RCK = table.Column(), BCK = table.Column(), + RCK = table.Column(), + BCK = table.Column(), TestWrite = table.Column(), - MaxWriteSpeed = table.Column(), CurrentWriteSpeed = table.Column(), - ReadBarcode = table.Column(), ReadDVDRAM = table.Column(), + MaxWriteSpeed = table.Column(), + CurrentWriteSpeed = table.Column(), + ReadBarcode = table.Column(), + ReadDVDRAM = table.Column(), ReadDVDR = table.Column(), - ReadDVDROM = table.Column(), WriteDVDRAM = table.Column(), + ReadDVDROM = table.Column(), + WriteDVDRAM = table.Column(), WriteDVDR = table.Column(), - LeadInPW = table.Column(), SCC = table.Column(), + LeadInPW = table.Column(), + SCC = table.Column(), CMRSupported = table.Column(), - BUF = table.Column(), RotationControlSelected = table.Column(), + BUF = table.Column(), + RotationControlSelected = table.Column(), CurrentWriteSpeedSelected = table.Column(), Id = table.Column().Annotation("Sqlite:Autoincrement", true) }, constraints: table => @@ -218,10 +252,12 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("ScsiMode", table => new { Id = table.Column().Annotation("Sqlite:Autoincrement", true), - MediumType = table.Column(nullable: true), WriteProtected = table.Column(), + MediumType = table.Column(nullable: true), + WriteProtected = table.Column(), Speed = table.Column(nullable: true), BufferedMode = table.Column(nullable: true), - BlankCheckEnabled = table.Column(), DPOandFUA = table.Column() + BlankCheckEnabled = table.Column(), + DPOandFUA = table.Column() }, constraints: table => { table.PrimaryKey("PK_ScsiMode", x => x.Id); @@ -284,7 +320,8 @@ namespace Aaru.Database.Migrations Id = table.Column().Annotation("Sqlite:Autoincrement", true), CanReadMediaSerial = table.Column(nullable: true), Density = table.Column(nullable: true), - Manufacturer = table.Column(nullable: true), MediaIsRecognized = table.Column(), + Manufacturer = table.Column(nullable: true), + MediaIsRecognized = table.Column(), MediumType = table.Column(nullable: true), MediumTypeName = table.Column(nullable: true), Model = table.Column(nullable: true), @@ -368,12 +405,14 @@ namespace Aaru.Database.Migrations Id = table.Column().Annotation("Sqlite:Autoincrement", true), USBId = table.Column(nullable: true), FireWireId = table.Column(nullable: true), - PCMCIAId = table.Column(nullable: true), CompactFlash = table.Column(), + PCMCIAId = table.Column(nullable: true), + CompactFlash = table.Column(), ATAId = table.Column(nullable: true), ATAPIId = table.Column(nullable: true), SCSIId = table.Column(nullable: true), MultiMediaCardId = table.Column(nullable: true), - SecureDigitalId = table.Column(nullable: true), Discriminator = table.Column(), + SecureDigitalId = table.Column(nullable: true), + Discriminator = table.Column(), LastSynchronized = table.Column(nullable: true) }, constraints: table => { @@ -503,8 +542,9 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("Ata", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Identify = table.Column(nullable: true), ReadCapabilitiesId = table.Column(nullable: true) + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Identify = table.Column(nullable: true), + ReadCapabilitiesId = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Ata", x => x.Id); @@ -515,15 +555,17 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("Scsi", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - InquiryData = table.Column(nullable: true), SupportsModeSense6 = table.Column(), - SupportsModeSense10 = table.Column(), SupportsModeSubpages = table.Column(), - ModeSenseId = table.Column(nullable: true), - MultiMediaDeviceId = table.Column(nullable: true), - ReadCapabilitiesId = table.Column(nullable: true), - SequentialDeviceId = table.Column(nullable: true), - ModeSense6Data = table.Column(nullable: true), - ModeSense10Data = table.Column(nullable: true) + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + InquiryData = table.Column(nullable: true), + SupportsModeSense6 = table.Column(), + SupportsModeSense10 = table.Column(), + SupportsModeSubpages = table.Column(), + ModeSenseId = table.Column(nullable: true), + MultiMediaDeviceId = table.Column(nullable: true), + ReadCapabilitiesId = table.Column(nullable: true), + SequentialDeviceId = table.Column(nullable: true), + ModeSense6Data = table.Column(nullable: true), + ModeSense10Data = table.Column(nullable: true) }, constraints: table => { table.PrimaryKey("PK_Scsi", x => x.Id); @@ -543,7 +585,8 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("ScsiPage", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), page = table.Column(), + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + page = table.Column(), subpage = table.Column(nullable: true), value = table.Column(nullable: true), ScsiId = table.Column(nullable: true), diff --git a/Aaru.Database/Migrations/20181127013131_CorrectReportsDbSet.cs b/Aaru.Database/Migrations/20181127013131_CorrectReportsDbSet.cs index 6058671e6..847e922c0 100644 --- a/Aaru.Database/Migrations/20181127013131_CorrectReportsDbSet.cs +++ b/Aaru.Database/Migrations/20181127013131_CorrectReportsDbSet.cs @@ -14,14 +14,17 @@ namespace Aaru.Database.Migrations Id = table.Column().Annotation("Sqlite:Autoincrement", true), USBId = table.Column(nullable: true), FireWireId = table.Column(nullable: true), - PCMCIAId = table.Column(nullable: true), CompactFlash = table.Column(), + PCMCIAId = table.Column(nullable: true), + CompactFlash = table.Column(), ATAId = table.Column(nullable: true), ATAPIId = table.Column(nullable: true), SCSIId = table.Column(nullable: true), MultiMediaCardId = table.Column(nullable: true), SecureDigitalId = table.Column(nullable: true), - Manufacturer = table.Column(nullable: true), Model = table.Column(nullable: true), - Revision = table.Column(nullable: true), Type = table.Column() + Manufacturer = table.Column(nullable: true), + Model = table.Column(nullable: true), + Revision = table.Column(nullable: true), + Type = table.Column() }, constraints: table => { table.PrimaryKey("PK_Devices", x => x.Id); @@ -62,14 +65,17 @@ namespace Aaru.Database.Migrations Id = table.Column().Annotation("Sqlite:Autoincrement", true), USBId = table.Column(nullable: true), FireWireId = table.Column(nullable: true), - PCMCIAId = table.Column(nullable: true), CompactFlash = table.Column(), + PCMCIAId = table.Column(nullable: true), + CompactFlash = table.Column(), ATAId = table.Column(nullable: true), ATAPIId = table.Column(nullable: true), SCSIId = table.Column(nullable: true), MultiMediaCardId = table.Column(nullable: true), SecureDigitalId = table.Column(nullable: true), - Manufacturer = table.Column(nullable: true), Model = table.Column(nullable: true), - Revision = table.Column(nullable: true), Type = table.Column(), + Manufacturer = table.Column(nullable: true), + Model = table.Column(nullable: true), + Revision = table.Column(nullable: true), + Type = table.Column(), LastSynchronized = table.Column() }, constraints: table => { diff --git a/Aaru.Database/Migrations/20181221015906_NameValueStatistics.cs b/Aaru.Database/Migrations/20181221015906_NameValueStatistics.cs index 663522618..0ce337c81 100644 --- a/Aaru.Database/Migrations/20181221015906_NameValueStatistics.cs +++ b/Aaru.Database/Migrations/20181221015906_NameValueStatistics.cs @@ -8,8 +8,9 @@ namespace Aaru.Database.Migrations { migrationBuilder.CreateTable("Commands", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column() }, constraints: table => { table.PrimaryKey("PK_Commands", x => x.Id); @@ -17,8 +18,9 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("Filesystems", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column() }, constraints: table => { table.PrimaryKey("PK_Filesystems", x => x.Id); @@ -26,8 +28,9 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("Filters", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column() }, constraints: table => { table.PrimaryKey("PK_Filters", x => x.Id); @@ -35,8 +38,9 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("MediaFormats", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column() }, constraints: table => { table.PrimaryKey("PK_MediaFormats", x => x.Id); @@ -44,8 +48,9 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("Partitions", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column() }, constraints: table => { table.PrimaryKey("PK_Partitions", x => x.Id); diff --git a/Aaru.Database/Migrations/20181221040408_OperatingSystemStatistics.cs b/Aaru.Database/Migrations/20181221040408_OperatingSystemStatistics.cs index fcce48769..2252f3045 100644 --- a/Aaru.Database/Migrations/20181221040408_OperatingSystemStatistics.cs +++ b/Aaru.Database/Migrations/20181221040408_OperatingSystemStatistics.cs @@ -8,7 +8,8 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("OperatingSystems", table => new { Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Version = table.Column(nullable: true), + Name = table.Column(nullable: true), + Version = table.Column(nullable: true), Synchronized = table.Column() }, constraints: table => { diff --git a/Aaru.Database/Migrations/20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs b/Aaru.Database/Migrations/20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs index 333e27342..1a6ef5187 100644 --- a/Aaru.Database/Migrations/20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs +++ b/Aaru.Database/Migrations/20181223214411_UseBinaryDataForIdentifyInquiryAndModesInReports.cs @@ -20,7 +20,8 @@ namespace Aaru.Database.Migrations Id = table.Column().Annotation("Sqlite:Autoincrement", true), AccurateCDDA = table.Column(), AudioPlay = table.Column(), - BCK = table.Column(), BUF = table.Column(), + BCK = table.Column(), + BUF = table.Column(), BufferSize = table.Column(), C2Pointer = table.Column(), CDDACommand = table.Column(), @@ -57,7 +58,8 @@ namespace Aaru.Database.Migrations ReadDVDROM = table.Column(), RotationControlSelected = table.Column(), SCC = table.Column(), - SDP = table.Column(), SSS = table.Column(), + SDP = table.Column(), + SSS = table.Column(), SeparateChannelMute = table.Column(), SeparateChannelVolume = table.Column(), Subchannel = table.Column(), diff --git a/Aaru.Database/Migrations/20181224044809_StoreUsbIdsInDatabase.cs b/Aaru.Database/Migrations/20181224044809_StoreUsbIdsInDatabase.cs index 5f33df98b..7045caee5 100644 --- a/Aaru.Database/Migrations/20181224044809_StoreUsbIdsInDatabase.cs +++ b/Aaru.Database/Migrations/20181224044809_StoreUsbIdsInDatabase.cs @@ -9,8 +9,10 @@ namespace Aaru.Database.Migrations { migrationBuilder.CreateTable("UsbVendors", table => new { - Id = table.Column(), Vendor = table.Column(nullable: true), - AddedWhen = table.Column(), ModifiedWhen = table.Column() + Id = table.Column(), + Vendor = table.Column(nullable: true), + AddedWhen = table.Column(), + ModifiedWhen = table.Column() }, constraints: table => { table.PrimaryKey("PK_UsbVendors", x => x.Id); diff --git a/Aaru.Database/Migrations/20191207184342_AddRemoteStats.cs b/Aaru.Database/Migrations/20191207184342_AddRemoteStats.cs index 7116c6a79..ba48a7c2c 100644 --- a/Aaru.Database/Migrations/20191207184342_AddRemoteStats.cs +++ b/Aaru.Database/Migrations/20191207184342_AddRemoteStats.cs @@ -9,8 +9,10 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("RemoteApplications", table => new { Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Version = table.Column(nullable: true), - Synchronized = table.Column(), Count = table.Column() + Name = table.Column(nullable: true), + Version = table.Column(nullable: true), + Synchronized = table.Column(), + Count = table.Column() }, constraints: table => { table.PrimaryKey("PK_RemoteApplications", x => x.Id); @@ -18,9 +20,10 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("RemoteArchitectures", table => new { - Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Synchronized = table.Column(), - Count = table.Column() + Id = table.Column().Annotation("Sqlite:Autoincrement", true), + Name = table.Column(nullable: true), + Synchronized = table.Column(), + Count = table.Column() }, constraints: table => { table.PrimaryKey("PK_RemoteArchitectures", x => x.Id); @@ -29,8 +32,10 @@ namespace Aaru.Database.Migrations migrationBuilder.CreateTable("RemoteOperatingSystems", table => new { Id = table.Column().Annotation("Sqlite:Autoincrement", true), - Name = table.Column(nullable: true), Version = table.Column(nullable: true), - Synchronized = table.Column(), Count = table.Column() + Name = table.Column(nullable: true), + Version = table.Column(nullable: true), + Synchronized = table.Column(), + Count = table.Column() }, constraints: table => { table.PrimaryKey("PK_RemoteOperatingSystems", x => x.Id); diff --git a/Aaru.Database/Migrations/20200710170129_AddGdRomSwapDiscCapabilities.cs b/Aaru.Database/Migrations/20200710170129_AddGdRomSwapDiscCapabilities.cs index 9ffeadb1e..21a9463b3 100644 --- a/Aaru.Database/Migrations/20200710170129_AddGdRomSwapDiscCapabilities.cs +++ b/Aaru.Database/Migrations/20200710170129_AddGdRomSwapDiscCapabilities.cs @@ -18,7 +18,8 @@ namespace Aaru.Database.Migrations SwapDiscLeadOutPSEC = table.Column(nullable: false), SwapDiscLeadOutPFRAM = table.Column(nullable: false), SwapDiscLeadOutStart = table.Column(nullable: false), - Lba0Readable = table.Column(nullable: false), Lba0Data = table.Column(nullable: true), + Lba0Readable = table.Column(nullable: false), + Lba0Data = table.Column(nullable: true), Lba0Sense = table.Column(nullable: true), Lba0DecodedSense = table.Column(nullable: true), Lba0ScrambledReadable = table.Column(nullable: false), diff --git a/Aaru.Decoders b/Aaru.Decoders index a941b26dc..5d161c998 160000 --- a/Aaru.Decoders +++ b/Aaru.Decoders @@ -1 +1 @@ -Subproject commit a941b26dc94679ac4882807ae86c03468408fa87 +Subproject commit 5d161c998d7284e42095de242eae549e630c30ff diff --git a/Aaru.Devices/Device/AtaCommands/Ata28.cs b/Aaru.Devices/Device/AtaCommands/Ata28.cs index 0ec77a74c..f0a444b6d 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata28.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata28.cs @@ -89,10 +89,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - SectorCount = count, DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), - LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), - LbaLow = (byte)((lba & 0xFF) / 0x1), + SectorCount = count, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1), Command = retry ? (byte)AtaCommands.ReadDmaRetry : (byte)AtaCommands.ReadDma }; @@ -115,9 +116,12 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.ReadMultiple, SectorCount = count, - DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), LbaLow = (byte)((lba & 0xFF) / 0x1) + Command = (byte)AtaCommands.ReadMultiple, + SectorCount = count, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1) }; registers.DeviceHead += 0x40; @@ -177,10 +181,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - SectorCount = count, DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), - LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), - LbaLow = (byte)((lba & 0xFF) / 0x1), + SectorCount = count, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1), Command = retry ? (byte)AtaCommands.ReadRetry : (byte)AtaCommands.Read }; @@ -208,10 +213,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - SectorCount = 1, DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), - LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), - LbaLow = (byte)((lba & 0xFF) / 0x1), + SectorCount = 1, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1), Command = retry ? (byte)AtaCommands.ReadLongRetry : (byte)AtaCommands.ReadLong }; @@ -234,10 +240,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Seek, DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), - LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), - LbaLow = (byte)((lba & 0xFF) / 0x1) + Command = (byte)AtaCommands.Seek, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1) }; registers.DeviceHead += 0x40; diff --git a/Aaru.Devices/Device/AtaCommands/Ata48.cs b/Aaru.Devices/Device/AtaCommands/Ata48.cs index 466dd7e6e..65a177582 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata48.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata48.cs @@ -45,7 +45,8 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.NativeMaxAddress, Feature = 0x0000 + Command = (byte)AtaCommands.NativeMaxAddress, + Feature = 0x0000 }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, @@ -74,9 +75,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.ReadDmaExt, SectorCount = count, - LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), - LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), LbaLow = (ushort)((lba & 0xFFFF) / 0x1) + Command = (byte)AtaCommands.ReadDmaExt, + SectorCount = count, + LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), + LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), + LbaLow = (ushort)((lba & 0xFFFF) / 0x1) }; registers.DeviceHead += 0x40; @@ -98,8 +101,10 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.ReadLogExt, SectorCount = count, - LbaLow = (ushort)((pageNumber & 0xFF) * 0x100), LbaHigh = (ushort)((pageNumber & 0xFF00) / 0x100) + Command = (byte)AtaCommands.ReadLogExt, + SectorCount = count, + LbaLow = (ushort)((pageNumber & 0xFF) * 0x100), + LbaHigh = (ushort)((pageNumber & 0xFF00) / 0x100) }; registers.LbaLow += logAddress; @@ -122,8 +127,10 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.ReadLogDmaExt, SectorCount = count, - LbaLow = (ushort)((pageNumber & 0xFF) * 0x100), LbaHigh = (ushort)((pageNumber & 0xFF00) / 0x100) + Command = (byte)AtaCommands.ReadLogDmaExt, + SectorCount = count, + LbaLow = (ushort)((pageNumber & 0xFF) * 0x100), + LbaHigh = (ushort)((pageNumber & 0xFF00) / 0x100) }; registers.LbaLow += logAddress; @@ -145,9 +152,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.ReadMultipleExt, SectorCount = count, - LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), - LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), LbaLow = (ushort)((lba & 0xFFFF) / 0x1) + Command = (byte)AtaCommands.ReadMultipleExt, + SectorCount = count, + LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), + LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), + LbaLow = (ushort)((lba & 0xFFFF) / 0x1) }; registers.DeviceHead += 0x40; @@ -202,9 +211,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba48 { - Command = (byte)AtaCommands.ReadExt, SectorCount = count, - LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), - LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), LbaLow = (ushort)((lba & 0xFFFF) / 0x1) + Command = (byte)AtaCommands.ReadExt, + SectorCount = count, + LbaHigh = (ushort)((lba & 0xFFFF00000000) / 0x100000000), + LbaMid = (ushort)((lba & 0xFFFF0000) / 0x10000), + LbaLow = (ushort)((lba & 0xFFFF) / 0x1) }; registers.DeviceHead += 0x40; diff --git a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs index 4ca16764a..87d6ce638 100644 --- a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs +++ b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs @@ -98,9 +98,12 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - SectorCount = count, CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), - CylinderLow = (byte)((cylinder & 0xFF) / 0x1), DeviceHead = (byte)(head & 0x0F), Sector = sector, - Command = retry ? (byte)AtaCommands.ReadDmaRetry : (byte)AtaCommands.ReadDma + SectorCount = count, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector, + Command = retry ? (byte)AtaCommands.ReadDmaRetry : (byte)AtaCommands.ReadDma }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.Dma, AtaTransferRegister.SectorCount, @@ -120,9 +123,12 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = (byte)AtaCommands.ReadMultiple, SectorCount = count, - CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), CylinderLow = (byte)((cylinder & 0xFF) / 0x1), - DeviceHead = (byte)(head & 0x0F), Sector = sector + Command = (byte)AtaCommands.ReadMultiple, + SectorCount = count, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, @@ -147,9 +153,12 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = retry ? (byte)AtaCommands.ReadRetry : (byte)AtaCommands.Read, SectorCount = count, - CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), CylinderLow = (byte)((cylinder & 0xFF) / 0x1), - DeviceHead = (byte)(head & 0x0F), Sector = sector + Command = retry ? (byte)AtaCommands.ReadRetry : (byte)AtaCommands.Read, + SectorCount = count, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, @@ -174,9 +183,12 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = retry ? (byte)AtaCommands.ReadLongRetry : (byte)AtaCommands.ReadLong, SectorCount = 1, - CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), CylinderLow = (byte)((cylinder & 0xFF) / 0x1), - DeviceHead = (byte)(head & 0x0F), Sector = sector + Command = retry ? (byte)AtaCommands.ReadLongRetry : (byte)AtaCommands.ReadLong, + SectorCount = 1, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, @@ -197,8 +209,11 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = (byte)AtaCommands.Seek, CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), - CylinderLow = (byte)((cylinder & 0xFF) / 0x1), DeviceHead = (byte)(head & 0x0F), Sector = sector + Command = (byte)AtaCommands.Seek, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, @@ -223,9 +238,13 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = (byte)AtaCommands.SetFeatures, CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), - CylinderLow = (byte)((cylinder & 0xFF) / 0x1), DeviceHead = (byte)(head & 0x0F), Sector = sector, - SectorCount = sectorCount, Feature = (byte)feature + Command = (byte)AtaCommands.SetFeatures, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + DeviceHead = (byte)(head & 0x0F), + Sector = sector, + SectorCount = sectorCount, + Feature = (byte)feature }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, diff --git a/Aaru.Devices/Device/AtaCommands/Cfa.cs b/Aaru.Devices/Device/AtaCommands/Cfa.cs index 341ed8f8a..6ab2041ed 100644 --- a/Aaru.Devices/Device/AtaCommands/Cfa.cs +++ b/Aaru.Devices/Device/AtaCommands/Cfa.cs @@ -44,10 +44,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.TranslateSector, DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), - LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), - LbaMid = (byte)((lba & 0xFF00) / 0x100), - LbaLow = (byte)((lba & 0xFF) / 0x1) + Command = (byte)AtaCommands.TranslateSector, + DeviceHead = (byte)((lba & 0xF000000) / 0x1000000), + LbaHigh = (byte)((lba & 0xFF0000) / 0x10000), + LbaMid = (byte)((lba & 0xFF00) / 0x100), + LbaLow = (byte)((lba & 0xFF) / 0x1) }; registers.DeviceHead += 0x40; @@ -70,9 +71,11 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = (byte)AtaCommands.TranslateSector, CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), - CylinderLow = (byte)((cylinder & 0xFF) / 0x1), - Sector = sector, DeviceHead = (byte)(head & 0x0F) + Command = (byte)AtaCommands.TranslateSector, + CylinderHigh = (byte)((cylinder & 0xFF00) / 0x100), + CylinderLow = (byte)((cylinder & 0xFF) / 0x1), + Sector = sector, + DeviceHead = (byte)(head & 0x0F) }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, diff --git a/Aaru.Devices/Device/AtaCommands/MCPT.cs b/Aaru.Devices/Device/AtaCommands/MCPT.cs index 2b782a024..1eb2ef36b 100644 --- a/Aaru.Devices/Device/AtaCommands/MCPT.cs +++ b/Aaru.Devices/Device/AtaCommands/MCPT.cs @@ -52,7 +52,8 @@ namespace Aaru.Devices var registers = new AtaRegistersChs { - Command = (byte)AtaCommands.CheckMediaCardType, Feature = feature + Command = (byte)AtaCommands.CheckMediaCardType, + Feature = feature }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, diff --git a/Aaru.Devices/Device/AtaCommands/Smart.cs b/Aaru.Devices/Device/AtaCommands/Smart.cs index fa045594a..c625dd0b5 100644 --- a/Aaru.Devices/Device/AtaCommands/Smart.cs +++ b/Aaru.Devices/Device/AtaCommands/Smart.cs @@ -43,7 +43,9 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.Disable, LbaHigh = 0xC2, + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.Disable, + LbaHigh = 0xC2, LbaMid = 0x4F }; @@ -65,8 +67,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.EnableDisableAttributeAutosave, - LbaHigh = 0xC2, LbaMid = 0x4F, SectorCount = 0xF1 + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.EnableDisableAttributeAutosave, + LbaHigh = 0xC2, + LbaMid = 0x4F, + SectorCount = 0xF1 }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, @@ -87,8 +92,10 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.EnableDisableAttributeAutosave, - LbaHigh = 0xC2, LbaMid = 0x4F + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.EnableDisableAttributeAutosave, + LbaHigh = 0xC2, + LbaMid = 0x4F }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, @@ -108,7 +115,9 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.Enable, LbaHigh = 0xC2, + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.Enable, + LbaHigh = 0xC2, LbaMid = 0x4F }; @@ -130,8 +139,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.ExecuteOfflineImmediate, - LbaHigh = 0xC2, LbaMid = 0x4F, LbaLow = subcommand + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.ExecuteOfflineImmediate, + LbaHigh = 0xC2, + LbaMid = 0x4F, + LbaLow = subcommand }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.NonData, @@ -152,7 +164,9 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.ReadData, LbaHigh = 0xC2, + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.ReadData, + LbaHigh = 0xC2, LbaMid = 0x4F }; @@ -174,8 +188,11 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.ReadLog, LbaHigh = 0xC2, - LbaMid = 0x4F, LbaLow = logAddress + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.ReadLog, + LbaHigh = 0xC2, + LbaMid = 0x4F, + LbaLow = logAddress }; LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, @@ -195,7 +212,9 @@ namespace Aaru.Devices var registers = new AtaRegistersLba28 { - Command = (byte)AtaCommands.Smart, Feature = (byte)AtaSmartSubCommands.ReturnStatus, LbaHigh = 0xC2, + Command = (byte)AtaCommands.Smart, + Feature = (byte)AtaSmartSubCommands.ReturnStatus, + LbaHigh = 0xC2, LbaMid = 0x4F }; diff --git a/Aaru.Devices/Device/Constructor.cs b/Aaru.Devices/Device/Constructor.cs index 4ab49abd6..08e871a7c 100644 --- a/Aaru.Devices/Device/Constructor.cs +++ b/Aaru.Devices/Device/Constructor.cs @@ -203,16 +203,18 @@ namespace Aaru.Devices { var descriptor = new StorageDeviceDescriptor { - Version = BitConverter.ToUInt32(descriptorB, 0), - Size = BitConverter.ToUInt32(descriptorB, 4), DeviceType = descriptorB[8], - DeviceTypeModifier = descriptorB[9], RemovableMedia = descriptorB[10] > 0, - CommandQueueing = descriptorB[11] > 0, - VendorIdOffset = BitConverter.ToInt32(descriptorB, 12), - ProductIdOffset = BitConverter.ToInt32(descriptorB, 16), + Version = BitConverter.ToUInt32(descriptorB, 0), + Size = BitConverter.ToUInt32(descriptorB, 4), + DeviceType = descriptorB[8], + DeviceTypeModifier = descriptorB[9], + RemovableMedia = descriptorB[10] > 0, + CommandQueueing = descriptorB[11] > 0, + VendorIdOffset = BitConverter.ToInt32(descriptorB, 12), + ProductIdOffset = BitConverter.ToInt32(descriptorB, 16), ProductRevisionOffset = BitConverter.ToInt32(descriptorB, 20), - SerialNumberOffset = BitConverter.ToInt32(descriptorB, 24), - BusType = (StorageBusType)BitConverter.ToUInt32(descriptorB, 28), - RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32) + SerialNumberOffset = BitConverter.ToInt32(descriptorB, 24), + BusType = (StorageBusType)BitConverter.ToUInt32(descriptorB, 28), + RawPropertiesLength = BitConverter.ToUInt32(descriptorB, 32) }; descriptor.RawDeviceProperties = new byte[descriptor.RawPropertiesLength]; diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs index 2fbbcbe11..f8ba98ed5 100644 --- a/Aaru.Devices/Remote/Remote.cs +++ b/Aaru.Devices/Remote/Remote.cs @@ -150,15 +150,20 @@ namespace Aaru.Devices.Remote var clientHello = new AaruPacketHello { - application = "Aaru", version = Version.GetVersion(), maxProtocol = Consts.MaxProtocol, + application = "Aaru", + version = Version.GetVersion(), + maxProtocol = Consts.MaxProtocol, sysname = DetectOS.GetPlatformName(DetectOS.GetRealPlatformID(), DetectOS.GetVersion()), - release = DetectOS.GetVersion(), machine = RuntimeInformation.ProcessArchitecture.ToString(), hdr = - new AaruPacketHeader - { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, - packetType = AaruPacketType.Hello - } + release = DetectOS.GetVersion(), + machine = RuntimeInformation.ProcessArchitecture.ToString(), + hdr = new AaruPacketHeader + { + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, + packetType = AaruPacketType.Hello + } }; buf = Marshal.StructureToByteArrayLittleEndian(clientHello); @@ -188,8 +193,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandAmIRoot } }; @@ -264,8 +271,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandListDevices } }; @@ -372,8 +381,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandOpen }, device_path = devicePath @@ -460,10 +471,13 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + version = Consts.PacketVersion, packetType = AaruPacketType.CommandScsi }, - direction = (int)direction, timeout = timeout * 1000 + direction = (int)direction, + timeout = timeout * 1000 }; if(cdb != null) @@ -556,11 +570,16 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + version = Consts.PacketVersion, packetType = AaruPacketType.CommandAtaChs }, - registers = registers, protocol = (byte)protocol, transferRegister = (byte)transferRegister, - transferBlocks = transferBlocks, timeout = timeout * 1000 + registers = registers, + protocol = (byte)protocol, + transferRegister = (byte)transferRegister, + transferBlocks = transferBlocks, + timeout = timeout * 1000 }; if(buffer != null) @@ -646,11 +665,16 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + version = Consts.PacketVersion, packetType = AaruPacketType.CommandAtaLba28 }, - registers = registers, protocol = (byte)protocol, transferRegister = (byte)transferRegister, - transferBlocks = transferBlocks, timeout = timeout * 1000 + registers = registers, + protocol = (byte)protocol, + transferRegister = (byte)transferRegister, + transferBlocks = transferBlocks, + timeout = timeout * 1000 }; if(buffer != null) @@ -737,11 +761,16 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + version = Consts.PacketVersion, packetType = AaruPacketType.CommandAtaLba48 }, - registers = registers, protocol = (byte)protocol, transferRegister = (byte)transferRegister, - transferBlocks = transferBlocks, timeout = timeout * 1000 + registers = registers, + protocol = (byte)protocol, + transferRegister = (byte)transferRegister, + transferBlocks = transferBlocks, + timeout = timeout * 1000 }; if(buffer != null) @@ -828,11 +857,19 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + version = Consts.PacketVersion, packetType = AaruPacketType.CommandAtaLba48 }, - command = command, write = write, application = isApplication, flags = flags, - argument = argument, block_size = blockSize, blocks = blocks, timeout = timeout * 1000 + command = command, + write = write, + application = isApplication, + flags = flags, + argument = argument, + block_size = blockSize, + blocks = blocks, + timeout = timeout * 1000 }; if(buffer != null) @@ -916,8 +953,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandGetType } }; @@ -988,8 +1027,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandGetSdhciRegisters } }; @@ -1104,8 +1145,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandGetUsbData } }; @@ -1188,8 +1231,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandGetFireWireData } }; @@ -1267,8 +1312,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandGetPcmciaData } }; @@ -1358,8 +1405,10 @@ namespace Aaru.Devices.Remote { hdr = new AaruPacketHeader { - remote_id = Consts.RemoteId, packet_id = Consts.PacketId, - len = (uint)Marshal.SizeOf(), version = Consts.PacketVersion, + remote_id = Consts.RemoteId, + packet_id = Consts.PacketId, + len = (uint)Marshal.SizeOf(), + version = Consts.PacketVersion, packetType = AaruPacketType.CommandCloseDevice } }; diff --git a/Aaru.Devices/Windows/Command.cs b/Aaru.Devices/Windows/Command.cs index 4ad94600a..155e0f975 100644 --- a/Aaru.Devices/Windows/Command.cs +++ b/Aaru.Devices/Windows/Command.cs @@ -68,11 +68,15 @@ namespace Aaru.Devices.Windows var sptdSb = new ScsiPassThroughDirectAndSenseBuffer { - SenseBuf = new byte[32], sptd = new ScsiPassThroughDirect + SenseBuf = new byte[32], + sptd = new ScsiPassThroughDirect { - Cdb = new byte[16], CdbLength = (byte)cdb.Length, SenseInfoLength = 32, + Cdb = new byte[16], + CdbLength = (byte)cdb.Length, + SenseInfoLength = 32, DataIn = direction, - DataTransferLength = (uint)buffer.Length, TimeOutValue = timeout, + DataTransferLength = (uint)buffer.Length, + TimeOutValue = timeout, DataBuffer = Marshal.AllocHGlobal(buffer.Length) } }; @@ -142,11 +146,15 @@ namespace Aaru.Devices.Windows DataBufferOffset = (IntPtr)offsetForBuffer, Length = (ushort)Marshal.SizeOf(typeof(AtaPassThroughEx)), DataTransferLength = (uint)buffer.Length, - PreviousTaskFile = new AtaTaskFile(), CurrentTaskFile = new AtaTaskFile + PreviousTaskFile = new AtaTaskFile(), + CurrentTaskFile = new AtaTaskFile { - Command = registers.Command, CylinderHigh = registers.CylinderHigh, - CylinderLow = registers.CylinderLow, DeviceHead = registers.DeviceHead, - Features = registers.Feature, SectorCount = registers.SectorCount, + Command = registers.Command, + CylinderHigh = registers.CylinderHigh, + CylinderLow = registers.CylinderLow, + DeviceHead = registers.DeviceHead, + Features = registers.Feature, + SectorCount = registers.SectorCount, SectorNumber = registers.Sector } }, @@ -247,12 +255,16 @@ namespace Aaru.Devices.Windows DataBufferOffset = (IntPtr)offsetForBuffer, Length = (ushort)Marshal.SizeOf(typeof(AtaPassThroughEx)), DataTransferLength = (uint)buffer.Length, - PreviousTaskFile = new AtaTaskFile(), CurrentTaskFile = new AtaTaskFile + PreviousTaskFile = new AtaTaskFile(), + CurrentTaskFile = new AtaTaskFile { - Command = registers.Command, CylinderHigh = registers.LbaHigh, - CylinderLow = registers.LbaMid, - DeviceHead = registers.DeviceHead, Features = registers.Feature, - SectorCount = registers.SectorCount, SectorNumber = registers.LbaLow + Command = registers.Command, + CylinderHigh = registers.LbaHigh, + CylinderLow = registers.LbaMid, + DeviceHead = registers.DeviceHead, + Features = registers.Feature, + SectorCount = registers.SectorCount, + SectorNumber = registers.LbaLow } }, dataBuffer = new byte[64 * 512] @@ -362,8 +374,9 @@ namespace Aaru.Devices.Windows }, CurrentTaskFile = new AtaTaskFile { - Command = registers.Command, CylinderHigh = (byte)(registers.LbaHigh & 0xFF), - CylinderLow = (byte)(registers.LbaMid & 0xFF), + Command = registers.Command, + CylinderHigh = (byte)(registers.LbaHigh & 0xFF), + CylinderLow = (byte)(registers.LbaMid & 0xFF), DeviceHead = registers.DeviceHead, Features = (byte)(registers.Feature & 0xFF), SectorCount = (byte)(registers.SectorCount & 0xFF), diff --git a/Aaru.Devices/Windows/ListDevices.cs b/Aaru.Devices/Windows/ListDevices.cs index 28d5ec763..80c9e06b8 100644 --- a/Aaru.Devices/Windows/ListDevices.cs +++ b/Aaru.Devices/Windows/ListDevices.cs @@ -113,7 +113,8 @@ namespace Aaru.Devices.Windows var query = new StoragePropertyQuery { - PropertyId = StoragePropertyId.Device, QueryType = StorageQueryType.Standard, + PropertyId = StoragePropertyId.Device, + QueryType = StorageQueryType.Standard, AdditionalParameters = new byte[1] }; @@ -142,7 +143,8 @@ namespace Aaru.Devices.Windows { Version = BitConverter.ToUInt32(descriptorB, 0), Size = BitConverter.ToUInt32(descriptorB, 4), - DeviceType = descriptorB[8], DeviceTypeModifier = descriptorB[9], + DeviceType = descriptorB[8], + DeviceTypeModifier = descriptorB[9], RemovableMedia = BitConverter.ToBoolean(descriptorB, 10), CommandQueueing = BitConverter.ToBoolean(descriptorB, 11), VendorIdOffset = BitConverter.ToInt32(descriptorB, 12), @@ -155,7 +157,8 @@ namespace Aaru.Devices.Windows var info = new DeviceInfo { - Path = physId, Bus = descriptor.BusType.ToString() + Path = physId, + Bus = descriptor.BusType.ToString() }; if(descriptor.VendorIdOffset > 0) diff --git a/Aaru.Devices/Windows/Usb.cs b/Aaru.Devices/Windows/Usb.cs index 46f395eba..ee9b7e85d 100644 --- a/Aaru.Devices/Windows/Usb.cs +++ b/Aaru.Devices/Windows/Usb.cs @@ -281,7 +281,8 @@ namespace Aaru.Devices.Windows var root = new UsbHub { - HubIsRootHub = true, HubDeviceDesc = "Root Hub" + HubIsRootHub = true, + HubDeviceDesc = "Root Hub" }; // Open a handle to the Host Controller @@ -432,9 +433,10 @@ namespace Aaru.Devices.Windows // load up the USBPort class var port = new UsbPort { - PortPortNumber = i, PortHubDevicePath = HubDevicePath, - PortStatus = ((UsbConnectionStatus)nodeConnection.ConnectionStatus).ToString(), - PortSpeed = ((UsbDeviceSpeed)nodeConnection.Speed).ToString(), + PortPortNumber = i, + PortHubDevicePath = HubDevicePath, + PortStatus = ((UsbConnectionStatus)nodeConnection.ConnectionStatus).ToString(), + PortSpeed = ((UsbDeviceSpeed)nodeConnection.Speed).ToString(), PortIsDeviceConnected = nodeConnection.ConnectionStatus == (int)UsbConnectionStatus.DeviceConnected, PortIsHub = Convert.ToBoolean(nodeConnection.DeviceIsHub), @@ -501,8 +503,9 @@ namespace Aaru.Devices.Windows // Ya know, I've given some thought about making Device a derived class... var device = new UsbDevice { - DevicePortNumber = PortPortNumber, DeviceHubDevicePath = PortHubDevicePath, - DeviceDescriptor = PortDeviceDescriptor + DevicePortNumber = PortPortNumber, + DeviceHubDevicePath = PortHubDevicePath, + DeviceDescriptor = PortDeviceDescriptor }; // Open a handle to the Hub device @@ -527,7 +530,8 @@ namespace Aaru.Devices.Windows // build a request for string descriptor var request = new UsbDescriptorRequest { - ConnectionIndex = PortPortNumber, SetupPacket = + ConnectionIndex = PortPortNumber, + SetupPacket = { // Language Code wIndex = 0x409, @@ -565,7 +569,8 @@ namespace Aaru.Devices.Windows // build a request for string descriptor var request = new UsbDescriptorRequest { - ConnectionIndex = PortPortNumber, SetupPacket = + ConnectionIndex = PortPortNumber, + SetupPacket = { // Language Code wIndex = 0x409, @@ -600,7 +605,8 @@ namespace Aaru.Devices.Windows // build a request for string descriptor var request = new UsbDescriptorRequest { - ConnectionIndex = PortPortNumber, SetupPacket = + ConnectionIndex = PortPortNumber, + SetupPacket = { // Language Code wIndex = 0x409, @@ -633,9 +639,11 @@ namespace Aaru.Devices.Windows // build a request for configuration descriptor var dcrRequest = new UsbDescriptorRequest { - ConnectionIndex = PortPortNumber, SetupPacket = + ConnectionIndex = PortPortNumber, + SetupPacket = { - wIndex = 0, wValue = USB_CONFIGURATION_DESCRIPTOR_TYPE << 8 + wIndex = 0, + wValue = USB_CONFIGURATION_DESCRIPTOR_TYPE << 8 } }; diff --git a/Aaru.Filesystems/AODOS.cs b/Aaru.Filesystems/AODOS.cs index 3dd13c93f..f6562dcc4 100644 --- a/Aaru.Filesystems/AODOS.cs +++ b/Aaru.Filesystems/AODOS.cs @@ -89,12 +89,15 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Alexander Osipov DOS file system", - Clusters = imagePlugin.Info.Sectors, - ClusterSize = imagePlugin.Info.SectorSize, Files = bb.files, - FilesSpecified = true, - FreeClusters = imagePlugin.Info.Sectors - bb.usedSectors, FreeClustersSpecified = true, - VolumeName = StringHandlers.SpacePaddedToString(bb.volumeLabel, Encoding), Bootable = true + Type = "Alexander Osipov DOS file system", + Clusters = imagePlugin.Info.Sectors, + ClusterSize = imagePlugin.Info.SectorSize, + Files = bb.files, + FilesSpecified = true, + FreeClusters = imagePlugin.Info.Sectors - bb.usedSectors, + FreeClustersSpecified = true, + VolumeName = StringHandlers.SpacePaddedToString(bb.volumeLabel, Encoding), + Bootable = true }; sbInformation.AppendFormat("{0} files on volume", bb.files).AppendLine(); diff --git a/Aaru.Filesystems/APFS.cs b/Aaru.Filesystems/APFS.cs index ad5114055..582acb28d 100644 --- a/Aaru.Filesystems/APFS.cs +++ b/Aaru.Filesystems/APFS.cs @@ -108,8 +108,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Bootable = false, Clusters = nxSb.containerBlocks, ClusterSize = nxSb.blockSize, - Type = "Apple File System" + Bootable = false, + Clusters = nxSb.containerBlocks, + ClusterSize = nxSb.blockSize, + Type = "Apple File System" }; } diff --git a/Aaru.Filesystems/Acorn.cs b/Aaru.Filesystems/Acorn.cs index 4f4d2332a..80e2c593f 100644 --- a/Aaru.Filesystems/Acorn.cs +++ b/Aaru.Filesystems/Acorn.cs @@ -312,9 +312,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Bootable = oldMap1.boot != 0, // Or not? - Clusters = bytes / imagePlugin.Info.SectorSize, ClusterSize = imagePlugin.Info.SectorSize, - Type = "Acorn Advanced Disc Filing System" + Bootable = oldMap1.boot != 0, // Or not? + Clusters = bytes / imagePlugin.Info.SectorSize, + ClusterSize = imagePlugin.Info.SectorSize, + Type = "Acorn Advanced Disc Filing System" }; if(ArrayHelpers.ArrayIsNullOrEmpty(namebytes)) diff --git a/Aaru.Filesystems/AmigaDOS.cs b/Aaru.Filesystems/AmigaDOS.cs index 1c16c7536..89275784d 100644 --- a/Aaru.Filesystems/AmigaDOS.cs +++ b/Aaru.Filesystems/AmigaDOS.cs @@ -107,8 +107,7 @@ namespace Aaru.Filesystems { bRootPtr + partition.Start, ((((partition.End - partition.Start) + 1) / 2) + partition.Start) - 2, ((((partition.End - partition.Start) + 1) / 2) + partition.Start) - 1, - (((partition.End - partition.Start) + 1) / 2) + - partition.Start, + (((partition.End - partition.Start) + 1) / 2) + partition.Start, (((partition.End - partition.Start) + 1) / 2) + partition.Start + 4 }; @@ -192,8 +191,7 @@ namespace Aaru.Filesystems { bRootPtr + partition.Start, ((((partition.End - partition.Start) + 1) / 2) + partition.Start) - 2, ((((partition.End - partition.Start) + 1) / 2) + partition.Start) - 1, - (((partition.End - partition.Start) + 1) / 2) + - partition.Start, + (((partition.End - partition.Start) + 1) / 2) + partition.Start, (((partition.End - partition.Start) + 1) / 2) + partition.Start + 4 }; diff --git a/Aaru.Filesystems/AppleDOS/Info.cs b/Aaru.Filesystems/AppleDOS/Info.cs index efca198fc..ff2b514a7 100644 --- a/Aaru.Filesystems/AppleDOS/Info.cs +++ b/Aaru.Filesystems/AppleDOS/Info.cs @@ -94,8 +94,10 @@ namespace Aaru.Filesystems.AppleDOS XmlFsType = new FileSystemType { - Bootable = true, Clusters = imagePlugin.Info.Sectors, ClusterSize = imagePlugin.Info.SectorSize, - Type = "Apple DOS" + Bootable = true, + Clusters = imagePlugin.Info.Sectors, + ClusterSize = imagePlugin.Info.SectorSize, + Type = "Apple DOS" }; } } diff --git a/Aaru.Filesystems/AppleDOS/Super.cs b/Aaru.Filesystems/AppleDOS/Super.cs index b827a78d2..6b97be4a2 100644 --- a/Aaru.Filesystems/AppleDOS/Super.cs +++ b/Aaru.Filesystems/AppleDOS/Super.cs @@ -105,10 +105,13 @@ namespace Aaru.Filesystems.AppleDOS // Create XML metadata for mounted filesystem XmlFsType = new FileSystemType { - Bootable = true, Clusters = device.Info.Sectors, - ClusterSize = vtoc.bytesPerSector, - Files = (ulong)catalogCache.Count, FilesSpecified = true, FreeClustersSpecified = true, - Type = "Apple DOS" + Bootable = true, + Clusters = device.Info.Sectors, + ClusterSize = vtoc.bytesPerSector, + Files = (ulong)catalogCache.Count, + FilesSpecified = true, + FreeClustersSpecified = true, + Type = "Apple DOS" }; XmlFsType.FreeClusters = XmlFsType.Clusters - usedSectors; @@ -142,8 +145,11 @@ namespace Aaru.Filesystems.AppleDOS { stat = new FileSystemInfo { - Blocks = device.Info.Sectors, FilenameLength = 30, Files = (ulong)catalogCache.Count, PluginId = Id, - Type = "Apple DOS" + Blocks = device.Info.Sectors, + FilenameLength = 30, + Files = (ulong)catalogCache.Count, + PluginId = Id, + Type = "Apple DOS" }; stat.FreeFiles = totalFileEntries - stat.Files; diff --git a/Aaru.Filesystems/AppleMFS/File.cs b/Aaru.Filesystems/AppleMFS/File.cs index 2f0e5ceb4..b8bd14ac2 100644 --- a/Aaru.Filesystems/AppleMFS/File.cs +++ b/Aaru.Filesystems/AppleMFS/File.cs @@ -223,7 +223,10 @@ namespace Aaru.Filesystems.AppleMFS { stat = new FileEntryInfo { - BlockSize = device.Info.SectorSize, Inode = 0, Links = 1, Attributes = FileAttributes.System + BlockSize = device.Info.SectorSize, + Inode = 0, + Links = 1, + Attributes = FileAttributes.System }; if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) @@ -268,10 +271,14 @@ namespace Aaru.Filesystems.AppleMFS stat = new FileEntryInfo { - Attributes = attr, Blocks = entry.flLgLen / volMDB.drAlBlkSiz, + Attributes = attr, + Blocks = entry.flLgLen / volMDB.drAlBlkSiz, BlockSize = volMDB.drAlBlkSiz, - CreationTime = DateHandlers.MacToDateTime(entry.flCrDat), Inode = entry.flFlNum, - LastWriteTime = DateHandlers.MacToDateTime(entry.flMdDat), Length = entry.flPyLen, Links = 1 + CreationTime = DateHandlers.MacToDateTime(entry.flCrDat), + Inode = entry.flFlNum, + LastWriteTime = DateHandlers.MacToDateTime(entry.flMdDat), + Length = entry.flPyLen, + Links = 1 }; return Errno.NoError; diff --git a/Aaru.Filesystems/AppleMFS/Super.cs b/Aaru.Filesystems/AppleMFS/Super.cs index f95bc6e91..8a7417b65 100644 --- a/Aaru.Filesystems/AppleMFS/Super.cs +++ b/Aaru.Filesystems/AppleMFS/Super.cs @@ -208,9 +208,12 @@ namespace Aaru.Filesystems.AppleMFS { stat = new FileSystemInfo { - Blocks = volMDB.drNmAlBlks, FilenameLength = 255, Files = volMDB.drNmFls, - FreeBlocks = volMDB.drFreeBks, - PluginId = Id, Type = "Apple MFS" + Blocks = volMDB.drNmAlBlks, + FilenameLength = 255, + Files = volMDB.drNmFls, + FreeBlocks = volMDB.drFreeBks, + PluginId = Id, + Type = "Apple MFS" }; stat.FreeFiles = uint.MaxValue - stat.Files; diff --git a/Aaru.Filesystems/AtheOS.cs b/Aaru.Filesystems/AtheOS.cs index ac63ea1f5..560b5e42a 100644 --- a/Aaru.Filesystems/AtheOS.cs +++ b/Aaru.Filesystems/AtheOS.cs @@ -153,11 +153,13 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Clusters = (ulong)afsSb.num_blocks, ClusterSize = afsSb.block_size, - Dirty = false, - FreeClusters = (ulong)(afsSb.num_blocks - afsSb.used_blocks), FreeClustersSpecified = true, - Type = "AtheOS filesystem", - VolumeName = StringHandlers.CToString(afsSb.name, Encoding) + Clusters = (ulong)afsSb.num_blocks, + ClusterSize = afsSb.block_size, + Dirty = false, + FreeClusters = (ulong)(afsSb.num_blocks - afsSb.used_blocks), + FreeClustersSpecified = true, + Type = "AtheOS filesystem", + VolumeName = StringHandlers.CToString(afsSb.name, Encoding) }; } diff --git a/Aaru.Filesystems/BFS.cs b/Aaru.Filesystems/BFS.cs index f0ff86f90..076e23768 100644 --- a/Aaru.Filesystems/BFS.cs +++ b/Aaru.Filesystems/BFS.cs @@ -224,11 +224,13 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Clusters = (ulong)besb.num_blocks, ClusterSize = besb.block_size, - Dirty = besb.flags == BEFS_DIRTY, - FreeClusters = (ulong)(besb.num_blocks - besb.used_blocks), FreeClustersSpecified = true, - Type = "BeFS", - VolumeName = StringHandlers.CToString(besb.name, Encoding) + Clusters = (ulong)besb.num_blocks, + ClusterSize = besb.block_size, + Dirty = besb.flags == BEFS_DIRTY, + FreeClusters = (ulong)(besb.num_blocks - besb.used_blocks), + FreeClustersSpecified = true, + Type = "BeFS", + VolumeName = StringHandlers.CToString(besb.name, Encoding) }; } diff --git a/Aaru.Filesystems/BTRFS.cs b/Aaru.Filesystems/BTRFS.cs index 4c9ed8aba..9ff6a00db 100644 --- a/Aaru.Filesystems/BTRFS.cs +++ b/Aaru.Filesystems/BTRFS.cs @@ -188,10 +188,13 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Clusters = btrfsSb.total_bytes / btrfsSb.sectorsize, ClusterSize = btrfsSb.sectorsize, - FreeClustersSpecified = true, VolumeName = btrfsSb.label, + Clusters = btrfsSb.total_bytes / btrfsSb.sectorsize, + ClusterSize = btrfsSb.sectorsize, + FreeClustersSpecified = true, + VolumeName = btrfsSb.label, VolumeSerial = $"{btrfsSb.uuid}", - VolumeSetIdentifier = $"{btrfsSb.dev_item.device_uuid}", Type = Name + VolumeSetIdentifier = $"{btrfsSb.dev_item.device_uuid}", + Type = Name }; XmlFsType.FreeClusters = XmlFsType.Clusters - (btrfsSb.bytes_used / btrfsSb.sectorsize); diff --git a/Aaru.Filesystems/CBM.cs b/Aaru.Filesystems/CBM.cs index 74f4688eb..0ed671502 100644 --- a/Aaru.Filesystems/CBM.cs +++ b/Aaru.Filesystems/CBM.cs @@ -103,7 +103,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Commodore file system", Clusters = imagePlugin.Info.Sectors, ClusterSize = 256 + Type = "Commodore file system", + Clusters = imagePlugin.Info.Sectors, + ClusterSize = 256 }; if(imagePlugin.Info.Sectors == 3200) diff --git a/Aaru.Filesystems/CPM/Definitions.cs b/Aaru.Filesystems/CPM/Definitions.cs index 138a0def9..1239414ba 100644 --- a/Aaru.Filesystems/CPM/Definitions.cs +++ b/Aaru.Filesystems/CPM/Definitions.cs @@ -61,7 +61,8 @@ namespace Aaru.Filesystems.CPM { def.side1 = new Side { - sideId = 0, sectorIds = new int[def.sectorsPerTrack] + sideId = 0, + sectorIds = new int[def.sectorsPerTrack] }; for(int i = 0; i < def.sectorsPerTrack; i++) @@ -75,7 +76,8 @@ namespace Aaru.Filesystems.CPM { def.side2 = new Side { - sideId = 1, sectorIds = new int[def.sectorsPerTrack] + sideId = 1, + sectorIds = new int[def.sectorsPerTrack] }; for(int i = 0; i < def.sectorsPerTrack; i++) diff --git a/Aaru.Filesystems/CPM/File.cs b/Aaru.Filesystems/CPM/File.cs index ea9b0b3c0..b29ab9219 100644 --- a/Aaru.Filesystems/CPM/File.cs +++ b/Aaru.Filesystems/CPM/File.cs @@ -144,7 +144,8 @@ namespace Aaru.Filesystems.CPM stat = new FileEntryInfo { - Attributes = FileAttributes.Directory, BlockSize = XmlFsType.ClusterSize + Attributes = FileAttributes.Directory, + BlockSize = XmlFsType.ClusterSize }; if(labelCreationDate != null) diff --git a/Aaru.Filesystems/CPM/Info.cs b/Aaru.Filesystems/CPM/Info.cs index d07fb94d8..103fd3dbe 100644 --- a/Aaru.Filesystems/CPM/Info.cs +++ b/Aaru.Filesystems/CPM/Info.cs @@ -206,7 +206,9 @@ namespace Aaru.Filesystems.CPM // Build a DiscParameterBlock dpb = new DiscParameterBlock { - al0 = sectorCount == 1440 ? (byte)0xF0 : (byte)0xC0, spt = amsSb.spt, bsh = amsSb.bsh + al0 = sectorCount == 1440 ? (byte)0xF0 : (byte)0xC0, + spt = amsSb.spt, + bsh = amsSb.bsh }; for(int i = 0; i < dpb.bsh; i++) @@ -240,16 +242,26 @@ namespace Aaru.Filesystems.CPM // Build a CP/M disk definition workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, bitrate = "LOW", + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = amsSb.tps, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = amsSb.tps, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", evenOdd = false, + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, exm = dpb.exm, - label = null, comment = "Amstrad PCW superblock", ofs = dpb.off, - sectorsPerTrack = amsSb.spt, side1 = new Side + label = null, + comment = "Amstrad PCW superblock", + ofs = dpb.off, + sectorsPerTrack = amsSb.spt, + side1 = new Side { - sideId = 0, sectorIds = new int[amsSb.spt] + sideId = 0, + sectorIds = new int[amsSb.spt] } }; @@ -276,7 +288,8 @@ namespace Aaru.Filesystems.CPM workingDefinition.side2 = new Side { - sideId = 1, sectorIds = new int[amsSb.spt] + sideId = 1, + sectorIds = new int[amsSb.spt] }; for(int si = 0; si < amsSb.spt; si++) @@ -329,15 +342,22 @@ namespace Aaru.Filesystems.CPM // Build a DiscParameterBlock dpb = new DiscParameterBlock { - al0 = (byte)hddSb.al0, al1 = (byte)hddSb.al1, blm = hddSb.blm, bsh = hddSb.bsh, - cks = hddSb.cks, drm = hddSb.drm, dsm = hddSb.dsm, exm = hddSb.exm, + al0 = (byte)hddSb.al0, + al1 = (byte)hddSb.al1, + blm = hddSb.blm, + bsh = hddSb.bsh, + cks = hddSb.cks, + drm = hddSb.drm, + dsm = hddSb.dsm, + exm = hddSb.exm, off = hddSb.off, // Needed? phm = 0, // Needed? - psh = 0, spt = hddSb.spt + psh = 0, + spt = hddSb.spt }; uint directoryLength = (uint)((((ulong)dpb.drm + 1) * 32) / sectorSize); @@ -350,23 +370,35 @@ namespace Aaru.Filesystems.CPM // Build a CP/M disk definition workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "HIGH", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, - cylinders = hddSb.cylinders, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", evenOdd = false, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "HIGH", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = hddSb.cylinders, + drm = dpb.drm, + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 hard disk superblock", + label = null, + comment = "CP/M-86 hard disk superblock", ofs = dpb.off, - sectorsPerTrack = hddSb.sectorsPerTrack, side1 = new Side + sectorsPerTrack = hddSb.sectorsPerTrack, + side1 = new Side { - sideId = 0, sectorIds = new int[hddSb.sectorsPerTrack] + sideId = 0, + sectorIds = new int[hddSb.sectorsPerTrack] }, - order = "SIDES", side2 = new Side + order = "SIDES", + side2 = new Side { - sideId = 1, sectorIds = new int[hddSb.sectorsPerTrack] + sideId = 1, + sectorIds = new int[hddSb.sectorsPerTrack] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < hddSb.sectorsPerTrack; si++) @@ -414,26 +446,45 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0xC0, al1 = 0, blm = 7, bsh = 3, - cks = 0x10, drm = 0x3F, dsm = 0x9B, exm = 0, - off = 1, phm = 3, psh = 2, spt = 8 * 4 + al0 = 0xC0, + al1 = 0, + blm = 7, + bsh = 3, + cks = 0x10, + drm = 0x3F, + dsm = 0x9B, + exm = 0, + off = 1, + phm = 3, + psh = 2, + spt = 8 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 40, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 40, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 8, side1 = new Side + sectorsPerTrack = 8, + side1 = new Side { - sideId = 0, sectorIds = new int[8] + sideId = 0, + sectorIds = new int[8] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 8; si++) @@ -450,30 +501,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0x80, al1 = 0, blm = 0x0F, bsh = 4, - cks = 0x10, drm = 0x3F, dsm = 0x9D, exm = 1, - off = 2, phm = 3, psh = 2, spt = 8 * 4 + al0 = 0x80, + al1 = 0, + blm = 0x0F, + bsh = 4, + cks = 0x10, + drm = 0x3F, + dsm = 0x9D, + exm = 1, + off = 2, + phm = 3, + psh = 2, + spt = 8 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 40, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 40, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 8, side1 = new Side + sectorsPerTrack = 8, + side1 = new Side { - sideId = 0, sectorIds = new int[8] + sideId = 0, + sectorIds = new int[8] }, - order = "SIDES", side2 = new Side + order = "SIDES", + side2 = new Side { - sideId = 1, sectorIds = new int[8] + sideId = 1, + sectorIds = new int[8] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 8; si++) @@ -495,31 +567,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0x80, al1 = 0, blm = 0x0F, bsh = 4, - cks = 0x10, drm = 0x3F, dsm = 0, // Unknown. Needed? - exm = 1, off = 4, phm = 3, psh = 2, + al0 = 0x80, + al1 = 0, + blm = 0x0F, + bsh = 4, + cks = 0x10, + drm = 0x3F, + dsm = 0, // Unknown. Needed? + exm = 1, + off = 4, + phm = 3, + psh = 2, spt = 9 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 40, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 40, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 9, side1 = new Side + sectorsPerTrack = 9, + side1 = new Side { - sideId = 0, sectorIds = new int[9] + sideId = 0, + sectorIds = new int[9] }, - order = "SIDES", side2 = new Side + order = "SIDES", + side2 = new Side { - sideId = 1, sectorIds = new int[9] + sideId = 1, + sectorIds = new int[9] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 9; si++) @@ -540,30 +632,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0xF0, al1 = 0, blm = 0x0F, bsh = 4, - cks = 0x40, drm = 0xFF, dsm = 0x15E, exm = 0, - off = 4, phm = 3, psh = 2, spt = 9 * 4 + al0 = 0xF0, + al1 = 0, + blm = 0x0F, + bsh = 4, + cks = 0x40, + drm = 0xFF, + dsm = 0x15E, + exm = 0, + off = 4, + phm = 3, + psh = 2, + spt = 9 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 80, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 80, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 9, side1 = new Side + sectorsPerTrack = 9, + side1 = new Side { - sideId = 0, sectorIds = new int[9] + sideId = 0, + sectorIds = new int[9] }, - order = "SIDES", side2 = new Side + order = "SIDES", + side2 = new Side { - sideId = 1, sectorIds = new int[9] + sideId = 1, + sectorIds = new int[9] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 9; si++) @@ -583,30 +696,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0xF0, al1 = 0, blm = 0x0F, bsh = 4, - cks = 0x40, drm = 0xFF, dsm = 0x162, exm = 0, - off = 2, phm = 3, psh = 2, spt = 9 * 4 + al0 = 0xF0, + al1 = 0, + blm = 0x0F, + bsh = 4, + cks = 0x40, + drm = 0xFF, + dsm = 0x162, + exm = 0, + off = 2, + phm = 3, + psh = 2, + spt = 9 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 80, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 80, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 9, side1 = new Side + sectorsPerTrack = 9, + side1 = new Side { - sideId = 0, sectorIds = new int[9] + sideId = 0, + sectorIds = new int[9] }, - order = "CYLINDERS", side2 = new Side + order = "CYLINDERS", + side2 = new Side { - sideId = 1, sectorIds = new int[9] + sideId = 1, + sectorIds = new int[9] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 9; si++) @@ -626,30 +760,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0xC0, al1 = 0, blm = 0x1F, bsh = 5, - cks = 0x40, drm = 0xFF, dsm = 0x127, exm = 1, - off = 2, phm = 3, psh = 2, spt = 15 * 4 + al0 = 0xC0, + al1 = 0, + blm = 0x1F, + bsh = 5, + cks = 0x40, + drm = 0xFF, + dsm = 0x127, + exm = 1, + off = 2, + phm = 3, + psh = 2, + spt = 15 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "HIGH", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 80, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "HIGH", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 80, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 15, side1 = new Side + sectorsPerTrack = 15, + side1 = new Side { - sideId = 0, sectorIds = new int[15] + sideId = 0, + sectorIds = new int[15] }, - order = "CYLINDERS", side2 = new Side + order = "CYLINDERS", + side2 = new Side { - sideId = 1, sectorIds = new int[15] + sideId = 1, + sectorIds = new int[15] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 15; si++) @@ -669,30 +824,51 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = 0xC0, al1 = 0, blm = 0x1F, bsh = 5, - cks = 0x40, drm = 0xFF, dsm = 0x162, exm = 1, - off = 2, phm = 3, psh = 2, spt = 18 * 4 + al0 = 0xC0, + al1 = 0, + blm = 0x1F, + bsh = 5, + cks = 0x40, + drm = 0xFF, + dsm = 0x162, + exm = 1, + off = 2, + phm = 3, + psh = 2, + spt = 18 * 4 }; workingDefinition = new CpmDefinition { - al0 = dpb.al0, al1 = dpb.al1, - bitrate = "LOW", blm = dpb.blm, - bsh = dpb.bsh, bytesPerSector = 512, cylinders = 80, + al0 = dpb.al0, + al1 = dpb.al1, + bitrate = "LOW", + blm = dpb.blm, + bsh = dpb.bsh, + bytesPerSector = 512, + cylinders = 80, drm = dpb.drm, - dsm = dpb.dsm, encoding = "MFM", - evenOdd = false, exm = dpb.exm, - label = null, comment = "CP/M-86 floppy identifier", + dsm = dpb.dsm, + encoding = "MFM", + evenOdd = false, + exm = dpb.exm, + label = null, + comment = "CP/M-86 floppy identifier", ofs = dpb.off, - sectorsPerTrack = 18, side1 = new Side + sectorsPerTrack = 18, + side1 = new Side { - sideId = 0, sectorIds = new int[18] + sideId = 0, + sectorIds = new int[18] }, - order = "CYLINDERS", side2 = new Side + order = "CYLINDERS", + side2 = new Side { - sideId = 1, sectorIds = new int[18] + sideId = 1, + sectorIds = new int[18] }, - skew = 0, sofs = 0 + skew = 0, + sofs = 0 }; for(int si = 0; si < 18; si++) @@ -789,8 +965,7 @@ namespace Aaru.Filesystems.CPM for(int m = 0; m < def.side1.sectorIds.Length; m++) sectorMask[m + def.side1.sectorIds.Length] = (def.side1.sectorIds[m] - def.side1.sectorIds[0]) + - def.side1.sectorIds.Length + - def.side2.sectorIds.Length; + def.side1.sectorIds.Length + def.side2.sectorIds.Length; } // TODO: Implement COLUMBIA ordering @@ -828,11 +1003,9 @@ namespace Aaru.Filesystems.CPM for(int p = 0; p < dirLen; p++) { byte[] dirSector = - imagePlugin.ReadSector((ulong) - ((int)offset + - (int)partition.Start + - ((p / sectorMask.Length) * sectorMask.Length) + - sectorMask[p % sectorMask.Length])); + imagePlugin.ReadSector((ulong)((int)offset + (int)partition.Start + + ((p / sectorMask.Length) * sectorMask.Length) + + sectorMask[p % sectorMask.Length])); ms.Write(dirSector, 0, dirSector.Length); } @@ -859,10 +1032,16 @@ namespace Aaru.Filesystems.CPM dpb = new DiscParameterBlock { - al0 = (byte)def.al0, al1 = (byte)def.al1, blm = (byte)def.blm, bsh = (byte)def.bsh, + al0 = (byte)def.al0, + al1 = (byte)def.al1, + blm = (byte)def.blm, + bsh = (byte)def.bsh, // Needed? - cks = 0, drm = (ushort)def.drm, dsm = (ushort)def.dsm, exm = (byte)def.exm, + cks = 0, + drm = (ushort)def.drm, + dsm = (ushort)def.dsm, + exm = (byte)def.exm, off = (ushort)def.ofs, spt = (ushort)((def.sectorsPerTrack * def.bytesPerSector) / 128) }; diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs index d2cd963f1..b7e1bd81c 100644 --- a/Aaru.Filesystems/CPM/Super.cs +++ b/Aaru.Filesystems/CPM/Super.cs @@ -101,8 +101,7 @@ namespace Aaru.Filesystems.CPM for(int m = 0; m < workingDefinition.side1.sectorIds.Length; m++) sectorMask[m + workingDefinition.side1.sectorIds.Length] = (workingDefinition.side1.sectorIds[m] - workingDefinition.side1.sectorIds[0]) + - workingDefinition.side1.sectorIds.Length + - workingDefinition.side2.sectorIds.Length; + workingDefinition.side1.sectorIds.Length + workingDefinition.side2.sectorIds.Length; // TODO: Implement CYLINDERS ordering AaruConsole.DebugWriteLine("CP/M Plugin", "CYLINDERS ordering not yet implemented."); @@ -766,10 +765,13 @@ namespace Aaru.Filesystems.CPM // Generate XML info XmlFsType = new FileSystemType { - Clusters = cpmStat.Blocks, ClusterSize = (uint)blockSize, - Files = (ulong)fileCache.Count, - FilesSpecified = true, FreeClusters = cpmStat.FreeBlocks, FreeClustersSpecified = true, - Type = "CP/M filesystem" + Clusters = cpmStat.Blocks, + ClusterSize = (uint)blockSize, + Files = (ulong)fileCache.Count, + FilesSpecified = true, + FreeClusters = cpmStat.FreeBlocks, + FreeClustersSpecified = true, + Type = "CP/M filesystem" }; if(labelCreationDate != null) diff --git a/Aaru.Filesystems/Cram.cs b/Aaru.Filesystems/Cram.cs index 6b74b6a40..abcd7e71f 100644 --- a/Aaru.Filesystems/Cram.cs +++ b/Aaru.Filesystems/Cram.cs @@ -101,9 +101,12 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - VolumeName = StringHandlers.CToString(crSb.name, Encoding), Type = "Cram file system", - Clusters = crSb.blocks, Files = crSb.files, - FilesSpecified = true, FreeClusters = 0, + VolumeName = StringHandlers.CToString(crSb.name, Encoding), + Type = "Cram file system", + Clusters = crSb.blocks, + Files = crSb.files, + FilesSpecified = true, + FreeClusters = 0, FreeClustersSpecified = true }; } diff --git a/Aaru.Filesystems/ECMA67.cs b/Aaru.Filesystems/ECMA67.cs index 0311b5458..850d1c81a 100644 --- a/Aaru.Filesystems/ECMA67.cs +++ b/Aaru.Filesystems/ECMA67.cs @@ -89,8 +89,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "ECMA-67", ClusterSize = 256, Clusters = (partition.End - partition.Start) + 1, - VolumeName = Encoding.ASCII.GetString(vol.volumeIdentifier) + Type = "ECMA-67", + ClusterSize = 256, + Clusters = (partition.End - partition.Start) + 1, + VolumeName = Encoding.ASCII.GetString(vol.volumeIdentifier) }; information = sbInformation.ToString(); diff --git a/Aaru.Filesystems/EFS.cs b/Aaru.Filesystems/EFS.cs index d2d47560f..f1391aca2 100644 --- a/Aaru.Filesystems/EFS.cs +++ b/Aaru.Filesystems/EFS.cs @@ -204,9 +204,11 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Extent File System", ClusterSize = 512, + Type = "Extent File System", + ClusterSize = 512, Clusters = (ulong)efsSb.sb_size, - FreeClusters = (ulong)efsSb.sb_tfree, FreeClustersSpecified = true, + FreeClusters = (ulong)efsSb.sb_tfree, + FreeClustersSpecified = true, Dirty = efsSb.sb_dirty > 0, VolumeName = StringHandlers.CToString(efsSb.sb_fname, Encoding), VolumeSerial = $"{efsSb.sb_checksum:X8}", diff --git a/Aaru.Filesystems/F2FS.cs b/Aaru.Filesystems/F2FS.cs index 8c952ce76..71a1876ae 100644 --- a/Aaru.Filesystems/F2FS.cs +++ b/Aaru.Filesystems/F2FS.cs @@ -145,8 +145,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "F2FS filesystem", SystemIdentifier = Encoding.ASCII.GetString(f2fsSb.version), - Clusters = f2fsSb.block_count, ClusterSize = (uint)(1 << (int)f2fsSb.log_blocksize), + Type = "F2FS filesystem", + SystemIdentifier = Encoding.ASCII.GetString(f2fsSb.version), + Clusters = f2fsSb.block_count, + ClusterSize = (uint)(1 << (int)f2fsSb.log_blocksize), DataPreparerIdentifier = Encoding.ASCII.GetString(f2fsSb.init_version), VolumeName = StringHandlers.CToString(f2fsSb.volume_name, Encoding.Unicode, true), VolumeSerial = f2fsSb.uuid.ToString() diff --git a/Aaru.Filesystems/FAT/BPB.cs b/Aaru.Filesystems/FAT/BPB.cs index 9d14ea020..ab73d88b9 100644 --- a/Aaru.Filesystems/FAT/BPB.cs +++ b/Aaru.Filesystems/FAT/BPB.cs @@ -639,10 +639,8 @@ namespace Aaru.Filesystems.FAT } // This assumes a bootable sector will jump somewhere or disable interrupts in x86 code - bootable |= bpbSector[0] == 0xFA || - (bpbSector[0] == 0xEB && bpbSector[1] <= 0x7F) || - (bpbSector[0] == 0xE9 && - BitConverter.ToUInt16(bpbSector, 1) <= 0x1FC); + bootable |= bpbSector[0] == 0xFA || (bpbSector[0] == 0xEB && bpbSector[1] <= 0x7F) || + (bpbSector[0] == 0xE9 && BitConverter.ToUInt16(bpbSector, 1) <= 0x1FC); fakeBpb.boot_code = bpbSector; diff --git a/Aaru.Filesystems/FAT/Consts.cs b/Aaru.Filesystems/FAT/Consts.cs index 0097cf01b..1ddd5e30d 100644 --- a/Aaru.Filesystems/FAT/Consts.cs +++ b/Aaru.Filesystems/FAT/Consts.cs @@ -164,7 +164,7 @@ namespace Aaru.Filesystems.FAT "Windows NT (Spanish)"), // Need to check Windows >= 2000 (Spanish) //("a48b0e4b696317eed829e960d1aa576562a4f185", "TracerST"), // Unknown OEM ID, apparently Tracer, unconfirmed ("fe477972602ba76658ff7143859045b3c4036ca5", - "iomega"), // OEM ID: "SHIPDISK", contains timedate on boot code may not be unique + "iomega"), // OEM ID: "SHIPDISK", contains timedate on boot code may not be unique ("ef79a1f33e5237827eb812dda548f0e4e916d815", "GEOS"), // OEM ID: "GEOWORKS" ("8524587ee91494cc51cc2c9d07453e84be0cdc33", "Hero Soft v1.10"), ("681a0d9d662ba368e6acb0d0bf602e1f56411144", "Human68k 2.00"), diff --git a/Aaru.Filesystems/FAT/File.cs b/Aaru.Filesystems/FAT/File.cs index b6c44f31b..27e4e685d 100644 --- a/Aaru.Filesystems/FAT/File.cs +++ b/Aaru.Filesystems/FAT/File.cs @@ -149,7 +149,9 @@ namespace Aaru.Filesystems.FAT stat = new FileEntryInfo { - Attributes = new FileAttributes(), Blocks = entry.size / bytesPerCluster, BlockSize = bytesPerCluster, + Attributes = new FileAttributes(), + Blocks = entry.size / bytesPerCluster, + BlockSize = bytesPerCluster, Length = entry.size, Inode = (ulong)(fat32 ? (entry.ea_handle << 16) + entry.start_cluster : entry.start_cluster), Links = 1, diff --git a/Aaru.Filesystems/FAT/Info.cs b/Aaru.Filesystems/FAT/Info.cs index ba74de182..61f7a652a 100644 --- a/Aaru.Filesystems/FAT/Info.cs +++ b/Aaru.Filesystems/FAT/Info.cs @@ -384,7 +384,8 @@ namespace Aaru.Filesystems.FAT break; } - if(fat2SectorNo > partition.End || fat2SectorNo == 0) + if(fat2SectorNo > partition.End || + fat2SectorNo == 0) return false; AaruConsole.DebugWriteLine("FAT plugin", "2nd fat starts at = {0}", fat2SectorNo); diff --git a/Aaru.Filesystems/FAT/Super.cs b/Aaru.Filesystems/FAT/Super.cs index 897085021..285ca6cc0 100644 --- a/Aaru.Filesystems/FAT/Super.cs +++ b/Aaru.Filesystems/FAT/Super.cs @@ -117,8 +117,12 @@ namespace Aaru.Filesystems.FAT statfs = new FileSystemInfo { - Blocks = XmlFsType.Clusters, FilenameLength = 11, Files = 0, // Requires traversing all directories - FreeFiles = 0, PluginId = Id, FreeBlocks = 0 // Requires traversing the FAT + Blocks = XmlFsType.Clusters, + FilenameLength = 11, + Files = 0, // Requires traversing all directories + FreeFiles = 0, + PluginId = Id, + FreeBlocks = 0 // Requires traversing the FAT }; // This is needed because for FAT16, GEMDOS increases bytes per sector count instead of using big_sectors field. @@ -181,7 +185,8 @@ namespace Aaru.Filesystems.FAT statfs.Id = new FileSystemId { - IsInt = true, Serial32 = fat32Bpb.serial_no + IsInt = true, + Serial32 = fat32Bpb.serial_no }; if((fat32Bpb.flags & 0xF8) == 0x00) @@ -375,7 +380,8 @@ namespace Aaru.Filesystems.FAT statfs.Id = new FileSystemId { - IsInt = true, Serial32 = fakeBpb.serial_no + IsInt = true, + Serial32 = fakeBpb.serial_no }; } } diff --git a/Aaru.Filesystems/FATX/File.cs b/Aaru.Filesystems/FATX/File.cs index 4c9c01173..d74e58390 100644 --- a/Aaru.Filesystems/FATX/File.cs +++ b/Aaru.Filesystems/FATX/File.cs @@ -146,9 +146,11 @@ namespace Aaru.Filesystems.FATX stat = new FileEntryInfo { Attributes = FileAttributes.Directory | FileAttributes.System | FileAttributes.Hidden, - Blocks = GetClusters(superblock.rootDirectoryCluster).Length, BlockSize = bytesPerCluster, + Blocks = GetClusters(superblock.rootDirectoryCluster).Length, + BlockSize = bytesPerCluster, Length = GetClusters(superblock.rootDirectoryCluster).Length * bytesPerCluster, - Inode = superblock.rootDirectoryCluster, Links = 1 + Inode = superblock.rootDirectoryCluster, + Links = 1 }; return Errno.NoError; @@ -161,8 +163,12 @@ namespace Aaru.Filesystems.FATX stat = new FileEntryInfo { - Attributes = new FileAttributes(), Blocks = entry.length / bytesPerCluster, BlockSize = bytesPerCluster, - Length = entry.length, Inode = entry.firstCluster, Links = 1, + Attributes = new FileAttributes(), + Blocks = entry.length / bytesPerCluster, + BlockSize = bytesPerCluster, + Length = entry.length, + Inode = entry.firstCluster, + Links = 1, CreationTime = littleEndian ? DateHandlers.DosToDateTime(entry.creationDate, entry.creationTime).AddYears(20) : DateHandlers.DosToDateTime(entry.creationTime, entry.creationDate), diff --git a/Aaru.Filesystems/FATX/Info.cs b/Aaru.Filesystems/FATX/Info.cs index b8d5e1562..4886c6e16 100644 --- a/Aaru.Filesystems/FATX/Info.cs +++ b/Aaru.Filesystems/FATX/Info.cs @@ -105,7 +105,8 @@ namespace Aaru.Filesystems.FATX Type = "FATX filesystem", ClusterSize = (uint)(fatxSb.sectorsPerCluster * logicalSectorsPerPhysicalSectors * imagePlugin.Info.SectorSize), - VolumeName = volumeLabel, VolumeSerial = $"{fatxSb.id:X8}" + VolumeName = volumeLabel, + VolumeSerial = $"{fatxSb.id:X8}" }; XmlFsType.Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / diff --git a/Aaru.Filesystems/FATX/Super.cs b/Aaru.Filesystems/FATX/Super.cs index e24e0aabd..3a0879fb6 100644 --- a/Aaru.Filesystems/FATX/Super.cs +++ b/Aaru.Filesystems/FATX/Super.cs @@ -93,7 +93,8 @@ namespace Aaru.Filesystems.FATX Type = "FATX filesystem", ClusterSize = (uint)(superblock.sectorsPerCluster * logicalSectorsPerPhysicalSectors * imagePlugin.Info.SectorSize), - VolumeName = volumeLabel, VolumeSerial = $"{superblock.id:X8}" + VolumeName = volumeLabel, + VolumeSerial = $"{superblock.id:X8}" }; XmlFsType.Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / @@ -101,13 +102,17 @@ namespace Aaru.Filesystems.FATX statfs = new FileSystemInfo { - Blocks = XmlFsType.Clusters, FilenameLength = MAX_FILENAME, - Files = 0, // Requires traversing all directories - FreeFiles = 0, Id = + Blocks = XmlFsType.Clusters, + FilenameLength = MAX_FILENAME, + Files = 0, // Requires traversing all directories + FreeFiles = 0, + Id = { - IsInt = true, Serial32 = superblock.magic + IsInt = true, + Serial32 = superblock.magic }, - PluginId = Id, Type = littleEndian ? "Xbox FAT" : "Xbox 360 FAT", + PluginId = Id, + Type = littleEndian ? "Xbox FAT" : "Xbox 360 FAT", FreeBlocks = 0 // Requires traversing the FAT }; diff --git a/Aaru.Filesystems/Fossil.cs b/Aaru.Filesystems/Fossil.cs index a6547f389..66f59189f 100644 --- a/Aaru.Filesystems/Fossil.cs +++ b/Aaru.Filesystems/Fossil.cs @@ -103,7 +103,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Fossil filesystem", ClusterSize = hdr.blockSize, Clusters = hdr.end + Type = "Fossil filesystem", + ClusterSize = hdr.blockSize, + Clusters = hdr.end }; if(sbLocation <= partition.End) diff --git a/Aaru.Filesystems/HAMMER.cs b/Aaru.Filesystems/HAMMER.cs index ec07258cb..b127c2444 100644 --- a/Aaru.Filesystems/HAMMER.cs +++ b/Aaru.Filesystems/HAMMER.cs @@ -117,7 +117,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Clusters = partition.Size / HAMMER_BIGBLOCK_SIZE, ClusterSize = HAMMER_BIGBLOCK_SIZE, Dirty = false, + Clusters = partition.Size / HAMMER_BIGBLOCK_SIZE, + ClusterSize = HAMMER_BIGBLOCK_SIZE, + Dirty = false, Type = "HAMMER", VolumeName = StringHandlers.CToString(hammerSb.vol_label, Encoding), VolumeSerial = hammerSb.vol_fsid.ToString() diff --git a/Aaru.Filesystems/HPOFS/Info.cs b/Aaru.Filesystems/HPOFS/Info.cs index a92702f92..83d6aad28 100644 --- a/Aaru.Filesystems/HPOFS/Info.cs +++ b/Aaru.Filesystems/HPOFS/Info.cs @@ -198,10 +198,12 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Clusters = mib.sectors / bpb.spc, ClusterSize = (uint)(bpb.bps * bpb.spc), + Clusters = mib.sectors / bpb.spc, + ClusterSize = (uint)(bpb.bps * bpb.spc), CreationDate = DateHandlers.DosToDateTime(mib.creationDate, mib.creationTime), CreationDateSpecified = true, - DataPreparerIdentifier = StringHandlers.SpacePaddedToString(vib.owner, Encoding), Type = "HPOFS", + DataPreparerIdentifier = StringHandlers.SpacePaddedToString(vib.owner, Encoding), + Type = "HPOFS", VolumeName = StringHandlers.SpacePaddedToString(mib.volumeLabel, Encoding), VolumeSerial = $"{mib.serial:X8}", SystemIdentifier = StringHandlers.SpacePaddedToString(bpb.oem_name) diff --git a/Aaru.Filesystems/ISO9660/Dir.cs b/Aaru.Filesystems/ISO9660/Dir.cs index a4501b063..4983a9222 100644 --- a/Aaru.Filesystems/ISO9660/Dir.cs +++ b/Aaru.Filesystems/ISO9660/Dir.cs @@ -189,7 +189,8 @@ namespace Aaru.Filesystems.ISO9660 Size = record.size, Filename = Encoding.GetString(data, entryOff + DirectoryRecordSize, record.name_len), VolumeSequenceNumber = record.volume_sequence_number, - Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = record.xattr_len + Timestamp = DecodeHighSierraDateTime(record.date), + XattrLength = record.xattr_len }; if(record.size != 0) @@ -254,10 +255,13 @@ namespace Aaru.Filesystems.ISO9660 var entry = new DecodedDirectoryEntry { - Size = record.size, Flags = record.flags, Interleave = record.interleave, + Size = record.size, + Flags = record.flags, + Interleave = record.interleave, VolumeSequenceNumber = record.volume_sequence_number, Filename = Encoding.GetString(data, entryOff + DirectoryRecordSize, record.name_len), - Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = record.xattr_len + Timestamp = DecodeHighSierraDateTime(record.date), + XattrLength = record.xattr_len }; if(record.size != 0) @@ -312,13 +316,16 @@ namespace Aaru.Filesystems.ISO9660 var entry = new DecodedDirectoryEntry { - Size = record.size, Flags = record.flags, + Size = record.size, + Flags = record.flags, Filename = joliet ? Encoding.BigEndianUnicode.GetString(data, entryOff + DirectoryRecordSize, record.name_len) : Encoding.GetString(data, entryOff + DirectoryRecordSize, record.name_len), - FileUnitSize = record.file_unit_size, Interleave = record.interleave, - VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeIsoDateTime(record.date), + FileUnitSize = record.file_unit_size, + Interleave = record.interleave, + VolumeSequenceNumber = record.volume_sequence_number, + Timestamp = DecodeIsoDateTime(record.date), XattrLength = record.xattr_len }; @@ -382,9 +389,12 @@ namespace Aaru.Filesystems.ISO9660 { Size = 0, Flags = record.flags ^ FileFlags.Associated, - FileUnitSize = 0, Interleave = 0, - VolumeSequenceNumber = record.volume_sequence_number, Filename = entry.Filename, - Timestamp = DecodeIsoDateTime(record.date), XattrLength = 0 + FileUnitSize = 0, + Interleave = 0, + VolumeSequenceNumber = record.volume_sequence_number, + Filename = entry.Filename, + Timestamp = DecodeIsoDateTime(record.date), + XattrLength = 0 }; if(hasResourceFork) @@ -1070,9 +1080,11 @@ namespace Aaru.Filesystems.ISO9660 var entry = new DecodedDirectoryEntry { - Size = record.size, Filename = tEntry.Name, + Size = record.size, + Filename = tEntry.Name, VolumeSequenceNumber = record.volume_sequence_number, - Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = tEntry.XattrLength + Timestamp = DecodeHighSierraDateTime(record.date), + XattrLength = tEntry.XattrLength }; if(record.size != 0) @@ -1119,10 +1131,13 @@ namespace Aaru.Filesystems.ISO9660 var entry = new DecodedDirectoryEntry { - Size = record.size, Flags = record.flags, + Size = record.size, + Flags = record.flags, Filename = tEntry.Name, - FileUnitSize = record.file_unit_size, Interleave = record.interleave, - VolumeSequenceNumber = record.volume_sequence_number, Timestamp = DecodeIsoDateTime(record.date), + FileUnitSize = record.file_unit_size, + Interleave = record.interleave, + VolumeSequenceNumber = record.volume_sequence_number, + Timestamp = DecodeIsoDateTime(record.date), XattrLength = tEntry.XattrLength }; @@ -1164,10 +1179,13 @@ namespace Aaru.Filesystems.ISO9660 var entry = new DecodedDirectoryEntry { - Size = record.size, Flags = record.flags, Filename = tEntry.Name, + Size = record.size, + Flags = record.flags, + Filename = tEntry.Name, Interleave = record.interleave, VolumeSequenceNumber = record.volume_sequence_number, - Timestamp = DecodeHighSierraDateTime(record.date), XattrLength = tEntry.XattrLength + Timestamp = DecodeHighSierraDateTime(record.date), + XattrLength = tEntry.XattrLength }; if(record.size != 0) diff --git a/Aaru.Filesystems/ISO9660/File.cs b/Aaru.Filesystems/ISO9660/File.cs index 196a08330..8f40cc12d 100644 --- a/Aaru.Filesystems/ISO9660/File.cs +++ b/Aaru.Filesystems/ISO9660/File.cs @@ -176,8 +176,12 @@ namespace Aaru.Filesystems.ISO9660 stat = new FileEntryInfo { - Attributes = new FileAttributes(), Blocks = (long)(entry.Size / 2048), // TODO: XA - BlockSize = 2048, Length = (long)entry.Size, Links = 1, LastWriteTimeUtc = entry.Timestamp + Attributes = new FileAttributes(), + Blocks = (long)(entry.Size / 2048), // TODO: XA + BlockSize = 2048, + Length = (long)entry.Size, + Links = 1, + LastWriteTimeUtc = entry.Timestamp }; if(entry.Extents?.Count > 0) diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs index 72ba75dd4..6f9cbcadc 100644 --- a/Aaru.Filesystems/ISO9660/Info.cs +++ b/Aaru.Filesystems/ISO9660/Info.cs @@ -412,22 +412,17 @@ namespace Aaru.Filesystems.ISO9660 break; } - rrip |= nextSignature == RRIP_MAGIC || - nextSignature == RRIP_POSIX_ATTRIBUTES || - nextSignature == RRIP_POSIX_DEV_NO || - nextSignature == RRIP_SYMLINK || - nextSignature == RRIP_NAME || - nextSignature == RRIP_CHILDLINK || - nextSignature == RRIP_PARENTLINK || - nextSignature == RRIP_RELOCATED_DIR || - nextSignature == RRIP_TIMESTAMPS || nextSignature == RRIP_SPARSE; + rrip |= nextSignature == RRIP_MAGIC || nextSignature == RRIP_POSIX_ATTRIBUTES || + nextSignature == RRIP_POSIX_DEV_NO || nextSignature == RRIP_SYMLINK || + nextSignature == RRIP_NAME || nextSignature == RRIP_CHILDLINK || + nextSignature == RRIP_PARENTLINK || nextSignature == RRIP_RELOCATED_DIR || + nextSignature == RRIP_TIMESTAMPS || nextSignature == RRIP_SPARSE; ziso |= nextSignature == ZISO_MAGIC; amiga |= nextSignature == AMIGA_MAGIC; aaip |= nextSignature == AAIP_MAGIC || (nextSignature == AAIP_MAGIC_OLD && - sa[saOff + 3] == 1 && - sa[saOff + 2] >= 9); + sa[saOff + 3] == 1 && sa[saOff + 2] >= 9); saOff += sa[saOff + 2]; @@ -700,8 +695,7 @@ namespace Aaru.Filesystems.ISO9660 initialEntry.sector_count); byte[] bootImage = - (initialEntry.load_rba + partition.Start + initialEntry.sector_count) - 1 <= - partition.End + (initialEntry.load_rba + partition.Start + initialEntry.sector_count) - 1 <= partition.End ? imagePlugin.ReadSectors(initialEntry.load_rba + partition.Start, initialEntry.sector_count) : null; diff --git a/Aaru.Filesystems/ISO9660/PathTable.cs b/Aaru.Filesystems/ISO9660/PathTable.cs index 33639abba..f28600d7e 100644 --- a/Aaru.Filesystems/ISO9660/PathTable.cs +++ b/Aaru.Filesystems/ISO9660/PathTable.cs @@ -61,7 +61,10 @@ namespace Aaru.Filesystems.ISO9660 table.Add(new PathTableEntryInternal { - Extent = entry.start_lbn, Name = name, Parent = entry.parent_dirno, XattrLength = entry.xattr_len + Extent = entry.start_lbn, + Name = name, + Parent = entry.parent_dirno, + XattrLength = entry.xattr_len }); off += entry.name_len; @@ -99,7 +102,10 @@ namespace Aaru.Filesystems.ISO9660 table.Add(new PathTableEntryInternal { - Extent = entry.start_lbn, Name = name, Parent = entry.parent_dirno, XattrLength = entry.xattr_len + Extent = entry.start_lbn, + Name = name, + Parent = entry.parent_dirno, + XattrLength = entry.xattr_len }); off += entry.name_len; diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs index 699ed1751..39c4a338d 100644 --- a/Aaru.Filesystems/ISO9660/Super.cs +++ b/Aaru.Filesystems/ISO9660/Super.cs @@ -592,7 +592,9 @@ namespace Aaru.Filesystems.ISO9660 { (rootLocation, rootSize) }, - Filename = "$", Size = rootSize, Timestamp = decodedVd.CreationTime + Filename = "$", + Size = rootSize, + Timestamp = decodedVd.CreationTime }); if(!cdi) @@ -602,7 +604,8 @@ namespace Aaru.Filesystems.ISO9660 { (pathTableLsbLocation, (uint)pathTableData.Length) }, - Filename = "$PATH_TABLE.LSB", Size = (uint)pathTableData.Length, + Filename = "$PATH_TABLE.LSB", + Size = (uint)pathTableData.Length, Timestamp = decodedVd.CreationTime }); @@ -612,7 +615,9 @@ namespace Aaru.Filesystems.ISO9660 { (Swapping.Swap(pathTableMsbLocation), (uint)pathTableData.Length) }, - Filename = "$PATH_TABLE.MSB", Size = (uint)pathTableData.Length, Timestamp = decodedVd.CreationTime + Filename = "$PATH_TABLE.MSB", + Size = (uint)pathTableData.Length, + Timestamp = decodedVd.CreationTime }); for(int i = 0; i < bvdSectors.Count; i++) @@ -622,7 +627,9 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)i, 2048) }, - Filename = i == 0 ? "$BOOT" : $"$BOOT_{i}", Size = 2048, Timestamp = decodedVd.CreationTime + Filename = i == 0 ? "$BOOT" : $"$BOOT_{i}", + Size = 2048, + Timestamp = decodedVd.CreationTime }); for(int i = 0; i < pvdSectors.Count; i++) @@ -632,7 +639,9 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)i, 2048) }, - Filename = i == 0 ? "$PVD" : $"PVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime + Filename = i == 0 ? "$PVD" : $"PVD_{i}", + Size = 2048, + Timestamp = decodedVd.CreationTime }); for(int i = 0; i < svdSectors.Count; i++) @@ -642,7 +651,9 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)i, 2048) }, - Filename = i == 0 ? "$SVD" : $"$SVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime + Filename = i == 0 ? "$SVD" : $"$SVD_{i}", + Size = 2048, + Timestamp = decodedVd.CreationTime }); for(int i = 0; i < evdSectors.Count; i++) @@ -652,7 +663,9 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)i, 2048) }, - Filename = i == 0 ? "$EVD" : $"$EVD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime + Filename = i == 0 ? "$EVD" : $"$EVD_{i}", + Size = 2048, + Timestamp = decodedVd.CreationTime }); for(int i = 0; i < vpdSectors.Count; i++) @@ -662,7 +675,9 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)i, 2048) }, - Filename = i == 0 ? "$VPD" : $"$VPD_{i}", Size = 2048, Timestamp = decodedVd.CreationTime + Filename = i == 0 ? "$VPD" : $"$VPD_{i}", + Size = 2048, + Timestamp = decodedVd.CreationTime }); if(segaCd != null) @@ -672,7 +687,8 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)partition.Start, (uint)Marshal.SizeOf()) }, - Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), + Filename = "$IP.BIN", + Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); @@ -683,7 +699,8 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)partition.Start, (uint)Marshal.SizeOf()) }, - Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), + Filename = "$IP.BIN", + Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); @@ -694,7 +711,8 @@ namespace Aaru.Filesystems.ISO9660 { ((uint)partition.Start, (uint)Marshal.SizeOf()) }, - Filename = "$IP.BIN", Size = (uint)Marshal.SizeOf(), + Filename = "$IP.BIN", + Size = (uint)Marshal.SizeOf(), Timestamp = decodedVd.CreationTime }); } @@ -705,11 +723,12 @@ namespace Aaru.Filesystems.ISO9660 statfs = new FileSystemInfo { - Blocks = decodedVd.Blocks, FilenameLength = - (ushort)(jolietvd != null ? this.@namespace == Namespace.Joliet - ? 110 - : 255 : 255), - PluginId = Id, Type = fsFormat + Blocks = decodedVd.Blocks, + FilenameLength = (ushort)(jolietvd != null ? this.@namespace == Namespace.Joliet + ? 110 + : 255 : 255), + PluginId = Id, + Type = fsFormat }; directoryCache = new Dictionary>(); diff --git a/Aaru.Filesystems/JFS.cs b/Aaru.Filesystems/JFS.cs index 323efc577..38923e386 100644 --- a/Aaru.Filesystems/JFS.cs +++ b/Aaru.Filesystems/JFS.cs @@ -172,13 +172,13 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "JFS filesystem", Clusters = jfsSb.s_size, ClusterSize = jfsSb.s_bsize, + Type = "JFS filesystem", + Clusters = jfsSb.s_size, + ClusterSize = jfsSb.s_bsize, Bootable = true, - VolumeName = - StringHandlers.CToString(jfsSb.s_version == 1 ? jfsSb.s_fpack : jfsSb.s_label, Encoding), + VolumeName = StringHandlers.CToString(jfsSb.s_version == 1 ? jfsSb.s_fpack : jfsSb.s_label, Encoding), VolumeSerial = $"{jfsSb.s_uuid}", - ModificationDate = - DateHandlers.UnixUnsignedToDateTime(jfsSb.s_time.tv_sec, jfsSb.s_time.tv_nsec), + ModificationDate = DateHandlers.UnixUnsignedToDateTime(jfsSb.s_time.tv_sec, jfsSb.s_time.tv_nsec), ModificationDateSpecified = true }; diff --git a/Aaru.Filesystems/LIF.cs b/Aaru.Filesystems/LIF.cs index f4c8df561..fdf5491ce 100644 --- a/Aaru.Filesystems/LIF.cs +++ b/Aaru.Filesystems/LIF.cs @@ -98,10 +98,12 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "HP Logical Interchange Format", ClusterSize = 256, - Clusters = partition.Size / 256, - CreationDate = DateHandlers.LifToDateTime(lifSb.creationDate), CreationDateSpecified = true, - VolumeName = StringHandlers.CToString(lifSb.volumeLabel, Encoding) + Type = "HP Logical Interchange Format", + ClusterSize = 256, + Clusters = partition.Size / 256, + CreationDate = DateHandlers.LifToDateTime(lifSb.creationDate), + CreationDateSpecified = true, + VolumeName = StringHandlers.CToString(lifSb.volumeLabel, Encoding) }; } diff --git a/Aaru.Filesystems/LisaFS/Dir.cs b/Aaru.Filesystems/LisaFS/Dir.cs index adf89cd0b..2a6986dbf 100644 --- a/Aaru.Filesystems/LisaFS/Dir.cs +++ b/Aaru.Filesystems/LisaFS/Dir.cs @@ -125,10 +125,12 @@ namespace Aaru.Filesystems.LisaFS { var entV2 = new CatalogEntryV2 { - filenameLen = buf[offset], filename = new byte[E_NAME], unknown1 = buf[offset + 0x21], - fileType = buf[offset + 0x22], - unknown2 = buf[offset + 0x23], - fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x24), + filenameLen = buf[offset], + filename = new byte[E_NAME], + unknown1 = buf[offset + 0x21], + fileType = buf[offset + 0x22], + unknown2 = buf[offset + 0x23], + fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x24), unknown3 = new byte[16] }; @@ -155,8 +157,12 @@ namespace Aaru.Filesystems.LisaFS var entV3 = new CatalogEntry { - fileID = entV2.fileID, filename = new byte[32], fileType = entV2.fileType, - length = (int)srecords[entV2.fileID].filesize, dtc = ext.dtc, dtm = ext.dtm + fileID = entV2.fileID, + filename = new byte[32], + fileType = entV2.fileType, + length = (int)srecords[entV2.fileID].filesize, + dtc = ext.dtc, + dtm = ext.dtm }; Array.Copy(entV2.filename, 0, entV3.filename, 0, entV2.filenameLen); @@ -256,20 +262,15 @@ namespace Aaru.Filesystems.LisaFS marker = buf[offset], parentID = BigEndianBitConverter.ToUInt16(buf, offset + 0x01), filename = new byte[E_NAME], - terminator = buf[offset + 0x23], - fileType = buf[offset + 0x24], - unknown = - buf[offset + 0x25], - fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x26), - dtc = - BigEndianBitConverter.ToUInt32(buf, offset + 0x28), - dtm = - BigEndianBitConverter.ToUInt32(buf, offset + 0x2C), - length = - BigEndianBitConverter.ToInt32(buf, offset + 0x30), - wasted = - BigEndianBitConverter.ToInt32(buf, offset + 0x34), - tail = new byte[8] + terminator = buf[offset + 0x23], + fileType = buf[offset + 0x24], + unknown = buf[offset + 0x25], + fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x26), + dtc = BigEndianBitConverter.ToUInt32(buf, offset + 0x28), + dtm = BigEndianBitConverter.ToUInt32(buf, offset + 0x2C), + length = BigEndianBitConverter.ToInt32(buf, offset + 0x30), + wasted = BigEndianBitConverter.ToInt32(buf, offset + 0x34), + tail = new byte[8] }; Array.Copy(buf, offset + 0x03, entry.filename, 0, E_NAME); @@ -294,17 +295,15 @@ namespace Aaru.Filesystems.LisaFS marker = buf[offset], parentID = BigEndianBitConverter.ToUInt16(buf, offset + 0x01), filename = new byte[E_NAME], - terminator = buf[offset + 0x23], - fileType = buf[offset + 0x24], - unknown = - buf[offset + 0x25], - fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x26), - dtc = - BigEndianBitConverter.ToUInt32(buf, offset + 0x28), - dtm = - BigEndianBitConverter.ToUInt32(buf, offset + 0x2C), - length = 0, wasted = 0, - tail = null + terminator = buf[offset + 0x23], + fileType = buf[offset + 0x24], + unknown = buf[offset + 0x25], + fileID = BigEndianBitConverter.ToInt16(buf, offset + 0x26), + dtc = BigEndianBitConverter.ToUInt32(buf, offset + 0x28), + dtm = BigEndianBitConverter.ToUInt32(buf, offset + 0x2C), + length = 0, + wasted = 0, + tail = null }; Array.Copy(buf, offset + 0x03, entry.filename, 0, E_NAME); @@ -332,9 +331,16 @@ namespace Aaru.Filesystems.LisaFS stat = new FileEntryInfo { - Attributes = new FileAttributes(), Inode = FILEID_CATALOG, Mode = 0x16D, Links = 0, - UID = 0, GID = 0, DeviceNo = 0, Length = 0, - BlockSize = mddf.datasize, Blocks = 0 + Attributes = new FileAttributes(), + Inode = FILEID_CATALOG, + Mode = 0x16D, + Links = 0, + UID = 0, + GID = 0, + DeviceNo = 0, + Length = 0, + BlockSize = mddf.datasize, + Blocks = 0 }; directoryDtcCache.TryGetValue(dirId, out DateTime tmp); diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs index d64a0275a..1660d9eb5 100644 --- a/Aaru.Filesystems/LisaFS/Super.cs +++ b/Aaru.Filesystems/LisaFS/Super.cs @@ -386,10 +386,14 @@ namespace Aaru.Filesystems.LisaFS stat = new FileSystemInfo { - Blocks = mddf.vol_size, FilenameLength = (ushort)E_NAME, Files = mddf.filecount, - FreeBlocks = mddf.freecount, Id = + Blocks = mddf.vol_size, + FilenameLength = (ushort)E_NAME, + Files = mddf.filecount, + FreeBlocks = mddf.freecount, + Id = { - Serial64 = mddf.volid, IsLong = true + Serial64 = mddf.volid, + IsLong = true }, PluginId = Id }; diff --git a/Aaru.Filesystems/Locus.cs b/Aaru.Filesystems/Locus.cs index d2e2de3bf..b99be30ae 100644 --- a/Aaru.Filesystems/Locus.cs +++ b/Aaru.Filesystems/Locus.cs @@ -253,14 +253,17 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Locus filesystem", ClusterSize = (uint)blockSize, Clusters = (ulong)locusSb.s_fsize, + Type = "Locus filesystem", + ClusterSize = (uint)blockSize, + Clusters = (ulong)locusSb.s_fsize, // Sometimes it uses one, or the other. Use the bigger - VolumeName = string.IsNullOrEmpty(s_fsmnt) ? s_fpack : s_fsmnt, - ModificationDate = DateHandlers.UnixToDateTime(locusSb.s_time), ModificationDateSpecified = true, - Dirty = !locusSb.s_flags.HasFlag(LocusFlags.SB_CLEAN) || - locusSb.s_flags.HasFlag(LocusFlags.SB_DIRTY), - FreeClusters = (ulong)locusSb.s_tfree, FreeClustersSpecified = true + VolumeName = string.IsNullOrEmpty(s_fsmnt) ? s_fpack : s_fsmnt, + ModificationDate = DateHandlers.UnixToDateTime(locusSb.s_time), + ModificationDateSpecified = true, + Dirty = !locusSb.s_flags.HasFlag(LocusFlags.SB_CLEAN) || locusSb.s_flags.HasFlag(LocusFlags.SB_DIRTY), + FreeClusters = (ulong)locusSb.s_tfree, + FreeClustersSpecified = true }; } @@ -378,31 +381,23 @@ namespace Aaru.Filesystems Flags] enum LocusFlags : ushort { - SB_RDONLY = 0x1, /* no writes on filesystem */ - SB_CLEAN = 0x2, /* fs unmounted cleanly (or checks run) */ - SB_DIRTY = 0x4, /* fs mounted without CLEAN bit set */ SB_RMV = 0x8, /* fs is a removable file system */ - SB_PRIMPACK = - 0x10, /* This is the primary pack of the filesystem */ - SB_REPLTYPE = - 0x20, /* This is a replicated type filesystem. */ - SB_USER = - 0x40, /* This is a "user" replicated filesystem. */ - SB_BACKBONE = - 0x80, /* backbone pack ; complete copy of primary pack but not modifiable */ - SB_NFS = 0x100, /* This is a NFS type filesystem */ - SB_BYHAND = - 0x200, /* Inhibits automatic fscks on a mangled file system */ - SB_NOSUID = 0x400, /* Set-uid/Set-gid is disabled */ SB_SYNCW = 0x800 /* Synchronous Write */ + SB_RDONLY = 0x1, /* no writes on filesystem */ SB_CLEAN = 0x2, /* fs unmounted cleanly (or checks run) */ + SB_DIRTY = 0x4, /* fs mounted without CLEAN bit set */ SB_RMV = 0x8, /* fs is a removable file system */ + SB_PRIMPACK = 0x10, /* This is the primary pack of the filesystem */ + SB_REPLTYPE = 0x20, /* This is a replicated type filesystem. */ + SB_USER = 0x40, /* This is a "user" replicated filesystem. */ + SB_BACKBONE = 0x80, /* backbone pack ; complete copy of primary pack but not modifiable */ + SB_NFS = 0x100, /* This is a NFS type filesystem */ + SB_BYHAND = 0x200, /* Inhibits automatic fscks on a mangled file system */ + SB_NOSUID = 0x400, /* Set-uid/Set-gid is disabled */ SB_SYNCW = 0x800 /* Synchronous Write */ } [SuppressMessage("ReSharper", "InconsistentNaming"), SuppressMessage("ReSharper", "BuiltInTypeReferenceStyle"), Flags] enum LocusVersion : byte { - SB_SB4096 = 1, /* smallblock filesys with 4096 byte blocks */ - SB_B1024 = 2, /* 1024 byte block filesystem */ - NUMSCANDEV = - 5 /* Used by scangfs(), refed in space.h */ + SB_SB4096 = 1, /* smallblock filesys with 4096 byte blocks */ SB_B1024 = 2, /* 1024 byte block filesystem */ + NUMSCANDEV = 5 /* Used by scangfs(), refed in space.h */ } } } \ No newline at end of file diff --git a/Aaru.Filesystems/MicroDOS.cs b/Aaru.Filesystems/MicroDOS.cs index a804f34ff..e74b314ad 100644 --- a/Aaru.Filesystems/MicroDOS.cs +++ b/Aaru.Filesystems/MicroDOS.cs @@ -91,8 +91,12 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "MicroDOS", ClusterSize = 512, Clusters = block0.blocks, Files = block0.files, - FilesSpecified = true, FreeClusters = (ulong)(block0.blocks - block0.usedBlocks), + Type = "MicroDOS", + ClusterSize = 512, + Clusters = block0.blocks, + Files = block0.files, + FilesSpecified = true, + FreeClusters = (ulong)(block0.blocks - block0.usedBlocks), FreeClustersSpecified = true }; diff --git a/Aaru.Filesystems/NILFS2.cs b/Aaru.Filesystems/NILFS2.cs index 017b3f4f4..e19f28666 100644 --- a/Aaru.Filesystems/NILFS2.cs +++ b/Aaru.Filesystems/NILFS2.cs @@ -137,11 +137,14 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "NILFS2 filesystem", ClusterSize = (uint)(1 << (int)(nilfsSb.log_block_size + 10)), - VolumeName = StringHandlers.CToString(nilfsSb.volume_name, Encoding), - VolumeSerial = nilfsSb.uuid.ToString(), - CreationDate = DateHandlers.UnixUnsignedToDateTime(nilfsSb.ctime), CreationDateSpecified = true, - ModificationDate = DateHandlers.UnixUnsignedToDateTime(nilfsSb.wtime), ModificationDateSpecified = true + Type = "NILFS2 filesystem", + ClusterSize = (uint)(1 << (int)(nilfsSb.log_block_size + 10)), + VolumeName = StringHandlers.CToString(nilfsSb.volume_name, Encoding), + VolumeSerial = nilfsSb.uuid.ToString(), + CreationDate = DateHandlers.UnixUnsignedToDateTime(nilfsSb.ctime), + CreationDateSpecified = true, + ModificationDate = DateHandlers.UnixUnsignedToDateTime(nilfsSb.wtime), + ModificationDateSpecified = true }; if(nilfsSb.creator_os == 0) diff --git a/Aaru.Filesystems/ODS.cs b/Aaru.Filesystems/ODS.cs index 0ea1bb5f0..0220890bc 100644 --- a/Aaru.Filesystems/ODS.cs +++ b/Aaru.Filesystems/ODS.cs @@ -249,7 +249,8 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "FILES-11", ClusterSize = (uint)(homeblock.cluster * 512), + Type = "FILES-11", + ClusterSize = (uint)(homeblock.cluster * 512), Clusters = partition.Size / (ulong)(homeblock.cluster * 512), VolumeName = StringHandlers.SpacePaddedToString(homeblock.volname, Encoding), VolumeSerial = $"{homeblock.serialnum:X8}" diff --git a/Aaru.Filesystems/Opera/Dir.cs b/Aaru.Filesystems/Opera/Dir.cs index 31c7ae80f..abff5124c 100644 --- a/Aaru.Filesystems/Opera/Dir.cs +++ b/Aaru.Filesystems/Opera/Dir.cs @@ -139,7 +139,8 @@ 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++) diff --git a/Aaru.Filesystems/Opera/File.cs b/Aaru.Filesystems/Opera/File.cs index 1c06a171c..bc9593698 100644 --- a/Aaru.Filesystems/Opera/File.cs +++ b/Aaru.Filesystems/Opera/File.cs @@ -151,8 +151,11 @@ namespace Aaru.Filesystems stat = new FileEntryInfo { - Attributes = new FileAttributes(), Blocks = entry.block_count, BlockSize = entry.block_size, - Length = entry.byte_count, Inode = entry.id, + Attributes = new FileAttributes(), + Blocks = entry.block_count, + BlockSize = entry.block_size, + Length = entry.byte_count, + Inode = entry.id, Links = (ulong)entryWithPointers.pointers.Length }; diff --git a/Aaru.Filesystems/Opera/Info.cs b/Aaru.Filesystems/Opera/Info.cs index 9a033c629..491670639 100644 --- a/Aaru.Filesystems/Opera/Info.cs +++ b/Aaru.Filesystems/Opera/Info.cs @@ -129,8 +129,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Opera", VolumeName = StringHandlers.CToString(sb.volume_label, Encoding), - ClusterSize = sb.block_size, Clusters = sb.block_count + Type = "Opera", + VolumeName = StringHandlers.CToString(sb.volume_label, Encoding), + ClusterSize = sb.block_size, + Clusters = sb.block_count }; } } diff --git a/Aaru.Filesystems/Opera/Super.cs b/Aaru.Filesystems/Opera/Super.cs index 7a361710b..4e7e76b1c 100644 --- a/Aaru.Filesystems/Opera/Super.cs +++ b/Aaru.Filesystems/Opera/Super.cs @@ -74,18 +74,26 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Opera", VolumeName = StringHandlers.CToString(sb.volume_label, Encoding), - ClusterSize = sb.block_size, Clusters = sb.block_count, Bootable = true, + Type = "Opera", + VolumeName = StringHandlers.CToString(sb.volume_label, Encoding), + ClusterSize = sb.block_size, + Clusters = sb.block_count, + Bootable = true, VolumeSerial = $"{sb.volume_id:X8}" }; statfs = new FileSystemInfo { - Blocks = sb.block_count, FilenameLength = MAX_NAME, FreeBlocks = 0, Id = new FileSystemId + Blocks = sb.block_count, + FilenameLength = MAX_NAME, + FreeBlocks = 0, + Id = new FileSystemId { - IsInt = true, Serial32 = sb.volume_id + IsInt = true, + Serial32 = sb.volume_id }, - PluginId = Id, Type = "Opera" + PluginId = Id, + Type = "Opera" }; image = imagePlugin; diff --git a/Aaru.Filesystems/PCFX.cs b/Aaru.Filesystems/PCFX.cs index 73ce1032d..dd6c43f45 100644 --- a/Aaru.Filesystems/PCFX.cs +++ b/Aaru.Filesystems/PCFX.cs @@ -113,11 +113,15 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "PC-FX", Clusters = partition.Length, ClusterSize = 2048, - Bootable = true, - CreationDate = dateTime, CreationDateSpecified = date != null, - PublisherIdentifier = StringHandlers.CToString(header.makerName, Encoding), - VolumeName = StringHandlers.CToString(header.title, Encoding), SystemIdentifier = "PC-FX" + Type = "PC-FX", + Clusters = partition.Length, + ClusterSize = 2048, + Bootable = true, + CreationDate = dateTime, + CreationDateSpecified = date != null, + PublisherIdentifier = StringHandlers.CToString(header.makerName, Encoding), + VolumeName = StringHandlers.CToString(header.title, Encoding), + SystemIdentifier = "PC-FX" }; } diff --git a/Aaru.Filesystems/ProDOS.cs b/Aaru.Filesystems/ProDOS.cs index 49bda6cf5..8a63cc9f3 100644 --- a/Aaru.Filesystems/ProDOS.cs +++ b/Aaru.Filesystems/ProDOS.cs @@ -103,10 +103,9 @@ namespace Aaru.Filesystems foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }.Where(offset => BitConverter.ToUInt16(tmp, offset) == 0 && + }.Where(offset => BitConverter.ToUInt16(tmp, offset) == 0 && (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && - tmp[offset + 0x23] == ENTRY_LENGTH && - tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) + tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) { Array.Copy(tmp, offset, rootDirectoryKeyBlock, 0, 0x200); apmFromHddOnCd = true; @@ -177,10 +176,9 @@ namespace Aaru.Filesystems foreach(int offset in new[] { 0, 0x200, 0x400, 0x600, 0x800, 0xA00 - }.Where(offset => BitConverter.ToUInt16(tmp, offset) == 0 && + }.Where(offset => BitConverter.ToUInt16(tmp, offset) == 0 && (byte)((tmp[offset + 0x04] & STORAGE_TYPE_MASK) >> 4) == ROOT_DIRECTORY_TYPE && - tmp[offset + 0x23] == ENTRY_LENGTH && - tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) + tmp[offset + 0x23] == ENTRY_LENGTH && tmp[offset + 0x24] == ENTRIES_PER_BLOCK)) { Array.Copy(tmp, offset, rootDirectoryKeyBlockBytes, 0, 0x200); apmFromHddOnCd = true; @@ -320,7 +318,8 @@ namespace Aaru.Filesystems VolumeName = rootDirectoryKeyBlock.header.volume_name, Files = rootDirectoryKeyBlock.header.file_count, FilesSpecified = true, - Clusters = rootDirectoryKeyBlock.header.total_blocks, Type = "ProDOS" + Clusters = rootDirectoryKeyBlock.header.total_blocks, + Type = "ProDOS" }; XmlFsType.ClusterSize = (uint)((((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / diff --git a/Aaru.Filesystems/QNX4.cs b/Aaru.Filesystems/QNX4.cs index a43b9908b..771372b87 100644 --- a/Aaru.Filesystems/QNX4.cs +++ b/Aaru.Filesystems/QNX4.cs @@ -186,7 +186,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "QNX4 filesystem", Clusters = partition.Length, ClusterSize = 512, + Type = "QNX4 filesystem", + Clusters = partition.Length, + ClusterSize = 512, CreationDate = DateHandlers.UnixUnsignedToDateTime(qnxSb.rootDir.di_ftime), CreationDateSpecified = true, ModificationDate = DateHandlers.UnixUnsignedToDateTime(qnxSb.rootDir.di_mtime), diff --git a/Aaru.Filesystems/QNX6.cs b/Aaru.Filesystems/QNX6.cs index 00265832d..04e598998 100644 --- a/Aaru.Filesystems/QNX6.cs +++ b/Aaru.Filesystems/QNX6.cs @@ -108,12 +108,15 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "QNX6 (Audi) filesystem", Clusters = audiSb.numBlocks, - ClusterSize = audiSb.blockSize, - Bootable = true, Files = audiSb.numInodes - audiSb.freeInodes, - FilesSpecified = true, - FreeClusters = audiSb.freeBlocks, FreeClustersSpecified = true, - VolumeSerial = $"{audiSb.serial:X16}" + Type = "QNX6 (Audi) filesystem", + Clusters = audiSb.numBlocks, + ClusterSize = audiSb.blockSize, + Bootable = true, + Files = audiSb.numInodes - audiSb.freeInodes, + FilesSpecified = true, + FreeClusters = audiSb.freeBlocks, + FreeClustersSpecified = true, + VolumeSerial = $"{audiSb.serial:X16}" }; //xmlFSType.VolumeName = CurrentEncoding.GetString(audiSb.id); @@ -144,9 +147,11 @@ namespace Aaru.Filesystems { Type = "QNX6 filesystem", Clusters = qnxSb.numBlocks, - ClusterSize = qnxSb.blockSize, Bootable = true, + ClusterSize = qnxSb.blockSize, + Bootable = true, Files = qnxSb.numInodes - qnxSb.freeInodes, - FilesSpecified = true, FreeClusters = qnxSb.freeBlocks, + FilesSpecified = true, + FreeClusters = qnxSb.freeBlocks, FreeClustersSpecified = true, VolumeSerial = $"{qnxSb.serial:X16}", CreationDate = DateHandlers.UnixUnsignedToDateTime(qnxSb.ctime), diff --git a/Aaru.Filesystems/RT11.cs b/Aaru.Filesystems/RT11.cs index d7def2792..67f9a363b 100644 --- a/Aaru.Filesystems/RT11.cs +++ b/Aaru.Filesystems/RT11.cs @@ -110,9 +110,11 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "RT-11", ClusterSize = (uint)(homeblock.cluster * 512), Clusters = homeblock.cluster, - VolumeName = StringHandlers.SpacePaddedToString(homeblock.volname, Encoding), - Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(bootBlock) + Type = "RT-11", + ClusterSize = (uint)(homeblock.cluster * 512), + Clusters = homeblock.cluster, + VolumeName = StringHandlers.SpacePaddedToString(homeblock.volname, Encoding), + Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(bootBlock) }; information = sb.ToString(); diff --git a/Aaru.Filesystems/ReFS.cs b/Aaru.Filesystems/ReFS.cs index 8e04fe240..aee178ce8 100644 --- a/Aaru.Filesystems/ReFS.cs +++ b/Aaru.Filesystems/ReFS.cs @@ -145,8 +145,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Resilient File System", ClusterSize = refsVhdr.bytesPerSector * refsVhdr.sectorsPerCluster, - Clusters = refsVhdr.sectors / refsVhdr.sectorsPerCluster + Type = "Resilient File System", + ClusterSize = refsVhdr.bytesPerSector * refsVhdr.sectorsPerCluster, + Clusters = refsVhdr.sectors / refsVhdr.sectorsPerCluster }; } diff --git a/Aaru.Filesystems/Reiser4.cs b/Aaru.Filesystems/Reiser4.cs index 2122085be..91d9fb3d6 100644 --- a/Aaru.Filesystems/Reiser4.cs +++ b/Aaru.Filesystems/Reiser4.cs @@ -125,9 +125,11 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Reiser 4 filesystem", ClusterSize = reiserSb.blocksize, - Clusters = ((partition.End - partition.Start) * imagePlugin.Info.SectorSize) / reiserSb.blocksize, - VolumeName = StringHandlers.CToString(reiserSb.label, Encoding), VolumeSerial = reiserSb.uuid.ToString() + Type = "Reiser 4 filesystem", + ClusterSize = reiserSb.blocksize, + Clusters = ((partition.End - partition.Start) * imagePlugin.Info.SectorSize) / reiserSb.blocksize, + VolumeName = StringHandlers.CToString(reiserSb.label, Encoding), + VolumeSerial = reiserSb.uuid.ToString() }; } diff --git a/Aaru.Filesystems/SFS.cs b/Aaru.Filesystems/SFS.cs index 37687451a..14ea4bf53 100644 --- a/Aaru.Filesystems/SFS.cs +++ b/Aaru.Filesystems/SFS.cs @@ -115,7 +115,9 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { CreationDate = DateHandlers.UnixUnsignedToDateTime(rootBlock.datecreated).AddYears(8), - CreationDateSpecified = true, Clusters = rootBlock.totalblocks, ClusterSize = rootBlock.blocksize, + CreationDateSpecified = true, + Clusters = rootBlock.totalblocks, + ClusterSize = rootBlock.blocksize, Type = "SmartFileSystem" }; } diff --git a/Aaru.Filesystems/SolarFS.cs b/Aaru.Filesystems/SolarFS.cs index 3fab81167..597c54d5f 100644 --- a/Aaru.Filesystems/SolarFS.cs +++ b/Aaru.Filesystems/SolarFS.cs @@ -75,10 +75,14 @@ namespace Aaru.Filesystems var bpb = new SolarOSParameterBlock { - bps = BitConverter.ToUInt16(bpbSector, 0x0B), root_ent = BitConverter.ToUInt16(bpbSector, 0x10), - sectors = BitConverter.ToUInt16(bpbSector, 0x12), media = bpbSector[0x14], - spfat = BitConverter.ToUInt16(bpbSector, 0x15), sptrk = BitConverter.ToUInt16(bpbSector, 0x17), - heads = BitConverter.ToUInt16(bpbSector, 0x19), signature = bpbSector[0x25] + bps = BitConverter.ToUInt16(bpbSector, 0x0B), + root_ent = BitConverter.ToUInt16(bpbSector, 0x10), + sectors = BitConverter.ToUInt16(bpbSector, 0x12), + media = bpbSector[0x14], + spfat = BitConverter.ToUInt16(bpbSector, 0x15), + sptrk = BitConverter.ToUInt16(bpbSector, 0x17), + heads = BitConverter.ToUInt16(bpbSector, 0x19), + signature = bpbSector[0x25] }; byte[] bpbStrings = new byte[8]; @@ -153,7 +157,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "SolarFS", Clusters = bpb.sectors, ClusterSize = bpb.bps, VolumeName = bpb.vol_name + Type = "SolarFS", + Clusters = bpb.sectors, + ClusterSize = bpb.bps, + VolumeName = bpb.vol_name }; information = sb.ToString(); diff --git a/Aaru.Filesystems/Squash.cs b/Aaru.Filesystems/Squash.cs index 7d7b12d3d..1225d1780 100644 --- a/Aaru.Filesystems/Squash.cs +++ b/Aaru.Filesystems/Squash.cs @@ -137,12 +137,14 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "Squash file system", - CreationDate = DateHandlers.UnixUnsignedToDateTime(sqSb.mkfs_time), + Type = "Squash file system", + CreationDate = DateHandlers.UnixUnsignedToDateTime(sqSb.mkfs_time), CreationDateSpecified = true, - Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / - sqSb.block_size, - ClusterSize = sqSb.block_size, Files = sqSb.inodes, FilesSpecified = true, FreeClusters = 0, + Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / sqSb.block_size, + ClusterSize = sqSb.block_size, + Files = sqSb.inodes, + FilesSpecified = true, + FreeClusters = 0, FreeClustersSpecified = true }; } diff --git a/Aaru.Filesystems/UCSDPascal/File.cs b/Aaru.Filesystems/UCSDPascal/File.cs index 6ba656a0f..0af9bce3c 100644 --- a/Aaru.Filesystems/UCSDPascal/File.cs +++ b/Aaru.Filesystems/UCSDPascal/File.cs @@ -136,7 +136,9 @@ namespace Aaru.Filesystems.UCSDPascal { stat = new FileEntryInfo { - Attributes = FileAttributes.System, BlockSize = device.Info.SectorSize * multiplier, Links = 1 + Attributes = FileAttributes.System, + BlockSize = device.Info.SectorSize * multiplier, + Links = 1 }; if(string.Compare(path, "$", StringComparison.InvariantCulture) == 0) @@ -160,11 +162,11 @@ namespace Aaru.Filesystems.UCSDPascal stat = new FileEntryInfo { - Attributes = FileAttributes.File, Blocks = entry.LastBlock - entry.FirstBlock, - BlockSize = device.Info.SectorSize * multiplier, + Attributes = FileAttributes.File, + Blocks = entry.LastBlock - entry.FirstBlock, + BlockSize = device.Info.SectorSize * multiplier, LastWriteTimeUtc = DateHandlers.UcsdPascalToDateTime(entry.ModificationTime), - Length = ((entry.LastBlock - entry.FirstBlock) * device.Info.SectorSize * multiplier) + - entry.LastBytes, + Length = ((entry.LastBlock - entry.FirstBlock) * device.Info.SectorSize * multiplier) + entry.LastBytes, Links = 1 }; diff --git a/Aaru.Filesystems/UCSDPascal/Info.cs b/Aaru.Filesystems/UCSDPascal/Info.cs index 9c597f88c..3910d8239 100644 --- a/Aaru.Filesystems/UCSDPascal/Info.cs +++ b/Aaru.Filesystems/UCSDPascal/Info.cs @@ -63,7 +63,8 @@ namespace Aaru.Filesystems.UCSDPascal { FirstBlock = BigEndianBitConverter.ToInt16(volBlock, 0x00), LastBlock = BigEndianBitConverter.ToInt16(volBlock, 0x02), - EntryType = (PascalFileKind)BigEndianBitConverter.ToInt16(volBlock, 0x04), VolumeName = new byte[8], + EntryType = (PascalFileKind)BigEndianBitConverter.ToInt16(volBlock, 0x04), + VolumeName = new byte[8], Blocks = BigEndianBitConverter.ToInt16(volBlock, 0x0E), Files = BigEndianBitConverter.ToInt16(volBlock, 0x10), Dummy = BigEndianBitConverter.ToInt16(volBlock, 0x12), @@ -133,7 +134,8 @@ namespace Aaru.Filesystems.UCSDPascal { FirstBlock = BigEndianBitConverter.ToInt16(volBlock, 0x00), LastBlock = BigEndianBitConverter.ToInt16(volBlock, 0x02), - EntryType = (PascalFileKind)BigEndianBitConverter.ToInt16(volBlock, 0x04), VolumeName = new byte[8], + EntryType = (PascalFileKind)BigEndianBitConverter.ToInt16(volBlock, 0x04), + VolumeName = new byte[8], Blocks = BigEndianBitConverter.ToInt16(volBlock, 0x0E), Files = BigEndianBitConverter.ToInt16(volBlock, 0x10), Dummy = BigEndianBitConverter.ToInt16(volBlock, 0x12), @@ -188,9 +190,12 @@ namespace Aaru.Filesystems.UCSDPascal XmlFsType = new FileSystemType { - Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(imagePlugin.ReadSectors(partition.Start, multiplier * 2)), - Clusters = (ulong)volEntry.Blocks, ClusterSize = imagePlugin.Info.SectorSize, - Files = (ulong)volEntry.Files, FilesSpecified = true, Type = "UCSD Pascal", + Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(imagePlugin.ReadSectors(partition.Start, multiplier * 2)), + Clusters = (ulong)volEntry.Blocks, + ClusterSize = imagePlugin.Info.SectorSize, + Files = (ulong)volEntry.Files, + FilesSpecified = true, + Type = "UCSD Pascal", VolumeName = StringHandlers.PascalToString(volEntry.VolumeName, Encoding) }; } diff --git a/Aaru.Filesystems/UCSDPascal/Super.cs b/Aaru.Filesystems/UCSDPascal/Super.cs index 16cbe1041..2dc559307 100644 --- a/Aaru.Filesystems/UCSDPascal/Super.cs +++ b/Aaru.Filesystems/UCSDPascal/Super.cs @@ -103,10 +103,9 @@ namespace Aaru.Filesystems.UCSDPascal { var entry = new PascalFileEntry { - Filename = new byte[16], - FirstBlock = BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x00), - LastBlock = - BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x02), + Filename = new byte[16], + FirstBlock = BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x00), + LastBlock = BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x02), EntryType = (PascalFileKind)BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x04), LastBytes = BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x16), ModificationTime = BigEndianBitConverter.ToInt16(catalogBlocks, offset + 0x18) @@ -125,12 +124,13 @@ namespace Aaru.Filesystems.UCSDPascal XmlFsType = new FileSystemType { - Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(bootBlocks), Clusters = (ulong)mountedVolEntry.Blocks, - ClusterSize = device.Info.SectorSize, Files = (ulong)mountedVolEntry.Files, + Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(bootBlocks), + Clusters = (ulong)mountedVolEntry.Blocks, + ClusterSize = device.Info.SectorSize, + Files = (ulong)mountedVolEntry.Files, FilesSpecified = true, Type = "UCSD Pascal", - VolumeName = - StringHandlers.PascalToString(mountedVolEntry.VolumeName, Encoding) + VolumeName = StringHandlers.PascalToString(mountedVolEntry.VolumeName, Encoding) }; mounted = true; @@ -150,8 +150,12 @@ namespace Aaru.Filesystems.UCSDPascal { stat = new FileSystemInfo { - Blocks = (ulong)mountedVolEntry.Blocks, FilenameLength = 16, Files = (ulong)mountedVolEntry.Files, - FreeBlocks = 0, PluginId = Id, Type = "UCSD Pascal" + Blocks = (ulong)mountedVolEntry.Blocks, + FilenameLength = 16, + Files = (ulong)mountedVolEntry.Files, + FreeBlocks = 0, + PluginId = Id, + Type = "UCSD Pascal" }; stat.FreeBlocks = diff --git a/Aaru.Filesystems/UDF.cs b/Aaru.Filesystems/UDF.cs index 64b5a0eb5..1b78a69ec 100644 --- a/Aaru.Filesystems/UDF.cs +++ b/Aaru.Filesystems/UDF.cs @@ -114,10 +114,8 @@ namespace Aaru.Filesystems AaruConsole.DebugWriteLine("UDF Plugin", "anchor.reserveVolumeDescriptorSequenceExtent.location = {0}", anchor.reserveVolumeDescriptorSequenceExtent.location); - if(anchor.tag.tagIdentifier != - TagIdentifier.AnchorVolumeDescriptorPointer || - anchor.tag.tagLocation != - position || + if(anchor.tag.tagIdentifier != TagIdentifier.AnchorVolumeDescriptorPointer || + anchor.tag.tagLocation != position || anchor.mainVolumeDescriptorSequenceExtent.location + partition.Start >= partition.End) continue; @@ -185,10 +183,8 @@ namespace Aaru.Filesystems sector = imagePlugin.ReadSector(position); anchor = Marshal.ByteArrayToStructureLittleEndian(sector); - if(anchor.tag.tagIdentifier == - TagIdentifier.AnchorVolumeDescriptorPointer && - anchor.tag.tagLocation == - position && + if(anchor.tag.tagIdentifier == TagIdentifier.AnchorVolumeDescriptorPointer && + anchor.tag.tagLocation == position && anchor.mainVolumeDescriptorSequenceExtent.location + partition.Start < partition.End) break; } @@ -296,16 +292,15 @@ namespace Aaru.Filesystems { Type = $"UDF v{Convert.ToInt32($"{(lvidiu.maximumWriteUDF & 0xFF00) >> 8}", 10)}.{Convert.ToInt32($"{lvidiu.maximumWriteUDF & 0xFF}", 10):X2}", - ApplicationIdentifier = - Encoding.GetString(pvd.implementationIdentifier.identifier).TrimEnd('\u0000'), - ClusterSize = lvd.logicalBlockSize, - ModificationDate = EcmaToDateTime(lvid.recordingDateTime), - ModificationDateSpecified = true, Files = lvidiu.files, - FilesSpecified = true, - VolumeName = StringHandlers.DecompressUnicode(lvd.logicalVolumeIdentifier), - VolumeSetIdentifier = StringHandlers.DecompressUnicode(pvd.volumeSetIdentifier), - SystemIdentifier = - Encoding.GetString(pvd.implementationIdentifier.identifier).TrimEnd('\u0000') + ApplicationIdentifier = Encoding.GetString(pvd.implementationIdentifier.identifier).TrimEnd('\u0000'), + ClusterSize = lvd.logicalBlockSize, + ModificationDate = EcmaToDateTime(lvid.recordingDateTime), + ModificationDateSpecified = true, + Files = lvidiu.files, + FilesSpecified = true, + VolumeName = StringHandlers.DecompressUnicode(lvd.logicalVolumeIdentifier), + VolumeSetIdentifier = StringHandlers.DecompressUnicode(pvd.volumeSetIdentifier), + SystemIdentifier = Encoding.GetString(pvd.implementationIdentifier.identifier).TrimEnd('\u0000') }; XmlFsType.Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / @@ -362,12 +357,9 @@ namespace Aaru.Filesystems enum TagIdentifier : ushort { - PrimaryVolumeDescriptor = 1, AnchorVolumeDescriptorPointer = 2, - VolumeDescriptorPointer = 3, - ImplementationUseVolumeDescriptor = 4, PartitionDescriptor = 5, - LogicalVolumeDescriptor = 6, - UnallocatedSpaceDescriptor = 7, TerminatingDescriptor = 8, - LogicalVolumeIntegrityDescriptor = 9 + PrimaryVolumeDescriptor = 1, AnchorVolumeDescriptorPointer = 2, VolumeDescriptorPointer = 3, + ImplementationUseVolumeDescriptor = 4, PartitionDescriptor = 5, LogicalVolumeDescriptor = 6, + UnallocatedSpaceDescriptor = 7, TerminatingDescriptor = 8, LogicalVolumeIntegrityDescriptor = 9 } [StructLayout(LayoutKind.Sequential, Pack = 1)] diff --git a/Aaru.Filesystems/UNICOS.cs b/Aaru.Filesystems/UNICOS.cs index edf9d6efc..2c73c3149 100644 --- a/Aaru.Filesystems/UNICOS.cs +++ b/Aaru.Filesystems/UNICOS.cs @@ -135,9 +135,12 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "UNICOS filesystem", ClusterSize = 4096, Clusters = (ulong)unicosSb.s_fsize, - VolumeName = StringHandlers.CToString(unicosSb.s_fname, Encoding), - ModificationDate = DateHandlers.UnixToDateTime(unicosSb.s_time), ModificationDateSpecified = true + Type = "UNICOS filesystem", + ClusterSize = 4096, + Clusters = (ulong)unicosSb.s_fsize, + VolumeName = StringHandlers.CToString(unicosSb.s_fname, Encoding), + ModificationDate = DateHandlers.UnixToDateTime(unicosSb.s_time), + ModificationDateSpecified = true }; XmlFsType.Dirty |= unicosSb.s_error > 0; diff --git a/Aaru.Filesystems/UNIXBFS.cs b/Aaru.Filesystems/UNIXBFS.cs index 6f9ada2eb..350cab9d4 100644 --- a/Aaru.Filesystems/UNIXBFS.cs +++ b/Aaru.Filesystems/UNIXBFS.cs @@ -72,9 +72,12 @@ namespace Aaru.Filesystems var bfsSb = new BFSSuperBlock { - s_magic = BitConverter.ToUInt32(bfsSbSector, 0x00), s_start = BitConverter.ToUInt32(bfsSbSector, 0x04), - s_end = BitConverter.ToUInt32(bfsSbSector, 0x08), s_from = BitConverter.ToUInt32(bfsSbSector, 0x0C), - s_to = BitConverter.ToUInt32(bfsSbSector, 0x10), s_bfrom = BitConverter.ToInt32(bfsSbSector, 0x14), + s_magic = BitConverter.ToUInt32(bfsSbSector, 0x00), + s_start = BitConverter.ToUInt32(bfsSbSector, 0x04), + s_end = BitConverter.ToUInt32(bfsSbSector, 0x08), + s_from = BitConverter.ToUInt32(bfsSbSector, 0x0C), + s_to = BitConverter.ToUInt32(bfsSbSector, 0x10), + s_bfrom = BitConverter.ToInt32(bfsSbSector, 0x14), s_bto = BitConverter.ToInt32(bfsSbSector, 0x18) }; @@ -103,8 +106,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "BFS", VolumeName = bfsSb.s_volume, ClusterSize = imagePlugin.Info.SectorSize, - Clusters = (partition.End - partition.Start) + 1 + Type = "BFS", + VolumeName = bfsSb.s_volume, + ClusterSize = imagePlugin.Info.SectorSize, + Clusters = (partition.End - partition.Start) + 1 }; information = sb.ToString(); diff --git a/Aaru.Filesystems/VMfs.cs b/Aaru.Filesystems/VMfs.cs index 2fcd6a6a7..91a877b03 100644 --- a/Aaru.Filesystems/VMfs.cs +++ b/Aaru.Filesystems/VMfs.cs @@ -112,7 +112,8 @@ namespace Aaru.Filesystems ModificationDate = DateHandlers.UnixUnsignedToDateTime(mtimeSecs, mtimeNanoSecs), ModificationDateSpecified = true, Clusters = (volInfo.size * 256) / imagePlugin.Info.SectorSize, - ClusterSize = imagePlugin.Info.SectorSize, VolumeSerial = volInfo.uuid.ToString() + ClusterSize = imagePlugin.Info.SectorSize, + VolumeSerial = volInfo.uuid.ToString() }; } diff --git a/Aaru.Filesystems/VxFS.cs b/Aaru.Filesystems/VxFS.cs index 657b0dcea..a055eb6c2 100644 --- a/Aaru.Filesystems/VxFS.cs +++ b/Aaru.Filesystems/VxFS.cs @@ -108,9 +108,11 @@ namespace Aaru.Filesystems CreationDate = DateHandlers.UnixUnsignedToDateTime(vxSb.vs_ctime, vxSb.vs_cutime), CreationDateSpecified = true, ModificationDate = DateHandlers.UnixUnsignedToDateTime(vxSb.vs_wtime, vxSb.vs_wutime), - ModificationDateSpecified = true, Clusters = (ulong)vxSb.vs_size, + ModificationDateSpecified = true, + Clusters = (ulong)vxSb.vs_size, ClusterSize = (uint)vxSb.vs_bsize, - Dirty = vxSb.vs_clean != 0, FreeClusters = (ulong)vxSb.vs_free, + Dirty = vxSb.vs_clean != 0, + FreeClusters = (ulong)vxSb.vs_free, FreeClustersSpecified = true }; } diff --git a/Aaru.Filesystems/XFS.cs b/Aaru.Filesystems/XFS.cs index 5a14d382e..ed7e5321d 100644 --- a/Aaru.Filesystems/XFS.cs +++ b/Aaru.Filesystems/XFS.cs @@ -211,12 +211,16 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "XFS filesystem", ClusterSize = xfsSb.blocksize, - Clusters = xfsSb.dblocks, - FreeClusters = xfsSb.fdblocks, FreeClustersSpecified = true, - Files = xfsSb.icount - xfsSb.ifree, - FilesSpecified = true, Dirty = xfsSb.inprogress > 0, - VolumeName = StringHandlers.CToString(xfsSb.fname, Encoding), VolumeSerial = xfsSb.uuid.ToString() + Type = "XFS filesystem", + ClusterSize = xfsSb.blocksize, + Clusters = xfsSb.dblocks, + FreeClusters = xfsSb.fdblocks, + FreeClustersSpecified = true, + Files = xfsSb.icount - xfsSb.ifree, + FilesSpecified = true, + Dirty = xfsSb.inprogress > 0, + VolumeName = StringHandlers.CToString(xfsSb.fname, Encoding), + VolumeSerial = xfsSb.uuid.ToString() }; } diff --git a/Aaru.Filesystems/Xia.cs b/Aaru.Filesystems/Xia.cs index 9e1071816..6cf1bbb6d 100644 --- a/Aaru.Filesystems/Xia.cs +++ b/Aaru.Filesystems/Xia.cs @@ -119,8 +119,10 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(supblk.s_boot_segment), Clusters = supblk.s_nzones, - ClusterSize = supblk.s_zone_size, Type = "Xia filesystem" + Bootable = !ArrayHelpers.ArrayIsNullOrEmpty(supblk.s_boot_segment), + Clusters = supblk.s_nzones, + ClusterSize = supblk.s_zone_size, + Type = "Xia filesystem" }; information = sb.ToString(); diff --git a/Aaru.Filesystems/dump.cs b/Aaru.Filesystems/dump.cs index efd3866d7..c7808d188 100644 --- a/Aaru.Filesystems/dump.cs +++ b/Aaru.Filesystems/dump.cs @@ -193,7 +193,8 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - ClusterSize = 1024, Clusters = partition.Size / 1024 + ClusterSize = 1024, + Clusters = partition.Size / 1024 }; if(useOld) diff --git a/Aaru.Filesystems/ext2FS.cs b/Aaru.Filesystems/ext2FS.cs index 6e7c93bad..a01422de3 100644 --- a/Aaru.Filesystems/ext2FS.cs +++ b/Aaru.Filesystems/ext2FS.cs @@ -229,11 +229,10 @@ namespace Aaru.Filesystems break; case EXT2_MAGIC: - ext3 |= - (supblk.ftr_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) == EXT3_FEATURE_COMPAT_HAS_JOURNAL || - (supblk.ftr_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) == EXT3_FEATURE_INCOMPAT_RECOVER || - (supblk.ftr_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) == - EXT3_FEATURE_INCOMPAT_JOURNAL_DEV; + ext3 |= (supblk.ftr_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) == EXT3_FEATURE_COMPAT_HAS_JOURNAL || + (supblk.ftr_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) == EXT3_FEATURE_INCOMPAT_RECOVER || + (supblk.ftr_incompat & EXT3_FEATURE_INCOMPAT_JOURNAL_DEV) == + EXT3_FEATURE_INCOMPAT_JOURNAL_DEV; if((supblk.ftr_ro_compat & EXT4_FEATURE_RO_COMPAT_HUGE_FILE) == EXT4_FEATURE_RO_COMPAT_HUGE_FILE || (supblk.ftr_ro_compat & EXT4_FEATURE_RO_COMPAT_GDT_CSUM) == EXT4_FEATURE_RO_COMPAT_GDT_CSUM || diff --git a/Aaru.Filesystems/extFS.cs b/Aaru.Filesystems/extFS.cs index 0463c2fb5..175b4fc39 100644 --- a/Aaru.Filesystems/extFS.cs +++ b/Aaru.Filesystems/extFS.cs @@ -100,13 +100,15 @@ namespace Aaru.Filesystems var extSb = new extFSSuperBlock { - inodes = BitConverter.ToUInt32(sbSector, 0x000), zones = BitConverter.ToUInt32(sbSector, 0x004), + inodes = BitConverter.ToUInt32(sbSector, 0x000), + zones = BitConverter.ToUInt32(sbSector, 0x004), firstfreeblk = BitConverter.ToUInt32(sbSector, 0x008), freecountblk = BitConverter.ToUInt32(sbSector, 0x00C), firstfreeind = BitConverter.ToUInt32(sbSector, 0x010), freecountind = BitConverter.ToUInt32(sbSector, 0x014), firstdatazone = BitConverter.ToUInt32(sbSector, 0x018), - logzonesize = BitConverter.ToUInt32(sbSector, 0x01C), maxsize = BitConverter.ToUInt32(sbSector, 0x020) + logzonesize = BitConverter.ToUInt32(sbSector, 0x01C), + maxsize = BitConverter.ToUInt32(sbSector, 0x020) }; sb.AppendLine("ext filesystem"); @@ -124,8 +126,11 @@ namespace Aaru.Filesystems XmlFsType = new FileSystemType { - Type = "ext", FreeClusters = extSb.freecountblk, FreeClustersSpecified = true, ClusterSize = 1024, - Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / 1024 + Type = "ext", + FreeClusters = extSb.freecountblk, + FreeClustersSpecified = true, + ClusterSize = 1024, + Clusters = (((partition.End - partition.Start) + 1) * imagePlugin.Info.SectorSize) / 1024 }; information = sb.ToString(); diff --git a/Aaru.Gui/ConsoleHandler.cs b/Aaru.Gui/ConsoleHandler.cs index 571326a80..9ac33d231 100644 --- a/Aaru.Gui/ConsoleHandler.cs +++ b/Aaru.Gui/ConsoleHandler.cs @@ -92,7 +92,10 @@ namespace Aaru.Gui Entries.Add(new LogEntry { - Message = string.Format(format, arg), Module = null, Timestamp = DateTime.Now, Type = "Info" + Message = string.Format(format, arg), + Module = null, + Timestamp = DateTime.Now, + Type = "Info" }); } @@ -104,7 +107,10 @@ namespace Aaru.Gui Entries.Add(new LogEntry { - Message = string.Format(format, arg), Module = null, Timestamp = DateTime.Now, Type = "Error" + Message = string.Format(format, arg), + Module = null, + Timestamp = DateTime.Now, + Type = "Error" }); } @@ -116,7 +122,10 @@ namespace Aaru.Gui Entries.Add(new LogEntry { - Message = string.Format(format, arg), Module = null, Timestamp = DateTime.Now, Type = "Verbose" + Message = string.Format(format, arg), + Module = null, + Timestamp = DateTime.Now, + Type = "Verbose" }); } @@ -128,7 +137,10 @@ namespace Aaru.Gui Entries.Add(new LogEntry { - Message = string.Format(format, arg), Module = module, Timestamp = DateTime.Now, Type = "Debug" + Message = string.Format(format, arg), + Module = module, + Timestamp = DateTime.Now, + Type = "Debug" }); } } diff --git a/Aaru.Gui/Models/FileModel.cs b/Aaru.Gui/Models/FileModel.cs index 52d09a761..7ae2c8858 100644 --- a/Aaru.Gui/Models/FileModel.cs +++ b/Aaru.Gui/Models/FileModel.cs @@ -39,20 +39,17 @@ namespace Aaru.Gui.Models { public string Name { get; set; } public string Size => $"{Stat.Length}"; - public string CreationTime => - Stat.CreationTime == default(DateTime) ? "" : $"{Stat.CreationTime:G}"; + public string CreationTime => Stat.CreationTime == default(DateTime) ? "" : $"{Stat.CreationTime:G}"; public string LastAccessTime => Stat.AccessTime == default(DateTime) ? "" : $"{Stat.AccessTime:G}"; - public string ChangedTime => - Stat.StatusChangeTime == default(DateTime) ? "" : $"{Stat.StatusChangeTime:G}"; + public string ChangedTime => Stat.StatusChangeTime == default(DateTime) ? "" : $"{Stat.StatusChangeTime:G}"; public string LastBackupTime => Stat.BackupTime == default(DateTime) ? "" : $"{Stat.BackupTime:G}"; - public string LastWriteTime => - Stat.LastWriteTime == default(DateTime) ? "" : $"{Stat.LastWriteTime:G}"; - public string Attributes => $"{Stat.Attributes}"; - public string Gid => $"{Stat.GID}"; - public string Uid => $"{Stat.UID}"; - public string Inode => $"{Stat.Inode}"; - public string Links => $"{Stat.Links}"; - public string Mode => $"{Stat.Mode}"; - public FileEntryInfo Stat { get; set; } + public string LastWriteTime => Stat.LastWriteTime == default(DateTime) ? "" : $"{Stat.LastWriteTime:G}"; + public string Attributes => $"{Stat.Attributes}"; + public string Gid => $"{Stat.GID}"; + public string Uid => $"{Stat.UID}"; + public string Inode => $"{Stat.Inode}"; + public string Links => $"{Stat.Links}"; + public string Mode => $"{Stat.Mode}"; + public FileEntryInfo Stat { get; set; } } } \ No newline at end of file diff --git a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs index 84ff38026..fcbfbe3e6 100644 --- a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs @@ -79,7 +79,8 @@ namespace Aaru.Gui.ViewModels.Dialogs Assemblies.Add(new AssemblyModel { - Name = name, Version = version + Name = name, + Version = version }); } }); @@ -127,7 +128,9 @@ Logo and art: { StartInfo = { - UseShellExecute = false, CreateNoWindow = true, Arguments = "https://aaru.app" + UseShellExecute = false, + CreateNoWindow = true, + Arguments = "https://aaru.app" } }; diff --git a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs index 563da7534..2f033a492 100644 --- a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs @@ -56,12 +56,14 @@ namespace Aaru.Gui.ViewModels.Dialogs { List encodings = Encoding.GetEncodings().Select(info => new EncodingModel { - Name = info.Name, DisplayName = info.GetEncoding().EncodingName + Name = info.Name, + DisplayName = info.GetEncoding().EncodingName }).ToList(); encodings.AddRange(Claunia.Encoding.Encoding.GetEncodings().Select(info => new EncodingModel { - Name = info.Name, DisplayName = info.DisplayName + Name = info.Name, + DisplayName = info.DisplayName })); foreach(EncodingModel encoding in encodings.OrderBy(t => t.DisplayName)) diff --git a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs index d7d5923bc..d04e2d5a8 100644 --- a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs @@ -63,7 +63,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IFilter filter in GetPluginBase.Instance.Filters.Values) Filters.Add(new PluginModel { - Name = filter.Name, Uuid = filter.Id, + Name = filter.Name, + Uuid = filter.Id, Version = Assembly.GetAssembly(filter.GetType())?.GetName().Version?.ToString(), Author = filter.Author }); @@ -71,7 +72,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IFloppyImage floppyImage in GetPluginBase.Instance.FloppyImages.Values) FloppyImages.Add(new PluginModel { - Name = floppyImage.Name, Uuid = floppyImage.Id, + Name = floppyImage.Name, + Uuid = floppyImage.Id, Version = Assembly.GetAssembly(floppyImage.GetType())?.GetName().Version?.ToString(), Author = floppyImage.Author }); @@ -79,7 +81,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IMediaImage mediaImage in GetPluginBase.Instance.ImagePluginsList.Values) Images.Add(new PluginModel { - Name = mediaImage.Name, Uuid = mediaImage.Id, + Name = mediaImage.Name, + Uuid = mediaImage.Id, Version = Assembly.GetAssembly(mediaImage.GetType())?.GetName().Version?.ToString(), Author = mediaImage.Author }); @@ -87,7 +90,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IPartition partition in GetPluginBase.Instance.PartPluginsList.Values) PartitionSchemes.Add(new PluginModel { - Name = partition.Name, Uuid = partition.Id, + Name = partition.Name, + Uuid = partition.Id, Version = Assembly.GetAssembly(partition.GetType())?.GetName().Version?.ToString(), Author = partition.Author }); @@ -95,7 +99,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IFilesystem filesystem in GetPluginBase.Instance.PluginsList.Values) Filesystems.Add(new PluginModel { - Name = filesystem.Name, Uuid = filesystem.Id, + Name = filesystem.Name, + Uuid = filesystem.Id, Version = Assembly.GetAssembly(filesystem.GetType())?.GetName().Version?.ToString(), Author = filesystem.Author }); @@ -103,7 +108,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IReadOnlyFilesystem readOnlyFilesystem in GetPluginBase.Instance.ReadOnlyFilesystems.Values) ReadOnlyFilesystems.Add(new PluginModel { - Name = readOnlyFilesystem.Name, Uuid = readOnlyFilesystem.Id, + Name = readOnlyFilesystem.Name, + Uuid = readOnlyFilesystem.Id, Version = Assembly.GetAssembly(readOnlyFilesystem.GetType())?.GetName().Version?.ToString(), Author = readOnlyFilesystem.Author }); @@ -111,7 +117,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IWritableFloppyImage writableFloppyImage in GetPluginBase.Instance.WritableFloppyImages.Values) WritableFloppyImages.Add(new PluginModel { - Name = writableFloppyImage.Name, Uuid = writableFloppyImage.Id, + Name = writableFloppyImage.Name, + Uuid = writableFloppyImage.Id, Version = Assembly.GetAssembly(writableFloppyImage.GetType())?.GetName().Version?.ToString(), Author = writableFloppyImage.Author }); @@ -119,7 +126,8 @@ namespace Aaru.Gui.ViewModels.Dialogs foreach(IWritableImage writableImage in GetPluginBase.Instance.WritableImages.Values) WritableImages.Add(new PluginModel { - Name = writableImage.Name, Uuid = writableImage.Id, + Name = writableImage.Name, + Uuid = writableImage.Id, Version = Assembly.GetAssembly(writableImage.GetType())?.GetName().Version?.ToString(), Author = writableImage.Author }); diff --git a/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs index 033379f52..765a28036 100644 --- a/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs @@ -246,11 +246,16 @@ pool with no way of using them to identify you."; if(SaveStatsChecked) Settings.Settings.Current.Stats = new StatsSettings { - ShareStats = ShareStatsChecked, CommandStats = CommandStatsChecked, - DeviceStats = DeviceStatsChecked, FilesystemStats = FilesystemStatsChecked, - FilterStats = FilterStatsChecked, MediaImageStats = MediaImageStatsChecked, - MediaScanStats = MediaScanStatsChecked, PartitionStats = PartitionStatsChecked, - MediaStats = MediaStatsChecked, VerifyStats = VerifyStatsChecked + ShareStats = ShareStatsChecked, + CommandStats = CommandStatsChecked, + DeviceStats = DeviceStatsChecked, + FilesystemStats = FilesystemStatsChecked, + FilterStats = FilterStatsChecked, + MediaImageStats = MediaImageStatsChecked, + MediaScanStats = MediaScanStatsChecked, + PartitionStats = PartitionStatsChecked, + MediaStats = MediaStatsChecked, + VerifyStats = VerifyStatsChecked }; else Settings.Settings.Current.Stats = null; diff --git a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs index e639824ee..5dfeee98c 100644 --- a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs +++ b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs @@ -275,12 +275,9 @@ namespace Aaru.Gui.ViewModels.Dialogs VerifyText = $"You have called the Verify command {count} times"; } - CommandsVisible = AnalyzeVisible || ChecksumVisible || CompareVisible || - ConvertImageVisible || - CreateSidecarVisible || DecodeVisible || DeviceInfoVisible || - DeviceReportVisible || - DumpMediaVisible || EntropyVisible || FormatsCommandVisible || - ImageInfoVisible || + CommandsVisible = AnalyzeVisible || ChecksumVisible || CompareVisible || ConvertImageVisible || + CreateSidecarVisible || DecodeVisible || DeviceInfoVisible || DeviceReportVisible || + DumpMediaVisible || EntropyVisible || FormatsCommandVisible || ImageInfoVisible || MediaInfoVisible || MediaScanVisible || PrintHexVisible || VerifyVisible; } @@ -297,7 +294,8 @@ namespace Aaru.Gui.ViewModels.Dialogs Filters.Add(new NameCountModel { - Name = nvs, Count = count + Name = nvs, + Count = count }); } } @@ -315,7 +313,8 @@ namespace Aaru.Gui.ViewModels.Dialogs Formats.Add(new NameCountModel { - Name = nvs, Count = count + Name = nvs, + Count = count }); } } @@ -333,7 +332,8 @@ namespace Aaru.Gui.ViewModels.Dialogs Partitions.Add(new NameCountModel { - Name = nvs, Count = count + Name = nvs, + Count = count }); } } @@ -351,7 +351,8 @@ namespace Aaru.Gui.ViewModels.Dialogs Filesystems.Add(new NameCountModel { - Name = nvs, Count = count + Name = nvs, + Count = count }); } } @@ -364,7 +365,10 @@ namespace Aaru.Gui.ViewModels.Dialogs ThenBy(n => n.Revision).ThenBy(n => n.Bus)) Devices.Add(new DeviceStatsModel { - Model = ds.Model, Manufacturer = ds.Manufacturer, Revision = ds.Revision, Bus = ds.Bus + Model = ds.Model, + Manufacturer = ds.Manufacturer, + Revision = ds.Revision, + Bus = ds.Bus }); } @@ -383,7 +387,9 @@ namespace Aaru.Gui.ViewModels.Dialogs if(count > 0) Medias.Add(new MediaStatsModel { - Name = media, Count = count, Type = "real" + Name = media, + Count = count, + Type = "real" }); count = ctx.Medias.Where(c => c.Type == media && c.Synchronized && !c.Real).Select(c => c.Count). @@ -396,7 +402,9 @@ namespace Aaru.Gui.ViewModels.Dialogs Medias.Add(new MediaStatsModel { - Name = media, Count = count, Type = "image" + Name = media, + Count = count, + Type = "image" }); } } diff --git a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs index adaccd785..e024664e3 100644 --- a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs @@ -679,9 +679,14 @@ namespace Aaru.Gui.ViewModels.Panels foreach(ExtentType extent in dump.Extents) DumpHardwareList.Add(new DumpHardwareModel { - Manufacturer = dump.Manufacturer, Model = dump.Model, Serial = dump.Serial, - SoftwareName = dump.Software.Name, SoftwareVersion = dump.Software.Version, - OperatingSystem = dump.Software.OperatingSystem, Start = extent.Start, End = extent.End + Manufacturer = dump.Manufacturer, + Model = dump.Model, + Serial = dump.Serial, + SoftwareName = dump.Software.Name, + SoftwareVersion = dump.Software.Version, + OperatingSystem = dump.Software.OperatingSystem, + Start = extent.Start, + End = extent.End }); } } diff --git a/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs b/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs index 42beb9ec9..8b61af956 100644 --- a/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs +++ b/Aaru.Gui/ViewModels/Panels/SubdirectoryViewModel.cs @@ -91,7 +91,9 @@ namespace Aaru.Gui.ViewModels.Panels { model.Subdirectories.Add(new SubdirectoryModel { - Name = dirent, Path = model.Path + "/" + dirent, Plugin = model.Plugin + Name = dirent, + Path = model.Path + "/" + dirent, + Plugin = model.Plugin }); continue; @@ -99,7 +101,8 @@ namespace Aaru.Gui.ViewModels.Panels Entries.Add(new FileModel { - Name = dirent, Stat = stat + Name = dirent, + Stat = stat }); } } diff --git a/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs index 471af42a4..3e7147dd9 100644 --- a/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/CompactDiscInfoViewModel.cs @@ -104,7 +104,8 @@ namespace Aaru.Gui.ViewModels.Tabs foreach(KeyValuePair isrc in isrcs) IsrcList.Add(new IsrcModel { - Track = isrc.Key.ToString(), Isrc = isrc.Value + Track = isrc.Key.ToString(), + Isrc = isrc.Value }); } diff --git a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs index 783a0e406..dfe273b8b 100644 --- a/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/PcmciaInfoViewModel.cs @@ -135,7 +135,8 @@ namespace Aaru.Gui.ViewModels.Tabs cisList.Add(new PcmciaCisModel { - Code = tupleCode, Description = tupleDescription + Code = tupleCode, + Description = tupleDescription }); } else diff --git a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs index da893dab5..fead2253d 100644 --- a/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs +++ b/Aaru.Gui/ViewModels/Tabs/ScsiInfoViewModel.cs @@ -87,7 +87,8 @@ namespace Aaru.Gui.ViewModels.Tabs { ModeSensePages.Add(new ScsiPageModel { - Page = "Header", Description = Modes.PrettifyModeHeader(scsiMode.Value.Header, scsiType) + Page = "Header", + Description = Modes.PrettifyModeHeader(scsiMode.Value.Header, scsiType) }); if(scsiMode.Value.Pages != null) @@ -414,7 +415,8 @@ namespace Aaru.Gui.ViewModels.Tabs ModeSensePages.Add(new ScsiPageModel { - Page = pageNumberText, Description = decodedText + Page = pageNumberText, + Description = decodedText }); } } @@ -619,7 +621,9 @@ namespace Aaru.Gui.ViewModels.Tabs EvpdPages.Add(new ScsiPageModel { - Page = evpdPageTitle, Data = page.Value, Description = evpdDecodedPage + Page = evpdPageTitle, + Data = page.Value, + Description = evpdDecodedPage }); } } @@ -883,7 +887,8 @@ namespace Aaru.Gui.ViewModels.Tabs MmcFeatures.Add(new ScsiPageModel { - Page = featureNumber, Description = featureDescription + Page = featureNumber, + Description = featureDescription }); } else diff --git a/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs b/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs index c001cfcba..de6d0790d 100644 --- a/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/DecodeMediaTagsViewModel.cs @@ -73,7 +73,8 @@ namespace Aaru.Gui.ViewModels.Windows TagsList.Add(new MediaTagModel { - Tag = tag, Data = data + Tag = tag, + Data = data }); } catch diff --git a/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs index ef658dd42..7bba40b8c 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageChecksumViewModel.cs @@ -557,8 +557,9 @@ namespace Aaru.Gui.ViewModels.Windows foreach(ChecksumType chk in trackChecksum.End()) TrackChecksums.Add(new ChecksumModel { - Track = currentTrack.TrackSequence.ToString(), Algorithm = chk.type.ToString(), - Hash = chk.Value + Track = currentTrack.TrackSequence.ToString(), + Algorithm = chk.type.ToString(), + Hash = chk.Value }); }); @@ -588,7 +589,8 @@ namespace Aaru.Gui.ViewModels.Windows foreach(ChecksumType chk in mediaChecksum.End()) MediaChecksums.Add(new ChecksumModel { - Algorithm = chk.type.ToString(), Hash = chk.Value + Algorithm = chk.type.ToString(), + Hash = chk.Value }); }); } @@ -664,7 +666,8 @@ namespace Aaru.Gui.ViewModels.Windows foreach(ChecksumType chk in mediaChecksum.End()) MediaChecksums.Add(new ChecksumModel { - Algorithm = chk.type.ToString(), Hash = chk.Value + Algorithm = chk.type.ToString(), + Hash = chk.Value }); }); } diff --git a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs index c7226c631..475bea7a0 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs @@ -786,13 +786,22 @@ namespace Aaru.Gui.ViewModels.Windows var metadata = new ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion(), Comments = CommentsText, - Creator = CreatorText, DriveFirmwareRevision = DriveFirmwareRevisionText, - DriveManufacturer = DriveManufacturerText, DriveModel = DriveModelText, - DriveSerialNumber = DriveSerialNumberText, LastMediaSequence = (int)LastMediaSequenceValue, - MediaBarcode = MediaBarcodeText, MediaManufacturer = MediaManufacturerText, MediaModel = MediaModelText, - MediaPartNumber = MediaPartNumberText, MediaSequence = (int)MediaSequenceValue, - MediaSerialNumber = MediaSerialNumberText, MediaTitle = MediaTitleText + Application = "Aaru", + ApplicationVersion = Version.GetVersion(), + Comments = CommentsText, + Creator = CreatorText, + DriveFirmwareRevision = DriveFirmwareRevisionText, + DriveManufacturer = DriveManufacturerText, + DriveModel = DriveModelText, + DriveSerialNumber = DriveSerialNumberText, + LastMediaSequence = (int)LastMediaSequenceValue, + MediaBarcode = MediaBarcodeText, + MediaManufacturer = MediaManufacturerText, + MediaModel = MediaModelText, + MediaPartNumber = MediaPartNumberText, + MediaSequence = (int)MediaSequenceValue, + MediaSerialNumber = MediaSerialNumberText, + MediaTitle = MediaTitleText }; if(!cancel) @@ -1708,7 +1717,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgDestination.Filters.Add(new FileDialogFilter { - Name = SelectedPlugin.Plugin.Name, Extensions = SelectedPlugin.Plugin.KnownExtensions.ToList() + Name = SelectedPlugin.Plugin.Name, + Extensions = SelectedPlugin.Plugin.KnownExtensions.ToList() }); string result = await dlgDestination.ShowAsync(_view); @@ -1774,7 +1784,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgMetadata.Filters.Add(new FileDialogFilter { - Name = "CICM XML metadata", Extensions = new List(new[] + Name = "CICM XML metadata", + Extensions = new List(new[] { ".xml" }) @@ -1820,7 +1831,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgMetadata.Filters.Add(new FileDialogFilter { - Name = "CICM XML metadata", Extensions = new List(new[] + Name = "CICM XML metadata", + Extensions = new List(new[] { ".xml" }) diff --git a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs index d6d3cda5f..10733af0e 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageEntropyViewModel.cs @@ -342,7 +342,7 @@ namespace Aaru.Gui.ViewModels.Windows foreach(EntropyResults trackEntropy in _tracksEntropy) TrackEntropy.Add(new TrackEntropyModel { - Track = trackEntropy.Track.ToString(), + Track = trackEntropy.Track.ToString(), Entropy = trackEntropy.Entropy.ToString(CultureInfo.CurrentUICulture), UniqueSectors = $"{trackEntropy.UniqueSectors} ({(double)(trackEntropy.UniqueSectors ?? 0) / (double)trackEntropy.Sectors:P3})" diff --git a/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs index f2245017c..fa120c9eb 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageSidecarViewModel.cs @@ -324,7 +324,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgDestination.Filters.Add(new FileDialogFilter { - Name = "CICM XML metadata", Extensions = new List(new[] + Name = "CICM XML metadata", + Extensions = new List(new[] { "*.xml" }) diff --git a/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs b/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs index e80504cbb..12d00eeb8 100644 --- a/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MainWindowViewModel.cs @@ -267,7 +267,8 @@ namespace Aaru.Gui.ViewModels.Windows if(!dev.IsRemovable) deviceModel.Media.Add(new MediaModel { - NonRemovable = true, Name = "Non-removable device commands not yet implemented" + NonRemovable = true, + Name = "Non-removable device commands not yet implemented" }); else { @@ -277,7 +278,9 @@ namespace Aaru.Gui.ViewModels.Windows if(!scsiInfo.MediaInserted) deviceModel.Media.Add(new MediaModel { - NoMediaInserted = true, Icon = _ejectIcon, Name = "No media inserted" + NoMediaInserted = true, + Icon = _ejectIcon, + Name = "No media inserted" }); else { @@ -510,7 +513,8 @@ namespace Aaru.Gui.ViewModels.Windows // TODO: Extensions var dlgOpenImage = new OpenFileDialog { - Title = "Choose image to open", AllowMultiple = false + Title = "Choose image to open", + AllowMultiple = false }; string[] result = await dlgOpenImage.ShowAsync(_view); @@ -561,14 +565,16 @@ namespace Aaru.Gui.ViewModels.Windows var imageModel = new ImageModel { - Path = result[0], Icon = _assets.Exists(mediaResource) - ? new Bitmap(_assets.Open(mediaResource)) - : imageFormat.Info.XmlMediaType == XmlMediaType.BlockMedia - ? _genericHddIcon - : imageFormat.Info.XmlMediaType == XmlMediaType.OpticalDisc - ? _genericOpticalIcon - : _genericFolderIcon, - FileName = Path.GetFileName(result[0]), Image = imageFormat, + Path = result[0], + Icon = _assets.Exists(mediaResource) + ? new Bitmap(_assets.Open(mediaResource)) + : imageFormat.Info.XmlMediaType == XmlMediaType.BlockMedia + ? _genericHddIcon + : imageFormat.Info.XmlMediaType == XmlMediaType.OpticalDisc + ? _genericOpticalIcon + : _genericFolderIcon, + FileName = Path.GetFileName(result[0]), + Image = imageFormat, ViewModel = new ImageInfoViewModel(result[0], inputFilter, imageFormat, _view), Filter = inputFilter }; @@ -606,7 +612,8 @@ namespace Aaru.Gui.ViewModels.Windows var partitionModel = new PartitionModel { // TODO: Add icons to partition types - Name = $"{partition.Name} ({partition.Type})", Partition = partition, + Name = $"{partition.Name} ({partition.Type})", + Partition = partition, ViewModel = new PartitionViewModel(partition) }; @@ -642,8 +649,9 @@ namespace Aaru.Gui.ViewModels.Windows VolumeName = plugin.XmlFsType.VolumeName is null ? $"{plugin.XmlFsType.Type}" : $"{plugin.XmlFsType.VolumeName} ({plugin.XmlFsType.Type})", - Filesystem = plugin, ReadOnlyFilesystem = fsPlugin, - ViewModel = new FileSystemViewModel(plugin.XmlFsType, information) + Filesystem = plugin, + ReadOnlyFilesystem = fsPlugin, + ViewModel = new FileSystemViewModel(plugin.XmlFsType, information) }; // TODO: Trap expanding item @@ -651,7 +659,9 @@ namespace Aaru.Gui.ViewModels.Windows { filesystemModel.Roots.Add(new SubdirectoryModel { - Name = "/", Path = "", Plugin = fsPlugin + Name = "/", + Path = "", + Plugin = fsPlugin }); Statistics.AddCommand("ls"); @@ -673,8 +683,9 @@ namespace Aaru.Gui.ViewModels.Windows { var wholePart = new CommonTypes.Partition { - Name = "Whole device", Length = imageFormat.Info.Sectors, - Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize + Name = "Whole device", + Length = imageFormat.Info.Sectors, + Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize }; Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); @@ -705,8 +716,9 @@ namespace Aaru.Gui.ViewModels.Windows { VolumeName = plugin.XmlFsType.VolumeName is null ? $"{plugin.XmlFsType.Type}" : $"{plugin.XmlFsType.VolumeName} ({plugin.XmlFsType.Type})", - Filesystem = plugin, ReadOnlyFilesystem = fsPlugin, - ViewModel = new FileSystemViewModel(plugin.XmlFsType, information) + Filesystem = plugin, + ReadOnlyFilesystem = fsPlugin, + ViewModel = new FileSystemViewModel(plugin.XmlFsType, information) }; // TODO: Trap expanding item @@ -714,7 +726,9 @@ namespace Aaru.Gui.ViewModels.Windows { filesystemModel.Roots.Add(new SubdirectoryModel { - Name = "/", Path = "", Plugin = fsPlugin + Name = "/", + Path = "", + Plugin = fsPlugin }); Statistics.AddCommand("ls"); @@ -778,7 +792,8 @@ namespace Aaru.Gui.ViewModels.Windows var deviceModel = new DeviceModel { - Icon = _genericHddIcon, Name = $"{device.Vendor} {device.Model} ({device.Bus})", + Icon = _genericHddIcon, + Name = $"{device.Vendor} {device.Model} ({device.Bus})", Path = device.Path }; diff --git a/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs b/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs index 151ace8b9..46aded9c8 100644 --- a/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/MediaDumpViewModel.cs @@ -169,12 +169,14 @@ namespace Aaru.Gui.ViewModels.Windows Encodings.AddRange(Encoding.GetEncodings().Select(info => new EncodingModel { - Name = info.Name, DisplayName = info.GetEncoding().EncodingName + Name = info.Name, + DisplayName = info.GetEncoding().EncodingName })); Encodings.AddRange(Claunia.Encoding.Encoding.GetEncodings().Select(info => new EncodingModel { - Name = info.Name, DisplayName = info.DisplayName + Name = info.Name, + DisplayName = info.DisplayName })); switch(mediaType) @@ -481,7 +483,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgMetadata.Filters.Add(new FileDialogFilter { - Name = "CICM XML metadata", Extensions = new List(new[] + Name = "CICM XML metadata", + Extensions = new List(new[] { ".xml" }) @@ -638,7 +641,8 @@ namespace Aaru.Gui.ViewModels.Windows dlgDestination.Filters.Add(new FileDialogFilter { - Name = SelectedPlugin.Plugin.Name, Extensions = SelectedPlugin.Plugin.KnownExtensions.ToList() + Name = SelectedPlugin.Plugin.Name, + Extensions = SelectedPlugin.Plugin.KnownExtensions.ToList() }); string result = await dlgDestination.ShowAsync(_view); diff --git a/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs b/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs index 65db86277..133143330 100644 --- a/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/SplashWindowViewModel.cs @@ -149,7 +149,10 @@ namespace Aaru.Gui.ViewModels.Windows // Remove duplicates foreach(var duplicate in ctx.SeenDevices.AsEnumerable().GroupBy(a => new { - a.Manufacturer, a.Model, a.Revision, a.Bus + a.Manufacturer, + a.Model, + a.Revision, + a.Bus }).Where(a => a.Count() > 1).Distinct().Select(a => a.Key)) ctx.RemoveRange(ctx.SeenDevices. Where(d => d.Manufacturer == duplicate.Manufacturer && diff --git a/Aaru.Images/AaruFormat/AaruFormat.cs b/Aaru.Images/AaruFormat/AaruFormat.cs index 9f4c9deef..ef1ff28dd 100644 --- a/Aaru.Images/AaruFormat/AaruFormat.cs +++ b/Aaru.Images/AaruFormat/AaruFormat.cs @@ -166,12 +166,26 @@ namespace Aaru.DiscImages public AaruFormat() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, Application = "Aaru", - ApplicationVersion = null, Creator = null, Comments = null, MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = "Aaru", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/AaruFormat/Read.cs b/Aaru.Images/AaruFormat/Read.cs index 0ee1c52f5..f4ec3f21c 100644 --- a/Aaru.Images/AaruFormat/Read.cs +++ b/Aaru.Images/AaruFormat/Read.cs @@ -736,10 +736,14 @@ namespace Aaru.DiscImages Tracks.Add(new Track { - TrackSequence = trackEntry.sequence, TrackType = trackEntry.type, - TrackStartSector = (ulong)trackEntry.start, TrackEndSector = (ulong)trackEntry.end, - TrackPregap = (ulong)trackEntry.pregap, TrackSession = trackEntry.session, - TrackFile = imageFilter.GetFilename(), TrackFileType = "BINARY", + TrackSequence = trackEntry.sequence, + TrackType = trackEntry.type, + TrackStartSector = (ulong)trackEntry.start, + TrackEndSector = (ulong)trackEntry.end, + TrackPregap = (ulong)trackEntry.pregap, + TrackSession = trackEntry.session, + TrackFile = imageFilter.GetFilename(), + TrackFileType = "BINARY", TrackFilter = imageFilter }); @@ -848,7 +852,8 @@ namespace Aaru.DiscImages var dump = new DumpHardwareType { - Software = new SoftwareType(), Extents = new ExtentType[dumpEntry.extents] + Software = new SoftwareType(), + Extents = new ExtentType[dumpEntry.extents] }; byte[] tmp; @@ -925,7 +930,8 @@ namespace Aaru.DiscImages dump.Extents[j] = new ExtentType { - Start = BitConverter.ToUInt64(tmp, 0), End = BitConverter.ToUInt64(tmp, 8) + Start = BitConverter.ToUInt64(tmp, 0), + End = BitConverter.ToUInt64(tmp, 8) }; } @@ -968,7 +974,8 @@ namespace Aaru.DiscImages foreach(TapePartitionEntry tapePartition in tapePartitions) TapePartitions.Add(new TapePartition { - FirstBlock = tapePartition.FirstBlock, LastBlock = tapePartition.LastBlock, + FirstBlock = tapePartition.FirstBlock, + LastBlock = tapePartition.LastBlock, Number = tapePartition.Number }); @@ -996,7 +1003,9 @@ namespace Aaru.DiscImages foreach(TapeFileEntry file in tapeFiles) Files.Add(new TapeFile { - FirstBlock = file.FirstBlock, LastBlock = file.LastBlock, Partition = file.Partition, + FirstBlock = file.FirstBlock, + LastBlock = file.LastBlock, + Partition = file.Partition, File = file.File }); @@ -1106,10 +1115,15 @@ namespace Aaru.DiscImages { new Track { - TrackBytesPerSector = (int)imageInfo.SectorSize, TrackEndSector = imageInfo.Sectors - 1, - TrackFile = imageFilter.GetFilename(), TrackFileType = "BINARY", TrackFilter = imageFilter, - TrackRawBytesPerSector = (int)imageInfo.SectorSize, TrackSession = 1, TrackSequence = 1, - TrackType = TrackType.Data + TrackBytesPerSector = (int)imageInfo.SectorSize, + TrackEndSector = imageInfo.Sectors - 1, + TrackFile = imageFilter.GetFilename(), + TrackFileType = "BINARY", + TrackFilter = imageFilter, + TrackRawBytesPerSector = (int)imageInfo.SectorSize, + TrackSession = 1, + TrackSequence = 1, + TrackType = TrackType.Data } }; @@ -1168,12 +1182,15 @@ namespace Aaru.DiscImages { Partitions.Add(new Partition { - Sequence = track.TrackSequence, Type = track.TrackType.ToString(), - Name = $"Track {track.TrackSequence}", Offset = currentTrackOffset, + Sequence = track.TrackSequence, + Type = track.TrackType.ToString(), + Name = $"Track {track.TrackSequence}", + Offset = currentTrackOffset, Start = (ulong)track.Indexes[1], Size = ((track.TrackEndSector - (ulong)track.Indexes[1]) + 1) * (ulong)track.TrackBytesPerSector, - Length = (track.TrackEndSector - (ulong)track.Indexes[1]) + 1, Scheme = "Optical disc track" + Length = (track.TrackEndSector - (ulong)track.Indexes[1]) + 1, + Scheme = "Optical disc track" }); currentTrackOffset += ((track.TrackEndSector - track.TrackStartSector) + 1) * diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index 844a94ac9..e0bdecd93 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -214,7 +214,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors, + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors, XmlMediaType = GetXmlMediaType(mediaType) }; @@ -263,7 +265,9 @@ namespace Aaru.DiscImages { header = new AaruHeader { - identifier = AARU_MAGIC, mediaType = mediaType, creationTime = DateTime.UtcNow.ToFileTimeUtc() + identifier = AARU_MAGIC, + mediaType = mediaType, + creationTime = DateTime.UtcNow.ToFileTimeUtc() }; imageStream.Write(new byte[Marshal.SizeOf()], 0, Marshal.SizeOf()); @@ -659,7 +663,8 @@ namespace Aaru.DiscImages var dump = new DumpHardwareType { - Software = new SoftwareType(), Extents = new ExtentType[dumpEntry.extents] + Software = new SoftwareType(), + Extents = new ExtentType[dumpEntry.extents] }; byte[] tmp; @@ -736,7 +741,8 @@ namespace Aaru.DiscImages dump.Extents[j] = new ExtentType { - Start = BitConverter.ToUInt64(tmp, 0), End = BitConverter.ToUInt64(tmp, 8) + Start = BitConverter.ToUInt64(tmp, 0), + End = BitConverter.ToUInt64(tmp, 8) }; } @@ -776,7 +782,8 @@ namespace Aaru.DiscImages foreach(TapePartitionEntry tapePartition in tapePartitions) TapePartitions.Add(new TapePartition { - FirstBlock = tapePartition.FirstBlock, LastBlock = tapePartition.LastBlock, + FirstBlock = tapePartition.FirstBlock, + LastBlock = tapePartition.LastBlock, Number = tapePartition.Number }); @@ -806,8 +813,10 @@ namespace Aaru.DiscImages foreach(TapeFileEntry file in tapeFiles) Files.Add(new TapeFile { - FirstBlock = file.FirstBlock, LastBlock = file.LastBlock, - Partition = file.Partition, File = file.File + FirstBlock = file.FirstBlock, + LastBlock = file.LastBlock, + Partition = file.Partition, + File = file.File }); IsTape = true; @@ -857,16 +866,21 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.DeDuplicationTable, dataType = DataType.UserData, + blockType = BlockType.DeDuplicationTable, + dataType = DataType.UserData, offset = (ulong)outMemoryDdtPosition }); // CRC64 will be calculated later var ddtHeader = new DdtHeader { - identifier = BlockType.DeDuplicationTable, type = DataType.UserData, - compression = CompressionType.None, shift = shift, entries = sectors, - cmpLength = sectors * sizeof(ulong), length = sectors * sizeof(ulong) + identifier = BlockType.DeDuplicationTable, + type = DataType.UserData, + compression = CompressionType.None, + shift = shift, + entries = sectors, + cmpLength = sectors * sizeof(ulong), + length = sectors * sizeof(ulong) }; structureBytes = new byte[Marshal.SizeOf()]; @@ -906,12 +920,24 @@ namespace Aaru.DiscImages flakeWriterSettings = new EncoderSettings { - PCM = AudioPCMConfig.RedBook, DoMD5 = false, BlockSize = (1 << shift) * SAMPLES_PER_SECTOR, - MinFixedOrder = 0, MaxFixedOrder = 4, MinLPCOrder = 1, MaxLPCOrder = 32, - MaxPartitionOrder = 8, StereoMethod = StereoMethod.Evaluate, PredictionType = PredictionType.Search, - WindowMethod = WindowMethod.EvaluateN, EstimationDepth = 5, MinPrecisionSearch = 1, - MaxPrecisionSearch = 1, TukeyParts = 0, TukeyOverlap = 1.0, TukeyP = 1.0, - AllowNonSubset = true + PCM = AudioPCMConfig.RedBook, + DoMD5 = false, + BlockSize = (1 << shift) * SAMPLES_PER_SECTOR, + MinFixedOrder = 0, + MaxFixedOrder = 4, + MinLPCOrder = 1, + MaxLPCOrder = 32, + MaxPartitionOrder = 8, + StereoMethod = StereoMethod.Evaluate, + PredictionType = PredictionType.Search, + WindowMethod = WindowMethod.EvaluateN, + EstimationDepth = 5, + MinPrecisionSearch = 1, + MaxPrecisionSearch = 1, + TukeyParts = 0, + TukeyOverlap = 1.0, + TukeyP = 1.0, + AllowNonSubset = true }; // Check if FLAKE's block size is bigger than what we want @@ -1091,7 +1117,9 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.UserData, offset = (ulong)imageStream.Position + blockType = BlockType.DataBlock, + dataType = DataType.UserData, + offset = (ulong)imageStream.Position }); structureBytes = new byte[Marshal.SizeOf()]; @@ -1114,8 +1142,10 @@ namespace Aaru.DiscImages { currentBlockHeader = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.UserData, - compression = compress ? CompressionType.Lzma : CompressionType.None, sectorSize = (uint)data.Length + identifier = BlockType.DataBlock, + type = DataType.UserData, + compression = compress ? CompressionType.Lzma : CompressionType.None, + sectorSize = (uint)data.Length }; if(imageInfo.XmlMediaType == XmlMediaType.OpticalDisc && @@ -1828,7 +1858,9 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.UserData, offset = (ulong)imageStream.Position + blockType = BlockType.DataBlock, + dataType = DataType.UserData, + offset = (ulong)imageStream.Position }); structureBytes = new byte[Marshal.SizeOf()]; @@ -1865,7 +1897,9 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = dataType, offset = (ulong)imageStream.Position + blockType = BlockType.DataBlock, + dataType = dataType, + offset = (ulong)imageStream.Position }; AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing tag type {0} to position {1}", mediaTag.Key, @@ -1875,7 +1909,9 @@ namespace Aaru.DiscImages var tagBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = dataType, length = (uint)mediaTag.Value.Length, + identifier = BlockType.DataBlock, + type = dataType, + length = (uint)mediaTag.Value.Length, crc64 = BitConverter.ToUInt64(tagCrc, 0) }; @@ -1928,7 +1964,8 @@ namespace Aaru.DiscImages { idxEntry = new IndexEntry { - blockType = BlockType.GeometryBlock, dataType = DataType.NoData, + blockType = BlockType.GeometryBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }; @@ -2061,7 +2098,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DumpHardwareBlock, dataType = DataType.NoData, + blockType = BlockType.DumpHardwareBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }; @@ -2072,8 +2110,10 @@ namespace Aaru.DiscImages var dumpBlock = new DumpHardwareHeader { - identifier = BlockType.DumpHardwareBlock, entries = (ushort)DumpHardware.Count, - crc64 = BitConverter.ToUInt64(dumpCrc, 0), length = (uint)dumpMs.Length + identifier = BlockType.DumpHardwareBlock, + entries = (ushort)DumpHardware.Count, + crc64 = BitConverter.ToUInt64(dumpCrc, 0), + length = (uint)dumpMs.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2095,7 +2135,9 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.CicmBlock, dataType = DataType.NoData, offset = (ulong)imageStream.Position + blockType = BlockType.CicmBlock, + dataType = DataType.NoData, + offset = (ulong)imageStream.Position }; AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CICM XML block to position {0}", @@ -2103,7 +2145,8 @@ namespace Aaru.DiscImages var cicmBlock = new CicmMetadataBlock { - identifier = BlockType.CicmBlock, length = (uint)cicmMs.Length + identifier = BlockType.CicmBlock, + length = (uint)cicmMs.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2135,7 +2178,8 @@ namespace Aaru.DiscImages var md5Entry = new ChecksumEntry { - type = ChecksumAlgorithm.Md5, length = (uint)md5.Length + type = ChecksumAlgorithm.Md5, + length = (uint)md5.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2151,7 +2195,8 @@ namespace Aaru.DiscImages var sha1Entry = new ChecksumEntry { - type = ChecksumAlgorithm.Sha1, length = (uint)sha1.Length + type = ChecksumAlgorithm.Sha1, + length = (uint)sha1.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2167,7 +2212,8 @@ namespace Aaru.DiscImages var sha256Entry = new ChecksumEntry { - type = ChecksumAlgorithm.Sha256, length = (uint)sha256.Length + type = ChecksumAlgorithm.Sha256, + length = (uint)sha256.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2183,7 +2229,8 @@ namespace Aaru.DiscImages var spamsumEntry = new ChecksumEntry { - type = ChecksumAlgorithm.SpamSum, length = (uint)spamsum.Length + type = ChecksumAlgorithm.SpamSum, + length = (uint)spamsum.Length }; structureBytes = new byte[Marshal.SizeOf()]; @@ -2199,7 +2246,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.ChecksumBlock, dataType = DataType.NoData, + blockType = BlockType.ChecksumBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }; @@ -2231,7 +2279,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.TapePartitionBlock, dataType = DataType.UserData, + blockType = BlockType.TapePartitionBlock, + dataType = DataType.UserData, offset = (ulong)imageStream.Position }; @@ -2271,7 +2320,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.TapeFileBlock, dataType = DataType.UserData, + blockType = BlockType.TapeFileBlock, + dataType = DataType.UserData, offset = (ulong)imageStream.Position }; @@ -2282,14 +2332,17 @@ namespace Aaru.DiscImages for(int t = 0; t < Files.Count; t++) tapeFileEntries[t] = new TapeFileEntry { - File = Files[t].File, FirstBlock = Files[t].FirstBlock, LastBlock = Files[t].LastBlock + File = Files[t].File, + FirstBlock = Files[t].FirstBlock, + LastBlock = Files[t].LastBlock }; byte[] tapeFileEntriesData = MemoryMarshal.Cast(tapeFileEntries).ToArray(); var tapeFileHeader = new TapeFileHeader { - identifier = BlockType.TapeFileBlock, entries = (uint)tapeFileEntries.Length, + identifier = BlockType.TapeFileBlock, + entries = (uint)tapeFileEntries.Length, length = (ulong)tapeFileEntriesData.Length }; @@ -2312,7 +2365,8 @@ namespace Aaru.DiscImages { idxEntry = new IndexEntry { - blockType = BlockType.DeDuplicationTable, dataType = DataType.UserData, + blockType = BlockType.DeDuplicationTable, + dataType = DataType.UserData, offset = (ulong)imageStream.Position }; @@ -2321,8 +2375,11 @@ namespace Aaru.DiscImages var ddtHeader = new DdtHeader { - identifier = BlockType.DeDuplicationTable, type = DataType.UserData, - compression = CompressionType.Lzma, shift = shift, entries = (ulong)userDataDdt.LongLength, + identifier = BlockType.DeDuplicationTable, + type = DataType.UserData, + compression = CompressionType.Lzma, + shift = shift, + entries = (ulong)userDataDdt.LongLength, length = (ulong)(userDataDdt.LongLength * sizeof(ulong)) }; @@ -2371,7 +2428,8 @@ namespace Aaru.DiscImages { idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CdSectorPrefix, + blockType = BlockType.DataBlock, + dataType = DataType.CdSectorPrefix, offset = (ulong)imageStream.Position }; @@ -2382,8 +2440,10 @@ namespace Aaru.DiscImages var prefixBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CdSectorPrefix, - length = (uint)sectorPrefix.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CdSectorPrefix, + length = (uint)sectorPrefix.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 16 }; @@ -2436,7 +2496,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CdSectorSuffix, + blockType = BlockType.DataBlock, + dataType = DataType.CdSectorSuffix, offset = (ulong)imageStream.Position }; @@ -2447,8 +2508,10 @@ namespace Aaru.DiscImages prefixBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CdSectorSuffix, - length = (uint)sectorSuffix.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CdSectorSuffix, + length = (uint)sectorSuffix.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 288 }; @@ -2556,7 +2619,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DeDuplicationTable, dataType = DataType.CdSectorPrefixCorrected, + blockType = BlockType.DeDuplicationTable, + dataType = DataType.CdSectorPrefixCorrected, offset = (ulong)imageStream.Position }; @@ -2566,8 +2630,10 @@ namespace Aaru.DiscImages var ddtHeader = new DdtHeader { - identifier = BlockType.DeDuplicationTable, type = DataType.CdSectorPrefixCorrected, - compression = CompressionType.Lzma, entries = (ulong)sectorPrefixDdt.LongLength, + identifier = BlockType.DeDuplicationTable, + type = DataType.CdSectorPrefixCorrected, + compression = CompressionType.Lzma, + entries = (ulong)sectorPrefixDdt.LongLength, length = (ulong)(sectorPrefixDdt.LongLength * sizeof(uint)) }; @@ -2605,7 +2671,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DeDuplicationTable, dataType = DataType.CdSectorSuffixCorrected, + blockType = BlockType.DeDuplicationTable, + dataType = DataType.CdSectorSuffixCorrected, offset = (ulong)imageStream.Position }; @@ -2615,8 +2682,10 @@ namespace Aaru.DiscImages ddtHeader = new DdtHeader { - identifier = BlockType.DeDuplicationTable, type = DataType.CdSectorSuffixCorrected, - compression = CompressionType.Lzma, entries = (ulong)sectorSuffixDdt.LongLength, + identifier = BlockType.DeDuplicationTable, + type = DataType.CdSectorSuffixCorrected, + compression = CompressionType.Lzma, + entries = (ulong)sectorSuffixDdt.LongLength, length = (ulong)(sectorSuffixDdt.LongLength * sizeof(uint)) }; @@ -2653,7 +2722,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CdSectorPrefixCorrected, + blockType = BlockType.DataBlock, + dataType = DataType.CdSectorPrefixCorrected, offset = (ulong)imageStream.Position }; @@ -2665,8 +2735,10 @@ namespace Aaru.DiscImages var prefixBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CdSectorPrefixCorrected, - length = (uint)sectorPrefixMs.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CdSectorPrefixCorrected, + length = (uint)sectorPrefixMs.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 16 }; @@ -2720,7 +2792,8 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CdSectorSuffixCorrected, + blockType = BlockType.DataBlock, + dataType = DataType.CdSectorSuffixCorrected, offset = (ulong)imageStream.Position }; @@ -2732,8 +2805,10 @@ namespace Aaru.DiscImages var suffixBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CdSectorSuffixCorrected, - length = (uint)sectorSuffixMs.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CdSectorSuffixCorrected, + length = (uint)sectorSuffixMs.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 288 }; @@ -2790,7 +2865,8 @@ namespace Aaru.DiscImages { idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CompactDiscMode2Subheader, + blockType = BlockType.DataBlock, + dataType = DataType.CompactDiscMode2Subheader, offset = (ulong)imageStream.Position }; @@ -2802,8 +2878,10 @@ namespace Aaru.DiscImages var subheaderBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CompactDiscMode2Subheader, - length = (uint)mode2Subheaders.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CompactDiscMode2Subheader, + length = (uint)mode2Subheaders.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 8 }; @@ -2861,7 +2939,8 @@ namespace Aaru.DiscImages { idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = DataType.CdSectorSubchannel, + blockType = BlockType.DataBlock, + dataType = DataType.CdSectorSubchannel, offset = (ulong)imageStream.Position }; @@ -2872,8 +2951,10 @@ namespace Aaru.DiscImages var subchannelBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = DataType.CdSectorSubchannel, - length = (uint)sectorSubchannel.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0), + identifier = BlockType.DataBlock, + type = DataType.CdSectorSubchannel, + length = (uint)sectorSubchannel.Length, + crc64 = BitConverter.ToUInt64(blockCrc, 0), sectorSize = 96 }; @@ -2942,9 +3023,13 @@ namespace Aaru.DiscImages trackEntries.Add(new TrackEntry { - sequence = (byte)track.TrackSequence, type = track.TrackType, - start = (long)track.TrackStartSector, end = (long)track.TrackEndSector, - pregap = (long)track.TrackPregap, session = (byte)track.TrackSession, isrc = isrc, + sequence = (byte)track.TrackSequence, + type = track.TrackType, + start = (long)track.TrackStartSector, + end = (long)track.TrackEndSector, + pregap = (long)track.TrackPregap, + session = (byte)track.TrackSession, + isrc = isrc, flags = flags }); @@ -2960,7 +3045,9 @@ namespace Aaru.DiscImages compactDiscIndexEntries.AddRange(track.Indexes.Select(trackIndex => new CompactDiscIndexEntry { - Index = trackIndex.Key, Lba = trackIndex.Value, Track = (ushort)track.TrackSequence + Index = trackIndex.Key, + Lba = trackIndex.Value, + Track = (ushort)track.TrackSequence })); } @@ -2988,7 +3075,8 @@ namespace Aaru.DiscImages var trkHeader = new TracksHeader { - identifier = BlockType.TracksBlock, entries = (ushort)trackEntries.Count, + identifier = BlockType.TracksBlock, + entries = (ushort)trackEntries.Count, crc64 = BitConverter.ToUInt64(trksCrc, 0) }; @@ -2999,7 +3087,8 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.TracksBlock, dataType = DataType.NoData, + blockType = BlockType.TracksBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }); @@ -3038,7 +3127,8 @@ namespace Aaru.DiscImages var cdixHeader = new CompactDiscIndexesHeader { identifier = BlockType.CompactDiscIndexesBlock, - entries = (ushort)compactDiscIndexEntries.Count, crc64 = BitConverter.ToUInt64(cdixCrc, 0) + entries = (ushort)compactDiscIndexEntries.Count, + crc64 = BitConverter.ToUInt64(cdixCrc, 0) }; AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing compact disc indexes to position {0}", @@ -3049,7 +3139,8 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.CompactDiscIndexesBlock, dataType = DataType.NoData, + blockType = BlockType.CompactDiscIndexesBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }); @@ -3092,7 +3183,9 @@ namespace Aaru.DiscImages idxEntry = new IndexEntry { - blockType = BlockType.DataBlock, dataType = tagType, offset = (ulong)imageStream.Position + blockType = BlockType.DataBlock, + dataType = tagType, + offset = (ulong)imageStream.Position }; AaruConsole.DebugWriteLine("Aaru Format plugin", @@ -3102,7 +3195,9 @@ namespace Aaru.DiscImages var subchannelBlock = new BlockHeader { - identifier = BlockType.DataBlock, type = tagType, length = (uint)sectorSubchannel.Length, + identifier = BlockType.DataBlock, + type = tagType, + length = (uint)sectorSubchannel.Length, crc64 = BitConverter.ToUInt64(blockCrc, 0) }; @@ -3368,7 +3463,8 @@ namespace Aaru.DiscImages index.Add(new IndexEntry { - blockType = BlockType.MetadataBlock, dataType = DataType.NoData, + blockType = BlockType.MetadataBlock, + dataType = DataType.NoData, offset = (ulong)imageStream.Position }); @@ -3400,7 +3496,8 @@ namespace Aaru.DiscImages var idxHeader = new IndexHeader2 { - identifier = BlockType.Index2, entries = (ulong)index.Count, + identifier = BlockType.Index2, + entries = (ulong)index.Count, crc64 = BitConverter.ToUInt64(idxCrc, 0) }; @@ -3413,7 +3510,8 @@ namespace Aaru.DiscImages { var idxHeader = new IndexHeader { - identifier = BlockType.Index, entries = (ushort)index.Count, + identifier = BlockType.Index, + entries = (ushort)index.Count, crc64 = BitConverter.ToUInt64(idxCrc, 0) }; @@ -3486,7 +3584,9 @@ namespace Aaru.DiscImages geometryBlock = new GeometryBlock { - identifier = BlockType.GeometryBlock, cylinders = cylinders, heads = heads, + identifier = BlockType.GeometryBlock, + cylinders = cylinders, + heads = heads, sectorsPerTrack = sectorsPerTrack }; diff --git a/Aaru.Images/Alcohol120/Alcohol120.cs b/Aaru.Images/Alcohol120/Alcohol120.cs index 5cba02ed0..e79c51204 100644 --- a/Aaru.Images/Alcohol120/Alcohol120.cs +++ b/Aaru.Images/Alcohol120/Alcohol120.cs @@ -61,12 +61,26 @@ namespace Aaru.DiscImages public Alcohol120() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, Application = null, - ApplicationVersion = null, Creator = null, Comments = null, MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Alcohol120/Constants.cs b/Aaru.Images/Alcohol120/Constants.cs index 6dbc47387..9af1942ec 100644 --- a/Aaru.Images/Alcohol120/Constants.cs +++ b/Aaru.Images/Alcohol120/Constants.cs @@ -34,11 +34,10 @@ namespace Aaru.DiscImages { public partial class Alcohol120 { + const byte _maximumSupportedVersion = 1; readonly byte[] alcoholSignature = { 0x4d, 0x45, 0x44, 0x49, 0x41, 0x20, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x4f, 0x52 }; - - const byte _maximumSupportedVersion = 1; } } \ No newline at end of file diff --git a/Aaru.Images/Alcohol120/Properties.cs b/Aaru.Images/Alcohol120/Properties.cs index 8812ae823..cd9c53718 100644 --- a/Aaru.Images/Alcohol120/Properties.cs +++ b/Aaru.Images/Alcohol120/Properties.cs @@ -79,13 +79,18 @@ namespace Aaru.DiscImages var aaruTrack = new Track { - TrackStartSector = alcTrack.startLba, - TrackEndSector = (alcTrack.startLba + alcExtra.sectors) - 1, TrackPregap = alcExtra.pregap, - TrackSession = sessionNo, TrackSequence = alcTrack.point, - TrackType = AlcoholTrackTypeToTrackType(alcTrack.mode), TrackFilter = alcImage, - TrackFile = alcImage.GetFilename(), TrackFileOffset = alcTrack.startOffset, - TrackFileType = "BINARY", TrackRawBytesPerSector = alcTrack.sectorSize, - TrackBytesPerSector = AlcoholTrackModeToCookedBytesPerSector(alcTrack.mode) + TrackStartSector = alcTrack.startLba, + TrackEndSector = (alcTrack.startLba + alcExtra.sectors) - 1, + TrackPregap = alcExtra.pregap, + TrackSession = sessionNo, + TrackSequence = alcTrack.point, + TrackType = AlcoholTrackTypeToTrackType(alcTrack.mode), + TrackFilter = alcImage, + TrackFile = alcImage.GetFilename(), + TrackFileOffset = alcTrack.startOffset, + TrackFileType = "BINARY", + TrackRawBytesPerSector = alcTrack.sectorSize, + TrackBytesPerSector = AlcoholTrackModeToCookedBytesPerSector(alcTrack.mode) }; if(alcExtra.pregap > 0) diff --git a/Aaru.Images/Alcohol120/Read.cs b/Aaru.Images/Alcohol120/Read.cs index 78b7908e8..92e3a1560 100644 --- a/Aaru.Images/Alcohol120/Read.cs +++ b/Aaru.Images/Alcohol120/Read.cs @@ -526,9 +526,13 @@ namespace Aaru.DiscImages { var partition = new Partition { - Description = $"Track {trk.point}.", Start = trk.startLba, - Size = extra.sectors * trk.sectorSize, Length = extra.sectors, Sequence = trk.point, - Offset = byteOffset, Type = trk.mode.ToString() + Description = $"Track {trk.point}.", + Start = trk.startLba, + Size = extra.sectors * trk.sectorSize, + Length = extra.sectors, + Sequence = trk.point, + Offset = byteOffset, + Type = trk.mode.ToString() }; Partitions.Add(partition); @@ -1401,12 +1405,18 @@ namespace Aaru.DiscImages var aaruTrack = new Track { - TrackStartSector = alcTrack.startLba, TrackEndSector = alcExtra.sectors - 1, - TrackPregap = alcExtra.pregap, TrackSession = sessionNo, TrackSequence = alcTrack.point, - TrackType = AlcoholTrackTypeToTrackType(alcTrack.mode), TrackFilter = alcImage, - TrackFile = alcImage.GetFilename(), TrackFileOffset = alcTrack.startOffset, - TrackFileType = "BINARY", TrackRawBytesPerSector = alcTrack.sectorSize, - TrackBytesPerSector = AlcoholTrackModeToCookedBytesPerSector(alcTrack.mode) + TrackStartSector = alcTrack.startLba, + TrackEndSector = alcExtra.sectors - 1, + TrackPregap = alcExtra.pregap, + TrackSession = sessionNo, + TrackSequence = alcTrack.point, + TrackType = AlcoholTrackTypeToTrackType(alcTrack.mode), + TrackFilter = alcImage, + TrackFile = alcImage.GetFilename(), + TrackFileOffset = alcTrack.startOffset, + TrackFileType = "BINARY", + TrackRawBytesPerSector = alcTrack.sectorSize, + TrackBytesPerSector = AlcoholTrackModeToCookedBytesPerSector(alcTrack.mode) }; if(alcExtra.pregap > 0) diff --git a/Aaru.Images/Alcohol120/Write.cs b/Aaru.Images/Alcohol120/Write.cs index c9a79beb8..265bdf518 100644 --- a/Aaru.Images/Alcohol120/Write.cs +++ b/Aaru.Images/Alcohol120/Write.cs @@ -59,7 +59,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -482,13 +484,19 @@ namespace Aaru.DiscImages var header = new AlcoholHeader { - signature = alcoholSignature, version = new byte[] + signature = alcoholSignature, + version = new byte[] { 1, 5 }, - type = MediaTypeToAlcohol(imageInfo.MediaType), sessions = sessions, - structuresOffset = (uint)(pfi == null ? 0 : 96), sessionOffset = (uint)(pfi == null ? 96 : 4196), - unknown1 = new ushort[2], unknown2 = new uint[2], unknown3 = new uint[6], unknown4 = new uint[3] + type = MediaTypeToAlcohol(imageInfo.MediaType), + sessions = sessions, + structuresOffset = (uint)(pfi == null ? 0 : 96), + sessionOffset = (uint)(pfi == null ? 96 : 4196), + unknown1 = new ushort[2], + unknown2 = new uint[2], + unknown3 = new uint[6], + unknown4 = new uint[3] }; // Alcohol sets this always, Daemon Tool expects this @@ -555,8 +563,12 @@ namespace Aaru.DiscImages alcSessions.Add(1, new AlcoholSession { sessionEnd = (int)((writingTracks[0].TrackEndSector - writingTracks[0].TrackStartSector) + 1), - sessionSequence = 1, allBlocks = 1, nonTrackBlocks = 3, firstTrack = 1, - lastTrack = 1, trackOffset = 4220 + sessionSequence = 1, + allBlocks = 1, + nonTrackBlocks = 3, + firstTrack = 1, + lastTrack = 1, + trackOffset = 4220 }); footerOffset = 4300; @@ -566,10 +578,15 @@ namespace Aaru.DiscImages alcTracks.Add(1, new AlcoholTrack { - mode = AlcoholTrackMode.DVD, adrCtl = 20, point = 1, - extraOffset = (uint)((writingTracks[0].TrackEndSector - writingTracks[0].TrackStartSector) + 1), - sectorSize = 2048, files = 1, footerOffset = (uint)footerOffset, unknown = new byte[18], - unknown2 = new byte[24] + mode = AlcoholTrackMode.DVD, + adrCtl = 20, + point = 1, + extraOffset = (uint)((writingTracks[0].TrackEndSector - writingTracks[0].TrackStartSector) + 1), + sectorSize = 2048, + files = 1, + footerOffset = (uint)footerOffset, + unknown = new byte[18], + unknown2 = new byte[24] }); alcToc.Add(1, alcTracks); @@ -582,14 +599,16 @@ namespace Aaru.DiscImages alcSessions.Add(i, new AlcoholSession { - sessionStart = (int)firstTrack.TrackStartSector - 150, - sessionEnd = (int)lastTrack.TrackEndSector + 1, sessionSequence = (ushort)i, + sessionStart = (int)firstTrack.TrackStartSector - 150, + sessionEnd = (int)lastTrack.TrackEndSector + 1, + sessionSequence = (ushort)i, allBlocks = (byte)(decodedToc?.TrackDescriptors.Count(t => t.SessionNumber == i) ?? writingTracks.Count(t => t.TrackSession == i) + 3), nonTrackBlocks = (byte)(decodedToc?.TrackDescriptors.Count(t => t.SessionNumber == i && t.POINT >= 0xA0 && t.POINT <= 0xAF) ?? 3), - firstTrack = (ushort)firstTrack.TrackSequence, lastTrack = (ushort)lastTrack.TrackSequence, + firstTrack = (ushort)firstTrack.TrackSequence, + lastTrack = (ushort)lastTrack.TrackSequence, trackOffset = (uint)currentTrackOffset }); @@ -616,10 +635,19 @@ namespace Aaru.DiscImages { thisSessionTracks.Add(tocTrk.POINT, new AlcoholTrack { - adrCtl = (byte)((tocTrk.ADR << 4) + tocTrk.CONTROL), tno = tocTrk.TNO, - point = tocTrk.POINT, min = tocTrk.Min, sec = tocTrk.Sec, frame = tocTrk.Frame, - zero = tocTrk.Zero, pmin = tocTrk.PMIN, psec = tocTrk.PSEC, pframe = tocTrk.PFRAME, - mode = AlcoholTrackMode.NoData, unknown = new byte[18], unknown2 = new byte[24], + adrCtl = (byte)((tocTrk.ADR << 4) + tocTrk.CONTROL), + tno = tocTrk.TNO, + point = tocTrk.POINT, + min = tocTrk.Min, + sec = tocTrk.Sec, + frame = tocTrk.Frame, + zero = tocTrk.Zero, + pmin = tocTrk.PMIN, + psec = tocTrk.PSEC, + pframe = tocTrk.PFRAME, + mode = AlcoholTrackMode.NoData, + unknown = new byte[18], + unknown2 = new byte[24], extraOffset = (uint)currentExtraOffset }); @@ -630,36 +658,44 @@ namespace Aaru.DiscImages { thisSessionTracks.Add(0xA0, new AlcoholTrack { - adrCtl = (byte)((1 << 4) + firstTrackControl), pmin = (byte)firstTrack.TrackSequence, - mode = AlcoholTrackMode.NoData, point = 0xA0, unknown = new byte[18], - unknown2 = new byte[24], psec = (byte)(imageInfo.MediaType == MediaType.CDI - ? 0x10 - : writingTracks.Any(t => t.TrackType == - TrackType. - CdMode2Form1 || - t.TrackType == - TrackType. - CdMode2Form2 || - t.TrackType == - TrackType. - CdMode2Formless) - ? 0x20 - : 0), + adrCtl = (byte)((1 << 4) + firstTrackControl), + pmin = (byte)firstTrack.TrackSequence, + mode = AlcoholTrackMode.NoData, + point = 0xA0, + unknown = new byte[18], + unknown2 = new byte[24], + psec = (byte)(imageInfo.MediaType == MediaType.CDI + ? 0x10 + : writingTracks.Any(t => t.TrackType == TrackType.CdMode2Form1 || + t.TrackType == TrackType.CdMode2Form2 || + t.TrackType == TrackType.CdMode2Formless) + ? 0x20 + : 0), extraOffset = (uint)currentExtraOffset }); thisSessionTracks.Add(0xA1, new AlcoholTrack { - adrCtl = (byte)((1 << 4) + lastTrackControl), pmin = (byte)lastTrack.TrackSequence, - mode = AlcoholTrackMode.NoData, point = 0xA1, unknown = new byte[18], - unknown2 = new byte[24], extraOffset = (uint)currentExtraOffset + adrCtl = (byte)((1 << 4) + lastTrackControl), + pmin = (byte)lastTrack.TrackSequence, + mode = AlcoholTrackMode.NoData, + point = 0xA1, + unknown = new byte[18], + unknown2 = new byte[24], + extraOffset = (uint)currentExtraOffset }); thisSessionTracks.Add(0xA2, new AlcoholTrack { - adrCtl = (byte)((1 << 4) + firstTrackControl), zero = 0, pmin = leadinPmsf.minute, - psec = leadinPmsf.second, pframe = leadinPmsf.frame, mode = AlcoholTrackMode.NoData, - point = 0xA2, unknown = new byte[18], unknown2 = new byte[24], + adrCtl = (byte)((1 << 4) + firstTrackControl), + zero = 0, + pmin = leadinPmsf.minute, + psec = leadinPmsf.second, + pframe = leadinPmsf.frame, + mode = AlcoholTrackMode.NoData, + point = 0xA2, + unknown = new byte[18], + unknown2 = new byte[24], extraOffset = (uint)currentExtraOffset }); @@ -776,10 +812,19 @@ namespace Aaru.DiscImages { thisSessionTracks.Add(tocTrk.POINT, new AlcoholTrack { - adrCtl = (byte)((tocTrk.ADR << 4) + tocTrk.CONTROL), tno = tocTrk.TNO, - point = tocTrk.POINT, min = tocTrk.Min, sec = tocTrk.Sec, frame = tocTrk.Frame, - zero = tocTrk.Zero, pmin = tocTrk.PMIN, psec = tocTrk.PSEC, pframe = tocTrk.PFRAME, - mode = AlcoholTrackMode.NoData, unknown = new byte[18], unknown2 = new byte[24], + adrCtl = (byte)((tocTrk.ADR << 4) + tocTrk.CONTROL), + tno = tocTrk.TNO, + point = tocTrk.POINT, + min = tocTrk.Min, + sec = tocTrk.Sec, + frame = tocTrk.Frame, + zero = tocTrk.Zero, + pmin = tocTrk.PMIN, + psec = tocTrk.PSEC, + pframe = tocTrk.PFRAME, + mode = AlcoholTrackMode.NoData, + unknown = new byte[18], + unknown2 = new byte[24], extraOffset = (uint)currentExtraOffset }); @@ -797,16 +842,28 @@ namespace Aaru.DiscImages thisSessionTracks.Add(0xB0, new AlcoholTrack { - point = 0xB0, adrCtl = 0x50, zero = 0, min = leadoutAmsf.minute, - sec = leadoutAmsf.second, frame = leadoutAmsf.frame, pmin = leadoutPmsf.minute, - psec = leadoutPmsf.second, pframe = leadoutPmsf.frame, unknown = new byte[18], + point = 0xB0, + adrCtl = 0x50, + zero = 0, + min = leadoutAmsf.minute, + sec = leadoutAmsf.second, + frame = leadoutAmsf.frame, + pmin = leadoutPmsf.minute, + psec = leadoutPmsf.second, + pframe = leadoutPmsf.frame, + unknown = new byte[18], unknown2 = new byte[24] }); thisSessionTracks.Add(0xC0, new AlcoholTrack { - point = 0xC0, adrCtl = 0x50, min = 128, pmin = 97, - psec = 25, unknown = new byte[18], unknown2 = new byte[24] + point = 0xC0, + adrCtl = 0x50, + min = 128, + pmin = 97, + psec = 25, + unknown = new byte[18], + unknown2 = new byte[24] }); currentTrackOffset += Marshal.SizeOf() * 2; @@ -817,7 +874,8 @@ namespace Aaru.DiscImages alcFooter = new AlcoholFooter { - filenameOffset = (uint)(footerOffset + Marshal.SizeOf()), widechar = 1 + filenameOffset = (uint)(footerOffset + Marshal.SizeOf()), + widechar = 1 }; byte[] filename = Encoding.Unicode.GetBytes("*.mdf"); // Yup, Alcohol stores no filename but a wildcard. diff --git a/Aaru.Images/Anex86/Anex86.cs b/Aaru.Images/Anex86/Anex86.cs index 9bee1f8bc..59987890f 100644 --- a/Aaru.Images/Anex86/Anex86.cs +++ b/Aaru.Images/Anex86/Anex86.cs @@ -47,16 +47,26 @@ namespace Aaru.DiscImages public Anex86() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Anex86/Write.cs b/Aaru.Images/Anex86/Write.cs index 3d9ac2ff6..e2b78cfb3 100644 --- a/Aaru.Images/Anex86/Write.cs +++ b/Aaru.Images/Anex86/Write.cs @@ -71,7 +71,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -87,7 +89,9 @@ namespace Aaru.DiscImages fdihdr = new Anex86Header { - hdrSize = 4096, dskSize = (int)(sectors * sectorSize), bps = (int)sectorSize + hdrSize = 4096, + dskSize = (int)(sectors * sectorSize), + bps = (int)sectorSize }; IsWriting = true; diff --git a/Aaru.Images/Apple2MG/Apple2MG.cs b/Aaru.Images/Apple2MG/Apple2MG.cs index 1b05c3560..079f82ce0 100644 --- a/Aaru.Images/Apple2MG/Apple2MG.cs +++ b/Aaru.Images/Apple2MG/Apple2MG.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Apple2Mg() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Apple2MG/Write.cs b/Aaru.Images/Apple2MG/Write.cs index 32ca9b279..88ca96941 100644 --- a/Aaru.Images/Apple2MG/Write.cs +++ b/Aaru.Images/Apple2MG/Write.cs @@ -73,7 +73,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -194,14 +196,16 @@ namespace Aaru.DiscImages imageHeader = new A2ImgHeader { - Blocks = (uint)(imageInfo.Sectors * imageInfo.SectorSize) / 512, Creator = CREATOR_AARU, + Blocks = (uint)(imageInfo.Sectors * imageInfo.SectorSize) / 512, + Creator = CREATOR_AARU, DataOffset = 0x40, - DataSize = - (uint)(imageInfo.Sectors * imageInfo.SectorSize), + DataSize = (uint)(imageInfo.Sectors * imageInfo.SectorSize), Flags = (uint)(imageInfo.LastMediaSequence != 0 ? VALID_VOLUME_NUMBER + (imageInfo.MediaSequence & 0xFF) : 0), - HeaderSize = 0x40, ImageFormat = isDos ? SectorOrder.Dos : SectorOrder.ProDos, Magic = MAGIC, - Version = 1 + HeaderSize = 0x40, + ImageFormat = isDos ? SectorOrder.Dos : SectorOrder.ProDos, + Magic = MAGIC, + Version = 1 }; if(!string.IsNullOrEmpty(imageInfo.Comments)) diff --git a/Aaru.Images/AppleDOS/AppleDOS.cs b/Aaru.Images/AppleDOS/AppleDOS.cs index 27bb9f34b..3b3218906 100644 --- a/Aaru.Images/AppleDOS/AppleDOS.cs +++ b/Aaru.Images/AppleDOS/AppleDOS.cs @@ -47,16 +47,26 @@ namespace Aaru.DiscImages public AppleDos() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/AppleDOS/Write.cs b/Aaru.Images/AppleDOS/Write.cs index 5e27cce44..9b8e399f2 100644 --- a/Aaru.Images/AppleDOS/Write.cs +++ b/Aaru.Images/AppleDOS/Write.cs @@ -68,7 +68,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -153,10 +155,8 @@ namespace Aaru.DiscImages return false; } - bool isDos = deinterleaved[0x11001] == 17 && deinterleaved[0x11002] < 16 && - deinterleaved[0x11027] <= 122 && - deinterleaved[0x11034] == 35 && deinterleaved[0x11035] == 16 && - deinterleaved[0x11036] == 0 && + bool isDos = deinterleaved[0x11001] == 17 && deinterleaved[0x11002] < 16 && deinterleaved[0x11027] <= 122 && + deinterleaved[0x11034] == 35 && deinterleaved[0x11035] == 16 && deinterleaved[0x11036] == 0 && deinterleaved[0x11037] == 1; byte[] tmp = new byte[deinterleaved.Length]; diff --git a/Aaru.Images/AppleNIB/AppleNIB.cs b/Aaru.Images/AppleNIB/AppleNIB.cs index aec6e2f9e..45b821b12 100644 --- a/Aaru.Images/AppleNIB/AppleNIB.cs +++ b/Aaru.Images/AppleNIB/AppleNIB.cs @@ -47,16 +47,26 @@ namespace Aaru.DiscImages public AppleNib() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/AppleNIB/Read.cs b/Aaru.Images/AppleNIB/Read.cs index 82aaadca7..6253b292b 100644 --- a/Aaru.Images/AppleNIB/Read.cs +++ b/Aaru.Images/AppleNIB/Read.cs @@ -90,8 +90,7 @@ namespace Aaru.DiscImages continue; bool isDos = sector0[0x01] == 17 && sector0[0x02] < 16 && sector0[0x27] <= 122 && - sector0[0x34] == 35 && sector0[0x35] == 16 && sector0[0x36] == 0 && - sector0[0x37] == 1; + sector0[0x34] == 35 && sector0[0x35] == 16 && sector0[0x36] == 0 && sector0[0x37] == 1; if(isDos) skewing = dosSkewing; diff --git a/Aaru.Images/Apridisk/Apridisk.cs b/Aaru.Images/Apridisk/Apridisk.cs index 602f06d5d..f9c96b655 100644 --- a/Aaru.Images/Apridisk/Apridisk.cs +++ b/Aaru.Images/Apridisk/Apridisk.cs @@ -49,16 +49,26 @@ namespace Aaru.DiscImages public Apridisk() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Apridisk/Write.cs b/Aaru.Images/Apridisk/Write.cs index 0fef0017a..c993615cc 100644 --- a/Aaru.Images/Apridisk/Write.cs +++ b/Aaru.Images/Apridisk/Write.cs @@ -57,7 +57,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -181,9 +183,13 @@ namespace Aaru.DiscImages var record = new ApridiskRecord { - type = RecordType.Sector, compression = CompressType.Uncompresed, - headerSize = (ushort)Marshal.SizeOf(), - dataSize = (uint)sectorsData[c][h][s].Length, head = h, sector = s, cylinder = c + type = RecordType.Sector, + compression = CompressType.Uncompresed, + headerSize = (ushort)Marshal.SizeOf(), + dataSize = (uint)sectorsData[c][h][s].Length, + head = h, + sector = s, + cylinder = c }; MemoryMarshal.Write(hdr, ref record); @@ -200,9 +206,13 @@ namespace Aaru.DiscImages var creatorRecord = new ApridiskRecord { - type = RecordType.Creator, compression = CompressType.Uncompresed, - headerSize = (ushort)Marshal.SizeOf(), dataSize = (uint)creatorBytes.Length + 1, - head = 0, sector = 0, cylinder = 0 + type = RecordType.Creator, + compression = CompressType.Uncompresed, + headerSize = (ushort)Marshal.SizeOf(), + dataSize = (uint)creatorBytes.Length + 1, + head = 0, + sector = 0, + cylinder = 0 }; MemoryMarshal.Write(hdr, ref creatorRecord); @@ -218,9 +228,13 @@ namespace Aaru.DiscImages var commentRecord = new ApridiskRecord { - type = RecordType.Comment, compression = CompressType.Uncompresed, - headerSize = (ushort)Marshal.SizeOf(), dataSize = (uint)commentBytes.Length + 1, - head = 0, sector = 0, cylinder = 0 + type = RecordType.Comment, + compression = CompressType.Uncompresed, + headerSize = (ushort)Marshal.SizeOf(), + dataSize = (uint)commentBytes.Length + 1, + head = 0, + sector = 0, + cylinder = 0 }; MemoryMarshal.Write(hdr, ref commentRecord); diff --git a/Aaru.Images/BLU/BLU.cs b/Aaru.Images/BLU/BLU.cs index 0184834eb..02beb7664 100644 --- a/Aaru.Images/BLU/BLU.cs +++ b/Aaru.Images/BLU/BLU.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Blu() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; struct BluHeader diff --git a/Aaru.Images/BLU/Write.cs b/Aaru.Images/BLU/Write.cs index b0e787a49..683609ba9 100644 --- a/Aaru.Images/BLU/Write.cs +++ b/Aaru.Images/BLU/Write.cs @@ -72,7 +72,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/BlindWrite4/BlindWrite4.cs b/Aaru.Images/BlindWrite4/BlindWrite4.cs index 3ddbe0fab..6708028f4 100644 --- a/Aaru.Images/BlindWrite4/BlindWrite4.cs +++ b/Aaru.Images/BlindWrite4/BlindWrite4.cs @@ -52,14 +52,23 @@ namespace Aaru.DiscImages public BlindWrite4() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, - ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, - MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/BlindWrite4/Read.cs b/Aaru.Images/BlindWrite4/Read.cs index 4b5c2526a..b7ea687ac 100644 --- a/Aaru.Images/BlindWrite4/Read.cs +++ b/Aaru.Images/BlindWrite4/Read.cs @@ -503,7 +503,8 @@ namespace Aaru.DiscImages { var track = new Track { - TrackDescription = bwTrack.title, TrackEndSector = bwTrack.lastSector + TrackDescription = bwTrack.title, + TrackEndSector = bwTrack.lastSector }; if(!string.IsNullOrEmpty(bwTrack.filename)) @@ -683,9 +684,10 @@ namespace Aaru.DiscImages var partition = new Partition { Description = track.TrackDescription, - Size = ((track.TrackEndSector - track.TrackStartSector) + 1) * 2352, - Length = (track.TrackEndSector - track.TrackStartSector) + 1, Sequence = track.TrackSequence, - Start = track.TrackStartSector + track.TrackPregap + Size = ((track.TrackEndSector - track.TrackStartSector) + 1) * 2352, + Length = (track.TrackEndSector - track.TrackStartSector) + 1, + Sequence = track.TrackSequence, + Start = track.TrackStartSector + track.TrackPregap }; partition.Offset = partition.Start * 2352; @@ -719,7 +721,9 @@ namespace Aaru.DiscImages { var session = new Session { - SessionSequence = i, StartTrack = uint.MaxValue, StartSector = uint.MaxValue + SessionSequence = i, + StartTrack = uint.MaxValue, + StartSector = uint.MaxValue }; foreach(Track track in Tracks.Where(track => track.TrackSession == i)) diff --git a/Aaru.Images/BlindWrite5/BlindWrite5.cs b/Aaru.Images/BlindWrite5/BlindWrite5.cs index d6f993046..7531453a3 100644 --- a/Aaru.Images/BlindWrite5/BlindWrite5.cs +++ b/Aaru.Images/BlindWrite5/BlindWrite5.cs @@ -65,14 +65,23 @@ namespace Aaru.DiscImages public BlindWrite5() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, - ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, - MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/BlindWrite5/Read.cs b/Aaru.Images/BlindWrite5/Read.cs index e3c61a6f3..a73c3b179 100644 --- a/Aaru.Images/BlindWrite5/Read.cs +++ b/Aaru.Images/BlindWrite5/Read.cs @@ -265,7 +265,8 @@ namespace Aaru.DiscImages var dataFile = new Bw5DataFile { - Unknown1 = new uint[4], Unknown2 = new uint[3] + Unknown1 = new uint[4], + Unknown2 = new uint[3] }; stream.Read(tmpArray, 0, tmpArray.Length); diff --git a/Aaru.Images/BlindWrite5/Structs.cs b/Aaru.Images/BlindWrite5/Structs.cs index 6f8eb725d..82409f518 100644 --- a/Aaru.Images/BlindWrite5/Structs.cs +++ b/Aaru.Images/BlindWrite5/Structs.cs @@ -162,7 +162,7 @@ namespace Aaru.DiscImages public long SectorSize; public int StartLba; public int Sectors; - public uint Offset; + public uint Offset; } } } \ No newline at end of file diff --git a/Aaru.Images/CDRDAO/CDRDAO.cs b/Aaru.Images/CDRDAO/CDRDAO.cs index f3b554dd5..ae2449dfa 100644 --- a/Aaru.Images/CDRDAO/CDRDAO.cs +++ b/Aaru.Images/CDRDAO/CDRDAO.cs @@ -61,11 +61,23 @@ namespace Aaru.DiscImages public Cdrdao() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CDRDAO/Properties.cs b/Aaru.Images/CDRDAO/Properties.cs index 48ab4c61c..b62442412 100644 --- a/Aaru.Images/CDRDAO/Properties.cs +++ b/Aaru.Images/CDRDAO/Properties.cs @@ -70,12 +70,16 @@ namespace Aaru.DiscImages { var aaruTrack = new Track { - TrackDescription = cdrTrack.Title, TrackStartSector = cdrTrack.StartSector, - TrackPregap = cdrTrack.Pregap, TrackSession = 1, TrackSequence = cdrTrack.Sequence, + TrackDescription = cdrTrack.Title, + TrackStartSector = cdrTrack.StartSector, + TrackPregap = cdrTrack.Pregap, + TrackSession = 1, + TrackSequence = cdrTrack.Sequence, TrackType = CdrdaoTrackTypeToTrackType(cdrTrack.Tracktype), TrackFilter = cdrTrack.Trackfile.Datafilter, TrackFile = cdrTrack.Trackfile.Datafilter.GetFilename(), - TrackFileOffset = cdrTrack.Trackfile.Offset, TrackFileType = cdrTrack.Trackfile.Filetype, + TrackFileOffset = cdrTrack.Trackfile.Offset, + TrackFileType = cdrTrack.Trackfile.Filetype, TrackRawBytesPerSector = cdrTrack.Bps, TrackBytesPerSector = CdrdaoTrackTypeToCookedBytesPerSector(cdrTrack.Tracktype) }; diff --git a/Aaru.Images/CDRDAO/Read.cs b/Aaru.Images/CDRDAO/Read.cs index 668cacb5d..2b01b3451 100644 --- a/Aaru.Images/CDRDAO/Read.cs +++ b/Aaru.Images/CDRDAO/Read.cs @@ -99,7 +99,8 @@ namespace Aaru.DiscImages // Initialize disc discimage = new CdrdaoDisc { - Tracks = new List(), Comment = "" + Tracks = new List(), + Comment = "" }; var currenttrack = new CdrdaoTrack(); @@ -249,7 +250,8 @@ namespace Aaru.DiscImages currenttrack = new CdrdaoTrack { - Indexes = new Dictionary(), Pregap = 0 + Indexes = new Dictionary(), + Pregap = 0 }; nextindex = 2; @@ -400,7 +402,8 @@ namespace Aaru.DiscImages Datafile = matchAudioFile.Groups["filename"].Value, Offset = matchAudioFile.Groups["base_offset"].Value != "" ? ulong.Parse(matchAudioFile.Groups["base_offset"].Value) : 0, - Filetype = "BINARY", Sequence = currentTrackNumber + Filetype = "BINARY", + Sequence = currentTrackNumber }; ulong startSectors = 0; @@ -443,7 +446,8 @@ namespace Aaru.DiscImages Datafile = matchAudioFile.Groups["filename"].Value, Offset = matchFile.Groups["base_offset"].Value != "" ? ulong.Parse(matchFile.Groups["base_offset"].Value) : 0, - Filetype = "BINARY", Sequence = currentTrackNumber + Filetype = "BINARY", + Sequence = currentTrackNumber }; if(matchFile.Groups["length"].Value != "") @@ -708,11 +712,14 @@ namespace Aaru.DiscImages // Index 01 var partition = new Partition { - Description = $"Track {discimage.Tracks[i].Sequence}.", Name = discimage.Tracks[i].Title, + Description = $"Track {discimage.Tracks[i].Sequence}.", + Name = discimage.Tracks[i].Title, Start = discimage.Tracks[i].StartSector, Size = (discimage.Tracks[i].Sectors - index0Len) * discimage.Tracks[i].Bps, - Length = discimage.Tracks[i].Sectors - index0Len, Sequence = partitionSequence, - Offset = byteOffset, Type = discimage.Tracks[i].Tracktype + Length = discimage.Tracks[i].Sectors - index0Len, + Sequence = partitionSequence, + Offset = byteOffset, + Type = discimage.Tracks[i].Tracktype }; byteOffset += partition.Size; diff --git a/Aaru.Images/CDRDAO/Write.cs b/Aaru.Images/CDRDAO/Write.cs index 15c845f17..0ee8564a0 100644 --- a/Aaru.Images/CDRDAO/Write.cs +++ b/Aaru.Images/CDRDAO/Write.cs @@ -79,7 +79,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; // TODO: Separate tracks @@ -97,7 +99,8 @@ namespace Aaru.DiscImages discimage = new CdrdaoDisc { - Disktype = mediaType, Tracks = new List() + Disktype = mediaType, + Tracks = new List() }; trackFlags = new Dictionary(); diff --git a/Aaru.Images/CDRWin/CDRWin.cs b/Aaru.Images/CDRWin/CDRWin.cs index 98cf82766..932ffc5c6 100644 --- a/Aaru.Images/CDRWin/CDRWin.cs +++ b/Aaru.Images/CDRWin/CDRWin.cs @@ -61,11 +61,23 @@ namespace Aaru.DiscImages public CdrWin() => _imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CDRWin/Constants.cs b/Aaru.Images/CDRWin/Constants.cs index a1960d084..ba6ba9302 100644 --- a/Aaru.Images/CDRWin/Constants.cs +++ b/Aaru.Images/CDRWin/Constants.cs @@ -171,14 +171,14 @@ namespace Aaru.DiscImages const string REGEX_TRURIP_TRACK_MD5 = @"\bREM\s+(Gap|Trk)\s+(?\d{2}):\s+[\da-f]{32}$"; const string REGEX_TRURIP_TRACK_SHA1 = @"\bREM\s+(Gap|Trk)\s+(?\d{2}):\s+[\da-f]{40}$"; const string REGEX_TRURIP_TRACK_UNKNOWN = @"\bREM\s+(Gap|Trk)\s+(?\d{2}):\s+[\da-f]{8,}$"; - + // Redump.org extensions - const string REGEX_REDUMP_SD_AREA = @"\bREM\s+SINGLE-DENSITY\s+AREA$"; - const string REGEX_REDUMP_HD_AREA = @"\bREM\s+HIGH-DENSITY\s+AREA$"; - - const string REGEX_DIC_MEDIA_TYPE = @"\bREM\s+METADATA DIC MEDIA-TYPE:\s+(?.+)$"; - const string REGEX_AARU_MEDIA_TYPE = @"\bREM\s+METADATA AARU MEDIA-TYPE:\s+(?.+)$"; - const string REGEX_APPLICATION_VERSION = @"\bREM\s+Ripping Tool Version:\s+(?.+)$"; + const string REGEX_REDUMP_SD_AREA = @"\bREM\s+SINGLE-DENSITY\s+AREA$"; + const string REGEX_REDUMP_HD_AREA = @"\bREM\s+HIGH-DENSITY\s+AREA$"; + + const string REGEX_DIC_MEDIA_TYPE = @"\bREM\s+METADATA DIC MEDIA-TYPE:\s+(?.+)$"; + const string REGEX_AARU_MEDIA_TYPE = @"\bREM\s+METADATA AARU MEDIA-TYPE:\s+(?.+)$"; + const string REGEX_APPLICATION_VERSION = @"\bREM\s+Ripping Tool Version:\s+(?.+)$"; const string REGEX_DUMP_EXTENT = @"\bREM\s+METADATA DUMP EXTENT:\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?.+)\s+\|\s+(?\d+):(?\d+)$"; } diff --git a/Aaru.Images/CDRWin/Properties.cs b/Aaru.Images/CDRWin/Properties.cs index ccb406df8..59199d512 100644 --- a/Aaru.Images/CDRWin/Properties.cs +++ b/Aaru.Images/CDRWin/Properties.cs @@ -75,13 +75,17 @@ namespace Aaru.DiscImages { var aaruTrack = new Track { - TrackDescription = cdrTrack.Title, TrackPregap = (ulong)cdrTrack.Pregap, - TrackSession = cdrTrack.Session, TrackSequence = cdrTrack.Sequence, - TrackType = CdrWinTrackTypeToTrackType(cdrTrack.TrackType), - TrackFile = cdrTrack.TrackFile.DataFilter.GetFilename(), - TrackFilter = cdrTrack.TrackFile.DataFilter, TrackFileOffset = cdrTrack.TrackFile.Offset, - TrackFileType = cdrTrack.TrackFile.FileType, TrackRawBytesPerSector = cdrTrack.Bps, - TrackBytesPerSector = CdrWinTrackTypeToCookedBytesPerSector(cdrTrack.TrackType) + TrackDescription = cdrTrack.Title, + TrackPregap = (ulong)cdrTrack.Pregap, + TrackSession = cdrTrack.Session, + TrackSequence = cdrTrack.Sequence, + TrackType = CdrWinTrackTypeToTrackType(cdrTrack.TrackType), + TrackFile = cdrTrack.TrackFile.DataFilter.GetFilename(), + TrackFilter = cdrTrack.TrackFile.DataFilter, + TrackFileOffset = cdrTrack.TrackFile.Offset, + TrackFileType = cdrTrack.TrackFile.FileType, + TrackRawBytesPerSector = cdrTrack.Bps, + TrackBytesPerSector = CdrWinTrackTypeToCookedBytesPerSector(cdrTrack.TrackType) }; if(aaruTrack.TrackSequence == 1) diff --git a/Aaru.Images/CDRWin/Read.cs b/Aaru.Images/CDRWin/Read.cs index 65c9e3a43..fd6328b9c 100644 --- a/Aaru.Images/CDRWin/Read.cs +++ b/Aaru.Images/CDRWin/Read.cs @@ -112,7 +112,9 @@ namespace Aaru.DiscImages // Initialize disc _discImage = new CdrWinDisc { - Sessions = new List(), Tracks = new List(), Comment = "", + Sessions = new List(), + Tracks = new List(), + Comment = "", DiscHashes = new Dictionary() }; @@ -299,13 +301,15 @@ namespace Aaru.DiscImages { new ExtentType { - Start = extentStart, End = extentEnd + Start = extentStart, + End = extentEnd } }, Firmware = matchDumpExtent.Groups["firmware"].Value, Manufacturer = matchDumpExtent.Groups["manufacturer"].Value, Model = matchDumpExtent.Groups["model"].Value, - Serial = matchDumpExtent.Groups["serial"].Value, Software = new SoftwareType + Serial = matchDumpExtent.Groups["serial"].Value, + Software = new SoftwareType { Name = matchDumpExtent.Groups["application"].Value, Version = matchDumpExtent.Groups["version"].Value, @@ -319,7 +323,8 @@ namespace Aaru.DiscImages { new ExtentType { - Start = extentStart, End = extentEnd + Start = extentStart, + End = extentEnd } }.OrderBy(e => e.Start).ToArray(); } @@ -1140,9 +1145,9 @@ namespace Aaru.DiscImages Partitions = new List(); - ulong partitionSequence = 0; - ulong previousPartitionsSize = 0; - string previousFile = _discImage.Tracks[0].TrackFile.DataFilter.GetBasePath(); + ulong partitionSequence = 0; + ulong previousPartitionsSize = 0; + string previousFile = _discImage.Tracks[0].TrackFile.DataFilter.GetBasePath(); _offsetMap = new Dictionary(); @@ -1168,28 +1173,30 @@ namespace Aaru.DiscImages partition.Type = _discImage.Tracks[i].TrackType; partitionSequence++; - - if(_discImage.Tracks[i].TrackFile.DataFilter.GetBasePath() != previousFile){ + + if(_discImage.Tracks[i].TrackFile.DataFilter.GetBasePath() != previousFile) + { previousPartitionsSize += _discImage.Tracks[i - 1].Sectors; - previousFile = _discImage.Tracks[i].TrackFile.DataFilter.GetBasePath(); + previousFile = _discImage.Tracks[i].TrackFile.DataFilter.GetBasePath(); } if(_discImage.Tracks[i].Indexes.TryGetValue(0, out int idx0)) _offsetMap.Add(_discImage.Tracks[i].Sequence, (ulong)idx0 + previousPartitionsSize); - else if(_discImage.IsRedumpGigadisc && _discImage.Tracks[i].Sequence == 3) + else if(_discImage.IsRedumpGigadisc && + _discImage.Tracks[i].Sequence == 3) { _offsetMap.Add(_discImage.Tracks[i].Sequence, gdRomSession2Offset); densitySeparationSectors += gdRomSession2Offset - previousPartitionsSize; - previousPartitionsSize = gdRomSession2Offset; + previousPartitionsSize = gdRomSession2Offset; } else if(_discImage.Tracks[i].Sequence > 1) _offsetMap.Add(_discImage.Tracks[i].Sequence, - (ulong)(_discImage.Tracks[i].Indexes[1] - _discImage.Tracks[i].Pregap) + + (ulong)(_discImage.Tracks[i].Indexes[1] - _discImage.Tracks[i].Pregap) + previousPartitionsSize); else - _offsetMap.Add(_discImage.Tracks[i].Sequence, (ulong)_discImage.Tracks[i].Indexes[1] + - previousPartitionsSize); - + _offsetMap.Add(_discImage.Tracks[i].Sequence, + (ulong)_discImage.Tracks[i].Indexes[1] + previousPartitionsSize); + Partitions.Add(partition); } @@ -1962,4 +1969,4 @@ namespace Aaru.DiscImages public List GetSessionTracks(ushort session) => Tracks.Where(t => t.TrackSession == session).OrderBy(t => t.TrackSequence).ToList(); } -} +} \ No newline at end of file diff --git a/Aaru.Images/CDRWin/Write.cs b/Aaru.Images/CDRWin/Write.cs index 904d5d036..1a9423d9d 100644 --- a/Aaru.Images/CDRWin/Write.cs +++ b/Aaru.Images/CDRWin/Write.cs @@ -78,7 +78,9 @@ namespace Aaru.DiscImages _imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; // TODO: Separate tracks @@ -96,7 +98,9 @@ namespace Aaru.DiscImages _discImage = new CdrWinDisc { - MediaType = mediaType, Sessions = new List(), Tracks = new List() + MediaType = mediaType, + Sessions = new List(), + Tracks = new List() }; _trackFlags = new Dictionary(); @@ -452,10 +456,15 @@ namespace Aaru.DiscImages foreach(var dumpData in from dump in DumpHardware from extent in dump.Extents.OrderBy(e => e.Start) select new { - dump.Manufacturer, dump.Model, dump.Firmware, dump.Serial, + dump.Manufacturer, + dump.Model, + dump.Firmware, + dump.Serial, Application = dump.Software.Name, - ApplicationVersion = dump.Software.Version, dump.Software.OperatingSystem, - extent.Start, extent.End + ApplicationVersion = dump.Software.Version, + dump.Software.OperatingSystem, + extent.Start, + extent.End }) { _descriptorStream. diff --git a/Aaru.Images/CHD/CHD.cs b/Aaru.Images/CHD/CHD.cs index ad3315c21..c4c689d72 100644 --- a/Aaru.Images/CHD/CHD.cs +++ b/Aaru.Images/CHD/CHD.cs @@ -79,11 +79,24 @@ namespace Aaru.DiscImages public Chd() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Application = "MAME", Creator = null, - Comments = null, MediaManufacturer = null, MediaModel = null, MediaSerialNumber = null, - MediaBarcode = null, MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "MAME", + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CHD/Read.cs b/Aaru.Images/CHD/Read.cs index e8fc5b6ee..51cd9d38e 100644 --- a/Aaru.Images/CHD/Read.cs +++ b/Aaru.Images/CHD/Read.cs @@ -1144,7 +1144,9 @@ namespace Aaru.DiscImages Size = ((aaruTrack.TrackEndSector - (ulong)aaruTrack.Indexes[1]) + 1) * (ulong)aaruTrack.TrackRawBytesPerSector, Length = (aaruTrack.TrackEndSector - (ulong)aaruTrack.Indexes[1]) + 1, - Sequence = aaruTrack.TrackSequence, Offset = partPos, Start = (ulong)aaruTrack.Indexes[1], + Sequence = aaruTrack.TrackSequence, + Offset = partPos, + Start = (ulong)aaruTrack.Indexes[1], Type = aaruTrack.TrackType.ToString() }; diff --git a/Aaru.Images/CPCDSK/CPCDSK.cs b/Aaru.Images/CPCDSK/CPCDSK.cs index d15176fb9..d4a559019 100644 --- a/Aaru.Images/CPCDSK/CPCDSK.cs +++ b/Aaru.Images/CPCDSK/CPCDSK.cs @@ -46,16 +46,26 @@ namespace Aaru.DiscImages public Cpcdsk() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CisCopy/CisCopy.cs b/Aaru.Images/CisCopy/CisCopy.cs index 4dc2f607d..9e89ccc19 100644 --- a/Aaru.Images/CisCopy/CisCopy.cs +++ b/Aaru.Images/CisCopy/CisCopy.cs @@ -62,16 +62,26 @@ namespace Aaru.DiscImages public CisCopy() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CisCopy/Write.cs b/Aaru.Images/CisCopy/Write.cs index b5abdc9ac..7b71d5a00 100644 --- a/Aaru.Images/CisCopy/Write.cs +++ b/Aaru.Images/CisCopy/Write.cs @@ -61,7 +61,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/CloneCD/CloneCD.cs b/Aaru.Images/CloneCD/CloneCD.cs index eee8868dd..8bffc4044 100644 --- a/Aaru.Images/CloneCD/CloneCD.cs +++ b/Aaru.Images/CloneCD/CloneCD.cs @@ -59,14 +59,23 @@ namespace Aaru.DiscImages public CloneCd() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, - ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, - MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CloneCD/Read.cs b/Aaru.Images/CloneCD/Read.cs index e3324f963..4b42f1c3d 100644 --- a/Aaru.Images/CloneCD/Read.cs +++ b/Aaru.Images/CloneCD/Read.cs @@ -438,10 +438,12 @@ namespace Aaru.DiscImages currentTrack = new Track { - TrackBytesPerSector = 2352, TrackFile = dataFilter.GetFilename(), - TrackFileType = scrambled ? "SCRAMBLED" : "BINARY", - TrackFilter = dataFilter, TrackRawBytesPerSector = 2352, - TrackSequence = descriptor.POINT, + TrackBytesPerSector = 2352, + TrackFile = dataFilter.GetFilename(), + TrackFileType = scrambled ? "SCRAMBLED" : "BINARY", + TrackFilter = dataFilter, + TrackRawBytesPerSector = 2352, + TrackSequence = descriptor.POINT, TrackStartSector = GetLba(descriptor.PMIN, descriptor.PSEC, descriptor.PFRAME), TrackSession = descriptor.SessionNumber @@ -679,7 +681,9 @@ namespace Aaru.DiscImages var currentSession = new Session { - EndTrack = uint.MinValue, StartTrack = uint.MaxValue, SessionSequence = 1 + EndTrack = uint.MinValue, + StartTrack = uint.MaxValue, + SessionSequence = 1 }; Partitions = new List(); @@ -707,7 +711,9 @@ namespace Aaru.DiscImages currentSession = new Session { - EndTrack = uint.MinValue, StartTrack = uint.MaxValue, SessionSequence = track.TrackSession + EndTrack = uint.MinValue, + StartTrack = uint.MaxValue, + SessionSequence = track.TrackSession }; } @@ -716,9 +722,11 @@ namespace Aaru.DiscImages Description = track.TrackDescription, Size = ((track.TrackEndSector - track.TrackStartSector) + 1) * (ulong)track.TrackRawBytesPerSector, - Length = (track.TrackEndSector - track.TrackStartSector) + 1, Sequence = track.TrackSequence, - Offset = track.TrackFileOffset, Start = track.TrackStartSector, - Type = track.TrackType.ToString() + Length = (track.TrackEndSector - track.TrackStartSector) + 1, + Sequence = track.TrackSequence, + Offset = track.TrackFileOffset, + Start = track.TrackStartSector, + Type = track.TrackType.ToString() }; imageInfo.Sectors += partition.Length; diff --git a/Aaru.Images/CloneCD/Write.cs b/Aaru.Images/CloneCD/Write.cs index d711eb2c2..324ff22a6 100644 --- a/Aaru.Images/CloneCD/Write.cs +++ b/Aaru.Images/CloneCD/Write.cs @@ -58,7 +58,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -353,17 +355,31 @@ namespace Aaru.DiscImages // Lead-out trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = currentSession, POINT = 0xB0, ADR = 5, CONTROL = 0, - HOUR = 0, Min = leadoutAmsf.minute, Sec = leadoutAmsf.second, Frame = leadoutAmsf.frame, - PHOUR = 2, PMIN = leadoutPmsf.minute, PSEC = leadoutPmsf.second, PFRAME = leadoutPmsf.frame + SessionNumber = currentSession, + POINT = 0xB0, + ADR = 5, + CONTROL = 0, + HOUR = 0, + Min = leadoutAmsf.minute, + Sec = leadoutAmsf.second, + Frame = leadoutAmsf.frame, + PHOUR = 2, + PMIN = leadoutPmsf.minute, + PSEC = leadoutPmsf.second, + PFRAME = leadoutPmsf.frame }); // This seems to be constant? It should not exist on CD-ROM but CloneCD creates them anyway // Format seems like ATIP, but ATIP should not be as 0xC0 in TOC... trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = currentSession, POINT = 0xC0, ADR = 5, CONTROL = 0, - Min = 128, PMIN = 97, PSEC = 25 + SessionNumber = currentSession, + POINT = 0xC0, + ADR = 5, + CONTROL = 0, + Min = 128, + PMIN = 97, + PSEC = 25 }); } @@ -380,22 +396,34 @@ namespace Aaru.DiscImages // Starting track trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = currentSession, POINT = 0xA0, ADR = 1, CONTROL = trackControl, + SessionNumber = currentSession, + POINT = 0xA0, + ADR = 1, + CONTROL = trackControl, PMIN = (byte)track.TrackSequence }); // Ending track trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = currentSession, POINT = 0xA1, ADR = 1, CONTROL = trackControl, + SessionNumber = currentSession, + POINT = 0xA1, + ADR = 1, + CONTROL = trackControl, PMIN = endingTrackNumber }); // Lead-out start trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = currentSession, POINT = 0xA2, ADR = 1, CONTROL = trackControl, - PHOUR = 0, PMIN = leadinPmsf.minute, PSEC = leadinPmsf.second, PFRAME = leadinPmsf.frame + SessionNumber = currentSession, + POINT = 0xA2, + ADR = 1, + CONTROL = trackControl, + PHOUR = 0, + PMIN = leadinPmsf.minute, + PSEC = leadinPmsf.second, + PFRAME = leadinPmsf.frame }); } @@ -404,8 +432,13 @@ namespace Aaru.DiscImages // Track trackDescriptors.Add(new FullTOC.TrackDataDescriptor { - SessionNumber = (byte)track.TrackSession, POINT = (byte)track.TrackSequence, ADR = 1, - CONTROL = trackControl, PHOUR = 0, PMIN = pmsf.minute, PSEC = pmsf.second, + SessionNumber = (byte)track.TrackSession, + POINT = (byte)track.TrackSequence, + ADR = 1, + CONTROL = trackControl, + PHOUR = 0, + PMIN = pmsf.minute, + PSEC = pmsf.second, PFRAME = pmsf.frame }); } diff --git a/Aaru.Images/CopyQM/CopyQM.cs b/Aaru.Images/CopyQM/CopyQM.cs index 499750e9e..1acdb00e8 100644 --- a/Aaru.Images/CopyQM/CopyQM.cs +++ b/Aaru.Images/CopyQM/CopyQM.cs @@ -49,16 +49,26 @@ namespace Aaru.DiscImages public CopyQm() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CopyTape/CopyTape.cs b/Aaru.Images/CopyTape/CopyTape.cs index 477c6302c..9cd742ffd 100644 --- a/Aaru.Images/CopyTape/CopyTape.cs +++ b/Aaru.Images/CopyTape/CopyTape.cs @@ -14,14 +14,23 @@ namespace Aaru.DiscImages.CopyTape public CopyTape() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, - ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, - MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/CopyTape/Read.cs b/Aaru.Images/CopyTape/Read.cs index 5a3638b03..9e70ecc9c 100644 --- a/Aaru.Images/CopyTape/Read.cs +++ b/Aaru.Images/CopyTape/Read.cs @@ -83,7 +83,10 @@ namespace Aaru.DiscImages.CopyTape { Files.Add(new TapeFile { - File = currentFile, FirstBlock = currentFileStart, LastBlock = currentBlock - 1, Partition = 0 + File = currentFile, + FirstBlock = currentFileStart, + LastBlock = currentBlock - 1, + Partition = 0 }); inFile = false; @@ -143,7 +146,9 @@ namespace Aaru.DiscImages.CopyTape { new TapePartition { - FirstBlock = 0, LastBlock = currentBlock - 1, Number = 0 + FirstBlock = 0, + LastBlock = currentBlock - 1, + Number = 0 } }; diff --git a/Aaru.Images/CopyTape/Write.cs b/Aaru.Images/CopyTape/Write.cs index 3aa1183c8..e5073cb1d 100644 --- a/Aaru.Images/CopyTape/Write.cs +++ b/Aaru.Images/CopyTape/Write.cs @@ -59,7 +59,9 @@ namespace Aaru.DiscImages.CopyTape imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/D88/D88.cs b/Aaru.Images/D88/D88.cs index 4e875f79f..5c39bd002 100644 --- a/Aaru.Images/D88/D88.cs +++ b/Aaru.Images/D88/D88.cs @@ -47,16 +47,26 @@ namespace Aaru.DiscImages public D88() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/DART/DART.cs b/Aaru.Images/DART/DART.cs index b3c1a4ba4..a5ac3849c 100644 --- a/Aaru.Images/DART/DART.cs +++ b/Aaru.Images/DART/DART.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Dart() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/DIM/DIM.cs b/Aaru.Images/DIM/DIM.cs index 8f3b9bbd5..0399b9eb9 100644 --- a/Aaru.Images/DIM/DIM.cs +++ b/Aaru.Images/DIM/DIM.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Dim() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/DiscFerret/DiscFerret.cs b/Aaru.Images/DiscFerret/DiscFerret.cs index d94009c04..71e918e54 100644 --- a/Aaru.Images/DiscFerret/DiscFerret.cs +++ b/Aaru.Images/DiscFerret/DiscFerret.cs @@ -47,16 +47,26 @@ namespace Aaru.DiscImages public DiscFerret() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/DiscJuggler/DiscJuggler.cs b/Aaru.Images/DiscJuggler/DiscJuggler.cs index ef4cf2fd9..12adca453 100644 --- a/Aaru.Images/DiscJuggler/DiscJuggler.cs +++ b/Aaru.Images/DiscJuggler/DiscJuggler.cs @@ -52,11 +52,23 @@ namespace Aaru.DiscImages public DiscJuggler() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/DiscJuggler/Read.cs b/Aaru.Images/DiscJuggler/Read.cs index 934fa31cd..a78cabd85 100644 --- a/Aaru.Images/DiscJuggler/Read.cs +++ b/Aaru.Images/DiscJuggler/Read.cs @@ -117,7 +117,9 @@ namespace Aaru.DiscImages var session = new Session { - SessionSequence = sessionSequence, EndTrack = uint.MinValue, StartTrack = uint.MaxValue + SessionSequence = sessionSequence, + EndTrack = uint.MinValue, + StartTrack = uint.MaxValue }; position += 15; @@ -564,8 +566,11 @@ namespace Aaru.DiscImages var partition = new Partition { - Description = track.TrackDescription, Length = trackLen, Sequence = track.TrackSequence, - Offset = track.TrackFileOffset, Start = track.TrackStartSector, + Description = track.TrackDescription, + Length = trackLen, + Sequence = track.TrackSequence, + Offset = track.TrackFileOffset, + Start = track.TrackStartSector, Type = track.TrackType.ToString() }; diff --git a/Aaru.Images/DiskCopy42/DiskCopy42.cs b/Aaru.Images/DiskCopy42/DiskCopy42.cs index 2e1aa3fbe..36276d0d4 100644 --- a/Aaru.Images/DiskCopy42/DiskCopy42.cs +++ b/Aaru.Images/DiskCopy42/DiskCopy42.cs @@ -61,16 +61,26 @@ namespace Aaru.DiscImages public DiskCopy42() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = "4.2", - Application = "Apple DiskCopy", - ApplicationVersion = "4.2", Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = "4.2", + Application = "Apple DiskCopy", + ApplicationVersion = "4.2", + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; ~DiskCopy42() => Close(); diff --git a/Aaru.Images/DiskCopy42/Read.cs b/Aaru.Images/DiskCopy42/Read.cs index 3a95c62c9..ff9cf27b8 100644 --- a/Aaru.Images/DiskCopy42/Read.cs +++ b/Aaru.Images/DiskCopy42/Read.cs @@ -300,8 +300,7 @@ namespace Aaru.DiscImages twiggyCache.Length - (copiedSectors * 512) - (sectorsToCopy * 512), sectorsToCopy * 512); - Array.Copy(tags, (header.TagSize / 2) + (copiedSectors * bptag), - twiggyCacheTags, + Array.Copy(tags, (header.TagSize / 2) + (copiedSectors * bptag), twiggyCacheTags, twiggyCacheTags.Length - (copiedSectors * bptag) - (sectorsToCopy * bptag), sectorsToCopy * bptag); diff --git a/Aaru.Images/DiskCopy42/Write.cs b/Aaru.Images/DiskCopy42/Write.cs index 7009e2e6c..96ed78f35 100644 --- a/Aaru.Images/DiskCopy42/Write.cs +++ b/Aaru.Images/DiskCopy42/Write.cs @@ -190,7 +190,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/DriDiskCopy/DriDiskCopy.cs b/Aaru.Images/DriDiskCopy/DriDiskCopy.cs index dbc0f03cc..3bac59548 100644 --- a/Aaru.Images/DriDiskCopy/DriDiskCopy.cs +++ b/Aaru.Images/DriDiskCopy/DriDiskCopy.cs @@ -50,14 +50,23 @@ namespace Aaru.DiscImages public DriDiskCopy() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Application = "DiskCopy", + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "DiskCopy", Creator = null, - Comments = null, MediaManufacturer = null, MediaModel = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, MediaSerialNumber = null, - MediaBarcode = null, MediaPartNumber = null, MediaSequence = 0, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, DriveModel = null, DriveSerialNumber = null, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, DriveFirmwareRevision = null }; } diff --git a/Aaru.Images/DriDiskCopy/Write.cs b/Aaru.Images/DriDiskCopy/Write.cs index d812f4b15..305fb2a68 100644 --- a/Aaru.Images/DriDiskCopy/Write.cs +++ b/Aaru.Images/DriDiskCopy/Write.cs @@ -71,7 +71,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -91,13 +93,18 @@ namespace Aaru.DiscImages footer = new DriFooter { - signature = new byte[51], bpb = new DriBpb + signature = new byte[51], + bpb = new DriBpb { - five = 5, driveCode = DriDriveCodes.mf2ed, + five = 5, + driveCode = DriDriveCodes.mf2ed, cylinders = geometry.cylinders, - bps = (ushort)imageInfo.SectorSize, sectors = (ushort)imageInfo.Sectors, - sptrack = (ushort)imageInfo.SectorsPerTrack, heads = (ushort)imageInfo.Heads, - sptrack2 = (ushort)imageInfo.SectorsPerTrack, unknown5 = new byte[144] + bps = (ushort)imageInfo.SectorSize, + sectors = (ushort)imageInfo.Sectors, + sptrack = (ushort)imageInfo.SectorsPerTrack, + heads = (ushort)imageInfo.Heads, + sptrack2 = (ushort)imageInfo.SectorsPerTrack, + unknown5 = new byte[144] } }; diff --git a/Aaru.Images/GDI/GDI.cs b/Aaru.Images/GDI/GDI.cs index fa229a07a..e77a1809d 100644 --- a/Aaru.Images/GDI/GDI.cs +++ b/Aaru.Images/GDI/GDI.cs @@ -54,11 +54,23 @@ namespace Aaru.DiscImages public Gdi() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = true, HasSessions = true, Version = null, ApplicationVersion = null, - MediaTitle = null, Creator = null, MediaManufacturer = null, MediaModel = null, - MediaPartNumber = null, MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = true, + HasSessions = true, + Version = null, + ApplicationVersion = null, + MediaTitle = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/GDI/Properties.cs b/Aaru.Images/GDI/Properties.cs index 3352d0536..5400f1515 100644 --- a/Aaru.Images/GDI/Properties.cs +++ b/Aaru.Images/GDI/Properties.cs @@ -60,13 +60,19 @@ namespace Aaru.DiscImages { var track = new Track { - TrackDescription = null, TrackStartSector = gdiTrack.StartSector, TrackPregap = gdiTrack.Pregap, - TrackSession = (ushort)(gdiTrack.HighDensity ? 2 : 1), TrackSequence = gdiTrack.Sequence, - TrackType = gdiTrack.Tracktype, TrackFilter = gdiTrack.Trackfilter, - TrackFile = gdiTrack.Trackfile, TrackFileOffset = (ulong)gdiTrack.Offset, - TrackFileType = "BINARY", TrackRawBytesPerSector = gdiTrack.Bps, - TrackBytesPerSector = gdiTrack.Tracktype == TrackType.Data ? 2048 : 2352, - TrackSubchannelType = TrackSubchannelType.None + TrackDescription = null, + TrackStartSector = gdiTrack.StartSector, + TrackPregap = gdiTrack.Pregap, + TrackSession = (ushort)(gdiTrack.HighDensity ? 2 : 1), + TrackSequence = gdiTrack.Sequence, + TrackType = gdiTrack.Tracktype, + TrackFilter = gdiTrack.Trackfilter, + TrackFile = gdiTrack.Trackfile, + TrackFileOffset = (ulong)gdiTrack.Offset, + TrackFileType = "BINARY", + TrackRawBytesPerSector = gdiTrack.Bps, + TrackBytesPerSector = gdiTrack.Tracktype == TrackType.Data ? 2048 : 2352, + TrackSubchannelType = TrackSubchannelType.None }; track.TrackEndSector = (track.TrackStartSector + gdiTrack.Sectors) - 1; diff --git a/Aaru.Images/GDI/Read.cs b/Aaru.Images/GDI/Read.cs index 7ad80a61d..36b721808 100644 --- a/Aaru.Images/GDI/Read.cs +++ b/Aaru.Images/GDI/Read.cs @@ -68,7 +68,8 @@ namespace Aaru.DiscImages // Initialize disc discimage = new GdiDisc { - Sessions = new List(), Tracks = new List() + Sessions = new List(), + Tracks = new List() }; ulong currentStart = 0; @@ -260,11 +261,14 @@ namespace Aaru.DiscImages // Index 01 var partition = new Partition { - Description = $"Track {discimage.Tracks[i].Sequence}.", Name = null, + Description = $"Track {discimage.Tracks[i].Sequence}.", + Name = null, Start = discimage.Tracks[i].StartSector, Size = discimage.Tracks[i].Sectors * discimage.Tracks[i].Bps, - Length = discimage.Tracks[i].Sectors, Sequence = discimage.Tracks[i].Sequence, - Offset = byteOffset, Type = discimage.Tracks[i].Tracktype.ToString() + Length = discimage.Tracks[i].Sectors, + Sequence = discimage.Tracks[i].Sequence, + Offset = byteOffset, + Type = discimage.Tracks[i].Tracktype.ToString() }; byteOffset += partition.Size; @@ -853,13 +857,19 @@ namespace Aaru.DiscImages { var track = new Track { - TrackDescription = null, TrackStartSector = gdiTrack.StartSector, TrackPregap = gdiTrack.Pregap, - TrackSession = (ushort)(gdiTrack.HighDensity ? 2 : 1), TrackSequence = gdiTrack.Sequence, - TrackType = gdiTrack.Tracktype, TrackFilter = gdiTrack.Trackfilter, - TrackFile = gdiTrack.Trackfile, TrackFileOffset = (ulong)gdiTrack.Offset, - TrackFileType = "BINARY", TrackRawBytesPerSector = gdiTrack.Bps, - TrackBytesPerSector = gdiTrack.Tracktype == TrackType.Data ? 2048 : 2352, - TrackSubchannelType = TrackSubchannelType.None + TrackDescription = null, + TrackStartSector = gdiTrack.StartSector, + TrackPregap = gdiTrack.Pregap, + TrackSession = (ushort)(gdiTrack.HighDensity ? 2 : 1), + TrackSequence = gdiTrack.Sequence, + TrackType = gdiTrack.Tracktype, + TrackFilter = gdiTrack.Trackfilter, + TrackFile = gdiTrack.Trackfile, + TrackFileOffset = (ulong)gdiTrack.Offset, + TrackFileType = "BINARY", + TrackRawBytesPerSector = gdiTrack.Bps, + TrackBytesPerSector = gdiTrack.Tracktype == TrackType.Data ? 2048 : 2352, + TrackSubchannelType = TrackSubchannelType.None }; track.TrackEndSector = (track.TrackStartSector + gdiTrack.Sectors) - 1; diff --git a/Aaru.Images/HDCopy/HDCopy.cs b/Aaru.Images/HDCopy/HDCopy.cs index 7694421ea..1c762989d 100644 --- a/Aaru.Images/HDCopy/HDCopy.cs +++ b/Aaru.Images/HDCopy/HDCopy.cs @@ -86,16 +86,26 @@ namespace Aaru.DiscImages public HdCopy() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/IMD/IMD.cs b/Aaru.Images/IMD/IMD.cs index 704a620e0..b22b18e4f 100644 --- a/Aaru.Images/IMD/IMD.cs +++ b/Aaru.Images/IMD/IMD.cs @@ -44,16 +44,26 @@ namespace Aaru.DiscImages public Imd() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/KryoFlux/KryoFlux.cs b/Aaru.Images/KryoFlux/KryoFlux.cs index dcc13e88e..7fee14197 100644 --- a/Aaru.Images/KryoFlux/KryoFlux.cs +++ b/Aaru.Images/KryoFlux/KryoFlux.cs @@ -46,16 +46,26 @@ namespace Aaru.DiscImages public KryoFlux() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/MaxiDisk/MaxiDisk.cs b/Aaru.Images/MaxiDisk/MaxiDisk.cs index 67e71af1d..e3e53137e 100644 --- a/Aaru.Images/MaxiDisk/MaxiDisk.cs +++ b/Aaru.Images/MaxiDisk/MaxiDisk.cs @@ -47,14 +47,23 @@ namespace Aaru.DiscImages public MaxiDisk() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Application = "MAXI Disk", + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "MAXI Disk", Creator = null, - Comments = null, MediaManufacturer = null, MediaModel = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, MediaSerialNumber = null, - MediaBarcode = null, MediaPartNumber = null, MediaSequence = 0, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, DriveModel = null, DriveSerialNumber = null, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, DriveFirmwareRevision = null }; } diff --git a/Aaru.Images/MaxiDisk/Write.cs b/Aaru.Images/MaxiDisk/Write.cs index e47a1cc2e..90822ffb2 100644 --- a/Aaru.Images/MaxiDisk/Write.cs +++ b/Aaru.Images/MaxiDisk/Write.cs @@ -74,9 +74,12 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors, - Cylinders = geometry.cylinders, - Heads = geometry.heads, SectorsPerTrack = geometry.sectorsPerTrack + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors, + Cylinders = geometry.cylinders, + Heads = geometry.heads, + SectorsPerTrack = geometry.sectorsPerTrack }; if(imageInfo.Cylinders > 90) @@ -208,8 +211,10 @@ namespace Aaru.DiscImages var header = new HdkHeader { - diskType = (byte)HdkDiskTypes.Dos2880, cylinders = (byte)imageInfo.Cylinders, - heads = (byte)imageInfo.Heads, sectorsPerTrack = (byte)imageInfo.SectorsPerTrack + diskType = (byte)HdkDiskTypes.Dos2880, + cylinders = (byte)imageInfo.Cylinders, + heads = (byte)imageInfo.Heads, + sectorsPerTrack = (byte)imageInfo.SectorsPerTrack }; for(uint i = imageInfo.SectorSize / 128; i > 1;) diff --git a/Aaru.Images/NDIF/NDIF.cs b/Aaru.Images/NDIF/NDIF.cs index f20dfd515..395f62691 100644 --- a/Aaru.Images/NDIF/NDIF.cs +++ b/Aaru.Images/NDIF/NDIF.cs @@ -55,16 +55,26 @@ namespace Aaru.DiscImages public Ndif() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/NHDr0/NHDr0.cs b/Aaru.Images/NHDr0/NHDr0.cs index 0e740fbea..f40e036b5 100644 --- a/Aaru.Images/NHDr0/NHDr0.cs +++ b/Aaru.Images/NHDr0/NHDr0.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Nhdr0() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/NHDr0/Write.cs b/Aaru.Images/NHDr0/Write.cs index 021c29f33..ea8c4322a 100644 --- a/Aaru.Images/NHDr0/Write.cs +++ b/Aaru.Images/NHDr0/Write.cs @@ -64,7 +64,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -207,10 +209,13 @@ namespace Aaru.DiscImages var header = new Nhdr0Header { - szFileID = signature, szComment = new byte[0x100], + szFileID = signature, + szComment = new byte[0x100], dwHeadSize = Marshal.SizeOf(), - dwCylinder = (byte)imageInfo.Cylinders, wHead = (byte)imageInfo.Heads, - wSect = (byte)imageInfo.SectorsPerTrack, wSectLen = (byte)imageInfo.SectorSize, + dwCylinder = (byte)imageInfo.Cylinders, + wHead = (byte)imageInfo.Heads, + wSect = (byte)imageInfo.SectorsPerTrack, + wSectLen = (byte)imageInfo.SectorSize, reserved2 = new byte[2], reserved3 = new byte[0xE0] }; diff --git a/Aaru.Images/Nero/Nero.cs b/Aaru.Images/Nero/Nero.cs index b9f456fcb..e6f3d6117 100644 --- a/Aaru.Images/Nero/Nero.cs +++ b/Aaru.Images/Nero/Nero.cs @@ -77,7 +77,8 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List() + ReadableSectorTags = new List(), + ReadableMediaTags = new List() }; neroSessions = new Dictionary(); diff --git a/Aaru.Images/Nero/Read.cs b/Aaru.Images/Nero/Read.cs index ce64ede44..daf2af393 100644 --- a/Aaru.Images/Nero/Read.cs +++ b/Aaru.Images/Nero/Read.cs @@ -132,7 +132,9 @@ namespace Aaru.DiscImages var newCuesheetV1 = new NeroV1Cuesheet { - ChunkId = chunkId, ChunkSize = chunkLength, Entries = new List() + ChunkId = chunkId, + ChunkSize = chunkLength, + Entries = new List() }; byte[] tmpbuffer = new byte[8]; @@ -190,7 +192,9 @@ namespace Aaru.DiscImages var newCuesheetV2 = new NeroV2Cuesheet { - ChunkId = chunkId, ChunkSize = chunkLength, Entries = new List() + ChunkId = chunkId, + ChunkSize = chunkLength, + Entries = new List() }; byte[] tmpbuffer = new byte[8]; @@ -240,7 +244,8 @@ namespace Aaru.DiscImages neroDaov1 = new NeroV1Dao { - ChunkId = chunkId, ChunkSizeBe = chunkLength + ChunkId = chunkId, + ChunkSizeBe = chunkLength }; byte[] tmpbuffer = new byte[22]; @@ -325,10 +330,16 @@ namespace Aaru.DiscImages var neroTrack = new NeroTrack { - EndOfTrack = entry.EndOfTrack, Isrc = entry.Isrc, - Length = entry.EndOfTrack - entry.Index0, Mode = entry.Mode, Offset = entry.Index0, - SectorSize = entry.SectorSize, StartLba = currentSector, Index0 = entry.Index0, - Index1 = entry.Index1, Sequence = currenttrack + EndOfTrack = entry.EndOfTrack, + Isrc = entry.Isrc, + Length = entry.EndOfTrack - entry.Index0, + Mode = entry.Mode, + Offset = entry.Index0, + SectorSize = entry.SectorSize, + StartLba = currentSector, + Index0 = entry.Index0, + Index1 = entry.Index1, + Sequence = currenttrack }; neroTrack.Sectors = neroTrack.Length / entry.SectorSize; @@ -350,7 +361,8 @@ namespace Aaru.DiscImages neroDaov2 = new NeroV2Dao { - ChunkId = chunkId, ChunkSizeBe = chunkLength + ChunkId = chunkId, + ChunkSizeBe = chunkLength }; byte[] tmpbuffer = new byte[22]; @@ -435,10 +447,16 @@ namespace Aaru.DiscImages var neroTrack = new NeroTrack { - EndOfTrack = entry.EndOfTrack, Isrc = entry.Isrc, - Length = entry.EndOfTrack - entry.Index0, Mode = entry.Mode, Offset = entry.Index0, - SectorSize = entry.SectorSize, StartLba = currentSector, Index0 = entry.Index0, - Index1 = entry.Index1, Sequence = currenttrack + EndOfTrack = entry.EndOfTrack, + Isrc = entry.Isrc, + Length = entry.EndOfTrack - entry.Index0, + Mode = entry.Mode, + Offset = entry.Index0, + SectorSize = entry.SectorSize, + StartLba = currentSector, + Index0 = entry.Index0, + Index1 = entry.Index1, + Sequence = currenttrack }; neroTrack.Sectors = neroTrack.Length / entry.SectorSize; @@ -460,7 +478,9 @@ namespace Aaru.DiscImages neroCdtxt = new NeroCdText { - ChunkId = chunkId, ChunkSize = chunkLength, Packs = new List() + ChunkId = chunkId, + ChunkSize = chunkLength, + Packs = new List() }; byte[] tmpbuffer = new byte[18]; @@ -511,7 +531,9 @@ namespace Aaru.DiscImages neroTaov1 = new NeroV1Tao { - ChunkId = chunkId, ChunkSize = chunkLength, Tracks = new List() + ChunkId = chunkId, + ChunkSize = chunkLength, + Tracks = new List() }; byte[] tmpbuffer = new byte[20]; @@ -551,10 +573,15 @@ namespace Aaru.DiscImages var neroTrack = new NeroTrack { - EndOfTrack = entry.Offset + entry.Length, Isrc = new byte[12], - Length = entry.Length, Mode = entry.Mode, Offset = entry.Offset, - SectorSize = NeroTrackModeToBytesPerSector((DaoMode)entry.Mode), - StartLba = entry.StartLba, UseLbaForIndex = true, Sequence = currenttrack + EndOfTrack = entry.Offset + entry.Length, + Isrc = new byte[12], + Length = entry.Length, + Mode = entry.Mode, + Offset = entry.Offset, + SectorSize = NeroTrackModeToBytesPerSector((DaoMode)entry.Mode), + StartLba = entry.StartLba, + UseLbaForIndex = true, + Sequence = currenttrack }; neroTrack.Sectors = @@ -577,7 +604,9 @@ namespace Aaru.DiscImages neroTaov2 = new NeroV2Tao { - ChunkId = chunkId, ChunkSize = chunkLength, Tracks = new List() + ChunkId = chunkId, + ChunkSize = chunkLength, + Tracks = new List() }; byte[] tmpbuffer = new byte[32]; @@ -621,8 +650,11 @@ namespace Aaru.DiscImages var neroTrack = new NeroTrack { - EndOfTrack = entry.Offset + entry.Length, Isrc = new byte[12], - Length = entry.Length, Mode = entry.Mode, Offset = entry.Offset, + EndOfTrack = entry.Offset + entry.Length, + Isrc = new byte[12], + Length = entry.Length, + Mode = entry.Mode, + Offset = entry.Offset, UseLbaForIndex = true }; @@ -667,7 +699,8 @@ namespace Aaru.DiscImages neroMediaTyp = new NeroMediaType { - ChunkId = chunkId, ChunkSize = chunkLength + ChunkId = chunkId, + ChunkSize = chunkLength }; byte[] tmpbuffer = new byte[4]; @@ -689,7 +722,8 @@ namespace Aaru.DiscImages neroDiscInfo = new NeroDiscInformation { - ChunkId = chunkId, ChunkSize = chunkLength + ChunkId = chunkId, + ChunkSize = chunkLength }; byte[] tmpbuffer = new byte[4]; @@ -709,7 +743,8 @@ namespace Aaru.DiscImages neroRelo = new NeroReloChunk { - ChunkId = chunkId, ChunkSize = chunkLength + ChunkId = chunkId, + ChunkSize = chunkLength }; byte[] tmpbuffer = new byte[4]; @@ -729,7 +764,8 @@ namespace Aaru.DiscImages neroToc = new NeroTocChunk { - ChunkId = chunkId, ChunkSize = chunkLength + ChunkId = chunkId, + ChunkSize = chunkLength }; byte[] tmpbuffer = new byte[2]; @@ -958,7 +994,8 @@ namespace Aaru.DiscImages if(currentsessioncurrenttrack == 1) currentsessionstruct = new Session { - SessionSequence = currentsession, StartSector = track.TrackStartSector, + SessionSequence = currentsession, + StartSector = track.TrackStartSector, StartTrack = track.TrackSequence }; @@ -990,9 +1027,12 @@ namespace Aaru.DiscImages var partition = new Partition { - Description = $"Track {track.TrackSequence}", Size = neroTrack.EndOfTrack - neroTrack.Index1, - Name = StringHandlers.CToString(neroTrack.Isrc), Sequence = partitionSequence, - Offset = partitionStartByte, Start = (ulong)track.Indexes[1], + Description = $"Track {track.TrackSequence}", + Size = neroTrack.EndOfTrack - neroTrack.Index1, + Name = StringHandlers.CToString(neroTrack.Isrc), + Sequence = partitionSequence, + Offset = partitionStartByte, + Start = (ulong)track.Indexes[1], Type = NeroTrackModeToTrackType((DaoMode)neroTrack.Mode).ToString() }; diff --git a/Aaru.Images/Parallels/Parallels.cs b/Aaru.Images/Parallels/Parallels.cs index 093bbc36c..3b8cf7695 100644 --- a/Aaru.Images/Parallels/Parallels.cs +++ b/Aaru.Images/Parallels/Parallels.cs @@ -54,16 +54,26 @@ namespace Aaru.DiscImages public Parallels() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = "2", - Application = "Parallels", - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = "2", + Application = "Parallels", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Parallels/Write.cs b/Aaru.Images/Parallels/Write.cs index eba0d7358..464adf7eb 100644 --- a/Aaru.Images/Parallels/Write.cs +++ b/Aaru.Images/Parallels/Write.cs @@ -71,7 +71,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -97,9 +99,13 @@ namespace Aaru.DiscImages pHdr = new ParallelsHeader { - magic = parallelsMagic, version = PARALLELS_VERSION, sectors = sectors, - in_use = PARALLELS_CLOSED, - bat_entries = batEntries, data_off = headerSectors, cluster_size = DEFAULT_CLUSTER_SIZE / 512 + magic = parallelsMagic, + version = PARALLELS_VERSION, + sectors = sectors, + in_use = PARALLELS_CLOSED, + bat_entries = batEntries, + data_off = headerSectors, + cluster_size = DEFAULT_CLUSTER_SIZE / 512 }; bat = new uint[batEntries]; diff --git a/Aaru.Images/PartClone/PartClone.cs b/Aaru.Images/PartClone/PartClone.cs index 66aeda7e9..c8f24a59c 100644 --- a/Aaru.Images/PartClone/PartClone.cs +++ b/Aaru.Images/PartClone/PartClone.cs @@ -54,14 +54,23 @@ namespace Aaru.DiscImages public PartClone() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, - Application = "PartClone", ApplicationVersion = null, - Creator = null, Comments = null, MediaManufacturer = null, + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "PartClone", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, MediaModel = null, - MediaSerialNumber = null, MediaBarcode = null, MediaPartNumber = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, MediaSequence = 0, - LastMediaSequence = 0, DriveManufacturer = null, DriveModel = null, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null }; diff --git a/Aaru.Images/Partimage/Partimage.cs b/Aaru.Images/Partimage/Partimage.cs index 7509ddf39..f981cf4e1 100644 --- a/Aaru.Images/Partimage/Partimage.cs +++ b/Aaru.Images/Partimage/Partimage.cs @@ -55,14 +55,23 @@ namespace Aaru.DiscImages public Partimage() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, - Application = "Partimage", ApplicationVersion = null, - Creator = null, Comments = null, MediaManufacturer = null, + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "Partimage", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, MediaModel = null, - MediaSerialNumber = null, MediaBarcode = null, MediaPartNumber = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, MediaSequence = 0, - LastMediaSequence = 0, DriveManufacturer = null, DriveModel = null, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, DriveSerialNumber = null, DriveFirmwareRevision = null }; diff --git a/Aaru.Images/QCOW/QCOW.cs b/Aaru.Images/QCOW/QCOW.cs index efe06cb6f..70b6d7a85 100644 --- a/Aaru.Images/QCOW/QCOW.cs +++ b/Aaru.Images/QCOW/QCOW.cs @@ -61,16 +61,26 @@ namespace Aaru.DiscImages public Qcow() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = "1", - Application = "QEMU", - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = "1", + Application = "QEMU", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/QCOW/Write.cs b/Aaru.Images/QCOW/Write.cs index 8cd6e271e..d0184f7fe 100644 --- a/Aaru.Images/QCOW/Write.cs +++ b/Aaru.Images/QCOW/Write.cs @@ -72,7 +72,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -88,8 +90,12 @@ namespace Aaru.DiscImages qHdr = new QCowHeader { - magic = QCOW_MAGIC, version = QCOW_VERSION, size = sectors * sectorSize, cluster_bits = 12, - l2_bits = 9, l1_table_offset = (ulong)Marshal.SizeOf() + magic = QCOW_MAGIC, + version = QCOW_VERSION, + size = sectors * sectorSize, + cluster_bits = 12, + l2_bits = 9, + l1_table_offset = (ulong)Marshal.SizeOf() }; int shift = qHdr.cluster_bits + qHdr.l2_bits; diff --git a/Aaru.Images/QCOW2/QCOW2.cs b/Aaru.Images/QCOW2/QCOW2.cs index 87d9373b2..f1ad7e6e8 100644 --- a/Aaru.Images/QCOW2/QCOW2.cs +++ b/Aaru.Images/QCOW2/QCOW2.cs @@ -62,16 +62,26 @@ namespace Aaru.DiscImages public Qcow2() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = "QEMU", - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = "QEMU", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/QCOW2/Write.cs b/Aaru.Images/QCOW2/Write.cs index b6216e6e0..556962335 100644 --- a/Aaru.Images/QCOW2/Write.cs +++ b/Aaru.Images/QCOW2/Write.cs @@ -72,7 +72,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -91,9 +93,11 @@ namespace Aaru.DiscImages qHdr = new QCow2Header { - magic = QCOW_MAGIC, version = version3 ? QCOW_VERSION3 : QCOW_VERSION2, - size = sectors * sectorSize, - cluster_bits = 16, header_length = (uint)Marshal.SizeOf() + magic = QCOW_MAGIC, + version = version3 ? QCOW_VERSION3 : QCOW_VERSION2, + size = sectors * sectorSize, + cluster_bits = 16, + header_length = (uint)Marshal.SizeOf() }; clusterSize = 1 << (int)qHdr.cluster_bits; diff --git a/Aaru.Images/QED/QED.cs b/Aaru.Images/QED/QED.cs index e70028c7f..d4352ec53 100644 --- a/Aaru.Images/QED/QED.cs +++ b/Aaru.Images/QED/QED.cs @@ -60,16 +60,26 @@ namespace Aaru.DiscImages public Qed() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = "1", - Application = "QEMU", - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = "1", + Application = "QEMU", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/QED/Write.cs b/Aaru.Images/QED/Write.cs index 422bc37f0..260f9329a 100644 --- a/Aaru.Images/QED/Write.cs +++ b/Aaru.Images/QED/Write.cs @@ -72,7 +72,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -88,8 +90,12 @@ namespace Aaru.DiscImages qHdr = new QedHeader { - magic = QED_MAGIC, cluster_size = DEFAULT_CLUSTER_SIZE, table_size = DEFAULT_TABLE_SIZE, - header_size = 1, l1_table_offset = DEFAULT_CLUSTER_SIZE, image_size = sectors * sectorSize + magic = QED_MAGIC, + cluster_size = DEFAULT_CLUSTER_SIZE, + table_size = DEFAULT_TABLE_SIZE, + header_size = 1, + l1_table_offset = DEFAULT_CLUSTER_SIZE, + image_size = sectors * sectorSize }; clusterSectors = qHdr.cluster_size / 512; diff --git a/Aaru.Images/RayDIM/RayDIM.cs b/Aaru.Images/RayDIM/RayDIM.cs index a61c09f7b..6f31fb1df 100644 --- a/Aaru.Images/RayDIM/RayDIM.cs +++ b/Aaru.Images/RayDIM/RayDIM.cs @@ -46,14 +46,23 @@ namespace Aaru.DiscImages public RayDim() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, - Application = "Ray Arachelian's Disk IMage", Creator = null, - Comments = null, MediaManufacturer = null, MediaModel = null, + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "Ray Arachelian's Disk IMage", + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, MediaSerialNumber = null, - MediaBarcode = null, MediaPartNumber = null, MediaSequence = 0, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, DriveModel = null, DriveSerialNumber = null, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, DriveFirmwareRevision = null }; } diff --git a/Aaru.Images/RayDIM/Write.cs b/Aaru.Images/RayDIM/Write.cs index e69b721cd..99d1c3204 100644 --- a/Aaru.Images/RayDIM/Write.cs +++ b/Aaru.Images/RayDIM/Write.cs @@ -74,9 +74,12 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors, - Cylinders = geometry.cylinders, - Heads = geometry.heads, SectorsPerTrack = geometry.sectorsPerTrack + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors, + Cylinders = geometry.cylinders, + Heads = geometry.heads, + SectorsPerTrack = geometry.sectorsPerTrack }; try @@ -217,8 +220,10 @@ namespace Aaru.DiscImages var header = new RayHdr { - signature = Encoding.ASCII.GetBytes(headerSignature), cylinders = (byte)imageInfo.Cylinders, - diskType = RayDiskTypes.Mf2ed, heads = (byte)imageInfo.Heads, + signature = Encoding.ASCII.GetBytes(headerSignature), + cylinders = (byte)imageInfo.Cylinders, + diskType = RayDiskTypes.Mf2ed, + heads = (byte)imageInfo.Heads, sectorsPerTrack = (byte)imageInfo.SectorsPerTrack }; diff --git a/Aaru.Images/RsIde/RsIde.cs b/Aaru.Images/RsIde/RsIde.cs index 1729fc5f1..0a821adc0 100644 --- a/Aaru.Images/RsIde/RsIde.cs +++ b/Aaru.Images/RsIde/RsIde.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public RsIde() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/RsIde/Write.cs b/Aaru.Images/RsIde/Write.cs index 646820a2c..1b4fc6f0d 100644 --- a/Aaru.Images/RsIde/Write.cs +++ b/Aaru.Images/RsIde/Write.cs @@ -73,7 +73,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -231,8 +233,11 @@ namespace Aaru.DiscImages var header = new RsIdeHeader { - magic = signature, identify = new byte[106], dataOff = (ushort)Marshal.SizeOf(), - revision = 1, reserved = new byte[11] + magic = signature, + identify = new byte[106], + dataOff = (ushort)Marshal.SizeOf(), + revision = 1, + reserved = new byte[11] }; if(imageInfo.SectorSize == 256) @@ -247,18 +252,21 @@ namespace Aaru.DiscImages CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.Fixed | CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.NotMFM | CommonTypes.Structs.Devices.ATA.Identify.GeneralConfigurationBit.SoftSector, - Cylinders = (ushort)imageInfo.Cylinders, Heads = (ushort)imageInfo.Heads, - SectorsPerTrack = (ushort)imageInfo.SectorsPerTrack, VendorWord47 = 0x80, + Cylinders = (ushort)imageInfo.Cylinders, + Heads = (ushort)imageInfo.Heads, + SectorsPerTrack = (ushort)imageInfo.SectorsPerTrack, + VendorWord47 = 0x80, Capabilities = CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.DMASupport | CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.IORDY | CommonTypes.Structs.Devices.ATA.Identify.CapabilitiesBit.LBASupport, - ExtendedIdentify = - CommonTypes.Structs.Devices.ATA.Identify.ExtendedIdentifyBit.Words54to58Valid, - CurrentCylinders = (ushort)imageInfo.Cylinders, CurrentHeads = (ushort)imageInfo.Heads, + ExtendedIdentify = CommonTypes.Structs.Devices.ATA.Identify.ExtendedIdentifyBit.Words54to58Valid, + CurrentCylinders = (ushort)imageInfo.Cylinders, + CurrentHeads = (ushort)imageInfo.Heads, CurrentSectorsPerTrack = (ushort)imageInfo.SectorsPerTrack, - CurrentSectors = (uint)imageInfo.Sectors, LBASectors = (uint)imageInfo.Sectors, - DMASupported = CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0, - DMAActive = CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0 + CurrentSectors = (uint)imageInfo.Sectors, + LBASectors = (uint)imageInfo.Sectors, + DMASupported = CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0, + DMAActive = CommonTypes.Structs.Devices.ATA.Identify.TransferMode.Mode0 }; if(string.IsNullOrEmpty(imageInfo.DriveManufacturer)) diff --git a/Aaru.Images/SaveDskF/Identify.cs b/Aaru.Images/SaveDskF/Identify.cs index 521ebbf1e..8618ab289 100644 --- a/Aaru.Images/SaveDskF/Identify.cs +++ b/Aaru.Images/SaveDskF/Identify.cs @@ -52,9 +52,8 @@ namespace Aaru.DiscImages header = Marshal.ByteArrayToStructureLittleEndian(hdr); return (header.magic == SDF_MAGIC || header.magic == SDF_MAGIC_COMPRESSED || - header.magic == SDF_MAGIC_OLD) && header.fatCopies <= 2 && header.padding == 0 && - header.commentOffset < stream.Length && - header.dataOffset < stream.Length; + header.magic == SDF_MAGIC_OLD) && header.fatCopies <= 2 && header.padding == 0 && + header.commentOffset < stream.Length && header.dataOffset < stream.Length; } } } \ No newline at end of file diff --git a/Aaru.Images/SaveDskF/SaveDskF.cs b/Aaru.Images/SaveDskF/SaveDskF.cs index 0318d68cb..d1772e66b 100644 --- a/Aaru.Images/SaveDskF/SaveDskF.cs +++ b/Aaru.Images/SaveDskF/SaveDskF.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public SaveDskF() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/SaveDskF/Write.cs b/Aaru.Images/SaveDskF/Write.cs index dbfc43f57..74ab2378c 100644 --- a/Aaru.Images/SaveDskF/Write.cs +++ b/Aaru.Images/SaveDskF/Write.cs @@ -221,7 +221,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -240,9 +242,13 @@ namespace Aaru.DiscImages header = new SaveDskFHeader { - cylinders = geometry.cylinders, dataOffset = 512, heads = geometry.heads, magic = SDF_MAGIC, - sectorsCopied = (ushort)sectors, sectorsPerTrack = geometry.sectorsPerTrack, - sectorSize = (ushort)sectorSize + cylinders = geometry.cylinders, + dataOffset = 512, + heads = geometry.heads, + magic = SDF_MAGIC, + sectorsCopied = (ushort)sectors, + sectorsPerTrack = geometry.sectorsPerTrack, + sectorSize = (ushort)sectorSize }; IsWriting = true; diff --git a/Aaru.Images/SuperCardPro/Read.cs b/Aaru.Images/SuperCardPro/Read.cs index 3f3178e19..d7b650dd4 100644 --- a/Aaru.Images/SuperCardPro/Read.cs +++ b/Aaru.Images/SuperCardPro/Read.cs @@ -87,7 +87,8 @@ namespace Aaru.DiscImages var trk = new TrackHeader { - Signature = new byte[3], Entries = new TrackEntry[Header.revolutions] + Signature = new byte[3], + Entries = new TrackEntry[Header.revolutions] }; scpStream.Read(trk.Signature, 0, trk.Signature.Length); diff --git a/Aaru.Images/SuperCardPro/SuperCardPro.cs b/Aaru.Images/SuperCardPro/SuperCardPro.cs index 0ae9997e1..3a3451d21 100644 --- a/Aaru.Images/SuperCardPro/SuperCardPro.cs +++ b/Aaru.Images/SuperCardPro/SuperCardPro.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public SuperCardPro() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/T98/T98.cs b/Aaru.Images/T98/T98.cs index 1a9a4d952..2ac1a2c33 100644 --- a/Aaru.Images/T98/T98.cs +++ b/Aaru.Images/T98/T98.cs @@ -46,16 +46,26 @@ namespace Aaru.DiscImages public T98() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/T98/Write.cs b/Aaru.Images/T98/Write.cs index 996139635..66892ab12 100644 --- a/Aaru.Images/T98/Write.cs +++ b/Aaru.Images/T98/Write.cs @@ -62,7 +62,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/TeleDisk/Read.cs b/Aaru.Images/TeleDisk/Read.cs index 2efe89cdb..601703ca2 100644 --- a/Aaru.Images/TeleDisk/Read.cs +++ b/Aaru.Images/TeleDisk/Read.cs @@ -226,8 +226,10 @@ namespace Aaru.DiscImages { var teleDiskTrack = new TeleDiskTrackHeader { - Sectors = (byte)stream.ReadByte(), Cylinder = (byte)stream.ReadByte(), - Head = (byte)stream.ReadByte(), Crc = (byte)stream.ReadByte() + Sectors = (byte)stream.ReadByte(), + Cylinder = (byte)stream.ReadByte(), + Head = (byte)stream.ReadByte(), + Crc = (byte)stream.ReadByte() }; if(teleDiskTrack.Cylinder > totalCylinders) @@ -292,8 +294,10 @@ namespace Aaru.DiscImages { var teleDiskTrack = new TeleDiskTrackHeader { - Sectors = (byte)stream.ReadByte(), Cylinder = (byte)stream.ReadByte(), - Head = (byte)stream.ReadByte(), Crc = (byte)stream.ReadByte() + Sectors = (byte)stream.ReadByte(), + Cylinder = (byte)stream.ReadByte(), + Head = (byte)stream.ReadByte(), + Crc = (byte)stream.ReadByte() }; if(teleDiskTrack.Sectors == 0xFF) // End of disk image diff --git a/Aaru.Images/TeleDisk/TeleDisk.cs b/Aaru.Images/TeleDisk/TeleDisk.cs index 3b141cbdd..2155ced5b 100644 --- a/Aaru.Images/TeleDisk/TeleDisk.cs +++ b/Aaru.Images/TeleDisk/TeleDisk.cs @@ -61,14 +61,23 @@ namespace Aaru.DiscImages { imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, - Application = "Sydex TeleDisk", Comments = null, - Creator = null, MediaManufacturer = null, MediaModel = null, + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Application = "Sydex TeleDisk", + Comments = null, + Creator = null, + MediaManufacturer = null, + MediaModel = null, MediaSerialNumber = null, - MediaBarcode = null, MediaPartNumber = null, MediaSequence = 0, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, LastMediaSequence = 0, - DriveManufacturer = null, DriveModel = null, DriveSerialNumber = null, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, DriveFirmwareRevision = null }; diff --git a/Aaru.Images/UDIF/Read.cs b/Aaru.Images/UDIF/Read.cs index 955c6863e..6c0056b78 100644 --- a/Aaru.Images/UDIF/Read.cs +++ b/Aaru.Images/UDIF/Read.cs @@ -203,8 +203,11 @@ namespace Aaru.DiscImages // So let's falsify a block chunk var bChnk = new BlockChunk { - length = footer.dataForkLen, offset = footer.dataForkOff, sector = 0, sectors = footer.sectorCount, - type = CHUNK_TYPE_COPY + length = footer.dataForkLen, + offset = footer.dataForkOff, + sector = 0, + sectors = footer.sectorCount, + type = CHUNK_TYPE_COPY }; imageInfo.Sectors = footer.sectorCount; diff --git a/Aaru.Images/UDIF/UDIF.cs b/Aaru.Images/UDIF/UDIF.cs index c2c8e4dd0..cbd1c5ed9 100644 --- a/Aaru.Images/UDIF/UDIF.cs +++ b/Aaru.Images/UDIF/UDIF.cs @@ -59,16 +59,26 @@ namespace Aaru.DiscImages public Udif() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/UDIF/Write.cs b/Aaru.Images/UDIF/Write.cs index de404273b..726678c3f 100644 --- a/Aaru.Images/UDIF/Write.cs +++ b/Aaru.Images/UDIF/Write.cs @@ -65,7 +65,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -144,7 +146,8 @@ namespace Aaru.DiscImages currentChunk = new BlockChunk { - type = isEmpty ? CHUNK_TYPE_NOCOPY : CHUNK_TYPE_COPY, sector = currentSector, + type = isEmpty ? CHUNK_TYPE_NOCOPY : CHUNK_TYPE_COPY, + sector = currentSector, offset = (ulong)(isEmpty ? 0 : writingStream.Position) }; @@ -199,7 +202,8 @@ namespace Aaru.DiscImages currentChunk = new BlockChunk { - type = CHUNK_TYPE_NOCOPY, sector = currentSector + type = CHUNK_TYPE_NOCOPY, + sector = currentSector }; } @@ -256,13 +260,17 @@ namespace Aaru.DiscImages chunks.Add(imageInfo.Sectors, new BlockChunk { - type = CHUNK_TYPE_END, sector = imageInfo.Sectors + type = CHUNK_TYPE_END, + sector = imageInfo.Sectors }); var bHdr = new BlockHeader { - signature = CHUNK_SIGNATURE, version = 1, sectorCount = imageInfo.Sectors, - checksumType = UDIF_CHECKSUM_TYPE_CRC32, checksumLen = 32, + signature = CHUNK_SIGNATURE, + version = 1, + sectorCount = imageInfo.Sectors, + checksumType = UDIF_CHECKSUM_TYPE_CRC32, + checksumLen = 32, checksum = BitConverter.ToUInt32(dataForkChecksum.Final().Reverse().ToArray(), 0), chunks = (uint)chunks.Count }; @@ -331,19 +339,26 @@ namespace Aaru.DiscImages footer = new UdifFooter { - signature = UDIF_SIGNATURE, version = 4, - headerSize = 512, flags = 1, - dataForkLen = (ulong)writingStream.Length, segmentNumber = 1, segmentCount = 1, - segmentId = Guid.NewGuid(), dataForkChkType = UDIF_CHECKSUM_TYPE_CRC32, - dataForkChkLen = 32, - dataForkChk = BitConverter.ToUInt32(dataForkChecksum.Final().Reverse().ToArray(), 0), - plistOff = (ulong)writingStream.Length, plistLen = (ulong)plist.Length, + signature = UDIF_SIGNATURE, + version = 4, + headerSize = 512, + flags = 1, + dataForkLen = (ulong)writingStream.Length, + segmentNumber = 1, + segmentCount = 1, + segmentId = Guid.NewGuid(), + dataForkChkType = UDIF_CHECKSUM_TYPE_CRC32, + dataForkChkLen = 32, + dataForkChk = BitConverter.ToUInt32(dataForkChecksum.Final().Reverse().ToArray(), 0), + plistOff = (ulong)writingStream.Length, + plistLen = (ulong)plist.Length, // TODO: Find how is this calculated /*masterChkType = 2, masterChkLen = 32, masterChk = BitConverter.ToUInt32(masterChecksum.Final().Reverse().ToArray(), 0),*/ - imageVariant = 2, sectorCount = imageInfo.Sectors + imageVariant = 2, + sectorCount = imageInfo.Sectors }; writingStream.Seek(0, SeekOrigin.End); diff --git a/Aaru.Images/UkvFdi/UkvFdi.cs b/Aaru.Images/UkvFdi/UkvFdi.cs index c2b8731b3..80b414797 100644 --- a/Aaru.Images/UkvFdi/UkvFdi.cs +++ b/Aaru.Images/UkvFdi/UkvFdi.cs @@ -46,16 +46,26 @@ namespace Aaru.DiscImages public UkvFdi() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/VDI/VDI.cs b/Aaru.Images/VDI/VDI.cs index 744418b21..de2e02e25 100644 --- a/Aaru.Images/VDI/VDI.cs +++ b/Aaru.Images/VDI/VDI.cs @@ -53,16 +53,26 @@ namespace Aaru.DiscImages public Vdi() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/VDI/Write.cs b/Aaru.Images/VDI/Write.cs index 54be8a441..359b0be11 100644 --- a/Aaru.Images/VDI/Write.cs +++ b/Aaru.Images/VDI/Write.cs @@ -71,7 +71,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -100,13 +102,19 @@ namespace Aaru.DiscImages vHdr = new VdiHeader { - creator = DIC_AARU, magic = VDI_MAGIC, majorVersion = 1, + creator = DIC_AARU, + magic = VDI_MAGIC, + majorVersion = 1, minorVersion = 1, - headerSize = Marshal.SizeOf() - 72, imageType = VdiImageType.Normal, - offsetBlocks = sectorSize, offsetData = currentWritingPosition, + headerSize = Marshal.SizeOf() - 72, + imageType = VdiImageType.Normal, + offsetBlocks = sectorSize, + offsetData = currentWritingPosition, sectorSize = sectorSize, - size = sectors * sectorSize, blockSize = DEFAULT_BLOCK_SIZE, - blocks = ibmEntries, uuid = Guid.NewGuid(), + size = sectors * sectorSize, + blockSize = DEFAULT_BLOCK_SIZE, + blocks = ibmEntries, + uuid = Guid.NewGuid(), snapshotUuid = Guid.NewGuid() }; diff --git a/Aaru.Images/VHD/Read.cs b/Aaru.Images/VHD/Read.cs index 8522f23ae..121c46dab 100644 --- a/Aaru.Images/VHD/Read.cs +++ b/Aaru.Images/VHD/Read.cs @@ -122,8 +122,10 @@ namespace Aaru.DiscImages OriginalSize = BigEndianBitConverter.ToUInt64(usableHeader, 0x28), CurrentSize = BigEndianBitConverter.ToUInt64(usableHeader, 0x30), DiskGeometry = BigEndianBitConverter.ToUInt32(usableHeader, 0x38), - DiskType = BigEndianBitConverter.ToUInt32(usableHeader, 0x3C), Checksum = usableChecksum, - UniqueId = BigEndianBitConverter.ToGuid(usableHeader, 0x44), SavedState = usableHeader[0x54], + DiskType = BigEndianBitConverter.ToUInt32(usableHeader, 0x3C), + Checksum = usableChecksum, + UniqueId = BigEndianBitConverter.ToGuid(usableHeader, 0x44), + SavedState = usableHeader[0x54], Reserved = new byte[usableHeader.Length - 0x55] }; @@ -161,8 +163,7 @@ namespace Aaru.DiscImages AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.diskGeometry = 0x{0:X8} (C/H/S: {1}/{2}/{3})", thisFooter.DiskGeometry, (thisFooter.DiskGeometry & 0xFFFF0000) >> 16, - (thisFooter.DiskGeometry & 0xFF00) >> 8, - thisFooter.DiskGeometry & 0xFF); + (thisFooter.DiskGeometry & 0xFF00) >> 8, thisFooter.DiskGeometry & 0xFF); AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.diskType = 0x{0:X8}", thisFooter.DiskType); AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.checksum = 0x{0:X8}", thisFooter.Checksum); @@ -360,7 +361,8 @@ namespace Aaru.DiscImages thisDynamic = new DynamicDiskHeader { - LocatorEntries = new ParentLocatorEntry[8], Reserved2 = new byte[256] + LocatorEntries = new ParentLocatorEntry[8], + Reserved2 = new byte[256] }; for(int i = 0; i < 8; i++) diff --git a/Aaru.Images/VHD/VHD.cs b/Aaru.Images/VHD/VHD.cs index 2b85f6f32..366defaab 100644 --- a/Aaru.Images/VHD/VHD.cs +++ b/Aaru.Images/VHD/VHD.cs @@ -61,16 +61,26 @@ namespace Aaru.DiscImages public Vhd() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/VHD/Write.cs b/Aaru.Images/VHD/Write.cs index 4b2a184cc..751795213 100644 --- a/Aaru.Images/VHD/Write.cs +++ b/Aaru.Images/VHD/Write.cs @@ -65,7 +65,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -207,17 +209,20 @@ namespace Aaru.DiscImages var footer = new HardDiskFooter { - Cookie = IMAGE_COOKIE, Features = FEATURES_RESERVED, Version = VERSION1, - Timestamp = - (uint)(DateTime.Now - new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds, + Cookie = IMAGE_COOKIE, + Features = FEATURES_RESERVED, + Version = VERSION1, + Timestamp = (uint)(DateTime.Now - new DateTime(2000, 1, 1, 0, 0, 0, DateTimeKind.Utc)).TotalSeconds, CreatorApplication = CREATOR_AARU, CreatorVersion = (uint)(((thisVersion.Major & 0xFF) << 24) + ((thisVersion.Minor & 0xFF) << 16) + ((thisVersion.Build & 0xFF) << 8) + (thisVersion.Revision & 0xFF)), CreatorHostOs = DetectOS.GetRealPlatformID() == PlatformID.MacOSX ? CREATOR_MACINTOSH : CREATOR_WINDOWS, - DiskType = TYPE_FIXED, UniqueId = Guid.NewGuid(), + DiskType = TYPE_FIXED, + UniqueId = Guid.NewGuid(), DiskGeometry = ((imageInfo.Cylinders & 0xFFFF) << 16) + ((imageInfo.Heads & 0xFF) << 8) + (imageInfo.SectorsPerTrack & 0xFF), - OriginalSize = imageInfo.Sectors * 512, CurrentSize = imageInfo.Sectors * 512 + OriginalSize = imageInfo.Sectors * 512, + CurrentSize = imageInfo.Sectors * 512 }; footer.Offset = footer.DiskType == TYPE_FIXED ? ulong.MaxValue : 512; diff --git a/Aaru.Images/VHDX/Read.cs b/Aaru.Images/VHDX/Read.cs index 53506d9bf..e73a0b71b 100644 --- a/Aaru.Images/VHDX/Read.cs +++ b/Aaru.Images/VHDX/Read.cs @@ -159,7 +159,8 @@ namespace Aaru.DiscImages vFileParms = new VhdxFileParameters { - blockSize = BitConverter.ToUInt32(tmp, 0), flags = BitConverter.ToUInt32(tmp, 4) + blockSize = BitConverter.ToUInt32(tmp, 0), + flags = BitConverter.ToUInt32(tmp, 4) }; } else @@ -287,8 +288,7 @@ namespace Aaru.DiscImages // ignored } } - else if(string.Compare(entryType, VOLUME_PATH_KEY, StringComparison.OrdinalIgnoreCase) == - 0 || + else if(string.Compare(entryType, VOLUME_PATH_KEY, StringComparison.OrdinalIgnoreCase) == 0 || string.Compare(entryType, ABSOLUTE_WIN32_PATH_KEY, StringComparison.OrdinalIgnoreCase) == 0) { stream.Seek(parentEntry.valueOffset + metadataOffset, SeekOrigin.Begin); diff --git a/Aaru.Images/VHDX/VHDX.cs b/Aaru.Images/VHDX/VHDX.cs index afb46b838..8cd04ebbf 100644 --- a/Aaru.Images/VHDX/VHDX.cs +++ b/Aaru.Images/VHDX/VHDX.cs @@ -72,16 +72,26 @@ namespace Aaru.DiscImages public Vhdx() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/VMware/Constants.cs b/Aaru.Images/VMware/Constants.cs index f5f8e99db..d67602ca9 100644 --- a/Aaru.Images/VMware/Constants.cs +++ b/Aaru.Images/VMware/Constants.cs @@ -65,12 +65,11 @@ namespace Aaru.DiscImages @"^\s*createType\s*=\s*\""(?custom|monolithicSparse|monolithicFlat|twoGbMaxExtentSparse|twoGbMaxExtentFlat|fullDevice|partitionedDevice|vmfs|vmfsPreallocated|vmfsEagerZeroedThick|vmfsThin|vmfsSparse|vmfsRDM|vmfsRawDeviceMap|vmfsRDMP|vmfsPassthroughRawDeviceMap|vmfsRaw|streamOptimized)\""$"; const string REGEX_EXTENT = @"^\s*(?(RW|RDONLY|NOACCESS))\s+(?\d+)\s+(?(FLAT|SPARSE|ZERO|VMFS|VMFSSPARSE|VMFSRDM|VMFSRAW))\s+\""(?.+)\""(\s*(?\d+))?$"; - const string REGEX_DDB_TYPE = - @"^\s*ddb\.adapterType\s*=\s*\""(?ide|buslogic|lsilogic|legacyESX)\""$"; - const string REGEX_DDB_SECTORS = @"^\s*ddb\.geometry\.sectors\s*=\s*\""(?\d+)\""$"; - const string REGEX_DDB_HEADS = @"^\s*ddb\.geometry\.heads\s*=\s*\""(?\d+)\""$"; + const string REGEX_DDB_TYPE = @"^\s*ddb\.adapterType\s*=\s*\""(?ide|buslogic|lsilogic|legacyESX)\""$"; + const string REGEX_DDB_SECTORS = @"^\s*ddb\.geometry\.sectors\s*=\s*\""(?\d+)\""$"; + const string REGEX_DDB_HEADS = @"^\s*ddb\.geometry\.heads\s*=\s*\""(?\d+)\""$"; const string REGEX_DDB_CYLINDERS = @"^\s*ddb\.geometry\.cylinders\s*=\s*\""(?\d+)\""$"; - const string PARENT_REGEX = @"^\s*parentFileNameHint\s*=\s*\""(?.+)\""$"; + const string PARENT_REGEX = @"^\s*parentFileNameHint\s*=\s*\""(?.+)\""$"; const uint FLAGS_VALID_NEW_LINE = 0x01; const uint FLAGS_USE_REDUNDANT_TABLE = 0x02; diff --git a/Aaru.Images/VMware/Read.cs b/Aaru.Images/VMware/Read.cs index a1061aedd..6ce2e86ee 100644 --- a/Aaru.Images/VMware/Read.cs +++ b/Aaru.Images/VMware/Read.cs @@ -150,9 +150,12 @@ namespace Aaru.DiscImages var newExtent = new VMwareExtent { - Access = "RW", Filter = extentFilter, Filename = extentFilter.GetFilename(), - Offset = 0, - Sectors = extHdrCow.sectors, Type = "SPARSE" + Access = "RW", + Filter = extentFilter, + Filename = extentFilter.GetFilename(), + Offset = 0, + Sectors = extHdrCow.sectors, + Type = "SPARSE" }; AaruConsole.DebugWriteLine("VMware plugin", "{0} {1} {2} \"{3}\" {4}", newExtent.Access, diff --git a/Aaru.Images/VMware/VMware.cs b/Aaru.Images/VMware/VMware.cs index 3b2aa24cb..b38bb26b5 100644 --- a/Aaru.Images/VMware/VMware.cs +++ b/Aaru.Images/VMware/VMware.cs @@ -65,16 +65,26 @@ namespace Aaru.DiscImages public VMware() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = "VMware", - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = "VMware", + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/VMware/Write.cs b/Aaru.Images/VMware/Write.cs index 0fea18bfa..fa1e8ed13 100644 --- a/Aaru.Images/VMware/Write.cs +++ b/Aaru.Images/VMware/Write.cs @@ -138,7 +138,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/Virtual98/Virtual98.cs b/Aaru.Images/Virtual98/Virtual98.cs index 0b6c02e5e..73bb74f2e 100644 --- a/Aaru.Images/Virtual98/Virtual98.cs +++ b/Aaru.Images/Virtual98/Virtual98.cs @@ -48,16 +48,26 @@ namespace Aaru.DiscImages public Virtual98() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/Virtual98/Write.cs b/Aaru.Images/Virtual98/Write.cs index d815a6cca..0e4b04c4c 100644 --- a/Aaru.Images/Virtual98/Write.cs +++ b/Aaru.Images/Virtual98/Write.cs @@ -71,7 +71,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try @@ -215,11 +217,14 @@ namespace Aaru.DiscImages v98Hdr = new Virtual98Header { - comment = new byte[128], cylinders = (ushort)imageInfo.Cylinders, - padding2 = new byte[0x44], - sectors = (byte)imageInfo.SectorsPerTrack, sectorsize = (ushort)imageInfo.SectorSize, - signature = signature, surfaces = (byte)imageInfo.Heads, - totals = (uint)imageInfo.Sectors + comment = new byte[128], + cylinders = (ushort)imageInfo.Cylinders, + padding2 = new byte[0x44], + sectors = (byte)imageInfo.SectorsPerTrack, + sectorsize = (ushort)imageInfo.SectorSize, + signature = signature, + surfaces = (byte)imageInfo.Heads, + totals = (uint)imageInfo.Sectors }; if(commentsBytes != null) diff --git a/Aaru.Images/WCDiskImage/WCDiskImage.cs b/Aaru.Images/WCDiskImage/WCDiskImage.cs index ce752159d..949507468 100644 --- a/Aaru.Images/WCDiskImage/WCDiskImage.cs +++ b/Aaru.Images/WCDiskImage/WCDiskImage.cs @@ -55,16 +55,26 @@ namespace Aaru.DiscImages public WCDiskImage() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Images/ZZZRawImage/Properties.cs b/Aaru.Images/ZZZRawImage/Properties.cs index ca706f366..1a54b5f99 100644 --- a/Aaru.Images/ZZZRawImage/Properties.cs +++ b/Aaru.Images/ZZZRawImage/Properties.cs @@ -68,14 +68,14 @@ namespace Aaru.DiscImages TrackBytesPerSector = rawCompactDisc ? mode2 ? 2336 : 2048 : (int)imageInfo.SectorSize, - TrackEndSector = imageInfo.Sectors - 1, - TrackFile = rawImageFilter.GetFilename(), - TrackFileOffset = 0, - TrackFileType = "BINARY", - TrackRawBytesPerSector = rawCompactDisc ? 2352 : (int)imageInfo.SectorSize, TrackSequence = 1, - TrackStartSector = 0, - TrackSubchannelType = - hasSubchannel ? TrackSubchannelType.RawInterleaved : TrackSubchannelType.None, + TrackEndSector = imageInfo.Sectors - 1, + TrackFile = rawImageFilter.GetFilename(), + TrackFileOffset = 0, + TrackFileType = "BINARY", + TrackRawBytesPerSector = rawCompactDisc ? 2352 : (int)imageInfo.SectorSize, + TrackSequence = 1, + TrackStartSector = 0, + TrackSubchannelType = hasSubchannel ? TrackSubchannelType.RawInterleaved : TrackSubchannelType.None, TrackType = rawCompactDisc ? mode2 ? TrackType.CdMode2Formless : TrackType.CdMode1 : TrackType.Data, @@ -100,8 +100,11 @@ namespace Aaru.DiscImages var sess = new Session { - EndSector = imageInfo.Sectors - 1, EndTrack = 1, SessionSequence = 1, StartSector = 0, - StartTrack = 1 + EndSector = imageInfo.Sectors - 1, + EndTrack = 1, + SessionSequence = 1, + StartSector = 0, + StartTrack = 1 }; List lst = new List @@ -124,7 +127,10 @@ namespace Aaru.DiscImages var part = new Partition { - Start = 0, Length = imageInfo.Sectors, Offset = 0, Sequence = 0, + Start = 0, + Length = imageInfo.Sectors, + Offset = 0, + Sequence = 0, Type = rawCompactDisc ? mode2 ? "MODE2/2352" diff --git a/Aaru.Images/ZZZRawImage/Read.cs b/Aaru.Images/ZZZRawImage/Read.cs index d858df0c5..727b769f6 100644 --- a/Aaru.Images/ZZZRawImage/Read.cs +++ b/Aaru.Images/ZZZRawImage/Read.cs @@ -1212,14 +1212,18 @@ namespace Aaru.DiscImages var trk = new Track { - TrackBytesPerSector = (int)imageInfo.SectorSize, TrackEndSector = imageInfo.Sectors - 1, - TrackFilter = rawImageFilter, TrackFile = rawImageFilter.GetFilename(), - TrackFileOffset = 0, - TrackFileType = "BINARY", TrackRawBytesPerSector = (int)imageInfo.SectorSize, - TrackSequence = 1, - TrackStartSector = 0, TrackSubchannelType = TrackSubchannelType.None, - TrackType = TrackType.Data, - TrackSession = 1 + TrackBytesPerSector = (int)imageInfo.SectorSize, + TrackEndSector = imageInfo.Sectors - 1, + TrackFilter = rawImageFilter, + TrackFile = rawImageFilter.GetFilename(), + TrackFileOffset = 0, + TrackFileType = "BINARY", + TrackRawBytesPerSector = (int)imageInfo.SectorSize, + TrackSequence = 1, + TrackStartSector = 0, + TrackSubchannelType = TrackSubchannelType.None, + TrackType = TrackType.Data, + TrackSession = 1 }; List lst = new List @@ -1240,14 +1244,18 @@ namespace Aaru.DiscImages var trk = new Track { - TrackBytesPerSector = (int)imageInfo.SectorSize, TrackEndSector = imageInfo.Sectors - 1, - TrackFilter = rawImageFilter, TrackFile = rawImageFilter.GetFilename(), - TrackFileOffset = 0, - TrackFileType = "BINARY", TrackRawBytesPerSector = (int)imageInfo.SectorSize, - TrackSequence = 1, - TrackStartSector = 0, TrackSubchannelType = TrackSubchannelType.None, - TrackType = TrackType.Data, - TrackSession = 1 + TrackBytesPerSector = (int)imageInfo.SectorSize, + TrackEndSector = imageInfo.Sectors - 1, + TrackFilter = rawImageFilter, + TrackFile = rawImageFilter.GetFilename(), + TrackFileOffset = 0, + TrackFileType = "BINARY", + TrackRawBytesPerSector = (int)imageInfo.SectorSize, + TrackSequence = 1, + TrackStartSector = 0, + TrackSubchannelType = TrackSubchannelType.None, + TrackType = TrackType.Data, + TrackSession = 1 }; List lst = new List diff --git a/Aaru.Images/ZZZRawImage/Write.cs b/Aaru.Images/ZZZRawImage/Write.cs index ec7ab43fd..266b32ae9 100644 --- a/Aaru.Images/ZZZRawImage/Write.cs +++ b/Aaru.Images/ZZZRawImage/Write.cs @@ -61,7 +61,9 @@ namespace Aaru.DiscImages imageInfo = new ImageInfo { - MediaType = mediaType, SectorSize = sectorSize, Sectors = sectors + MediaType = mediaType, + SectorSize = sectorSize, + Sectors = sectors }; try diff --git a/Aaru.Images/ZZZRawImage/ZZZRawImage.cs b/Aaru.Images/ZZZRawImage/ZZZRawImage.cs index f08e4cb65..06bdfb8be 100644 --- a/Aaru.Images/ZZZRawImage/ZZZRawImage.cs +++ b/Aaru.Images/ZZZRawImage/ZZZRawImage.cs @@ -53,16 +53,26 @@ namespace Aaru.DiscImages public ZZZRawImage() => imageInfo = new ImageInfo { - ReadableSectorTags = new List(), ReadableMediaTags = new List(), - HasPartitions = false, HasSessions = false, Version = null, - Application = null, - ApplicationVersion = null, Creator = null, Comments = null, - MediaManufacturer = null, - MediaModel = null, MediaSerialNumber = null, MediaBarcode = null, - MediaPartNumber = null, - MediaSequence = 0, LastMediaSequence = 0, DriveManufacturer = null, - DriveModel = null, - DriveSerialNumber = null, DriveFirmwareRevision = null + ReadableSectorTags = new List(), + ReadableMediaTags = new List(), + HasPartitions = false, + HasSessions = false, + Version = null, + Application = null, + ApplicationVersion = null, + Creator = null, + Comments = null, + MediaManufacturer = null, + MediaModel = null, + MediaSerialNumber = null, + MediaBarcode = null, + MediaPartNumber = null, + MediaSequence = 0, + LastMediaSequence = 0, + DriveManufacturer = null, + DriveModel = null, + DriveSerialNumber = null, + DriveFirmwareRevision = null }; } } \ No newline at end of file diff --git a/Aaru.Partitions/Acorn.cs b/Aaru.Partitions/Acorn.cs index 5bd5566c7..4b0933cc1 100644 --- a/Aaru.Partitions/Acorn.cs +++ b/Aaru.Partitions/Acorn.cs @@ -121,8 +121,11 @@ namespace Aaru.Partitions { var part = new Partition { - Start = (ulong)(mapSector + entry.start), Size = entry.size, - Length = (ulong)(entry.size * sector.Length), Sequence = counter, Scheme = Name + Start = (ulong)(mapSector + entry.start), + Size = entry.size, + Length = (ulong)(entry.size * sector.Length), + Sequence = counter, + Scheme = Name }; part.Offset = part.Start * (ulong)sector.Length; @@ -147,10 +150,12 @@ namespace Aaru.Partitions { var part = new Partition { - Start = (ulong)(mapSector + entry.start), Size = entry.length, + Start = (ulong)(mapSector + entry.start), + Size = entry.length, Length = (ulong)(entry.length * sector.Length), Name = StringHandlers.CToString(entry.name, Encoding.GetEncoding("iso-8859-1")), - Sequence = counter, Scheme = Name + Sequence = counter, + Scheme = Name }; part.Offset = part.Start * (ulong)sector.Length; diff --git a/Aaru.Partitions/AppleMap.cs b/Aaru.Partitions/AppleMap.cs index 138f88aab..16cdd65e6 100644 --- a/Aaru.Partitions/AppleMap.cs +++ b/Aaru.Partitions/AppleMap.cs @@ -124,11 +124,12 @@ namespace Aaru.Partitions var part = new Partition { - Size = (ulong)(ddm.sbMap[i].ddSize * 512), - Length = (ulong)((ddm.sbMap[i].ddSize * 512) / sectorSize), Sequence = sequence, - Offset = ddm.sbMap[i].ddBlock * sectorSize, - Start = ddm.sbMap[i].ddBlock + sectorOffset, - Type = "Apple_Driver" + Size = (ulong)(ddm.sbMap[i].ddSize * 512), + Length = (ulong)((ddm.sbMap[i].ddSize * 512) / sectorSize), + Sequence = sequence, + Offset = ddm.sbMap[i].ddBlock * sectorSize, + Start = ddm.sbMap[i].ddBlock + sectorOffset, + Type = "Apple_Driver" }; if((ddm.sbMap[i].ddSize * 512) % sectorSize > 0) @@ -176,11 +177,13 @@ namespace Aaru.Partitions var part = new Partition { - Size = oldEntry.pdStart * ddm.sbBlockSize, - Length = (oldEntry.pdStart * ddm.sbBlockSize) / sectorSize, Sequence = sequence, - Offset = oldEntry.pdSize * ddm.sbBlockSize, - Start = (oldEntry.pdSize * ddm.sbBlockSize) / sectorSize, Scheme = Name, - Type = oldEntry.pdFSID == HFS_MAGIC_OLD ? "Apple_HFS" : $"0x{oldEntry.pdFSID:X8}" + Size = oldEntry.pdStart * ddm.sbBlockSize, + Length = (oldEntry.pdStart * ddm.sbBlockSize) / sectorSize, + Sequence = sequence, + Offset = oldEntry.pdSize * ddm.sbBlockSize, + Start = (oldEntry.pdSize * ddm.sbBlockSize) / sectorSize, + Scheme = Name, + Type = oldEntry.pdFSID == HFS_MAGIC_OLD ? "Apple_HFS" : $"0x{oldEntry.pdFSID:X8}" }; partitions.Add(part); @@ -315,14 +318,14 @@ namespace Aaru.Partitions var partition = new Partition { - Sequence = sequence, Type = StringHandlers.CToString(entry.type), - Name = StringHandlers.CToString(entry.name), Offset = entry.start * entrySize, - Size = entry.sectors * entrySize, + Sequence = sequence, + Type = StringHandlers.CToString(entry.type), + Name = StringHandlers.CToString(entry.name), + Offset = entry.start * entrySize, + Size = entry.sectors * entrySize, Start = ((entry.start * entrySize) / sectorSize) + sectorOffset, - Length = - (entry.sectors * - entrySize) / sectorSize, - Scheme = Name + Length = (entry.sectors * entrySize) / sectorSize, + Scheme = Name }; sb.AppendLine("Partition flags:"); diff --git a/Aaru.Partitions/Apricot.cs b/Aaru.Partitions/Apricot.cs index d67b7f6b8..f775eb2de 100644 --- a/Aaru.Partitions/Apricot.cs +++ b/Aaru.Partitions/Apricot.cs @@ -322,10 +322,13 @@ namespace Aaru.Partitions { var part = new Partition { - Start = label.partitions[i].startSector, - Size = (ulong)(label.partitions[i].sectors * label.sectorSize), - Length = label.partitions[i].sectors, Type = "ACT Apricot partition", Sequence = i, Scheme = Name, - Offset = (ulong)(label.partitions[i].startSector * label.sectorSize) + Start = label.partitions[i].startSector, + Size = (ulong)(label.partitions[i].sectors * label.sectorSize), + Length = label.partitions[i].sectors, + Type = "ACT Apricot partition", + Sequence = i, + Scheme = Name, + Offset = (ulong)(label.partitions[i].startSector * label.sectorSize) }; if(part.Start < deviceSectors && diff --git a/Aaru.Partitions/Atari.cs b/Aaru.Partitions/Atari.cs index 0cd3cd60c..3cecb8aec 100644 --- a/Aaru.Partitions/Atari.cs +++ b/Aaru.Partitions/Atari.cs @@ -70,7 +70,10 @@ 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); @@ -178,11 +181,14 @@ namespace Aaru.Partitions var part = new Partition { - Size = table.entries[i].length * sectorSize, Length = table.entries[i].length, - Sequence = partitionSequence, Name = "", + 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, - Type = Encoding.ASCII.GetString(partType), Scheme = Name + Type = Encoding.ASCII.GetString(partType), + Scheme = Name }; switch(type) @@ -296,11 +302,14 @@ namespace Aaru.Partitions var part = new Partition { - 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, Type = Encoding.ASCII.GetString(partType), - Scheme = Name + 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, + Type = Encoding.ASCII.GetString(partType), + Scheme = Name }; switch(extendedType) @@ -400,10 +409,13 @@ namespace Aaru.Partitions var part = new Partition { - Size = table.icdEntries[i].length * sectorSize, Length = table.icdEntries[i].length, - Sequence = partitionSequence, Name = "", + 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, Type = Encoding.ASCII.GetString(partType), + Start = table.icdEntries[i].start, + Type = Encoding.ASCII.GetString(partType), Scheme = Name }; diff --git a/Aaru.Partitions/BSD.cs b/Aaru.Partitions/BSD.cs index d1c7b758b..14b96a25b 100644 --- a/Aaru.Partitions/BSD.cs +++ b/Aaru.Partitions/BSD.cs @@ -170,7 +170,8 @@ namespace Aaru.Partitions 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), - Sequence = counter, Scheme = Name + Sequence = counter, + Scheme = Name }; if(dl.d_partitions[i].p_fstype == fsType.Unused) diff --git a/Aaru.Partitions/DEC.cs b/Aaru.Partitions/DEC.cs index f2df46de5..0e18cb5a7 100644 --- a/Aaru.Partitions/DEC.cs +++ b/Aaru.Partitions/DEC.cs @@ -71,8 +71,10 @@ namespace Aaru.Partitions foreach(Partition part in table.pt_part.Select(entry => new Partition { - Start = entry.pi_blkoff, Offset = (ulong)(entry.pi_blkoff * sector.Length), - Size = (ulong)entry.pi_nblocks, Length = (ulong)(entry.pi_nblocks * sector.Length), + Start = entry.pi_blkoff, + Offset = (ulong)(entry.pi_blkoff * sector.Length), + Size = (ulong)entry.pi_nblocks, + Length = (ulong)(entry.pi_nblocks * sector.Length), Sequence = counter, Scheme = Name }).Where(part => part.Size > 0)) diff --git a/Aaru.Partitions/DragonFlyBSD.cs b/Aaru.Partitions/DragonFlyBSD.cs index fac327c49..669588623 100644 --- a/Aaru.Partitions/DragonFlyBSD.cs +++ b/Aaru.Partitions/DragonFlyBSD.cs @@ -74,9 +74,8 @@ namespace Aaru.Partitions { var part = new Partition { - Start = (entry.p_boffset / imagePlugin.Info.SectorSize) + sectorOffset, - Offset = entry.p_boffset + - (sectorOffset * imagePlugin.Info.SectorSize), + Start = (entry.p_boffset / imagePlugin.Info.SectorSize) + sectorOffset, + Offset = entry.p_boffset + (sectorOffset * imagePlugin.Info.SectorSize), Size = entry.p_bsize, Length = entry.p_bsize / imagePlugin.Info.SectorSize, Name = entry.p_stor_uuid.ToString(), diff --git a/Aaru.Partitions/GPT.cs b/Aaru.Partitions/GPT.cs index e8f3e20bd..de4ce1bbb 100644 --- a/Aaru.Partitions/GPT.cs +++ b/Aaru.Partitions/GPT.cs @@ -178,8 +178,10 @@ namespace Aaru.Partitions var part = new Partition { - Description = $"ID: {entry.partitionId}", Size = ((entry.endLBA - entry.startLBA) + 1) * sectorSize, - Name = entry.name, Length = ((entry.endLBA - entry.startLBA) + 1) / divisor, + Description = $"ID: {entry.partitionId}", + Size = ((entry.endLBA - entry.startLBA) + 1) * sectorSize, + Name = entry.name, + Length = ((entry.endLBA - entry.startLBA) + 1) / divisor, Sequence = pseq++, Offset = entry.startLBA * sectorSize, Start = entry.startLBA / divisor, diff --git a/Aaru.Partitions/Human68k.cs b/Aaru.Partitions/Human68k.cs index b3519bbec..7afd04fba 100644 --- a/Aaru.Partitions/Human68k.cs +++ b/Aaru.Partitions/Human68k.cs @@ -110,10 +110,11 @@ namespace Aaru.Partitions var part = new Partition { - Start = (entry.stateStart & 0xFFFFFF) * sectsPerUnit, - Length = entry.length * sectsPerUnit, - Type = StringHandlers.CToString(entry.name, Encoding.GetEncoding(932)), Sequence = counter, - Scheme = Name + Start = (entry.stateStart & 0xFFFFFF) * sectsPerUnit, + Length = entry.length * sectsPerUnit, + Type = StringHandlers.CToString(entry.name, Encoding.GetEncoding(932)), + Sequence = counter, + Scheme = Name }; part.Offset = part.Start * (ulong)sector.Length; diff --git a/Aaru.Partitions/NeXT.cs b/Aaru.Partitions/NeXT.cs index d5b02139f..fa59a5031 100644 --- a/Aaru.Partitions/NeXT.cs +++ b/Aaru.Partitions/NeXT.cs @@ -209,9 +209,10 @@ namespace Aaru.Partitions Size = (ulong)(label.dl_dt.d_partitions[i].p_size * label.dl_dt.d_secsize), Offset = (ulong)((label.dl_dt.d_partitions[i].p_base + label.dl_dt.d_front) * label.dl_dt.d_secsize), - Type = StringHandlers.CToString(label.dl_dt.d_partitions[i].p_type), Sequence = (ulong)i, - Name = StringHandlers.CToString(label.dl_dt.d_partitions[i].p_mountpt), - Length = (ulong)((label.dl_dt.d_partitions[i].p_size * label.dl_dt.d_secsize) / sectorSize), + Type = StringHandlers.CToString(label.dl_dt.d_partitions[i].p_type), + Sequence = (ulong)i, + Name = StringHandlers.CToString(label.dl_dt.d_partitions[i].p_mountpt), + Length = (ulong)((label.dl_dt.d_partitions[i].p_size * label.dl_dt.d_secsize) / sectorSize), Start = (ulong)(((label.dl_dt.d_partitions[i].p_base + label.dl_dt.d_front) * label.dl_dt.d_secsize) / sectorSize), Scheme = Name diff --git a/Aaru.Partitions/PC98.cs b/Aaru.Partitions/PC98.cs index 2c291c677..e5ec5383b 100644 --- a/Aaru.Partitions/PC98.cs +++ b/Aaru.Partitions/PC98.cs @@ -105,7 +105,8 @@ namespace Aaru.Partitions imagePlugin.Info.SectorsPerTrack), Type = DecodePC98Sid(entry.dp_sid), Name = StringHandlers.CToString(entry.dp_name, Encoding.GetEncoding(932)).Trim(), - Sequence = counter, Scheme = Name + Sequence = counter, + Scheme = Name }; part.Offset = part.Start * imagePlugin.Info.SectorSize; diff --git a/Aaru.Partitions/Plan9.cs b/Aaru.Partitions/Plan9.cs index 38022f312..9eef33fe2 100644 --- a/Aaru.Partitions/Plan9.cs +++ b/Aaru.Partitions/Plan9.cs @@ -70,11 +70,13 @@ namespace Aaru.Partitions var part = new Partition { - Length = (end - start) + 1, - Offset = (start + sectorOffset) * imagePlugin.Info.SectorSize, - Scheme = Name, Sequence = (ulong)partitions.Count, - Size = ((end - start) + 1) * imagePlugin.Info.SectorSize, Start = start + sectorOffset, - Type = tokens[1] + Length = (end - start) + 1, + Offset = (start + sectorOffset) * imagePlugin.Info.SectorSize, + Scheme = Name, + Sequence = (ulong)partitions.Count, + Size = ((end - start) + 1) * imagePlugin.Info.SectorSize, + Start = start + sectorOffset, + Type = tokens[1] }; partitions.Add(part); diff --git a/Aaru.Partitions/RDB.cs b/Aaru.Partitions/RDB.cs index 0ab037d42..3e35d905f 100644 --- a/Aaru.Partitions/RDB.cs +++ b/Aaru.Partitions/RDB.cs @@ -409,30 +409,32 @@ namespace Aaru.Partitions var partEntry = new PartitionEntry { - Magic = BigEndianBitConverter.ToUInt32(sector, 0x00), - Size = BigEndianBitConverter.ToUInt32(sector, 0x04), - Checksum = BigEndianBitConverter.ToInt32(sector, 0x08), - TargetId = BigEndianBitConverter.ToUInt32(sector, 0x0C), - NextPtr = BigEndianBitConverter.ToUInt32(sector, 0x10), - Flags = BigEndianBitConverter.ToUInt32(sector, 0x14), - Reserved1 = BigEndianBitConverter.ToUInt32(sector, 0x18), - Reserved2 = BigEndianBitConverter.ToUInt32(sector, 0x1C), - DevFlags = BigEndianBitConverter.ToUInt32(sector, 0x20), DriveNameLen = sector[0x24], - Reserved3 = BigEndianBitConverter.ToUInt32(sector, 0x44), - Reserved4 = BigEndianBitConverter.ToUInt32(sector, 0x48), - Reserved5 = BigEndianBitConverter.ToUInt32(sector, 0x4C), - Reserved6 = BigEndianBitConverter.ToUInt32(sector, 0x50), - Reserved7 = BigEndianBitConverter.ToUInt32(sector, 0x54), - Reserved8 = BigEndianBitConverter.ToUInt32(sector, 0x58), - Reserved9 = BigEndianBitConverter.ToUInt32(sector, 0x5C), - Reserved10 = BigEndianBitConverter.ToUInt32(sector, 0x60), - Reserved11 = BigEndianBitConverter.ToUInt32(sector, 0x64), - Reserved12 = BigEndianBitConverter.ToUInt32(sector, 0x68), - Reserved13 = BigEndianBitConverter.ToUInt32(sector, 0x6C), - Reserved14 = BigEndianBitConverter.ToUInt32(sector, 0x70), - Reserved15 = BigEndianBitConverter.ToUInt32(sector, 0x74), - Reserved16 = BigEndianBitConverter.ToUInt32(sector, 0x78), - Reserved17 = BigEndianBitConverter.ToUInt32(sector, 0x7C), DosEnvVec = new DosEnvironmentVector + Magic = BigEndianBitConverter.ToUInt32(sector, 0x00), + Size = BigEndianBitConverter.ToUInt32(sector, 0x04), + Checksum = BigEndianBitConverter.ToInt32(sector, 0x08), + TargetId = BigEndianBitConverter.ToUInt32(sector, 0x0C), + NextPtr = BigEndianBitConverter.ToUInt32(sector, 0x10), + Flags = BigEndianBitConverter.ToUInt32(sector, 0x14), + Reserved1 = BigEndianBitConverter.ToUInt32(sector, 0x18), + Reserved2 = BigEndianBitConverter.ToUInt32(sector, 0x1C), + DevFlags = BigEndianBitConverter.ToUInt32(sector, 0x20), + DriveNameLen = sector[0x24], + Reserved3 = BigEndianBitConverter.ToUInt32(sector, 0x44), + Reserved4 = BigEndianBitConverter.ToUInt32(sector, 0x48), + Reserved5 = BigEndianBitConverter.ToUInt32(sector, 0x4C), + Reserved6 = BigEndianBitConverter.ToUInt32(sector, 0x50), + Reserved7 = BigEndianBitConverter.ToUInt32(sector, 0x54), + Reserved8 = BigEndianBitConverter.ToUInt32(sector, 0x58), + Reserved9 = BigEndianBitConverter.ToUInt32(sector, 0x5C), + Reserved10 = BigEndianBitConverter.ToUInt32(sector, 0x60), + Reserved11 = BigEndianBitConverter.ToUInt32(sector, 0x64), + Reserved12 = BigEndianBitConverter.ToUInt32(sector, 0x68), + Reserved13 = BigEndianBitConverter.ToUInt32(sector, 0x6C), + Reserved14 = BigEndianBitConverter.ToUInt32(sector, 0x70), + Reserved15 = BigEndianBitConverter.ToUInt32(sector, 0x74), + Reserved16 = BigEndianBitConverter.ToUInt32(sector, 0x78), + Reserved17 = BigEndianBitConverter.ToUInt32(sector, 0x7C), + DosEnvVec = new DosEnvironmentVector { Size = BigEndianBitConverter.ToUInt32(sector, 0x80), BlockSize = BigEndianBitConverter.ToUInt32(sector, 0x84), @@ -585,7 +587,8 @@ namespace Aaru.Partitions Reserved2 = BigEndianBitConverter.ToUInt32(sector, 0x1C), DosType = BigEndianBitConverter.ToUInt32(sector, 0x20), Version = BigEndianBitConverter.ToUInt32(sector, 0x24), - PatchFlags = BigEndianBitConverter.ToUInt32(sector, 0x28), Dnode = new DeviceNode + PatchFlags = BigEndianBitConverter.ToUInt32(sector, 0x28), + Dnode = new DeviceNode { Type = BigEndianBitConverter.ToUInt32(sector, 0x2C), Task = BigEndianBitConverter.ToUInt32(sector, 0x30), @@ -691,19 +694,19 @@ namespace Aaru.Partitions foreach(Partition entry in partitionEntries.Select(rdbEntry => new Partition { - Description = AmigaDosTypeToDescriptionString(rdbEntry.DosEnvVec.DosType), Name = rdbEntry.DriveName, - Sequence = sequence, + Description = AmigaDosTypeToDescriptionString(rdbEntry.DosEnvVec.DosType), + Name = rdbEntry.DriveName, + Sequence = sequence, Length = ((rdbEntry.DosEnvVec.HighCylinder + 1) - rdbEntry.DosEnvVec.LowCylinder) * - rdbEntry.DosEnvVec.Surfaces * - rdbEntry.DosEnvVec.Bpt, + rdbEntry.DosEnvVec.Surfaces * rdbEntry.DosEnvVec.Bpt, Start = (rdbEntry.DosEnvVec.LowCylinder * rdbEntry.DosEnvVec.Surfaces * rdbEntry.DosEnvVec.Bpt) + sectorOffset, - Type = AmigaDosTypeToString(rdbEntry.DosEnvVec.DosType), Scheme = Name, + Type = AmigaDosTypeToString(rdbEntry.DosEnvVec.DosType), + Scheme = Name, Offset = ((rdbEntry.DosEnvVec.LowCylinder * rdbEntry.DosEnvVec.Surfaces * rdbEntry.DosEnvVec.Bpt) + sectorOffset) * rdb.BlockSize, Size = ((rdbEntry.DosEnvVec.HighCylinder + 1) - rdbEntry.DosEnvVec.LowCylinder) * - rdbEntry.DosEnvVec.Surfaces * - rdbEntry.DosEnvVec.Bpt * rdb.BlockSize + rdbEntry.DosEnvVec.Surfaces * rdbEntry.DosEnvVec.Bpt * rdb.BlockSize })) { partitions.Add(entry); diff --git a/Aaru.Partitions/RioKarma.cs b/Aaru.Partitions/RioKarma.cs index b8449293f..9bd282336 100644 --- a/Aaru.Partitions/RioKarma.cs +++ b/Aaru.Partitions/RioKarma.cs @@ -66,10 +66,13 @@ namespace Aaru.Partitions partitions = (from entry in table.entries let part = new Partition { - Start = entry.offset, Offset = (ulong)(entry.offset * sector.Length), - Size = entry.size, Length = (ulong)(entry.size * sector.Length), + Start = entry.offset, + Offset = (ulong)(entry.offset * sector.Length), + Size = entry.size, + Length = (ulong)(entry.size * sector.Length), Type = "Rio Karma", - Sequence = counter++, Scheme = Name + Sequence = counter++, + Scheme = Name } where entry.type == ENTRY_MAGIC select part).ToList(); return true; diff --git a/Aaru.Partitions/SGI.cs b/Aaru.Partitions/SGI.cs index 8e345f78c..ab547a01c 100644 --- a/Aaru.Partitions/SGI.cs +++ b/Aaru.Partitions/SGI.cs @@ -148,8 +148,10 @@ namespace Aaru.Partitions Offset = dvh.partitions[i].first_block * dvh.device_params.dp_secbytes, Length = (dvh.partitions[i].num_blocks * dvh.device_params.dp_secbytes) / imagePlugin.Info.SectorSize, - Size = dvh.partitions[i].num_blocks * dvh.device_params.dp_secbytes, - Type = TypeToString(dvh.partitions[i].type), Sequence = counter, Scheme = Name + Size = dvh.partitions[i].num_blocks * dvh.device_params.dp_secbytes, + Type = TypeToString(dvh.partitions[i].type), + Sequence = counter, + Scheme = Name }; if(part.Size <= 0 || diff --git a/Aaru.Partitions/Sun.cs b/Aaru.Partitions/Sun.cs index cfb060558..ac9db653e 100644 --- a/Aaru.Partitions/Sun.cs +++ b/Aaru.Partitions/Sun.cs @@ -259,15 +259,15 @@ namespace Aaru.Partitions var part = new Partition { Description = SunFlagsToString(dkl8.dkl_vtoc.v_part[i].p_flag), - Size = (ulong)dkl8.dkl_map[i].dkl_nblk * DK_LABEL_SIZE, - Length = - (ulong)((dkl8.dkl_map[i].dkl_nblk * DK_LABEL_SIZE) / imagePlugin.Info.SectorSize), + Size = (ulong)dkl8.dkl_map[i].dkl_nblk * DK_LABEL_SIZE, + Length = (ulong)((dkl8.dkl_map[i].dkl_nblk * DK_LABEL_SIZE) / imagePlugin.Info.SectorSize), Sequence = (ulong)i, Offset = (((ulong)dkl8.dkl_map[i].dkl_cylno * sectorsPerCylinder) + sectorOffset) * DK_LABEL_SIZE, Start = ((((ulong)dkl8.dkl_map[i].dkl_cylno * sectorsPerCylinder) + sectorOffset) * DK_LABEL_SIZE) / imagePlugin.Info.SectorSize, - Type = SunIdToString(dkl8.dkl_vtoc.v_part[i].p_tag), Scheme = Name + Type = SunIdToString(dkl8.dkl_vtoc.v_part[i].p_tag), + Scheme = Name }; if(dkl8.dkl_vtoc.v_timestamp[i] != 0) @@ -350,7 +350,8 @@ namespace Aaru.Partitions dkl16.dkl_vtoc.v_sectorsz, Start = (((ulong)dkl16.dkl_vtoc.v_part[i].p_start + sectorOffset) * dkl16.dkl_vtoc.v_sectorsz) / imagePlugin.Info.SectorSize, - Type = SunIdToString(dkl16.dkl_vtoc.v_part[i].p_tag), Scheme = Name + Type = SunIdToString(dkl16.dkl_vtoc.v_part[i].p_tag), + Scheme = Name }; if(dkl16.dkl_vtoc.v_timestamp[i] != 0) diff --git a/Aaru.Partitions/UNIX.cs b/Aaru.Partitions/UNIX.cs index f27bf1739..2a4a6f5a1 100644 --- a/Aaru.Partitions/UNIX.cs +++ b/Aaru.Partitions/UNIX.cs @@ -47,43 +47,91 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9600, - Start = 0, Size = 4915200, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9600, + Start = 0, + Size = 4915200, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 20000, - Start = 9600, Size = 10240000, Offset = 4915200, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 20000, + Start = 9600, + Size = 10240000, + Offset = 4915200, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 29600, Size = 102400, Offset = 15155200, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 29600, + Size = 102400, + Offset = 15155200, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6000, - Start = 29800, Size = 3072000, Offset = 15257600, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6000, + Start = 29800, + Size = 3072000, + Offset = 15257600, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 363376, - Start = 35800, Size = 186048512, Offset = 18329600, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 363376, + Start = 35800, + Size = 186048512, + Offset = 18329600, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 181688, - Start = 35800, Size = 93024256, Offset = 18329600, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 181688, + Start = 35800, + Size = 93024256, + Offset = 18329600, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 181688, - Start = 217488, Size = 93024256, Offset = 111353856, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 181688, + Start = 217488, + Size = 93024256, + Offset = 111353856, + Sequence = 5 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 1000, - Start = 399176, Size = 512000, Offset = 204378112, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 1000, + Start = 399176, + Size = 512000, + Offset = 204378112, + Sequence = 8 } }; @@ -91,33 +139,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9600, - Start = 0, Size = 4915200, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9600, + Start = 0, + Size = 4915200, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 20000, - Start = 9600, Size = 10240000, Offset = 4915200, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 20000, + Start = 9600, + Size = 10240000, + Offset = 4915200, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 29600, Size = 102400, Offset = 15155200, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 29600, + Size = 102400, + Offset = 15155200, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6000, - Start = 29800, Size = 3072000, Offset = 15257600, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6000, + Start = 29800, + Size = 3072000, + Offset = 15257600, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 200412, - Start = 35800, Size = 102610944, Offset = 18329600, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 200412, + Start = 35800, + Size = 102610944, + Offset = 18329600, + Sequence = 3 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 1000, - Start = 236212, Size = 512000, Offset = 120940544, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 1000, + Start = 236212, + Size = 512000, + Offset = 120940544, + Sequence = 8 } }; @@ -125,48 +209,102 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9600, - Start = 0, Size = 4915200, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9600, + Start = 0, + Size = 4915200, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 20000, - Start = 9600, Size = 10240000, Offset = 4915200, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 20000, + Start = 9600, + Size = 10240000, + Offset = 4915200, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 29600, Size = 102400, Offset = 15155200, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 29600, + Size = 102400, + Offset = 15155200, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6000, - Start = 29800, Size = 3072000, Offset = 15257600, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6000, + Start = 29800, + Size = 3072000, + Offset = 15257600, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 854272, - Start = 35800, Size = 437387264, Offset = 18329600, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 854272, + Start = 35800, + Size = 437387264, + Offset = 18329600, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 181688, - Start = 35800, Size = 93024256, Offset = 18329600, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 181688, + Start = 35800, + Size = 93024256, + Offset = 18329600, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 181688, - Start = 217488, Size = 93024256, Offset = 111353856, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 181688, + Start = 217488, + Size = 93024256, + Offset = 111353856, + Sequence = 5 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 490896, - Start = 399176, Size = 251338752, Offset = 204378112, Sequence = 6 + Description = null, + Name = "user", + Type = "data", + Length = 490896, + Start = 399176, + Size = 251338752, + Offset = 204378112, + Sequence = 6 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 1000, - Start = 890072, Size = 512000, Offset = 455716864, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 1000, + Start = 890072, + Size = 512000, + Offset = 455716864, + Sequence = 8 } }; @@ -174,38 +312,80 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9000, - Start = 0, Size = 4608000, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9000, + Start = 0, + Size = 4608000, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 9000, Size = 102400, Offset = 4608000, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 9000, + Size = 102400, + Offset = 4608000, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 4000, - Start = 9200, Size = 2048000, Offset = 4710400, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 4000, + Start = 9200, + Size = 2048000, + Offset = 4710400, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 37600, - Start = 13200, Size = 19251200, Offset = 6758400, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 37600, + Start = 13200, + Size = 19251200, + Offset = 6758400, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 12000, - Start = 13200, Size = 6144000, Offset = 6758400, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 12000, + Start = 13200, + Size = 6144000, + Offset = 6758400, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 25600, - Start = 25200, Size = 13107200, Offset = 6758400, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 25600, + Start = 25200, + Size = 13107200, + Offset = 6758400, + Sequence = 5 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 102, - Start = 890072, Size = 50800, Offset = 26009600, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 102, + Start = 890072, + Size = 50800, + Offset = 26009600, + Sequence = 8 } }; @@ -213,28 +393,58 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9700, - Start = 0, Size = 4966400, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9700, + Start = 0, + Size = 4966400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 9700, Size = 51200, Offset = 4966400, Sequence = 5 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 9700, + Size = 51200, + Offset = 4966400, + Sequence = 5 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3000, - Start = 9800, Size = 1536000, Offset = 5017600, Sequence = 5 + Description = null, + Name = "swap", + Type = "swap", + Length = 3000, + Start = 9800, + Size = 1536000, + Offset = 5017600, + Sequence = 5 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 28728, - Start = 12800, Size = 14708736, Offset = 6553600, Sequence = 6 + Description = null, + Name = "/usr", + Type = "data", + Length = 28728, + Start = 12800, + Size = 14708736, + Offset = 6553600, + Sequence = 6 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 41528, Size = 16384, Offset = 21262336, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 41528, + Size = 16384, + Offset = 21262336, + Sequence = 8 } }; @@ -242,33 +452,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9700, - Start = 0, Size = 4966400, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9700, + Start = 0, + Size = 4966400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 17300, - Start = 9700, Size = 102400, Offset = 4966400, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 17300, + Start = 9700, + Size = 102400, + Offset = 4966400, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 27000, Size = 51200, Offset = 13824000, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 27000, + Size = 51200, + Offset = 13824000, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3000, - Start = 27100, Size = 1536000, Offset = 13875200, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 3000, + Start = 27100, + Size = 1536000, + Offset = 13875200, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 53072, - Start = 30100, Size = 27172864, Offset = 15411200, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 53072, + Start = 30100, + Size = 27172864, + Offset = 15411200, + Sequence = 3 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 83172, Size = 16384, Offset = 42584064, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 83172, + Size = 16384, + Offset = 42584064, + Sequence = 8 } }; @@ -276,28 +522,58 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 7460, - Start = 0, Size = 4608000, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 7460, + Start = 0, + Size = 4608000, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 40, - Start = 0, Size = 20480, Offset = 0, Sequence = 0 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 40, + Start = 0, + Size = 20480, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 2200, - Start = 0, Size = 1126400, Offset = 0, Sequence = 0 + Description = null, + Name = "swap", + Type = "swap", + Length = 2200, + Start = 0, + Size = 1126400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 11868, - Start = 9700, Size = 6076416, Offset = 6758400, Sequence = 4 + Description = null, + Name = "/usr", + Type = "data", + Length = 11868, + Start = 9700, + Size = 6076416, + Offset = 6758400, + Sequence = 4 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 21568, Size = 16384, Offset = 11042816, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 21568, + Size = 16384, + Offset = 11042816, + Sequence = 8 } }; @@ -305,33 +581,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9700, - Start = 0, Size = 4966400, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9700, + Start = 0, + Size = 4966400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 17300, - Start = 9700, Size = 8857600, Offset = 4966400, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 17300, + Start = 9700, + Size = 8857600, + Offset = 4966400, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 27000, Size = 51200, Offset = 13824000, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 27000, + Size = 51200, + Offset = 13824000, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3000, - Start = 27100, Size = 1536000, Offset = 13875200, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 3000, + Start = 27100, + Size = 1536000, + Offset = 13875200, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 30348, - Start = 30100, Size = 15538176, Offset = 15411200, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 30348, + Start = 30100, + Size = 15538176, + Offset = 15411200, + Sequence = 3 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 60448, Size = 16384, Offset = 30949376, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 60448, + Size = 16384, + Offset = 30949376, + Sequence = 8 } }; @@ -339,33 +651,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9700, - Start = 0, Size = 4966400, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9700, + Start = 0, + Size = 4966400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 17300, - Start = 9700, Size = 8857600, Offset = 4966400, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 17300, + Start = 9700, + Size = 8857600, + Offset = 4966400, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 27000, Size = 51200, Offset = 13824000, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 27000, + Size = 51200, + Offset = 13824000, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3000, - Start = 27100, Size = 1536000, Offset = 13875200, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 3000, + Start = 27100, + Size = 1536000, + Offset = 13875200, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 108540, - Start = 30100, Size = 55572480, Offset = 15411200, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 108540, + Start = 30100, + Size = 55572480, + Offset = 15411200, + Sequence = 3 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 138640, Size = 16384, Offset = 70983680, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 138640, + Size = 16384, + Offset = 70983680, + Sequence = 8 } }; @@ -373,33 +721,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9700, - Start = 0, Size = 4966400, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9700, + Start = 0, + Size = 4966400, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 17300, - Start = 9700, Size = 8857600, Offset = 4966400, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 17300, + Start = 9700, + Size = 8857600, + Offset = 4966400, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 27000, Size = 51200, Offset = 13824000, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 27000, + Size = 51200, + Offset = 13824000, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3000, - Start = 27100, Size = 1536000, Offset = 13875200, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 3000, + Start = 27100, + Size = 1536000, + Offset = 13875200, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 281068, - Start = 30100, Size = 143906816, Offset = 15411200, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 281068, + Start = 30100, + Size = 143906816, + Offset = 15411200, + Sequence = 3 }, new Partition { - Description = null, Name = "maintenance area", Type = "maintenance", Length = 32, - Start = 311168, Size = 16384, Offset = 159318016, Sequence = 8 + Description = null, + Name = "maintenance area", + Type = "maintenance", + Length = 32, + Start = 311168, + Size = 16384, + Offset = 159318016, + Sequence = 8 } }; @@ -407,28 +791,58 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 7920, - Start = 0, Size = 4055040, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 7920, + Start = 0, + Size = 4055040, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 7920, Size = 51200, Offset = 4055040, Sequence = 1 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 7920, + Size = 51200, + Offset = 4055040, + Sequence = 1 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 2936, - Start = 8020, Size = 1503232, Offset = 4106240, Sequence = 1 + Description = null, + Name = "swap", + Type = "swap", + Length = 2936, + Start = 8020, + Size = 1503232, + Offset = 4106240, + Sequence = 1 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 16126, - Start = 10956, Size = 8256512, Offset = 5609472, Sequence = 2 + Description = null, + Name = "/usr", + Type = "data", + Length = 16126, + Start = 10956, + Size = 8256512, + Offset = 5609472, + Sequence = 2 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 44, - Start = 27082, Size = 22528, Offset = 13865984, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 44, + Start = 27082, + Size = 22528, + Offset = 13865984, + Sequence = 8 } }; @@ -436,28 +850,58 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 7920, - Start = 0, Size = 4055040, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 7920, + Start = 0, + Size = 4055040, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 7920, Size = 51200, Offset = 4055040, Sequence = 1 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 7920, + Size = 51200, + Offset = 4055040, + Sequence = 1 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 2936, - Start = 8020, Size = 1503232, Offset = 4106240, Sequence = 1 + Description = null, + Name = "swap", + Type = "swap", + Length = 2936, + Start = 8020, + Size = 1503232, + Offset = 4106240, + Sequence = 1 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 42790, - Start = 10956, Size = 21908480, Offset = 5609472, Sequence = 3 + Description = null, + Name = "/usr", + Type = "data", + Length = 42790, + Start = 10956, + Size = 21908480, + Offset = 5609472, + Sequence = 3 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 44, - Start = 53746, Size = 22528, Offset = 27517952, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 44, + Start = 53746, + Size = 22528, + Offset = 27517952, + Sequence = 8 } }; @@ -465,48 +909,102 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9120, - Start = 0, Size = 4669440, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9120, + Start = 0, + Size = 4669440, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 9120, Size = 102400, Offset = 4669440, Sequence = 1 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 9120, + Size = 102400, + Offset = 4669440, + Sequence = 1 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 5400, - Start = 9320, Size = 2764800, Offset = 2764800, Sequence = 1 + Description = null, + Name = "swap", + Type = "swap", + Length = 5400, + Start = 9320, + Size = 2764800, + Offset = 2764800, + Sequence = 1 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 5600, - Start = 29120, Size = 2867200, Offset = 14909440, Sequence = 2 + Description = null, + Name = "/usr", + Type = "data", + Length = 5600, + Start = 29120, + Size = 2867200, + Offset = 14909440, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 96896, - Start = 34720, Size = 49610752, Offset = 17776640, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 96896, + Start = 34720, + Size = 49610752, + Offset = 17776640, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 32160, - Start = 34720, Size = 16465920, Offset = 17776640, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 32160, + Start = 34720, + Size = 16465920, + Offset = 17776640, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 32160, - Start = 66880, Size = 16465920, Offset = 34242560, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 32160, + Start = 66880, + Size = 16465920, + Offset = 34242560, + Sequence = 5 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 32576, - Start = 99040, Size = 16678912, Offset = 50708480, Sequence = 6 + Description = null, + Name = "user", + Type = "data", + Length = 32576, + Start = 99040, + Size = 16678912, + Offset = 50708480, + Sequence = 6 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 64, - Start = 131616, Size = 32768, Offset = 67387392, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 64, + Start = 131616, + Size = 32768, + Offset = 67387392, + Sequence = 8 } }; @@ -514,48 +1012,102 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 10336, - Start = 0, Size = 5292032, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 10336, + Start = 0, + Size = 5292032, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 21280, - Start = 10336, Size = 10895360, Offset = 5292032, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 21280, + Start = 10336, + Size = 10895360, + Offset = 5292032, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 31616, Size = 102400, Offset = 16187392, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 31616, + Size = 102400, + Offset = 16187392, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6388, - Start = 31816, Size = 3270656, Offset = 16289792, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6388, + Start = 31816, + Size = 3270656, + Offset = 16289792, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 462016, - Start = 38304, Size = 236552192, Offset = 19611648, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 462016, + Start = 38304, + Size = 236552192, + Offset = 19611648, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 153824, - Start = 38304, Size = 78757888, Offset = 19611648, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 153824, + Start = 38304, + Size = 78757888, + Offset = 19611648, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 153824, - Start = 192128, Size = 78757888, Offset = 98369536, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 153824, + Start = 192128, + Size = 78757888, + Offset = 98369536, + Sequence = 5 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 154368, - Start = 192128, Size = 79036416, Offset = 98369536, Sequence = 6 + Description = null, + Name = "user", + Type = "data", + Length = 154368, + Start = 192128, + Size = 79036416, + Offset = 98369536, + Sequence = 6 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 64, - Start = 421312, Size = 32768, Offset = 215711744, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 64, + Start = 421312, + Size = 32768, + Offset = 215711744, + Sequence = 8 } }; @@ -563,23 +1115,47 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 8400, - Start = 0, Size = 4300800, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 8400, + Start = 0, + Size = 4300800, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 8400, Size = 51200, Offset = 4300800, Sequence = 1 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 8400, + Size = 51200, + Offset = 4300800, + Sequence = 1 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3100, - Start = 8500, Size = 1587200, Offset = 4352000, Sequence = 1 + Description = null, + Name = "swap", + Type = "swap", + Length = 3100, + Start = 8500, + Size = 1587200, + Offset = 4352000, + Sequence = 1 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 28400, - Start = 11600, Size = 14540800, Offset = 5939200, Sequence = 2 + Description = null, + Name = "/usr", + Type = "data", + Length = 28400, + Start = 11600, + Size = 14540800, + Offset = 5939200, + Sequence = 2 } }; @@ -587,23 +1163,47 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 8400, - Start = 0, Size = 4300800, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 8400, + Start = 0, + Size = 4300800, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 100, - Start = 8400, Size = 51200, Offset = 4300800, Sequence = 1 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 100, + Start = 8400, + Size = 51200, + Offset = 4300800, + Sequence = 1 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 3100, - Start = 8500, Size = 1587200, Offset = 4352000, Sequence = 1 + Description = null, + Name = "swap", + Type = "swap", + Length = 3100, + Start = 8500, + Size = 1587200, + Offset = 4352000, + Sequence = 1 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 68400, - Start = 11600, Size = 35020800, Offset = 5939200, Sequence = 2 + Description = null, + Name = "/usr", + Type = "data", + Length = 68400, + Start = 11600, + Size = 35020800, + Offset = 5939200, + Sequence = 2 } }; @@ -611,33 +1211,69 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9614, - Start = 0, Size = 4922368, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9614, + Start = 0, + Size = 4922368, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 20064, - Start = 9614, Size = 10272768, Offset = 4922368, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 20064, + Start = 9614, + Size = 10272768, + Offset = 4922368, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 29678, Size = 102400, Offset = 15195136, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 29678, + Size = 102400, + Offset = 15195136, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6070, - Start = 29878, Size = 1587200, Offset = 15297536, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6070, + Start = 29878, + Size = 1587200, + Offset = 15297536, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 135806, - Start = 35948, Size = 69532672, Offset = 18405376, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 135806, + Start = 35948, + Size = 69532672, + Offset = 18405376, + Sequence = 3 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 44, - Start = 171754, Size = 22528, Offset = 87938048, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 44, + Start = 171754, + Size = 22528, + Offset = 87938048, + Sequence = 8 } }; @@ -645,43 +1281,91 @@ namespace Aaru.Partitions { new Partition { - Description = null, Name = "/", Type = "data", Length = 9614, - Start = 0, Size = 4922368, Offset = 0, Sequence = 0 + Description = null, + Name = "/", + Type = "data", + Length = 9614, + Start = 0, + Size = 4922368, + Offset = 0, + Sequence = 0 }, new Partition { - Description = null, Name = "/usr", Type = "data", Length = 20064, - Start = 9614, Size = 10272768, Offset = 4922368, Sequence = 1 + Description = null, + Name = "/usr", + Type = "data", + Length = 20064, + Start = 9614, + Size = 10272768, + Offset = 4922368, + Sequence = 1 }, new Partition { - Description = null, Name = "error log", Type = "errorlog", Length = 200, - Start = 29678, Size = 102400, Offset = 15195136, Sequence = 2 + Description = null, + Name = "error log", + Type = "errorlog", + Length = 200, + Start = 29678, + Size = 102400, + Offset = 15195136, + Sequence = 2 }, new Partition { - Description = null, Name = "swap", Type = "swap", Length = 6070, - Start = 29878, Size = 1587200, Offset = 15297536, Sequence = 2 + Description = null, + Name = "swap", + Type = "swap", + Length = 6070, + Start = 29878, + Size = 1587200, + Offset = 15297536, + Sequence = 2 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 135806, - Start = 35948, Size = 69532672, Offset = 18405376, Sequence = 3 + Description = null, + Name = "user", + Type = "data", + Length = 135806, + Start = 35948, + Size = 69532672, + Offset = 18405376, + Sequence = 3 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 304678, - Start = 35948, Size = 155995136, Offset = 18405376, Sequence = 4 + Description = null, + Name = "user", + Type = "data", + Length = 304678, + Start = 35948, + Size = 155995136, + Offset = 18405376, + Sequence = 4 }, new Partition { - Description = null, Name = "user", Type = "data", Length = 166828, - Start = 171798, Size = 85415936, Offset = 87960576, Sequence = 5 + Description = null, + Name = "user", + Type = "data", + Length = 166828, + Start = 171798, + Size = 85415936, + Offset = 87960576, + Sequence = 5 }, new Partition { - Description = null, Name = "bad sector file", Type = "bad", Length = 44, - Start = 340626, Size = 22528, Offset = 174400512, Sequence = 8 + Description = null, + Name = "bad sector file", + Type = "bad", + Length = 44, + Start = 340626, + Size = 22528, + Offset = 174400512, + Sequence = 8 } }; diff --git a/Aaru.Partitions/VTOC.cs b/Aaru.Partitions/VTOC.cs index 0d5580c6b..a3c43d940 100644 --- a/Aaru.Partitions/VTOC.cs +++ b/Aaru.Partitions/VTOC.cs @@ -362,9 +362,11 @@ namespace Aaru.Partitions { Start = (ulong)(parts[i].p_start * bps) / imagePlugin.Info.SectorSize, Length = (ulong)(parts[i].p_size * bps) / imagePlugin.Info.SectorSize, - Offset = (ulong)(parts[i].p_start * bps), Size = (ulong)(parts[i].p_size * bps), + 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)}", Scheme = Name + Type = $"UNIX: {decodeUNIXTAG(parts[i].p_tag, !useOld)}", + Scheme = Name }; string info = ""; @@ -593,12 +595,9 @@ namespace Aaru.Partitions [Flags] enum pFlag : ushort { - /* Partition permission flags */ V_UNMNT = 0x01, /* Unmountable partition */ - V_RONLY = 0x10, /* Read only */ - V_REMAP = 0x20, /* do alternate sector mapping */ - V_OPEN = 0x100, /* Partition open (for driver use) */ - V_VALID = 0x200, /* Partition is valid to use */ - V_VOMASK = 0x300 /* mask for open and valid */ + /* Partition permission flags */ V_UNMNT = 0x01, /* Unmountable partition */ V_RONLY = 0x10, /* Read only */ + V_REMAP = 0x20, /* do alternate sector mapping */ V_OPEN = 0x100, /* Partition open (for driver use) */ + V_VALID = 0x200, /* Partition is valid to use */ V_VOMASK = 0x300 /* mask for open and valid */ } } } \ No newline at end of file diff --git a/Aaru.Partitions/XENIX.cs b/Aaru.Partitions/XENIX.cs index 8d54dd781..a8fa011e1 100644 --- a/Aaru.Partitions/XENIX.cs +++ b/Aaru.Partitions/XENIX.cs @@ -86,7 +86,10 @@ namespace Aaru.Partitions Length = (ulong)(xnxtbl.p[i].p_size * XENIX_BSIZE) / imagePlugin.Info.SectorSize, Offset = (ulong)((xnxtbl.p[i].p_off + XENIX_OFFSET) * XENIX_BSIZE) + (imagePlugin.Info.SectorSize * sectorOffset), - Size = (ulong)(xnxtbl.p[i].p_size * XENIX_BSIZE), Sequence = (ulong)i, Type = "XENIX", Scheme = Name + Size = (ulong)(xnxtbl.p[i].p_size * XENIX_BSIZE), + Sequence = (ulong)i, + Type = "XENIX", + Scheme = Name }; if(part.End < imagePlugin.Info.Sectors) diff --git a/Aaru.Partitions/Xbox.cs b/Aaru.Partitions/Xbox.cs index 41dffce96..4ce315d3b 100644 --- a/Aaru.Partitions/Xbox.cs +++ b/Aaru.Partitions/Xbox.cs @@ -89,19 +89,22 @@ namespace Aaru.Partitions { Description = "Content volume", Size = (ulong)table.contentLen * imagePlugin.Info.SectorSize, - Length = table.contentLen, Sequence = 1, - Offset = (ulong)table.contentOff * imagePlugin.Info.SectorSize, Start = table.contentOff, + Length = table.contentLen, + Sequence = 1, + Offset = (ulong)table.contentOff * imagePlugin.Info.SectorSize, + Start = table.contentOff, Scheme = Name }; var dashboardPart = new Partition { Description = "Dashboard volume", - Size = - (ulong)table.dashboardLen * imagePlugin.Info.SectorSize, - Length = table.dashboardLen, Sequence = 2, - Offset = (ulong)table.dashboardOff * imagePlugin.Info.SectorSize, Start = table.dashboardOff, - Scheme = Name + Size = (ulong)table.dashboardLen * imagePlugin.Info.SectorSize, + Length = table.dashboardLen, + Sequence = 2, + Offset = (ulong)table.dashboardOff * imagePlugin.Info.SectorSize, + Start = table.dashboardOff, + Scheme = Name }; partitions.Add(contentPart); @@ -123,9 +126,11 @@ namespace Aaru.Partitions { Description = "System cache", Size = MemoryUnitDataOff, - Length = (ulong)(MemoryUnitDataOff / imagePlugin.Info.SectorSize), Sequence = 1, + Length = (ulong)(MemoryUnitDataOff / imagePlugin.Info.SectorSize), + Sequence = 1, Offset = 0, - Start = 0, Scheme = Name + Start = 0, + Scheme = Name }; var dataPart = new Partition @@ -160,67 +165,75 @@ namespace Aaru.Partitions { Description = "Security sectors", Size = Xbox360SecuritySectorLen, - Length = (ulong)(Xbox360SecuritySectorLen / imagePlugin.Info.SectorSize), Sequence = 1, + Length = (ulong)(Xbox360SecuritySectorLen / imagePlugin.Info.SectorSize), + Sequence = 1, Offset = Xbox360SecuritySectorOff, - Start = (ulong)(Xbox360SecuritySectorOff / imagePlugin.Info.SectorSize), Scheme = Name + Start = (ulong)(Xbox360SecuritySectorOff / imagePlugin.Info.SectorSize), + Scheme = Name }; var sysCachePart = new Partition { Description = "System cache", Size = Xbox360SystemCacheLen, - Length = (ulong)(Xbox360SystemCacheLen / imagePlugin.Info.SectorSize), Sequence = 2, + Length = (ulong)(Xbox360SystemCacheLen / imagePlugin.Info.SectorSize), + Sequence = 2, Offset = Xbox360SystemCacheOff, - Start = (ulong)(Xbox360SystemCacheOff / imagePlugin.Info.SectorSize), Scheme = Name + Start = (ulong)(Xbox360SystemCacheOff / imagePlugin.Info.SectorSize), + Scheme = Name }; var gameCachePart = new Partition { Description = "Game cache", Size = Xbox360GameCacheLen, - Length = (ulong)(Xbox360GameCacheLen / imagePlugin.Info.SectorSize), Sequence = 3, + Length = (ulong)(Xbox360GameCacheLen / imagePlugin.Info.SectorSize), + Sequence = 3, Offset = Xbox360GameCacheOff, - Start = - (ulong)(Xbox360GameCacheOff / imagePlugin.Info.SectorSize), - Scheme = Name + Start = (ulong)(Xbox360GameCacheOff / imagePlugin.Info.SectorSize), + Scheme = Name }; var sysExtPart = new Partition { - Description = "System volume", Size = Xbox368SysExtLen, - Length = (ulong)(Xbox368SysExtLen / imagePlugin.Info.SectorSize), Sequence = 4, + Description = "System volume", + Size = Xbox368SysExtLen, + Length = (ulong)(Xbox368SysExtLen / imagePlugin.Info.SectorSize), + Sequence = 4, Offset = Xbox368SysExtOff, - Start = - (ulong)(Xbox368SysExtOff / imagePlugin.Info.SectorSize), - Scheme = Name + Start = (ulong)(Xbox368SysExtOff / imagePlugin.Info.SectorSize), + Scheme = Name }; var sysExt2Part = new Partition { Description = "System volume 2", Size = Xbox360SysExt2Len, - Length = (ulong)(Xbox360SysExt2Len / imagePlugin.Info.SectorSize), Sequence = 5, + Length = (ulong)(Xbox360SysExt2Len / imagePlugin.Info.SectorSize), + Sequence = 5, Offset = Xbox360SysExt2Off, - Start = - (ulong)(Xbox360SysExt2Off / imagePlugin.Info.SectorSize), - Scheme = Name + Start = (ulong)(Xbox360SysExt2Off / imagePlugin.Info.SectorSize), + Scheme = Name }; var xbox1Part = new Partition { - Description = "Xbox backwards compatibility", Size = Xbox360CompatLen, - Length = (ulong)(Xbox360CompatLen / imagePlugin.Info.SectorSize), Sequence = 6, + Description = "Xbox backwards compatibility", + Size = Xbox360CompatLen, + Length = (ulong)(Xbox360CompatLen / imagePlugin.Info.SectorSize), + Sequence = 6, Offset = Xbox360CompatOff, - Start = - (ulong)(Xbox360CompatOff / imagePlugin.Info.SectorSize), - Scheme = Name + Start = (ulong)(Xbox360CompatOff / imagePlugin.Info.SectorSize), + Scheme = Name }; var dataPart = new Partition { - Description = "Data volume", Sequence = 7, + Description = "Data volume", + Sequence = 7, Offset = Xbox360DataOff, - Start = (ulong)(Xbox360DataOff / imagePlugin.Info.SectorSize), Scheme = Name + Start = (ulong)(Xbox360DataOff / imagePlugin.Info.SectorSize), + Scheme = Name }; dataPart.Length = imagePlugin.Info.Sectors - dataPart.Start; diff --git a/Aaru.Settings/Settings.cs b/Aaru.Settings/Settings.cs index 5e7aaf228..e62bc38b2 100644 --- a/Aaru.Settings/Settings.cs +++ b/Aaru.Settings/Settings.cs @@ -652,11 +652,21 @@ namespace Aaru.Settings /// Sets default settings as all statistics, share everything static void SetDefaultSettings() => Current = new DicSettings { - SaveReportsGlobally = true, ShareReports = true, GdprCompliance = 0, Stats = new StatsSettings + SaveReportsGlobally = true, + ShareReports = true, + GdprCompliance = 0, + Stats = new StatsSettings { - CommandStats = true, DeviceStats = true, FilesystemStats = true, MediaImageStats = true, - MediaScanStats = true, FilterStats = true, MediaStats = true, PartitionStats = true, - ShareStats = true, VerifyStats = true + CommandStats = true, + DeviceStats = true, + FilesystemStats = true, + MediaImageStats = true, + MediaScanStats = true, + FilterStats = true, + MediaStats = true, + PartitionStats = true, + ShareStats = true, + VerifyStats = true } }; } diff --git a/Aaru.Tests.Devices/DecodeATARegisters.cs b/Aaru.Tests.Devices/DecodeATARegisters.cs index ae0443006..691e6aeee 100644 --- a/Aaru.Tests.Devices/DecodeATARegisters.cs +++ b/Aaru.Tests.Devices/DecodeATARegisters.cs @@ -140,9 +140,8 @@ namespace Aaru.Tests.Devices sb.AppendFormat("Device: {0}", (registers.DeviceHead >> 4) & 0x01).AppendLine(); sb.AppendFormat("LBA: {0}", - ((ulong)(registers.DeviceHead & 0xF) * 0x100000000000) + - (registers.LbaHigh * (ulong)0x100000000L) + - (ulong)(registers.LbaMid << 16) + + ((ulong)(registers.DeviceHead & 0xF) * 0x100000000000) + + (registers.LbaHigh * (ulong)0x100000000L) + (ulong)(registers.LbaMid << 16) + registers.LbaLow); sb.AppendFormat("Count: {0}", registers.SectorCount).AppendLine(); diff --git a/Aaru.Tests/Filesystems/ADFS.cs b/Aaru.Tests/Filesystems/ADFS.cs index 376f454ba..e3d01d459 100644 --- a/Aaru.Tests/Filesystems/ADFS.cs +++ b/Aaru.Tests/Filesystems/ADFS.cs @@ -106,8 +106,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/AFFS.cs b/Aaru.Tests/Filesystems/AFFS.cs index d379f5a95..a80ee7b6e 100644 --- a/Aaru.Tests/Filesystems/AFFS.cs +++ b/Aaru.Tests/Filesystems/AFFS.cs @@ -99,8 +99,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/AFS.cs b/Aaru.Tests/Filesystems/AFS.cs index e2d528a9b..3199d03ea 100644 --- a/Aaru.Tests/Filesystems/AFS.cs +++ b/Aaru.Tests/Filesystems/AFS.cs @@ -105,8 +105,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/AOFS.cs b/Aaru.Tests/Filesystems/AOFS.cs index 24fb24314..2c0bc88a2 100644 --- a/Aaru.Tests/Filesystems/AOFS.cs +++ b/Aaru.Tests/Filesystems/AOFS.cs @@ -99,8 +99,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/BeFS.cs b/Aaru.Tests/Filesystems/BeFS.cs index cb785dd2e..758e8159f 100644 --- a/Aaru.Tests/Filesystems/BeFS.cs +++ b/Aaru.Tests/Filesystems/BeFS.cs @@ -102,8 +102,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/COHERENT.cs b/Aaru.Tests/Filesystems/COHERENT.cs index 49c49d13b..7c389b611 100644 --- a/Aaru.Tests/Filesystems/COHERENT.cs +++ b/Aaru.Tests/Filesystems/COHERENT.cs @@ -105,8 +105,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/DTFS.cs b/Aaru.Tests/Filesystems/DTFS.cs index 060f5fd42..a41b5a2f4 100644 --- a/Aaru.Tests/Filesystems/DTFS.cs +++ b/Aaru.Tests/Filesystems/DTFS.cs @@ -104,8 +104,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/EAFS.cs b/Aaru.Tests/Filesystems/EAFS.cs index 001bb8158..fa7c2fdd6 100644 --- a/Aaru.Tests/Filesystems/EAFS.cs +++ b/Aaru.Tests/Filesystems/EAFS.cs @@ -105,8 +105,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/FAT12.cs b/Aaru.Tests/Filesystems/FAT12.cs index d7eeac01e..2e0b0f1ca 100644 --- a/Aaru.Tests/Filesystems/FAT12.cs +++ b/Aaru.Tests/Filesystems/FAT12.cs @@ -2606,8 +2606,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); @@ -2958,8 +2959,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/FAT16.cs b/Aaru.Tests/Filesystems/FAT16.cs index e3639870b..e3a9f178a 100644 --- a/Aaru.Tests/Filesystems/FAT16.cs +++ b/Aaru.Tests/Filesystems/FAT16.cs @@ -138,8 +138,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/FATX.cs b/Aaru.Tests/Filesystems/FATX.cs index 118e71e98..23b3e208b 100644 --- a/Aaru.Tests/Filesystems/FATX.cs +++ b/Aaru.Tests/Filesystems/FATX.cs @@ -57,7 +57,9 @@ namespace Aaru.Tests.Filesystems wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Errno error = fs.Mount(image, wholePart, null, null, null); diff --git a/Aaru.Tests/Filesystems/HFS.cs b/Aaru.Tests/Filesystems/HFS.cs index 26a542219..66ac621c4 100644 --- a/Aaru.Tests/Filesystems/HFS.cs +++ b/Aaru.Tests/Filesystems/HFS.cs @@ -101,8 +101,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/HPOFS.cs b/Aaru.Tests/Filesystems/HPOFS.cs index dd9f6a9f7..5e9d9e7d2 100644 --- a/Aaru.Tests/Filesystems/HPOFS.cs +++ b/Aaru.Tests/Filesystems/HPOFS.cs @@ -103,8 +103,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/HTFS.cs b/Aaru.Tests/Filesystems/HTFS.cs index 17630841c..79f1e30eb 100644 --- a/Aaru.Tests/Filesystems/HTFS.cs +++ b/Aaru.Tests/Filesystems/HTFS.cs @@ -106,8 +106,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/ISO9660.cs b/Aaru.Tests/Filesystems/ISO9660.cs index 2a564815e..bad794631 100644 --- a/Aaru.Tests/Filesystems/ISO9660.cs +++ b/Aaru.Tests/Filesystems/ISO9660.cs @@ -433,8 +433,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), $"{testfiles[i]}: Identify()"); diff --git a/Aaru.Tests/Filesystems/LisaFS.cs b/Aaru.Tests/Filesystems/LisaFS.cs index c0d449080..2a2094858 100644 --- a/Aaru.Tests/Filesystems/LisaFS.cs +++ b/Aaru.Tests/Filesystems/LisaFS.cs @@ -118,8 +118,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/Locus.cs b/Aaru.Tests/Filesystems/Locus.cs index 809501a42..dad6d0ac1 100644 --- a/Aaru.Tests/Filesystems/Locus.cs +++ b/Aaru.Tests/Filesystems/Locus.cs @@ -100,8 +100,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/MFS.cs b/Aaru.Tests/Filesystems/MFS.cs index 801eeb355..a11da590c 100644 --- a/Aaru.Tests/Filesystems/MFS.cs +++ b/Aaru.Tests/Filesystems/MFS.cs @@ -100,8 +100,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/MINIX.cs b/Aaru.Tests/Filesystems/MINIX.cs index 4a8ade559..b12edbb25 100644 --- a/Aaru.Tests/Filesystems/MINIX.cs +++ b/Aaru.Tests/Filesystems/MINIX.cs @@ -95,8 +95,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); @@ -237,8 +238,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); @@ -378,8 +380,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/QNX4.cs b/Aaru.Tests/Filesystems/QNX4.cs index 7aea1b322..62b6f7aec 100644 --- a/Aaru.Tests/Filesystems/QNX4.cs +++ b/Aaru.Tests/Filesystems/QNX4.cs @@ -87,8 +87,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/SysV.cs b/Aaru.Tests/Filesystems/SysV.cs index 436896468..553d7cf7d 100644 --- a/Aaru.Tests/Filesystems/SysV.cs +++ b/Aaru.Tests/Filesystems/SysV.cs @@ -108,8 +108,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/UDF.cs b/Aaru.Tests/Filesystems/UDF.cs index 901d283f6..1f970f91d 100644 --- a/Aaru.Tests/Filesystems/UDF.cs +++ b/Aaru.Tests/Filesystems/UDF.cs @@ -122,8 +122,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); @@ -204,8 +205,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/UFS.cs b/Aaru.Tests/Filesystems/UFS.cs index c9b395b95..ad50eb0ae 100644 --- a/Aaru.Tests/Filesystems/UFS.cs +++ b/Aaru.Tests/Filesystems/UFS.cs @@ -105,8 +105,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/UNIXBFS.cs b/Aaru.Tests/Filesystems/UNIXBFS.cs index 8f408c6f8..a4fa3aced 100644 --- a/Aaru.Tests/Filesystems/UNIXBFS.cs +++ b/Aaru.Tests/Filesystems/UNIXBFS.cs @@ -94,8 +94,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/XENIX.cs b/Aaru.Tests/Filesystems/XENIX.cs index 1e1a53a1f..a41ad025a 100644 --- a/Aaru.Tests/Filesystems/XENIX.cs +++ b/Aaru.Tests/Filesystems/XENIX.cs @@ -104,8 +104,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Filesystems/ZFS.cs b/Aaru.Tests/Filesystems/ZFS.cs index d99d40c26..149d762b4 100644 --- a/Aaru.Tests/Filesystems/ZFS.cs +++ b/Aaru.Tests/Filesystems/ZFS.cs @@ -92,8 +92,9 @@ namespace Aaru.Tests.Filesystems var wholePart = new Partition { - Name = "Whole device", Length = image.Info.Sectors, - Size = image.Info.Sectors * image.Info.SectorSize + Name = "Whole device", + Length = image.Info.Sectors, + Size = image.Info.Sectors * image.Info.SectorSize }; Assert.AreEqual(true, fs.Identify(image, wholePart), testfiles[i]); diff --git a/Aaru.Tests/Partitions/Acorn.cs b/Aaru.Tests/Partitions/Acorn.cs index 25baf2c9b..a0e6d2072 100644 --- a/Aaru.Tests/Partitions/Acorn.cs +++ b/Aaru.Tests/Partitions/Acorn.cs @@ -52,23 +52,47 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 31457280, Name = null, Type = "GEM", - Offset = 512, Length = 61440, Sequence = 0, Start = 1 + Description = null, + Size = 31457280, + Name = null, + Type = "GEM", + Offset = 512, + Length = 61440, + Sequence = 0, + Start = 1 }, new Partition { - Description = null, Size = 41943040, Name = null, Type = "BGM", - Offset = 31457792, Length = 81920, Sequence = 1, Start = 61441 + Description = null, + Size = 41943040, + Name = null, + Type = "BGM", + Offset = 31457792, + Length = 81920, + Sequence = 1, + Start = 61441 }, new Partition { - Description = null, Size = 56402432, Name = null, Type = "LNX", - Offset = 73400832, Length = 110161, Sequence = 2, Start = 143361 + Description = null, + Size = 56402432, + Name = null, + Type = "LNX", + Offset = 73400832, + Length = 110161, + Sequence = 2, + Start = 143361 }, new Partition { - Description = null, Size = 43212800, Name = null, Type = "MAC", - Offset = 129803264, Length = 84400, Sequence = 3, Start = 253522 + Description = null, + Size = 43212800, + Name = null, + Type = "MAC", + Offset = 129803264, + Length = 84400, + Sequence = 3, + Start = 253522 } } }; diff --git a/Aaru.Tests/Partitions/AppleMap.cs b/Aaru.Tests/Partitions/AppleMap.cs index b6704b8bf..5bab123db 100644 --- a/Aaru.Tests/Partitions/AppleMap.cs +++ b/Aaru.Tests/Partitions/AppleMap.cs @@ -55,23 +55,47 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 1024, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 2, Sequence = 0, Start = 64 + Description = null, + Size = 1024, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 2, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 42496, Name = "Macintosh", Type = "Apple_Driver43", - Offset = 32768, Length = 83, Sequence = 1, Start = 64 + Description = null, + Size = 42496, + Name = "Macintosh", + Type = "Apple_Driver43", + Offset = 32768, + Length = 83, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 55808, Name = "Empty", Type = "Apple_Free", - Offset = 75264, Length = 109, Sequence = 2, Start = 147 + Description = null, + Size = 55808, + Name = "Empty", + Type = "Apple_Free", + Offset = 75264, + Length = 109, + Sequence = 2, + Start = 147 }, new Partition { - Description = null, Size = 26083328, Name = "Volume label", Type = "Apple_HFS", - Offset = 131072, Length = 50944, Sequence = 3, Start = 256 + Description = null, + Size = 26083328, + Name = "Volume label", + Type = "Apple_HFS", + Offset = 131072, + Length = 50944, + Sequence = 3, + Start = 256 } }, @@ -80,18 +104,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 7168, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 14, Sequence = 0, Start = 64 + Description = null, + Size = 7168, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 14, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 524288, Name = "FWB Disk Driver", Type = "Apple_Driver43", - Offset = 32768, Length = 1024, Sequence = 1, Start = 64 + Description = null, + Size = 524288, + Name = "FWB Disk Driver", + Type = "Apple_Driver43", + Offset = 32768, + Length = 1024, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25657344, Name = "MacOS", Type = "Apple_HFS", - Offset = 557056, Length = 50112, Sequence = 2, Start = 1088 + Description = null, + Size = 25657344, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 557056, + Length = 50112, + Sequence = 2, + Start = 1088 } }, @@ -100,18 +142,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 7168, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 14, Sequence = 0, Start = 64 + Description = null, + Size = 7168, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 14, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 524288, Name = "FWB Disk Driver", Type = "Apple_Driver43", - Offset = 32768, Length = 1024, Sequence = 1, Start = 64 + Description = null, + Size = 524288, + Name = "FWB Disk Driver", + Type = "Apple_Driver43", + Offset = 32768, + Length = 1024, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25657344, Name = "MacOS", Type = "Apple_HFS", - Offset = 557056, Length = 50112, Sequence = 2, Start = 1088 + Description = null, + Size = 25657344, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 557056, + Length = 50112, + Sequence = 2, + Start = 1088 } }, @@ -120,18 +180,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 7168, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 14, Sequence = 0, Start = 64 + Description = null, + Size = 7168, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 14, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 524288, Name = "FWB Disk Driver", Type = "Apple_Driver43", - Offset = 32768, Length = 1024, Sequence = 1, Start = 64 + Description = null, + Size = 524288, + Name = "FWB Disk Driver", + Type = "Apple_Driver43", + Offset = 32768, + Length = 1024, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25657344, Name = "MacOS", Type = "Apple_HFS", - Offset = 557056, Length = 50112, Sequence = 2, Start = 1088 + Description = null, + Size = 25657344, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 557056, + Length = 50112, + Sequence = 2, + Start = 1088 } }, @@ -140,18 +218,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 7168, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 14, Sequence = 0, Start = 64 + Description = null, + Size = 7168, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 14, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 524288, Name = "FWB Disk Driver", Type = "Apple_Driver43", - Offset = 32768, Length = 1024, Sequence = 1, Start = 64 + Description = null, + Size = 524288, + Name = "FWB Disk Driver", + Type = "Apple_Driver43", + Offset = 32768, + Length = 1024, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25657344, Name = "MacOS", Type = "Apple_HFS", - Offset = 557056, Length = 50112, Sequence = 2, Start = 1088 + Description = null, + Size = 25657344, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 557056, + Length = 50112, + Sequence = 2, + Start = 1088 } }, @@ -160,38 +256,80 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 512, Name = "Extra", Type = "Apple_Free", - Offset = 32768, Length = 1, Sequence = 0, Start = 64 + Description = null, + Size = 512, + Name = "Extra", + Type = "Apple_Free", + Offset = 32768, + Length = 1, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 819200, Name = "bootstrap", Type = "Apple_Bootstrap", - Offset = 33280, Length = 1600, Sequence = 1, Start = 65 + Description = null, + Size = 819200, + Name = "bootstrap", + Type = "Apple_Bootstrap", + Offset = 33280, + Length = 1600, + Sequence = 1, + Start = 65 }, new Partition { - Description = null, Size = 512, Name = "Extra", Type = "Apple_Free", - Offset = 852480, Length = 1, Sequence = 2, Start = 1665 + Description = null, + Size = 512, + Name = "Extra", + Type = "Apple_Free", + Offset = 852480, + Length = 1, + Sequence = 2, + Start = 1665 }, new Partition { - Description = null, Size = 52428800, Name = "Linux", Type = "Apple_UNIX_SVR2", - Offset = 852992, Length = 102400, Sequence = 3, Start = 1666 + Description = null, + Size = 52428800, + Name = "Linux", + Type = "Apple_UNIX_SVR2", + Offset = 852992, + Length = 102400, + Sequence = 3, + Start = 1666 }, new Partition { - Description = null, Size = 20971520, Name = "ProDOS", Type = "Apple_PRODOS", - Offset = 53281792, Length = 40960, Sequence = 4, Start = 104066 + Description = null, + Size = 20971520, + Name = "ProDOS", + Type = "Apple_PRODOS", + Offset = 53281792, + Length = 40960, + Sequence = 4, + Start = 104066 }, new Partition { - Description = null, Size = 52428800, Name = "Macintosh", Type = "Apple_HFS", - Offset = 74253312, Length = 102400, Sequence = 5, Start = 145026 + Description = null, + Size = 52428800, + Name = "Macintosh", + Type = "Apple_HFS", + Offset = 74253312, + Length = 102400, + Sequence = 5, + Start = 145026 }, new Partition { - Description = null, Size = 7535616, Name = "Extra", Type = "Apple_Free", - Offset = 126682112, Length = 14718, Sequence = 6, Start = 247426 + Description = null, + Size = 7535616, + Name = "Extra", + Type = "Apple_Free", + Offset = 126682112, + Length = 14718, + Sequence = 6, + Start = 247426 } }, @@ -200,13 +338,25 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 2048, Length = 10, Sequence = 0, Start = 4 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 2048, + Length = 10, + Sequence = 0, + Start = 4 }, new Partition { - Description = null, Size = 21403648, Name = "Macintosh", Type = "Apple_HFS", - Offset = 8192, Length = 41804, Sequence = 1, Start = 16 + Description = null, + Size = 21403648, + Name = "Macintosh", + Type = "Apple_HFS", + Offset = 8192, + Length = 41804, + Sequence = 1, + Start = 16 } }, @@ -215,13 +365,25 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 2048, Length = 10, Sequence = 0, Start = 4 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 2048, + Length = 10, + Sequence = 0, + Start = 4 }, new Partition { - Description = null, Size = 19950080, Name = "Macintosh", Type = "Apple_HFS", - Offset = 8192, Length = 38965, Sequence = 1, Start = 16 + Description = null, + Size = 19950080, + Name = "Macintosh", + Type = "Apple_HFS", + Offset = 8192, + Length = 38965, + Sequence = 1, + Start = 16 } }, @@ -230,13 +392,25 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5632, Name = null, Type = "Apple_Driver", - Offset = 2048, Length = 11, Sequence = 0, Start = 4 + Description = null, + Size = 5632, + Name = null, + Type = "Apple_Driver", + Offset = 2048, + Length = 11, + Sequence = 0, + Start = 4 }, new Partition { - Description = null, Size = 19950080, Name = "Macintosh", Type = "Apple_HFS", - Offset = 8192, Length = 38965, Sequence = 1, Start = 16 + Description = null, + Size = 19950080, + Name = "Macintosh", + Type = "Apple_HFS", + Offset = 8192, + Length = 38965, + Sequence = 1, + Start = 16 } }, @@ -245,13 +419,25 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5632, Name = null, Type = "Apple_Driver", - Offset = 2048, Length = 11, Sequence = 0, Start = 4 + Description = null, + Size = 5632, + Name = null, + Type = "Apple_Driver", + Offset = 2048, + Length = 11, + Sequence = 0, + Start = 4 }, new Partition { - Description = null, Size = 19950080, Name = "Macintosh", Type = "Apple_HFS", - Offset = 8192, Length = 38965, Sequence = 1, Start = 16 + Description = null, + Size = 19950080, + Name = "Macintosh", + Type = "Apple_HFS", + Offset = 8192, + Length = 38965, + Sequence = 1, + Start = 16 } }, @@ -260,78 +446,168 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 3203072, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 6256, Sequence = 2, Start = 96 + Description = null, + Size = 3203072, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 6256, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 524288, Name = "Scratch", Type = "Apple_Scratch", - Offset = 3252224, Length = 1024, Sequence = 3, Start = 6352 + Description = null, + Size = 524288, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 3252224, + Length = 1024, + Sequence = 3, + Start = 6352 }, new Partition { - Description = null, Size = 1048576, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 3776512, Length = 2048, Sequence = 4, Start = 7376 + Description = null, + Size = 1048576, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 3776512, + Length = 2048, + Sequence = 4, + Start = 7376 }, new Partition { - Description = null, Size = 2191360, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 4825088, Length = 4280, Sequence = 5, Start = 9424 + Description = null, + Size = 2191360, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 4825088, + Length = 4280, + Sequence = 5, + Start = 9424 }, new Partition { - Description = null, Size = 1217024, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 7016448, Length = 2377, Sequence = 6, Start = 13704 + Description = null, + Size = 1217024, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 7016448, + Length = 2377, + Sequence = 6, + Start = 13704 }, new Partition { - Description = null, Size = 1572864, Name = "Eschatology 2", Type = "Apple_UNIX_SVR2", - Offset = 8233472, Length = 3072, Sequence = 7, Start = 16081 + Description = null, + Size = 1572864, + Name = "Eschatology 2", + Type = "Apple_UNIX_SVR2", + Offset = 8233472, + Length = 3072, + Sequence = 7, + Start = 16081 }, new Partition { - Description = null, Size = 1310720, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 9806336, Length = 2560, Sequence = 8, Start = 19153 + Description = null, + Size = 1310720, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 9806336, + Length = 2560, + Sequence = 8, + Start = 19153 }, new Partition { - Description = null, Size = 2550272, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 11117056, Length = 4981, Sequence = 9, Start = 21713 + Description = null, + Size = 2550272, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 11117056, + Length = 4981, + Sequence = 9, + Start = 21713 }, new Partition { - Description = null, Size = 2048000, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 13667328, Length = 4000, Sequence = 10, Start = 26694 + Description = null, + Size = 2048000, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 13667328, + Length = 4000, + Sequence = 10, + Start = 26694 }, new Partition { - Description = null, Size = 1296384, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 15715328, Length = 2532, Sequence = 11, Start = 30694 + Description = null, + Size = 1296384, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 15715328, + Length = 2532, + Sequence = 11, + Start = 30694 }, new Partition { - Description = null, Size = 1364992, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 17011712, Length = 2666, Sequence = 12, Start = 33226 + Description = null, + Size = 1364992, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 17011712, + Length = 2666, + Sequence = 12, + Start = 33226 }, new Partition { - Description = null, Size = 3986432, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 18376704, Length = 7786, Sequence = 13, Start = 35892 + Description = null, + Size = 3986432, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 18376704, + Length = 7786, + Sequence = 13, + Start = 35892 }, new Partition { - Description = null, Size = 5714944, Name = "Extra", Type = "Apple_Free", - Offset = 22363136, Length = 11162, Sequence = 14, Start = 43678 + Description = null, + Size = 5714944, + Name = "Extra", + Type = "Apple_Free", + Offset = 22363136, + Length = 11162, + Sequence = 14, + Start = 43678 } }, @@ -340,63 +616,135 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 5948928, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 11619, Sequence = 2, Start = 96 + Description = null, + Size = 5948928, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 11619, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 1029632, Name = "Scratch", Type = "Apple_Scratch", - Offset = 5998080, Length = 2011, Sequence = 3, Start = 11715 + Description = null, + Size = 1029632, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 5998080, + Length = 2011, + Sequence = 3, + Start = 11715 }, new Partition { - Description = null, Size = 2455552, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 7027712, Length = 4796, Sequence = 4, Start = 13726 + Description = null, + Size = 2455552, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 7027712, + Length = 4796, + Sequence = 4, + Start = 13726 }, new Partition { - Description = null, Size = 3932160, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 9483264, Length = 7680, Sequence = 5, Start = 18522 + Description = null, + Size = 3932160, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 9483264, + Length = 7680, + Sequence = 5, + Start = 18522 }, new Partition { - Description = null, Size = 4194304, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 13415424, Length = 8192, Sequence = 6, Start = 26202 + Description = null, + Size = 4194304, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 13415424, + Length = 8192, + Sequence = 6, + Start = 26202 }, new Partition { - Description = null, Size = 587776, Name = "Eschatology 2", Type = "Apple_UNIX_SVR2", - Offset = 17609728, Length = 1148, Sequence = 7, Start = 34394 + Description = null, + Size = 587776, + Name = "Eschatology 2", + Type = "Apple_UNIX_SVR2", + Offset = 17609728, + Length = 1148, + Sequence = 7, + Start = 34394 }, new Partition { - Description = null, Size = 6537216, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 18197504, Length = 12768, Sequence = 8, Start = 35542 + Description = null, + Size = 6537216, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 18197504, + Length = 12768, + Sequence = 8, + Start = 35542 }, new Partition { - Description = null, Size = 1766400, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 24734720, Length = 3450, Sequence = 9, Start = 48310 + Description = null, + Size = 1766400, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 24734720, + Length = 3450, + Sequence = 9, + Start = 48310 }, new Partition { - Description = null, Size = 18432, Name = "Extra", Type = "Apple_Free", - Offset = 26501120, Length = 36, Sequence = 10, Start = 51760 + Description = null, + Size = 18432, + Name = "Extra", + Type = "Apple_Free", + Offset = 26501120, + Length = 36, + Sequence = 10, + Start = 51760 }, new Partition { - Description = null, Size = 1558528, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 26519552, Length = 3044, Sequence = 11, Start = 51796 + Description = null, + Size = 1558528, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 26519552, + Length = 3044, + Sequence = 11, + Start = 51796 } }, @@ -405,63 +753,135 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 3932160, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 7680, Sequence = 2, Start = 96 + Description = null, + Size = 3932160, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 7680, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 3197440, Name = "Scratch", Type = "Apple_Scratch", - Offset = 3981312, Length = 6245, Sequence = 3, Start = 7776 + Description = null, + Size = 3197440, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 3981312, + Length = 6245, + Sequence = 3, + Start = 7776 }, new Partition { - Description = null, Size = 3197440, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 7178752, Length = 6245, Sequence = 4, Start = 14021 + Description = null, + Size = 3197440, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 7178752, + Length = 6245, + Sequence = 4, + Start = 14021 }, new Partition { - Description = null, Size = 2626560, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 10376192, Length = 5130, Sequence = 5, Start = 20266 + Description = null, + Size = 2626560, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 10376192, + Length = 5130, + Sequence = 5, + Start = 20266 }, new Partition { - Description = null, Size = 1370112, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 13002752, Length = 2676, Sequence = 6, Start = 25396 + Description = null, + Size = 1370112, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 13002752, + Length = 2676, + Sequence = 6, + Start = 25396 }, new Partition { - Description = null, Size = 2944512, Name = "Eschatology 2", Type = "Apple_UNIX_SVR2", - Offset = 14372864, Length = 5751, Sequence = 7, Start = 28072 + Description = null, + Size = 2944512, + Name = "Eschatology 2", + Type = "Apple_UNIX_SVR2", + Offset = 14372864, + Length = 5751, + Sequence = 7, + Start = 28072 }, new Partition { - Description = null, Size = 2776576, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 17317376, Length = 5423, Sequence = 8, Start = 33823 + Description = null, + Size = 2776576, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 17317376, + Length = 5423, + Sequence = 8, + Start = 33823 }, new Partition { - Description = null, Size = 2892800, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 20093952, Length = 5650, Sequence = 9, Start = 39246 + Description = null, + Size = 2892800, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 20093952, + Length = 5650, + Sequence = 9, + Start = 39246 }, new Partition { - Description = null, Size = 3433472, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 22986752, Length = 6706, Sequence = 10, Start = 44896 + Description = null, + Size = 3433472, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 22986752, + Length = 6706, + Sequence = 10, + Start = 44896 }, new Partition { - Description = null, Size = 1657856, Name = "Extra", Type = "Apple_Free", - Offset = 26420224, Length = 3238, Sequence = 11, Start = 51602 + Description = null, + Size = 1657856, + Name = "Extra", + Type = "Apple_Free", + Offset = 26420224, + Length = 3238, + Sequence = 11, + Start = 51602 } }, @@ -470,78 +890,168 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 2097152, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 4096, Sequence = 2, Start = 96 + Description = null, + Size = 2097152, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 4096, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 342528, Name = "Scratch", Type = "Apple_Scratch", - Offset = 2146304, Length = 669, Sequence = 3, Start = 4192 + Description = null, + Size = 342528, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 2146304, + Length = 669, + Sequence = 3, + Start = 4192 }, new Partition { - Description = null, Size = 1417216, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 2488832, Length = 2768, Sequence = 4, Start = 4861 + Description = null, + Size = 1417216, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 2488832, + Length = 2768, + Sequence = 4, + Start = 4861 }, new Partition { - Description = null, Size = 1830912, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 3906048, Length = 3576, Sequence = 5, Start = 7629 + Description = null, + Size = 1830912, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 3906048, + Length = 3576, + Sequence = 5, + Start = 7629 }, new Partition { - Description = null, Size = 1448960, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 5736960, Length = 2830, Sequence = 6, Start = 11205 + Description = null, + Size = 1448960, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 5736960, + Length = 2830, + Sequence = 6, + Start = 11205 }, new Partition { - Description = null, Size = 2687488, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 7185920, Length = 5249, Sequence = 7, Start = 14035 + Description = null, + Size = 2687488, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 7185920, + Length = 5249, + Sequence = 7, + Start = 14035 }, new Partition { - Description = null, Size = 2565632, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 9873408, Length = 5011, Sequence = 8, Start = 19284 + Description = null, + Size = 2565632, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 9873408, + Length = 5011, + Sequence = 8, + Start = 19284 }, new Partition { - Description = null, Size = 1954816, Name = "Unreserved 1", Type = "Apple_UNIX_SVR2", - Offset = 12439040, Length = 3818, Sequence = 9, Start = 24295 + Description = null, + Size = 1954816, + Name = "Unreserved 1", + Type = "Apple_UNIX_SVR2", + Offset = 12439040, + Length = 3818, + Sequence = 9, + Start = 24295 }, new Partition { - Description = null, Size = 3543040, Name = "Unreserved 2", Type = "Apple_UNIX_SVR2", - Offset = 14393856, Length = 6920, Sequence = 10, Start = 28113 + Description = null, + Size = 3543040, + Name = "Unreserved 2", + Type = "Apple_UNIX_SVR2", + Offset = 14393856, + Length = 6920, + Sequence = 10, + Start = 28113 }, new Partition { - Description = null, Size = 2565632, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", - Offset = 17936896, Length = 5011, Sequence = 11, Start = 35033 + Description = null, + Size = 2565632, + Name = "Unreserved 3", + Type = "Apple_UNIX_SVR2", + Offset = 17936896, + Length = 5011, + Sequence = 11, + Start = 35033 }, new Partition { - Description = null, Size = 2932224, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", - Offset = 20502528, Length = 5727, Sequence = 12, Start = 40044 + Description = null, + Size = 2932224, + Name = "Unreserved 4", + Type = "Apple_UNIX_SVR2", + Offset = 20502528, + Length = 5727, + Sequence = 12, + Start = 40044 }, new Partition { - Description = null, Size = 1221632, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 23434752, Length = 2386, Sequence = 13, Start = 45771 + Description = null, + Size = 1221632, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 23434752, + Length = 2386, + Sequence = 13, + Start = 45771 }, new Partition { - Description = null, Size = 3421696, Name = "Extra", Type = "Apple_Free", - Offset = 24656384, Length = 6683, Sequence = 14, Start = 48157 + Description = null, + Size = 3421696, + Name = "Extra", + Type = "Apple_Free", + Offset = 24656384, + Length = 6683, + Sequence = 14, + Start = 48157 } }, @@ -550,73 +1060,157 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 14013952, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 27371, Sequence = 2, Start = 96 + Description = null, + Size = 14013952, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 27371, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 1492992, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 14063104, Length = 2916, Sequence = 3, Start = 27467 + Description = null, + Size = 1492992, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 14063104, + Length = 2916, + Sequence = 3, + Start = 27467 }, new Partition { - Description = null, Size = 919040, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 15556096, Length = 1795, Sequence = 4, Start = 30383 + Description = null, + Size = 919040, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 15556096, + Length = 1795, + Sequence = 4, + Start = 30383 }, new Partition { - Description = null, Size = 1302016, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 16475136, Length = 2543, Sequence = 5, Start = 32178 + Description = null, + Size = 1302016, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 16475136, + Length = 2543, + Sequence = 5, + Start = 32178 }, new Partition { - Description = null, Size = 1796608, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 17777152, Length = 3509, Sequence = 6, Start = 34721 + Description = null, + Size = 1796608, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 17777152, + Length = 3509, + Sequence = 6, + Start = 34721 }, new Partition { - Description = null, Size = 1943552, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 19573760, Length = 3796, Sequence = 7, Start = 38230 + Description = null, + Size = 1943552, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 19573760, + Length = 3796, + Sequence = 7, + Start = 38230 }, new Partition { - Description = null, Size = 2186752, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 21517312, Length = 4271, Sequence = 8, Start = 42026 + Description = null, + Size = 2186752, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 21517312, + Length = 4271, + Sequence = 8, + Start = 42026 }, new Partition { - Description = null, Size = 524288, Name = "Unreserved 1", Type = "Apple_UNIX_SVR2", - Offset = 23704064, Length = 1024, Sequence = 9, Start = 46297 + Description = null, + Size = 524288, + Name = "Unreserved 1", + Type = "Apple_UNIX_SVR2", + Offset = 23704064, + Length = 1024, + Sequence = 9, + Start = 46297 }, new Partition { - Description = null, Size = 655360, Name = "Unreserved 2", Type = "Apple_UNIX_SVR2", - Offset = 24228352, Length = 1280, Sequence = 10, Start = 47321 + Description = null, + Size = 655360, + Name = "Unreserved 2", + Type = "Apple_UNIX_SVR2", + Offset = 24228352, + Length = 1280, + Sequence = 10, + Start = 47321 }, new Partition { - Description = null, Size = 798208, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", - Offset = 24883712, Length = 1559, Sequence = 11, Start = 48601 + Description = null, + Size = 798208, + Name = "Unreserved 3", + Type = "Apple_UNIX_SVR2", + Offset = 24883712, + Length = 1559, + Sequence = 11, + Start = 48601 }, new Partition { - Description = null, Size = 143360, Name = "Extra", Type = "Apple_Free", - Offset = 25681920, Length = 280, Sequence = 12, Start = 50160 + Description = null, + Size = 143360, + Name = "Extra", + Type = "Apple_Free", + Offset = 25681920, + Length = 280, + Sequence = 12, + Start = 50160 }, new Partition { - Description = null, Size = 2252800, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", - Offset = 25825280, Length = 4400, Sequence = 13, Start = 50440 + Description = null, + Size = 2252800, + Name = "Unreserved 4", + Type = "Apple_UNIX_SVR2", + Offset = 25825280, + Length = 4400, + Sequence = 13, + Start = 50440 } }, @@ -625,78 +1219,168 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 4575744, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 8937, Sequence = 2, Start = 96 + Description = null, + Size = 4575744, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 8937, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 1143808, Name = "Scratch", Type = "Apple_Scratch", - Offset = 4624896, Length = 2234, Sequence = 3, Start = 9033 + Description = null, + Size = 1143808, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 4624896, + Length = 2234, + Sequence = 3, + Start = 9033 }, new Partition { - Description = null, Size = 3020800, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 5768704, Length = 5900, Sequence = 4, Start = 11267 + Description = null, + Size = 3020800, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 5768704, + Length = 5900, + Sequence = 4, + Start = 11267 }, new Partition { - Description = null, Size = 1615872, Name = "Unreserved 1", Type = "Apple_UNIX_SVR2", - Offset = 8789504, Length = 3156, Sequence = 5, Start = 17167 + Description = null, + Size = 1615872, + Name = "Unreserved 1", + Type = "Apple_UNIX_SVR2", + Offset = 8789504, + Length = 3156, + Sequence = 5, + Start = 17167 }, new Partition { - Description = null, Size = 1384960, Name = "Unreserved 3", Type = "Apple_UNIX_SVR2", - Offset = 10405376, Length = 2705, Sequence = 6, Start = 20323 + Description = null, + Size = 1384960, + Name = "Unreserved 3", + Type = "Apple_UNIX_SVR2", + Offset = 10405376, + Length = 2705, + Sequence = 6, + Start = 20323 }, new Partition { - Description = null, Size = 952832, Name = "Unreserved 4", Type = "Apple_UNIX_SVR2", - Offset = 11790336, Length = 1861, Sequence = 7, Start = 23028 + Description = null, + Size = 952832, + Name = "Unreserved 4", + Type = "Apple_UNIX_SVR2", + Offset = 11790336, + Length = 1861, + Sequence = 7, + Start = 23028 }, new Partition { - Description = null, Size = 1246208, Name = "Extra", Type = "Apple_Free", - Offset = 12743168, Length = 2434, Sequence = 8, Start = 24889 + Description = null, + Size = 1246208, + Name = "Extra", + Type = "Apple_Free", + Offset = 12743168, + Length = 2434, + Sequence = 8, + Start = 24889 }, new Partition { - Description = null, Size = 1495040, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 13989376, Length = 2920, Sequence = 9, Start = 27323 + Description = null, + Size = 1495040, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 13989376, + Length = 2920, + Sequence = 9, + Start = 27323 }, new Partition { - Description = null, Size = 1615872, Name = "Unreserved 2", Type = "Apple_UNIX_SVR2", - Offset = 15484416, Length = 3156, Sequence = 10, Start = 30243 + Description = null, + Size = 1615872, + Name = "Unreserved 2", + Type = "Apple_UNIX_SVR2", + Offset = 15484416, + Length = 3156, + Sequence = 10, + Start = 30243 }, new Partition { - Description = null, Size = 2885120, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 17100288, Length = 5635, Sequence = 11, Start = 33399 + Description = null, + Size = 2885120, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 17100288, + Length = 5635, + Sequence = 11, + Start = 33399 }, new Partition { - Description = null, Size = 2308096, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 19985408, Length = 4508, Sequence = 12, Start = 39034 + Description = null, + Size = 2308096, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 19985408, + Length = 4508, + Sequence = 12, + Start = 39034 }, new Partition { - Description = null, Size = 3693056, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 22293504, Length = 7213, Sequence = 13, Start = 43542 + Description = null, + Size = 3693056, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 22293504, + Length = 7213, + Sequence = 13, + Start = 43542 }, new Partition { - Description = null, Size = 2091520, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 25986560, Length = 4085, Sequence = 14, Start = 50755 + Description = null, + Size = 2091520, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 25986560, + Length = 4085, + Sequence = 14, + Start = 50755 } }, @@ -705,63 +1389,135 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 2097152, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 4096, Sequence = 2, Start = 96 + Description = null, + Size = 2097152, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 4096, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 2097152, Name = "Scratch", Type = "Apple_Scratch", - Offset = 2146304, Length = 4096, Sequence = 3, Start = 4192 + Description = null, + Size = 2097152, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 2146304, + Length = 4096, + Sequence = 3, + Start = 4192 }, new Partition { - Description = null, Size = 2097152, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 4243456, Length = 4096, Sequence = 4, Start = 8288 + Description = null, + Size = 2097152, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 4243456, + Length = 4096, + Sequence = 4, + Start = 8288 }, new Partition { - Description = null, Size = 2097152, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 6340608, Length = 4096, Sequence = 5, Start = 12384 + Description = null, + Size = 2097152, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 6340608, + Length = 4096, + Sequence = 5, + Start = 12384 }, new Partition { - Description = null, Size = 1048576, Name = "Swap", Type = "Apple_UNIX_SVR2", - Offset = 8437760, Length = 2048, Sequence = 6, Start = 16480 + Description = null, + Size = 1048576, + Name = "Swap", + Type = "Apple_UNIX_SVR2", + Offset = 8437760, + Length = 2048, + Sequence = 6, + Start = 16480 }, new Partition { - Description = null, Size = 2097152, Name = "Eschatology 2", Type = "Apple_UNIX_SVR2", - Offset = 9486336, Length = 4096, Sequence = 7, Start = 18528 + Description = null, + Size = 2097152, + Name = "Eschatology 2", + Type = "Apple_UNIX_SVR2", + Offset = 9486336, + Length = 4096, + Sequence = 7, + Start = 18528 }, new Partition { - Description = null, Size = 2097152, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 11583488, Length = 4096, Sequence = 8, Start = 22624 + Description = null, + Size = 2097152, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 11583488, + Length = 4096, + Sequence = 8, + Start = 22624 }, new Partition { - Description = null, Size = 2310144, Name = "Usr file system", Type = "Apple_UNIX_SVR2", - Offset = 13680640, Length = 4512, Sequence = 9, Start = 26720 + Description = null, + Size = 2310144, + Name = "Usr file system", + Type = "Apple_UNIX_SVR2", + Offset = 13680640, + Length = 4512, + Sequence = 9, + Start = 26720 }, new Partition { - Description = null, Size = 5416960, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 15990784, Length = 10580, Sequence = 10, Start = 31232 + Description = null, + Size = 5416960, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 15990784, + Length = 10580, + Sequence = 10, + Start = 31232 }, new Partition { - Description = null, Size = 4096, Name = "Extra", Type = "Apple_Free", - Offset = 21407744, Length = 8, Sequence = 11, Start = 41812 + Description = null, + Size = 4096, + Name = "Extra", + Type = "Apple_Free", + Offset = 21407744, + Length = 8, + Sequence = 11, + Start = 41812 } }, @@ -770,53 +1526,113 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 5120, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 10, Sequence = 0, Start = 64 + Description = null, + Size = 5120, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 10, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 3073024, Name = "Scratch", Type = "Apple_Scratch", - Offset = 49152, Length = 6002, Sequence = 2, Start = 96 + Description = null, + Size = 3073024, + Name = "Scratch", + Type = "Apple_Scratch", + Offset = 49152, + Length = 6002, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 2726400, Name = "Root file system", Type = "Apple_UNIX_SVR2", - Offset = 3122176, Length = 5325, Sequence = 3, Start = 6098 + Description = null, + Size = 2726400, + Name = "Root file system", + Type = "Apple_UNIX_SVR2", + Offset = 3122176, + Length = 5325, + Sequence = 3, + Start = 6098 }, new Partition { - Description = null, Size = 3180544, Name = "Extra", Type = "Apple_Free", - Offset = 5848576, Length = 6212, Sequence = 4, Start = 11423 + Description = null, + Size = 3180544, + Name = "Extra", + Type = "Apple_Free", + Offset = 5848576, + Length = 6212, + Sequence = 4, + Start = 11423 }, new Partition { - Description = null, Size = 4203520, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 9029120, Length = 8210, Sequence = 5, Start = 17635 + Description = null, + Size = 4203520, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 9029120, + Length = 8210, + Sequence = 5, + Start = 17635 }, new Partition { - Description = null, Size = 2613248, Name = "Extra", Type = "Apple_Free", - Offset = 13232640, Length = 5104, Sequence = 6, Start = 25845 + Description = null, + Size = 2613248, + Name = "Extra", + Type = "Apple_Free", + Offset = 13232640, + Length = 5104, + Sequence = 6, + Start = 25845 }, new Partition { - Description = null, Size = 5262336, Name = "MacOS", Type = "Apple_HFS", - Offset = 15845888, Length = 10278, Sequence = 7, Start = 30949 + Description = null, + Size = 5262336, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 15845888, + Length = 10278, + Sequence = 7, + Start = 30949 }, new Partition { - Description = null, Size = 1707520, Name = "Eschatology 1", Type = "Apple_UNIX_SVR2", - Offset = 21108224, Length = 3335, Sequence = 8, Start = 41227 + Description = null, + Size = 1707520, + Name = "Eschatology 1", + Type = "Apple_UNIX_SVR2", + Offset = 21108224, + Length = 3335, + Sequence = 8, + Start = 41227 }, new Partition { - Description = null, Size = 5262336, Name = "Extra", Type = "Apple_Free", - Offset = 22815744, Length = 10278, Sequence = 9, Start = 44562 + Description = null, + Size = 5262336, + Name = "Extra", + Type = "Apple_Free", + Offset = 22815744, + Length = 10278, + Sequence = 9, + Start = 44562 } }, @@ -825,58 +1641,124 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 8704, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 17, Sequence = 0, Start = 64 + Description = null, + Size = 8704, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 17, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver43", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver43", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 1486848, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 49152, Length = 2904, Sequence = 2, Start = 96 + Description = null, + Size = 1486848, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 49152, + Length = 2904, + Sequence = 2, + Start = 96 }, new Partition { - Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", - Offset = 1536000, Length = 4096, Sequence = 3, Start = 3000 + Description = null, + Size = 2097152, + Name = "ProDOS", + Type = "Apple_PRODOS", + Offset = 1536000, + Length = 4096, + Sequence = 3, + Start = 3000 }, new Partition { - Description = null, Size = 1564160, Name = "Extra", Type = "Apple_Free", - Offset = 3633152, Length = 3055, Sequence = 4, Start = 7096 + Description = null, + Size = 1564160, + Name = "Extra", + Type = "Apple_Free", + Offset = 3633152, + Length = 3055, + Sequence = 4, + Start = 7096 }, new Partition { - Description = null, Size = 2097152, Name = "ProDOS", Type = "Apple_PRODOS", - Offset = 5197312, Length = 4096, Sequence = 5, Start = 10151 + Description = null, + Size = 2097152, + Name = "ProDOS", + Type = "Apple_PRODOS", + Offset = 5197312, + Length = 4096, + Sequence = 5, + Start = 10151 }, new Partition { - Description = null, Size = 5148160, Name = "MacOS", Type = "Apple_HFS", - Offset = 7294464, Length = 10055, Sequence = 6, Start = 14247 + Description = null, + Size = 5148160, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 7294464, + Length = 10055, + Sequence = 6, + Start = 14247 }, new Partition { - Description = null, Size = 4406784, Name = "Extra", Type = "Apple_Free", - Offset = 12442624, Length = 8607, Sequence = 7, Start = 24302 + Description = null, + Size = 4406784, + Name = "Extra", + Type = "Apple_Free", + Offset = 12442624, + Length = 8607, + Sequence = 7, + Start = 24302 }, new Partition { - Description = null, Size = 2485760, Name = "Random A/UX fs", Type = "Apple_UNIX_SVR2", - Offset = 16849408, Length = 4855, Sequence = 8, Start = 32909 + Description = null, + Size = 2485760, + Name = "Random A/UX fs", + Type = "Apple_UNIX_SVR2", + Offset = 16849408, + Length = 4855, + Sequence = 8, + Start = 32909 }, new Partition { - Description = null, Size = 4746240, Name = "Extra", Type = "Apple_Free", - Offset = 19335168, Length = 9270, Sequence = 9, Start = 37764 + Description = null, + Size = 4746240, + Name = "Extra", + Type = "Apple_Free", + Offset = 19335168, + Length = 9270, + Sequence = 9, + Start = 37764 }, new Partition { - Description = null, Size = 3996672, Name = "A/UX Root", Type = "Apple_UNIX_SVR2", - Offset = 24081408, Length = 7806, Sequence = 10, Start = 47034 + Description = null, + Size = 3996672, + Name = "A/UX Root", + Type = "Apple_UNIX_SVR2", + Offset = 24081408, + Length = 7806, + Sequence = 10, + Start = 47034 } }, @@ -885,18 +1767,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 9216, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 18, Sequence = 0, Start = 64 + Description = null, + Size = 9216, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 18, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver43", - Offset = 32768, Length = 32, Sequence = 1, Start = 64 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver43", + Offset = 32768, + Length = 32, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 28028928, Name = "MacOS", Type = "Apple_HFS", - Offset = 49152, Length = 54744, Sequence = 2, Start = 96 + Description = null, + Size = 28028928, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 49152, + Length = 54744, + Sequence = 2, + Start = 96 } }, @@ -905,18 +1805,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 2064384, Name = "Extra", Type = "Apple_Free", - Offset = 32768, Length = 4032, Sequence = 0, Start = 64 + Description = null, + Size = 2064384, + Name = "Extra", + Type = "Apple_Free", + Offset = 32768, + Length = 4032, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 47185920, Name = "untitled", Type = "Apple_HFS", - Offset = 2097152, Length = 92160, Sequence = 1, Start = 4096 + Description = null, + Size = 47185920, + Name = "untitled", + Type = "Apple_HFS", + Offset = 2097152, + Length = 92160, + Sequence = 1, + Start = 4096 }, new Partition { - Description = null, Size = 84934656, Name = "untitled", Type = "Apple_UNIX_SVR2", - Offset = 49283072, Length = 165888, Sequence = 2, Start = 96256 + Description = null, + Size = 84934656, + Name = "untitled", + Type = "Apple_UNIX_SVR2", + Offset = 49283072, + Length = 165888, + Sequence = 2, + Start = 96256 } }, @@ -925,33 +1843,69 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 3072, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 6, Sequence = 0, Start = 64 + Description = null, + Size = 3072, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 6, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver43", - Offset = 32768, Length = 128, Sequence = 1, Start = 64 + Description = null, + Size = 65536, + Name = "Macintosh_SL", + Type = "Apple_Driver43", + Offset = 32768, + Length = 128, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25088, Name = null, Type = "Apple_Driver", - Offset = 98304, Length = 49, Sequence = 2, Start = 192 + Description = null, + Size = 25088, + Name = null, + Type = "Apple_Driver", + Offset = 98304, + Length = 49, + Sequence = 2, + Start = 192 }, new Partition { - Description = null, Size = 65536, Name = "Macintosh_SL", Type = "Apple_Driver_ATA", - Offset = 98304, Length = 128, Sequence = 3, Start = 192 + Description = null, + Size = 65536, + Name = "Macintosh_SL", + Type = "Apple_Driver_ATA", + Offset = 98304, + Length = 128, + Sequence = 3, + Start = 192 }, new Partition { - Description = null, Size = 25804800, Name = "Untitled #1", Type = "Apple_HFS", - Offset = 163840, Length = 50400, Sequence = 4, Start = 320 + Description = null, + Size = 25804800, + Name = "Untitled #1", + Type = "Apple_HFS", + Offset = 163840, + Length = 50400, + Sequence = 4, + Start = 320 }, new Partition { - Description = null, Size = 237568, Name = "Extra", Type = "Apple_Free", - Offset = 25968640, Length = 464, Sequence = 5, Start = 50720 + Description = null, + Size = 237568, + Name = "Extra", + Type = "Apple_Free", + Offset = 25968640, + Length = 464, + Sequence = 5, + Start = 50720 } }, @@ -960,23 +1914,47 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 13824, Name = null, Type = "Apple_Driver", - Offset = 32768, Length = 27, Sequence = 0, Start = 64 + Description = null, + Size = 13824, + Name = null, + Type = "Apple_Driver", + Offset = 32768, + Length = 27, + Sequence = 0, + Start = 64 }, new Partition { - Description = null, Size = 51200, Name = "Macintosh", Type = "Apple_Driver43", - Offset = 32768, Length = 100, Sequence = 1, Start = 64 + Description = null, + Size = 51200, + Name = "Macintosh", + Type = "Apple_Driver43", + Offset = 32768, + Length = 100, + Sequence = 1, + Start = 64 }, new Partition { - Description = null, Size = 25165824, Name = "untitled", Type = "Apple_HFS", - Offset = 83968, Length = 49152, Sequence = 2, Start = 164 + Description = null, + Size = 25165824, + Name = "untitled", + Type = "Apple_HFS", + Offset = 83968, + Length = 49152, + Sequence = 2, + Start = 164 }, new Partition { - Description = null, Size = 963584, Name = "Extra", Type = "Apple_Free", - Offset = 25249792, Length = 1882, Sequence = 3, Start = 49316 + Description = null, + Size = 963584, + Name = "Extra", + Type = "Apple_Free", + Offset = 25249792, + Length = 1882, + Sequence = 3, + Start = 49316 } }, @@ -985,30 +1963,60 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 12288, Name = null, Type = "Apple_Driver", - Offset = 57344, Length = 24, Sequence = 0, Start = 112 + Description = null, + Size = 12288, + Name = null, + Type = "Apple_Driver", + Offset = 57344, + Length = 24, + Sequence = 0, + Start = 112 }, new Partition { - Description = null, Size = 16384, Name = "Macintosh", Type = "Apple_Driver", - Offset = 57344, Length = 32, Sequence = 1, Start = 112 + Description = null, + Size = 16384, + Name = "Macintosh", + Type = "Apple_Driver", + Offset = 57344, + Length = 32, + Sequence = 1, + Start = 112 }, new Partition { - Description = null, Size = 16384, Name = "Extra", Type = "Apple_Free", - Offset = 73728, Length = 32, Sequence = 2, Start = 144 + Description = null, + Size = 16384, + Name = "Extra", + Type = "Apple_Free", + Offset = 73728, + Length = 32, + Sequence = 2, + Start = 144 }, new Partition { - Description = null, Size = 27986944, Name = "MacOS", Type = "Apple_HFS", - Offset = 90112, Length = 54662, Sequence = 3, Start = 176 + Description = null, + Size = 27986944, + Name = "MacOS", + Type = "Apple_HFS", + Offset = 90112, + Length = 54662, + Sequence = 3, + Start = 176 }, // TODO: ADFS tries to read past this partition... new Partition { - Description = null, Size = 1024, Name = "Extra", Type = "Apple_Free", - Offset = 28077056, Length = 2, Sequence = 4, Start = 54838 + Description = null, + Size = 1024, + Name = "Extra", + Type = "Apple_Free", + Offset = 28077056, + Length = 2, + Sequence = 4, + Start = 54838 } } }; diff --git a/Aaru.Tests/Partitions/Atari.cs b/Aaru.Tests/Partitions/Atari.cs index 4c32a7823..adb2bb73e 100644 --- a/Aaru.Tests/Partitions/Atari.cs +++ b/Aaru.Tests/Partitions/Atari.cs @@ -51,53 +51,113 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 31457280, Name = null, Type = "GEM", - Offset = 512, Length = 61440, Sequence = 0, Start = 1 + Description = null, + Size = 31457280, + Name = null, + Type = "GEM", + Offset = 512, + Length = 61440, + Sequence = 0, + Start = 1 }, new Partition { - Description = null, Size = 41943040, Name = null, Type = "BGM", - Offset = 31457792, Length = 81920, Sequence = 1, Start = 61441 + Description = null, + Size = 41943040, + Name = null, + Type = "BGM", + Offset = 31457792, + Length = 81920, + Sequence = 1, + Start = 61441 }, new Partition { - Description = null, Size = 56402432, Name = null, Type = "LNX", - Offset = 73400832, Length = 110161, Sequence = 2, Start = 143361 + Description = null, + Size = 56402432, + Name = null, + Type = "LNX", + Offset = 73400832, + Length = 110161, + Sequence = 2, + Start = 143361 }, new Partition { - Description = null, Size = 43212800, Name = null, Type = "MAC", - Offset = 129803264, Length = 84400, Sequence = 3, Start = 253522 + Description = null, + Size = 43212800, + Name = null, + Type = "MAC", + Offset = 129803264, + Length = 84400, + Sequence = 3, + Start = 253522 }, new Partition { - Description = null, Size = 57671680, Name = null, Type = "MIX", - Offset = 173016064, Length = 112640, Sequence = 4, Start = 337922 + Description = null, + Size = 57671680, + Name = null, + Type = "MIX", + Offset = 173016064, + Length = 112640, + Sequence = 4, + Start = 337922 }, new Partition { - Description = null, Size = 62914560, Name = null, Type = "MNX", - Offset = 230687744, Length = 122880, Sequence = 5, Start = 450562 + Description = null, + Size = 62914560, + Name = null, + Type = "MNX", + Offset = 230687744, + Length = 122880, + Sequence = 5, + Start = 450562 }, new Partition { - Description = null, Size = 73400320, Name = null, Type = "RAW", - Offset = 293602304, Length = 143360, Sequence = 6, Start = 573442 + Description = null, + Size = 73400320, + Name = null, + Type = "RAW", + Offset = 293602304, + Length = 143360, + Sequence = 6, + Start = 573442 }, new Partition { - Description = null, Size = 78643200, Name = null, Type = "SWP", - Offset = 367002624, Length = 153600, Sequence = 7, Start = 716802 + Description = null, + Size = 78643200, + Name = null, + Type = "SWP", + Offset = 367002624, + Length = 153600, + Sequence = 7, + Start = 716802 }, new Partition { - Description = null, Size = 1048576, Name = null, Type = "UNX", - Offset = 445645824, Length = 2048, Sequence = 8, Start = 870402 + Description = null, + Size = 1048576, + Name = null, + Type = "UNX", + Offset = 445645824, + Length = 2048, + Sequence = 8, + Start = 870402 }, new Partition { - Description = null, Size = 77593600, Name = null, Type = "LNX", - Offset = 446694400, Length = 151550, Sequence = 9, Start = 872450 + Description = null, + Size = 77593600, + Name = null, + Type = "LNX", + Offset = 446694400, + Length = 151550, + Sequence = 9, + Start = 872450 } }, @@ -106,48 +166,102 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 15728640, Name = null, Type = "GEM", - Offset = 512, Length = 30720, Sequence = 0, Start = 1 + Description = null, + Size = 15728640, + Name = null, + Type = "GEM", + Offset = 512, + Length = 30720, + Sequence = 0, + Start = 1 }, new Partition { - Description = null, Size = 20971520, Name = null, Type = "UNX", - Offset = 15729152, Length = 40960, Sequence = 1, Start = 30721 + Description = null, + Size = 20971520, + Name = null, + Type = "UNX", + Offset = 15729152, + Length = 40960, + Sequence = 1, + Start = 30721 }, new Partition { - Description = null, Size = 31457280, Name = null, Type = "LNX", - Offset = 36700672, Length = 61440, Sequence = 2, Start = 71681 + Description = null, + Size = 31457280, + Name = null, + Type = "LNX", + Offset = 36700672, + Length = 61440, + Sequence = 2, + Start = 71681 }, new Partition { - Description = null, Size = 41943040, Name = null, Type = "BGM", - Offset = 68157952, Length = 81920, Sequence = 3, Start = 133121 + Description = null, + Size = 41943040, + Name = null, + Type = "BGM", + Offset = 68157952, + Length = 81920, + Sequence = 3, + Start = 133121 }, new Partition { - Description = null, Size = 52428800, Name = null, Type = "MAC", - Offset = 110100992, Length = 102400, Sequence = 4, Start = 215041 + Description = null, + Size = 52428800, + Name = null, + Type = "MAC", + Offset = 110100992, + Length = 102400, + Sequence = 4, + Start = 215041 }, new Partition { - Description = null, Size = 62914560, Name = null, Type = "MIX", - Offset = 162529792, Length = 122880, Sequence = 5, Start = 317441 + Description = null, + Size = 62914560, + Name = null, + Type = "MIX", + Offset = 162529792, + Length = 122880, + Sequence = 5, + Start = 317441 }, new Partition { - Description = null, Size = 83886080, Name = null, Type = "SWP", - Offset = 225444352, Length = 163840, Sequence = 6, Start = 440321 + Description = null, + Size = 83886080, + Name = null, + Type = "SWP", + Offset = 225444352, + Length = 163840, + Sequence = 6, + Start = 440321 }, new Partition { - Description = null, Size = 103809024, Name = null, Type = "MNX", - Offset = 309330432, Length = 202752, Sequence = 7, Start = 604161 + Description = null, + Size = 103809024, + Name = null, + Type = "MNX", + Offset = 309330432, + Length = 202752, + Sequence = 7, + Start = 604161 }, new Partition { - Description = null, Size = 104857600, Name = null, Type = "LNX", - Offset = 413139456, Length = 204800, Sequence = 8, Start = 806913 + Description = null, + Size = 104857600, + Name = null, + Type = "LNX", + Offset = 413139456, + Length = 204800, + Sequence = 8, + Start = 806913 } }, @@ -156,23 +270,47 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 7340032, Name = null, Type = "GEM", - Offset = 1024, Length = 14336, Sequence = 0, Start = 2 + Description = null, + Size = 7340032, + Name = null, + Type = "GEM", + Offset = 1024, + Length = 14336, + Sequence = 0, + Start = 2 }, new Partition { - Description = null, Size = 7340032, Name = null, Type = "GEM", - Offset = 7341056, Length = 14336, Sequence = 1, Start = 14338 + Description = null, + Size = 7340032, + Name = null, + Type = "GEM", + Offset = 7341056, + Length = 14336, + Sequence = 1, + Start = 14338 }, new Partition { - Description = null, Size = 7340032, Name = null, Type = "GEM", - Offset = 14681088, Length = 14336, Sequence = 2, Start = 28674 + Description = null, + Size = 7340032, + Name = null, + Type = "GEM", + Offset = 14681088, + Length = 14336, + Sequence = 2, + Start = 28674 }, new Partition { - Description = null, Size = 7339008, Name = null, Type = "GEM", - Offset = 22021120, Length = 14334, Sequence = 3, Start = 43010 + Description = null, + Size = 7339008, + Name = null, + Type = "GEM", + Offset = 22021120, + Length = 14334, + Sequence = 3, + Start = 43010 } } }; diff --git a/Aaru.Tests/Partitions/BSD.cs b/Aaru.Tests/Partitions/BSD.cs index efeb8e64c..a67d6e9d8 100644 --- a/Aaru.Tests/Partitions/BSD.cs +++ b/Aaru.Tests/Partitions/BSD.cs @@ -51,18 +51,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 38797312, Name = null, Type = "FAT", - Offset = 1048576, Length = 75776, Sequence = 0, Start = 2048 + Description = null, + Size = 38797312, + Name = null, + Type = "FAT", + Offset = 1048576, + Length = 75776, + Sequence = 0, + Start = 2048 }, new Partition { - Description = null, Size = 19922944, Name = null, Type = "FAT", - Offset = 40894464, Length = 38912, Sequence = 1, Start = 79872 + Description = null, + Size = 19922944, + Name = null, + Type = "FAT", + Offset = 40894464, + Length = 38912, + Sequence = 1, + Start = 79872 }, new Partition { - Description = null, Size = 48234496, Name = null, Type = "FAT", - Offset = 61865984, Length = 94208, Sequence = 2, Start = 120832 + Description = null, + Size = 48234496, + Name = null, + Type = "FAT", + Offset = 61865984, + Length = 94208, + Sequence = 2, + Start = 120832 } }, @@ -71,33 +89,69 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 10453504, Name = null, Type = "FAT", - Offset = 516096, Length = 20417, Sequence = 0, Start = 1008 + Description = null, + Size = 10453504, + Name = null, + Type = "FAT", + Offset = 516096, + Length = 20417, + Sequence = 0, + Start = 1008 }, new Partition { - Description = null, Size = 209715200, Name = null, Type = "FAT", - Offset = 11354112, Length = 409600, Sequence = 1, Start = 22176 + Description = null, + Size = 209715200, + Name = null, + Type = "FAT", + Offset = 11354112, + Length = 409600, + Sequence = 1, + Start = 22176 }, new Partition { - Description = null, Size = 805306368, Name = null, Type = "FAT", - Offset = 221405184, Length = 1572864, Sequence = 2, Start = 432432 + Description = null, + Size = 805306368, + Name = null, + Type = "FAT", + Offset = 221405184, + Length = 1572864, + Sequence = 2, + Start = 432432 }, new Partition { - Description = null, Size = 747656192, Name = null, Type = "4.2BSD Fast File System", - Offset = 1027031040, Length = 1460266, Sequence = 3, Start = 2005920 + Description = null, + Size = 747656192, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 1027031040, + Length = 1460266, + Sequence = 3, + Start = 2005920 }, new Partition { - Description = null, Size = 268435456, Name = null, Type = "4.4LFS", - Offset = 1774854144, Length = 524288, Sequence = 4, Start = 3466512 + Description = null, + Size = 268435456, + Name = null, + Type = "4.4LFS", + Offset = 1774854144, + Length = 524288, + Sequence = 4, + Start = 3466512 }, new Partition { - Description = null, Size = 103743488, Name = null, Type = "4.2BSD Fast File System", - Offset = 2043740160, Length = 202624, Sequence = 5, Start = 3991680 + Description = null, + Size = 103743488, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 2043740160, + Length = 202624, + Sequence = 5, + Start = 3991680 } }, @@ -106,57 +160,117 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 10485760, Name = null, Type = "FAT", - Offset = 516096, Length = 20480, Sequence = 0, Start = 1008 + Description = null, + Size = 10485760, + Name = null, + Type = "FAT", + Offset = 516096, + Length = 20480, + Sequence = 0, + Start = 1008 }, new Partition { - Description = null, Size = 104857600, Name = null, Type = "FAT", - Offset = 11354112, Length = 204800, Sequence = 1, Start = 22176 + Description = null, + Size = 104857600, + Name = null, + Type = "FAT", + Offset = 11354112, + Length = 204800, + Sequence = 1, + Start = 22176 }, new Partition { - Description = null, Size = 209715200, Name = null, Type = "FAT", - Offset = 116637696, Length = 409600, Sequence = 2, Start = 227808 + Description = null, + Size = 209715200, + Name = null, + Type = "FAT", + Offset = 116637696, + Length = 409600, + Sequence = 2, + Start = 227808 }, new Partition { - Description = null, Size = 40771584, Name = null, Type = "4.2BSD Fast File System", - Offset = 326688768, Length = 79632, Sequence = 3, Start = 638064 + Description = null, + Size = 40771584, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 326688768, + Length = 79632, + Sequence = 3, + Start = 638064 }, new Partition { - Description = null, Size = 419430400, Name = null, Type = "4.2BSD Fast File System", - Offset = 367460352, Length = 819200, Sequence = 4, Start = 717696 + Description = null, + Size = 419430400, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 367460352, + Length = 819200, + Sequence = 4, + Start = 717696 }, new Partition { - Description = null, Size = 471859200, Name = null, Type = "4.2BSD Fast File System", - Offset = 787562496, Length = 921600, Sequence = 5, Start = 1538208 + Description = null, + Size = 471859200, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 787562496, + Length = 921600, + Sequence = 5, + Start = 1538208 }, // Type conflicts between DragonFly and NetBSD, really is Apple UFS new Partition { - Description = null, Size = 78643200, Name = null, Type = "Hammer", - Offset = 1259790336, Length = 153600, Sequence = 6, Start = 2460528 + Description = null, + Size = 78643200, + Name = null, + Type = "Hammer", + Offset = 1259790336, + Length = 153600, + Sequence = 6, + Start = 2460528 }, new Partition { - Description = null, Size = 99614720, Name = null, Type = "UNIX 7th Edition", - Offset = 1338753024, Length = 194560, Sequence = 7, Start = 2614752 + Description = null, + Size = 99614720, + Name = null, + Type = "UNIX 7th Edition", + Offset = 1338753024, + Length = 194560, + Sequence = 7, + Start = 2614752 }, new Partition { - Description = null, Size = 244318208, Name = null, Type = "4.4LFS", - Offset = 1438875648, Length = 477184, Sequence = 8, Start = 2810304 + Description = null, + Size = 244318208, + Name = null, + Type = "4.4LFS", + Offset = 1438875648, + Length = 477184, + Sequence = 8, + Start = 2810304 }, // Type conflicts, really is Linux ext2 new Partition { - Description = null, Size = 463978496, Name = null, Type = "Digital LSM Public Region", - Offset = 1683505152, Length = 906208, Sequence = 9, Start = 3288096 + Description = null, + Size = 463978496, + Name = null, + Type = "Digital LSM Public Region", + Offset = 1683505152, + Length = 906208, + Sequence = 9, + Start = 3288096 } }, @@ -165,57 +279,117 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 10321920, Name = null, Type = "FAT", - Offset = 516096, Length = 20160, Sequence = 0, Start = 1008 + Description = null, + Size = 10321920, + Name = null, + Type = "FAT", + Offset = 516096, + Length = 20160, + Sequence = 0, + Start = 1008 }, new Partition { - Description = null, Size = 104767488, Name = null, Type = "FAT", - Offset = 11354112, Length = 204624, Sequence = 1, Start = 22176 + Description = null, + Size = 104767488, + Name = null, + Type = "FAT", + Offset = 11354112, + Length = 204624, + Sequence = 1, + Start = 22176 }, new Partition { - Description = null, Size = 209534976, Name = null, Type = "FAT", - Offset = 116637696, Length = 409248, Sequence = 2, Start = 227808 + Description = null, + Size = 209534976, + Name = null, + Type = "FAT", + Offset = 116637696, + Length = 409248, + Sequence = 2, + Start = 227808 }, new Partition { - Description = null, Size = 40255488, Name = null, Type = "4.2BSD Fast File System", - Offset = 326688768, Length = 78624, Sequence = 3, Start = 638064 + Description = null, + Size = 40255488, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 326688768, + Length = 78624, + Sequence = 3, + Start = 638064 }, new Partition { - Description = null, Size = 419069952, Name = null, Type = "4.2BSD Fast File System", - Offset = 367460352, Length = 818496, Sequence = 4, Start = 717696 + Description = null, + Size = 419069952, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 367460352, + Length = 818496, + Sequence = 4, + Start = 717696 }, new Partition { - Description = null, Size = 471711744, Name = null, Type = "4.2BSD Fast File System", - Offset = 787562496, Length = 921312, Sequence = 5, Start = 1538208 + Description = null, + Size = 471711744, + Name = null, + Type = "4.2BSD Fast File System", + Offset = 787562496, + Length = 921312, + Sequence = 5, + Start = 1538208 }, // Type conflicts between DragonFly and NetBSD, really is Apple UFS new Partition { - Description = null, Size = 78446592, Name = null, Type = "Hammer", - Offset = 1259790336, Length = 153216, Sequence = 6, Start = 2460528 + Description = null, + Size = 78446592, + Name = null, + Type = "Hammer", + Offset = 1259790336, + Length = 153216, + Sequence = 6, + Start = 2460528 }, new Partition { - Description = null, Size = 99606528, Name = null, Type = "UNIX 7th Edition", - Offset = 1338753024, Length = 194544, Sequence = 7, Start = 2614752 + Description = null, + Size = 99606528, + Name = null, + Type = "UNIX 7th Edition", + Offset = 1338753024, + Length = 194544, + Sequence = 7, + Start = 2614752 }, new Partition { - Description = null, Size = 243597312, Name = null, Type = "4.4LFS", - Offset = 1438875648, Length = 475776, Sequence = 8, Start = 2810304 + Description = null, + Size = 243597312, + Name = null, + Type = "4.4LFS", + Offset = 1438875648, + Length = 475776, + Sequence = 8, + Start = 2810304 }, // Type conflicts, really is Linux ext2 new Partition { - Description = null, Size = 463970304, Name = null, Type = "Digital LSM Public Region", - Offset = 1683505152, Length = 906192, Sequence = 9, Start = 3288096 + Description = null, + Size = 463970304, + Name = null, + Type = "Digital LSM Public Region", + Offset = 1683505152, + Length = 906192, + Sequence = 9, + Start = 3288096 } } }; diff --git a/Aaru.Tests/Partitions/GPT.cs b/Aaru.Tests/Partitions/GPT.cs index d805809dd..e00e16ce7 100644 --- a/Aaru.Tests/Partitions/GPT.cs +++ b/Aaru.Tests/Partitions/GPT.cs @@ -51,34 +51,69 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 10485760, Name = "EFI System", Type = "EFI System", - Offset = 1048576, Length = 20480, Sequence = 0, Start = 2048 + Description = null, + Size = 10485760, + Name = "EFI System", + Type = "EFI System", + Offset = 1048576, + Length = 20480, + Sequence = 0, + Start = 2048 }, new Partition { - Description = null, Size = 15728640, Name = "Microsoft basic data", Type = "Microsoft Basic data", - Offset = 11534336, Length = 30720, Sequence = 1, Start = 22528 + Description = null, + Size = 15728640, + Name = "Microsoft basic data", + Type = "Microsoft Basic data", + Offset = 11534336, + Length = 30720, + Sequence = 1, + Start = 22528 }, new Partition { - Description = null, Size = 20971520, Name = "Apple label", Type = "Apple Label", - Offset = 27262976, Length = 40960, Sequence = 2, Start = 53248 + Description = null, + Size = 20971520, + Name = "Apple label", + Type = "Apple Label", + Offset = 27262976, + Length = 40960, + Sequence = 2, + Start = 53248 }, new Partition { - Description = null, Size = 26214400, Name = "Solaris /usr & Mac ZFS", - Type = "Solaris /usr or Apple ZFS", Offset = 48234496, Length = 51200, Sequence = 3, + Description = null, + Size = 26214400, + Name = "Solaris /usr & Mac ZFS", + Type = "Solaris /usr or Apple ZFS", + Offset = 48234496, + Length = 51200, + Sequence = 3, Start = 94208 }, new Partition { - Description = null, Size = 31457280, Name = "FreeBSD ZFS", Type = "FreeBSD ZFS", - Offset = 74448896, Length = 61440, Sequence = 4, Start = 145408 + Description = null, + Size = 31457280, + Name = "FreeBSD ZFS", + Type = "FreeBSD ZFS", + Offset = 74448896, + Length = 61440, + Sequence = 4, + Start = 145408 }, new Partition { - Description = null, Size = 28294656, Name = "HP-UX data", Type = "HP-UX Data", - Offset = 105906176, Length = 55263, Sequence = 5, Start = 206848 + Description = null, + Size = 28294656, + Name = "HP-UX data", + Type = "HP-UX Data", + Offset = 105906176, + Length = 55263, + Sequence = 5, + Start = 206848 } }, @@ -87,18 +122,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 42991616, Name = "", Type = "Apple HFS", - Offset = 1048576, Length = 83968, Sequence = 0, Start = 2048 + Description = null, + Size = 42991616, + Name = "", + Type = "Apple HFS", + Offset = 1048576, + Length = 83968, + Sequence = 0, + Start = 2048 }, new Partition { - Description = null, Size = 52428800, Name = "", Type = "Linux filesystem", - Offset = 44040192, Length = 102400, Sequence = 1, Start = 86016 + Description = null, + Size = 52428800, + Name = "", + Type = "Linux filesystem", + Offset = 44040192, + Length = 102400, + Sequence = 1, + Start = 86016 }, new Partition { - Description = null, Size = 36700160, Name = "", Type = "Microsoft Basic data", - Offset = 96468992, Length = 71680, Sequence = 2, Start = 188416 + Description = null, + Size = 36700160, + Name = "", + Type = "Microsoft Basic data", + Offset = 96468992, + Length = 71680, + Sequence = 2, + Start = 188416 } } }; diff --git a/Aaru.Tests/Partitions/MBR.cs b/Aaru.Tests/Partitions/MBR.cs index 7eed7220b..da9d95361 100644 --- a/Aaru.Tests/Partitions/MBR.cs +++ b/Aaru.Tests/Partitions/MBR.cs @@ -57,23 +57,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x04", Length = 100800, - Sequence = 0, Start = 1008 + Description = null, + Name = null, + Type = "0x04", + Length = 100800, + Sequence = 0, + Start = 1008 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 99792, - Sequence = 1, Start = 102816 + Description = null, + Name = null, + Type = "0x04", + Length = 99792, + Sequence = 1, + Start = 102816 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 100800, - Sequence = 2, Start = 202608 + Description = null, + Name = null, + Type = "0x04", + Length = 100800, + Sequence = 2, + Start = 202608 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 303408, - Sequence = 3, Start = 352800 + Description = null, + Name = null, + Type = "0x04", + Length = 303408, + Sequence = 3, + Start = 352800 } }, @@ -82,13 +98,21 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x07", Length = 409248, - Sequence = 0, Start = 409248 + Description = null, + Name = null, + Type = "0x07", + Length = 409248, + Sequence = 0, + Start = 409248 }, new Partition { - Description = null, Name = null, Type = "0xA8", Length = 204624, - Sequence = 1, Start = 818496 + Description = null, + Name = null, + Type = "0xA8", + Length = 204624, + Sequence = 1, + Start = 818496 } }, @@ -97,23 +121,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0xA8", Length = 204561, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0xA8", + Length = 204561, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0xAB", Length = 81648, - Sequence = 1, Start = 204624 + Description = null, + Name = null, + Type = "0xAB", + Length = 81648, + Sequence = 1, + Start = 204624 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245952, - Sequence = 2, Start = 286272 + Description = null, + Name = null, + Type = "0x06", + Length = 245952, + Sequence = 2, + Start = 286272 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 488880, - Sequence = 3, Start = 532224 + Description = null, + Name = null, + Type = "0x06", + Length = 488880, + Sequence = 3, + Start = 532224 } }, @@ -122,23 +162,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 150000, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 150000, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 176000, - Sequence = 1, Start = 150063 + Description = null, + Name = null, + Type = "0xAF", + Length = 176000, + Sequence = 1, + Start = 150063 }, new Partition { - Description = null, Name = null, Type = "0xA8", Length = 350000, - Sequence = 2, Start = 326063 + Description = null, + Name = null, + Type = "0xA8", + Length = 350000, + Sequence = 2, + Start = 326063 }, new Partition { - Description = null, Name = null, Type = "0x0C", Length = 347937, - Sequence = 3, Start = 676063 + Description = null, + Name = null, + Type = "0x0C", + Length = 347937, + Sequence = 3, + Start = 676063 } }, @@ -147,23 +203,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 100800, - Sequence = 0, Start = 1008 + Description = null, + Name = null, + Type = "0x06", + Length = 100800, + Sequence = 0, + Start = 1008 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 402129, - Sequence = 1, Start = 101871 + Description = null, + Name = null, + Type = "0x06", + Length = 402129, + Sequence = 1, + Start = 101871 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 152145, - Sequence = 2, Start = 504063 + Description = null, + Name = null, + Type = "0x06", + Length = 152145, + Sequence = 2, + Start = 504063 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 365841, - Sequence = 3, Start = 656271 + Description = null, + Name = null, + Type = "0x06", + Length = 365841, + Sequence = 3, + Start = 656271 } }, @@ -172,23 +244,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 126945, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 126945, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 124929, - Sequence = 1, Start = 127071 + Description = null, + Name = null, + Type = "0x06", + Length = 124929, + Sequence = 1, + Start = 127071 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 101745, - Sequence = 2, Start = 252063 + Description = null, + Name = null, + Type = "0x06", + Length = 101745, + Sequence = 2, + Start = 252063 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 668241, - Sequence = 3, Start = 353871 + Description = null, + Name = null, + Type = "0x06", + Length = 668241, + Sequence = 3, + Start = 353871 } }, @@ -197,28 +285,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 128016, - Sequence = 0, Start = 124992 + Description = null, + Name = null, + Type = "0x06", + Length = 128016, + Sequence = 0, + Start = 124992 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 99729, - Sequence = 1, Start = 253071 + Description = null, + Name = null, + Type = "0x06", + Length = 99729, + Sequence = 1, + Start = 253071 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 100737, - Sequence = 2, Start = 352863 + Description = null, + Name = null, + Type = "0x06", + Length = 100737, + Sequence = 2, + Start = 352863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 313425, - Sequence = 3, Start = 453663 + Description = null, + Name = null, + Type = "0x06", + Length = 313425, + Sequence = 3, + Start = 453663 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 254961, - Sequence = 4, Start = 767151 + Description = null, + Name = null, + Type = "0x06", + Length = 254961, + Sequence = 4, + Start = 767151 } }, @@ -227,28 +335,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 101745, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 101745, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 18081, - Sequence = 1, Start = 102879 + Description = null, + Name = null, + Type = "0x01", + Length = 18081, + Sequence = 1, + Start = 102879 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 130977, - Sequence = 2, Start = 121023 + Description = null, + Name = null, + Type = "0x06", + Length = 130977, + Sequence = 2, + Start = 121023 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 202545, - Sequence = 3, Start = 252063 + Description = null, + Name = null, + Type = "0x06", + Length = 202545, + Sequence = 3, + Start = 252063 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 567441, - Sequence = 4, Start = 454671 + Description = null, + Name = null, + Type = "0x06", + Length = 567441, + Sequence = 4, + Start = 454671 } }, @@ -257,28 +385,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 102753, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 102753, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 307377, - Sequence = 1, Start = 102879 + Description = null, + Name = null, + Type = "0x06", + Length = 307377, + Sequence = 1, + Start = 102879 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 384993, - Sequence = 2, Start = 410319 + Description = null, + Name = null, + Type = "0x06", + Length = 384993, + Sequence = 2, + Start = 410319 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 17073, - Sequence = 3, Start = 795375 + Description = null, + Name = null, + Type = "0x01", + Length = 17073, + Sequence = 3, + Start = 795375 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 209601, - Sequence = 4, Start = 812511 + Description = null, + Name = null, + Type = "0x06", + Length = 209601, + Sequence = 4, + Start = 812511 } }, @@ -287,28 +435,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 202545, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 202545, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 141057, - Sequence = 1, Start = 202671 + Description = null, + Name = null, + Type = "0x06", + Length = 141057, + Sequence = 1, + Start = 202671 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 152145, - Sequence = 2, Start = 352863 + Description = null, + Name = null, + Type = "0x06", + Length = 152145, + Sequence = 2, + Start = 352863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 364833, - Sequence = 3, Start = 505071 + Description = null, + Name = null, + Type = "0x06", + Length = 364833, + Sequence = 3, + Start = 505071 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 152145, - Sequence = 4, Start = 869967 + Description = null, + Name = null, + Type = "0x06", + Length = 152145, + Sequence = 4, + Start = 869967 } }, @@ -317,28 +485,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 138033, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x06", + Length = 138033, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 303345, - Sequence = 2, Start = 352863 + Description = null, + Name = null, + Type = "0x06", + Length = 303345, + Sequence = 2, + Start = 352863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 249921, - Sequence = 3, Start = 656271 + Description = null, + Name = null, + Type = "0x06", + Length = 249921, + Sequence = 3, + Start = 656271 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 115857, - Sequence = 4, Start = 906255 + Description = null, + Name = null, + Type = "0x06", + Length = 115857, + Sequence = 4, + Start = 906255 } }, @@ -347,28 +535,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x04", Length = 20480, - Sequence = 0, Start = 2048 + Description = null, + Name = null, + Type = "0x04", + Length = 20480, + Sequence = 0, + Start = 2048 }, new Partition { - Description = null, Name = null, Type = "0x24", Length = 40960, - Sequence = 1, Start = 22528 + Description = null, + Name = null, + Type = "0x24", + Length = 40960, + Sequence = 1, + Start = 22528 }, new Partition { - Description = null, Name = null, Type = "0xA7", Length = 61440, - Sequence = 2, Start = 65536 + Description = null, + Name = null, + Type = "0xA7", + Length = 61440, + Sequence = 2, + Start = 65536 }, new Partition { - Description = null, Name = null, Type = "0x42", Length = 81920, - Sequence = 3, Start = 129024 + Description = null, + Name = null, + Type = "0x42", + Length = 81920, + Sequence = 3, + Start = 129024 }, new Partition { - Description = null, Name = null, Type = "0x83", Length = 49152, - Sequence = 4, Start = 212992 + Description = null, + Name = null, + Type = "0x83", + Length = 49152, + Sequence = 4, + Start = 212992 } }, @@ -377,33 +585,57 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0xA8", Length = 204800, - Sequence = 0, Start = 8 + Description = null, + Name = null, + Type = "0xA8", + Length = 204800, + Sequence = 0, + Start = 8 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 102400, - Sequence = 1, Start = 204816 + Description = null, + Name = null, + Type = "0xAF", + Length = 102400, + Sequence = 1, + Start = 204816 }, new Partition { - Description = null, Name = null, Type = "0x0B", Length = 102400, - Sequence = 2, Start = 307224 + Description = null, + Name = null, + Type = "0x0B", + Length = 102400, + Sequence = 2, + Start = 307224 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 204800, - Sequence = 3, Start = 409632 + Description = null, + Name = null, + Type = "0xAF", + Length = 204800, + Sequence = 3, + Start = 409632 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 204800, - Sequence = 4, Start = 614440 + Description = null, + Name = null, + Type = "0xAF", + Length = 204800, + Sequence = 4, + Start = 614440 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 204752, - Sequence = 5, Start = 819248 + Description = null, + Name = null, + Type = "0xAF", + Length = 204752, + Sequence = 5, + Start = 819248 } }, @@ -412,33 +644,57 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0xAF", Length = 102400, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0xAF", + Length = 102400, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 204800, - Sequence = 1, Start = 102501 + Description = null, + Name = null, + Type = "0xAF", + Length = 204800, + Sequence = 1, + Start = 102501 }, new Partition { - Description = null, Name = null, Type = "0x0B", Length = 204800, - Sequence = 2, Start = 307314 + Description = null, + Name = null, + Type = "0x0B", + Length = 204800, + Sequence = 2, + Start = 307314 }, new Partition { - Description = null, Name = null, Type = "0xA8", Length = 204800, - Sequence = 3, Start = 512127 + Description = null, + Name = null, + Type = "0xA8", + Length = 204800, + Sequence = 3, + Start = 512127 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 102400, - Sequence = 4, Start = 716940 + Description = null, + Name = null, + Type = "0x06", + Length = 102400, + Sequence = 4, + Start = 716940 }, new Partition { - Description = null, Name = null, Type = "0xAF", Length = 204622, - Sequence = 5, Start = 819378 + Description = null, + Name = null, + Type = "0xAF", + Length = 204622, + Sequence = 5, + Start = 819378 } }, @@ -447,83 +703,147 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 1, Start = 65583 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 1, + Start = 65583 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 2, Start = 131103 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 2, + Start = 131103 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 3, Start = 196623 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 3, + Start = 196623 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 4, Start = 262143 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 4, + Start = 262143 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 5, Start = 327663 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 5, + Start = 327663 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 6, Start = 393183 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 6, + Start = 393183 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 7, Start = 458703 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 7, + Start = 458703 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 8, Start = 524223 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 8, + Start = 524223 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 9, Start = 589743 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 9, + Start = 589743 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 10, Start = 655263 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 10, + Start = 655263 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 11, Start = 720783 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 11, + Start = 720783 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 12, Start = 786303 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 12, + Start = 786303 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 13, Start = 851823 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 13, + Start = 851823 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 14, Start = 917343 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 14, + Start = 917343 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 39249, - Sequence = 15, Start = 982863 + Description = null, + Name = null, + Type = "0x04", + Length = 39249, + Sequence = 15, + Start = 982863 } }, @@ -532,68 +852,120 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 102753, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 102753, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 31185, - Sequence = 1, Start = 102879 + Description = null, + Name = null, + Type = "0x01", + Length = 31185, + Sequence = 1, + Start = 102879 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 41265, - Sequence = 2, Start = 134127 + Description = null, + Name = null, + Type = "0x04", + Length = 41265, + Sequence = 2, + Start = 134127 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 51345, - Sequence = 3, Start = 175455 + Description = null, + Name = null, + Type = "0x04", + Length = 51345, + Sequence = 3, + Start = 175455 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 61425, - Sequence = 4, Start = 226863 + Description = null, + Name = null, + Type = "0x04", + Length = 61425, + Sequence = 4, + Start = 226863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 72513, - Sequence = 5, Start = 288351 + Description = null, + Name = null, + Type = "0x06", + Length = 72513, + Sequence = 5, + Start = 288351 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 82593, - Sequence = 6, Start = 360927 + Description = null, + Name = null, + Type = "0x06", + Length = 82593, + Sequence = 6, + Start = 360927 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 92673, - Sequence = 7, Start = 443583 + Description = null, + Name = null, + Type = "0x06", + Length = 92673, + Sequence = 7, + Start = 443583 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 102753, - Sequence = 8, Start = 536319 + Description = null, + Name = null, + Type = "0x06", + Length = 102753, + Sequence = 8, + Start = 536319 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 112833, - Sequence = 9, Start = 639135 + Description = null, + Name = null, + Type = "0x06", + Length = 112833, + Sequence = 9, + Start = 639135 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 122913, - Sequence = 10, Start = 752031 + Description = null, + Name = null, + Type = "0x06", + Length = 122913, + Sequence = 10, + Start = 752031 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 134001, - Sequence = 11, Start = 875007 + Description = null, + Name = null, + Type = "0x06", + Length = 134001, + Sequence = 11, + Start = 875007 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 13041, - Sequence = 12, Start = 1009071 + Description = null, + Name = null, + Type = "0x01", + Length = 13041, + Sequence = 12, + Start = 1009071 } }, @@ -602,48 +974,84 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x04", Length = 51345, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x04", + Length = 51345, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 72513, - Sequence = 1, Start = 51471 + Description = null, + Name = null, + Type = "0x06", + Length = 72513, + Sequence = 1, + Start = 51471 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 92673, - Sequence = 2, Start = 124047 + Description = null, + Name = null, + Type = "0x06", + Length = 92673, + Sequence = 2, + Start = 124047 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 112833, - Sequence = 3, Start = 216783 + Description = null, + Name = null, + Type = "0x06", + Length = 112833, + Sequence = 3, + Start = 216783 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 134001, - Sequence = 4, Start = 329679 + Description = null, + Name = null, + Type = "0x06", + Length = 134001, + Sequence = 4, + Start = 329679 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 154161, - Sequence = 5, Start = 463743 + Description = null, + Name = null, + Type = "0x06", + Length = 154161, + Sequence = 5, + Start = 463743 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 178353, - Sequence = 6, Start = 617967 + Description = null, + Name = null, + Type = "0x06", + Length = 178353, + Sequence = 6, + Start = 617967 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 184401, - Sequence = 7, Start = 796383 + Description = null, + Name = null, + Type = "0x06", + Length = 184401, + Sequence = 7, + Start = 796383 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 41265, - Sequence = 8, Start = 980847 + Description = null, + Name = null, + Type = "0x04", + Length = 41265, + Sequence = 8, + Start = 980847 } }, @@ -652,33 +1060,57 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 225729, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x06", + Length = 225729, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 2, Start = 431487 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 2, + Start = 431487 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 267057, - Sequence = 3, Start = 677439 + Description = null, + Name = null, + Type = "0x06", + Length = 267057, + Sequence = 3, + Start = 677439 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 61425, - Sequence = 4, Start = 944559 + Description = null, + Name = null, + Type = "0x04", + Length = 61425, + Sequence = 4, + Start = 944559 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 16065, - Sequence = 5, Start = 1006047 + Description = null, + Name = null, + Type = "0x01", + Length = 16065, + Sequence = 5, + Start = 1006047 } }, @@ -687,38 +1119,66 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 225729, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x06", + Length = 225729, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 2, Start = 431487 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 2, + Start = 431487 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 267057, - Sequence = 3, Start = 677439 + Description = null, + Name = null, + Type = "0x06", + Length = 267057, + Sequence = 3, + Start = 677439 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 51345, - Sequence = 4, Start = 944559 + Description = null, + Name = null, + Type = "0x04", + Length = 51345, + Sequence = 4, + Start = 944559 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 6993, - Sequence = 5, Start = 995967 + Description = null, + Name = null, + Type = "0x01", + Length = 6993, + Sequence = 5, + Start = 995967 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 19089, - Sequence = 6, Start = 1003023 + Description = null, + Name = null, + Type = "0x01", + Length = 19089, + Sequence = 6, + Start = 1003023 } }, @@ -727,28 +1187,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 1, Start = 246015 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 1, + Start = 246015 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 307377, - Sequence = 2, Start = 451647 + Description = null, + Name = null, + Type = "0x06", + Length = 307377, + Sequence = 2, + Start = 451647 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 225729, - Sequence = 3, Start = 759087 + Description = null, + Name = null, + Type = "0x06", + Length = 225729, + Sequence = 3, + Start = 759087 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 37233, - Sequence = 4, Start = 984879 + Description = null, + Name = null, + Type = "0x04", + Length = 37233, + Sequence = 4, + Start = 984879 } }, @@ -757,28 +1237,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 152145, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 152145, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 99729, - Sequence = 1, Start = 152271 + Description = null, + Name = null, + Type = "0x06", + Length = 99729, + Sequence = 1, + Start = 152271 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 202545, - Sequence = 2, Start = 252063 + Description = null, + Name = null, + Type = "0x06", + Length = 202545, + Sequence = 2, + Start = 252063 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 1953, - Sequence = 3, Start = 454671 + Description = null, + Name = null, + Type = "0x01", + Length = 1953, + Sequence = 3, + Start = 454671 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 565425, - Sequence = 4, Start = 456687 + Description = null, + Name = null, + Type = "0x06", + Length = 565425, + Sequence = 4, + Start = 456687 } }, @@ -787,28 +1287,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 252945, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 252945, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 4977, - Sequence = 1, Start = 253071 + Description = null, + Name = null, + Type = "0x01", + Length = 4977, + Sequence = 1, + Start = 253071 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 202545, - Sequence = 2, Start = 352863 + Description = null, + Name = null, + Type = "0x06", + Length = 202545, + Sequence = 2, + Start = 352863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 348705, - Sequence = 3, Start = 555471 + Description = null, + Name = null, + Type = "0x06", + Length = 348705, + Sequence = 3, + Start = 555471 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 117873, - Sequence = 4, Start = 904239 + Description = null, + Name = null, + Type = "0x06", + Length = 117873, + Sequence = 4, + Start = 904239 } }, @@ -817,28 +1337,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 307377, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 307377, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 4977, - Sequence = 1, Start = 307503 + Description = null, + Name = null, + Type = "0x01", + Length = 4977, + Sequence = 1, + Start = 307503 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 40257, - Sequence = 2, Start = 312543 + Description = null, + Name = null, + Type = "0x04", + Length = 40257, + Sequence = 2, + Start = 312543 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 202545, - Sequence = 3, Start = 352863 + Description = null, + Name = null, + Type = "0x06", + Length = 202545, + Sequence = 3, + Start = 352863 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 466641, - Sequence = 4, Start = 555471 + Description = null, + Name = null, + Type = "0x06", + Length = 466641, + Sequence = 4, + Start = 555471 } }, @@ -847,18 +1387,30 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x83", Length = 67584, - Sequence = 0, Start = 4096 + Description = null, + Name = null, + Type = "0x83", + Length = 67584, + Sequence = 0, + Start = 4096 }, new Partition { - Description = null, Name = null, Type = "0x07", Length = 59392, - Sequence = 1, Start = 73728 + Description = null, + Name = null, + Type = "0x07", + Length = 59392, + Sequence = 1, + Start = 73728 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 129024, - Sequence = 2, Start = 133120 + Description = null, + Name = null, + Type = "0x06", + Length = 129024, + Sequence = 2, + Start = 133120 } }, @@ -867,28 +1419,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 225729, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x06", + Length = 225729, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 2, Start = 431487 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 2, + Start = 431487 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 287217, - Sequence = 3, Start = 677439 + Description = null, + Name = null, + Type = "0x06", + Length = 287217, + Sequence = 3, + Start = 677439 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 57393, - Sequence = 4, Start = 964719 + Description = null, + Name = null, + Type = "0x04", + Length = 57393, + Sequence = 4, + Start = 964719 } }, @@ -897,8 +1469,12 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x01", Length = 1022111, - Sequence = 0, Start = 1 + Description = null, + Name = null, + Type = "0x01", + Length = 1022111, + Sequence = 0, + Start = 1 } }, @@ -907,8 +1483,12 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x01", Length = 1022111, - Sequence = 0, Start = 1 + Description = null, + Name = null, + Type = "0x01", + Length = 1022111, + Sequence = 0, + Start = 1 } }, @@ -917,8 +1497,12 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x01", Length = 66465, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x01", + Length = 66465, + Sequence = 0, + Start = 63 } }, @@ -927,8 +1511,12 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x01", Length = 66465, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x01", + Length = 66465, + Sequence = 0, + Start = 63 } }, @@ -937,83 +1525,147 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 1, Start = 65583 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 1, + Start = 65583 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 2, Start = 131103 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 2, + Start = 131103 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 3, Start = 196623 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 3, + Start = 196623 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 4, Start = 262143 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 4, + Start = 262143 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 5, Start = 327663 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 5, + Start = 327663 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 6, Start = 393183 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 6, + Start = 393183 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 7, Start = 458703 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 7, + Start = 458703 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 8, Start = 524223 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 8, + Start = 524223 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 9, Start = 589743 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 9, + Start = 589743 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 10, Start = 655263 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 10, + Start = 655263 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 11, Start = 720783 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 11, + Start = 720783 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 12, Start = 786303 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 12, + Start = 786303 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 13, Start = 851823 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 13, + Start = 851823 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 65457, - Sequence = 14, Start = 917343 + Description = null, + Name = null, + Type = "0x04", + Length = 65457, + Sequence = 14, + Start = 917343 }, new Partition { - Description = null, Name = null, Type = "0x04", Length = 39249, - Sequence = 15, Start = 982863 + Description = null, + Name = null, + Type = "0x04", + Length = 39249, + Sequence = 15, + Start = 982863 } }, @@ -1022,28 +1674,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 25137, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x01", + Length = 25137, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 2, Start = 230895 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 2, + Start = 230895 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 307377, - Sequence = 3, Start = 476847 + Description = null, + Name = null, + Type = "0x06", + Length = 307377, + Sequence = 3, + Start = 476847 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 237825, - Sequence = 4, Start = 784287 + Description = null, + Name = null, + Type = "0x06", + Length = 237825, + Sequence = 4, + Start = 784287 } }, @@ -1052,28 +1724,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 25137, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x01", + Length = 25137, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 2, Start = 230895 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 2, + Start = 230895 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 287217, - Sequence = 3, Start = 476847 + Description = null, + Name = null, + Type = "0x06", + Length = 287217, + Sequence = 3, + Start = 476847 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 257985, - Sequence = 4, Start = 764127 + Description = null, + Name = null, + Type = "0x06", + Length = 257985, + Sequence = 4, + Start = 764127 } }, @@ -1082,28 +1774,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 25137, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x01", + Length = 25137, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 225729, - Sequence = 2, Start = 230895 + Description = null, + Name = null, + Type = "0x06", + Length = 225729, + Sequence = 2, + Start = 230895 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 3, Start = 456687 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 3, + Start = 456687 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 319473, - Sequence = 4, Start = 702639 + Description = null, + Name = null, + Type = "0x06", + Length = 319473, + Sequence = 4, + Start = 702639 } }, @@ -1112,28 +1824,48 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 205569, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 205569, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 1, Start = 205695 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 1, + Start = 205695 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 267057, - Sequence = 2, Start = 451647 + Description = null, + Name = null, + Type = "0x06", + Length = 267057, + Sequence = 2, + Start = 451647 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 287217, - Sequence = 3, Start = 718767 + Description = null, + Name = null, + Type = "0x06", + Length = 287217, + Sequence = 3, + Start = 718767 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 17073, - Sequence = 4, Start = 1006047 + Description = null, + Name = null, + Type = "0x01", + Length = 17073, + Sequence = 4, + Start = 1006047 } }, @@ -1142,33 +1874,57 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x06", Length = 307377, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x06", + Length = 307377, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 245889, - Sequence = 1, Start = 307503 + Description = null, + Name = null, + Type = "0x06", + Length = 245889, + Sequence = 1, + Start = 307503 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 328545, - Sequence = 2, Start = 553455 + Description = null, + Name = null, + Type = "0x06", + Length = 328545, + Sequence = 2, + Start = 553455 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 102753, - Sequence = 3, Start = 882063 + Description = null, + Name = null, + Type = "0x06", + Length = 102753, + Sequence = 3, + Start = 882063 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 21105, - Sequence = 4, Start = 984879 + Description = null, + Name = null, + Type = "0x01", + Length = 21105, + Sequence = 4, + Start = 984879 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 17073, - Sequence = 5, Start = 1006047 + Description = null, + Name = null, + Type = "0x01", + Length = 17073, + Sequence = 5, + Start = 1006047 } }, @@ -1177,33 +1933,57 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "0x07", Length = 204561, - Sequence = 0, Start = 63 + Description = null, + Name = null, + Type = "0x07", + Length = 204561, + Sequence = 0, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "0x07", Length = 307377, - Sequence = 1, Start = 204687 + Description = null, + Name = null, + Type = "0x07", + Length = 307377, + Sequence = 1, + Start = 204687 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 224721, - Sequence = 2, Start = 512127 + Description = null, + Name = null, + Type = "0x06", + Length = 224721, + Sequence = 2, + Start = 512127 }, new Partition { - Description = null, Name = null, Type = "0x06", Length = 214641, - Sequence = 3, Start = 736911 + Description = null, + Name = null, + Type = "0x06", + Length = 214641, + Sequence = 3, + Start = 736911 }, new Partition { - Description = null, Name = null, Type = "0x01", Length = 10017, - Sequence = 4, Start = 951615 + Description = null, + Name = null, + Type = "0x01", + Length = 10017, + Sequence = 4, + Start = 951615 }, new Partition { - Description = null, Name = null, Type = "0x07", Length = 60480, - Sequence = 5, Start = 962640 + Description = null, + Name = null, + Type = "0x07", + Length = 60480, + Sequence = 5, + Start = 962640 } } }; diff --git a/Aaru.Tests/Partitions/MINIX.cs b/Aaru.Tests/Partitions/MINIX.cs index 93d2967c0..d5cfd1915 100644 --- a/Aaru.Tests/Partitions/MINIX.cs +++ b/Aaru.Tests/Partitions/MINIX.cs @@ -51,23 +51,47 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 268369408, Name = "MINIX", Type = "MINIX", - Offset = 2064896, Length = 524159, Sequence = 0, Start = 4033 + Description = null, + Size = 268369408, + Name = "MINIX", + Type = "MINIX", + Offset = 2064896, + Length = 524159, + Sequence = 0, + Start = 4033 }, new Partition { - Description = null, Size = 270434304, Name = "MINIX", Type = "MINIX", - Offset = 270434304, Length = 528192, Sequence = 1, Start = 528192 + Description = null, + Size = 270434304, + Name = "MINIX", + Type = "MINIX", + Offset = 270434304, + Length = 528192, + Sequence = 1, + Start = 528192 }, new Partition { - Description = null, Size = 270434304, Name = "MINIX", Type = "MINIX", - Offset = 540868608, Length = 528192, Sequence = 2, Start = 1056384 + Description = null, + Size = 270434304, + Name = "MINIX", + Type = "MINIX", + Offset = 540868608, + Length = 528192, + Sequence = 2, + Start = 1056384 }, new Partition { - Description = null, Size = 262176768, Name = "MINIX", Type = "MINIX", - Offset = 811302912, Length = 512064, Sequence = 3, Start = 1584576 + Description = null, + Size = 262176768, + Name = "MINIX", + Type = "MINIX", + Offset = 811302912, + Length = 512064, + Sequence = 3, + Start = 1584576 } } }; diff --git a/Aaru.Tests/Partitions/PC98.cs b/Aaru.Tests/Partitions/PC98.cs index 010300e3c..c4b2a5b74 100644 --- a/Aaru.Tests/Partitions/PC98.cs +++ b/Aaru.Tests/Partitions/PC98.cs @@ -51,43 +51,75 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT12", Length = 19536, - Sequence = 0, Start = 264 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT12", + Length = 19536, + Sequence = 0, + Start = 264 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT12", Length = 39336, - Sequence = 1, Start = 20064 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT12", + Length = 39336, + Sequence = 1, + Start = 20064 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 59136, - Sequence = 2, Start = 59664 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 59136, + Sequence = 2, + Start = 59664 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 78936, - Sequence = 3, Start = 119064 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 78936, + Sequence = 3, + Start = 119064 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 118536, - Sequence = 4, Start = 198264 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 118536, + Sequence = 4, + Start = 198264 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 197736, - Sequence = 5, Start = 317064 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 197736, + Sequence = 5, + Start = 317064 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 237336, - Sequence = 6, Start = 515064 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 237336, + Sequence = 6, + Start = 515064 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 245256, - Sequence = 7, Start = 752664 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 245256, + Sequence = 7, + Start = 752664 } }, @@ -96,18 +128,30 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 59136, - Sequence = 0, Start = 264 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 59136, + Sequence = 0, + Start = 264 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 158136, - Sequence = 1, Start = 59664 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 158136, + Sequence = 1, + Start = 59664 }, new Partition { - Description = null, Name = "MS-DOS 3.30", Type = "FAT16", Length = 94776, - Sequence = 2, Start = 218064 + Description = null, + Name = "MS-DOS 3.30", + Type = "FAT16", + Length = 94776, + Sequence = 2, + Start = 218064 } }, @@ -116,43 +160,75 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = "NamenameName", Type = "FAT12", Length = 35639, - Sequence = 0, Start = 264 + Description = null, + Name = "NamenameName", + Type = "FAT12", + Length = 35639, + Sequence = 0, + Start = 264 }, new Partition { - Description = null, Name = "12BitFAT", Type = "FAT12", Length = 59399, - Sequence = 1, Start = 35904 + Description = null, + Name = "12BitFAT", + Type = "FAT12", + Length = 59399, + Sequence = 1, + Start = 35904 }, new Partition { - Description = null, Name = "16BitFAT", Type = "FAT16", Length = 79199, - Sequence = 2, Start = 95304 + Description = null, + Name = "16BitFAT", + Type = "FAT16", + Length = 79199, + Sequence = 2, + Start = 95304 }, new Partition { - Description = null, Name = "PartLblMaxNameXX", Type = "FAT16", Length = 118799, - Sequence = 3, Start = 174504 + Description = null, + Name = "PartLblMaxNameXX", + Type = "FAT16", + Length = 118799, + Sequence = 3, + Start = 174504 }, new Partition { - Description = null, Name = "BigFAT12", Type = "FAT12", Length = 158399, - Sequence = 4, Start = 293304 + Description = null, + Name = "BigFAT12", + Type = "FAT12", + Length = 158399, + Sequence = 4, + Start = 293304 }, new Partition { - Description = null, Name = "Lalalalalalalala", Type = "FAT16", Length = 197999, - Sequence = 5, Start = 451704 + Description = null, + Name = "Lalalalalalalala", + Type = "FAT16", + Length = 197999, + Sequence = 5, + Start = 451704 }, new Partition { - Description = null, Name = "MS-DOS Ver 5.0", Type = "FAT16", Length = 237599, - Sequence = 6, Start = 649704 + Description = null, + Name = "MS-DOS Ver 5.0", + Type = "FAT16", + Length = 237599, + Sequence = 6, + Start = 649704 }, new Partition { - Description = null, Name = "MS-DOS Ver 5.0", Type = "FAT16", Length = 118799, - Sequence = 7, Start = 887304 + Description = null, + Name = "MS-DOS Ver 5.0", + Type = "FAT16", + Length = 118799, + Sequence = 7, + Start = 887304 } }, @@ -161,43 +237,75 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT12", Length = 28512, - Sequence = 0, Start = 264 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT12", + Length = 28512, + Sequence = 0, + Start = 264 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 49104, - Sequence = 1, Start = 29040 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 49104, + Sequence = 1, + Start = 29040 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 93984, - Sequence = 2, Start = 78408 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 93984, + Sequence = 2, + Start = 78408 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 122760, - Sequence = 3, Start = 172656 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 122760, + Sequence = 3, + Start = 172656 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 163680, - Sequence = 4, Start = 295680 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 163680, + Sequence = 4, + Start = 295680 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 204600, - Sequence = 5, Start = 459624 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 204600, + Sequence = 5, + Start = 459624 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 204600, - Sequence = 6, Start = 664488 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 204600, + Sequence = 6, + Start = 664488 }, new Partition { - Description = null, Name = "MS-DOS 5.00", Type = "FAT16", Length = 139128, - Sequence = 7, Start = 869352 + Description = null, + Name = "MS-DOS 5.00", + Type = "FAT16", + Length = 139128, + Sequence = 7, + Start = 869352 } }, @@ -206,38 +314,66 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 61248, - Sequence = 0, Start = 264 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 61248, + Sequence = 0, + Start = 264 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 81840, - Sequence = 1, Start = 61776 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 81840, + Sequence = 1, + Start = 61776 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 122760, - Sequence = 2, Start = 143880 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 122760, + Sequence = 2, + Start = 143880 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 163680, - Sequence = 3, Start = 266904 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 163680, + Sequence = 3, + Start = 266904 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT12", Length = 20328, - Sequence = 4, Start = 430848 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT12", + Length = 20328, + Sequence = 4, + Start = 430848 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 245520, - Sequence = 5, Start = 451440 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 245520, + Sequence = 5, + Start = 451440 }, new Partition { - Description = null, Name = "MS-DOS 6.20", Type = "FAT16", Length = 315216, - Sequence = 6, Start = 697224 + Description = null, + Name = "MS-DOS 6.20", + Type = "FAT16", + Length = 315216, + Sequence = 6, + Start = 697224 } } }; diff --git a/Aaru.Tests/Partitions/RDB.cs b/Aaru.Tests/Partitions/RDB.cs index 6d280543b..e7057dd68 100644 --- a/Aaru.Tests/Partitions/RDB.cs +++ b/Aaru.Tests/Partitions/RDB.cs @@ -51,33 +51,69 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 87392256, Name = "UDH0", Type = "\"DOS\\0\"", - Offset = 2080768, Length = 170688, Sequence = 0, Start = 4064 + Description = null, + Size = 87392256, + Name = "UDH0", + Type = "\"DOS\\0\"", + Offset = 2080768, + Length = 170688, + Sequence = 0, + Start = 4064 }, new Partition { - Description = null, Size = 87392256, Name = "UDH1", Type = "\"DOS\\2\"", - Offset = 89473024, Length = 170688, Sequence = 1, Start = 174752 + Description = null, + Size = 87392256, + Name = "UDH1", + Type = "\"DOS\\2\"", + Offset = 89473024, + Length = 170688, + Sequence = 1, + Start = 174752 }, new Partition { - Description = null, Size = 87392256, Name = "UDH2", Type = "\"DOS\\1\"", - Offset = 176865280, Length = 170688, Sequence = 2, Start = 345440 + Description = null, + Size = 87392256, + Name = "UDH2", + Type = "\"DOS\\1\"", + Offset = 176865280, + Length = 170688, + Sequence = 2, + Start = 345440 }, new Partition { - Description = null, Size = 87392256, Name = "UDH3", Type = "\"DOS\\3\"", - Offset = 264257536, Length = 170688, Sequence = 3, Start = 516128 + Description = null, + Size = 87392256, + Name = "UDH3", + Type = "\"DOS\\3\"", + Offset = 264257536, + Length = 170688, + Sequence = 3, + Start = 516128 }, new Partition { - Description = null, Size = 87300096, Name = "FAT16", Type = "0x06", - Offset = 351663104, Length = 170508, Sequence = 4, Start = 686842 + Description = null, + Size = 87300096, + Name = "FAT16", + Type = "0x06", + Offset = 351663104, + Length = 170508, + Sequence = 4, + Start = 686842 }, new Partition { - Description = null, Size = 85311488, Name = "UDH5", Type = "\"RES\\86\"", - Offset = 439042048, Length = 166624, Sequence = 5, Start = 857504 + Description = null, + Size = 85311488, + Name = "UDH5", + Type = "\"RES\\86\"", + Offset = 439042048, + Length = 166624, + Sequence = 5, + Start = 857504 } }, @@ -86,33 +122,69 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 91455488, Name = "DH1", Type = "\"DOS\\1\"", - Offset = 1048576, Length = 178624, Sequence = 0, Start = 2048 + Description = null, + Size = 91455488, + Name = "DH1", + Type = "\"DOS\\1\"", + Offset = 1048576, + Length = 178624, + Sequence = 0, + Start = 2048 }, new Partition { - Description = null, Size = 76546048, Name = "DH2", Type = "\"DOS\\3\"", - Offset = 92504064, Length = 149504, Sequence = 1, Start = 180672 + Description = null, + Size = 76546048, + Name = "DH2", + Type = "\"DOS\\3\"", + Offset = 92504064, + Length = 149504, + Sequence = 1, + Start = 180672 }, new Partition { - Description = null, Size = 78741504, Name = "DH3", Type = "\"DOS\\3\"", - Offset = 169050112, Length = 153792, Sequence = 2, Start = 330176 + Description = null, + Size = 78741504, + Name = "DH3", + Type = "\"DOS\\3\"", + Offset = 169050112, + Length = 153792, + Sequence = 2, + Start = 330176 }, new Partition { - Description = null, Size = 78020608, Name = "DH4", Type = "\"DOS\\7\"", - Offset = 247791616, Length = 152384, Sequence = 3, Start = 483968 + Description = null, + Size = 78020608, + Name = "DH4", + Type = "\"DOS\\7\"", + Offset = 247791616, + Length = 152384, + Sequence = 3, + Start = 483968 }, new Partition { - Description = null, Size = 85000192, Name = "DH5", Type = "\"SFS\\0\"", - Offset = 325812224, Length = 166016, Sequence = 4, Start = 636352 + Description = null, + Size = 85000192, + Name = "DH5", + Type = "\"SFS\\0\"", + Offset = 325812224, + Length = 166016, + Sequence = 4, + Start = 636352 }, new Partition { - Description = null, Size = 113541120, Name = "DH6", Type = "\"SFS\\2\"", - Offset = 410812416, Length = 221760, Sequence = 5, Start = 802368 + Description = null, + Size = 113541120, + Name = "DH6", + Type = "\"SFS\\2\"", + Offset = 410812416, + Length = 221760, + Sequence = 5, + Start = 802368 } }, @@ -121,18 +193,36 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Size = 8225280, Name = "primary", Type = "\"\0\0\0\\0\"", - Offset = 8225280, Length = 16065, Sequence = 0, Start = 16065 + Description = null, + Size = 8225280, + Name = "primary", + Type = "\"\0\0\0\\0\"", + Offset = 8225280, + Length = 16065, + Sequence = 0, + Start = 16065 }, new Partition { - Description = null, Size = 24675840, Name = "name", Type = "\"FAT\\1\"", - Offset = 16450560, Length = 48195, Sequence = 1, Start = 32130 + Description = null, + Size = 24675840, + Name = "name", + Type = "\"FAT\\1\"", + Offset = 16450560, + Length = 48195, + Sequence = 1, + Start = 32130 }, new Partition { - Description = null, Size = 90478080, Name = "partition", Type = "\"\0\0\0\\0\"", - Offset = 41126400, Length = 176715, Sequence = 2, Start = 80325 + Description = null, + Size = 90478080, + Name = "partition", + Type = "\"\0\0\0\\0\"", + Offset = 41126400, + Length = 176715, + Sequence = 2, + Start = 80325 } } }; diff --git a/Aaru.Tests/Partitions/SGI.cs b/Aaru.Tests/Partitions/SGI.cs index af0bd29ae..351143245 100644 --- a/Aaru.Tests/Partitions/SGI.cs +++ b/Aaru.Tests/Partitions/SGI.cs @@ -51,73 +51,129 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "XFS", Length = 40961, - Sequence = 0, Start = 16065 + Description = null, + Name = null, + Type = "XFS", + Length = 40961, + Sequence = 0, + Start = 16065 }, new Partition { - Description = null, Name = null, Type = "Linux RAID", Length = 61441, - Sequence = 1, Start = 64260 + Description = null, + Name = null, + Type = "Linux RAID", + Length = 61441, + Sequence = 1, + Start = 64260 }, new Partition { - Description = null, Name = null, Type = "Track replacements", Length = 81921, - Sequence = 2, Start = 128520 + Description = null, + Name = null, + Type = "Track replacements", + Length = 81921, + Sequence = 2, + Start = 128520 }, new Partition { - Description = null, Name = null, Type = "Sector replacements", Length = 92161, - Sequence = 3, Start = 224910 + Description = null, + Name = null, + Type = "Sector replacements", + Length = 92161, + Sequence = 3, + Start = 224910 }, new Partition { - Description = null, Name = null, Type = "Raw data (swap)", Length = 102401, - Sequence = 4, Start = 321300 + Description = null, + Name = null, + Type = "Raw data (swap)", + Length = 102401, + Sequence = 4, + Start = 321300 }, new Partition { - Description = null, Name = null, Type = "4.2BSD Fast File System", Length = 30721, - Sequence = 5, Start = 433755 + Description = null, + Name = null, + Type = "4.2BSD Fast File System", + Length = 30721, + Sequence = 5, + Start = 433755 }, new Partition { - Description = null, Name = null, Type = "UNIX System V", Length = 71681, - Sequence = 6, Start = 465885 + Description = null, + Name = null, + Type = "UNIX System V", + Length = 71681, + Sequence = 6, + Start = 465885 }, new Partition { - Description = null, Name = null, Type = "EFS", Length = 10241, - Sequence = 7, Start = 546210 + Description = null, + Name = null, + Type = "EFS", + Length = 10241, + Sequence = 7, + Start = 546210 }, new Partition { - Description = null, Name = null, Type = "Logical volume", Length = 122881, - Sequence = 8, Start = 562275 + Description = null, + Name = null, + Type = "Logical volume", + Length = 122881, + Sequence = 8, + Start = 562275 }, new Partition { - Description = null, Name = null, Type = "Raw logical volume", Length = 133121, - Sequence = 9, Start = 690795 + Description = null, + Name = null, + Type = "Raw logical volume", + Length = 133121, + Sequence = 9, + Start = 690795 }, new Partition { - Description = null, Name = null, Type = "XFS log device", Length = 51201, - Sequence = 10, Start = 835380 + Description = null, + Name = null, + Type = "XFS log device", + Length = 51201, + Sequence = 10, + Start = 835380 }, new Partition { - Description = null, Name = null, Type = "Linux swap", Length = 30721, - Sequence = 11, Start = 899640 + Description = null, + Name = null, + Type = "Linux swap", + Length = 30721, + Sequence = 11, + Start = 899640 }, new Partition { - Description = null, Name = null, Type = "SGI XVM", Length = 6145, - Sequence = 12, Start = 931770 + Description = null, + Name = null, + Type = "SGI XVM", + Length = 6145, + Sequence = 12, + Start = 931770 }, new Partition { - Description = null, Name = null, Type = "Linux", Length = 64260, - Sequence = 13, Start = 947835 + Description = null, + Name = null, + Type = "Linux", + Length = 64260, + Sequence = 13, + Start = 947835 } }, @@ -126,23 +182,39 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "Raw data (swap)", Length = 22528, - Sequence = 0, Start = 6144 + Description = null, + Name = null, + Type = "Raw data (swap)", + Length = 22528, + Sequence = 0, + Start = 6144 }, new Partition { - Description = null, Name = null, Type = "Raw data (swap)", Length = 67584, - Sequence = 1, Start = 30720 + Description = null, + Name = null, + Type = "Raw data (swap)", + Length = 67584, + Sequence = 1, + Start = 30720 }, new Partition { - Description = null, Name = null, Type = "Raw data (swap)", Length = 94208, - Sequence = 2, Start = 100352 + Description = null, + Name = null, + Type = "Raw data (swap)", + Length = 94208, + Sequence = 2, + Start = 100352 }, new Partition { - Description = null, Name = null, Type = "XFS", Length = 36864, - Sequence = 3, Start = 196608 + Description = null, + Name = null, + Type = "XFS", + Length = 36864, + Sequence = 3, + Start = 196608 } } }; diff --git a/Aaru.Tests/Partitions/Sun.cs b/Aaru.Tests/Partitions/Sun.cs index 4d92ae1dc..8e38fc91c 100644 --- a/Aaru.Tests/Partitions/Sun.cs +++ b/Aaru.Tests/Partitions/Sun.cs @@ -52,38 +52,66 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "Linux", Length = 204800, - Sequence = 0, Start = 0 + Description = null, + Name = null, + Type = "Linux", + Length = 204800, + Sequence = 0, + Start = 0 }, new Partition { - Description = null, Name = null, Type = "Sun boot", Length = 102400, - Sequence = 1, Start = 208845 + Description = null, + Name = null, + Type = "Sun boot", + Length = 102400, + Sequence = 1, + Start = 208845 }, new Partition { - Description = null, Name = null, Type = "Sun /", Length = 102400, - Sequence = 2, Start = 321300 + Description = null, + Name = null, + Type = "Sun /", + Length = 102400, + Sequence = 2, + Start = 321300 }, new Partition { - Description = null, Name = null, Type = "Sun /home", Length = 102400, - Sequence = 3, Start = 433755 + Description = null, + Name = null, + Type = "Sun /home", + Length = 102400, + Sequence = 3, + Start = 433755 }, new Partition { - Description = null, Name = null, Type = "Sun swap", Length = 153600, - Sequence = 4, Start = 546210 + Description = null, + Name = null, + Type = "Sun swap", + Length = 153600, + Sequence = 4, + Start = 546210 }, new Partition { - Description = null, Name = null, Type = "Sun /usr", Length = 208845, - Sequence = 5, Start = 706860 + Description = null, + Name = null, + Type = "Sun /usr", + Length = 208845, + Sequence = 5, + Start = 706860 }, new Partition { - Description = null, Name = null, Type = "Linux swap", Length = 96390, - Sequence = 6, Start = 915705 + Description = null, + Name = null, + Type = "Linux swap", + Length = 96390, + Sequence = 6, + Start = 915705 } }, @@ -92,18 +120,30 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "Linux", Length = 49152, - Sequence = 0, Start = 0 + Description = null, + Name = null, + Type = "Linux", + Length = 49152, + Sequence = 0, + Start = 0 }, new Partition { - Description = null, Name = null, Type = "Linux", Length = 80325, - Sequence = 1, Start = 64260 + Description = null, + Name = null, + Type = "Linux", + Length = 80325, + Sequence = 1, + Start = 64260 }, new Partition { - Description = null, Name = null, Type = "Linux", Length = 96390, - Sequence = 2, Start = 144585 + Description = null, + Name = null, + Type = "Linux", + Length = 96390, + Sequence = 2, + Start = 144585 } } }; diff --git a/Aaru.Tests/Partitions/VTOC.cs b/Aaru.Tests/Partitions/VTOC.cs index 89116a0ec..87765ec95 100644 --- a/Aaru.Tests/Partitions/VTOC.cs +++ b/Aaru.Tests/Partitions/VTOC.cs @@ -51,83 +51,147 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = null, Name = null, Type = "UNIX: Boot", Length = 34, - Sequence = 0, Start = 1 + Description = null, + Name = null, + Type = "UNIX: Boot", + Length = 34, + Sequence = 0, + Start = 1 }, new Partition { - Description = null, Name = null, Type = "UNIX: Whole disk", Length = 1023119, - Sequence = 1, Start = 1 + Description = null, + Name = null, + Type = "UNIX: Whole disk", + Length = 1023119, + Sequence = 1, + Start = 1 }, new Partition { - Description = null, Name = null, Type = "UNIX: Stand", Length = 253, - Sequence = 2, Start = 63 + Description = null, + Name = null, + Type = "UNIX: Stand", + Length = 253, + Sequence = 2, + Start = 63 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 3, Start = 378 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 3, + Start = 378 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 4, Start = 79002 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 4, + Start = 79002 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 5, Start = 157626 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 5, + Start = 157626 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 6, Start = 236250 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 6, + Start = 236250 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 7, Start = 314874 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 7, + Start = 314874 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 8, Start = 393498 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 8, + Start = 393498 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 9, Start = 472122 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 9, + Start = 472122 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 10, Start = 550746 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 10, + Start = 550746 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 78624, - Sequence = 11, Start = 629370 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 78624, + Sequence = 11, + Start = 629370 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 76608, - Sequence = 12, Start = 707994 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 76608, + Sequence = 12, + Start = 707994 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 77616, - Sequence = 13, Start = 784602 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 77616, + Sequence = 13, + Start = 784602 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 75600, - Sequence = 14, Start = 862218 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 75600, + Sequence = 14, + Start = 862218 }, new Partition { - Description = null, Name = null, Type = "UNIX: /usr", Length = 84672, - Sequence = 15, Start = 937818 + Description = null, + Name = null, + Type = "UNIX: /usr", + Length = 84672, + Sequence = 15, + Start = 937818 } } }; diff --git a/Aaru.Tests/Partitions/Xbox.cs b/Aaru.Tests/Partitions/Xbox.cs index 4f82f2269..bd3c76d1b 100644 --- a/Aaru.Tests/Partitions/Xbox.cs +++ b/Aaru.Tests/Partitions/Xbox.cs @@ -50,13 +50,21 @@ namespace Aaru.Tests.Partitions { new Partition { - Description = "System cache", Name = null, Type = null, Length = 16376, - Sequence = 0, Start = 0 + Description = "System cache", + Name = null, + Type = null, + Length = 16376, + Sequence = 0, + Start = 0 }, new Partition { - Description = "Data volume", Name = null, Type = null, Length = 475144, - Sequence = 1, Start = 16376 + Description = "Data volume", + Name = null, + Type = null, + Length = 475144, + Sequence = 1, + Start = 16376 } } }; diff --git a/Aaru/Commands/Configure.cs b/Aaru/Commands/Configure.cs index 1443d0a9c..f1fd0cec1 100644 --- a/Aaru/Commands/Configure.cs +++ b/Aaru/Commands/Configure.cs @@ -70,13 +70,13 @@ namespace Aaru.Commands { AaruConsole. WriteLine("In compliance with the European Union General Data Protection Regulation 2016/679 (GDPR),\n" + - "we must give you the following information about Aaru and ask if you want to opt-in\n" + + "we must give you the following information about Aaru and ask if you want to opt-in\n" + "in some information sharing."); AaruConsole.WriteLine(); AaruConsole. - WriteLine("Disclaimer: Because Aaru is an open source software this information, and therefore,\n" + + WriteLine("Disclaimer: Because Aaru is an open source software this information, and therefore,\n" + "compliance with GDPR only holds true if you obtained a certificated copy from its original\n" + "authors. In case of doubt, close Aaru now and ask in our IRC support channel."); @@ -84,7 +84,7 @@ namespace Aaru.Commands AaruConsole. WriteLine("For any information sharing your IP address may be stored in our server, in a way that is not\n" + - "possible for any person, manual, or automated process, to link with your identity, unless\n" + + "possible for any person, manual, or automated process, to link with your identity, unless\n" + "specified otherwise."); } @@ -94,9 +94,9 @@ namespace Aaru.Commands AaruConsole.WriteLine(); AaruConsole.WriteLine( - "With the 'device-report' command, Aaru creates a report of a device, that includes its\n" + - "manufacturer, model, firmware revision and/or version, attached bus, size, and supported commands.\n" + - "The serial number of the device is not stored in the report. If used with the debug parameter,\n" + + "With the 'device-report' command, Aaru creates a report of a device, that includes its\n" + + "manufacturer, model, firmware revision and/or version, attached bus, size, and supported commands.\n" + + "The serial number of the device is not stored in the report. If used with the debug parameter,\n" + "extra information about the device will be stored in the report. This information is known to contain\n" + "the device serial number in non-standard places that prevent the automatic removal of it on a handful\n" + "of devices. A human-readable copy of the report in XML format is always created in the same directory\n" + @@ -118,8 +118,8 @@ namespace Aaru.Commands AaruConsole. WriteLine("Sharing a report with us will send it to our server, that's in the european union territory, where it\n" + "will be manually analyzed by an european union citizen to remove any trace of personal identification\n" + - "from it. Once that is done, it will be shared in our stats website, https://www.aaru.app\n" + - "These report will be used to improve Aaru support, and in some cases, to provide emulation of the\n" + + "from it. Once that is done, it will be shared in our stats website, https://www.aaru.app\n" + + "These report will be used to improve Aaru support, and in some cases, to provide emulation of the\n" + "devices to other open-source projects. In any case, no information linking the report to you will be stored."); while(pressedKey.Key != ConsoleKey.Y && @@ -137,8 +137,8 @@ namespace Aaru.Commands AaruConsole.WriteLine(); AaruConsole. - WriteLine("Aaru can store some usage statistics. These statistics are limited to the number of times a\n" + - "command is executed, a filesystem, partition, or device is used, the operating system version, and other.\n" + + WriteLine("Aaru can store some usage statistics. These statistics are limited to the number of times a\n" + + "command is executed, a filesystem, partition, or device is used, the operating system version, and other.\n" + "In no case, any information besides pure statistical usage numbers is stored, and they're just joint to the\n" + "pool with no way of using them to identify you."); diff --git a/Aaru/Commands/Database/Update.cs b/Aaru/Commands/Database/Update.cs index 4f2eeb591..f7e161613 100644 --- a/Aaru/Commands/Database/Update.cs +++ b/Aaru/Commands/Database/Update.cs @@ -53,12 +53,14 @@ namespace Aaru.Commands Add(new Option("--clear", "Clear existing main database.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--clear-all", "Clear existing main and local database.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Handler = CommandHandler.Create((Func)Invoke); diff --git a/Aaru/Commands/Device/DeviceReport.cs b/Aaru/Commands/Device/DeviceReport.cs index e4a055028..0889f648a 100644 --- a/Aaru/Commands/Device/DeviceReport.cs +++ b/Aaru/Commands/Device/DeviceReport.cs @@ -60,7 +60,9 @@ namespace Aaru.Commands.Device { AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Device path", Name = "device-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Device path", + Name = "device-path" }); Add(new Option(new[] @@ -68,7 +70,8 @@ namespace Aaru.Commands.Device "--trap-disc", "-t" }, "Does a device report using a trap disc.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); @@ -138,7 +141,10 @@ namespace Aaru.Commands.Device var report = new DeviceReportV2 { - Manufacturer = dev.Manufacturer, Model = dev.Model, Revision = dev.FirmwareRevision, Type = dev.Type + Manufacturer = dev.Manufacturer, + Model = dev.Model, + Revision = dev.FirmwareRevision, + Type = dev.Type }; bool removable = false; @@ -507,7 +513,8 @@ namespace Aaru.Commands.Device report.SCSI.MultiMediaDevice = new Mmc { - ModeSense2AData = cdromMode, Features = reporter.ReportMmcFeatures() + ModeSense2AData = cdromMode, + Features = reporter.ReportMmcFeatures() }; if(cdromMode != null && @@ -1640,4 +1647,4 @@ namespace Aaru.Commands.Device return (int)ErrorNumber.NoError; } } -} +} \ No newline at end of file diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index 7a52269a9..f7f2056fb 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -64,12 +64,15 @@ namespace Aaru.Commands.Device "--output-prefix", "-w" }, "Prefix for saving binary information from device.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Device path", Name = "device-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Device path", + Name = "device-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Device/List.cs b/Aaru/Commands/Device/List.cs index db7034cd5..77afed568 100644 --- a/Aaru/Commands/Device/List.cs +++ b/Aaru/Commands/Device/List.cs @@ -46,7 +46,9 @@ namespace Aaru.Commands.Device { AddArgument(new Argument { - Arity = ArgumentArity.ZeroOrOne, Description = "aaruremote host", Name = "aaru-remote-host" + Arity = ArgumentArity.ZeroOrOne, + Description = "aaruremote host", + Name = "aaru-remote-host" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Filesystem/ExtractFiles.cs b/Aaru/Commands/Filesystem/ExtractFiles.cs index 034a08619..5b7cdc46a 100644 --- a/Aaru/Commands/Filesystem/ExtractFiles.cs +++ b/Aaru/Commands/Filesystem/ExtractFiles.cs @@ -55,7 +55,8 @@ namespace Aaru.Commands.Filesystem "--encoding", "-e" }, "Name of character encoding to use.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -63,7 +64,8 @@ namespace Aaru.Commands.Filesystem "--options", "-O" }, "Comma separated name=value pairs of options to pass to filesystem plugin.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -71,7 +73,8 @@ namespace Aaru.Commands.Filesystem "--xattrs", "-x" }, "Extract extended attributes if present.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -79,12 +82,15 @@ namespace Aaru.Commands.Filesystem "--namespace", "-n" }, "Namespace to use for filenames.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Disc image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Disc image path", + Name = "image-path" }); AddArgument(new Argument @@ -236,8 +242,10 @@ namespace Aaru.Commands.Filesystem partitions.Add(new Partition { Description = "Whole device", - Length = imageFormat.Info.Sectors, Offset = 0, - Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, Sequence = 1, + Length = imageFormat.Info.Sectors, + Offset = 0, + Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, + Sequence = 1, Start = 0 }); } diff --git a/Aaru/Commands/Filesystem/Ls.cs b/Aaru/Commands/Filesystem/Ls.cs index 3bfe1c93e..ddddb3d8f 100644 --- a/Aaru/Commands/Filesystem/Ls.cs +++ b/Aaru/Commands/Filesystem/Ls.cs @@ -56,7 +56,8 @@ namespace Aaru.Commands.Filesystem "--encoding", "-e" }, "Name of character encoding to use.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -64,7 +65,8 @@ namespace Aaru.Commands.Filesystem "--long-format", "-l" }, "Uses long format.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -72,7 +74,8 @@ namespace Aaru.Commands.Filesystem "--options", "-O" }, "Comma separated name=value pairs of options to pass to filesystem plugin.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -80,12 +83,15 @@ namespace Aaru.Commands.Filesystem "--namespace", "-n" }, "Namespace to use for filenames.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); @@ -209,8 +215,10 @@ namespace Aaru.Commands.Filesystem partitions.Add(new Partition { Description = "Whole device", - Length = imageFormat.Info.Sectors, Offset = 0, - Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, Sequence = 1, + Length = imageFormat.Info.Sectors, + Offset = 0, + Size = imageFormat.Info.SectorSize * imageFormat.Info.Sectors, + Sequence = 1, Start = 0 }); } diff --git a/Aaru/Commands/Image/Analyze.cs b/Aaru/Commands/Image/Analyze.cs index 5b22413ff..25d41aadd 100644 --- a/Aaru/Commands/Image/Analyze.cs +++ b/Aaru/Commands/Image/Analyze.cs @@ -53,7 +53,8 @@ namespace Aaru.Commands.Image "--encoding", "-e" }, "Name of character encoding to use.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -61,7 +62,8 @@ namespace Aaru.Commands.Image "--filesystems", "-f" }, "Searches and analyzes filesystems.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -69,12 +71,15 @@ namespace Aaru.Commands.Image "--partitions", "-p" }, "Searches and interprets partitions.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Disc image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Disc image path", + Name = "image-path" }); Handler = CommandHandler.Create(typeof(AnalyzeCommand).GetMethod(nameof(Invoke))); @@ -267,8 +272,9 @@ namespace Aaru.Commands.Image { var wholePart = new Partition { - Name = "Whole device", Length = imageFormat.Info.Sectors, - Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize + Name = "Whole device", + Length = imageFormat.Info.Sectors, + Size = imageFormat.Info.Sectors * imageFormat.Info.SectorSize }; Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); diff --git a/Aaru/Commands/Image/Checksum.cs b/Aaru/Commands/Image/Checksum.cs index f67eb2e4a..b428c0d1e 100644 --- a/Aaru/Commands/Image/Checksum.cs +++ b/Aaru/Commands/Image/Checksum.cs @@ -58,12 +58,14 @@ namespace Aaru.Commands.Image "--adler32", "-a" }, "Calculates Adler32.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--crc16", "Calculates CRC16.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -71,22 +73,26 @@ namespace Aaru.Commands.Image "--crc32", "-c" }, "Calculates CRC32.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option("--crc64", "Calculates CRC64.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option("--fletcher16", "Calculates Fletcher-16.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--fletcher32", "Calculates Fletcher-32.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -94,7 +100,8 @@ namespace Aaru.Commands.Image "--md5", "-m" }, "Calculates MD5.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -102,7 +109,8 @@ namespace Aaru.Commands.Image "--separated-tracks", "-t" }, "Checksums each track separately.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -110,22 +118,26 @@ namespace Aaru.Commands.Image "--sha1", "-s" }, "Calculates SHA1.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option("--sha256", "Calculates SHA256.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--sha384", "Calculates SHA384.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--sha512", "Calculates SHA512.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -133,7 +145,8 @@ namespace Aaru.Commands.Image "--spamsum", "-f" }, "Calculates SpamSum fuzzy hash.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -141,12 +154,15 @@ namespace Aaru.Commands.Image "--whole-disc", "-w" }, "Checksums the whole disc.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Compare.cs b/Aaru/Commands/Image/Compare.cs index 8380e372f..530c48d8a 100644 --- a/Aaru/Commands/Image/Compare.cs +++ b/Aaru/Commands/Image/Compare.cs @@ -54,12 +54,16 @@ namespace Aaru.Commands.Image AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "First media image path", Name = "image-path1" + Arity = ArgumentArity.ExactlyOne, + Description = "First media image path", + Name = "image-path1" }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Second media image path", Name = "image-path2" + Arity = ArgumentArity.ExactlyOne, + Description = "Second media image path", + Name = "image-path2" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Convert.cs b/Aaru/Commands/Image/Convert.cs index dd8911a49..f159b9fc1 100644 --- a/Aaru/Commands/Image/Convert.cs +++ b/Aaru/Commands/Image/Convert.cs @@ -63,12 +63,14 @@ namespace Aaru.Commands.Image "--cicm-xml", "-x" }, "Take metadata from existing CICM XML sidecar.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--comments", "Image comments.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -76,35 +78,41 @@ namespace Aaru.Commands.Image "--count", "-c" }, "How many sectors to convert at once.") { - Argument = new Argument(() => 64), Required = false + Argument = new Argument(() => 64), + Required = false }); Add(new Option("--creator", "Who (person) created the image?.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--drive-manufacturer", "Manufacturer of the drive used to read the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--drive-model", "Model of the drive used to read the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--drive-revision", "Firmware revision of the drive used to read the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--drive-serial", "Serial number of the drive used to read the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -112,7 +120,8 @@ namespace Aaru.Commands.Image "--force", "-f" }, "Continue conversion even if sector or media tags will be lost in the process.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -121,48 +130,57 @@ namespace Aaru.Commands.Image }, "Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-barcode", "Barcode of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-lastsequence", "Last media of the sequence the media represented by the image corresponds to.") { - Argument = new Argument(() => 0), Required = false + Argument = new Argument(() => 0), + Required = false }); Add(new Option("--media-manufacturer", "Manufacturer of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-model", "Model of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-partnumber", "Part number of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-sequence", "Number in sequence for the media represented by the image.") { - Argument = new Argument(() => 0), Required = false + Argument = new Argument(() => 0), + Required = false }); Add(new Option("--media-serial", "Serial number of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--media-title", "Title of the media represented by the image.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -170,7 +188,8 @@ namespace Aaru.Commands.Image "--options", "-O" }, "Comma separated name=value pairs of options to pass to output image plugin.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -178,7 +197,8 @@ namespace Aaru.Commands.Image "--resume-file", "-r" }, "Take list of dump hardware from existing resume file.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -186,7 +206,8 @@ namespace Aaru.Commands.Image "--geometry", "-g" }, "Force geometry, only supported in not tape block media. Specify as C/H/S.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -194,7 +215,8 @@ namespace Aaru.Commands.Image "--fix-subchannel-position" }, "Store subchannel according to the sector they describe.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -202,7 +224,8 @@ namespace Aaru.Commands.Image "--fix-subchannel" }, "Try to fix subchannel. Implies fixing subchannel position.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -210,7 +233,8 @@ namespace Aaru.Commands.Image "--fix-subchannel-crc" }, "If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -218,17 +242,22 @@ namespace Aaru.Commands.Image "--generate-subchannels" }, "Generates missing subchannels.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Input image path", Name = "input-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Input image path", + Name = "input-path" }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Output image path", Name = "output-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Output image path", + Name = "output-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); @@ -573,20 +602,22 @@ namespace Aaru.Commands.Image var metadata = new ImageInfo { - Application = "Aaru", ApplicationVersion = Version.GetVersion(), - Comments = comments ?? inputFormat.Info.Comments, Creator = creator ?? inputFormat.Info.Creator, + Application = "Aaru", + ApplicationVersion = Version.GetVersion(), + Comments = comments ?? inputFormat.Info.Comments, + Creator = creator ?? inputFormat.Info.Creator, DriveFirmwareRevision = driveFirmwareRevision ?? inputFormat.Info.DriveFirmwareRevision, - DriveManufacturer = driveManufacturer ?? inputFormat.Info.DriveManufacturer, - DriveModel = driveModel ?? inputFormat.Info.DriveModel, - DriveSerialNumber = driveSerialNumber ?? inputFormat.Info.DriveSerialNumber, - LastMediaSequence = lastMediaSequence != 0 ? lastMediaSequence : inputFormat.Info.LastMediaSequence, - MediaBarcode = mediaBarcode ?? inputFormat.Info.MediaBarcode, - MediaManufacturer = mediaManufacturer ?? inputFormat.Info.MediaManufacturer, - MediaModel = mediaModel ?? inputFormat.Info.MediaModel, - MediaPartNumber = mediaPartNumber ?? inputFormat.Info.MediaPartNumber, - MediaSequence = mediaSequence != 0 ? mediaSequence : inputFormat.Info.MediaSequence, - MediaSerialNumber = mediaSerialNumber ?? inputFormat.Info.MediaSerialNumber, - MediaTitle = mediaTitle ?? inputFormat.Info.MediaTitle + DriveManufacturer = driveManufacturer ?? inputFormat.Info.DriveManufacturer, + DriveModel = driveModel ?? inputFormat.Info.DriveModel, + DriveSerialNumber = driveSerialNumber ?? inputFormat.Info.DriveSerialNumber, + LastMediaSequence = lastMediaSequence != 0 ? lastMediaSequence : inputFormat.Info.LastMediaSequence, + MediaBarcode = mediaBarcode ?? inputFormat.Info.MediaBarcode, + MediaManufacturer = mediaManufacturer ?? inputFormat.Info.MediaManufacturer, + MediaModel = mediaModel ?? inputFormat.Info.MediaModel, + MediaPartNumber = mediaPartNumber ?? inputFormat.Info.MediaPartNumber, + MediaSequence = mediaSequence != 0 ? mediaSequence : inputFormat.Info.MediaSequence, + MediaSerialNumber = mediaSerialNumber ?? inputFormat.Info.MediaSerialNumber, + MediaTitle = mediaTitle ?? inputFormat.Info.MediaTitle }; if(!outputFormat.SetMetadata(metadata)) diff --git a/Aaru/Commands/Image/CreateSidecar.cs b/Aaru/Commands/Image/CreateSidecar.cs index a5cac729a..5c2061335 100644 --- a/Aaru/Commands/Image/CreateSidecar.cs +++ b/Aaru/Commands/Image/CreateSidecar.cs @@ -57,7 +57,8 @@ namespace Aaru.Commands.Image }, "Only used for tapes, indicates block size. Files in the folder whose size is not a multiple of this value will simply be ignored.") { - Argument = new Argument(() => 512), Required = false + Argument = new Argument(() => 512), + Required = false }); Add(new Option(new[] @@ -65,7 +66,8 @@ namespace Aaru.Commands.Image "--encoding", "-e" }, "Name of character encoding to use.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -74,12 +76,15 @@ namespace Aaru.Commands.Image }, "When used indicates that input is a folder containing alphabetically sorted files extracted from a linear block-based tape with fixed block size (e.g. a SCSI tape device).") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Decode.cs b/Aaru/Commands/Image/Decode.cs index 9461565c0..01ddb6caa 100644 --- a/Aaru/Commands/Image/Decode.cs +++ b/Aaru/Commands/Image/Decode.cs @@ -52,7 +52,8 @@ namespace Aaru.Commands.Image "--disk-tags", "-f" }, "Decode disk tags.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -60,7 +61,8 @@ namespace Aaru.Commands.Image "--length", "-l" }, "How many sectors to decode, or \"all\".") { - Argument = new Argument(() => "all"), Required = false + Argument = new Argument(() => "all"), + Required = false }); Add(new Option(new[] @@ -68,7 +70,8 @@ namespace Aaru.Commands.Image "--sector-tags", "-p" }, "Decode sector tags.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -76,12 +79,15 @@ namespace Aaru.Commands.Image "--start", "-s" }, "Sector to start decoding from.") { - Argument = new Argument(() => 0), Required = false + Argument = new Argument(() => 0), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index 3425ca710..c8ea01780 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -49,7 +49,8 @@ namespace Aaru.Commands.Image "--duplicated-sectors", "-p" }, "Calculates how many sectors are duplicated (have same exact data in user area).") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -57,7 +58,8 @@ namespace Aaru.Commands.Image "--separated-tracks", "-t" }, "Calculates entropy for each track separately.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -65,12 +67,15 @@ namespace Aaru.Commands.Image "--whole-disc", "-w" }, "Calculates entropy for the whole disc.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Info.cs b/Aaru/Commands/Image/Info.cs index 0a8d82f6a..11aebe0db 100644 --- a/Aaru/Commands/Image/Info.cs +++ b/Aaru/Commands/Image/Info.cs @@ -48,7 +48,9 @@ namespace Aaru.Commands.Image { AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Print.cs b/Aaru/Commands/Image/Print.cs index f5dd50344..135bff898 100644 --- a/Aaru/Commands/Image/Print.cs +++ b/Aaru/Commands/Image/Print.cs @@ -49,7 +49,8 @@ namespace Aaru.Commands.Image "--length", "-l" }, "How many sectors to print.") { - Argument = new Argument(() => 1), Required = false + Argument = new Argument(() => 1), + Required = false }); Add(new Option(new[] @@ -57,7 +58,8 @@ namespace Aaru.Commands.Image "--long-sectors", "-r" }, "Print sectors with tags included.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -65,7 +67,8 @@ namespace Aaru.Commands.Image "--start", "-s" }, "Starting sector.") { - Argument = new Argument(), Required = true + Argument = new Argument(), + Required = true }); Add(new Option(new[] @@ -73,12 +76,15 @@ namespace Aaru.Commands.Image "--width", "-w" }, "How many bytes to print per line.") { - Argument = new Argument(() => 32), Required = false + Argument = new Argument(() => 32), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Media image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Media image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Image/Verify.cs b/Aaru/Commands/Image/Verify.cs index 1dfa81c30..ee718cb31 100644 --- a/Aaru/Commands/Image/Verify.cs +++ b/Aaru/Commands/Image/Verify.cs @@ -52,7 +52,8 @@ namespace Aaru.Commands.Image "--verify-disc", "-w" }, "Verify disc image if supported.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -60,12 +61,15 @@ namespace Aaru.Commands.Image "--verify-sectors", "-s" }, "Verify all sectors if supported.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Disc image path", Name = "image-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Disc image path", + Name = "image-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/ListEncodings.cs b/Aaru/Commands/ListEncodings.cs index 447eac64b..32196645b 100644 --- a/Aaru/Commands/ListEncodings.cs +++ b/Aaru/Commands/ListEncodings.cs @@ -63,12 +63,14 @@ namespace Aaru.Commands List encodings = Encoding.GetEncodings().Select(info => new CommonEncodingInfo { - Name = info.Name, DisplayName = info.GetEncoding().EncodingName + Name = info.Name, + DisplayName = info.GetEncoding().EncodingName }).ToList(); encodings.AddRange(Claunia.Encoding.Encoding.GetEncodings().Select(info => new CommonEncodingInfo { - Name = info.Name, DisplayName = info.DisplayName + Name = info.Name, + DisplayName = info.DisplayName })); AaruConsole.WriteLine("{0,-16} {1,-8}", "Name", "Description"); diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs index 8f11b600f..6cedd0a3b 100644 --- a/Aaru/Commands/Media/Dump.cs +++ b/Aaru/Commands/Media/Dump.cs @@ -64,7 +64,8 @@ namespace Aaru.Commands.Media "--cicm-xml", "-x" }, "Take metadata from existing CICM XML sidecar.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -72,17 +73,20 @@ namespace Aaru.Commands.Media "--encoding", "-e" }, "Name of character encoding to use.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--first-pregap", "Try to read first track pregap. Only applicable to CD/DDCD/GD.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--fix-offset", "Fix audio tracks offset. Only applicable to CD/GD.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -90,7 +94,8 @@ namespace Aaru.Commands.Media "--force", "-f" }, "Continue dump whatever happens.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -99,17 +104,20 @@ namespace Aaru.Commands.Media }, "Format of the output image, as plugin name or plugin id. If not present, will try to detect it from output image extension.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--metadata", "Enables creating CICM XML sidecar.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option("--trim", "Enables trimming errored from skipped sectors.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -117,12 +125,14 @@ namespace Aaru.Commands.Media "--options", "-O" }, "Comma separated name=value pairs of options to pass to output image plugin.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option("--persistent", "Try to recover partial or incorrect data.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -130,7 +140,8 @@ namespace Aaru.Commands.Media "--resume", "-r" }, "Create/use resume mapfile.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -138,7 +149,8 @@ namespace Aaru.Commands.Media "--retry-passes", "-p" }, "How many retry passes to do.") { - Argument = new Argument(() => 5), Required = false + Argument = new Argument(() => 5), + Required = false }); Add(new Option(new[] @@ -146,7 +158,8 @@ namespace Aaru.Commands.Media "--skip", "-k" }, "When an unreadable sector is found skip this many sectors.") { - Argument = new Argument(() => 512), Required = false + Argument = new Argument(() => 512), + Required = false }); Add(new Option(new[] @@ -154,23 +167,28 @@ namespace Aaru.Commands.Media "--stop-on-error", "-s" }, "Stop media dump on first error.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option("--subchannel", "Subchannel to dump. Only applicable to CD/GD. Values: any, rw, rw-or-pq, pq, none.") { - Argument = new Argument(() => "any"), Required = false + Argument = new Argument(() => "any"), + Required = false }); Add(new Option("--speed", "Speed to dump. Only applicable to optical drives, 0 for maximum.") { - Argument = new Argument(() => 0), Required = false + Argument = new Argument(() => 0), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Device path", Name = "device-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Device path", + Name = "device-path" }); AddArgument(new Argument @@ -186,7 +204,8 @@ namespace Aaru.Commands.Media "--private" }, "Do not store paths and serial numbers in log or metadata.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -194,7 +213,8 @@ namespace Aaru.Commands.Media "--fix-subchannel-position" }, "Store subchannel according to the sector they describe.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -202,7 +222,8 @@ namespace Aaru.Commands.Media "--retry-subchannel" }, "Retry subchannel. Implies fixing subchannel position.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -210,7 +231,8 @@ namespace Aaru.Commands.Media "--fix-subchannel" }, "Try to fix subchannel. Implies fixing subchannel position.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -218,7 +240,8 @@ namespace Aaru.Commands.Media "--fix-subchannel-crc" }, "If subchannel looks OK but CRC fails, rewrite it. Implies fixing subchannel.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -226,7 +249,8 @@ namespace Aaru.Commands.Media "--generate-subchannels" }, "Generates missing subchannels (they don't count as dumped in resume file).") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Add(new Option(new[] @@ -234,7 +258,8 @@ namespace Aaru.Commands.Media "--skip-cdiready-hole" }, "Skip the hole between data and audio in a CD-i Ready disc.") { - Argument = new Argument(() => true), Required = false + Argument = new Argument(() => true), + Required = false }); Add(new Option(new[] @@ -242,7 +267,8 @@ namespace Aaru.Commands.Media "--eject" }, "Eject media after dump finishes.") { - Argument = new Argument(() => false), Required = false + Argument = new Argument(() => false), + Required = false }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index 2761a13f1..86190ea48 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -70,12 +70,15 @@ namespace Aaru.Commands.Media "--output-prefix", "-w" }, "Write binary responses from device with that prefix.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Device path", Name = "device-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Device path", + Name = "device-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Media/Scan.cs b/Aaru/Commands/Media/Scan.cs index b0b10e28f..9d48b9256 100644 --- a/Aaru/Commands/Media/Scan.cs +++ b/Aaru/Commands/Media/Scan.cs @@ -49,7 +49,8 @@ namespace Aaru.Commands.Media "--mhdd-log", "-m" }, "Write a log of the scan in the format used by MHDD.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); Add(new Option(new[] @@ -57,12 +58,15 @@ namespace Aaru.Commands.Media "--ibg-log", "-b" }, "Write a log of the scan in the format used by ImgBurn.") { - Argument = new Argument(() => null), Required = false + Argument = new Argument(() => null), + Required = false }); AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "Device path", Name = "device-path" + Arity = ArgumentArity.ExactlyOne, + Description = "Device path", + Name = "device-path" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Commands/Remote.cs b/Aaru/Commands/Remote.cs index 138e49027..91cac2633 100644 --- a/Aaru/Commands/Remote.cs +++ b/Aaru/Commands/Remote.cs @@ -48,7 +48,9 @@ namespace Aaru.Commands { AddArgument(new Argument { - Arity = ArgumentArity.ExactlyOne, Description = "aaru host", Name = "host" + Arity = ArgumentArity.ExactlyOne, + Description = "aaru host", + Name = "host" }); Handler = CommandHandler.Create(GetType().GetMethod(nameof(Invoke))); diff --git a/Aaru/Main.cs b/Aaru/Main.cs index 16a4c309a..2d511e386 100644 --- a/Aaru/Main.cs +++ b/Aaru/Main.cs @@ -107,7 +107,10 @@ namespace Aaru // Remove duplicates foreach(var duplicate in ctx.SeenDevices.AsEnumerable().GroupBy(a => new { - a.Manufacturer, a.Model, a.Revision, a.Bus + a.Manufacturer, + a.Model, + a.Revision, + a.Bus }).Where(a => a.Count() > 1).Distinct().Select(a => a.Key)) ctx.RemoveRange(ctx.SeenDevices. Where(d => d.Manufacturer == duplicate.Manufacturer && d.Model == duplicate.Model &&