From 895143b790d4efed07cea5344436e9ade5f3e589 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Thu, 27 Feb 2020 23:48:41 +0000 Subject: [PATCH] Rename DicConsole to AaruConsole. --- .idea/.idea.Aaru/.idea/contentModel.xml | 2 +- Aaru.Checksums | 2 +- Aaru.CommonTypes | 2 +- Aaru.Console | 2 +- Aaru.Core/DataFile.cs | 6 +- Aaru.Core/Devices/Dumping/CompactDisc/Data.cs | 2 +- Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs | 2 +- .../Devices/Dumping/CompactDisc/Error.cs | 2 +- .../Devices/Dumping/CompactDisc/Pregap.cs | 22 +- .../Devices/Dumping/PlayStationPortable.cs | 6 +- Aaru.Core/Devices/Dumping/SBC.cs | 4 +- Aaru.Core/Devices/Dumping/XGD.cs | 26 +- Aaru.Core/Devices/Info/DeviceInfo.cs | 62 +-- Aaru.Core/Devices/ReaderATA.cs | 24 +- Aaru.Core/Devices/ReaderSCSI.cs | 22 +- Aaru.Core/Devices/Report/ATA.cs | 134 +++--- Aaru.Core/Devices/Report/MMC.cs | 278 ++++++------ Aaru.Core/Devices/Report/SSC.cs | 16 +- Aaru.Core/Devices/Report/Scsi.cs | 70 ++-- Aaru.Core/Devices/Report/SecureDigital.cs | 30 +- Aaru.Core/Devices/Scanning/SCSI.cs | 2 +- Aaru.Core/Entropy.cs | 10 +- Aaru.Core/ImageFormat.cs | 4 +- Aaru.Core/ImageInfo.cs | 270 ++++++------ Aaru.Core/Media/Detection/MMC.cs | 4 +- Aaru.Core/Media/Info/ScsiInfo.cs | 164 ++++---- Aaru.Core/Partitions.cs | 16 +- Aaru.Core/PrintScsiModePages.cs | 84 ++-- Aaru.Core/Remote.cs | 54 +-- Aaru.Core/Sidecar/BlockMedia.cs | 16 +- Aaru.Core/Sidecar/Files.cs | 4 +- Aaru.Core/Sidecar/OpticalDisc.cs | 4 +- Aaru.Core/Sidecar/Sidecar.cs | 4 +- Aaru.Core/Statistics.cs | 4 +- Aaru.Decoders | 2 +- Aaru.Devices/Device/AtaCommands/Ata28.cs | 16 +- Aaru.Devices/Device/AtaCommands/Ata48.cs | 14 +- Aaru.Devices/Device/AtaCommands/AtaCHS.cs | 14 +- Aaru.Devices/Device/AtaCommands/Atapi.cs | 2 +- Aaru.Devices/Device/AtaCommands/Cfa.cs | 6 +- Aaru.Devices/Device/AtaCommands/MCPT.cs | 2 +- Aaru.Devices/Device/AtaCommands/Smart.cs | 16 +- Aaru.Devices/Device/List.cs | 2 +- Aaru.Devices/Device/MmcCommands/MMC.cs | 16 +- .../Device/MmcCommands/SecureDigital.cs | 6 +- Aaru.Devices/Device/ScsiCommands/Adaptec.cs | 10 +- .../Device/ScsiCommands/ArchiveCorp.cs | 4 +- Aaru.Devices/Device/ScsiCommands/Certance.cs | 2 +- Aaru.Devices/Device/ScsiCommands/Fujitsu.cs | 2 +- Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs | 2 +- Aaru.Devices/Device/ScsiCommands/HP.cs | 2 +- Aaru.Devices/Device/ScsiCommands/Kreon.cs | 8 +- Aaru.Devices/Device/ScsiCommands/MMC.cs | 24 +- Aaru.Devices/Device/ScsiCommands/NEC.cs | 2 +- Aaru.Devices/Device/ScsiCommands/Pioneer.cs | 6 +- Aaru.Devices/Device/ScsiCommands/Plasmon.cs | 2 +- Aaru.Devices/Device/ScsiCommands/Plextor.cs | 30 +- Aaru.Devices/Device/ScsiCommands/SBC.cs | 16 +- Aaru.Devices/Device/ScsiCommands/SMC.cs | 2 +- Aaru.Devices/Device/ScsiCommands/SPC.cs | 24 +- Aaru.Devices/Device/ScsiCommands/SSC.cs | 28 +- Aaru.Devices/Device/ScsiCommands/SyQuest.cs | 4 +- Aaru.Devices/FreeBSD/Command.cs | 10 +- Aaru.Devices/Remote/Remote.cs | 158 +++---- Aaru.Filesystems/Acorn.cs | 92 ++-- Aaru.Filesystems/AmigaDOS.cs | 40 +- Aaru.Filesystems/AppleDOS/Super.cs | 10 +- Aaru.Filesystems/AppleMFS/Dir.cs | 24 +- Aaru.Filesystems/AppleMFS/File.cs | 2 +- Aaru.Filesystems/BTRFS.cs | 92 ++-- Aaru.Filesystems/CPM/Info.cs | 24 +- Aaru.Filesystems/CPM/Super.cs | 18 +- Aaru.Filesystems/EFS.cs | 8 +- Aaru.Filesystems/FAT/BPB.cs | 62 +-- Aaru.Filesystems/FAT/Info.cs | 74 ++-- Aaru.Filesystems/FAT/Super.cs | 6 +- Aaru.Filesystems/FATX/Super.cs | 46 +- Aaru.Filesystems/FFS.cs | 78 ++-- Aaru.Filesystems/Fossil.cs | 6 +- Aaru.Filesystems/HPOFS.cs | 106 ++--- Aaru.Filesystems/ISO9660/Info.cs | 16 +- Aaru.Filesystems/ISO9660/Super.cs | 10 +- Aaru.Filesystems/LIF.cs | 2 +- Aaru.Filesystems/LisaFS/Extent.cs | 74 ++-- Aaru.Filesystems/LisaFS/File.cs | 2 +- Aaru.Filesystems/LisaFS/Info.cs | 102 ++--- Aaru.Filesystems/LisaFS/Super.cs | 34 +- Aaru.Filesystems/Locus.cs | 44 +- Aaru.Filesystems/Nintendo.cs | 68 +-- Aaru.Filesystems/ODS.cs | 4 +- Aaru.Filesystems/ProDOS.cs | 22 +- Aaru.Filesystems/QNX4.cs | 136 +++--- Aaru.Filesystems/RBF.cs | 4 +- Aaru.Filesystems/ReFS.cs | 28 +- Aaru.Filesystems/SolarFS.cs | 32 +- Aaru.Filesystems/UCSDPascal/Info.cs | 18 +- Aaru.Filesystems/UDF.cs | 24 +- Aaru.Filesystems/UNICOS.cs | 2 +- Aaru.Filesystems/UNIXBFS.cs | 18 +- Aaru.Filesystems/XFS.cs | 8 +- Aaru.Filesystems/dump.cs | 6 +- Aaru.Gui/ConsoleHandler.cs | 14 +- Aaru.Gui/Forms/frmConsole.xeto.cs | 6 +- Aaru.Gui/Forms/frmImageChecksum.xeto.cs | 6 +- Aaru.Gui/Forms/frmImageConvert.xeto.cs | 34 +- Aaru.Gui/Forms/frmImageEntropy.xeto.cs | 4 +- Aaru.Gui/Forms/frmImageSidecar.xeto.cs | 2 +- Aaru.Gui/Forms/frmImageVerify.xeto.cs | 4 +- Aaru.Gui/Forms/frmMain.xeto.cs | 46 +- Aaru.Gui/Tabs/tabPcmciaInfo.xeto.cs | 2 +- Aaru.Gui/Tabs/tabScsiInfo.xeto.cs | 10 +- Aaru.Helpers | 2 +- .../AaruFormat/ClauniaSubchannelTransform.cs | 12 +- Aaru.Images/AaruFormat/Read.cs | 164 ++++---- Aaru.Images/AaruFormat/Verify.cs | 24 +- Aaru.Images/AaruFormat/Write.cs | 102 ++--- Aaru.Images/Alcohol120/Read.cs | 128 +++--- Aaru.Images/Anex86/Identify.cs | 16 +- Aaru.Images/Anex86/Read.cs | 2 +- Aaru.Images/Apple2MG/Read.cs | 40 +- Aaru.Images/AppleNIB/Read.cs | 12 +- Aaru.Images/Apridisk/Read.cs | 18 +- Aaru.Images/BLU/Read.cs | 10 +- Aaru.Images/BlindWrite4/Read.cs | 152 +++---- Aaru.Images/BlindWrite5/Read.cs | 206 ++++----- Aaru.Images/CDRDAO/Identify.cs | 6 +- Aaru.Images/CDRDAO/Read.cs | 174 ++++---- Aaru.Images/CDRWin/Identify.cs | 6 +- Aaru.Images/CDRWin/Read.cs | 238 +++++------ Aaru.Images/CDRWin/Verify.cs | 14 +- Aaru.Images/CHD/Read.cs | 154 +++---- Aaru.Images/CPCDSK/Identify.cs | 2 +- Aaru.Images/CPCDSK/Read.cs | 58 +-- Aaru.Images/CisCopy/Read.cs | 2 +- Aaru.Images/CloneCD/Identify.cs | 6 +- Aaru.Images/CloneCD/Read.cs | 64 +-- Aaru.Images/CopyQM/Read.cs | 66 +-- Aaru.Images/D88/Identify.cs | 12 +- Aaru.Images/D88/Read.cs | 38 +- Aaru.Images/DART/Read.cs | 2 +- Aaru.Images/DIM/Read.cs | 16 +- Aaru.Images/DiscFerret/Read.cs | 10 +- Aaru.Images/DiscJuggler/Identify.cs | 2 +- Aaru.Images/DiscJuggler/Read.cs | 74 ++-- Aaru.Images/DiskCopy42/Identify.cs | 24 +- Aaru.Images/DiskCopy42/Read.cs | 36 +- Aaru.Images/DiskCopy42/Verify.cs | 16 +- Aaru.Images/DriDiskCopy/Identify.cs | 44 +- Aaru.Images/DriDiskCopy/Read.cs | 4 +- Aaru.Images/GDI/Identify.cs | 6 +- Aaru.Images/GDI/Read.cs | 48 +-- Aaru.Images/HDCopy/Read.cs | 4 +- Aaru.Images/IMD/Read.cs | 4 +- Aaru.Images/KryoFlux/Read.cs | 12 +- Aaru.Images/MaxiDisk/Identify.cs | 16 +- Aaru.Images/NDIF/Read.cs | 46 +- Aaru.Images/NHDr0/Identify.cs | 16 +- Aaru.Images/Nero/Identify.cs | 10 +- Aaru.Images/Nero/Read.cs | 202 ++++----- Aaru.Images/Parallels/Read.cs | 26 +- Aaru.Images/PartClone/Read.cs | 24 +- Aaru.Images/Partimage/Read.cs | 114 ++--- Aaru.Images/QCOW/Read.cs | 44 +- Aaru.Images/QCOW2/Identify.cs | 4 +- Aaru.Images/QCOW2/Read.cs | 58 +-- Aaru.Images/QED/Read.cs | 40 +- Aaru.Images/RayDIM/Identify.cs | 12 +- Aaru.Images/SaveDskF/Read.cs | 44 +- Aaru.Images/SuperCardPro/Read.cs | 72 ++-- Aaru.Images/T98/Identify.cs | 2 +- Aaru.Images/TeleDisk/Helpers.cs | 24 +- Aaru.Images/TeleDisk/Identify.cs | 22 +- Aaru.Images/TeleDisk/Read.cs | 98 ++--- Aaru.Images/UDIF/Read.cs | 112 ++--- Aaru.Images/UkvFdi/Read.cs | 34 +- Aaru.Images/VDI/Read.cs | 48 +-- Aaru.Images/VHD/Read.cs | 110 ++--- Aaru.Images/VHDX/Read.cs | 4 +- Aaru.Images/VMware/Read.cs | 86 ++-- Aaru.Images/Virtual98/Identify.cs | 18 +- Aaru.Images/WCDiskImage/Read.cs | 24 +- Aaru.Images/ZZZRawImage/Read.cs | 4 +- Aaru.Partitions/AppleMap.cs | 80 ++-- Aaru.Partitions/Apricot.cs | 202 ++++----- Aaru.Partitions/Atari.cs | 32 +- Aaru.Partitions/BSD.cs | 82 ++-- Aaru.Partitions/GPT.cs | 46 +- Aaru.Partitions/Human68k.cs | 18 +- Aaru.Partitions/MBR.cs | 90 ++-- Aaru.Partitions/NeXT.cs | 78 ++-- Aaru.Partitions/PC98.cs | 42 +- Aaru.Partitions/RDB.cs | 288 ++++++------- Aaru.Partitions/SGI.cs | 58 +-- Aaru.Partitions/Sun.cs | 152 +++---- Aaru.Partitions/VTOC.cs | 138 +++--- Aaru.Partitions/XENIX.cs | 6 +- Aaru/Commands/Configure.cs | 78 ++-- Aaru/Commands/Database/Statistics.cs | 66 +-- Aaru/Commands/Database/Update.cs | 12 +- Aaru/Commands/Device/DeviceReport.cs | 162 +++---- Aaru/Commands/Device/Devices.cs | 22 +- Aaru/Commands/Device/Info.cs | 396 +++++++++--------- Aaru/Commands/Filesystem/ExtractFiles.cs | 108 ++--- Aaru/Commands/Filesystem/Ls.cs | 102 ++--- Aaru/Commands/Filesystem/Options.cs | 18 +- Aaru/Commands/Formats.cs | 66 +-- Aaru/Commands/Image/Analyze.cs | 96 ++--- Aaru/Commands/Image/Checksum.cs | 92 ++-- Aaru/Commands/Image/Compare.cs | 38 +- Aaru/Commands/Image/Convert.cs | 198 ++++----- Aaru/Commands/Image/CreateSidecar.cs | 52 +-- Aaru/Commands/Image/Decode.cs | 124 +++--- Aaru/Commands/Image/Entropy.cs | 28 +- Aaru/Commands/Image/Info.cs | 32 +- Aaru/Commands/Image/Options.cs | 18 +- Aaru/Commands/Image/Print.cs | 28 +- Aaru/Commands/Image/Verify.cs | 62 +-- Aaru/Commands/ListEncodings.cs | 12 +- Aaru/Commands/ListNamespaces.cs | 16 +- Aaru/Commands/Media/Dump.cs | 74 ++-- Aaru/Commands/Media/Info.cs | 132 +++--- Aaru/Commands/Media/Scan.cs | 48 +-- Aaru/Commands/Remote.cs | 18 +- Aaru/Main.cs | 18 +- Aaru/Progress.cs | 18 +- 225 files changed, 5023 insertions(+), 5023 deletions(-) diff --git a/.idea/.idea.Aaru/.idea/contentModel.xml b/.idea/.idea.Aaru/.idea/contentModel.xml index b7adcdc3b..e1d1a486f 100644 --- a/.idea/.idea.Aaru/.idea/contentModel.xml +++ b/.idea/.idea.Aaru/.idea/contentModel.xml @@ -235,7 +235,7 @@ - + diff --git a/Aaru.Checksums b/Aaru.Checksums index b034046c1..cbc7c444a 160000 --- a/Aaru.Checksums +++ b/Aaru.Checksums @@ -1 +1 @@ -Subproject commit b034046c1d8f43091ab70b85f29a3bfd7665857e +Subproject commit cbc7c444afbbbec1284013a8ffef88fa443f2725 diff --git a/Aaru.CommonTypes b/Aaru.CommonTypes index 79076c70f..3ff4c203a 160000 --- a/Aaru.CommonTypes +++ b/Aaru.CommonTypes @@ -1 +1 @@ -Subproject commit 79076c70f996be79aff4306ddec7467a8d079262 +Subproject commit 3ff4c203af318b618ee76c1b7fa3b1698072ecf7 diff --git a/Aaru.Console b/Aaru.Console index 057de37f0..d1a07a696 160000 --- a/Aaru.Console +++ b/Aaru.Console @@ -1 +1 @@ -Subproject commit 057de37f08d79cdb05abf54f24b25a0eb7219e33 +Subproject commit d1a07a696cb2f46d61a011b5f770e2caf8562806 diff --git a/Aaru.Core/DataFile.cs b/Aaru.Core/DataFile.cs index d70295ca5..a3492bed1 100644 --- a/Aaru.Core/DataFile.cs +++ b/Aaru.Core/DataFile.cs @@ -177,18 +177,18 @@ namespace Aaru.Core File.Delete(filename); else { - DicConsole.ErrorWriteLine("Not overwriting file {0}", filename); + AaruConsole.ErrorWriteLine("Not overwriting file {0}", filename); return; } try { - DicConsole.DebugWriteLine(who, "Writing " + whatWriting + " to {0}", filename); + AaruConsole.DebugWriteLine(who, "Writing " + whatWriting + " to {0}", filename); FileStream outputFs = new FileStream(filename, FileMode.CreateNew); outputFs.Write(data, 0, data.Length); outputFs.Close(); } - catch { DicConsole.ErrorWriteLine("Unable to write file {0}", filename); } + catch { AaruConsole.ErrorWriteLine("Unable to write file {0}", filename); } } } } \ No newline at end of file diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs index 428ee7c7b..42b2ae048 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Data.cs @@ -393,7 +393,7 @@ namespace Aaru.Core.Devices.Dumping for(ulong b = i; b < i + _skip; b++) _resume.BadBlocks.Add(b); - DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); mhddLog.Write(i, cmdDuration < 500 ? 65535 : cmdDuration); ibgLog.Write(i, 0); diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs index 6c81953d6..c4ba5d2a4 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Dump.cs @@ -1017,7 +1017,7 @@ namespace Aaru.Core.Devices.Dumping { if(tag.Value is null) { - DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); + AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); continue; } diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs index 6f0337fcb..295bbbc5a 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Error.cs @@ -151,7 +151,7 @@ namespace Aaru.Core.Devices.Dumping UpdateStatus?. Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); - DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); _dumpLog.WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); } diff --git a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs index 838fd648b..fe386bd18 100644 --- a/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs +++ b/Aaru.Core/Devices/Dumping/CompactDisc/Pregap.cs @@ -153,7 +153,7 @@ namespace Aaru.Core.Devices.Dumping break; } - DicConsole.DebugWriteLine("Pregap calculator", bcd == true + AaruConsole.DebugWriteLine("Pregap calculator", bcd == true ? "Subchannel is BCD" : bcd == false ? "Subchannel is not BCD" @@ -181,7 +181,7 @@ namespace Aaru.Core.Devices.Dumping if(tracks.Where(t => t.TrackSession == track.TrackSession).OrderBy(t => t.TrackSequence). FirstOrDefault().TrackSequence == track.TrackSequence) { - DicConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.TrackSequence); + AaruConsole.DebugWriteLine("Pregap calculator", "Skipping track {0}", track.TrackSequence); if(track.TrackSequence > 1) pregaps[track.TrackSequence] = 150; @@ -189,7 +189,7 @@ namespace Aaru.Core.Devices.Dumping continue; } - DicConsole.DebugWriteLine("Pregap calculator", "Track {0}", track.TrackSequence); + AaruConsole.DebugWriteLine("Pregap calculator", "Track {0}", track.TrackSequence); int lba = (int)track.TrackStartSector - 1; bool pregapFound = false; @@ -209,7 +209,7 @@ namespace Aaru.Core.Devices.Dumping if(sense) { - DicConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}", lba, retries + 1, + AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}", lba, retries + 1, sense); continue; @@ -220,7 +220,7 @@ namespace Aaru.Core.Devices.Dumping CRC16CCITTContext.Data(subBuf, 10, out crc); - DicConsole.DebugWriteLine("Pregap calculator", + AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}", lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9], @@ -261,7 +261,7 @@ namespace Aaru.Core.Devices.Dumping if(crcOk) { - DicConsole.DebugWriteLine("Pregap calculator", + AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}", lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], @@ -316,7 +316,7 @@ namespace Aaru.Core.Devices.Dumping CRC16CCITTContext.Data(subBuf, 10, out crc); - DicConsole.DebugWriteLine("Pregap calculator", + AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}, Q: {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}", lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], subBuf[8], subBuf[9], @@ -357,7 +357,7 @@ namespace Aaru.Core.Devices.Dumping if(crcOk) { - DicConsole.DebugWriteLine("Pregap calculator", + AaruConsole.DebugWriteLine("Pregap calculator", "LBA: {0}, Try {1}, Sense {2}, Q (FIXED): {3:X2} {4:X2} {5:X2} {6:X2} {7:X2} {8:X2} {9:X2} {10:X2} {11:X2} {12:X2} CRC 0x{13:X2}{14:X2}, Calculated CRC: 0x{15:X2}{16:X2}", lba, retries + 1, sense, subBuf[0], subBuf[1], subBuf[2], subBuf[3], subBuf[4], subBuf[5], subBuf[6], subBuf[7], @@ -430,7 +430,7 @@ namespace Aaru.Core.Devices.Dumping { inexactPositioning = true; - DicConsole.DebugWriteLine("Pregap calculator", "All Q empty for LBA {0}", lba); + AaruConsole.DebugWriteLine("Pregap calculator", "All Q empty for LBA {0}", lba); break; } @@ -500,7 +500,7 @@ namespace Aaru.Core.Devices.Dumping if(diff != 0) { - DicConsole.DebugWriteLine("Pregap calculator", "Invalid Q position for LBA {0}, got {1}", lba, + AaruConsole.DebugWriteLine("Pregap calculator", "Invalid Q position for LBA {0}, got {1}", lba, posQ); inexactPositioning = true; @@ -512,7 +512,7 @@ namespace Aaru.Core.Devices.Dumping // If CRC is not OK, only accept pregaps less than 10 sectors longer than previously now if(crcOk || pregapQ - pregaps[track.TrackSequence] < 10) { - DicConsole.DebugWriteLine("Pregap calculator", "Pregap for track {0}: {1}", + AaruConsole.DebugWriteLine("Pregap calculator", "Pregap for track {0}: {1}", track.TrackSequence, pregapQ); pregaps[track.TrackSequence] = pregapQ; diff --git a/Aaru.Core/Devices/Dumping/PlayStationPortable.cs b/Aaru.Core/Devices/Dumping/PlayStationPortable.cs index 4e09441c3..650403b93 100644 --- a/Aaru.Core/Devices/Dumping/PlayStationPortable.cs +++ b/Aaru.Core/Devices/Dumping/PlayStationPortable.cs @@ -532,7 +532,7 @@ namespace Aaru.Core.Devices.Dumping UpdateStatus?. Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); - DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); _dumpLog. WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); @@ -609,7 +609,7 @@ namespace Aaru.Core.Devices.Dumping } EndProgress?.Invoke(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } #endregion Error handling @@ -1008,7 +1008,7 @@ namespace Aaru.Core.Devices.Dumping UpdateStatus?. Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); - DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); _dumpLog. WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); diff --git a/Aaru.Core/Devices/Dumping/SBC.cs b/Aaru.Core/Devices/Dumping/SBC.cs index 1f9702e66..43090a196 100644 --- a/Aaru.Core/Devices/Dumping/SBC.cs +++ b/Aaru.Core/Devices/Dumping/SBC.cs @@ -722,7 +722,7 @@ namespace Aaru.Core.Devices.Dumping UpdateStatus?. Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); - DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); _dumpLog. WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); @@ -814,7 +814,7 @@ namespace Aaru.Core.Devices.Dumping { if(tag.Value is null) { - DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); + AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); continue; } diff --git a/Aaru.Core/Devices/Dumping/XGD.cs b/Aaru.Core/Devices/Dumping/XGD.cs index 9c3e7a77b..bb5c7d345 100644 --- a/Aaru.Core/Devices/Dumping/XGD.cs +++ b/Aaru.Core/Devices/Dumping/XGD.cs @@ -77,7 +77,7 @@ namespace Aaru.Core.Devices.Dumping if(!isAdmin) { - DicConsole. + AaruConsole. ErrorWriteLine("Because of the commands sent to a device, dumping XGD must be done with administrative privileges. Cannot continue."); _dumpLog.WriteLine("Cannot dump XGD without administrative privileges."); @@ -144,7 +144,7 @@ namespace Aaru.Core.Devices.Dumping mediaTags.Add(MediaTagType.Xbox_SecuritySector, tmpBuf); // Get video partition size - DicConsole.DebugWriteLine("Dump-media command", "Getting video partition size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting video partition size"); UpdateStatus?.Invoke("Locking drive."); _dumpLog.WriteLine("Locking drive."); sense = _dev.KreonLock(out senseBuf, _dev.Timeout, out _); @@ -189,7 +189,7 @@ namespace Aaru.Core.Devices.Dumping tmpBuf = new byte[readBuffer.Length - 4]; Array.Copy(readBuffer, 4, tmpBuf, 0, readBuffer.Length - 4); mediaTags.Add(MediaTagType.DVD_PFI, tmpBuf); - DicConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize); + AaruConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize); ulong l0Video = (PFI.Decode(readBuffer).Value.Layer0EndPSN - PFI.Decode(readBuffer).Value.DataAreaStartPSN) + 1; @@ -226,7 +226,7 @@ namespace Aaru.Core.Devices.Dumping Array.Copy(coldPfi, 4, tmpBuf, 0, coldPfi.Length - 4); mediaTags.Remove(MediaTagType.DVD_PFI); mediaTags.Add(MediaTagType.DVD_PFI, tmpBuf); - DicConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize); + AaruConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize); l0Video = (PFI.Decode(coldPfi).Value.Layer0EndPSN - PFI.Decode(coldPfi).Value.DataAreaStartPSN) + 1; @@ -244,7 +244,7 @@ namespace Aaru.Core.Devices.Dumping } // Get game partition size - DicConsole.DebugWriteLine("Dump-media command", "Getting game partition size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting game partition size"); UpdateStatus?.Invoke("Unlocking drive (Xtreme)."); _dumpLog.WriteLine("Unlocking drive (Xtreme)."); sense = _dev.KreonUnlockXtreme(out senseBuf, _dev.Timeout, out _); @@ -272,10 +272,10 @@ namespace Aaru.Core.Devices.Dumping ulong gameSize = (ulong)((readBuffer[0] << 24) + (readBuffer[1] << 16) + (readBuffer[2] << 8) + readBuffer[3]) + 1; - DicConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", gameSize); + AaruConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", gameSize); // Get middle zone size - DicConsole.DebugWriteLine("Dump-media command", "Getting middle zone size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting middle zone size"); UpdateStatus?.Invoke("Unlocking drive (Wxripper)."); _dumpLog.WriteLine("Unlocking drive (Wxripper)."); sense = _dev.KreonUnlockWxripper(out senseBuf, _dev.Timeout, out _); @@ -315,7 +315,7 @@ namespace Aaru.Core.Devices.Dumping return; } - DicConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize); + AaruConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize); ulong blocks = totalSize + 1; PFI.PhysicalFormatInformation wxRipperPfi = PFI.Decode(readBuffer).Value; @@ -615,7 +615,7 @@ namespace Aaru.Core.Devices.Dumping for(ulong b = i; b < i + _skip; b++) _resume.BadBlocks.Add(b); - DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); mhddLog.Write(i, cmdDuration < 500 ? 65535 : cmdDuration); ibgLog.Write(i, 0); @@ -806,7 +806,7 @@ namespace Aaru.Core.Devices.Dumping // TODO: Handle errors in video partition //errored += blocksToRead; //resume.BadBlocks.Add(l1); - DicConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Dump-Media", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); mhddLog.Write(l1, cmdDuration < 500 ? 65535 : cmdDuration); ibgLog.Write(l1, 0); @@ -860,7 +860,7 @@ namespace Aaru.Core.Devices.Dumping } end = DateTime.UtcNow; - DicConsole.WriteLine(); + AaruConsole.WriteLine(); mhddLog.Close(); ibgLog.Close(_dev, blocks, BLOCK_SIZE, (end - start).TotalSeconds, currentSpeed * 1024, @@ -1030,7 +1030,7 @@ namespace Aaru.Core.Devices.Dumping UpdateStatus?. Invoke("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); - DicConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Error: {0}", Sense.PrettifySense(senseBuf)); _dumpLog. WriteLine("Drive did not accept MODE SELECT command for persistent error reading, try another drive."); @@ -1120,7 +1120,7 @@ namespace Aaru.Core.Devices.Dumping { if(tag.Value is null) { - DicConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); + AaruConsole.ErrorWriteLine("Error: Tag type {0} is null, skipping...", tag.Key); continue; } diff --git a/Aaru.Core/Devices/Info/DeviceInfo.cs b/Aaru.Core/Devices/Info/DeviceInfo.cs index 3b87fd674..eb9e409df 100644 --- a/Aaru.Core/Devices/Info/DeviceInfo.cs +++ b/Aaru.Core/Devices/Info/DeviceInfo.cs @@ -78,31 +78,31 @@ namespace Aaru.Core.Devices.Info if(sense) { - DicConsole.DebugWriteLine("Device-Info command", "STATUS = 0x{0:X2}", errorRegisters.Status); - DicConsole.DebugWriteLine("Device-Info command", "ERROR = 0x{0:X2}", errorRegisters.Error); + AaruConsole.DebugWriteLine("Device-Info command", "STATUS = 0x{0:X2}", errorRegisters.Status); + AaruConsole.DebugWriteLine("Device-Info command", "ERROR = 0x{0:X2}", errorRegisters.Error); - DicConsole.DebugWriteLine("Device-Info command", "NSECTOR = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "NSECTOR = 0x{0:X2}", errorRegisters.SectorCount); - DicConsole.DebugWriteLine("Device-Info command", "SECTOR = 0x{0:X2}", errorRegisters.Sector); + AaruConsole.DebugWriteLine("Device-Info command", "SECTOR = 0x{0:X2}", errorRegisters.Sector); - DicConsole.DebugWriteLine("Device-Info command", "CYLHIGH = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "CYLHIGH = 0x{0:X2}", errorRegisters.CylinderHigh); - DicConsole.DebugWriteLine("Device-Info command", "CYLLOW = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "CYLLOW = 0x{0:X2}", errorRegisters.CylinderLow); - DicConsole.DebugWriteLine("Device-Info command", "DEVICE = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "DEVICE = 0x{0:X2}", errorRegisters.DeviceHead); - DicConsole.DebugWriteLine("Device-Info command", "Error code = {0}", dev.LastError); + AaruConsole.DebugWriteLine("Device-Info command", "Error code = {0}", dev.LastError); break; } if(dev.Error) { - DicConsole.ErrorWriteLine("Error {0} querying ATA IDENTIFY", dev.LastError); + AaruConsole.ErrorWriteLine("Error {0} querying ATA IDENTIFY", dev.LastError); break; } @@ -124,24 +124,24 @@ namespace Aaru.Core.Devices.Info if(sense) { - DicConsole.DebugWriteLine("Device-Info command", "STATUS = 0x{0:X2}", errorRegisters.Status); - DicConsole.DebugWriteLine("Device-Info command", "ERROR = 0x{0:X2}", errorRegisters.Error); + AaruConsole.DebugWriteLine("Device-Info command", "STATUS = 0x{0:X2}", errorRegisters.Status); + AaruConsole.DebugWriteLine("Device-Info command", "ERROR = 0x{0:X2}", errorRegisters.Error); - DicConsole.DebugWriteLine("Device-Info command", "NSECTOR = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "NSECTOR = 0x{0:X2}", errorRegisters.SectorCount); - DicConsole.DebugWriteLine("Device-Info command", "SECTOR = 0x{0:X2}", errorRegisters.Sector); + AaruConsole.DebugWriteLine("Device-Info command", "SECTOR = 0x{0:X2}", errorRegisters.Sector); - DicConsole.DebugWriteLine("Device-Info command", "CYLHIGH = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "CYLHIGH = 0x{0:X2}", errorRegisters.CylinderHigh); - DicConsole.DebugWriteLine("Device-Info command", "CYLLOW = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "CYLLOW = 0x{0:X2}", errorRegisters.CylinderLow); - DicConsole.DebugWriteLine("Device-Info command", "DEVICE = 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "DEVICE = 0x{0:X2}", errorRegisters.DeviceHead); - DicConsole.DebugWriteLine("Device-Info command", "Error code = {0}", dev.LastError); + AaruConsole.DebugWriteLine("Device-Info command", "Error code = {0}", dev.LastError); break; } @@ -149,7 +149,7 @@ namespace Aaru.Core.Devices.Info if(!dev.Error) AtapiIdentify = ataBuf; else - DicConsole.ErrorWriteLine("Error {0} querying ATA PACKET IDENTIFY", dev.LastError); + AaruConsole.ErrorWriteLine("Error {0} querying ATA PACKET IDENTIFY", dev.LastError); // ATAPI devices are also SCSI devices goto case DeviceType.SCSI; @@ -161,7 +161,7 @@ namespace Aaru.Core.Devices.Info if(sense) { - DicConsole.ErrorWriteLine("SCSI error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.ErrorWriteLine("SCSI error:\n{0}", Sense.PrettifySense(senseBuf)); break; } @@ -270,11 +270,11 @@ namespace Aaru.Core.Devices.Info foreach (Decoders.SCSI.DiscStructureCapabilities.Capability cap in caps) { if (cap.SDS && cap.RDS) - DicConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); else if (cap.SDS) - DicConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); else if (cap.RDS) - DicConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode); } } } @@ -289,11 +289,11 @@ namespace Aaru.Core.Devices.Info foreach (Decoders.SCSI.DiscStructureCapabilities.Capability cap in caps) { if (cap.SDS && cap.RDS) - DicConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can READ/SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); else if (cap.SDS) - DicConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can SEND DISC STRUCTURE format {0:X2}h", cap.FormatCode); else if (cap.RDS) - DicConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode); + AaruConsole.WriteLine("Drive can READ DISC STRUCTURE format {0:X2}h", cap.FormatCode); } } } @@ -418,10 +418,10 @@ namespace Aaru.Core.Devices.Info // TODO: Check which one is each one /* if(plxtBuf[6] > 0) - DicConsole.WriteLine("\tTray eject speed limited to {0}", + AaruConsole.WriteLine("\tTray eject speed limited to {0}", -(plxtBuf[6] + 48)); if(plxtBuf[7] > 0) - DicConsole.WriteLine("\tTray eject speed limited to {0}", + AaruConsole.WriteLine("\tTray eject speed limited to {0}", plxtBuf[7] - 47); */ } @@ -506,14 +506,14 @@ namespace Aaru.Core.Devices.Info sense = dev.ReadBlockLimits(out byte[] seqBuf, out senseBuf, dev.Timeout, out _); if(sense) - DicConsole.ErrorWriteLine("READ BLOCK LIMITS:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.ErrorWriteLine("READ BLOCK LIMITS:\n{0}", Sense.PrettifySense(senseBuf)); else BlockLimits = seqBuf; sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, dev.Timeout, out _); if(sense) - DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT:\n{0}", + AaruConsole.ErrorWriteLine("REPORT DENSITY SUPPORT:\n{0}", Sense.PrettifySense(senseBuf)); else { @@ -524,7 +524,7 @@ namespace Aaru.Core.Devices.Info sense = dev.ReportDensitySupport(out seqBuf, out senseBuf, true, false, dev.Timeout, out _); if(sense) - DicConsole.ErrorWriteLine("REPORT DENSITY SUPPORT (MEDIUM):\n{0}", + AaruConsole.ErrorWriteLine("REPORT DENSITY SUPPORT (MEDIUM):\n{0}", Sense.PrettifySense(senseBuf)); else { @@ -588,7 +588,7 @@ namespace Aaru.Core.Devices.Info break; default: - DicConsole.ErrorWriteLine("Unknown device type {0}, cannot get information.", dev.Type); + AaruConsole.ErrorWriteLine("Unknown device type {0}, cannot get information.", dev.Type); break; } diff --git a/Aaru.Core/Devices/ReaderATA.cs b/Aaru.Core/Devices/ReaderATA.cs index 7e4ee79f5..1e8304c9d 100644 --- a/Aaru.Core/Devices/ReaderATA.cs +++ b/Aaru.Core/Devices/ReaderATA.cs @@ -174,25 +174,25 @@ namespace Aaru.Core.Devices } if(ataReadDmaLba48) - DicConsole.WriteLine("Using ATA READ DMA EXT command."); + AaruConsole.WriteLine("Using ATA READ DMA EXT command."); else if(ataReadLba48) - DicConsole.WriteLine("Using ATA READ EXT command."); + AaruConsole.WriteLine("Using ATA READ EXT command."); else if(ataReadDmaRetryLba) - DicConsole.WriteLine("Using ATA READ DMA command with retries (LBA)."); + AaruConsole.WriteLine("Using ATA READ DMA command with retries (LBA)."); else if(ataReadDmaLba) - DicConsole.WriteLine("Using ATA READ DMA command (LBA)."); + AaruConsole.WriteLine("Using ATA READ DMA command (LBA)."); else if(ataReadRetryLba) - DicConsole.WriteLine("Using ATA READ command with retries (LBA)."); + AaruConsole.WriteLine("Using ATA READ command with retries (LBA)."); else if(ataReadLba) - DicConsole.WriteLine("Using ATA READ command (LBA)."); + AaruConsole.WriteLine("Using ATA READ command (LBA)."); else if(ataReadDmaRetry) - DicConsole.WriteLine("Using ATA READ DMA command with retries (CHS)."); + AaruConsole.WriteLine("Using ATA READ DMA command with retries (CHS)."); else if(ataReadDma) - DicConsole.WriteLine("Using ATA READ DMA command (CHS)."); + AaruConsole.WriteLine("Using ATA READ DMA command (CHS)."); else if(ataReadRetry) - DicConsole.WriteLine("Using ATA READ command with retries (CHS)."); + AaruConsole.WriteLine("Using ATA READ command with retries (CHS)."); else if(ataRead) - DicConsole.WriteLine("Using ATA READ command (CHS)."); + AaruConsole.WriteLine("Using ATA READ command (CHS)."); else { ErrorMessage = "Could not get a working read command!"; @@ -365,7 +365,7 @@ namespace Aaru.Core.Devices } if(error) - DicConsole.DebugWriteLine("ATA Reader", "ATA ERROR: {0} STATUS: {1}", errorByte, status); + AaruConsole.DebugWriteLine("ATA Reader", "ATA ERROR: {0} STATUS: {1}", errorByte, status); return error; } @@ -413,7 +413,7 @@ namespace Aaru.Core.Devices } if(error) - DicConsole.DebugWriteLine("ATA Reader", "ATA ERROR: {0} STATUS: {1}", errorByte, status); + AaruConsole.DebugWriteLine("ATA Reader", "ATA ERROR: {0} STATUS: {1}", errorByte, status); return error; } diff --git a/Aaru.Core/Devices/ReaderSCSI.cs b/Aaru.Core/Devices/ReaderSCSI.cs index f50291ae7..f234189b4 100644 --- a/Aaru.Core/Devices/ReaderSCSI.cs +++ b/Aaru.Core/Devices/ReaderSCSI.cs @@ -412,26 +412,26 @@ namespace Aaru.Core.Devices if(CanReadRaw) { if(readLong16) - DicConsole.WriteLine("Using SCSI READ LONG (16) command."); + AaruConsole.WriteLine("Using SCSI READ LONG (16) command."); else if(readLong10 || readLongDvd) - DicConsole.WriteLine("Using SCSI READ LONG (10) command."); + AaruConsole.WriteLine("Using SCSI READ LONG (10) command."); else if(syqReadLong10) - DicConsole.WriteLine("Using SyQuest READ LONG (10) command."); + AaruConsole.WriteLine("Using SyQuest READ LONG (10) command."); else if(syqReadLong6) - DicConsole.WriteLine("Using SyQuest READ LONG (6) command."); + AaruConsole.WriteLine("Using SyQuest READ LONG (6) command."); else if(hldtstReadRaw) - DicConsole.WriteLine("Using HL-DT-ST raw DVD reading."); + AaruConsole.WriteLine("Using HL-DT-ST raw DVD reading."); else if(plextorReadRaw) - DicConsole.WriteLine("Using Plextor raw DVD reading."); + AaruConsole.WriteLine("Using Plextor raw DVD reading."); } else if(read16) - DicConsole.WriteLine("Using SCSI READ (16) command."); + AaruConsole.WriteLine("Using SCSI READ (16) command."); else if(read12) - DicConsole.WriteLine("Using SCSI READ (12) command."); + AaruConsole.WriteLine("Using SCSI READ (12) command."); else if(read10) - DicConsole.WriteLine("Using SCSI READ (10) command."); + AaruConsole.WriteLine("Using SCSI READ (10) command."); else if(read6) - DicConsole.WriteLine("Using SCSI READ (6) command."); + AaruConsole.WriteLine("Using SCSI READ (6) command."); return false; } @@ -580,7 +580,7 @@ namespace Aaru.Core.Devices !dev.Error) return false; - DicConsole.DebugWriteLine("SCSI Reader", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("SCSI Reader", "READ error:\n{0}", Sense.PrettifySense(senseBuf)); return sense; } diff --git a/Aaru.Core/Devices/Report/ATA.cs b/Aaru.Core/Devices/Report/ATA.cs index 1b3221c88..769d6de42 100644 --- a/Aaru.Core/Devices/Report/ATA.cs +++ b/Aaru.Core/Devices/Report/ATA.cs @@ -44,14 +44,14 @@ namespace Aaru.Core.Devices.Report public TestedMedia ReportAtaMedia() { var mediaTest = new TestedMedia(); - DicConsole.Write("Please write a description of the media type and press enter: "); + AaruConsole.Write("Please write a description of the media type and press enter: "); mediaTest.MediumTypeName = System.Console.ReadLine(); - DicConsole.Write("Please write the media model and press enter: "); + AaruConsole.Write("Please write the media model and press enter: "); mediaTest.Model = System.Console.ReadLine(); mediaTest.MediaIsRecognized = true; - DicConsole.WriteLine("Querying ATA IDENTIFY..."); + AaruConsole.WriteLine("Querying ATA IDENTIFY..."); _dev.AtaIdentify(out byte[] buffer, out _, _dev.Timeout, out _); mediaTest.IdentifyData = ClearIdentify(buffer); @@ -174,7 +174,7 @@ namespace Aaru.Core.Devices.Report ulong checkCorrectRead = BitConverter.ToUInt64(buffer, 0); bool sense; - DicConsole.WriteLine("Trying READ SECTOR(S) in CHS mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in CHS mode..."); sense = _dev.Read(out byte[] readBuf, out AtaErrorRegistersChs errorChs, false, 0, 0, 1, 1, _dev.Timeout, out _); @@ -182,129 +182,129 @@ namespace Aaru.Core.Devices.Report mediaTest.SupportsReadSectors = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadSectorsData = readBuf; - DicConsole.WriteLine("Trying READ SECTOR(S) RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) RETRY in CHS mode..."); sense = _dev.Read(out readBuf, out errorChs, true, 0, 0, 1, 1, _dev.Timeout, out _); mediaTest.SupportsReadRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadSectorsRetryData = readBuf; - DicConsole.WriteLine("Trying READ DMA in CHS mode..."); + AaruConsole.WriteLine("Trying READ DMA in CHS mode..."); sense = _dev.ReadDma(out readBuf, out errorChs, false, 0, 0, 1, 1, _dev.Timeout, out _); mediaTest.SupportsReadDma = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadDmaData = readBuf; - DicConsole.WriteLine("Trying READ DMA RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ DMA RETRY in CHS mode..."); sense = _dev.ReadDma(out readBuf, out errorChs, true, 0, 0, 1, 1, _dev.Timeout, out _); mediaTest.SupportsReadDmaRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadDmaRetryData = readBuf; - DicConsole.WriteLine("Trying SEEK in CHS mode..."); + AaruConsole.WriteLine("Trying SEEK in CHS mode..."); sense = _dev.Seek(out errorChs, 0, 0, 1, _dev.Timeout, out _); mediaTest.SupportsSeek = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, errorChs.Status, errorChs.Error); - DicConsole.WriteLine("Trying READ SECTOR(S) in LBA mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in LBA mode..."); sense = _dev.Read(out readBuf, out AtaErrorRegistersLba28 errorLba, false, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadLbaData = readBuf; - DicConsole.WriteLine("Trying READ SECTOR(S) RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) RETRY in LBA mode..."); sense = _dev.Read(out readBuf, out errorLba, true, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadRetryLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadRetryLbaData = readBuf; - DicConsole.WriteLine("Trying READ DMA in LBA mode..."); + AaruConsole.WriteLine("Trying READ DMA in LBA mode..."); sense = _dev.ReadDma(out readBuf, out errorLba, false, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadDmaLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadDmaLbaData = readBuf; - DicConsole.WriteLine("Trying READ DMA RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ DMA RETRY in LBA mode..."); sense = _dev.ReadDma(out readBuf, out errorLba, true, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadDmaRetryLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadDmaRetryLbaData = readBuf; - DicConsole.WriteLine("Trying SEEK in LBA mode..."); + AaruConsole.WriteLine("Trying SEEK in LBA mode..."); sense = _dev.Seek(out errorLba, 0, _dev.Timeout, out _); mediaTest.SupportsSeekLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, errorChs.Status, errorChs.Error); - DicConsole.WriteLine("Trying READ SECTOR(S) in LBA48 mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in LBA48 mode..."); sense = _dev.Read(out readBuf, out AtaErrorRegistersLba48 errorLba48, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadLba48 = !sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadLba48Data = readBuf; - DicConsole.WriteLine("Trying READ DMA in LBA48 mode..."); + AaruConsole.WriteLine("Trying READ DMA in LBA48 mode..."); sense = _dev.ReadDma(out readBuf, out errorLba48, 0, 1, _dev.Timeout, out _); mediaTest.SupportsReadDmaLba48 = !sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); @@ -330,7 +330,7 @@ namespace Aaru.Core.Devices.Report mediaTest.LongBlockSize = ataId.UnformattedBPS; } - DicConsole.WriteLine("Trying READ LONG in CHS mode..."); + AaruConsole.WriteLine("Trying READ LONG in CHS mode..."); sense = _dev.ReadLong(out readBuf, out errorChs, false, 0, 0, 1, mediaTest.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -339,13 +339,13 @@ namespace Aaru.Core.Devices.Report readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadLongData = readBuf; - DicConsole.WriteLine("Trying READ LONG RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ LONG RETRY in CHS mode..."); sense = _dev.ReadLong(out readBuf, out errorChs, true, 0, 0, 1, mediaTest.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -355,13 +355,13 @@ namespace Aaru.Core.Devices.Report BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadLongRetryData = readBuf; - DicConsole.WriteLine("Trying READ LONG in LBA mode..."); + AaruConsole.WriteLine("Trying READ LONG in LBA mode..."); sense = _dev.ReadLong(out readBuf, out errorLba, false, 0, mediaTest.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -370,13 +370,13 @@ namespace Aaru.Core.Devices.Report readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); mediaTest.ReadLongLbaData = readBuf; - DicConsole.WriteLine("Trying READ LONG RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ LONG RETRY in LBA mode..."); sense = _dev.ReadLong(out readBuf, out errorLba, true, 0, mediaTest.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -385,7 +385,7 @@ namespace Aaru.Core.Devices.Report errorLba.Error == 0 && readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); @@ -514,7 +514,7 @@ namespace Aaru.Core.Devices.Report ulong checkCorrectRead = 0; bool sense; - DicConsole.WriteLine("Trying READ SECTOR(S) in CHS mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in CHS mode..."); sense = _dev.Read(out byte[] readBuf, out AtaErrorRegistersChs errorChs, false, 0, 0, 1, 1, _dev.Timeout, out _); @@ -522,120 +522,120 @@ namespace Aaru.Core.Devices.Report capabilities.SupportsReadSectors = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadSectorsData = readBuf; - DicConsole.WriteLine("Trying READ SECTOR(S) RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) RETRY in CHS mode..."); sense = _dev.Read(out readBuf, out errorChs, true, 0, 0, 1, 1, _dev.Timeout, out _); capabilities.SupportsReadRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadSectorsRetryData = readBuf; - DicConsole.WriteLine("Trying READ DMA in CHS mode..."); + AaruConsole.WriteLine("Trying READ DMA in CHS mode..."); sense = _dev.ReadDma(out readBuf, out errorChs, false, 0, 0, 1, 1, _dev.Timeout, out _); capabilities.SupportsReadDma = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadDmaData = readBuf; - DicConsole.WriteLine("Trying READ DMA RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ DMA RETRY in CHS mode..."); sense = _dev.ReadDma(out readBuf, out errorChs, true, 0, 0, 1, 1, _dev.Timeout, out _); capabilities.SupportsReadDmaRetry = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadDmaRetryData = readBuf; - DicConsole.WriteLine("Trying SEEK in CHS mode..."); + AaruConsole.WriteLine("Trying SEEK in CHS mode..."); sense = _dev.Seek(out errorChs, 0, 0, 1, _dev.Timeout, out _); capabilities.SupportsSeek = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, errorChs.Status, errorChs.Error); - DicConsole.WriteLine("Trying READ SECTOR(S) in LBA mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in LBA mode..."); sense = _dev.Read(out readBuf, out AtaErrorRegistersLba28 errorLba, false, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadLbaData = readBuf; - DicConsole.WriteLine("Trying READ SECTOR(S) RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) RETRY in LBA mode..."); sense = _dev.Read(out readBuf, out errorLba, true, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadRetryLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadRetryLbaData = readBuf; - DicConsole.WriteLine("Trying READ DMA in LBA mode..."); + AaruConsole.WriteLine("Trying READ DMA in LBA mode..."); sense = _dev.ReadDma(out readBuf, out errorLba, false, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadDmaLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadDmaLbaData = readBuf; - DicConsole.WriteLine("Trying READ DMA RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ DMA RETRY in LBA mode..."); sense = _dev.ReadDma(out readBuf, out errorLba, true, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadDmaRetryLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadDmaRetryLbaData = readBuf; - DicConsole.WriteLine("Trying SEEK in LBA mode..."); + AaruConsole.WriteLine("Trying SEEK in LBA mode..."); sense = _dev.Seek(out errorLba, 0, _dev.Timeout, out _); capabilities.SupportsSeekLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}", sense, errorLba.Status, errorLba.Error); - DicConsole.WriteLine("Trying READ SECTOR(S) in LBA48 mode..."); + AaruConsole.WriteLine("Trying READ SECTOR(S) in LBA48 mode..."); sense = _dev.Read(out readBuf, out AtaErrorRegistersLba48 errorLba48, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadLba48 = !sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba48.Status, errorLba48.Error, readBuf.Length); capabilities.ReadLba48Data = readBuf; - DicConsole.WriteLine("Trying READ DMA in LBA48 mode..."); + AaruConsole.WriteLine("Trying READ DMA in LBA48 mode..."); sense = _dev.ReadDma(out readBuf, out errorLba48, 0, 1, _dev.Timeout, out _); capabilities.SupportsReadDmaLba48 = !sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba48.Status, errorLba48.Error, readBuf.Length); capabilities.ReadDmaLba48Data = readBuf; @@ -660,7 +660,7 @@ namespace Aaru.Core.Devices.Report capabilities.LongBlockSize = ataId.UnformattedBPS; } - DicConsole.WriteLine("Trying READ LONG in CHS mode..."); + AaruConsole.WriteLine("Trying READ LONG in CHS mode..."); sense = _dev.ReadLong(out readBuf, out errorChs, false, 0, 0, 1, capabilities.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -670,12 +670,12 @@ namespace Aaru.Core.Devices.Report readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadLongData = readBuf; - DicConsole.WriteLine("Trying READ LONG RETRY in CHS mode..."); + AaruConsole.WriteLine("Trying READ LONG RETRY in CHS mode..."); sense = _dev.ReadLong(out readBuf, out errorChs, true, 0, 0, 1, capabilities.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -685,12 +685,12 @@ namespace Aaru.Core.Devices.Report BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorChs.Status, errorChs.Error, readBuf.Length); capabilities.ReadLongRetryData = readBuf; - DicConsole.WriteLine("Trying READ LONG in LBA mode..."); + AaruConsole.WriteLine("Trying READ LONG in LBA mode..."); sense = _dev.ReadLong(out readBuf, out errorLba, false, 0, capabilities.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -699,12 +699,12 @@ namespace Aaru.Core.Devices.Report readBuf.Length > 0 && BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadLongLbaData = readBuf; - DicConsole.WriteLine("Trying READ LONG RETRY in LBA mode..."); + AaruConsole.WriteLine("Trying READ LONG RETRY in LBA mode..."); sense = _dev.ReadLong(out readBuf, out errorLba, true, 0, capabilities.LongBlockSize ?? 0, _dev.Timeout, out _); @@ -714,7 +714,7 @@ namespace Aaru.Core.Devices.Report BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead; - DicConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", + AaruConsole.DebugWriteLine("ATA Report", "Sense = {0}, Status = 0x{1:X2}, Error = 0x{2:X2}, Length = {3}", sense, errorLba.Status, errorLba.Error, readBuf.Length); capabilities.ReadLongRetryLbaData = readBuf; diff --git a/Aaru.Core/Devices/Report/MMC.cs b/Aaru.Core/Devices/Report/MMC.cs index e91f86ed5..6bb691ece 100644 --- a/Aaru.Core/Devices/Report/MMC.cs +++ b/Aaru.Core/Devices/Report/MMC.cs @@ -72,7 +72,7 @@ namespace Aaru.Core.Devices.Report public MmcFeatures ReportMmcFeatures() { - DicConsole.WriteLine("Querying MMC GET CONFIGURATION..."); + AaruConsole.WriteLine("Querying MMC GET CONFIGURATION..."); bool sense = _dev.GetConfiguration(out byte[] buffer, out _, _dev.Timeout, out _); if(sense) @@ -576,7 +576,7 @@ namespace Aaru.Core.Devices.Report { var mediaTest = new TestedMedia(); - DicConsole.WriteLine("Querying SCSI READ CAPACITY..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY..."); bool sense = _dev.ReadCapacity(out byte[] buffer, out byte[] senseBuffer, _dev.Timeout, out _); if(!sense && @@ -589,7 +589,7 @@ namespace Aaru.Core.Devices.Report mediaTest.BlockSize = (uint)((buffer[5] << 24) + (buffer[5] << 16) + (buffer[6] << 8) + buffer[7]); } - DicConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); sense = _dev.ReadCapacity16(out buffer, out buffer, _dev.Timeout, out _); if(!sense && @@ -605,7 +605,7 @@ namespace Aaru.Core.Devices.Report Modes.DecodedMode? decMode = null; - DicConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); sense = _dev.ModeSense10(out buffer, out senseBuffer, false, true, ScsiModeSensePageControl.Current, 0x3F, 0x00, _dev.Timeout, out _); @@ -618,7 +618,7 @@ namespace Aaru.Core.Devices.Report mediaTest.ModeSense10Data = buffer; } - DicConsole.WriteLine("Querying SCSI MODE SENSE..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE..."); sense = _dev.ModeSense(out buffer, out senseBuffer, _dev.Timeout, out _); if(!sense && @@ -643,18 +643,18 @@ namespace Aaru.Core.Devices.Report mediaType.StartsWith("DDCD-", StringComparison.Ordinal) || mediaType == "Audio CD") { - DicConsole.WriteLine("Querying CD TOC..."); + AaruConsole.WriteLine("Querying CD TOC..."); mediaTest.CanReadTOC = !_dev.ReadTocPmaAtip(out buffer, out senseBuffer, false, 0, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadTOC); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadTOC); mediaTest.TocData = buffer; - DicConsole.WriteLine("Querying CD Full TOC..."); + AaruConsole.WriteLine("Querying CD Full TOC..."); mediaTest.CanReadFullTOC = !_dev.ReadRawToc(out buffer, out senseBuffer, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadFullTOC); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadFullTOC); mediaTest.FullTocData = buffer; } @@ -662,15 +662,15 @@ namespace Aaru.Core.Devices.Report if(mediaType.StartsWith("CD-R", StringComparison.Ordinal) || mediaType.StartsWith("DDCD-R", StringComparison.Ordinal)) { - DicConsole.WriteLine("Querying CD ATIP..."); + AaruConsole.WriteLine("Querying CD ATIP..."); mediaTest.CanReadATIP = !_dev.ReadAtip(out buffer, out senseBuffer, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadATIP); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadATIP); mediaTest.AtipData = buffer; - DicConsole.WriteLine("Querying CD PMA..."); + AaruConsole.WriteLine("Querying CD PMA..."); mediaTest.CanReadPMA = !_dev.ReadPma(out buffer, out senseBuffer, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPMA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPMA); mediaTest.PmaData = buffer; } @@ -679,39 +679,39 @@ namespace Aaru.Core.Devices.Report mediaType.StartsWith("HD DVD-", StringComparison.Ordinal) || mediaType.StartsWith("PD-", StringComparison.Ordinal)) { - DicConsole.WriteLine("Querying DVD PFI..."); + AaruConsole.WriteLine("Querying DVD PFI..."); mediaTest.CanReadPFI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.PhysicalInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPFI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPFI); mediaTest.PfiData = buffer; - DicConsole.WriteLine("Querying DVD DMI..."); + AaruConsole.WriteLine("Querying DVD DMI..."); mediaTest.CanReadDMI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.DiscManufacturingInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDMI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDMI); mediaTest.DmiData = buffer; } if(mediaType == "DVD-ROM") { - DicConsole.WriteLine("Querying DVD CMI..."); + AaruConsole.WriteLine("Querying DVD CMI..."); mediaTest.CanReadCMI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.CopyrightInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCMI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCMI); mediaTest.CmiData = buffer; } @@ -720,39 +720,39 @@ namespace Aaru.Core.Devices.Report { case"DVD-ROM": case"HD DVD-ROM": - DicConsole.WriteLine("Querying DVD BCA..."); + AaruConsole.WriteLine("Querying DVD BCA..."); mediaTest.CanReadBCA = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.BurstCuttingArea, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); mediaTest.DvdBcaData = buffer; - DicConsole.WriteLine("Querying DVD AACS..."); + AaruConsole.WriteLine("Querying DVD AACS..."); mediaTest.CanReadAACS = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.DvdAacs, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadAACS); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadAACS); mediaTest.DvdAacsData = buffer; break; case"Nintendo GameCube game": case"Nintendo Wii game": - DicConsole.WriteLine("Querying DVD BCA..."); + AaruConsole.WriteLine("Querying DVD BCA..."); mediaTest.CanReadBCA = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.BurstCuttingArea, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); mediaTest.DvdBcaData = buffer; @@ -763,14 +763,14 @@ namespace Aaru.Core.Devices.Report case"PlayStation 4 game": case"Xbox One game": case"Nintendo Wii U game": - DicConsole.WriteLine("Querying BD BCA..."); + AaruConsole.WriteLine("Querying BD BCA..."); mediaTest.CanReadBCA = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0, MmcDiscStructureFormat.BdBurstCuttingArea, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadBCA); mediaTest.BluBcaData = buffer; @@ -784,7 +784,7 @@ namespace Aaru.Core.Devices.Report MmcDiscStructureFormat.DvdramDds, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS); mediaTest.DvdDdsData = buffer; @@ -793,7 +793,7 @@ namespace Aaru.Core.Devices.Report MmcDiscStructureFormat.DvdramSpareAreaInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadSpareAreaInformation); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadSpareAreaInformation); mediaTest.DvdSaiData = buffer; @@ -803,23 +803,23 @@ namespace Aaru.Core.Devices.Report if(mediaType.StartsWith("BD-R", StringComparison.Ordinal) && mediaType != "BD-ROM") { - DicConsole.WriteLine("Querying BD DDS..."); + AaruConsole.WriteLine("Querying BD DDS..."); mediaTest.CanReadDDS = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0, MmcDiscStructureFormat.BdDds, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDDS); mediaTest.BluDdsData = buffer; - DicConsole.WriteLine("Querying BD SAI..."); + AaruConsole.WriteLine("Querying BD SAI..."); mediaTest.CanReadSpareAreaInformation = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0, MmcDiscStructureFormat.BdSpareAreaInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadSpareAreaInformation); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadSpareAreaInformation); mediaTest.BluSaiData = buffer; } @@ -827,14 +827,14 @@ namespace Aaru.Core.Devices.Report if(mediaType == "DVD-R" || mediaType == "DVD-RW") { - DicConsole.WriteLine("Querying DVD PRI..."); + AaruConsole.WriteLine("Querying DVD PRI..."); mediaTest.CanReadPRI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.PreRecordedInfo, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPRI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPRI); mediaTest.PriData = buffer; } @@ -843,22 +843,22 @@ namespace Aaru.Core.Devices.Report mediaType == "DVD-RW" || mediaType == "HD DVD-R") { - DicConsole.WriteLine("Querying DVD Media ID..."); + AaruConsole.WriteLine("Querying DVD Media ID..."); mediaTest.CanReadMediaID = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.DvdrMediaIdentifier, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadMediaID); - DicConsole.WriteLine("Querying DVD Embossed PFI..."); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadMediaID); + AaruConsole.WriteLine("Querying DVD Embossed PFI..."); mediaTest.CanReadRecordablePFI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.DvdrPhysicalInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRecordablePFI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRecordablePFI); mediaTest.EmbossedPfiData = buffer; } @@ -866,51 +866,51 @@ namespace Aaru.Core.Devices.Report if(mediaType.StartsWith("DVD+R", StringComparison.Ordinal) || mediaType == "DVD+MRW") { - DicConsole.WriteLine("Querying DVD ADIP..."); + AaruConsole.WriteLine("Querying DVD ADIP..."); mediaTest.CanReadADIP = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.Adip, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadADIP); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadADIP); mediaTest.AdipData = buffer; - DicConsole.WriteLine("Querying DVD DCB..."); + AaruConsole.WriteLine("Querying DVD DCB..."); mediaTest.CanReadDCB = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.Dcb, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDCB); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDCB); mediaTest.DcbData = buffer; } if(mediaType == "HD DVD-ROM") { - DicConsole.WriteLine("Querying HD DVD CMI..."); + AaruConsole.WriteLine("Querying HD DVD CMI..."); mediaTest.CanReadHDCMI = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.HddvdCopyrightInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadHDCMI); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadHDCMI); mediaTest.HdCmiData = buffer; } if(mediaType.EndsWith(" DL", StringComparison.Ordinal)) { - DicConsole.WriteLine("Querying DVD Layer Capacity..."); + AaruConsole.WriteLine("Querying DVD Layer Capacity..."); mediaTest.CanReadLayerCapacity = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Dvd, 0, 0, MmcDiscStructureFormat.DvdrLayerCapacity, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLayerCapacity); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLayerCapacity); mediaTest.DvdLayerData = buffer; } @@ -922,31 +922,31 @@ namespace Aaru.Core.Devices.Report mediaType == "Xbox One game" || mediaType == "Nintendo Wii game") { - DicConsole.WriteLine("Querying BD Disc Information..."); + AaruConsole.WriteLine("Querying BD Disc Information..."); mediaTest.CanReadDiscInformation = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0, MmcDiscStructureFormat.DiscInformation, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDiscInformation); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadDiscInformation); mediaTest.BluDiData = buffer; - DicConsole.WriteLine("Querying BD PAC..."); + AaruConsole.WriteLine("Querying BD PAC..."); mediaTest.CanReadPAC = !_dev.ReadDiscStructure(out buffer, out senseBuffer, MmcDiscStructureMediaType.Bd, 0, 0, MmcDiscStructureFormat.Pac, 0, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPAC); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPAC); mediaTest.BluPacData = buffer; } if(mediaType.StartsWith("CD-", StringComparison.Ordinal)) { - DicConsole.WriteLine("Trying SCSI READ CD scrambled..."); + AaruConsole.WriteLine("Trying SCSI READ CD scrambled..."); mediaTest.CanReadCdScrambled = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2352, 1, MmcSectorTypes.Cdda, false, false, false, @@ -958,71 +958,71 @@ namespace Aaru.Core.Devices.Report if(mediaType.StartsWith("PD-", StringComparison.Ordinal)) { - DicConsole.WriteLine("Trying SCSI READ (6)..."); + AaruConsole.WriteLine("Trying SCSI READ (6)..."); mediaTest.SupportsRead6 = !_dev.Read6(out buffer, out senseBuffer, 16, 512, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); mediaTest.Read6Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (10)..."); + AaruConsole.WriteLine("Trying SCSI READ (10)..."); mediaTest.SupportsRead10 = !_dev.Read10(out buffer, out senseBuffer, 0, false, true, false, false, 16, 512, 0, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); mediaTest.Read10Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (12)..."); + AaruConsole.WriteLine("Trying SCSI READ (12)..."); mediaTest.SupportsRead12 = !_dev.Read12(out buffer, out senseBuffer, 0, false, true, false, false, 16, 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); mediaTest.Read12Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (16)..."); + AaruConsole.WriteLine("Trying SCSI READ (16)..."); mediaTest.SupportsRead16 = !_dev.Read16(out buffer, out senseBuffer, 0, false, true, false, 16, 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); mediaTest.Read16Data = buffer; } else { - DicConsole.WriteLine("Trying SCSI READ (6)..."); + AaruConsole.WriteLine("Trying SCSI READ (6)..."); mediaTest.SupportsRead6 = !_dev.Read6(out buffer, out senseBuffer, 16, 2048, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); mediaTest.Read6Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (10)..."); + AaruConsole.WriteLine("Trying SCSI READ (10)..."); mediaTest.SupportsRead10 = !_dev.Read10(out buffer, out senseBuffer, 0, false, true, false, false, 16, 2048, 0, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); mediaTest.Read10Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (12)..."); + AaruConsole.WriteLine("Trying SCSI READ (12)..."); mediaTest.SupportsRead12 = !_dev.Read12(out buffer, out senseBuffer, 0, false, true, false, false, 16, 2048, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); mediaTest.Read12Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (16)..."); + AaruConsole.WriteLine("Trying SCSI READ (16)..."); mediaTest.SupportsRead16 = !_dev.Read16(out buffer, out senseBuffer, 0, false, true, false, 16, 2048, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); mediaTest.Read16Data = buffer; } @@ -1033,53 +1033,53 @@ namespace Aaru.Core.Devices.Report { if(mediaType == "Audio CD") { - DicConsole.WriteLine("Trying SCSI READ CD..."); + AaruConsole.WriteLine("Trying SCSI READ CD..."); mediaTest.SupportsReadCd = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2352, 1, MmcSectorTypes.Cdda, false, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd); mediaTest.ReadCdFullData = buffer; - DicConsole.WriteLine("Trying SCSI READ CD MSF..."); + AaruConsole.WriteLine("Trying SCSI READ CD MSF..."); mediaTest.SupportsReadCdMsf = !_dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000210, 0x00000211, 2352, MmcSectorTypes.Cdda, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf); mediaTest.ReadCdMsfFullData = buffer; } else { - DicConsole.WriteLine("Trying SCSI READ CD..."); + AaruConsole.WriteLine("Trying SCSI READ CD..."); mediaTest.SupportsReadCd = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2048, 1, MmcSectorTypes.AllTypes, false, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCd); mediaTest.ReadCdData = buffer; - DicConsole.WriteLine("Trying SCSI READ CD MSF..."); + AaruConsole.WriteLine("Trying SCSI READ CD MSF..."); mediaTest.SupportsReadCdMsf = !_dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000210, 0x00000211, 2048, MmcSectorTypes.AllTypes, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsf); mediaTest.ReadCdMsfData = buffer; - DicConsole.WriteLine("Trying SCSI READ CD full sector..."); + AaruConsole.WriteLine("Trying SCSI READ CD full sector..."); mediaTest.SupportsReadCdRaw = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2352, 1, MmcSectorTypes.AllTypes, false, false, true, @@ -1087,11 +1087,11 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdRaw); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdRaw); mediaTest.ReadCdFullData = buffer; - DicConsole.WriteLine("Trying SCSI READ CD MSF full sector..."); + AaruConsole.WriteLine("Trying SCSI READ CD MSF full sector..."); mediaTest.SupportsReadCdMsfRaw = !_dev.ReadCdMsf(out buffer, out senseBuffer, 0x00000210, 0x00000211, 2352, MmcSectorTypes.AllTypes, false, @@ -1099,7 +1099,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsfRaw); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsReadCdMsfRaw); mediaTest.ReadCdMsfFullData = buffer; } @@ -1107,7 +1107,7 @@ namespace Aaru.Core.Devices.Report if(mediaTest.SupportsReadCdRaw == true || mediaType == "Audio CD") { - DicConsole.WriteLine("Trying to read CD Track 1 pre-gap..."); + AaruConsole.WriteLine("Trying to read CD Track 1 pre-gap..."); for(int i = -150; i < 0; i++) { @@ -1120,7 +1120,7 @@ namespace Aaru.Core.Devices.Report false, false, true, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", sense); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", sense); mediaTest.Track1PregapData = buffer; @@ -1132,7 +1132,7 @@ namespace Aaru.Core.Devices.Report break; } - DicConsole.WriteLine("Trying to read CD Lead-In..."); + AaruConsole.WriteLine("Trying to read CD Lead-In..."); foreach(int i in new[] { @@ -1148,7 +1148,7 @@ namespace Aaru.Core.Devices.Report false, false, true, MmcHeaderCodes.AllHeaders, true, true, MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", sense); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", sense); mediaTest.LeadInData = buffer; @@ -1160,7 +1160,7 @@ namespace Aaru.Core.Devices.Report break; } - DicConsole.WriteLine("Trying to read CD Lead-Out..."); + AaruConsole.WriteLine("Trying to read CD Lead-Out..."); if(mediaType == "Audio CD") mediaTest.CanReadLeadOut = !_dev.ReadCd(out buffer, out senseBuffer, @@ -1176,14 +1176,14 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLeadOut); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadLeadOut); mediaTest.LeadOutData = buffer; } if(mediaType == "Audio CD") { - DicConsole.WriteLine("Trying to read C2 Pointers..."); + AaruConsole.WriteLine("Trying to read C2 Pointers..."); mediaTest.CanReadC2Pointers = !_dev.ReadCd(out buffer, out senseBuffer, 0, 2646, 1, MmcSectorTypes.Cdda, false, false, false, @@ -1198,18 +1198,18 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); mediaTest.C2PointersData = buffer; - DicConsole.WriteLine("Trying to read subchannels..."); + AaruConsole.WriteLine("Trying to read subchannels..."); mediaTest.CanReadPQSubchannel = !_dev.ReadCd(out buffer, out senseBuffer, 0, 2368, 1, MmcSectorTypes.Cdda, false, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); mediaTest.PQSubchannelData = buffer; @@ -1218,7 +1218,7 @@ namespace Aaru.Core.Devices.Report MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); mediaTest.RWSubchannelData = buffer; @@ -1228,11 +1228,11 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); mediaTest.CorrectedSubchannelData = buffer; - DicConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); + AaruConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); mediaTest.CanReadPQSubchannelWithC2 = !_dev.ReadCd(out buffer, out senseBuffer, 0, 2662, 1, MmcSectorTypes.Cdda, false, false, false, @@ -1247,7 +1247,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); mediaTest.PQSubchannelWithC2Data = buffer; @@ -1264,7 +1264,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); mediaTest.RWSubchannelWithC2Data = buffer; @@ -1283,14 +1283,14 @@ namespace Aaru.Core.Devices.Report MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannelWithC2); mediaTest.CorrectedSubchannelWithC2Data = buffer; } else if(mediaTest.SupportsReadCdRaw == true) { - DicConsole.WriteLine("Trying to read C2 Pointers..."); + AaruConsole.WriteLine("Trying to read C2 Pointers..."); mediaTest.CanReadC2Pointers = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2646, 1, MmcSectorTypes.AllTypes, false, false, true, @@ -1305,11 +1305,11 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); mediaTest.C2PointersData = buffer; - DicConsole.WriteLine("Trying to read subchannels..."); + AaruConsole.WriteLine("Trying to read subchannels..."); mediaTest.CanReadPQSubchannel = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2368, 1, MmcSectorTypes.AllTypes, false, false, true, @@ -1317,7 +1317,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); mediaTest.PQSubchannelData = buffer; @@ -1327,7 +1327,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); mediaTest.RWSubchannelData = buffer; @@ -1337,11 +1337,11 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); mediaTest.CorrectedSubchannelData = buffer; - DicConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); + AaruConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); mediaTest.CanReadPQSubchannelWithC2 = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2662, 1, MmcSectorTypes.AllTypes, false, false, true, @@ -1356,7 +1356,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); mediaTest.PQSubchannelWithC2Data = buffer; @@ -1373,7 +1373,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); mediaTest.RWSubchannelWithC2Data = buffer; @@ -1392,14 +1392,14 @@ namespace Aaru.Core.Devices.Report MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannelWithC2); mediaTest.CorrectedSubchannelWithC2Data = buffer; } else { - DicConsole.WriteLine("Trying to read C2 Pointers..."); + AaruConsole.WriteLine("Trying to read C2 Pointers..."); mediaTest.CanReadC2Pointers = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2342, 1, MmcSectorTypes.AllTypes, false, false, false, @@ -1414,18 +1414,18 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadC2Pointers); mediaTest.C2PointersData = buffer; - DicConsole.WriteLine("Trying to read subchannels..."); + AaruConsole.WriteLine("Trying to read subchannels..."); mediaTest.CanReadPQSubchannel = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2064, 1, MmcSectorTypes.AllTypes, false, false, false, MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannel); mediaTest.PQSubchannelData = buffer; @@ -1434,7 +1434,7 @@ namespace Aaru.Core.Devices.Report MmcHeaderCodes.None, true, false, MmcErrorField.None, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannel); mediaTest.RWSubchannelData = buffer; @@ -1444,11 +1444,11 @@ namespace Aaru.Core.Devices.Report MmcErrorField.None, MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannel); mediaTest.CorrectedSubchannelData = buffer; - DicConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); + AaruConsole.WriteLine("Trying to read subchannels with C2 Pointers..."); mediaTest.CanReadPQSubchannelWithC2 = !_dev.ReadCd(out buffer, out senseBuffer, 16, 2358, 1, MmcSectorTypes.AllTypes, false, false, false, @@ -1463,7 +1463,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Q16, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadPQSubchannelWithC2); mediaTest.PQSubchannelWithC2Data = buffer; @@ -1480,7 +1480,7 @@ namespace Aaru.Core.Devices.Report MmcErrorField.C2PointersAndBlock, MmcSubchannel.Raw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadRWSubchannelWithC2); mediaTest.RWSubchannelWithC2Data = buffer; @@ -1499,7 +1499,7 @@ namespace Aaru.Core.Devices.Report MmcSubchannel.Rw, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadCorrectedSubchannelWithC2); mediaTest.CorrectedSubchannelWithC2Data = buffer; @@ -1507,55 +1507,55 @@ namespace Aaru.Core.Devices.Report if(tryPlextor) { - DicConsole.WriteLine("Trying Plextor READ CD-DA..."); + AaruConsole.WriteLine("Trying Plextor READ CD-DA..."); mediaTest.SupportsPlextorReadCDDA = !_dev.PlextorReadCdDa(out buffer, out senseBuffer, 16, 2352, 1, PlextorSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPlextorReadCDDA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPlextorReadCDDA); mediaTest.PlextorReadCddaData = buffer; } if(tryPioneer) { - DicConsole.WriteLine("Trying Pioneer READ CD-DA..."); + AaruConsole.WriteLine("Trying Pioneer READ CD-DA..."); mediaTest.SupportsPioneerReadCDDA = !_dev.PioneerReadCdDa(out buffer, out senseBuffer, 16, 2352, 1, PioneerSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPioneerReadCDDA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPioneerReadCDDA); mediaTest.PioneerReadCddaData = buffer; - DicConsole.WriteLine("Trying Pioneer READ CD-DA MSF..."); + AaruConsole.WriteLine("Trying Pioneer READ CD-DA MSF..."); mediaTest.SupportsPioneerReadCDDAMSF = !_dev.PioneerReadCdDaMsf(out buffer, out senseBuffer, 0x00000210, 0x00000211, 2352, PioneerSubchannel.None, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPioneerReadCDDAMSF); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPioneerReadCDDAMSF); mediaTest.PioneerReadCddaMsfData = buffer; } if(tryNec) { - DicConsole.WriteLine("Trying NEC READ CD-DA..."); + AaruConsole.WriteLine("Trying NEC READ CD-DA..."); mediaTest.SupportsNECReadCDDA = !_dev.NecReadCdDa(out buffer, out senseBuffer, 16, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsNECReadCDDA); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsNECReadCDDA); mediaTest.NecReadCddaData = buffer; } } mediaTest.LongBlockSize = mediaTest.BlockSize; - DicConsole.WriteLine("Trying SCSI READ LONG (10)..."); + AaruConsole.WriteLine("Trying SCSI READ LONG (10)..."); sense = _dev.ReadLong10(out buffer, out senseBuffer, false, false, 16, 0xFFFF, _dev.Timeout, out _); if(sense && !_dev.Error) @@ -1592,12 +1592,12 @@ namespace Aaru.Core.Devices.Report if(tryPlextor) { - DicConsole.WriteLine("Trying Plextor trick to raw read DVDs..."); + AaruConsole.WriteLine("Trying Plextor trick to raw read DVDs..."); mediaTest.SupportsPlextorReadRawDVD = !_dev.PlextorReadRawDvd(out buffer, out senseBuffer, 16, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPlextorReadRawDVD); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsPlextorReadRawDVD); if(mediaTest.SupportsPlextorReadRawDVD == true) mediaTest.SupportsPlextorReadRawDVD = !ArrayHelpers.ArrayIsNullOrEmpty(buffer); @@ -1609,12 +1609,12 @@ namespace Aaru.Core.Devices.Report if(!tryHldtst) return mediaTest; - DicConsole.WriteLine("Trying HL-DT-ST (aka LG) trick to raw read DVDs..."); + AaruConsole.WriteLine("Trying HL-DT-ST (aka LG) trick to raw read DVDs..."); mediaTest.SupportsHLDTSTReadRawDVD = !_dev.HlDtStReadRawDvd(out buffer, out senseBuffer, 16, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsHLDTSTReadRawDVD); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsHLDTSTReadRawDVD); if(mediaTest.SupportsHLDTSTReadRawDVD == true) mediaTest.SupportsHLDTSTReadRawDVD = !ArrayHelpers.ArrayIsNullOrEmpty(buffer); @@ -1625,9 +1625,9 @@ namespace Aaru.Core.Devices.Report // This is for checking multi-session support, and inter-session lead-in/out reading, as Enhanced CD are if(mediaType == "Enhanced CD (aka E-CD, CD-Plus or CD+)") { - DicConsole.WriteLine("Querying CD Full TOC..."); + AaruConsole.WriteLine("Querying CD Full TOC..."); mediaTest.CanReadFullTOC = !_dev.ReadRawToc(out buffer, out senseBuffer, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadFullTOC); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadFullTOC); mediaTest.FullTocData = buffer; @@ -1643,7 +1643,7 @@ namespace Aaru.Core.Devices.Report if(!decodedToc.TrackDescriptors.Any(t => t.SessionNumber > 1)) { - DicConsole. + AaruConsole. ErrorWriteLine("Could not find second session. Have you inserted the correct type of disc?"); return null; @@ -1658,18 +1658,18 @@ namespace Aaru.Core.Devices.Report if(firstSessionLeadOutTrack.SessionNumber == 0 || secondSessionFirstTrack.SessionNumber == 0) { - DicConsole. + AaruConsole. ErrorWriteLine("Could not find second session. Have you inserted the correct type of disc?"); return null; } - DicConsole.DebugWriteLine("SCSI Report", + AaruConsole.DebugWriteLine("SCSI Report", "First session Lead-Out starts at {0:D2}:{1:D2}:{2:D2}", firstSessionLeadOutTrack.PMIN, firstSessionLeadOutTrack.PSEC, firstSessionLeadOutTrack.PFRAME); - DicConsole.DebugWriteLine("SCSI Report", "Second session starts at {0:D2}:{1:D2}:{2:D2}", + AaruConsole.DebugWriteLine("SCSI Report", "Second session starts at {0:D2}:{1:D2}:{2:D2}", secondSessionFirstTrack.PMIN, secondSessionFirstTrack.PSEC, secondSessionFirstTrack.PFRAME); @@ -1683,7 +1683,7 @@ namespace Aaru.Core.Devices.Report (secondSessionFirstTrack.PSEC * 75) + secondSessionFirstTrack.PFRAME) - 300); - DicConsole.WriteLine("Trying SCSI READ CD in first session Lead-Out..."); + AaruConsole.WriteLine("Trying SCSI READ CD in first session Lead-Out..."); mediaTest.CanReadingIntersessionLeadOut = !_dev.ReadCd(out buffer, out senseBuffer, firstSessionLeadOutLba, 2448, 1, @@ -1714,12 +1714,12 @@ namespace Aaru.Core.Devices.Report out _); } - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadingIntersessionLeadOut); mediaTest.IntersessionLeadOutData = buffer; - DicConsole.WriteLine("Trying SCSI READ CD in second session Lead-In..."); + AaruConsole.WriteLine("Trying SCSI READ CD in second session Lead-In..."); mediaTest.CanReadingIntersessionLeadIn = !_dev.ReadCd(out buffer, out senseBuffer, secondSessionLeadInLba, 2448, 1, @@ -1749,7 +1749,7 @@ namespace Aaru.Core.Devices.Report out _); } - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.CanReadingIntersessionLeadIn); mediaTest.IntersessionLeadInData = buffer; diff --git a/Aaru.Core/Devices/Report/SSC.cs b/Aaru.Core/Devices/Report/SSC.cs index 241a80336..b65587e65 100644 --- a/Aaru.Core/Devices/Report/SSC.cs +++ b/Aaru.Core/Devices/Report/SSC.cs @@ -44,7 +44,7 @@ namespace Aaru.Core.Devices.Report public Ssc ReportScsiSsc() { var report = new Ssc(); - DicConsole.WriteLine("Querying SCSI READ BLOCK LIMITS..."); + AaruConsole.WriteLine("Querying SCSI READ BLOCK LIMITS..."); bool sense = _dev.ReadBlockLimits(out byte[] buffer, out byte[] _, _dev.Timeout, out _); if(!sense) @@ -64,7 +64,7 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT..."); + AaruConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT..."); sense = _dev.ReportDensitySupport(out buffer, out byte[] _, false, false, _dev.Timeout, out _); if(!sense) @@ -94,7 +94,7 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for medium types..."); + AaruConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for medium types..."); sense = _dev.ReportDensitySupport(out buffer, out byte[] _, true, false, _dev.Timeout, out _); if(sense) @@ -141,7 +141,7 @@ namespace Aaru.Core.Devices.Report Modes.DecodedMode? decMode = null; - DicConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); bool sense = _dev.ModeSense10(out byte[] buffer, out byte[] _, false, true, ScsiModeSensePageControl.Current, 0x3F, 0x00, _dev.Timeout, out _); @@ -153,7 +153,7 @@ namespace Aaru.Core.Devices.Report seqTest.ModeSense10Data = buffer; } - DicConsole.WriteLine("Querying SCSI MODE SENSE..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE..."); sense = _dev.ModeSense(out buffer, out byte[] _, _dev.Timeout, out _); if(!sense && @@ -174,7 +174,7 @@ namespace Aaru.Core.Devices.Report seqTest.Density = (byte)decMode.Value.Header.BlockDescriptors[0].Density; } - DicConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for current media..."); + AaruConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for current media..."); sense = _dev.ReportDensitySupport(out buffer, out byte[] _, false, true, _dev.Timeout, out _); if(!sense) @@ -204,7 +204,7 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for medium types for current media..."); + AaruConsole.WriteLine("Querying SCSI REPORT DENSITY SUPPORT for medium types for current media..."); sense = _dev.ReportDensitySupport(out buffer, out byte[] _, true, true, _dev.Timeout, out _); if(!sense) @@ -244,7 +244,7 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Trying SCSI READ MEDIA SERIAL NUMBER..."); + AaruConsole.WriteLine("Trying SCSI READ MEDIA SERIAL NUMBER..."); seqTest.CanReadMediaSerial = !_dev.ReadMediaSerialNumber(out buffer, out byte[] _, _dev.Timeout, out _); return seqTest; diff --git a/Aaru.Core/Devices/Report/Scsi.cs b/Aaru.Core/Devices/Report/Scsi.cs index 05ad4e2c6..795e4f53d 100644 --- a/Aaru.Core/Devices/Report/Scsi.cs +++ b/Aaru.Core/Devices/Report/Scsi.cs @@ -46,7 +46,7 @@ namespace Aaru.Core.Devices.Report { public Scsi ReportScsiInquiry() { - DicConsole.WriteLine("Querying SCSI INQUIRY..."); + AaruConsole.WriteLine("Querying SCSI INQUIRY..."); bool sense = _dev.ScsiInquiry(out byte[] buffer, out byte[] senseBuffer); var report = new Scsi(); @@ -74,7 +74,7 @@ namespace Aaru.Core.Devices.Report public List ReportEvpdPages(string vendor) { - DicConsole.WriteLine("Querying list of SCSI EVPDs..."); + AaruConsole.WriteLine("Querying list of SCSI EVPDs..."); bool sense = _dev.ScsiInquiry(out byte[] buffer, out _, 0x00); if(sense) @@ -90,7 +90,7 @@ namespace Aaru.Core.Devices.Report foreach(byte page in evpdPages.Where(page => page != 0x80)) { - DicConsole.WriteLine("Querying SCSI EVPD {0:X2}h...", page); + AaruConsole.WriteLine("Querying SCSI EVPD {0:X2}h...", page); sense = _dev.ScsiInquiry(out buffer, out _, page); if(sense) @@ -182,14 +182,14 @@ namespace Aaru.Core.Devices.Report byte[] mode6CurrentBuffer; byte[] mode6ChangeableBuffer; - DicConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (10)..."); bool sense = _dev.ModeSense10(out byte[] mode10Buffer, out _, false, true, ScsiModeSensePageControl.Default, 0x3F, 0xFF, _dev.Timeout, out _); if(sense || _dev.Error) { - DicConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (10)..."); sense = _dev.ModeSense10(out mode10Buffer, out _, false, true, ScsiModeSensePageControl.Default, 0x3F, 0x00, _dev.Timeout, out _); @@ -241,21 +241,21 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (6)..."); + AaruConsole.WriteLine("Querying all mode pages and subpages using SCSI MODE SENSE (6)..."); sense = _dev.ModeSense6(out byte[] mode6Buffer, out _, false, ScsiModeSensePageControl.Default, 0x3F, 0xFF, _dev.Timeout, out _); if(sense || _dev.Error) { - DicConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (6)..."); + AaruConsole.WriteLine("Querying all mode pages using SCSI MODE SENSE (6)..."); sense = _dev.ModeSense6(out mode6Buffer, out _, false, ScsiModeSensePageControl.Default, 0x3F, 0x00, _dev.Timeout, out _); if(sense || _dev.Error) { - DicConsole.WriteLine("Querying SCSI MODE SENSE (6)..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE (6)..."); sense = _dev.ModeSense(out mode6Buffer, out _, _dev.Timeout, out _); } else @@ -352,7 +352,7 @@ namespace Aaru.Core.Devices.Report public TestedMedia ReportScsiMedia() { var mediaTest = new TestedMedia(); - DicConsole.WriteLine("Querying SCSI READ CAPACITY..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY..."); bool sense = _dev.ReadCapacity(out byte[] buffer, out byte[] senseBuffer, _dev.Timeout, out _); if(!sense && @@ -365,7 +365,7 @@ namespace Aaru.Core.Devices.Report mediaTest.BlockSize = (uint)((buffer[4] << 24) + (buffer[5] << 16) + (buffer[6] << 8) + buffer[7]); } - DicConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); sense = _dev.ReadCapacity16(out buffer, out buffer, _dev.Timeout, out _); if(!sense && @@ -381,7 +381,7 @@ namespace Aaru.Core.Devices.Report Modes.DecodedMode? decMode = null; - DicConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); sense = _dev.ModeSense10(out buffer, out senseBuffer, false, true, ScsiModeSensePageControl.Current, 0x3F, 0x00, _dev.Timeout, out _); @@ -393,7 +393,7 @@ namespace Aaru.Core.Devices.Report mediaTest.ModeSense10Data = buffer; } - DicConsole.WriteLine("Querying SCSI MODE SENSE..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE..."); sense = _dev.ModeSense(out buffer, out senseBuffer, _dev.Timeout, out _); if(!sense && @@ -414,40 +414,40 @@ namespace Aaru.Core.Devices.Report mediaTest.Density = (byte)decMode.Value.Header.BlockDescriptors[0].Density; } - DicConsole.WriteLine("Trying SCSI READ (6)..."); + AaruConsole.WriteLine("Trying SCSI READ (6)..."); mediaTest.SupportsRead6 = !_dev.Read6(out buffer, out senseBuffer, 0, mediaTest.BlockSize ?? 512, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead6); mediaTest.Read6Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (10)..."); + AaruConsole.WriteLine("Trying SCSI READ (10)..."); mediaTest.SupportsRead10 = !_dev.Read10(out buffer, out senseBuffer, 0, false, true, false, false, 0, mediaTest.BlockSize ?? 512, 0, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead10); mediaTest.Read10Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (12)..."); + AaruConsole.WriteLine("Trying SCSI READ (12)..."); mediaTest.SupportsRead12 = !_dev.Read12(out buffer, out senseBuffer, 0, false, true, false, false, 0, mediaTest.BlockSize ?? 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead12); mediaTest.Read12Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (16)..."); + AaruConsole.WriteLine("Trying SCSI READ (16)..."); mediaTest.SupportsRead16 = !_dev.Read16(out buffer, out senseBuffer, 0, false, true, false, 0, mediaTest.BlockSize ?? 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !mediaTest.SupportsRead16); mediaTest.Read16Data = buffer; mediaTest.LongBlockSize = mediaTest.BlockSize; - DicConsole.WriteLine("Trying SCSI READ LONG (10)..."); + AaruConsole.WriteLine("Trying SCSI READ LONG (10)..."); sense = _dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 0xFFFF, _dev.Timeout, out _); if(sense && !_dev.Error) @@ -552,7 +552,7 @@ namespace Aaru.Core.Devices.Report } } - DicConsole.WriteLine("Trying SCSI READ MEDIA SERIAL NUMBER..."); + AaruConsole.WriteLine("Trying SCSI READ MEDIA SERIAL NUMBER..."); mediaTest.CanReadMediaSerial = !_dev.ReadMediaSerialNumber(out buffer, out senseBuffer, _dev.Timeout, out _); @@ -567,7 +567,7 @@ namespace Aaru.Core.Devices.Report MediaIsRecognized = true }; - DicConsole.WriteLine("Querying SCSI READ CAPACITY..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY..."); bool sense = _dev.ReadCapacity(out byte[] buffer, out byte[] senseBuffer, _dev.Timeout, out _); if(!sense && @@ -580,7 +580,7 @@ namespace Aaru.Core.Devices.Report capabilities.BlockSize = (uint)((buffer[4] << 24) + (buffer[5] << 16) + (buffer[6] << 8) + buffer[7]); } - DicConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); + AaruConsole.WriteLine("Querying SCSI READ CAPACITY (16)..."); sense = _dev.ReadCapacity16(out buffer, out buffer, _dev.Timeout, out _); if(!sense && @@ -596,7 +596,7 @@ namespace Aaru.Core.Devices.Report Modes.DecodedMode? decMode = null; - DicConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE (10)..."); sense = _dev.ModeSense10(out buffer, out senseBuffer, false, true, ScsiModeSensePageControl.Current, 0x3F, 0x00, _dev.Timeout, out _); @@ -608,7 +608,7 @@ namespace Aaru.Core.Devices.Report capabilities.ModeSense10Data = buffer; } - DicConsole.WriteLine("Querying SCSI MODE SENSE..."); + AaruConsole.WriteLine("Querying SCSI MODE SENSE..."); sense = _dev.ModeSense(out buffer, out senseBuffer, _dev.Timeout, out _); if(!sense && @@ -629,40 +629,40 @@ namespace Aaru.Core.Devices.Report capabilities.Density = (byte)decMode.Value.Header.BlockDescriptors[0].Density; } - DicConsole.WriteLine("Trying SCSI READ (6)..."); + AaruConsole.WriteLine("Trying SCSI READ (6)..."); capabilities.SupportsRead6 = !_dev.Read6(out buffer, out senseBuffer, 0, capabilities.BlockSize ?? 512, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead6); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead6); capabilities.Read6Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (10)..."); + AaruConsole.WriteLine("Trying SCSI READ (10)..."); capabilities.SupportsRead10 = !_dev.Read10(out buffer, out senseBuffer, 0, false, true, false, false, 0, capabilities.BlockSize ?? 512, 0, 1, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead10); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead10); capabilities.Read10Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (12)..."); + AaruConsole.WriteLine("Trying SCSI READ (12)..."); capabilities.SupportsRead12 = !_dev.Read12(out buffer, out senseBuffer, 0, false, true, false, false, 0, capabilities.BlockSize ?? 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead12); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead12); capabilities.Read12Data = buffer; - DicConsole.WriteLine("Trying SCSI READ (16)..."); + AaruConsole.WriteLine("Trying SCSI READ (16)..."); capabilities.SupportsRead16 = !_dev.Read16(out buffer, out senseBuffer, 0, false, true, false, 0, capabilities.BlockSize ?? 512, 0, 1, false, _dev.Timeout, out _); - DicConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead16); + AaruConsole.DebugWriteLine("SCSI Report", "Sense = {0}", !capabilities.SupportsRead16); capabilities.Read16Data = buffer; capabilities.LongBlockSize = capabilities.BlockSize; - DicConsole.WriteLine("Trying SCSI READ LONG (10)..."); + AaruConsole.WriteLine("Trying SCSI READ LONG (10)..."); sense = _dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, 0xFFFF, _dev.Timeout, out _); if(sense && !_dev.Error) diff --git a/Aaru.Core/Devices/Report/SecureDigital.cs b/Aaru.Core/Devices/Report/SecureDigital.cs index 48744a816..102f68981 100644 --- a/Aaru.Core/Devices/Report/SecureDigital.cs +++ b/Aaru.Core/Devices/Report/SecureDigital.cs @@ -44,12 +44,12 @@ namespace Aaru.Core.Devices.Report { var report = new MmcSd(); - DicConsole.WriteLine("Trying to get CID..."); + AaruConsole.WriteLine("Trying to get CID..."); bool sense = _dev.ReadCid(out byte[] cid, out _, _dev.Timeout, out _); if(!sense) { - DicConsole.WriteLine("CID obtained correctly..."); + AaruConsole.WriteLine("CID obtained correctly..."); switch(_dev.Type) { @@ -77,22 +77,22 @@ namespace Aaru.Core.Devices.Report report.CID = cid; } else - DicConsole.WriteLine("Could not read CID..."); + AaruConsole.WriteLine("Could not read CID..."); - DicConsole.WriteLine("Trying to get CSD..."); + AaruConsole.WriteLine("Trying to get CSD..."); sense = _dev.ReadCsd(out byte[] csd, out _, _dev.Timeout, out _); if(!sense) { - DicConsole.WriteLine("CSD obtained correctly..."); + AaruConsole.WriteLine("CSD obtained correctly..."); report.CSD = csd; } else - DicConsole.WriteLine("Could not read CSD..."); + AaruConsole.WriteLine("Could not read CSD..."); sense = true; byte[] ocr = null; - DicConsole.WriteLine("Trying to get OCR..."); + AaruConsole.WriteLine("Trying to get OCR..."); switch(_dev.Type) { @@ -112,41 +112,41 @@ namespace Aaru.Core.Devices.Report if(!sense) { - DicConsole.WriteLine("OCR obtained correctly..."); + AaruConsole.WriteLine("OCR obtained correctly..."); report.OCR = ocr; } else - DicConsole.WriteLine("Could not read OCR..."); + AaruConsole.WriteLine("Could not read OCR..."); switch(_dev.Type) { case DeviceType.MMC: { - DicConsole.WriteLine("Trying to get Extended CSD..."); + AaruConsole.WriteLine("Trying to get Extended CSD..."); sense = _dev.ReadExtendedCsd(out byte[] ecsd, out _, _dev.Timeout, out _); if(!sense) { - DicConsole.WriteLine("Extended CSD obtained correctly..."); + AaruConsole.WriteLine("Extended CSD obtained correctly..."); report.ExtendedCSD = ecsd; } else - DicConsole.WriteLine("Could not read Extended CSD..."); + AaruConsole.WriteLine("Could not read Extended CSD..."); break; } case DeviceType.SecureDigital: { - DicConsole.WriteLine("Trying to get SCR..."); + AaruConsole.WriteLine("Trying to get SCR..."); sense = _dev.ReadScr(out byte[] scr, out _, _dev.Timeout, out _); if(!sense) { - DicConsole.WriteLine("SCR obtained correctly..."); + AaruConsole.WriteLine("SCR obtained correctly..."); report.SCR = scr; } else - DicConsole.WriteLine("Could not read SCR..."); + AaruConsole.WriteLine("Could not read SCR..."); break; } diff --git a/Aaru.Core/Devices/Scanning/SCSI.cs b/Aaru.Core/Devices/Scanning/SCSI.cs index 1d4283bb3..ff26d5903 100644 --- a/Aaru.Core/Devices/Scanning/SCSI.cs +++ b/Aaru.Core/Devices/Scanning/SCSI.cs @@ -375,7 +375,7 @@ namespace Aaru.Core.Devices.Scanning } else { - DicConsole.DebugWriteLine("Media-Scan", "READ CD error:\n{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Scan", "READ CD error:\n{0}", Sense.PrettifySense(senseBuf)); FixedSense? senseDecoded = Sense.DecodeFixed(senseBuf); diff --git a/Aaru.Core/Entropy.cs b/Aaru.Core/Entropy.cs index 6af5ccf0a..975e764cc 100644 --- a/Aaru.Core/Entropy.cs +++ b/Aaru.Core/Entropy.cs @@ -66,7 +66,7 @@ namespace Aaru.Core if(!(inputFormat is IOpticalMediaImage opticalMediaImage)) { - DicConsole.ErrorWriteLine("The selected image does not support tracks."); + AaruConsole.ErrorWriteLine("The selected image does not support tracks."); return entropyResultses.ToArray(); } @@ -88,7 +88,7 @@ namespace Aaru.Core List uniqueSectorsPerTrack = new List(); trackEntropy.Sectors = currentTrack.TrackEndSector - currentTrack.TrackStartSector + 1; - DicConsole.VerboseWriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, + AaruConsole.VerboseWriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, trackEntropy.Sectors); InitProgress2Event?.Invoke(); @@ -126,8 +126,8 @@ namespace Aaru.Core } catch(Exception ex) { - if(debug) DicConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); - else DicConsole.ErrorWriteLine("Unable to get separate tracks, not calculating their entropy"); + if(debug) AaruConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); + else AaruConsole.ErrorWriteLine("Unable to get separate tracks, not calculating their entropy"); } return entropyResultses.ToArray(); @@ -141,7 +141,7 @@ namespace Aaru.Core List uniqueSectors = new List(); entropy.Sectors = inputFormat.Info.Sectors; - DicConsole.WriteLine("Sectors {0}", entropy.Sectors); + AaruConsole.WriteLine("Sectors {0}", entropy.Sectors); InitProgressEvent?.Invoke(); for(ulong i = 0; i < entropy.Sectors; i++) { diff --git a/Aaru.Core/ImageFormat.cs b/Aaru.Core/ImageFormat.cs index 3c9f54dfd..5e9e4a9f0 100644 --- a/Aaru.Core/ImageFormat.cs +++ b/Aaru.Core/ImageFormat.cs @@ -61,7 +61,7 @@ namespace Aaru.Core ) try { - DicConsole.DebugWriteLine("Format detection", "Trying plugin {0}", imageplugin.Name); + AaruConsole.DebugWriteLine("Format detection", "Trying plugin {0}", imageplugin.Name); if(!imageplugin.Identify(imageFilter)) continue; imageFormat = imageplugin; @@ -83,7 +83,7 @@ namespace Aaru.Core ) try { - DicConsole.DebugWriteLine("Format detection", "Trying plugin {0}", imageplugin.Name); + AaruConsole.DebugWriteLine("Format detection", "Trying plugin {0}", imageplugin.Name); if(!imageplugin.Identify(imageFilter)) continue; imageFormat = imageplugin; diff --git a/Aaru.Core/ImageInfo.cs b/Aaru.Core/ImageInfo.cs index f719a196c..399ce82ce 100644 --- a/Aaru.Core/ImageInfo.cs +++ b/Aaru.Core/ImageInfo.cs @@ -58,111 +58,111 @@ namespace Aaru.Core { public static void PrintImageInfo(IMediaImage imageFormat) { - DicConsole.WriteLine("Image information:"); + AaruConsole.WriteLine("Image information:"); if(!string.IsNullOrWhiteSpace(imageFormat.Info.Version)) - DicConsole.WriteLine("Format: {0} version {1}", imageFormat.Format, imageFormat.Info.Version); + AaruConsole.WriteLine("Format: {0} version {1}", imageFormat.Format, imageFormat.Info.Version); else - DicConsole.WriteLine("Format: {0}", imageFormat.Format); + AaruConsole.WriteLine("Format: {0}", imageFormat.Format); if(!string.IsNullOrWhiteSpace(imageFormat.Info.Application) && !string.IsNullOrWhiteSpace(imageFormat.Info.ApplicationVersion)) - DicConsole.WriteLine("Was created with {0} version {1}", imageFormat.Info.Application, + AaruConsole.WriteLine("Was created with {0} version {1}", imageFormat.Info.Application, imageFormat.Info.ApplicationVersion); else if(!string.IsNullOrWhiteSpace(imageFormat.Info.Application)) - DicConsole.WriteLine("Was created with {0}", imageFormat.Info.Application); + AaruConsole.WriteLine("Was created with {0}", imageFormat.Info.Application); - DicConsole.WriteLine("Image without headers is {0} bytes long", imageFormat.Info.ImageSize); + AaruConsole.WriteLine("Image without headers is {0} bytes long", imageFormat.Info.ImageSize); - DicConsole.WriteLine("Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2} bytes)", + AaruConsole.WriteLine("Contains a media of {0} sectors with a maximum sector size of {1} bytes (if all sectors are of the same size this would be {2} bytes)", imageFormat.Info.Sectors, imageFormat.Info.SectorSize, imageFormat.Info.Sectors * imageFormat.Info.SectorSize); if(!string.IsNullOrWhiteSpace(imageFormat.Info.Creator)) - DicConsole.WriteLine("Created by: {0}", imageFormat.Info.Creator); + AaruConsole.WriteLine("Created by: {0}", imageFormat.Info.Creator); if(imageFormat.Info.CreationTime != DateTime.MinValue) - DicConsole.WriteLine("Created on {0}", imageFormat.Info.CreationTime); + AaruConsole.WriteLine("Created on {0}", imageFormat.Info.CreationTime); if(imageFormat.Info.LastModificationTime != DateTime.MinValue) - DicConsole.WriteLine("Last modified on {0}", imageFormat.Info.LastModificationTime); + AaruConsole.WriteLine("Last modified on {0}", imageFormat.Info.LastModificationTime); - DicConsole.WriteLine("Contains a media of type {0} and XML type {1}", imageFormat.Info.MediaType, + AaruConsole.WriteLine("Contains a media of type {0} and XML type {1}", imageFormat.Info.MediaType, imageFormat.Info.XmlMediaType); - DicConsole.WriteLine("{0} partitions", imageFormat.Info.HasPartitions ? "Has" : "Doesn't have"); - DicConsole.WriteLine("{0} sessions", imageFormat.Info.HasSessions ? "Has" : "Doesn't have"); + AaruConsole.WriteLine("{0} partitions", imageFormat.Info.HasPartitions ? "Has" : "Doesn't have"); + AaruConsole.WriteLine("{0} sessions", imageFormat.Info.HasSessions ? "Has" : "Doesn't have"); if(!string.IsNullOrWhiteSpace(imageFormat.Info.Comments)) - DicConsole.WriteLine("Comments: {0}", imageFormat.Info.Comments); + AaruConsole.WriteLine("Comments: {0}", imageFormat.Info.Comments); if(imageFormat.Info.MediaSequence != 0 && imageFormat.Info.LastMediaSequence != 0) - DicConsole.WriteLine("Media is number {0} on a set of {1} medias", imageFormat.Info.MediaSequence, + AaruConsole.WriteLine("Media is number {0} on a set of {1} medias", imageFormat.Info.MediaSequence, imageFormat.Info.LastMediaSequence); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaTitle)) - DicConsole.WriteLine("Media title: {0}", imageFormat.Info.MediaTitle); + AaruConsole.WriteLine("Media title: {0}", imageFormat.Info.MediaTitle); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaManufacturer)) - DicConsole.WriteLine("Media manufacturer: {0}", imageFormat.Info.MediaManufacturer); + AaruConsole.WriteLine("Media manufacturer: {0}", imageFormat.Info.MediaManufacturer); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaModel)) - DicConsole.WriteLine("Media model: {0}", imageFormat.Info.MediaModel); + AaruConsole.WriteLine("Media model: {0}", imageFormat.Info.MediaModel); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaSerialNumber)) - DicConsole.WriteLine("Media serial number: {0}", imageFormat.Info.MediaSerialNumber); + AaruConsole.WriteLine("Media serial number: {0}", imageFormat.Info.MediaSerialNumber); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaBarcode)) - DicConsole.WriteLine("Media barcode: {0}", imageFormat.Info.MediaBarcode); + AaruConsole.WriteLine("Media barcode: {0}", imageFormat.Info.MediaBarcode); if(!string.IsNullOrWhiteSpace(imageFormat.Info.MediaPartNumber)) - DicConsole.WriteLine("Media part number: {0}", imageFormat.Info.MediaPartNumber); + AaruConsole.WriteLine("Media part number: {0}", imageFormat.Info.MediaPartNumber); if(!string.IsNullOrWhiteSpace(imageFormat.Info.DriveManufacturer)) - DicConsole.WriteLine("Drive manufacturer: {0}", imageFormat.Info.DriveManufacturer); + AaruConsole.WriteLine("Drive manufacturer: {0}", imageFormat.Info.DriveManufacturer); if(!string.IsNullOrWhiteSpace(imageFormat.Info.DriveModel)) - DicConsole.WriteLine("Drive model: {0}", imageFormat.Info.DriveModel); + AaruConsole.WriteLine("Drive model: {0}", imageFormat.Info.DriveModel); if(!string.IsNullOrWhiteSpace(imageFormat.Info.DriveSerialNumber)) - DicConsole.WriteLine("Drive serial number: {0}", imageFormat.Info.DriveSerialNumber); + AaruConsole.WriteLine("Drive serial number: {0}", imageFormat.Info.DriveSerialNumber); if(!string.IsNullOrWhiteSpace(imageFormat.Info.DriveFirmwareRevision)) - DicConsole.WriteLine("Drive firmware info: {0}", imageFormat.Info.DriveFirmwareRevision); + AaruConsole.WriteLine("Drive firmware info: {0}", imageFormat.Info.DriveFirmwareRevision); if(imageFormat.Info.Cylinders > 0 && imageFormat.Info.Heads > 0 && imageFormat.Info.SectorsPerTrack > 0 && imageFormat.Info.XmlMediaType != XmlMediaType.OpticalDisc && (!(imageFormat is ITapeImage tapeImage) || !tapeImage.IsTape)) - DicConsole.WriteLine("Media geometry: {0} cylinders, {1} heads, {2} sectors per track", + AaruConsole.WriteLine("Media geometry: {0} cylinders, {1} heads, {2} sectors per track", imageFormat.Info.Cylinders, imageFormat.Info.Heads, imageFormat.Info.SectorsPerTrack); if(imageFormat.Info.ReadableMediaTags != null && imageFormat.Info.ReadableMediaTags.Count > 0) { - DicConsole.WriteLine("Contains {0} readable media tags:", imageFormat.Info.ReadableMediaTags.Count); + AaruConsole.WriteLine("Contains {0} readable media tags:", imageFormat.Info.ReadableMediaTags.Count); foreach(MediaTagType tag in imageFormat.Info.ReadableMediaTags.OrderBy(t => t)) - DicConsole.Write("{0} ", tag); + AaruConsole.Write("{0} ", tag); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableSectorTags != null && imageFormat.Info.ReadableSectorTags.Count > 0) { - DicConsole.WriteLine("Contains {0} readable sector tags:", imageFormat.Info.ReadableSectorTags.Count); + AaruConsole.WriteLine("Contains {0} readable sector tags:", imageFormat.Info.ReadableSectorTags.Count); foreach(SectorTagType tag in imageFormat.Info.ReadableSectorTags.OrderBy(t => t)) - DicConsole.Write("{0} ", tag); + AaruConsole.Write("{0} ", tag); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); PeripheralDeviceTypes scsiDeviceType = PeripheralDeviceTypes.DirectAccess; byte[] scsiVendorId = null; @@ -179,9 +179,9 @@ namespace Aaru.Core Array.Copy(inquiry, 8, scsiVendorId, 0, 8); } - DicConsole.WriteLine("SCSI INQUIRY contained in image:"); - DicConsole.Write("{0}", Inquiry.Prettify(inquiry)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("SCSI INQUIRY contained in image:"); + AaruConsole.Write("{0}", Inquiry.Prettify(inquiry)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -189,9 +189,9 @@ namespace Aaru.Core { byte[] identify = imageFormat.ReadDiskTag(MediaTagType.ATA_IDENTIFY); - DicConsole.WriteLine("ATA IDENTIFY contained in image:"); - DicConsole.Write("{0}", Identify.Prettify(identify)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("ATA IDENTIFY contained in image:"); + AaruConsole.Write("{0}", Identify.Prettify(identify)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -199,9 +199,9 @@ namespace Aaru.Core { byte[] identify = imageFormat.ReadDiskTag(MediaTagType.ATAPI_IDENTIFY); - DicConsole.WriteLine("ATAPI IDENTIFY contained in image:"); - DicConsole.Write("{0}", Identify.Prettify(identify)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("ATAPI IDENTIFY contained in image:"); + AaruConsole.Write("{0}", Identify.Prettify(identify)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -212,9 +212,9 @@ namespace Aaru.Core if(decMode.HasValue) { - DicConsole.WriteLine("SCSI MODE SENSE (10) contained in image:"); + AaruConsole.WriteLine("SCSI MODE SENSE (10) contained in image:"); PrintScsiModePages.Print(decMode.Value, scsiDeviceType, scsiVendorId); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } else if(imageFormat.Info.ReadableMediaTags != null && @@ -225,9 +225,9 @@ namespace Aaru.Core if(decMode.HasValue) { - DicConsole.WriteLine("SCSI MODE SENSE (6) contained in image:"); + AaruConsole.WriteLine("SCSI MODE SENSE (6) contained in image:"); PrintScsiModePages.Print(decMode.Value, scsiDeviceType, scsiVendorId); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } else if(imageFormat.Info.ReadableMediaTags != null && @@ -235,8 +235,8 @@ namespace Aaru.Core { byte[] mode2A = imageFormat.ReadDiskTag(MediaTagType.SCSI_MODEPAGE_2A); - DicConsole.Write("{0}", Modes.PrettifyModePage_2A(mode2A)); - DicConsole.WriteLine(); + AaruConsole.Write("{0}", Modes.PrettifyModePage_2A(mode2A)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -257,9 +257,9 @@ namespace Aaru.Core toc = tmp; } - DicConsole.WriteLine("CompactDisc Table of Contents contained in image:"); - DicConsole.Write("{0}", FullTOC.Prettify(toc)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("CompactDisc Table of Contents contained in image:"); + AaruConsole.Write("{0}", FullTOC.Prettify(toc)); + AaruConsole.WriteLine(); } } @@ -281,9 +281,9 @@ namespace Aaru.Core pma = tmp; } - DicConsole.WriteLine("CompactDisc Power Management Area contained in image:"); - DicConsole.Write("{0}", PMA.Prettify(pma)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("CompactDisc Power Management Area contained in image:"); + AaruConsole.Write("{0}", PMA.Prettify(pma)); + AaruConsole.WriteLine(); } } @@ -305,9 +305,9 @@ namespace Aaru.Core atip = tmp; } - DicConsole.WriteLine("CompactDisc Absolute Time In Pregroove (ATIP) contained in image:"); - DicConsole.Write("{0}", ATIP.Prettify(atip)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("CompactDisc Absolute Time In Pregroove (ATIP) contained in image:"); + AaruConsole.Write("{0}", ATIP.Prettify(atip)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -328,9 +328,9 @@ namespace Aaru.Core cdtext = tmp; } - DicConsole.WriteLine("CompactDisc Lead-in's CD-Text contained in image:"); - DicConsole.Write("{0}", CDTextOnLeadIn.Prettify(cdtext)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("CompactDisc Lead-in's CD-Text contained in image:"); + AaruConsole.Write("{0}", CDTextOnLeadIn.Prettify(cdtext)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -338,10 +338,10 @@ namespace Aaru.Core { byte[] mcn = imageFormat.ReadDiskTag(MediaTagType.CD_MCN); - DicConsole.WriteLine("CompactDisc Media Catalogue Number contained in image: {0}", + AaruConsole.WriteLine("CompactDisc Media Catalogue Number contained in image: {0}", Encoding.UTF8.GetString(mcn)); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -349,9 +349,9 @@ namespace Aaru.Core { byte[] pfi = imageFormat.ReadDiskTag(MediaTagType.DVD_PFI); - DicConsole.WriteLine("DVD Physical Format Information contained in image:"); - DicConsole.Write("{0}", PFI.Prettify(pfi)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("DVD Physical Format Information contained in image:"); + AaruConsole.Write("{0}", PFI.Prettify(pfi)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -359,9 +359,9 @@ namespace Aaru.Core { byte[] dds = imageFormat.ReadDiskTag(MediaTagType.DVDRAM_DDS); - DicConsole.WriteLine("DVD-RAM Disc Definition Structure contained in image:"); - DicConsole.Write("{0}", DDS.Prettify(dds)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("DVD-RAM Disc Definition Structure contained in image:"); + AaruConsole.Write("{0}", DDS.Prettify(dds)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -369,9 +369,9 @@ namespace Aaru.Core { byte[] pfi = imageFormat.ReadDiskTag(MediaTagType.DVDR_PFI); - DicConsole.WriteLine("DVD-R Physical Format Information contained in image:"); - DicConsole.Write("{0}", PFI.Prettify(pfi)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("DVD-R Physical Format Information contained in image:"); + AaruConsole.Write("{0}", PFI.Prettify(pfi)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -379,9 +379,9 @@ namespace Aaru.Core { byte[] di = imageFormat.ReadDiskTag(MediaTagType.BD_DI); - DicConsole.WriteLine("Bluray Disc Information contained in image:"); - DicConsole.Write("{0}", DI.Prettify(di)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Bluray Disc Information contained in image:"); + AaruConsole.Write("{0}", DI.Prettify(di)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -389,9 +389,9 @@ namespace Aaru.Core { byte[] dds = imageFormat.ReadDiskTag(MediaTagType.BD_DDS); - DicConsole.WriteLine("Bluray Disc Definition Structure contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.Bluray.DDS.Prettify(dds)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Bluray Disc Definition Structure contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.Bluray.DDS.Prettify(dds)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -399,7 +399,7 @@ namespace Aaru.Core { byte[] cis = imageFormat.ReadDiskTag(MediaTagType.PCMCIA_CIS); - DicConsole.WriteLine("PCMCIA CIS:"); + AaruConsole.WriteLine("PCMCIA CIS:"); Tuple[] tuples = CIS.GetTuples(cis); if(tuples != null) @@ -410,15 +410,15 @@ namespace Aaru.Core case TupleCodes.CISTPL_END: break; case TupleCodes.CISTPL_DEVICEGEO: case TupleCodes.CISTPL_DEVICEGEO_A: - DicConsole.WriteLine("{0}", CIS.PrettifyDeviceGeometryTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyDeviceGeometryTuple(tuple)); break; case TupleCodes.CISTPL_MANFID: - DicConsole.WriteLine("{0}", CIS.PrettifyManufacturerIdentificationTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyManufacturerIdentificationTuple(tuple)); break; case TupleCodes.CISTPL_VERS_1: - DicConsole.WriteLine("{0}", CIS.PrettifyLevel1VersionTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyLevel1VersionTuple(tuple)); break; case TupleCodes.CISTPL_ALTSTR: @@ -455,18 +455,18 @@ namespace Aaru.Core case TupleCodes.CISTPL_SPCL: case TupleCodes.CISTPL_SWIL: case TupleCodes.CISTPL_VERS_2: - DicConsole.DebugWriteLine("Device-Info command", "Found undecoded tuple ID {0}", + AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded tuple ID {0}", tuple.Code); break; default: - DicConsole.DebugWriteLine("Device-Info command", "Found unknown tuple ID 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "Found unknown tuple ID 0x{0:X2}", (byte)tuple.Code); break; } else - DicConsole.DebugWriteLine("Device-Info command", "Could not get tuples"); + AaruConsole.DebugWriteLine("Device-Info command", "Could not get tuples"); } if(imageFormat.Info.ReadableMediaTags != null && @@ -474,9 +474,9 @@ namespace Aaru.Core { byte[] cid = imageFormat.ReadDiskTag(MediaTagType.SD_CID); - DicConsole.WriteLine("SecureDigital CID contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCID(cid)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("SecureDigital CID contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCID(cid)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -484,9 +484,9 @@ namespace Aaru.Core { byte[] csd = imageFormat.ReadDiskTag(MediaTagType.SD_CSD); - DicConsole.WriteLine("SecureDigital CSD contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCSD(csd)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("SecureDigital CSD contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCSD(csd)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -494,9 +494,9 @@ namespace Aaru.Core { byte[] scr = imageFormat.ReadDiskTag(MediaTagType.SD_SCR); - DicConsole.WriteLine("SecureDigital SCR contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifySCR(scr)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("SecureDigital SCR contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifySCR(scr)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -504,9 +504,9 @@ namespace Aaru.Core { byte[] ocr = imageFormat.ReadDiskTag(MediaTagType.SD_OCR); - DicConsole.WriteLine("SecureDigital OCR contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyOCR(ocr)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("SecureDigital OCR contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyOCR(ocr)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -514,9 +514,9 @@ namespace Aaru.Core { byte[] cid = imageFormat.ReadDiskTag(MediaTagType.MMC_CID); - DicConsole.WriteLine("MultiMediaCard CID contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCID(cid)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("MultiMediaCard CID contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCID(cid)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -524,9 +524,9 @@ namespace Aaru.Core { byte[] csd = imageFormat.ReadDiskTag(MediaTagType.MMC_CSD); - DicConsole.WriteLine("MultiMediaCard CSD contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCSD(csd)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("MultiMediaCard CSD contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCSD(csd)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -534,9 +534,9 @@ namespace Aaru.Core { byte[] ecsd = imageFormat.ReadDiskTag(MediaTagType.MMC_ExtendedCSD); - DicConsole.WriteLine("MultiMediaCard ExtendedCSD contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(ecsd)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("MultiMediaCard ExtendedCSD contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(ecsd)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -544,9 +544,9 @@ namespace Aaru.Core { byte[] ocr = imageFormat.ReadDiskTag(MediaTagType.MMC_OCR); - DicConsole.WriteLine("MultiMediaCard OCR contained in image:"); - DicConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyOCR(ocr)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("MultiMediaCard OCR contained in image:"); + AaruConsole.Write("{0}", Aaru.Decoders.MMC.Decoders.PrettifyOCR(ocr)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -554,9 +554,9 @@ namespace Aaru.Core { byte[] xpfi = imageFormat.ReadDiskTag(MediaTagType.Xbox_PFI); - DicConsole.WriteLine("Xbox Physical Format Information contained in image:"); - DicConsole.Write("{0}", PFI.Prettify(xpfi)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Xbox Physical Format Information contained in image:"); + AaruConsole.Write("{0}", PFI.Prettify(xpfi)); + AaruConsole.WriteLine(); } if(imageFormat.Info.ReadableMediaTags != null && @@ -570,9 +570,9 @@ namespace Aaru.Core if(xmi.HasValue) { - DicConsole.WriteLine("Xbox DMI contained in image:"); - DicConsole.Write("{0}", DMI.PrettifyXbox(xmi)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Xbox DMI contained in image:"); + AaruConsole.Write("{0}", DMI.PrettifyXbox(xmi)); + AaruConsole.WriteLine(); } } @@ -582,9 +582,9 @@ namespace Aaru.Core if(xmi.HasValue) { - DicConsole.WriteLine("Xbox 360 DMI contained in image:"); - DicConsole.Write("{0}", DMI.PrettifyXbox360(xmi)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Xbox 360 DMI contained in image:"); + AaruConsole.Write("{0}", DMI.PrettifyXbox360(xmi)); + AaruConsole.WriteLine(); } } } @@ -594,9 +594,9 @@ namespace Aaru.Core { byte[] toc = imageFormat.ReadDiskTag(MediaTagType.Xbox_SecuritySector); - DicConsole.WriteLine("Xbox Security Sectors contained in image:"); - DicConsole.Write("{0}", SS.Prettify(toc)); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Xbox Security Sectors contained in image:"); + AaruConsole.Write("{0}", SS.Prettify(toc)); + AaruConsole.WriteLine(); } if(imageFormat is IOpticalMediaImage opticalImage) @@ -606,19 +606,19 @@ namespace Aaru.Core if(opticalImage.Sessions != null && opticalImage.Sessions.Count > 0) { - DicConsole.WriteLine("Image sessions:"); + AaruConsole.WriteLine("Image sessions:"); - DicConsole.WriteLine("{0,-9}{1,-13}{2,-12}{3,-12}{4,-12}", "Session", "First track", + AaruConsole.WriteLine("{0,-9}{1,-13}{2,-12}{3,-12}{4,-12}", "Session", "First track", "Last track", "Start", "End"); - DicConsole.WriteLine("========================================================="); + AaruConsole.WriteLine("========================================================="); foreach(Session session in opticalImage.Sessions) - DicConsole.WriteLine("{0,-9}{1,-13}{2,-12}{3,-12}{4,-12}", session.SessionSequence, + AaruConsole.WriteLine("{0,-9}{1,-13}{2,-12}{3,-12}{4,-12}", session.SessionSequence, session.StartTrack, session.EndTrack, session.StartSector, session.EndSector); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } catch @@ -631,21 +631,21 @@ namespace Aaru.Core if(opticalImage.Tracks != null && opticalImage.Tracks.Count > 0) { - DicConsole.WriteLine("Image tracks:"); + AaruConsole.WriteLine("Image tracks:"); - DicConsole.WriteLine("{0,-7}{1,-17}{2,-6}{3,-8}{4,-12}{5,-8}{6,-12}{7,-12}", "Track", "Type", + AaruConsole.WriteLine("{0,-7}{1,-17}{2,-6}{3,-8}{4,-12}{5,-8}{6,-12}{7,-12}", "Track", "Type", "Bps", "Raw bps", "Subchannel", "Pregap", "Start", "End"); - DicConsole. + AaruConsole. WriteLine("================================================================================="); foreach(Track track in opticalImage.Tracks) - DicConsole.WriteLine("{0,-7}{1,-17}{2,-6}{3,-8}{4,-12}{5,-8}{6,-12}{7,-12}", + AaruConsole.WriteLine("{0,-7}{1,-17}{2,-6}{3,-8}{4,-12}{5,-8}{6,-12}{7,-12}", track.TrackSequence, track.TrackType, track.TrackBytesPerSector, track.TrackRawBytesPerSector, track.TrackSubchannelType, track.TrackPregap, track.TrackStartSector, track.TrackEndSector); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } catch @@ -721,22 +721,22 @@ namespace Aaru.Core string format = $"{{0,-{manufacturerLen}}}{{1,-{modelLen}}}{{2,-{serialLen}}}{{3,-{softwareLen}}}{{4,-{versionLen}}}{{5,-{osLen}}}{{6,-{sectorLen}}}{{7,-{sectorLen}}}"; - DicConsole.WriteLine("Dump hardware information:"); + AaruConsole.WriteLine("Dump hardware information:"); - DicConsole.WriteLine(format, MANUFACTURER_STRING, MODEL_STRING, SERIAL_STRING, SOFTWARE_STRING, + AaruConsole.WriteLine(format, MANUFACTURER_STRING, MODEL_STRING, SERIAL_STRING, SOFTWARE_STRING, VERSION_STRING, OS_STRING, START_STRING, END_STRING); - DicConsole.WriteLine(new string(separator)); + AaruConsole.WriteLine(new string(separator)); foreach(DumpHardwareType dump in imageFormat.DumpHardware) { foreach(ExtentType extent in dump.Extents) - DicConsole.WriteLine(format, dump.Manufacturer, dump.Model, dump.Serial, dump.Software.Name, + AaruConsole.WriteLine(format, dump.Manufacturer, dump.Model, dump.Serial, dump.Software.Name, dump.Software.Version, dump.Software.OperatingSystem, extent.Start, extent.End); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } } \ No newline at end of file diff --git a/Aaru.Core/Media/Detection/MMC.cs b/Aaru.Core/Media/Detection/MMC.cs index 2147b2626..f2e39c8d1 100644 --- a/Aaru.Core/Media/Detection/MMC.cs +++ b/Aaru.Core/Media/Detection/MMC.cs @@ -835,7 +835,7 @@ namespace Aaru.Core.Media.Detection string ps2BootSectorsHash = Sha256Context.Data(ps2BootSectors, out _); - DicConsole.DebugWriteLine("Media-info Command", "PlayStation 2 boot sectors SHA256: {0}", + AaruConsole.DebugWriteLine("Media-info Command", "PlayStation 2 boot sectors SHA256: {0}", ps2BootSectorsHash); if(ps2BootSectorsHash == PS2_PAL_HASH || @@ -941,7 +941,7 @@ namespace Aaru.Core.Media.Detection string ps2BootSectorsHash = Sha256Context.Data(ps2BootSectors, out _); - DicConsole.DebugWriteLine("Media-info Command", "PlayStation 2 boot sectors SHA256: {0}", + AaruConsole.DebugWriteLine("Media-info Command", "PlayStation 2 boot sectors SHA256: {0}", ps2BootSectorsHash); if(ps2BootSectorsHash == PS2_PAL_HASH || diff --git a/Aaru.Core/Media/Info/ScsiInfo.cs b/Aaru.Core/Media/Info/ScsiInfo.cs index c6e01ae8e..f391477ba 100644 --- a/Aaru.Core/Media/Info/ScsiInfo.cs +++ b/Aaru.Core/Media/Info/ScsiInfo.cs @@ -96,7 +96,7 @@ namespace Aaru.Core.Media.Info while(leftRetries > 0) { - //DicConsole.WriteLine("\rWaiting for drive to become ready"); + //AaruConsole.WriteLine("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuf, dev.Timeout, out _); @@ -108,7 +108,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Please insert media in drive"); + AaruConsole.ErrorWriteLine("Please insert media in drive"); return; } @@ -120,7 +120,7 @@ namespace Aaru.Core.Media.Info while(leftRetries > 0) { - //DicConsole.WriteLine("\rWaiting for drive to become ready"); + //AaruConsole.WriteLine("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuf, dev.Timeout, out _); @@ -132,7 +132,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Error testing unit was ready:\n{0}", + AaruConsole.ErrorWriteLine("Error testing unit was ready:\n{0}", Sense.PrettifySense(senseBuf)); return; @@ -140,7 +140,7 @@ namespace Aaru.Core.Media.Info } else { - DicConsole.ErrorWriteLine("Error testing unit was ready:\n{0}", + AaruConsole.ErrorWriteLine("Error testing unit was ready:\n{0}", Sense.PrettifySense(senseBuf)); return; @@ -148,7 +148,7 @@ namespace Aaru.Core.Media.Info } else { - DicConsole.ErrorWriteLine("Unknown testing unit was ready."); + AaruConsole.ErrorWriteLine("Unknown testing unit was ready."); return; } @@ -207,8 +207,8 @@ namespace Aaru.Core.Media.Info Blocks == 0) if(dev.ScsiType != PeripheralDeviceTypes.MultiMediaDevice) { - DicConsole.ErrorWriteLine("Unable to get media capacity"); - DicConsole.ErrorWriteLine("{0}", Sense.PrettifySense(senseBuf)); + AaruConsole.ErrorWriteLine("Unable to get media capacity"); + AaruConsole.ErrorWriteLine("{0}", Sense.PrettifySense(senseBuf)); } if(ReadCapacity16 != null) @@ -262,7 +262,7 @@ namespace Aaru.Core.Media.Info /* sense = dev.ReadAttribute(out seqBuf, out senseBuf, ScsiAttributeAction.List, 0, dev.Timeout, out _); if (sense) - DicConsole.ErrorWriteLine("SCSI READ ATTRIBUTE:\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.ErrorWriteLine("SCSI READ ATTRIBUTE:\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else { DataFile.WriteTo("Media-Info command", outputPrefix, "_scsi_readattribute.bin", "SCSI READ ATTRIBUTE", seqBuf); @@ -278,7 +278,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ GET CONFIGURATION:\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ GET CONFIGURATION:\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -286,7 +286,7 @@ namespace Aaru.Core.Media.Info MmcConfiguration = cmdBuf; Features.SeparatedFeatures ftr = Features.Separate(cmdBuf); - DicConsole.DebugWriteLine("Media-Info command", "GET CONFIGURATION current profile is {0:X4}h", + AaruConsole.DebugWriteLine("Media-Info command", "GET CONFIGURATION current profile is {0:X4}h", ftr.CurrentProfile); switch(ftr.CurrentProfile) @@ -450,7 +450,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.RecognizedFormatLayers, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Recognized Format Layers\n{0}", Sense.PrettifySense(senseBuf)); else @@ -460,7 +460,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.WriteProtectionStatus, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Write Protection Status\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Write Protection Status\n{0}", Sense.PrettifySense(senseBuf)); else WriteProtectionStatus = cmdBuf; @@ -469,7 +469,7 @@ namespace Aaru.Core.Media.Info /* sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.CapabilityList, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Capability List\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Capability List\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_capabilitylist.bin", "SCSI READ DISC STRUCTURE", cmdBuf); */ @@ -498,7 +498,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PFI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PFI\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -578,7 +578,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DMI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DMI\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -611,7 +611,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.CopyrightInformation, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: CMI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: CMI\n{0}", Sense.PrettifySense(senseBuf)); else DvdCmi = cmdBuf; @@ -628,7 +628,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.BurstCuttingArea, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: BCA\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: BCA\n{0}", Sense.PrettifySense(senseBuf)); else DvdBca = cmdBuf; @@ -637,7 +637,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.DvdAacs, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD AACS\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD AACS\n{0}", Sense.PrettifySense(senseBuf)); else DvdAacs = cmdBuf; @@ -652,7 +652,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.DvdramDds, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DDS\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DDS\n{0}", Sense.PrettifySense(senseBuf)); else DvdRamDds = cmdBuf; @@ -661,7 +661,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.DvdramMediumStatus, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Medium Status\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Medium Status\n{0}", Sense.PrettifySense(senseBuf)); else DvdRamCartridgeStatus = cmdBuf; @@ -671,7 +671,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: SAI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: SAI\n{0}", Sense.PrettifySense(senseBuf)); else DvdRamSpareArea = cmdBuf; @@ -686,7 +686,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.LastBorderOutRmd, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Last-Out Border RMD\n{0}", Sense.PrettifySense(senseBuf)); else @@ -700,57 +700,57 @@ namespace Aaru.Core.Media.Info /* sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.DiscKey, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Disc Key\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Disc Key\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_disckey.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.SectorCopyrightInformation, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Sector CMI\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Sector CMI\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_sectorcmi.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.MediaIdentifier, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Media ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Media ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_mediaid.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.MediaKeyBlock, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_mkb.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSVolId, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Volume ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Volume ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacsvolid.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSMediaSerial, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Media Serial Number\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Media Serial Number\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacssn.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSMediaId, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Media ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Media ID\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacsmediaid.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSMKB, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacsmkb.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSLBAExtents, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS LBA Extents\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS LBA Extents\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacslbaextents.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSMKBCPRM, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS CPRM MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS CPRM MKB\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacscprmmkb.bin", "SCSI READ DISC STRUCTURE", cmdBuf); sense = dev.ReadDiscStructure(out cmdBuf, out senseBuf, MmcDiscStructureMediaType.DVD, 0, 0, MmcDiscStructureFormat.AACSDataKeys, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Data Keys\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: AACS Data Keys\n{0}", Decoders.SCSI.Sense.PrettifySense(senseBuf)); else DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_aacsdatakeys.bin", "SCSI READ DISC STRUCTURE", cmdBuf); */ @@ -764,7 +764,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.PreRecordedInfo, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Pre-Recorded Info\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Pre-Recorded Info\n{0}", Sense.PrettifySense(senseBuf)); else DvdPreRecordedInfo = cmdBuf; @@ -782,7 +782,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD-R Media ID\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD-R Media ID\n{0}", Sense.PrettifySense(senseBuf)); else DvdrMediaIdentifier = cmdBuf; @@ -792,7 +792,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD-R PFI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DVD-R PFI\n{0}", Sense.PrettifySense(senseBuf)); else DvdrPhysicalInformation = cmdBuf; @@ -809,7 +809,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.Adip, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: ADIP\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: ADIP\n{0}", Sense.PrettifySense(senseBuf)); else DvdPlusAdip = cmdBuf; @@ -818,7 +818,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.Dcb, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DCB\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DCB\n{0}", Sense.PrettifySense(senseBuf)); else DvdPlusDcb = cmdBuf; @@ -833,7 +833,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: HD DVD CMI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: HD DVD CMI\n{0}", Sense.PrettifySense(senseBuf)); else HddvdCopyrightInformation = cmdBuf; @@ -849,7 +849,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.HddvdrMediumStatus, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: HD DVD-R Medium Status\n{0}", Sense.PrettifySense(senseBuf)); else @@ -859,7 +859,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.HddvdrLastRmd, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Last RMD\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Last RMD\n{0}", Sense.PrettifySense(senseBuf)); else HddvdrLastRmd = cmdBuf; @@ -876,7 +876,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.DvdrLayerCapacity, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Layer Capacity\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Layer Capacity\n{0}", Sense.PrettifySense(senseBuf)); else DvdrLayerCapacity = cmdBuf; @@ -891,7 +891,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.MiddleZoneStart, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Middle Zone Start\n{0}", Sense.PrettifySense(senseBuf)); else @@ -901,7 +901,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.JumpIntervalSize, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Jump Interval Size\n{0}", Sense.PrettifySense(senseBuf)); else @@ -912,7 +912,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Manual Layer Jump Start LBA\n{0}", Sense.PrettifySense(senseBuf)); else @@ -922,7 +922,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.RemapAnchorPoint, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Remap Anchor Point\n{0}", Sense.PrettifySense(senseBuf)); else @@ -941,7 +941,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.DiscInformation, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DI\n{0}", Sense.PrettifySense(senseBuf)); else BlurayDiscInformation = cmdBuf; @@ -950,7 +950,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.Pac, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PAC\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PAC\n{0}", Sense.PrettifySense(senseBuf)); else BlurayPac = cmdBuf; @@ -967,7 +967,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.BdBurstCuttingArea, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: BCA\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: BCA\n{0}", Sense.PrettifySense(senseBuf)); else BlurayBurstCuttingArea = cmdBuf; @@ -984,7 +984,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.BdDds, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DDS\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DDS\n{0}", Sense.PrettifySense(senseBuf)); else BlurayDds = cmdBuf; @@ -993,7 +993,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.CartridgeStatus, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Cartridge Status\n{0}", Sense.PrettifySense(senseBuf)); else @@ -1004,7 +1004,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Spare Area Information\n{0}", Sense.PrettifySense(senseBuf)); else @@ -1014,7 +1014,7 @@ namespace Aaru.Core.Media.Info MmcDiscStructureFormat.RawDfl, 0, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Raw DFL\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: Raw DFL\n{0}", Sense.PrettifySense(senseBuf)); else BlurayRawDfl = cmdBuf; @@ -1023,7 +1023,7 @@ namespace Aaru.Core.Media.Info MmcDiscInformationDataTypes.TrackResources, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 001b\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 001b\n{0}", Sense.PrettifySense(senseBuf)); else BlurayTrackResources = cmdBuf; @@ -1032,7 +1032,7 @@ namespace Aaru.Core.Media.Info MmcDiscInformationDataTypes.PowResources, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 010b\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 010b\n{0}", Sense.PrettifySense(senseBuf)); else BlurayPowResources = cmdBuf; @@ -1052,7 +1052,7 @@ namespace Aaru.Core.Media.Info if(tocSense) { - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: TOC\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: TOC\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1070,7 +1070,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: ATIP\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: ATIP\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1093,7 +1093,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 000b\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC INFORMATION 000b\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1120,7 +1120,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: Session info\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: Session info\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1139,7 +1139,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: Raw TOC\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: Raw TOC\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1172,7 +1172,7 @@ namespace Aaru.Core.Media.Info sense = dev.ReadPma(out cmdBuf, out senseBuf, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: PMA\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: PMA\n{0}", Sense.PrettifySense(senseBuf)); else Pma = cmdBuf; @@ -1181,7 +1181,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: CD-TEXT\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ TOC/PMA/ATIP: CD-TEXT\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1226,7 +1226,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PFI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: PFI\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1236,7 +1236,7 @@ namespace Aaru.Core.Media.Info if(nintendoPfi != null) { - DicConsole.WriteLine("PFI:\n{0}", PFI.Prettify(cmdBuf)); + AaruConsole.WriteLine("PFI:\n{0}", PFI.Prettify(cmdBuf)); if(nintendoPfi.Value.DiskCategory == DiskCategory.Nintendo && nintendoPfi.Value.PartVersion == 15) @@ -1259,7 +1259,7 @@ namespace Aaru.Core.Media.Info out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DMI\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ DISC STRUCTURE: DMI\n{0}", Sense.PrettifySense(senseBuf)); else DvdDmi = cmdBuf; @@ -1271,7 +1271,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.DebugWriteLine("Media-Info command", "READ MEDIA SERIAL NUMBER\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "READ MEDIA SERIAL NUMBER\n{0}", Sense.PrettifySense(senseBuf)); } else @@ -1299,7 +1299,7 @@ namespace Aaru.Core.Media.Info sense = dev.KreonExtractSs(out cmdBuf, out senseBuf, dev.Timeout, out _); if(sense) - DicConsole.DebugWriteLine("Media-Info command", "KREON EXTRACT SS:\n{0}", + AaruConsole.DebugWriteLine("Media-Info command", "KREON EXTRACT SS:\n{0}", Sense.PrettifySense(senseBuf)); else XboxSecuritySector = cmdBuf; @@ -1307,12 +1307,12 @@ namespace Aaru.Core.Media.Info DecodedXboxSecuritySector = SS.Decode(cmdBuf); // Get video partition size - DicConsole.DebugWriteLine("Dump-media command", "Getting video partition size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting video partition size"); sense = dev.KreonLock(out senseBuf, dev.Timeout, out _); if(sense) { - DicConsole.ErrorWriteLine("Cannot lock drive, not continuing."); + AaruConsole.ErrorWriteLine("Cannot lock drive, not continuing."); return; } @@ -1321,7 +1321,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Cannot get disc capacity."); + AaruConsole.ErrorWriteLine("Cannot get disc capacity."); return; } @@ -1334,12 +1334,12 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Cannot get PFI."); + AaruConsole.ErrorWriteLine("Cannot get PFI."); return; } - DicConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", + AaruConsole.DebugWriteLine("Dump-media command", "Video partition total size: {0} sectors", totalSize); ulong l0Video = (PFI.Decode(cmdBuf).Value.Layer0EndPSN - @@ -1348,12 +1348,12 @@ namespace Aaru.Core.Media.Info ulong l1Video = (totalSize - l0Video) + 1; // Get game partition size - DicConsole.DebugWriteLine("Dump-media command", "Getting game partition size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting game partition size"); sense = dev.KreonUnlockXtreme(out senseBuf, dev.Timeout, out _); if(sense) { - DicConsole.ErrorWriteLine("Cannot unlock drive, not continuing."); + AaruConsole.ErrorWriteLine("Cannot unlock drive, not continuing."); return; } @@ -1362,7 +1362,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Cannot get disc capacity."); + AaruConsole.ErrorWriteLine("Cannot get disc capacity."); return; } @@ -1370,16 +1370,16 @@ namespace Aaru.Core.Media.Info ulong gameSize = (ulong)((cmdBuf[0] << 24) + (cmdBuf[1] << 16) + (cmdBuf[2] << 8) + cmdBuf[3]) + 1; - DicConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", + AaruConsole.DebugWriteLine("Dump-media command", "Game partition total size: {0} sectors", gameSize); // Get middle zone size - DicConsole.DebugWriteLine("Dump-media command", "Getting middle zone size"); + AaruConsole.DebugWriteLine("Dump-media command", "Getting middle zone size"); sense = dev.KreonUnlockWxripper(out senseBuf, dev.Timeout, out _); if(sense) { - DicConsole.ErrorWriteLine("Cannot unlock drive, not continuing."); + AaruConsole.ErrorWriteLine("Cannot unlock drive, not continuing."); return; } @@ -1388,7 +1388,7 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Cannot get disc capacity."); + AaruConsole.ErrorWriteLine("Cannot get disc capacity."); return; } @@ -1400,12 +1400,12 @@ namespace Aaru.Core.Media.Info if(sense) { - DicConsole.ErrorWriteLine("Cannot get PFI."); + AaruConsole.ErrorWriteLine("Cannot get PFI."); return; } - DicConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", + AaruConsole.DebugWriteLine("Dump-media command", "Unlocked total size: {0} sectors", totalSize); ulong middleZone = diff --git a/Aaru.Core/Partitions.cs b/Aaru.Core/Partitions.cs index 8063ed7fa..f99bf8335 100644 --- a/Aaru.Core/Partitions.cs +++ b/Aaru.Core/Partitions.cs @@ -68,7 +68,7 @@ namespace Aaru.Core if(partitionPlugin.GetInformation(image, out List partitions, tapeFile.FirstBlock)) { foundPartitions.AddRange(partitions); - DicConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, + AaruConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, tapeFile.FirstBlock); } @@ -82,7 +82,7 @@ namespace Aaru.Core if(partitionPlugin.GetInformation(image, out List partitions, imagePartition.Start)) { foundPartitions.AddRange(partitions); - DicConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, + AaruConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, imagePartition.Start); } @@ -95,7 +95,7 @@ namespace Aaru.Core if(partitionPlugin.GetInformation(image, out List partitions, 0)) { foundPartitions.AddRange(partitions); - DicConsole.DebugWriteLine("Partitions", "Found {0} @ 0", partitionPlugin.Name); + AaruConsole.DebugWriteLine("Partitions", "Found {0} @ 0", partitionPlugin.Name); } checkedLocations.Add(0); @@ -114,19 +114,19 @@ namespace Aaru.Core foreach(IPartition partitionPlugin in plugins.PartPluginsList.Values) { - DicConsole.DebugWriteLine("Partitions", "Trying {0} @ {1}", partitionPlugin.Name, + AaruConsole.DebugWriteLine("Partitions", "Trying {0} @ {1}", partitionPlugin.Name, foundPartitions[0].Start); if(!partitionPlugin.GetInformation(image, out List partitions, foundPartitions[0].Start)) continue; - DicConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, + AaruConsole.DebugWriteLine("Partitions", "Found {0} @ {1}", partitionPlugin.Name, foundPartitions[0].Start); childs.AddRange(partitions); } checkedLocations.Add(foundPartitions[0].Start); - DicConsole.DebugWriteLine("Partitions", "Got {0} childs", childs.Count); + AaruConsole.DebugWriteLine("Partitions", "Got {0} childs", childs.Count); if(childs.Count > 0) { @@ -142,8 +142,8 @@ namespace Aaru.Core foundPartitions.RemoveAt(0); } - DicConsole.DebugWriteLine("Partitions", "Got {0} parents", foundPartitions.Count); - DicConsole.DebugWriteLine("Partitions", "Got {0} partitions", childPartitions.Count); + AaruConsole.DebugWriteLine("Partitions", "Got {0} parents", foundPartitions.Count); + AaruConsole.DebugWriteLine("Partitions", "Got {0} partitions", childPartitions.Count); } // Be sure that device partitions are not excluded if not mapped by any scheme... diff --git a/Aaru.Core/PrintScsiModePages.cs b/Aaru.Core/PrintScsiModePages.cs index 1873298a3..ba3ef3114 100644 --- a/Aaru.Core/PrintScsiModePages.cs +++ b/Aaru.Core/PrintScsiModePages.cs @@ -40,28 +40,28 @@ namespace Aaru.Core { public static void Print(Modes.DecodedMode decMode, PeripheralDeviceTypes devType, byte[] vendorId) { - DicConsole.WriteLine(Modes.PrettifyModeHeader(decMode.Header, devType)); + AaruConsole.WriteLine(Modes.PrettifyModeHeader(decMode.Header, devType)); if(decMode.Pages == null) return; foreach(Modes.ModePage page in decMode.Pages) - //DicConsole.WriteLine("Page {0:X2}h subpage {1:X2}h is {2} bytes long", page.Page, page.Subpage, page.PageResponse.Length); + //AaruConsole.WriteLine("Page {0:X2}h subpage {1:X2}h is {2} bytes long", page.Page, page.Subpage, page.PageResponse.Length); switch(page.Page) { case 0x00: { if(devType == PeripheralDeviceTypes.MultiMediaDevice && page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_00_SFF(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_00_SFF(page.PageResponse)); else { if(page.Subpage != 0) - DicConsole.WriteLine("Found unknown vendor mode page {0:X2}h subpage {1:X2}h", + AaruConsole.WriteLine("Found unknown vendor mode page {0:X2}h subpage {1:X2}h", page.Page, page.Subpage); else - DicConsole.WriteLine("Found unknown vendor mode page {0:X2}h", page.Page); + AaruConsole.WriteLine("Found unknown vendor mode page {0:X2}h", page.Page); } break; @@ -69,7 +69,7 @@ namespace Aaru.Core case 0x01: { if(page.Subpage == 0) - DicConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice + AaruConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice ? Modes.PrettifyModePage_01_MMC(page.PageResponse) : Modes.PrettifyModePage_01(page.PageResponse)); else @@ -80,7 +80,7 @@ namespace Aaru.Core case 0x02: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_02(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_02(page.PageResponse)); else goto default; @@ -89,7 +89,7 @@ namespace Aaru.Core case 0x03: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_03(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_03(page.PageResponse)); else goto default; @@ -98,7 +98,7 @@ namespace Aaru.Core case 0x04: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_04(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_04(page.PageResponse)); else goto default; @@ -107,7 +107,7 @@ namespace Aaru.Core case 0x05: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_05(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_05(page.PageResponse)); else goto default; @@ -116,7 +116,7 @@ namespace Aaru.Core case 0x06: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_06(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_06(page.PageResponse)); else goto default; @@ -125,7 +125,7 @@ namespace Aaru.Core case 0x07: { if(page.Subpage == 0) - DicConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice + AaruConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice ? Modes.PrettifyModePage_07_MMC(page.PageResponse) : Modes.PrettifyModePage_07(page.PageResponse)); else @@ -136,7 +136,7 @@ namespace Aaru.Core case 0x08: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_08(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_08(page.PageResponse)); else goto default; @@ -145,9 +145,9 @@ namespace Aaru.Core case 0x0A: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_0A(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0A(page.PageResponse)); else if(page.Subpage == 1) - DicConsole.WriteLine(Modes.PrettifyModePage_0A_S01(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0A_S01(page.PageResponse)); else goto default; @@ -156,7 +156,7 @@ namespace Aaru.Core case 0x0B: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_0B(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0B(page.PageResponse)); else goto default; @@ -165,7 +165,7 @@ namespace Aaru.Core case 0x0D: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_0D(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0D(page.PageResponse)); else goto default; @@ -174,7 +174,7 @@ namespace Aaru.Core case 0x0E: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_0E(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0E(page.PageResponse)); else goto default; @@ -183,7 +183,7 @@ namespace Aaru.Core case 0x0F: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_0F(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_0F(page.PageResponse)); else goto default; @@ -192,7 +192,7 @@ namespace Aaru.Core case 0x10: { if(page.Subpage == 0) - DicConsole.WriteLine(devType == PeripheralDeviceTypes.SequentialAccess + AaruConsole.WriteLine(devType == PeripheralDeviceTypes.SequentialAccess ? Modes.PrettifyModePage_10_SSC(page.PageResponse) : Modes.PrettifyModePage_10(page.PageResponse)); else @@ -203,7 +203,7 @@ namespace Aaru.Core case 0x11: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_11(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_11(page.PageResponse)); else goto default; @@ -214,7 +214,7 @@ namespace Aaru.Core case 0x14: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_12_13_14(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_12_13_14(page.PageResponse)); else goto default; @@ -223,9 +223,9 @@ namespace Aaru.Core case 0x1A: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_1A(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_1A(page.PageResponse)); else if(page.Subpage == 1) - DicConsole.WriteLine(Modes.PrettifyModePage_1A_S01(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_1A_S01(page.PageResponse)); else goto default; @@ -234,7 +234,7 @@ namespace Aaru.Core case 0x1B: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_1B(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_1B(page.PageResponse)); else goto default; @@ -243,11 +243,11 @@ namespace Aaru.Core case 0x1C: { if(page.Subpage == 0) - DicConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice + AaruConsole.WriteLine(devType == PeripheralDeviceTypes.MultiMediaDevice ? Modes.PrettifyModePage_1C_SFF(page.PageResponse) : Modes.PrettifyModePage_1C(page.PageResponse)); else if(page.Subpage == 1) - DicConsole.WriteLine(Modes.PrettifyModePage_1C_S01(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_1C_S01(page.PageResponse)); else goto default; @@ -256,7 +256,7 @@ namespace Aaru.Core case 0x1D: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_1D(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_1D(page.PageResponse)); else goto default; @@ -265,7 +265,7 @@ namespace Aaru.Core case 0x21: { if(StringHandlers.CToString(vendorId).Trim() == "CERTANCE") - DicConsole.WriteLine(Modes.PrettifyCertanceModePage_21(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyCertanceModePage_21(page.PageResponse)); else goto default; @@ -274,7 +274,7 @@ namespace Aaru.Core case 0x22: { if(StringHandlers.CToString(vendorId).Trim() == "CERTANCE") - DicConsole.WriteLine(Modes.PrettifyCertanceModePage_22(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyCertanceModePage_22(page.PageResponse)); else goto default; @@ -283,7 +283,7 @@ namespace Aaru.Core case 0x24: { if(StringHandlers.CToString(vendorId).Trim() == "IBM") - DicConsole.WriteLine(Modes.PrettifyIBMModePage_24(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyIBMModePage_24(page.PageResponse)); else goto default; @@ -292,7 +292,7 @@ namespace Aaru.Core case 0x2A: { if(page.Subpage == 0) - DicConsole.WriteLine(Modes.PrettifyModePage_2A(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyModePage_2A(page.PageResponse)); else goto default; @@ -301,7 +301,7 @@ namespace Aaru.Core case 0x2F: { if(StringHandlers.CToString(vendorId).Trim() == "IBM") - DicConsole.WriteLine(Modes.PrettifyIBMModePage_2F(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyIBMModePage_2F(page.PageResponse)); else goto default; @@ -310,7 +310,7 @@ namespace Aaru.Core case 0x30: { if(Modes.IsAppleModePage_30(page.PageResponse)) - DicConsole.WriteLine("Drive identifies as Apple OEM drive"); + AaruConsole.WriteLine("Drive identifies as Apple OEM drive"); else goto default; @@ -319,7 +319,7 @@ namespace Aaru.Core case 0x3B: { if(StringHandlers.CToString(vendorId).Trim() == "HP") - DicConsole.WriteLine(Modes.PrettifyHPModePage_3B(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyHPModePage_3B(page.PageResponse)); else goto default; @@ -328,7 +328,7 @@ namespace Aaru.Core case 0x3C: { if(StringHandlers.CToString(vendorId).Trim() == "HP") - DicConsole.WriteLine(Modes.PrettifyHPModePage_3C(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyHPModePage_3C(page.PageResponse)); else goto default; @@ -337,9 +337,9 @@ namespace Aaru.Core case 0x3D: { if(StringHandlers.CToString(vendorId).Trim() == "IBM") - DicConsole.WriteLine(Modes.PrettifyIBMModePage_3D(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyIBMModePage_3D(page.PageResponse)); else if(StringHandlers.CToString(vendorId).Trim() == "HP") - DicConsole.WriteLine(Modes.PrettifyHPModePage_3D(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyHPModePage_3D(page.PageResponse)); else goto default; @@ -348,9 +348,9 @@ namespace Aaru.Core case 0x3E: { if(StringHandlers.CToString(vendorId).Trim() == "FUJITSU") - DicConsole.WriteLine(Modes.PrettifyFujitsuModePage_3E(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyFujitsuModePage_3E(page.PageResponse)); else if(StringHandlers.CToString(vendorId).Trim() == "HP") - DicConsole.WriteLine(Modes.PrettifyHPModePage_3E(page.PageResponse)); + AaruConsole.WriteLine(Modes.PrettifyHPModePage_3E(page.PageResponse)); else goto default; @@ -359,10 +359,10 @@ namespace Aaru.Core default: { if(page.Subpage != 0) - DicConsole.WriteLine("Found unknown mode page {0:X2}h subpage {1:X2}h", page.Page, + AaruConsole.WriteLine("Found unknown mode page {0:X2}h subpage {1:X2}h", page.Page, page.Subpage); else - DicConsole.WriteLine("Found unknown mode page {0:X2}h", page.Page); + AaruConsole.WriteLine("Found unknown mode page {0:X2}h", page.Page); break; } diff --git a/Aaru.Core/Remote.cs b/Aaru.Core/Remote.cs index a1f6ffbe2..fdbcae346 100644 --- a/Aaru.Core/Remote.cs +++ b/Aaru.Core/Remote.cs @@ -68,7 +68,7 @@ namespace Aaru.Core #if DEBUG System.Console.WriteLine("Uploading device report"); #else - Aaru.Console.DicConsole.DebugWriteLine("Submit stats", "Uploading device report"); + Aaru.Console.AaruConsole.DebugWriteLine("Submit stats", "Uploading device report"); #endif string json = JsonConvert.SerializeObject(report, Formatting.Indented, @@ -140,12 +140,12 @@ namespace Aaru.Core if(lastUpdate == 0) { create = true; - DicConsole.WriteLine("Creating master database"); + AaruConsole.WriteLine("Creating master database"); } else { - DicConsole.WriteLine("Updating master database"); - DicConsole.WriteLine("Last update: {0}", latest); + AaruConsole.WriteLine("Updating master database"); + AaruConsole.WriteLine("Last update: {0}", latest); } DateTime updateStart = DateTime.UtcNow; @@ -159,7 +159,7 @@ namespace Aaru.Core if(((HttpWebResponse)response).StatusCode != HttpStatusCode.OK) { - DicConsole.ErrorWriteLine("Error {0} when trying to get updated entities.", + AaruConsole.ErrorWriteLine("Error {0} when trying to get updated entities.", ((HttpWebResponse)response).StatusCode); return; } @@ -170,28 +170,28 @@ namespace Aaru.Core if(create) { - DicConsole.WriteLine("Adding USB vendors"); + AaruConsole.WriteLine("Adding USB vendors"); foreach(UsbVendorDto vendor in sync.UsbVendors) mctx.UsbVendors.Add(new UsbVendor(vendor.VendorId, vendor.Vendor)); - DicConsole.WriteLine("Added {0} usb vendors", sync.UsbVendors.Count); + AaruConsole.WriteLine("Added {0} usb vendors", sync.UsbVendors.Count); - DicConsole.WriteLine("Adding USB products"); + AaruConsole.WriteLine("Adding USB products"); foreach(UsbProductDto product in sync.UsbProducts) mctx.UsbProducts.Add(new UsbProduct(product.VendorId, product.ProductId, product.Product)); - DicConsole.WriteLine("Added {0} usb products", sync.UsbProducts.Count); + AaruConsole.WriteLine("Added {0} usb products", sync.UsbProducts.Count); - DicConsole.WriteLine("Adding CompactDisc read offsets"); + AaruConsole.WriteLine("Adding CompactDisc read offsets"); foreach(CdOffsetDto offset in sync.Offsets) mctx.CdOffsets.Add(new CdOffset(offset) {Id = offset.Id}); - DicConsole.WriteLine("Added {0} CompactDisc read offsets", sync.Offsets.Count); + AaruConsole.WriteLine("Added {0} CompactDisc read offsets", sync.Offsets.Count); - DicConsole.WriteLine("Adding known devices"); + AaruConsole.WriteLine("Adding known devices"); foreach(DeviceDto device in sync.Devices) mctx.Devices.Add(new Device(device) {Id = device.Id}); - DicConsole.WriteLine("Added {0} known devices", sync.Devices.Count); + AaruConsole.WriteLine("Added {0} known devices", sync.Devices.Count); } else { @@ -204,7 +204,7 @@ namespace Aaru.Core long modifiedOffsets = 0; long modifiedDevices = 0; - DicConsole.WriteLine("Updating USB vendors"); + AaruConsole.WriteLine("Updating USB vendors"); foreach(UsbVendorDto vendor in sync.UsbVendors) { UsbVendor existing = mctx.UsbVendors.FirstOrDefault(v => v.Id == vendor.VendorId); @@ -223,10 +223,10 @@ namespace Aaru.Core } } - DicConsole.WriteLine("Added {0} USB vendors", addedVendors); - DicConsole.WriteLine("Modified {0} USB vendors", modifiedVendors); + AaruConsole.WriteLine("Added {0} USB vendors", addedVendors); + AaruConsole.WriteLine("Modified {0} USB vendors", modifiedVendors); - DicConsole.WriteLine("Updating USB products"); + AaruConsole.WriteLine("Updating USB products"); foreach(UsbProductDto product in sync.UsbProducts) { UsbProduct existing = @@ -247,10 +247,10 @@ namespace Aaru.Core } } - DicConsole.WriteLine("Added {0} USB products", addedProducts); - DicConsole.WriteLine("Modified {0} USB products", modifiedProducts); + AaruConsole.WriteLine("Added {0} USB products", addedProducts); + AaruConsole.WriteLine("Modified {0} USB products", modifiedProducts); - DicConsole.WriteLine("Updating CompactDisc read offsets"); + AaruConsole.WriteLine("Updating CompactDisc read offsets"); foreach(CdOffsetDto offset in sync.Offsets) { CdOffset existing = mctx.CdOffsets.FirstOrDefault(o => o.Id == offset.Id); @@ -273,10 +273,10 @@ namespace Aaru.Core } } - DicConsole.WriteLine("Added {0} CompactDisc read offsets", addedOffsets); - DicConsole.WriteLine("Modified {0} CompactDisc read offsets", modifiedOffsets); + AaruConsole.WriteLine("Added {0} CompactDisc read offsets", addedOffsets); + AaruConsole.WriteLine("Modified {0} CompactDisc read offsets", modifiedOffsets); - DicConsole.WriteLine("Updating known devices"); + AaruConsole.WriteLine("Updating known devices"); foreach(DeviceDto device in sync.Devices) { Device existing = mctx.Devices.FirstOrDefault(d => d.Id == device.Id); @@ -305,14 +305,14 @@ namespace Aaru.Core } } - DicConsole.WriteLine("Added {0} known devices", addedDevices); - DicConsole.WriteLine("Modified {0} known devices", modifiedDevices); + AaruConsole.WriteLine("Added {0} known devices", addedDevices); + AaruConsole.WriteLine("Modified {0} known devices", modifiedDevices); } } - catch(Exception ex) { DicConsole.ErrorWriteLine("Exception {0} when updating database.", ex); } + catch(Exception ex) { AaruConsole.ErrorWriteLine("Exception {0} when updating database.", ex); } finally { - DicConsole.WriteLine("Saving changes..."); + AaruConsole.WriteLine("Saving changes..."); mctx.SaveChanges(); } } diff --git a/Aaru.Core/Sidecar/BlockMedia.cs b/Aaru.Core/Sidecar/BlockMedia.cs index 16ebc9508..92f9c4047 100644 --- a/Aaru.Core/Sidecar/BlockMedia.cs +++ b/Aaru.Core/Sidecar/BlockMedia.cs @@ -607,7 +607,7 @@ namespace Aaru.Core catch #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body { - //DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); + //AaruConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); } if(lstFs.Count > 0) @@ -660,7 +660,7 @@ namespace Aaru.Core catch #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body { - //DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); + //AaruConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); } if(lstFs.Count > 0) @@ -915,11 +915,11 @@ namespace Aaru.Core scpBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray(); } else - DicConsole. + AaruConsole. ErrorWriteLine("SuperCardPro image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...", scpImage.Header.end + 1, image.Info.Cylinders); else - DicConsole. + AaruConsole. ErrorWriteLine("SuperCardPro image do not contain same number of heads ({0}) than disk image ({1}), ignoring...", 2, image.Info.Heads); } @@ -1019,11 +1019,11 @@ namespace Aaru.Core kfBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray(); } else - DicConsole. + AaruConsole. ErrorWriteLine("KryoFlux image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...", kfImage.Info.Cylinders, image.Info.Cylinders); else - DicConsole. + AaruConsole. ErrorWriteLine("KryoFluximage do not contain same number of heads ({0}) than disk image ({1}), ignoring...", kfImage.Info.Heads, image.Info.Heads); } @@ -1104,11 +1104,11 @@ namespace Aaru.Core dfiBlockTrackTypes.OrderBy(t => t.Cylinder).ThenBy(t => t.Head).ToArray(); } else - DicConsole. + AaruConsole. ErrorWriteLine("DiscFerret image do not contain same number of tracks ({0}) than disk image ({1}), ignoring...", dfiImage.Info.Cylinders, image.Info.Cylinders); else - DicConsole. + AaruConsole. ErrorWriteLine("DiscFerret image do not contain same number of heads ({0}) than disk image ({1}), ignoring...", dfiImage.Info.Heads, image.Info.Heads); #endregion diff --git a/Aaru.Core/Sidecar/Files.cs b/Aaru.Core/Sidecar/Files.cs index 4f34946cb..c2794cdb3 100644 --- a/Aaru.Core/Sidecar/Files.cs +++ b/Aaru.Core/Sidecar/Files.cs @@ -26,7 +26,7 @@ namespace Aaru.Core if(ret != Errno.NoError) { - DicConsole.DebugWriteLine("Create-Sidecar command", "Cannot stat {0}", dirent); + AaruConsole.DebugWriteLine("Create-Sidecar command", "Cannot stat {0}", dirent); continue; } @@ -123,7 +123,7 @@ namespace Aaru.Core if(ret != Errno.NoError) { - DicConsole.DebugWriteLine("Create-Sidecar command", "Cannot stat {0}", dirent); + AaruConsole.DebugWriteLine("Create-Sidecar command", "Cannot stat {0}", dirent); continue; } diff --git a/Aaru.Core/Sidecar/OpticalDisc.cs b/Aaru.Core/Sidecar/OpticalDisc.cs index 641d13301..f8896812e 100644 --- a/Aaru.Core/Sidecar/OpticalDisc.cs +++ b/Aaru.Core/Sidecar/OpticalDisc.cs @@ -763,7 +763,7 @@ namespace Aaru.Core catch #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body { - //DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); + //AaruConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); } if(lstFs.Count > 0) @@ -826,7 +826,7 @@ namespace Aaru.Core catch #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body { - //DicConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); + //AaruConsole.DebugWriteLine("Create-sidecar command", "Plugin {0} crashed", _plugin.Name); } if(lstFs.Count > 0) diff --git a/Aaru.Core/Sidecar/Sidecar.cs b/Aaru.Core/Sidecar/Sidecar.cs index 34c87cba1..9e31207f8 100644 --- a/Aaru.Core/Sidecar/Sidecar.cs +++ b/Aaru.Core/Sidecar/Sidecar.cs @@ -145,9 +145,9 @@ namespace Aaru.Core encoding); else { - DicConsole + AaruConsole .ErrorWriteLine("The specified image says it contains an optical media but at the same time says it does not support them."); - DicConsole.ErrorWriteLine("Please open an issue at Github."); + AaruConsole.ErrorWriteLine("Please open an issue at Github."); } break; diff --git a/Aaru.Core/Statistics.cs b/Aaru.Core/Statistics.cs index b06550cf1..4dc7cd18c 100644 --- a/Aaru.Core/Statistics.cs +++ b/Aaru.Core/Statistics.cs @@ -735,7 +735,7 @@ namespace Aaru.Core #if DEBUG System.Console.WriteLine("Uploading statistics"); #else - Aaru.Console.DicConsole.DebugWriteLine("Submit stats", "Uploading statistics"); + Aaru.Console.AaruConsole.DebugWriteLine("Submit stats", "Uploading statistics"); #endif string json = JsonConvert.SerializeObject(dto, Formatting.Indented, new JsonSerializerSettings @@ -1088,7 +1088,7 @@ namespace Aaru.Core #if DEBUG System.Console.WriteLine("Uploading partial statistics file {0}", statsFile); #else - Aaru.Console.DicConsole.DebugWriteLine("Submit stats", "Uploading partial statistics file {0}", statsFile); + Aaru.Console.AaruConsole.DebugWriteLine("Submit stats", "Uploading partial statistics file {0}", statsFile); #endif var fs = new FileStream(statsFile, FileMode.Open, FileAccess.Read); diff --git a/Aaru.Decoders b/Aaru.Decoders index 50ac5a342..339b235cd 160000 --- a/Aaru.Decoders +++ b/Aaru.Decoders @@ -1 +1 @@ -Subproject commit 50ac5a34250d3de10bebad677065525304757639 +Subproject commit 339b235cd7c81e689af724fe2ced693e75a56fe5 diff --git a/Aaru.Devices/Device/AtaCommands/Ata28.cs b/Aaru.Devices/Device/AtaCommands/Ata28.cs index 6b392690d..9ce61dde7 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata28.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata28.cs @@ -49,7 +49,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ BUFFER took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ BUFFER took {0} ms.", duration); return sense; } @@ -64,7 +64,7 @@ namespace Aaru.Devices ref buffer, timeout, false, out duration, out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ BUFFER DMA took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ BUFFER DMA took {0} ms.", duration); return sense; } @@ -94,7 +94,7 @@ namespace Aaru.Devices ref buffer, timeout, true, out duration, out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration); return sense; } @@ -121,7 +121,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration); return sense; } @@ -150,7 +150,7 @@ namespace Aaru.Devices lba += statusRegisters.LbaLow; } - DicConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS took {0} ms.", duration); return sense; } @@ -181,7 +181,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration); return sense; } @@ -213,7 +213,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration); return sense; } @@ -238,7 +238,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/Ata48.cs b/Aaru.Devices/Device/AtaCommands/Ata48.cs index 5562a4ad3..124652d9e 100644 --- a/Aaru.Devices/Device/AtaCommands/Ata48.cs +++ b/Aaru.Devices/Device/AtaCommands/Ata48.cs @@ -59,7 +59,7 @@ namespace Aaru.Devices lba += statusRegisters.LbaLow; } - DicConsole.DebugWriteLine("ATA Device", "GET NATIVE MAX ADDRESS EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "GET NATIVE MAX ADDRESS EXT took {0} ms.", duration); return sense; } @@ -84,7 +84,7 @@ namespace Aaru.Devices ref buffer, timeout, true, out duration, out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ DMA EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ DMA EXT took {0} ms.", duration); return sense; } @@ -110,7 +110,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ LOG EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ LOG EXT took {0} ms.", duration); return sense; } @@ -135,7 +135,7 @@ namespace Aaru.Devices ref buffer, timeout, true, out duration, out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ LOG DMA EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ LOG DMA EXT took {0} ms.", duration); return sense; } @@ -162,7 +162,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ MULTIPLE EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE EXT took {0} ms.", duration); return sense; } @@ -190,7 +190,7 @@ namespace Aaru.Devices lba += statusRegisters.LbaLow; } - DicConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ NATIVE MAX ADDRESS EXT took {0} ms.", duration); return sense; } @@ -216,7 +216,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ SECTORS EXT took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS EXT took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs index 8a4c7808c..b0944420c 100644 --- a/Aaru.Devices/Device/AtaCommands/AtaCHS.cs +++ b/Aaru.Devices/Device/AtaCommands/AtaCHS.cs @@ -86,7 +86,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "IDENTIFY DEVICE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "IDENTIFY DEVICE took {0} ms.", duration); return sense; } @@ -117,7 +117,7 @@ namespace Aaru.Devices ref buffer, timeout, true, out duration, out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ DMA took {0} ms.", duration); return sense; } @@ -143,7 +143,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ MULTIPLE took {0} ms.", duration); return sense; } @@ -174,7 +174,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ SECTORS took {0} ms.", duration); return sense; } @@ -207,7 +207,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "READ LONG took {0} ms.", duration); return sense; } @@ -230,7 +230,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SEEK took {0} ms.", duration); return sense; } @@ -260,7 +260,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SET FEATURES took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SET FEATURES took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/Atapi.cs b/Aaru.Devices/Device/AtaCommands/Atapi.cs index 6687a8b74..7dca4adfe 100644 --- a/Aaru.Devices/Device/AtaCommands/Atapi.cs +++ b/Aaru.Devices/Device/AtaCommands/Atapi.cs @@ -86,7 +86,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "IDENTIFY PACKET DEVICE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "IDENTIFY PACKET DEVICE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/Cfa.cs b/Aaru.Devices/Device/AtaCommands/Cfa.cs index 98f03ae93..8cb1c03b3 100644 --- a/Aaru.Devices/Device/AtaCommands/Cfa.cs +++ b/Aaru.Devices/Device/AtaCommands/Cfa.cs @@ -58,7 +58,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration); return sense; } @@ -83,7 +83,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "CFA TRANSLATE SECTOR took {0} ms.", duration); return sense; } @@ -102,7 +102,7 @@ namespace Aaru.Devices errorCode = statusRegisters.Error; - DicConsole.DebugWriteLine("ATA Device", "CFA REQUEST EXTENDED ERROR CODE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "CFA REQUEST EXTENDED ERROR CODE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/MCPT.cs b/Aaru.Devices/Device/AtaCommands/MCPT.cs index e16809953..1b29363ac 100644 --- a/Aaru.Devices/Device/AtaCommands/MCPT.cs +++ b/Aaru.Devices/Device/AtaCommands/MCPT.cs @@ -58,7 +58,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "CHECK MEDIA CARD TYPE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "CHECK MEDIA CARD TYPE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/AtaCommands/Smart.cs b/Aaru.Devices/Device/AtaCommands/Smart.cs index da329dd07..b598e0df1 100644 --- a/Aaru.Devices/Device/AtaCommands/Smart.cs +++ b/Aaru.Devices/Device/AtaCommands/Smart.cs @@ -54,7 +54,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART DISABLE OPERATIONS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART DISABLE OPERATIONS took {0} ms.", duration); return sense; } @@ -78,7 +78,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART ENABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART ENABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration); return sense; } @@ -101,7 +101,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART DISABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART DISABLE ATTRIBUTE AUTOSAVE took {0} ms.", duration); return sense; } @@ -123,7 +123,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART ENABLE OPERATIONS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART ENABLE OPERATIONS took {0} ms.", duration); return sense; } @@ -147,7 +147,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART EXECUTE OFF-LINE IMMEDIATE took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART EXECUTE OFF-LINE IMMEDIATE took {0} ms.", duration); return sense; } @@ -170,7 +170,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART READ DATA took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART READ DATA took {0} ms.", duration); return sense; } @@ -194,7 +194,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART READ LOG took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART READ LOG took {0} ms.", duration); return sense; } @@ -216,7 +216,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("ATA Device", "SMART RETURN STATUS took {0} ms.", duration); + AaruConsole.DebugWriteLine("ATA Device", "SMART RETURN STATUS took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/List.cs b/Aaru.Devices/Device/List.cs index 58b81283a..9706a0609 100644 --- a/Aaru.Devices/Device/List.cs +++ b/Aaru.Devices/Device/List.cs @@ -106,7 +106,7 @@ namespace Aaru.Devices } catch(Exception) { - DicConsole.ErrorWriteLine("Error connecting to host."); + AaruConsole.ErrorWriteLine("Error connecting to host."); return new DeviceInfo[0]; } diff --git a/Aaru.Devices/Device/MmcCommands/MMC.cs b/Aaru.Devices/Device/MmcCommands/MMC.cs index 7136bcf34..3fb83a370 100644 --- a/Aaru.Devices/Device/MmcCommands/MMC.cs +++ b/Aaru.Devices/Device/MmcCommands/MMC.cs @@ -48,7 +48,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("MMC Device", "SEND_CSD took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", "SEND_CSD took {0} ms.", duration); return sense; } @@ -65,7 +65,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("MMC Device", "SEND_CID took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", "SEND_CID took {0} ms.", duration); return sense; } @@ -82,7 +82,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("SecureDigital Device", "SEND_OP_COND took {0} ms.", duration); + AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_OP_COND took {0} ms.", duration); return sense; } @@ -99,7 +99,7 @@ namespace Aaru.Devices out response, out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("MMC Device", "SEND_EXT_CSD took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", "SEND_EXT_CSD took {0} ms.", duration); return sense; } @@ -116,7 +116,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("MMC Device", "SET_BLOCKLEN took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", "SET_BLOCKLEN took {0} ms.", duration); return sense; } @@ -150,9 +150,9 @@ namespace Aaru.Devices out _, out double stopDuration, out bool _, timeout); duration += stopDuration; - DicConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration); + AaruConsole.DebugWriteLine("MMC Device", "READ_MULTIPLE_BLOCK took {0} ms.", duration); } - else DicConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration); + else AaruConsole.DebugWriteLine("MMC Device", "READ_SINGLE_BLOCK took {0} ms.", duration); return sense; } @@ -169,7 +169,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("SecureDigital Device", "SEND_STATUS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_STATUS took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/MmcCommands/SecureDigital.cs b/Aaru.Devices/Device/MmcCommands/SecureDigital.cs index 489e20292..fd6fedd49 100644 --- a/Aaru.Devices/Device/MmcCommands/SecureDigital.cs +++ b/Aaru.Devices/Device/MmcCommands/SecureDigital.cs @@ -48,7 +48,7 @@ namespace Aaru.Devices out response, out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("SecureDigital Device", "SD_STATUS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SecureDigital Device", "SD_STATUS took {0} ms.", duration); return sense; } @@ -65,7 +65,7 @@ namespace Aaru.Devices out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("SecureDigital Device", "SD_SEND_OP_COND took {0} ms.", duration); + AaruConsole.DebugWriteLine("SecureDigital Device", "SD_SEND_OP_COND took {0} ms.", duration); return sense; } @@ -82,7 +82,7 @@ namespace Aaru.Devices out response, out duration, out bool sense, timeout); Error = LastError != 0; - DicConsole.DebugWriteLine("SecureDigital Device", "SEND_SCR took {0} ms.", duration); + AaruConsole.DebugWriteLine("SecureDigital Device", "SEND_SCR took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Adaptec.cs b/Aaru.Devices/Device/ScsiCommands/Adaptec.cs index 32c32422f..42aa91f87 100644 --- a/Aaru.Devices/Device/ScsiCommands/Adaptec.cs +++ b/Aaru.Devices/Device/ScsiCommands/Adaptec.cs @@ -76,7 +76,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ADAPTEC TRANSLATE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC TRANSLATE took {0} ms.", duration); return sense; } @@ -118,7 +118,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ADAPTEC SET ERROR THRESHOLD took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC SET ERROR THRESHOLD took {0} ms.", duration); return sense; } @@ -157,7 +157,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ/RESET USAGE COUNTER took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ/RESET USAGE COUNTER took {0} ms.", duration); return sense; } @@ -183,7 +183,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ADAPTEC WRITE DATA BUFFER took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC WRITE DATA BUFFER took {0} ms.", duration); return sense; } @@ -207,7 +207,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ DATA BUFFER took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ADAPTEC READ DATA BUFFER took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs b/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs index f2e49b842..9fb50c450 100644 --- a/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs +++ b/Aaru.Devices/Device/ScsiCommands/ArchiveCorp.cs @@ -61,7 +61,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. REQUEST BLOCK ADDRESS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. REQUEST BLOCK ADDRESS took {0} ms.", duration); return sense; } @@ -101,7 +101,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. SEEK BLOCK took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "ARCHIVE CORP. SEEK BLOCK took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Certance.cs b/Aaru.Devices/Device/ScsiCommands/Certance.cs index a2702a1d3..f829518e2 100644 --- a/Aaru.Devices/Device/ScsiCommands/Certance.cs +++ b/Aaru.Devices/Device/ScsiCommands/Certance.cs @@ -76,7 +76,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "CERTANCE PARK UNPARK took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "CERTANCE PARK UNPARK took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs b/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs index 3ec6aaf2c..0df264d4c 100644 --- a/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs +++ b/Aaru.Devices/Device/ScsiCommands/Fujitsu.cs @@ -84,7 +84,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "FUJITSU DISPLAY took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "FUJITSU DISPLAY took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs b/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs index 0cb727fe7..8dcf92b89 100644 --- a/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs +++ b/Aaru.Devices/Device/ScsiCommands/HL-DT-ST.cs @@ -69,7 +69,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "HL-DT-ST READ DVD (RAW) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "HL-DT-ST READ DVD (RAW) took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/HP.cs b/Aaru.Devices/Device/ScsiCommands/HP.cs index c15a8b95a..4beadc990 100644 --- a/Aaru.Devices/Device/ScsiCommands/HP.cs +++ b/Aaru.Devices/Device/ScsiCommands/HP.cs @@ -95,7 +95,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "HP READ LONG took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "HP READ LONG took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Kreon.cs b/Aaru.Devices/Device/ScsiCommands/Kreon.cs index a026ea437..e0f4dccd8 100644 --- a/Aaru.Devices/Device/ScsiCommands/Kreon.cs +++ b/Aaru.Devices/Device/ScsiCommands/Kreon.cs @@ -59,7 +59,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "KREON DEPRECATED UNLOCK took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "KREON DEPRECATED UNLOCK took {0} ms.", duration); return sense; } @@ -118,7 +118,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "KREON SET LOCK STATE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "KREON SET LOCK STATE took {0} ms.", duration); return sense; } @@ -148,7 +148,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "KREON GET FEATURE LIST took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "KREON GET FEATURE LIST took {0} ms.", duration); if(sense) return true; @@ -231,7 +231,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "KREON EXTRACT SS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "KREON EXTRACT SS took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/MMC.cs b/Aaru.Devices/Device/ScsiCommands/MMC.cs index 1d60752df..66f21ff70 100644 --- a/Aaru.Devices/Device/ScsiCommands/MMC.cs +++ b/Aaru.Devices/Device/ScsiCommands/MMC.cs @@ -101,7 +101,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "GET CONFIGURATION (Starting Feature Number: {1}, Return Type: {2}, Sense: {3}, Last Error: {4}) took {0} ms.", duration, startingFeatureNumber, rt, sense, LastError); @@ -190,7 +190,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ DISC STRUCTURE (Media Type: {1}, Address: {2}, Layer Number: {3}, Format: {4}, AGID: {5}, Sense: {6}, Last Error: {7}) took {0} ms.", duration, mediaType, address, layerNumber, format, agid, sense, LastError); @@ -316,7 +316,7 @@ namespace Aaru.Devices { Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length); - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.", duration, msf, format, trackSessionNumber, sense, LastError); @@ -332,7 +332,7 @@ namespace Aaru.Devices duration += tmpDuration; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ TOC/PMA/ATIP took (MSF: {1}, Format: {2}, Track/Session Number: {3}, Sense: {4}, LastError: {5}) {0} ms.", duration, msf, format, trackSessionNumber, sense, LastError); @@ -381,7 +381,7 @@ namespace Aaru.Devices buffer = new byte[strctLength]; Array.Copy(tmpBuffer, 0, buffer, 0, buffer.Length); - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ DISC INFORMATION (Data Type: {1}, Sense: {2}, Last Error: {3}) took {0} ms.", duration, dataType, sense, LastError); @@ -451,7 +451,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ CD (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Expected Sector Type: {4}, DAP: {5}, Relative Address: {6}, Sync: {7}, Headers: {8}, User Data: {9}, ECC/EDC: {10}, C2: {11}, Subchannel: {12}, Sense: {13}, Last Error: {14}) took {0} ms.", duration, lba, blockSize, transferLength, expectedSectorType, dap, relAddr, sync, headerCodes, userData, edcEcc, c2Error, subchannel, sense, LastError); @@ -519,7 +519,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ CD MSF (Start MSF: {1}, End MSF: {2}, Block Size: {3}, Expected Sector Type: {4}, DAP: {5}, Sync: {6}, Headers: {7}, User Data: {8}, ECC/EDC: {9}, C2: {10}, Subchannel: {11}, Sense: {12}, LastError: {13}) took {0} ms.", duration, startMsf, endMsf, blockSize, expectedSectorType, dap, sync, headerCodes, userData, edcEcc, c2Error, subchannel, sense, LastError); @@ -553,7 +553,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL (Persistent: {1}, Prevent: {2}, Sense: {3}, LastError: {4}) took {0} ms.", duration, persistent, prevent, sense, LastError); @@ -605,7 +605,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "START STOP UNIT (Immediate: {1}, FormatLayer: {2}, Power Conditions: {3}, Change Format Layer: {4}, Load/Eject: {5}, Start: {6}, Sense: {7}, Last Error: {8}) took {0} ms.", duration, immediate, formatLayer, powerConditions, changeFormatLayer, loadEject, start, sense, LastError); @@ -634,7 +634,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (MCN, Sense {1}, Last Error {2}) took {0} ms.", duration, sense, LastError); @@ -667,7 +667,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "READ READ SUB-CHANNEL (ISRC, Track Number: {1}, Sense: {2}, Last Error: {3}) took {0} ms.", duration, trackNumber, sense, LastError); @@ -697,7 +697,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "SET CD SPEED (Rotational Control: {1}, Read Speed: {2}, Write Speed: {3}, Sense: {4}, Last Error: {5}) took {0} ms.", duration, rotationalControl, readSpeed, writeSpeed, sense, LastError); diff --git a/Aaru.Devices/Device/ScsiCommands/NEC.cs b/Aaru.Devices/Device/ScsiCommands/NEC.cs index 2fa1ba3d0..446cd23b8 100644 --- a/Aaru.Devices/Device/ScsiCommands/NEC.cs +++ b/Aaru.Devices/Device/ScsiCommands/NEC.cs @@ -66,7 +66,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ CD-DA took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ CD-DA took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Pioneer.cs b/Aaru.Devices/Device/ScsiCommands/Pioneer.cs index cd398a3cb..7737705d6 100644 --- a/Aaru.Devices/Device/ScsiCommands/Pioneer.cs +++ b/Aaru.Devices/Device/ScsiCommands/Pioneer.cs @@ -71,7 +71,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA took {0} ms.", duration); return sense; } @@ -112,7 +112,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA MSF took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-DA MSF took {0} ms.", duration); return sense; } @@ -168,7 +168,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-XA took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PIONEER READ CD-XA took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Plasmon.cs b/Aaru.Devices/Device/ScsiCommands/Plasmon.cs index d9836626d..2f057d613 100644 --- a/Aaru.Devices/Device/ScsiCommands/Plasmon.cs +++ b/Aaru.Devices/Device/ScsiCommands/Plasmon.cs @@ -105,7 +105,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLASMON READ SECTOR LOCATION took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLASMON READ SECTOR LOCATION took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/Plextor.cs b/Aaru.Devices/Device/ScsiCommands/Plextor.cs index a9b30bd43..9a0ef43fd 100644 --- a/Aaru.Devices/Device/ScsiCommands/Plextor.cs +++ b/Aaru.Devices/Device/ScsiCommands/Plextor.cs @@ -71,7 +71,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", + AaruConsole.DebugWriteLine("SCSI Device", "Plextor READ CD-DA (LBA: {1}, Block Size: {2}, Transfer Length: {3}, Subchannel: {4}, Sense: {5}, Last Error: {6}) took {0} ms.", duration, lba, blockSize, transferLength, subchannel, sense, LastError); @@ -107,7 +107,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "Plextor READ DVD (RAW) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "Plextor READ DVD (RAW) took {0} ms.", duration); return sense; } @@ -132,7 +132,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); return sense; } @@ -157,7 +157,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); return sense; } @@ -188,7 +188,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR READ EEPROM took {0} ms.", duration); return sense; } @@ -220,7 +220,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration); if(sense || Error) return sense; @@ -258,7 +258,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR POWEREC GET SPEEDS took {0} ms.", duration); if(sense || Error) return sense; @@ -292,7 +292,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SILENT MODE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SILENT MODE took {0} ms.", duration); return sense; } @@ -319,7 +319,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET GIGAREC took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET GIGAREC took {0} ms.", duration); return sense; } @@ -353,7 +353,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET VARIREC took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET VARIREC took {0} ms.", duration); return sense; } @@ -379,7 +379,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SECUREC took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SECUREC took {0} ms.", duration); return sense; } @@ -406,7 +406,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SPEEDREAD took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SPEEDREAD took {0} ms.", duration); return sense; } @@ -433,7 +433,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SINGLE-SESSION / HIDE CD-R took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET SINGLE-SESSION / HIDE CD-R took {0} ms.", duration); return sense; } @@ -467,7 +467,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET BOOK BITSETTING took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET BOOK BITSETTING took {0} ms.", duration); return sense; } @@ -495,7 +495,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET TEST WRITE DVD+ took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PLEXTOR GET TEST WRITE DVD+ took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SBC.cs b/Aaru.Devices/Device/ScsiCommands/SBC.cs index 3ffccca4e..79ec7262d 100644 --- a/Aaru.Devices/Device/ScsiCommands/SBC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SBC.cs @@ -81,7 +81,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration); return sense; } @@ -138,7 +138,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (10) took {0} ms.", duration); return sense; } @@ -199,7 +199,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (12) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (12) took {0} ms.", duration); return sense; } @@ -263,7 +263,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration); return sense; } @@ -306,7 +306,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ LONG (10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ LONG (10) took {0} ms.", duration); return sense; } @@ -352,7 +352,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ LONG (16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ LONG (16) took {0} ms.", duration); return sense; } @@ -379,7 +379,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "SEEK (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "SEEK (6) took {0} ms.", duration); return sense; } @@ -407,7 +407,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "SEEK (10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "SEEK (10) took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SMC.cs b/Aaru.Devices/Device/ScsiCommands/SMC.cs index eec16082f..758192fb8 100644 --- a/Aaru.Devices/Device/ScsiCommands/SMC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SMC.cs @@ -93,7 +93,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ ATTRIBUTE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ ATTRIBUTE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SPC.cs b/Aaru.Devices/Device/ScsiCommands/SPC.cs index 4e5cd29d8..e8c547978 100644 --- a/Aaru.Devices/Device/ScsiCommands/SPC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SPC.cs @@ -99,7 +99,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration); return sense; } @@ -170,7 +170,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "INQUIRY took {0} ms.", duration); return sense; } @@ -192,7 +192,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "TEST UNIT READY took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "TEST UNIT READY took {0} ms.", duration); return sense; } @@ -269,7 +269,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "MODE SENSE(6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "MODE SENSE(6) took {0} ms.", duration); return sense; } @@ -356,7 +356,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "MODE SENSE(10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "MODE SENSE(10) took {0} ms.", duration); return sense; } @@ -421,7 +421,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "PREVENT ALLOW MEDIUM REMOVAL took {0} ms.", duration); return sense; } @@ -472,7 +472,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ CAPACITY took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ CAPACITY took {0} ms.", duration); return sense; } @@ -531,7 +531,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ CAPACITY(16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ CAPACITY(16) took {0} ms.", duration); return sense; } @@ -575,7 +575,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ MEDIA SERIAL NUMBER took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ MEDIA SERIAL NUMBER took {0} ms.", duration); return sense; } @@ -720,7 +720,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "MODE SELECT(6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "MODE SELECT(6) took {0} ms.", duration); return sense; } @@ -765,7 +765,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "MODE SELECT(10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "MODE SELECT(10) took {0} ms.", duration); return sense; } @@ -789,7 +789,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "REQUEST SENSE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "REQUEST SENSE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SSC.cs b/Aaru.Devices/Device/ScsiCommands/SSC.cs index c52047745..8aa322db2 100644 --- a/Aaru.Devices/Device/ScsiCommands/SSC.cs +++ b/Aaru.Devices/Device/ScsiCommands/SSC.cs @@ -90,7 +90,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "LOAD UNLOAD (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "LOAD UNLOAD (6) took {0} ms.", duration); return sense; } @@ -173,7 +173,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "LOCATE (10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "LOCATE (10) took {0} ms.", duration); return sense; } @@ -267,7 +267,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "LOCATE (16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "LOCATE (16) took {0} ms.", duration); return sense; } @@ -336,7 +336,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (6) took {0} ms.", duration); return sense; } @@ -454,7 +454,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ (16) took {0} ms.", duration); return sense; } @@ -478,7 +478,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ BLOCK LIMITS took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ BLOCK LIMITS took {0} ms.", duration); return sense; } @@ -570,7 +570,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ POSITION took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ POSITION took {0} ms.", duration); return sense; } @@ -642,7 +642,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ REVERSE (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ REVERSE (6) took {0} ms.", duration); return sense; } @@ -765,7 +765,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "READ REVERSE (16) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "READ REVERSE (16) took {0} ms.", duration); return sense; } @@ -835,7 +835,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "RECOVER BUFFERED DATA took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "RECOVER BUFFERED DATA took {0} ms.", duration); return sense; } @@ -901,7 +901,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "REPORT DENSITY SUPPORT took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "REPORT DENSITY SUPPORT took {0} ms.", duration); return sense; } @@ -935,7 +935,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "REWIND took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "REWIND took {0} ms.", duration); return sense; } @@ -961,7 +961,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "TRACK SELECT took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "TRACK SELECT took {0} ms.", duration); return sense; } @@ -983,7 +983,7 @@ namespace Aaru.Devices out bool sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "SPACE took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "SPACE took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/Device/ScsiCommands/SyQuest.cs b/Aaru.Devices/Device/ScsiCommands/SyQuest.cs index 921cbcd6c..aec047800 100644 --- a/Aaru.Devices/Device/ScsiCommands/SyQuest.cs +++ b/Aaru.Devices/Device/ScsiCommands/SyQuest.cs @@ -111,7 +111,7 @@ namespace Aaru.Devices Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (6) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (6) took {0} ms.", duration); return sense; } @@ -188,7 +188,7 @@ namespace Aaru.Devices out sense); Error = LastError != 0; - DicConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (10) took {0} ms.", duration); + AaruConsole.DebugWriteLine("SCSI Device", "SYQUEST READ (10) took {0} ms.", duration); return sense; } diff --git a/Aaru.Devices/FreeBSD/Command.cs b/Aaru.Devices/FreeBSD/Command.cs index 408590e62..1845b81cb 100644 --- a/Aaru.Devices/FreeBSD/Command.cs +++ b/Aaru.Devices/FreeBSD/Command.cs @@ -119,7 +119,7 @@ namespace Aaru.Devices.FreeBSD (csio.ccb_h.status & CamStatus.CamStatusMask) != CamStatus.CamScsiStatusError) { error = Marshal.GetLastWin32Error(); - DicConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", csio.ccb_h.status, error); + AaruConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", csio.ccb_h.status, error); sense = true; } @@ -229,7 +229,7 @@ namespace Aaru.Devices.FreeBSD (csio.ccb_h.status & CamStatus.CamStatusMask) != CamStatus.CamScsiStatusError) { error = Marshal.GetLastWin32Error(); - DicConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", csio.ccb_h.status, error); + AaruConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", csio.ccb_h.status, error); sense = true; } @@ -360,7 +360,7 @@ namespace Aaru.Devices.FreeBSD (ataio.ccb_h.status & CamStatus.CamStatusMask) != CamStatus.CamScsiStatusError) { error = Marshal.GetLastWin32Error(); - DicConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); + AaruConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); sense = true; } @@ -459,7 +459,7 @@ namespace Aaru.Devices.FreeBSD (ataio.ccb_h.status & CamStatus.CamStatusMask) != CamStatus.CamScsiStatusError) { error = Marshal.GetLastWin32Error(); - DicConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); + AaruConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); sense = true; } @@ -567,7 +567,7 @@ namespace Aaru.Devices.FreeBSD (ataio.ccb_h.status & CamStatus.CamStatusMask) != CamStatus.CamScsiStatusError) { error = Marshal.GetLastWin32Error(); - DicConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); + AaruConsole.DebugWriteLine("FreeBSD devices", "CAM status {0} error {1}", ataio.ccb_h.status, error); sense = true; } diff --git a/Aaru.Devices/Remote/Remote.cs b/Aaru.Devices/Remote/Remote.cs index c56c2a489..9f02b01d0 100644 --- a/Aaru.Devices/Remote/Remote.cs +++ b/Aaru.Devices/Remote/Remote.cs @@ -27,7 +27,7 @@ namespace Aaru.Devices.Remote if (ipAddress is null) { - DicConsole.ErrorWriteLine("Host not found"); + AaruConsole.ErrorWriteLine("Host not found"); throw new SocketException(11001); } @@ -36,7 +36,7 @@ namespace Aaru.Devices.Remote _socket.Connect(ipEndPoint); - DicConsole.WriteLine("Connected to {0}", host); + AaruConsole.WriteLine("Connected to {0}", host); var hdrBuf = new byte[Marshal.SizeOf()]; @@ -44,7 +44,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); throw new IOException(); } @@ -52,7 +52,7 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); throw new ArgumentException(); } @@ -62,7 +62,7 @@ namespace Aaru.Devices.Remote { if (hdr.packetType != AaruPacketType.Nop) { - DicConsole.ErrorWriteLine("Expected Hello Packet, got packet type {0}...", hdr.packetType); + AaruConsole.ErrorWriteLine("Expected Hello Packet, got packet type {0}...", hdr.packetType); throw new ArgumentException(); } @@ -71,19 +71,19 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); throw new IOException(); } var nop = Marshal.ByteArrayToStructureLittleEndian(buf); - DicConsole.ErrorWriteLine($"{nop.reason}"); + AaruConsole.ErrorWriteLine($"{nop.reason}"); throw new ArgumentException(); } if (hdr.version != Consts.PacketVersion) { - DicConsole.ErrorWriteLine("Unrecognized packet version..."); + AaruConsole.ErrorWriteLine("Unrecognized packet version..."); throw new ArgumentException(); } @@ -92,7 +92,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); throw new IOException(); } @@ -129,7 +129,7 @@ namespace Aaru.Devices.Remote if (len >= buf.Length) return; - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); throw new IOException(); } @@ -161,7 +161,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return false; } @@ -171,7 +171,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -179,13 +179,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return false; } if (hdr.packetType != AaruPacketType.ResponseAmIRoot) { - DicConsole.ErrorWriteLine("Expected Am I Root? Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected Am I Root? Response Packet, got packet type {0}...", hdr.packetType); return false; } @@ -195,7 +195,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -235,7 +235,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return new DeviceInfo[0]; } @@ -246,7 +246,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return new DeviceInfo[0]; } @@ -254,7 +254,7 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return new DeviceInfo[0]; } @@ -262,7 +262,7 @@ namespace Aaru.Devices.Remote { if (hdr.packetType != AaruPacketType.Nop) { - DicConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...", hdr.packetType); return new DeviceInfo[0]; } @@ -272,19 +272,19 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return new DeviceInfo[0]; } var nop = Marshal.ByteArrayToStructureLittleEndian(buf); - DicConsole.ErrorWriteLine($"{nop.reason}"); + AaruConsole.ErrorWriteLine($"{nop.reason}"); return new DeviceInfo[0]; } if (hdr.version != Consts.PacketVersion) { - DicConsole.ErrorWriteLine("Unrecognized packet version..."); + AaruConsole.ErrorWriteLine("Unrecognized packet version..."); return new DeviceInfo[0]; } @@ -293,7 +293,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return new DeviceInfo[0]; } @@ -335,7 +335,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); lastError = -1; return false; } @@ -346,7 +346,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); lastError = -1; return false; } @@ -355,14 +355,14 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); lastError = -1; return false; } if (hdr.packetType != AaruPacketType.Nop) { - DicConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...", hdr.packetType); lastError = -1; return false; @@ -373,7 +373,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); lastError = -1; return false; } @@ -388,7 +388,7 @@ namespace Aaru.Devices.Remote throw new NotImplementedException($"{nop.reason}"); } - DicConsole.ErrorWriteLine($"{nop.reason}"); + AaruConsole.ErrorWriteLine($"{nop.reason}"); lastError = nop.errno; return false; } @@ -433,7 +433,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return -1; } @@ -443,7 +443,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -451,13 +451,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return -1; } if (hdr.packetType != AaruPacketType.ResponseScsi) { - DicConsole.ErrorWriteLine("Expected SCSI Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected SCSI Response Packet, got packet type {0}...", hdr.packetType); return -1; } @@ -467,7 +467,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -525,7 +525,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return -1; } @@ -535,7 +535,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -543,13 +543,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return -1; } if (hdr.packetType != AaruPacketType.ResponseAtaChs) { - DicConsole.ErrorWriteLine("Expected ATA CHS Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected ATA CHS Response Packet, got packet type {0}...", hdr.packetType); return -1; } @@ -559,7 +559,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -616,7 +616,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return -1; } @@ -626,7 +626,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -634,13 +634,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return -1; } if (hdr.packetType != AaruPacketType.ResponseAtaLba28) { - DicConsole.ErrorWriteLine("Expected ATA LBA28 Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected ATA LBA28 Response Packet, got packet type {0}...", hdr.packetType); return -1; } @@ -650,7 +650,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -707,7 +707,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return -1; } @@ -717,7 +717,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -725,13 +725,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return -1; } if (hdr.packetType != AaruPacketType.ResponseAtaLba48) { - DicConsole.ErrorWriteLine("Expected ATA LBA48 Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected ATA LBA48 Response Packet, got packet type {0}...", hdr.packetType); return -1; } @@ -741,7 +741,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -800,7 +800,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return -1; } @@ -810,7 +810,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -818,13 +818,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return -1; } if (hdr.packetType != AaruPacketType.ResponseSdhci) { - DicConsole.ErrorWriteLine("Expected SDHCI Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected SDHCI Response Packet, got packet type {0}...", hdr.packetType); return -1; } @@ -834,7 +834,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return -1; } @@ -872,7 +872,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return DeviceType.Unknown; } @@ -882,7 +882,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return DeviceType.Unknown; } @@ -890,13 +890,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return DeviceType.Unknown; } if (hdr.packetType != AaruPacketType.ResponseGetType) { - DicConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", hdr.packetType); return DeviceType.Unknown; } @@ -906,7 +906,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return DeviceType.Unknown; } @@ -939,7 +939,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return false; } @@ -949,7 +949,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -957,13 +957,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return false; } if (hdr.packetType != AaruPacketType.ResponseGetSdhciRegisters) { - DicConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected Device Type Response Packet, got packet type {0}...", hdr.packetType); return false; } @@ -973,7 +973,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1049,7 +1049,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return false; } @@ -1059,7 +1059,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1067,13 +1067,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return false; } if (hdr.packetType != AaruPacketType.ResponseGetUsbData) { - DicConsole.ErrorWriteLine("Expected USB Data Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected USB Data Response Packet, got packet type {0}...", hdr.packetType); return false; } @@ -1083,7 +1083,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1129,7 +1129,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return false; } @@ -1139,7 +1139,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1147,13 +1147,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return false; } if (hdr.packetType != AaruPacketType.ResponseGetFireWireData) { - DicConsole.ErrorWriteLine("Expected FireWire Data Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected FireWire Data Response Packet, got packet type {0}...", hdr.packetType); return false; } @@ -1163,7 +1163,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1202,7 +1202,7 @@ namespace Aaru.Devices.Remote if (len != buf.Length) { - DicConsole.ErrorWriteLine("Could not write to the network..."); + AaruConsole.ErrorWriteLine("Could not write to the network..."); return false; } @@ -1212,7 +1212,7 @@ namespace Aaru.Devices.Remote if (len < hdrBuf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } @@ -1220,13 +1220,13 @@ namespace Aaru.Devices.Remote if (hdr.remote_id != Consts.RemoteId || hdr.packet_id != Consts.PacketId) { - DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); + AaruConsole.ErrorWriteLine("Received data is not a DIC Remote Packet..."); return false; } if (hdr.packetType != AaruPacketType.ResponseGetPcmciaData) { - DicConsole.ErrorWriteLine("Expected PCMCIA Data Response Packet, got packet type {0}...", + AaruConsole.ErrorWriteLine("Expected PCMCIA Data Response Packet, got packet type {0}...", hdr.packetType); return false; } @@ -1236,7 +1236,7 @@ namespace Aaru.Devices.Remote if (len < buf.Length) { - DicConsole.ErrorWriteLine("Could not read from the network..."); + AaruConsole.ErrorWriteLine("Could not read from the network..."); return false; } diff --git a/Aaru.Filesystems/Acorn.cs b/Aaru.Filesystems/Acorn.cs index df7caf841..30870aa86 100644 --- a/Aaru.Filesystems/Acorn.cs +++ b/Aaru.Filesystems/Acorn.cs @@ -107,8 +107,8 @@ namespace Aaru.Filesystems byte oldChk1 = AcornMapChecksum(sector, 255); OldMapSector1 oldMap1 = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("ADFS Plugin", "oldMap0.checksum = {0}", oldMap0.checksum); - DicConsole.DebugWriteLine("ADFS Plugin", "oldChk0 = {0}", oldChk0); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldMap0.checksum = {0}", oldMap0.checksum); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldChk0 = {0}", oldChk0); // According to documentation map1 MUST start on sector 1. On ADFS-D it starts at 0x100, not on sector 1 (0x400) if(oldMap0.checksum == oldChk0 && oldMap1.checksum != oldChk1 && sector.Length >= 512) @@ -120,8 +120,8 @@ namespace Aaru.Filesystems oldMap1 = Marshal.ByteArrayToStructureLittleEndian(tmp); } - DicConsole.DebugWriteLine("ADFS Plugin", "oldMap1.checksum = {0}", oldMap1.checksum); - DicConsole.DebugWriteLine("ADFS Plugin", "oldChk1 = {0}", oldChk1); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldMap1.checksum = {0}", oldMap1.checksum); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldChk1 = {0}", oldChk1); if(oldMap0.checksum == oldChk0 && oldMap1.checksum == oldChk1 && oldMap0.checksum != 0 && oldMap1.checksum != 0) @@ -142,12 +142,12 @@ namespace Aaru.Filesystems OldDirectory oldRoot = Marshal.ByteArrayToStructureLittleEndian(sector); byte dirChk = AcornDirectoryChecksum(sector, (int)OLD_DIRECTORY_SIZE - 1); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.header.magic at 0x200 = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.header.magic at 0x200 = {0}", oldRoot.header.magic); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.magic at 0x200 = {0}", oldRoot.tail.magic); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.checkByte at 0x200 = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.magic at 0x200 = {0}", oldRoot.tail.magic); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.checkByte at 0x200 = {0}", oldRoot.tail.checkByte); - DicConsole.DebugWriteLine("ADFS Plugin", "dirChk at 0x200 = {0}", dirChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "dirChk at 0x200 = {0}", dirChk); if(oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC || oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC) return true; @@ -169,12 +169,12 @@ namespace Aaru.Filesystems oldRoot = Marshal.ByteArrayToStructureLittleEndian(sector); dirChk = AcornDirectoryChecksum(sector, (int)OLD_DIRECTORY_SIZE - 1); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.header.magic at 0x400 = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.header.magic at 0x400 = {0}", oldRoot.header.magic); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.magic at 0x400 = {0}", oldRoot.tail.magic); - DicConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.checkByte at 0x400 = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.magic at 0x400 = {0}", oldRoot.tail.magic); + AaruConsole.DebugWriteLine("ADFS Plugin", "oldRoot.tail.checkByte at 0x400 = {0}", oldRoot.tail.checkByte); - DicConsole.DebugWriteLine("ADFS Plugin", "dirChk at 0x400 = {0}", dirChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "dirChk at 0x400 = {0}", dirChk); if(oldRoot.header.magic == OLD_DIR_MAGIC && oldRoot.tail.magic == OLD_DIR_MAGIC || oldRoot.header.magic == NEW_DIR_MAGIC && oldRoot.tail.magic == NEW_DIR_MAGIC) return true; @@ -186,8 +186,8 @@ namespace Aaru.Filesystems sector = imagePlugin.ReadSector(partition.Start); byte newChk = NewMapChecksum(sector); - DicConsole.DebugWriteLine("ADFS Plugin", "newChk = {0}", newChk); - DicConsole.DebugWriteLine("ADFS Plugin", "map.zoneChecksum = {0}", sector[0]); + AaruConsole.DebugWriteLine("ADFS Plugin", "newChk = {0}", newChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "map.zoneChecksum = {0}", sector[0]); sbSector = BOOT_BLOCK_LOCATION / imagePlugin.Info.SectorSize; sectorsToRead = BOOT_BLOCK_SIZE / imagePlugin.Info.SectorSize; @@ -201,8 +201,8 @@ namespace Aaru.Filesystems for(int i = 0; i < 0x1FF; i++) bootChk = (bootChk & 0xFF) + (bootChk >> 8) + bootSector[i]; - DicConsole.DebugWriteLine("ADFS Plugin", "bootChk = {0}", bootChk); - DicConsole.DebugWriteLine("ADFS Plugin", "bBlock.checksum = {0}", bootSector[0x1FF]); + AaruConsole.DebugWriteLine("ADFS Plugin", "bootChk = {0}", bootChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "bBlock.checksum = {0}", bootSector[0x1FF]); if(newChk == sector[0] && newChk != 0) { @@ -216,11 +216,11 @@ namespace Aaru.Filesystems } else return false; - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.log2secsize = {0}", drSb.log2secsize); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.idlen = {0}", drSb.idlen); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size_high = {0}", drSb.disc_size_high); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size = {0}", drSb.disc_size); - DicConsole.DebugWriteLine("ADFS Plugin", "IsNullOrEmpty(drSb.reserved) = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.log2secsize = {0}", drSb.log2secsize); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.idlen = {0}", drSb.idlen); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size_high = {0}", drSb.disc_size_high); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size = {0}", drSb.disc_size); + AaruConsole.DebugWriteLine("ADFS Plugin", "IsNullOrEmpty(drSb.reserved) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(drSb.reserved)); if(drSb.log2secsize < 8 || drSb.log2secsize > 10) return false; @@ -379,8 +379,8 @@ namespace Aaru.Filesystems sector = imagePlugin.ReadSector(partition.Start); byte newChk = NewMapChecksum(sector); - DicConsole.DebugWriteLine("ADFS Plugin", "newChk = {0}", newChk); - DicConsole.DebugWriteLine("ADFS Plugin", "map.zoneChecksum = {0}", sector[0]); + AaruConsole.DebugWriteLine("ADFS Plugin", "newChk = {0}", newChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "map.zoneChecksum = {0}", sector[0]); sbSector = BOOT_BLOCK_LOCATION / imagePlugin.Info.SectorSize; sectorsToRead = BOOT_BLOCK_SIZE / imagePlugin.Info.SectorSize; @@ -390,8 +390,8 @@ namespace Aaru.Filesystems int bootChk = 0; for(int i = 0; i < 0x1FF; i++) bootChk = (bootChk & 0xFF) + (bootChk >> 8) + bootSector[i]; - DicConsole.DebugWriteLine("ADFS Plugin", "bootChk = {0}", bootChk); - DicConsole.DebugWriteLine("ADFS Plugin", "bBlock.checksum = {0}", bootSector[0x1FF]); + AaruConsole.DebugWriteLine("ADFS Plugin", "bootChk = {0}", bootChk); + AaruConsole.DebugWriteLine("ADFS Plugin", "bBlock.checksum = {0}", bootSector[0x1FF]); if(newChk == sector[0] && newChk != 0) { @@ -405,28 +405,28 @@ namespace Aaru.Filesystems } else return; - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.log2secsize = {0}", drSb.log2secsize); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.spt = {0}", drSb.spt); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.heads = {0}", drSb.heads); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.density = {0}", drSb.density); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.idlen = {0}", drSb.idlen); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.log2bpmb = {0}", drSb.log2bpmb); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.skew = {0}", drSb.skew); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.bootoption = {0}", drSb.bootoption); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.lowsector = {0}", drSb.lowsector); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.nzones = {0}", drSb.nzones); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.zone_spare = {0}", drSb.zone_spare); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.root = {0}", drSb.root); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size = {0}", drSb.disc_size); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_id = {0}", drSb.disc_id); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_name = {0}", + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.log2secsize = {0}", drSb.log2secsize); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.spt = {0}", drSb.spt); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.heads = {0}", drSb.heads); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.density = {0}", drSb.density); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.idlen = {0}", drSb.idlen); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.log2bpmb = {0}", drSb.log2bpmb); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.skew = {0}", drSb.skew); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.bootoption = {0}", drSb.bootoption); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.lowsector = {0}", drSb.lowsector); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.nzones = {0}", drSb.nzones); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.zone_spare = {0}", drSb.zone_spare); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.root = {0}", drSb.root); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size = {0}", drSb.disc_size); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_id = {0}", drSb.disc_id); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_name = {0}", StringHandlers.CToString(drSb.disc_name, Encoding)); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_type = {0}", drSb.disc_type); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size_high = {0}", drSb.disc_size_high); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.flags = {0}", drSb.flags); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.nzones_high = {0}", drSb.nzones_high); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.format_version = {0}", drSb.format_version); - DicConsole.DebugWriteLine("ADFS Plugin", "drSb.root_size = {0}", drSb.root_size); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_type = {0}", drSb.disc_type); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.disc_size_high = {0}", drSb.disc_size_high); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.flags = {0}", drSb.flags); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.nzones_high = {0}", drSb.nzones_high); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.format_version = {0}", drSb.format_version); + AaruConsole.DebugWriteLine("ADFS Plugin", "drSb.root_size = {0}", drSb.root_size); if(drSb.log2secsize < 8 || drSb.log2secsize > 10) return; diff --git a/Aaru.Filesystems/AmigaDOS.cs b/Aaru.Filesystems/AmigaDOS.cs index fecbe99e6..379424640 100644 --- a/Aaru.Filesystems/AmigaDOS.cs +++ b/Aaru.Filesystems/AmigaDOS.cs @@ -85,8 +85,8 @@ namespace Aaru.Filesystems sector[4] = sector[5] = sector[6] = sector[7] = 0; uint bsum = AmigaBootChecksum(sector); - DicConsole.DebugWriteLine("AmigaDOS plugin", "bblk.checksum = 0x{0:X8}", bblk.checksum); - DicConsole.DebugWriteLine("AmigaDOS plugin", "bsum = 0x{0:X8}", bsum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "bblk.checksum = 0x{0:X8}", bblk.checksum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "bsum = 0x{0:X8}", bsum); ulong bRootPtr = 0; @@ -94,7 +94,7 @@ namespace Aaru.Filesystems if(bsum == bblk.checksum) { bRootPtr = bblk.root_ptr + partition.Start; - DicConsole.DebugWriteLine("AmigaDOS plugin", "Bootblock points to {0} as Rootblock", bRootPtr); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "Bootblock points to {0} as Rootblock", bRootPtr); } ulong[] rootPtrs = @@ -111,23 +111,23 @@ namespace Aaru.Filesystems // So to handle even number of sectors foreach(ulong rootPtr in rootPtrs.Where(rootPtr => rootPtr < partition.End && rootPtr >= partition.Start)) { - DicConsole.DebugWriteLine("AmigaDOS plugin", "Searching for Rootblock in sector {0}", rootPtr); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "Searching for Rootblock in sector {0}", rootPtr); sector = imagePlugin.ReadSector(rootPtr); rblk.type = BigEndianBitConverter.ToUInt32(sector, 0x00); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rblk.type = {0}", rblk.type); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rblk.type = {0}", rblk.type); if(rblk.type != TYPE_HEADER) continue; rblk.hashTableSize = BigEndianBitConverter.ToUInt32(sector, 0x0C); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rblk.hashTableSize = {0}", rblk.hashTableSize); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rblk.hashTableSize = {0}", rblk.hashTableSize); uint blockSize = (rblk.hashTableSize + 56) * 4; uint sectorsPerBlock = (uint)(blockSize / sector.Length); - DicConsole.DebugWriteLine("AmigaDOS plugin", "blockSize = {0}", blockSize); - DicConsole.DebugWriteLine("AmigaDOS plugin", "sectorsPerBlock = {0}", sectorsPerBlock); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "blockSize = {0}", blockSize); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "sectorsPerBlock = {0}", sectorsPerBlock); if(blockSize % sector.Length > 0) sectorsPerBlock++; @@ -140,11 +140,11 @@ namespace Aaru.Filesystems sector[20] = sector[21] = sector[22] = sector[23] = 0; uint rsum = AmigaChecksum(sector); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rblk.checksum = 0x{0:X8}", rblk.checksum); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rsum = 0x{0:X8}", rsum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rblk.checksum = 0x{0:X8}", rblk.checksum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rsum = 0x{0:X8}", rsum); rblk.sec_type = BigEndianBitConverter.ToUInt32(sector, sector.Length - 4); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rblk.sec_type = {0}", rblk.sec_type); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rblk.sec_type = {0}", rblk.sec_type); if(rblk.sec_type == SUBTYPE_ROOT && rblk.checksum == rsum) return true; } @@ -173,7 +173,7 @@ namespace Aaru.Filesystems if(bsum == bootBlk.checksum) { bRootPtr = bootBlk.root_ptr + partition.Start; - DicConsole.DebugWriteLine("AmigaDOS plugin", "Bootblock points to {0} as Rootblock", bRootPtr); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "Bootblock points to {0} as Rootblock", bRootPtr); } ulong[] rootPtrs = @@ -194,23 +194,23 @@ namespace Aaru.Filesystems // So to handle even number of sectors foreach(ulong rootPtr in rootPtrs.Where(rootPtr => rootPtr < partition.End && rootPtr >= partition.Start)) { - DicConsole.DebugWriteLine("AmigaDOS plugin", "Searching for Rootblock in sector {0}", rootPtr); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "Searching for Rootblock in sector {0}", rootPtr); rootBlockSector = imagePlugin.ReadSector(rootPtr); rootBlk.type = BigEndianBitConverter.ToUInt32(rootBlockSector, 0x00); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.type = {0}", rootBlk.type); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.type = {0}", rootBlk.type); if(rootBlk.type != TYPE_HEADER) continue; rootBlk.hashTableSize = BigEndianBitConverter.ToUInt32(rootBlockSector, 0x0C); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.hashTableSize = {0}", rootBlk.hashTableSize); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.hashTableSize = {0}", rootBlk.hashTableSize); blockSize = (rootBlk.hashTableSize + 56) * 4; uint sectorsPerBlock = (uint)(blockSize / rootBlockSector.Length); - DicConsole.DebugWriteLine("AmigaDOS plugin", "blockSize = {0}", blockSize); - DicConsole.DebugWriteLine("AmigaDOS plugin", "sectorsPerBlock = {0}", sectorsPerBlock); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "blockSize = {0}", blockSize); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "sectorsPerBlock = {0}", sectorsPerBlock); if(blockSize % rootBlockSector.Length > 0) sectorsPerBlock++; @@ -223,11 +223,11 @@ namespace Aaru.Filesystems rootBlockSector[20] = rootBlockSector[21] = rootBlockSector[22] = rootBlockSector[23] = 0; uint rsum = AmigaChecksum(rootBlockSector); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.checksum = 0x{0:X8}", rootBlk.checksum); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rsum = 0x{0:X8}", rsum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.checksum = 0x{0:X8}", rootBlk.checksum); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rsum = 0x{0:X8}", rsum); rootBlk.sec_type = BigEndianBitConverter.ToUInt32(rootBlockSector, rootBlockSector.Length - 4); - DicConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.sec_type = {0}", rootBlk.sec_type); + AaruConsole.DebugWriteLine("AmigaDOS plugin", "rootBlk.sec_type = {0}", rootBlk.sec_type); if(rootBlk.sec_type != SUBTYPE_ROOT || rootBlk.checksum != rsum) continue; diff --git a/Aaru.Filesystems/AppleDOS/Super.cs b/Aaru.Filesystems/AppleDOS/Super.cs index 0e44dd078..32593ed62 100644 --- a/Aaru.Filesystems/AppleDOS/Super.cs +++ b/Aaru.Filesystems/AppleDOS/Super.cs @@ -56,19 +56,19 @@ namespace Aaru.Filesystems.AppleDOS if(device.Info.Sectors != 455 && device.Info.Sectors != 560) { - DicConsole.DebugWriteLine("Apple DOS plugin", "Incorrect device size."); + AaruConsole.DebugWriteLine("Apple DOS plugin", "Incorrect device size."); return Errno.InOutError; } if(start > 0) { - DicConsole.DebugWriteLine("Apple DOS plugin", "Partitions are not supported."); + AaruConsole.DebugWriteLine("Apple DOS plugin", "Partitions are not supported."); return Errno.InOutError; } if(device.Info.SectorSize != 256) { - DicConsole.DebugWriteLine("Apple DOS plugin", "Incorrect sector size."); + AaruConsole.DebugWriteLine("Apple DOS plugin", "Incorrect sector size."); return Errno.InOutError; } @@ -85,14 +85,14 @@ namespace Aaru.Filesystems.AppleDOS Errno error = ReadCatalog(); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("Apple DOS plugin", "Unable to read catalog."); + AaruConsole.DebugWriteLine("Apple DOS plugin", "Unable to read catalog."); return error; } error = CacheAllFiles(); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("Apple DOS plugin", "Unable cache all files."); + AaruConsole.DebugWriteLine("Apple DOS plugin", "Unable cache all files."); return error; } diff --git a/Aaru.Filesystems/AppleMFS/Dir.cs b/Aaru.Filesystems/AppleMFS/Dir.cs index 7dbfc693c..713ec4aad 100644 --- a/Aaru.Filesystems/AppleMFS/Dir.cs +++ b/Aaru.Filesystems/AppleMFS/Dir.cs @@ -121,23 +121,23 @@ namespace Aaru.Filesystems.AppleMFS filenameToId.Add(lowerFilename, entry.flFlNum); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flFlags = {0}", entry.flFlags); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flTyp = {0}", entry.flTyp); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flFlNum = {0}", entry.flFlNum); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flStBlk = {0}", entry.flStBlk); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flLgLen = {0}", entry.flLgLen); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flPyLen = {0}", entry.flPyLen); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRStBlk = {0}", entry.flRStBlk); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRLgLen = {0}", entry.flRLgLen); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRPyLen = {0}", entry.flRPyLen); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flFlags = {0}", entry.flFlags); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flTyp = {0}", entry.flTyp); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flFlNum = {0}", entry.flFlNum); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flStBlk = {0}", entry.flStBlk); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flLgLen = {0}", entry.flLgLen); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flPyLen = {0}", entry.flPyLen); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRStBlk = {0}", entry.flRStBlk); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRLgLen = {0}", entry.flRLgLen); + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flRPyLen = {0}", entry.flRPyLen); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flCrDat = {0}", + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flCrDat = {0}", DateHandlers.MacToDateTime(entry.flCrDat)); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flMdDat = {0}", + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flMdDat = {0}", DateHandlers.MacToDateTime(entry.flMdDat)); - DicConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flNam0 = {0}", + AaruConsole.DebugWriteLine("DEBUG (AppleMFS plugin)", "entry.flNam0 = {0}", StringHandlers.PascalToString(entry.flNam, Encoding)); } diff --git a/Aaru.Filesystems/AppleMFS/File.cs b/Aaru.Filesystems/AppleMFS/File.cs index f723e1edf..2f0e5ceb4 100644 --- a/Aaru.Filesystems/AppleMFS/File.cs +++ b/Aaru.Filesystems/AppleMFS/File.cs @@ -351,7 +351,7 @@ namespace Aaru.Filesystems.AppleMFS if(blockMap[nextBlock] == BMAP_FREE) { - DicConsole.ErrorWriteLine("File truncated at block {0}", nextBlock); + AaruConsole.ErrorWriteLine("File truncated at block {0}", nextBlock); break; } diff --git a/Aaru.Filesystems/BTRFS.cs b/Aaru.Filesystems/BTRFS.cs index 0fa42c9e2..a019bb4aa 100644 --- a/Aaru.Filesystems/BTRFS.cs +++ b/Aaru.Filesystems/BTRFS.cs @@ -69,10 +69,10 @@ namespace Aaru.Filesystems try { btrfsSb = Marshal.ByteArrayToStructureLittleEndian(sector); } catch { return false; } - DicConsole.DebugWriteLine("BTRFS Plugin", "sbSectorOff = {0}", sbSectorOff); - DicConsole.DebugWriteLine("BTRFS Plugin", "sbSectorSize = {0}", sbSectorSize); - DicConsole.DebugWriteLine("BTRFS Plugin", "partition.PartitionStartSector = {0}", partition.Start); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.magic = 0x{0:X16}", btrfsSb.magic); + AaruConsole.DebugWriteLine("BTRFS Plugin", "sbSectorOff = {0}", sbSectorOff); + AaruConsole.DebugWriteLine("BTRFS Plugin", "sbSectorSize = {0}", sbSectorSize); + AaruConsole.DebugWriteLine("BTRFS Plugin", "partition.PartitionStartSector = {0}", partition.Start); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.magic = 0x{0:X16}", btrfsSb.magic); return btrfsSb.magic == BTRFS_MAGIC; } @@ -92,54 +92,54 @@ namespace Aaru.Filesystems SuperBlock btrfsSb = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.checksum = {0}", btrfsSb.checksum); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.uuid = {0}", btrfsSb.uuid); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.pba = {0}", btrfsSb.pba); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.flags = {0}", btrfsSb.flags); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.magic = {0}", btrfsSb.magic); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.generation = {0}", btrfsSb.generation); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_lba = {0}", btrfsSb.root_lba); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_lba = {0}", btrfsSb.chunk_lba); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_lba = {0}", btrfsSb.log_lba); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_root_transid = {0}", btrfsSb.log_root_transid); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.total_bytes = {0}", btrfsSb.total_bytes); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.bytes_used = {0}", btrfsSb.bytes_used); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_dir_objectid = {0}", btrfsSb.root_dir_objectid); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.num_devices = {0}", btrfsSb.num_devices); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.sectorsize = {0}", btrfsSb.sectorsize); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.nodesize = {0}", btrfsSb.nodesize); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.leafsize = {0}", btrfsSb.leafsize); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.stripesize = {0}", btrfsSb.stripesize); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.n = {0}", btrfsSb.n); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_root_generation = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.checksum = {0}", btrfsSb.checksum); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.uuid = {0}", btrfsSb.uuid); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.pba = {0}", btrfsSb.pba); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.flags = {0}", btrfsSb.flags); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.magic = {0}", btrfsSb.magic); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.generation = {0}", btrfsSb.generation); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_lba = {0}", btrfsSb.root_lba); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_lba = {0}", btrfsSb.chunk_lba); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_lba = {0}", btrfsSb.log_lba); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_root_transid = {0}", btrfsSb.log_root_transid); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.total_bytes = {0}", btrfsSb.total_bytes); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.bytes_used = {0}", btrfsSb.bytes_used); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_dir_objectid = {0}", btrfsSb.root_dir_objectid); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.num_devices = {0}", btrfsSb.num_devices); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.sectorsize = {0}", btrfsSb.sectorsize); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.nodesize = {0}", btrfsSb.nodesize); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.leafsize = {0}", btrfsSb.leafsize); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.stripesize = {0}", btrfsSb.stripesize); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.n = {0}", btrfsSb.n); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_root_generation = {0}", btrfsSb.chunk_root_generation); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.compat_flags = 0x{0:X16}", btrfsSb.compat_flags); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.compat_ro_flags = 0x{0:X16}", btrfsSb.compat_ro_flags); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.incompat_flags = 0x{0:X16}", btrfsSb.incompat_flags); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.csum_type = {0}", btrfsSb.csum_type); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_level = {0}", btrfsSb.root_level); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_root_level = {0}", btrfsSb.chunk_root_level); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_root_level = {0}", btrfsSb.log_root_level); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.id = 0x{0:X16}", btrfsSb.dev_item.id); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.bytes = {0}", btrfsSb.dev_item.bytes); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.used = {0}", btrfsSb.dev_item.used); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.optimal_align = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.compat_flags = 0x{0:X16}", btrfsSb.compat_flags); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.compat_ro_flags = 0x{0:X16}", btrfsSb.compat_ro_flags); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.incompat_flags = 0x{0:X16}", btrfsSb.incompat_flags); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.csum_type = {0}", btrfsSb.csum_type); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.root_level = {0}", btrfsSb.root_level); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.chunk_root_level = {0}", btrfsSb.chunk_root_level); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.log_root_level = {0}", btrfsSb.log_root_level); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.id = 0x{0:X16}", btrfsSb.dev_item.id); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.bytes = {0}", btrfsSb.dev_item.bytes); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.used = {0}", btrfsSb.dev_item.used); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.optimal_align = {0}", btrfsSb.dev_item.optimal_align); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.optimal_width = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.optimal_width = {0}", btrfsSb.dev_item.optimal_width); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.minimal_size = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.minimal_size = {0}", btrfsSb.dev_item.minimal_size); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.type = {0}", btrfsSb.dev_item.type); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.generation = {0}", btrfsSb.dev_item.generation); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.start_offset = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.type = {0}", btrfsSb.dev_item.type); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.generation = {0}", btrfsSb.dev_item.generation); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.start_offset = {0}", btrfsSb.dev_item.start_offset); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.dev_group = {0}", btrfsSb.dev_item.dev_group); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.seek_speed = {0}", btrfsSb.dev_item.seek_speed); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.bandwitdh = {0}", btrfsSb.dev_item.bandwitdh); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.device_uuid = {0}", + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.dev_group = {0}", btrfsSb.dev_item.dev_group); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.seek_speed = {0}", btrfsSb.dev_item.seek_speed); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.bandwitdh = {0}", btrfsSb.dev_item.bandwitdh); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.device_uuid = {0}", btrfsSb.dev_item.device_uuid); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.uuid = {0}", btrfsSb.dev_item.uuid); - DicConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.label = {0}", btrfsSb.label); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.dev_item.uuid = {0}", btrfsSb.dev_item.uuid); + AaruConsole.DebugWriteLine("BTRFS Plugin", "btrfsSb.label = {0}", btrfsSb.label); sbInformation.AppendLine("B-tree filesystem"); sbInformation.AppendFormat("UUID: {0}", btrfsSb.uuid).AppendLine(); diff --git a/Aaru.Filesystems/CPM/Info.cs b/Aaru.Filesystems/CPM/Info.cs index 12ff4c4bb..745c57f65 100644 --- a/Aaru.Filesystems/CPM/Info.cs +++ b/Aaru.Filesystems/CPM/Info.cs @@ -277,7 +277,7 @@ namespace Aaru.Filesystems.CPM workingDefinition.skew = 2; workingDefinition.sofs = 0; - DicConsole.DebugWriteLine("CP/M Plugin", "Found Amstrad superblock."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Found Amstrad superblock."); } } } @@ -335,7 +335,7 @@ namespace Aaru.Filesystems.CPM uint directoryLength = (uint)(((ulong)dpb.drm + 1) * 32 / sectorSize); directory = imagePlugin.ReadSectors(firstDirectorySector + partition.Start, directoryLength); - DicConsole.DebugWriteLine("CP/M Plugin", "Found CP/M-86 hard disk superblock."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Found CP/M-86 hard disk superblock."); // Build a CP/M disk definition workingDefinition = new CpmDefinition @@ -755,7 +755,7 @@ namespace Aaru.Filesystems.CPM { uint directoryLength = (uint)(((ulong)dpb.drm + 1) * 32 / imagePlugin.Info.SectorSize); directory = imagePlugin.ReadSectors(firstDirectorySector86 + partition.Start, directoryLength); - DicConsole.DebugWriteLine("CP/M Plugin", "Found CP/M-86 floppy identifier."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Found CP/M-86 floppy identifier."); } } @@ -764,7 +764,7 @@ namespace Aaru.Filesystems.CPM { if(CheckDir(directory)) { - DicConsole.DebugWriteLine("CP/M Plugin", "First directory block seems correct."); + AaruConsole.DebugWriteLine("CP/M Plugin", "First directory block seems correct."); return true; } @@ -775,10 +775,10 @@ namespace Aaru.Filesystems.CPM if(!cpmFound) { // Load all definitions - DicConsole.DebugWriteLine("CP/M Plugin", "Trying to load definitions."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Trying to load definitions."); if(LoadDefinitions() && definitions?.definitions != null && definitions.definitions.Count > 0) { - DicConsole.DebugWriteLine("CP/M Plugin", "Trying all known definitions."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Trying all known definitions."); foreach(CpmDefinition def in from def in definitions.definitions let sectors = (ulong)(def.cylinders * def.sides * def.sectorsPerTrack) @@ -787,7 +787,7 @@ namespace Aaru.Filesystems.CPM select def) { // Definition seems to describe current disk, at least, same number of volume sectors and bytes per sector - DicConsole.DebugWriteLine("CP/M Plugin", "Trying definition \"{0}\"", def.comment); + AaruConsole.DebugWriteLine("CP/M Plugin", "Trying definition \"{0}\"", def.comment); ulong offset; if(def.sofs != 0) offset = (ulong)def.sofs; else offset = (ulong)(def.ofs * def.sectorsPerTrack); @@ -831,7 +831,7 @@ namespace Aaru.Filesystems.CPM else if(string.Compare(def.order, "COLUMBIA", StringComparison.InvariantCultureIgnoreCase) == 0) { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Don't know how to handle COLUMBIA ordering, not proceeding with this definition."); continue; } @@ -839,13 +839,13 @@ namespace Aaru.Filesystems.CPM else if(string.Compare(def.order, "EAGLE", StringComparison.InvariantCultureIgnoreCase) == 0) { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Don't know how to handle EAGLE ordering, not proceeding with this definition."); continue; } else { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Unknown order type \"{0}\", not proceeding with this definition.", def.order); continue; @@ -867,7 +867,7 @@ namespace Aaru.Filesystems.CPM directory = ms.ToArray(); if(def.evenOdd) - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Definition contains EVEN-ODD field, with unknown meaning, detection may be wrong."); // Complement of the directory bytes if needed @@ -878,7 +878,7 @@ namespace Aaru.Filesystems.CPM // Check the directory if(CheckDir(directory)) { - DicConsole.DebugWriteLine("CP/M Plugin", "Definition \"{0}\" has a correct directory", + AaruConsole.DebugWriteLine("CP/M Plugin", "Definition \"{0}\" has a correct directory", def.comment); // Build a Disc Parameter Block diff --git a/Aaru.Filesystems/CPM/Super.cs b/Aaru.Filesystems/CPM/Super.cs index fb62b7e8b..a92ed8430 100644 --- a/Aaru.Filesystems/CPM/Super.cs +++ b/Aaru.Filesystems/CPM/Super.cs @@ -97,14 +97,14 @@ namespace Aaru.Filesystems.CPM workingDefinition.side2.sectorIds.Length; // TODO: Implement CYLINDERS ordering - DicConsole.DebugWriteLine("CP/M Plugin", "CYLINDERS ordering not yet implemented."); + AaruConsole.DebugWriteLine("CP/M Plugin", "CYLINDERS ordering not yet implemented."); return Errno.NotImplemented; } // TODO: Implement COLUMBIA ordering else if(string.Compare(workingDefinition.order, "COLUMBIA", StringComparison.InvariantCultureIgnoreCase) == 0) { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Don't know how to handle COLUMBIA ordering, not proceeding with this definition."); return Errno.NotImplemented; } @@ -112,13 +112,13 @@ namespace Aaru.Filesystems.CPM else if(string.Compare(workingDefinition.order, "EAGLE", StringComparison.InvariantCultureIgnoreCase) == 0) { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Don't know how to handle EAGLE ordering, not proceeding with this definition."); return Errno.NotImplemented; } else { - DicConsole.DebugWriteLine("CP/M Plugin", + AaruConsole.DebugWriteLine("CP/M Plugin", "Unknown order type \"{0}\", not proceeding with this definition.", workingDefinition.order); return Errno.NotSupported; @@ -130,7 +130,7 @@ namespace Aaru.Filesystems.CPM if(workingDefinition.sides == 1 || string.Compare(workingDefinition.order, "SIDES", StringComparison.InvariantCultureIgnoreCase) == 0) { - DicConsole.DebugWriteLine("CP/M Plugin", "Deinterleaving whole volume."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Deinterleaving whole volume."); for(int p = 0; p <= (int)(partition.End - partition.Start); p++) { @@ -151,7 +151,7 @@ namespace Aaru.Filesystems.CPM int sectorsPerBlock = 0; Dictionary allocationBlocks = new Dictionary(); - DicConsole.DebugWriteLine("CP/M Plugin", "Creating allocation blocks."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Creating allocation blocks."); // For each volume sector for(ulong a = 0; a < (ulong)deinterleavedSectors.Count; a++) @@ -182,7 +182,7 @@ namespace Aaru.Filesystems.CPM else allocationBlocks.Add(blockNo++, sector); } - DicConsole.DebugWriteLine("CP/M Plugin", "Reading directory."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Reading directory."); int dirOff; int dirSectors = (dpb.drm + 1) * 32 / workingDefinition.bytesPerSector; @@ -215,7 +215,7 @@ namespace Aaru.Filesystems.CPM labelUpdateDate = null; passwordCache = new Dictionary(); - DicConsole.DebugWriteLine("CP/M Plugin", "Traversing directory."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Traversing directory."); // For each directory entry for(int dOff = 0; dOff < directory.Length; dOff += 32) @@ -592,7 +592,7 @@ namespace Aaru.Filesystems.CPM // Cache all files. As CP/M maximum volume size is 8 Mib // this should not be a problem - DicConsole.DebugWriteLine("CP/M Plugin", "Reading files."); + AaruConsole.DebugWriteLine("CP/M Plugin", "Reading files."); long usedBlocks = 0; fileCache = new Dictionary(); foreach(string filename in dirList) diff --git a/Aaru.Filesystems/EFS.cs b/Aaru.Filesystems/EFS.cs index 99ef078f4..d1af06203 100644 --- a/Aaru.Filesystems/EFS.cs +++ b/Aaru.Filesystems/EFS.cs @@ -73,7 +73,7 @@ namespace Aaru.Filesystems EFS_Superblock efsSb = Marshal.ByteArrayToStructureBigEndian(sbpiece); - DicConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", + AaruConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 0x200, efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW); if(efsSb.sb_magic == EFS_MAGIC || efsSb.sb_magic == EFS_MAGIC_NEW) return true; @@ -88,7 +88,7 @@ namespace Aaru.Filesystems EFS_Superblock efsSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1, + AaruConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1, efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW); if(efsSb.sb_magic == EFS_MAGIC || efsSb.sb_magic == EFS_MAGIC_NEW) return true; @@ -121,7 +121,7 @@ namespace Aaru.Filesystems efsSb = Marshal.ByteArrayToStructureBigEndian(sbpiece); - DicConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", + AaruConsole.DebugWriteLine("EFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 0x200, efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW); } else @@ -134,7 +134,7 @@ namespace Aaru.Filesystems efsSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1, + AaruConsole.DebugWriteLine("EFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8} or 0x{3:X8})", 1, efsSb.sb_magic, EFS_MAGIC, EFS_MAGIC_NEW); } diff --git a/Aaru.Filesystems/FAT/BPB.cs b/Aaru.Filesystems/FAT/BPB.cs index 0de58f0b2..41e451977 100644 --- a/Aaru.Filesystems/FAT/BPB.cs +++ b/Aaru.Filesystems/FAT/BPB.cs @@ -77,15 +77,15 @@ namespace Aaru.Filesystems.FAT // Check correct branch for Human68k bool humanBranchCorrect = bpbSector[0] == 0x60 && bpbSector[1] >= 0x1C && bpbSector[1] < 0xFE; - DicConsole.DebugWriteLine("FAT plugin", "humanClustersCorrect = {0}", humanClustersCorrect); - DicConsole.DebugWriteLine("FAT plugin", "humanOemCorrect = {0}", humanOemCorrect); - DicConsole.DebugWriteLine("FAT plugin", "humanBranchCorrect = {0}", humanBranchCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanClustersCorrect = {0}", humanClustersCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanOemCorrect = {0}", humanOemCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanBranchCorrect = {0}", humanBranchCorrect); // If all Human68k checks are correct, it is a Human68k FAT16 bool useHumanBpb = humanClustersCorrect && humanOemCorrect && humanBranchCorrect && expectedClusters > 0; if(useHumanBpb) { - DicConsole.DebugWriteLine("FAT plugin", "Using Human68k BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using Human68k BPB"); fakeBpb.jump = humanBpb.jump; fakeBpb.oem_name = humanBpb.oem_name; @@ -198,7 +198,7 @@ namespace Aaru.Filesystems.FAT fat32Bpb.spfat == 0 && fat32Bpb.signature == 0x29 && Encoding.ASCII.GetString(fat32Bpb.fs_type) == "FAT32 ") { - DicConsole.DebugWriteLine("FAT plugin", "Using FAT32 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using FAT32 BPB"); useLongFat32 = true; minBootNearJump = 0x58; return BpbKind.LongFat32; @@ -208,7 +208,7 @@ namespace Aaru.Filesystems.FAT shortFat32Bpb.sectors == 0 && shortFat32Bpb.spfat == 0 && shortFat32Bpb.signature == 0x28) { - DicConsole.DebugWriteLine("FAT plugin", "Using short FAT32 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using short FAT32 BPB"); useShortFat32 = shortFat32Bpb.big_sectors == 0 ? shortFat32Bpb.huge_sectors <= partition.End - partition.Start + 1 : shortFat32Bpb.big_sectors <= partition.End - partition.Start + 1; @@ -222,7 +222,7 @@ namespace Aaru.Filesystems.FAT msxBpb.spfat > 0 && Encoding.ASCII.GetString(msxBpb.vol_id) == "VOL_ID") { - DicConsole.DebugWriteLine("FAT plugin", "Using MSX BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using MSX BPB"); useMsxBpb = true; } else if(bitsInBpsApricot == 1 && correctSpcApricot && @@ -232,7 +232,7 @@ namespace Aaru.Filesystems.FAT apricotBpb.mainBPB.spfat > 0 && apricotBpb.partitionCount == 0) { - DicConsole.DebugWriteLine("FAT plugin", "Using Apricot BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using Apricot BPB"); useApricotBpb = true; } else if(bitsInBpsDos40 == 1 && correctSpcDos40 && ebpb.fats_no <= 2 && ebpb.root_ent > 0 && @@ -243,13 +243,13 @@ namespace Aaru.Filesystems.FAT if(ebpb.big_sectors <= partition.End - partition.Start + 1) if(ebpb.signature == 0x29 || andosOemCorrect) { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 4.0 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 4.0 BPB"); useExtendedBpb = true; minBootNearJump = 0x3C; } else { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.4 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.4 BPB"); userShortExtendedBpb = true; minBootNearJump = 0x29; } @@ -257,13 +257,13 @@ namespace Aaru.Filesystems.FAT else if(ebpb.sectors <= partition.End - partition.Start + 1) if(ebpb.signature == 0x29 || andosOemCorrect) { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 4.0 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 4.0 BPB"); useExtendedBpb = true; minBootNearJump = 0x3C; } else { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.4 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.4 BPB"); userShortExtendedBpb = true; minBootNearJump = 0x29; } @@ -275,7 +275,7 @@ namespace Aaru.Filesystems.FAT if(dos33Bpb.sectors == 0 && dos33Bpb.hsectors <= partition.Start && dos33Bpb.big_sectors > 0 && dos33Bpb.big_sectors <= partition.End - partition.Start + 1) { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.3 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.3 BPB"); useDos33Bpb = true; minBootNearJump = 0x22; } @@ -284,12 +284,12 @@ namespace Aaru.Filesystems.FAT if(atariBpb.jump[0] == 0x60 || atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") { - DicConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); useAtariBpb = true; } else { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.3 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.3 BPB"); useDos33Bpb = true; minBootNearJump = 0x22; } @@ -298,7 +298,7 @@ namespace Aaru.Filesystems.FAT if(dos32Bpb.hsectors <= partition.Start && dos32Bpb.hsectors + dos32Bpb.sectors == dos32Bpb.total_sectors) { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.2 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.2 BPB"); useDos32Bpb = true; minBootNearJump = 0x1E; } @@ -306,12 +306,12 @@ namespace Aaru.Filesystems.FAT if(atariBpb.jump[0] == 0x60 || atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") { - DicConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); useAtariBpb = true; } else { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 3.0 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 3.0 BPB"); useDos3Bpb = true; minBootNearJump = 0x1C; } @@ -320,12 +320,12 @@ namespace Aaru.Filesystems.FAT if(atariBpb.jump[0] == 0x60 || atariBpb.jump[0] == 0xE9 && atariBpb.jump[1] == 0x00 && Encoding.ASCII.GetString(dos33Bpb.oem_name) != "NEXT ") { - DicConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using Atari BPB"); useAtariBpb = true; } else { - DicConsole.DebugWriteLine("FAT plugin", "Using DOS 2.0 BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Using DOS 2.0 BPB"); useDos2Bpb = true; minBootNearJump = 0x16; } @@ -373,7 +373,7 @@ namespace Aaru.Filesystems.FAT validRootDir) { useDecRainbowBpb = true; - DicConsole.DebugWriteLine("FAT plugin", "Using DEC Rainbow hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using DEC Rainbow hardcoded BPB."); fakeBpb.bps = 512; fakeBpb.spc = 1; fakeBpb.rsectors = 20; @@ -402,7 +402,7 @@ namespace Aaru.Filesystems.FAT case 0xE5: if(imagePlugin.Info.Sectors == 2002 && imagePlugin.Info.SectorSize == 128) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 128; fakeBpb.spc = 4; fakeBpb.rsectors = 1; @@ -420,7 +420,7 @@ namespace Aaru.Filesystems.FAT case 0xFD: if(imagePlugin.Info.Sectors == 4004 && imagePlugin.Info.SectorSize == 128) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 128; fakeBpb.spc = 4; fakeBpb.rsectors = 4; @@ -435,7 +435,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 2002 && imagePlugin.Info.SectorSize == 128) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 128; fakeBpb.spc = 4; fakeBpb.rsectors = 4; @@ -453,7 +453,7 @@ namespace Aaru.Filesystems.FAT case 0xFE: if(imagePlugin.Info.Sectors == 320 && imagePlugin.Info.SectorSize == 512) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" SSDD."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" SSDD."); fakeBpb.bps = 512; fakeBpb.spc = 1; fakeBpb.rsectors = 1; @@ -468,7 +468,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 2002 && imagePlugin.Info.SectorSize == 128) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 128; fakeBpb.spc = 4; fakeBpb.rsectors = 1; @@ -483,7 +483,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 1232 && imagePlugin.Info.SectorSize == 1024) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 1024; fakeBpb.spc = 1; fakeBpb.rsectors = 1; @@ -498,7 +498,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 616 && imagePlugin.Info.SectorSize == 1024) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 1024; fakeBpb.spc = 1; fakeBpb.rsectors = 1; @@ -512,7 +512,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 720 && imagePlugin.Info.SectorSize == 128) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB."); fakeBpb.bps = 128; fakeBpb.spc = 2; fakeBpb.rsectors = 54; @@ -527,7 +527,7 @@ namespace Aaru.Filesystems.FAT } else if(imagePlugin.Info.Sectors == 640 && imagePlugin.Info.SectorSize == 512) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" DSDD."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" DSDD."); fakeBpb.bps = 512; fakeBpb.spc = 2; fakeBpb.rsectors = 1; @@ -545,7 +545,7 @@ namespace Aaru.Filesystems.FAT case 0xFF: if(imagePlugin.Info.Sectors == 640 && imagePlugin.Info.SectorSize == 512) { - DicConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" DSDD."); + AaruConsole.DebugWriteLine("FAT plugin", "Using hardcoded BPB for 5.25\" DSDD."); fakeBpb.bps = 512; fakeBpb.spc = 2; fakeBpb.rsectors = 1; diff --git a/Aaru.Filesystems/FAT/Info.cs b/Aaru.Filesystems/FAT/Info.cs index 522112cd4..2a500c8d2 100644 --- a/Aaru.Filesystems/FAT/Info.cs +++ b/Aaru.Filesystems/FAT/Info.cs @@ -78,10 +78,10 @@ namespace Aaru.Filesystems.FAT ulong expectedClusters = humanBpb.bpc > 0 ? partition.Size / humanBpb.bpc : 0; - DicConsole.DebugWriteLine("FAT plugin", "Human bpc = {0}", humanBpb.bpc); - DicConsole.DebugWriteLine("FAT plugin", "Human clusters = {0}", humanBpb.clusters); - DicConsole.DebugWriteLine("FAT plugin", "Human big_clusters = {0}", humanBpb.big_clusters); - DicConsole.DebugWriteLine("FAT plugin", "Human expected clusters = {0}", expectedClusters); + AaruConsole.DebugWriteLine("FAT plugin", "Human bpc = {0}", humanBpb.bpc); + AaruConsole.DebugWriteLine("FAT plugin", "Human clusters = {0}", humanBpb.clusters); + AaruConsole.DebugWriteLine("FAT plugin", "Human big_clusters = {0}", humanBpb.big_clusters); + AaruConsole.DebugWriteLine("FAT plugin", "Human expected clusters = {0}", expectedClusters); // Check clusters for Human68k are correct bool humanClustersCorrect = humanBpb.clusters == 0 @@ -99,9 +99,9 @@ namespace Aaru.Filesystems.FAT // Check correct branch for Human68k bool humanBranchCorrect = bpbSector[0] == 0x60 && bpbSector[1] >= 0x20 && bpbSector[1] < 0xFE; - DicConsole.DebugWriteLine("FAT plugin", "humanClustersCorrect = {0}", humanClustersCorrect); - DicConsole.DebugWriteLine("FAT plugin", "humanOemCorrect = {0}", humanOemCorrect); - DicConsole.DebugWriteLine("FAT plugin", "humanBranchCorrect = {0}", humanBranchCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanClustersCorrect = {0}", humanClustersCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanOemCorrect = {0}", humanOemCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "humanBranchCorrect = {0}", humanBranchCorrect); // If all Human68k checks are correct, it is a Human68k FAT16 if(humanClustersCorrect && humanOemCorrect && humanBranchCorrect && expectedClusters > 0) return true; @@ -136,25 +136,25 @@ namespace Aaru.Filesystems.FAT string atariString = Encoding.ASCII.GetString(atariOem); string oemString = Encoding.ASCII.GetString(dosOem); - DicConsole.DebugWriteLine("FAT plugin", "atari_oem_correct = {0}", atariOemCorrect); - DicConsole.DebugWriteLine("FAT plugin", "dos_oem_correct = {0}", dosOemCorrect); - DicConsole.DebugWriteLine("FAT plugin", "bps = {0}", bps); - DicConsole.DebugWriteLine("FAT plugin", "bits in bps = {0}", bitsInBps); - DicConsole.DebugWriteLine("FAT plugin", "spc = {0}", spc); - DicConsole.DebugWriteLine("FAT plugin", "correct_spc = {0}", correctSpc); - DicConsole.DebugWriteLine("FAT plugin", "reserved_secs = {0}", reservedSecs); - DicConsole.DebugWriteLine("FAT plugin", "fats_no = {0}", numberOfFats); - DicConsole.DebugWriteLine("FAT plugin", "root_entries = {0}", rootEntries); - DicConsole.DebugWriteLine("FAT plugin", "sectors = {0}", sectors); - DicConsole.DebugWriteLine("FAT plugin", "media_descriptor = 0x{0:X2}", mediaDescriptor); - DicConsole.DebugWriteLine("FAT plugin", "fat_sectors = {0}", fatSectors); - DicConsole.DebugWriteLine("FAT plugin", "msx_id = \"{0}\"", msxString); - DicConsole.DebugWriteLine("FAT plugin", "big_sectors = {0}", bigSectors); - DicConsole.DebugWriteLine("FAT plugin", "bpb_signature = 0x{0:X2}", bpbSignature); - DicConsole.DebugWriteLine("FAT plugin", "fat32_signature = 0x{0:X2}", fat32Signature); - DicConsole.DebugWriteLine("FAT plugin", "fat32_id = \"{0}\"", fat32String); - DicConsole.DebugWriteLine("FAT plugin", "huge_sectors = {0}", hugeSectors); - DicConsole.DebugWriteLine("FAT plugin", "fat_id = 0x{0:X2}", fatId); + AaruConsole.DebugWriteLine("FAT plugin", "atari_oem_correct = {0}", atariOemCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "dos_oem_correct = {0}", dosOemCorrect); + AaruConsole.DebugWriteLine("FAT plugin", "bps = {0}", bps); + AaruConsole.DebugWriteLine("FAT plugin", "bits in bps = {0}", bitsInBps); + AaruConsole.DebugWriteLine("FAT plugin", "spc = {0}", spc); + AaruConsole.DebugWriteLine("FAT plugin", "correct_spc = {0}", correctSpc); + AaruConsole.DebugWriteLine("FAT plugin", "reserved_secs = {0}", reservedSecs); + AaruConsole.DebugWriteLine("FAT plugin", "fats_no = {0}", numberOfFats); + AaruConsole.DebugWriteLine("FAT plugin", "root_entries = {0}", rootEntries); + AaruConsole.DebugWriteLine("FAT plugin", "sectors = {0}", sectors); + AaruConsole.DebugWriteLine("FAT plugin", "media_descriptor = 0x{0:X2}", mediaDescriptor); + AaruConsole.DebugWriteLine("FAT plugin", "fat_sectors = {0}", fatSectors); + AaruConsole.DebugWriteLine("FAT plugin", "msx_id = \"{0}\"", msxString); + AaruConsole.DebugWriteLine("FAT plugin", "big_sectors = {0}", bigSectors); + AaruConsole.DebugWriteLine("FAT plugin", "bpb_signature = 0x{0:X2}", bpbSignature); + AaruConsole.DebugWriteLine("FAT plugin", "fat32_signature = 0x{0:X2}", fat32Signature); + AaruConsole.DebugWriteLine("FAT plugin", "fat32_id = \"{0}\"", fat32String); + AaruConsole.DebugWriteLine("FAT plugin", "huge_sectors = {0}", hugeSectors); + AaruConsole.DebugWriteLine("FAT plugin", "fat_id = 0x{0:X2}", fatId); ushort apricotBps = BitConverter.ToUInt16(bpbSector, 0x50); byte apricotSpc = bpbSector[0x52]; @@ -169,15 +169,15 @@ namespace Aaru.Filesystems.FAT int bitsInApricotBps = CountBits.Count(apricotBps); byte apricotPartitions = bpbSector[0x0C]; - DicConsole.DebugWriteLine("FAT plugin", "apricot_bps = {0}", apricotBps); - DicConsole.DebugWriteLine("FAT plugin", "apricot_spc = {0}", apricotSpc); - DicConsole.DebugWriteLine("FAT plugin", "apricot_correct_spc = {0}", apricotCorrectSpc); - DicConsole.DebugWriteLine("FAT plugin", "apricot_reserved_secs = {0}", apricotReservedSecs); - DicConsole.DebugWriteLine("FAT plugin", "apricot_fats_no = {0}", apricotFatsNo); - DicConsole.DebugWriteLine("FAT plugin", "apricot_root_entries = {0}", apricotRootEntries); - DicConsole.DebugWriteLine("FAT plugin", "apricot_sectors = {0}", apricotSectors); - DicConsole.DebugWriteLine("FAT plugin", "apricot_media_descriptor = 0x{0:X2}", apricotMediaDescriptor); - DicConsole.DebugWriteLine("FAT plugin", "apricot_fat_sectors = {0}", apricotFatSectors); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_bps = {0}", apricotBps); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_spc = {0}", apricotSpc); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_correct_spc = {0}", apricotCorrectSpc); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_reserved_secs = {0}", apricotReservedSecs); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_fats_no = {0}", apricotFatsNo); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_root_entries = {0}", apricotRootEntries); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_sectors = {0}", apricotSectors); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_media_descriptor = 0x{0:X2}", apricotMediaDescriptor); + AaruConsole.DebugWriteLine("FAT plugin", "apricot_fat_sectors = {0}", apricotFatSectors); // This is to support FAT partitions on hybrid ISO/USB images if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc) @@ -289,7 +289,7 @@ namespace Aaru.Filesystems.FAT byte fat3 = fatSector[2]; ushort fat2ndCluster = (ushort)(((fat2 << 8) + fat3) & 0xFFF); - DicConsole.DebugWriteLine("FAT plugin", "1st fat cluster 1 = {0:X3}", fat2ndCluster); + AaruConsole.DebugWriteLine("FAT plugin", "1st fat cluster 1 = {0:X3}", fat2ndCluster); if(fat2ndCluster < 0xFF0) return false; ulong fat2SectorNo = 0; @@ -323,7 +323,7 @@ namespace Aaru.Filesystems.FAT if(fat2SectorNo > partition.End) return false; - DicConsole.DebugWriteLine("FAT plugin", "2nd fat starts at = {0}", fat2SectorNo); + AaruConsole.DebugWriteLine("FAT plugin", "2nd fat starts at = {0}", fat2SectorNo); byte[] fat2Sector = imagePlugin.ReadSector(fat2SectorNo); diff --git a/Aaru.Filesystems/FAT/Super.cs b/Aaru.Filesystems/FAT/Super.cs index 518a400f6..db23bd207 100644 --- a/Aaru.Filesystems/FAT/Super.cs +++ b/Aaru.Filesystems/FAT/Super.cs @@ -90,7 +90,7 @@ namespace Aaru.Filesystems.FAT default: return Errno.InvalidArgument; } - DicConsole.DebugWriteLine("FAT plugin", "Reading BPB"); + AaruConsole.DebugWriteLine("FAT plugin", "Reading BPB"); uint sectorsPerBpb = imagePlugin.Info.SectorSize < 512 ? 512 / imagePlugin.Info.SectorSize : 1; @@ -632,12 +632,12 @@ namespace Aaru.Filesystems.FAT } else if(fat16) { - DicConsole.DebugWriteLine("FAT plugin", "Reading FAT16"); + AaruConsole.DebugWriteLine("FAT plugin", "Reading FAT16"); byte[] fatBytes = imagePlugin.ReadSectors(fatFirstSector + (useFirstFat ? 0 : sectorsPerFat), sectorsPerFat); - DicConsole.DebugWriteLine("FAT plugin", "Casting FAT"); + AaruConsole.DebugWriteLine("FAT plugin", "Casting FAT"); fatEntries = MemoryMarshal.Cast(fatBytes).ToArray(); } diff --git a/Aaru.Filesystems/FATX/Super.cs b/Aaru.Filesystems/FATX/Super.cs index a1027c158..2b2476781 100644 --- a/Aaru.Filesystems/FATX/Super.cs +++ b/Aaru.Filesystems/FATX/Super.cs @@ -56,7 +56,7 @@ namespace Aaru.Filesystems.FATX if(imagePlugin.Info.SectorSize < 512) return Errno.InvalidArgument; - DicConsole.DebugWriteLine("Xbox FAT plugin", "Reading superblock"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Reading superblock"); byte[] sector = imagePlugin.ReadSector(partition.Start); @@ -70,11 +70,11 @@ namespace Aaru.Filesystems.FATX if(superblock.magic != FATX_MAGIC) return Errno.InvalidArgument; - DicConsole.DebugWriteLine("Xbox FAT plugin", + AaruConsole.DebugWriteLine("Xbox FAT plugin", littleEndian ? "Filesystem is little endian" : "Filesystem is big endian"); int logicalSectorsPerPhysicalSectors = partition.Offset == 0 && littleEndian ? 8 : 1; - DicConsole.DebugWriteLine("Xbox FAT plugin", "logicalSectorsPerPhysicalSectors = {0}", + AaruConsole.DebugWriteLine("Xbox FAT plugin", "logicalSectorsPerPhysicalSectors = {0}", logicalSectorsPerPhysicalSectors); string volumeLabel = StringHandlers.CToString(superblock.volumeLabel, @@ -105,23 +105,23 @@ namespace Aaru.Filesystems.FATX FreeBlocks = 0 // Requires traversing the FAT }; - DicConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.ClusterSize: {0}", XmlFsType.ClusterSize); - DicConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.VolumeName: {0}", XmlFsType.VolumeName); - DicConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.VolumeSerial: {0}", XmlFsType.VolumeSerial); - DicConsole.DebugWriteLine("Xbox FAT plugin", "stat.Blocks: {0}", statfs.Blocks); - DicConsole.DebugWriteLine("Xbox FAT plugin", "stat.FilenameLength: {0}", statfs.FilenameLength); - DicConsole.DebugWriteLine("Xbox FAT plugin", "stat.Id: {0}", statfs.Id.Serial32); - DicConsole.DebugWriteLine("Xbox FAT plugin", "stat.Type: {0}", statfs.Type); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.ClusterSize: {0}", XmlFsType.ClusterSize); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.VolumeName: {0}", XmlFsType.VolumeName); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "XmlFsType.VolumeSerial: {0}", XmlFsType.VolumeSerial); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "stat.Blocks: {0}", statfs.Blocks); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "stat.FilenameLength: {0}", statfs.FilenameLength); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "stat.Id: {0}", statfs.Id.Serial32); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "stat.Type: {0}", statfs.Type); byte[] buffer; fatStartSector = FAT_START / imagePlugin.Info.SectorSize + partition.Start; uint fatSize; - DicConsole.DebugWriteLine("Xbox FAT plugin", "fatStartSector: {0}", fatStartSector); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "fatStartSector: {0}", fatStartSector); if(statfs.Blocks > MAX_XFAT16_CLUSTERS) { - DicConsole.DebugWriteLine("Xbox FAT plugin", "Reading FAT32"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Reading FAT32"); fatSize = (uint)((statfs.Blocks + 1) * sizeof(uint) / imagePlugin.Info.SectorSize); if((uint)((statfs.Blocks + 1) * sizeof(uint) % imagePlugin.Info.SectorSize) > 0) fatSize++; @@ -130,22 +130,22 @@ namespace Aaru.Filesystems.FATX if(fatSize * imagePlugin.Info.SectorSize % 4096 > 0) fatClusters++; fatSize = (uint)(fatClusters * 4096 / imagePlugin.Info.SectorSize); - DicConsole.DebugWriteLine("Xbox FAT plugin", "FAT is {0} sectors", fatSize); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "FAT is {0} sectors", fatSize); buffer = imagePlugin.ReadSectors(fatStartSector, fatSize); - DicConsole.DebugWriteLine("Xbox FAT plugin", "Casting FAT"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Casting FAT"); fat32 = MemoryMarshal.Cast(buffer).ToArray(); if(!littleEndian) for(int i = 0; i < fat32.Length; i++) fat32[i] = Swapping.Swap(fat32[i]); - DicConsole.DebugWriteLine("Xbox FAT plugin", "fat32[0] == FATX32_ID = {0}", fat32[0] == FATX32_ID); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "fat32[0] == FATX32_ID = {0}", fat32[0] == FATX32_ID); if(fat32[0] != FATX32_ID) return Errno.InvalidArgument; } else { - DicConsole.DebugWriteLine("Xbox FAT plugin", "Reading FAT16"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Reading FAT16"); fatSize = (uint)((statfs.Blocks + 1) * sizeof(ushort) / imagePlugin.Info.SectorSize); if((uint)((statfs.Blocks + 1) * sizeof(ushort) % imagePlugin.Info.SectorSize) > 0) fatSize++; @@ -154,17 +154,17 @@ namespace Aaru.Filesystems.FATX if(fatSize * imagePlugin.Info.SectorSize % 4096 > 0) fatClusters++; fatSize = (uint)(fatClusters * 4096 / imagePlugin.Info.SectorSize); - DicConsole.DebugWriteLine("Xbox FAT plugin", "FAT is {0} sectors", fatSize); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "FAT is {0} sectors", fatSize); buffer = imagePlugin.ReadSectors(fatStartSector, fatSize); - DicConsole.DebugWriteLine("Xbox FAT plugin", "Casting FAT"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Casting FAT"); fat16 = MemoryMarshal.Cast(buffer).ToArray(); if(!littleEndian) for(int i = 0; i < fat16.Length; i++) fat16[i] = Swapping.Swap(fat16[i]); - DicConsole.DebugWriteLine("Xbox FAT plugin", "fat16[0] == FATX16_ID = {0}", fat16[0] == FATX16_ID); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "fat16[0] == FATX16_ID = {0}", fat16[0] == FATX16_ID); if(fat16[0] != FATX16_ID) return Errno.InvalidArgument; } @@ -173,9 +173,9 @@ namespace Aaru.Filesystems.FATX firstClusterSector = fatStartSector + fatSize; bytesPerCluster = sectorsPerCluster * imagePlugin.Info.SectorSize; - DicConsole.DebugWriteLine("Xbox FAT plugin", "sectorsPerCluster = {0}", sectorsPerCluster); - DicConsole.DebugWriteLine("Xbox FAT plugin", "bytesPerCluster = {0}", bytesPerCluster); - DicConsole.DebugWriteLine("Xbox FAT plugin", "firstClusterSector = {0}", firstClusterSector); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "sectorsPerCluster = {0}", sectorsPerCluster); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "bytesPerCluster = {0}", bytesPerCluster); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "firstClusterSector = {0}", firstClusterSector); uint[] rootDirectoryClusters = GetClusters(superblock.rootDirectoryCluster); @@ -183,7 +183,7 @@ namespace Aaru.Filesystems.FATX byte[] rootDirectoryBuffer = new byte[bytesPerCluster * rootDirectoryClusters.Length]; - DicConsole.DebugWriteLine("Xbox FAT plugin", "Reading root directory"); + AaruConsole.DebugWriteLine("Xbox FAT plugin", "Reading root directory"); for(int i = 0; i < rootDirectoryClusters.Length; i++) { buffer = diff --git a/Aaru.Filesystems/FFS.cs b/Aaru.Filesystems/FFS.cs index dddfda88c..eef4d7a03 100644 --- a/Aaru.Filesystems/FFS.cs +++ b/Aaru.Filesystems/FFS.cs @@ -233,45 +233,45 @@ namespace Aaru.Filesystems ufs_sb.fs_cstotal.cs_spare[2] = Swapping.Swap(ufs_sb.fs_cstotal.cs_spare[2]); } - DicConsole.DebugWriteLine("FFS plugin", "ufs_sb offset: 0x{0:X8}", sb_offset); - DicConsole.DebugWriteLine("FFS plugin", "fs_rlink: 0x{0:X8}", ufs_sb.fs_rlink); - DicConsole.DebugWriteLine("FFS plugin", "fs_sblkno: 0x{0:X8}", ufs_sb.fs_sblkno); - DicConsole.DebugWriteLine("FFS plugin", "fs_cblkno: 0x{0:X8}", ufs_sb.fs_cblkno); - DicConsole.DebugWriteLine("FFS plugin", "fs_iblkno: 0x{0:X8}", ufs_sb.fs_iblkno); - DicConsole.DebugWriteLine("FFS plugin", "fs_dblkno: 0x{0:X8}", ufs_sb.fs_dblkno); - DicConsole.DebugWriteLine("FFS plugin", "fs_size: 0x{0:X8}", ufs_sb.fs_size); - DicConsole.DebugWriteLine("FFS plugin", "fs_dsize: 0x{0:X8}", ufs_sb.fs_dsize); - DicConsole.DebugWriteLine("FFS plugin", "fs_ncg: 0x{0:X8}", ufs_sb.fs_ncg); - DicConsole.DebugWriteLine("FFS plugin", "fs_bsize: 0x{0:X8}", ufs_sb.fs_bsize); - DicConsole.DebugWriteLine("FFS plugin", "fs_fsize: 0x{0:X8}", ufs_sb.fs_fsize); - DicConsole.DebugWriteLine("FFS plugin", "fs_frag: 0x{0:X8}", ufs_sb.fs_frag); - DicConsole.DebugWriteLine("FFS plugin", "fs_minfree: 0x{0:X8}", ufs_sb.fs_minfree); - DicConsole.DebugWriteLine("FFS plugin", "fs_bmask: 0x{0:X8}", ufs_sb.fs_bmask); - DicConsole.DebugWriteLine("FFS plugin", "fs_fmask: 0x{0:X8}", ufs_sb.fs_fmask); - DicConsole.DebugWriteLine("FFS plugin", "fs_bshift: 0x{0:X8}", ufs_sb.fs_bshift); - DicConsole.DebugWriteLine("FFS plugin", "fs_fshift: 0x{0:X8}", ufs_sb.fs_fshift); - DicConsole.DebugWriteLine("FFS plugin", "fs_maxcontig: 0x{0:X8}", ufs_sb.fs_maxcontig); - DicConsole.DebugWriteLine("FFS plugin", "fs_maxbpg: 0x{0:X8}", ufs_sb.fs_maxbpg); - DicConsole.DebugWriteLine("FFS plugin", "fs_fragshift: 0x{0:X8}", ufs_sb.fs_fragshift); - DicConsole.DebugWriteLine("FFS plugin", "fs_fsbtodb: 0x{0:X8}", ufs_sb.fs_fsbtodb); - DicConsole.DebugWriteLine("FFS plugin", "fs_sbsize: 0x{0:X8}", ufs_sb.fs_sbsize); - DicConsole.DebugWriteLine("FFS plugin", "fs_csmask: 0x{0:X8}", ufs_sb.fs_csmask); - DicConsole.DebugWriteLine("FFS plugin", "fs_csshift: 0x{0:X8}", ufs_sb.fs_csshift); - DicConsole.DebugWriteLine("FFS plugin", "fs_nindir: 0x{0:X8}", ufs_sb.fs_nindir); - DicConsole.DebugWriteLine("FFS plugin", "fs_inopb: 0x{0:X8}", ufs_sb.fs_inopb); - DicConsole.DebugWriteLine("FFS plugin", "fs_optim: 0x{0:X8}", ufs_sb.fs_optim); - DicConsole.DebugWriteLine("FFS plugin", "fs_id_1: 0x{0:X8}", ufs_sb.fs_id_1); - DicConsole.DebugWriteLine("FFS plugin", "fs_id_2: 0x{0:X8}", ufs_sb.fs_id_2); - DicConsole.DebugWriteLine("FFS plugin", "fs_csaddr: 0x{0:X8}", ufs_sb.fs_csaddr); - DicConsole.DebugWriteLine("FFS plugin", "fs_cssize: 0x{0:X8}", ufs_sb.fs_cssize); - DicConsole.DebugWriteLine("FFS plugin", "fs_cgsize: 0x{0:X8}", ufs_sb.fs_cgsize); - DicConsole.DebugWriteLine("FFS plugin", "fs_ipg: 0x{0:X8}", ufs_sb.fs_ipg); - DicConsole.DebugWriteLine("FFS plugin", "fs_fpg: 0x{0:X8}", ufs_sb.fs_fpg); - DicConsole.DebugWriteLine("FFS plugin", "fs_fmod: 0x{0:X2}", ufs_sb.fs_fmod); - DicConsole.DebugWriteLine("FFS plugin", "fs_clean: 0x{0:X2}", ufs_sb.fs_clean); - DicConsole.DebugWriteLine("FFS plugin", "fs_ronly: 0x{0:X2}", ufs_sb.fs_ronly); - DicConsole.DebugWriteLine("FFS plugin", "fs_flags: 0x{0:X2}", ufs_sb.fs_flags); - DicConsole.DebugWriteLine("FFS plugin", "fs_magic: 0x{0:X8}", ufs_sb.fs_magic); + AaruConsole.DebugWriteLine("FFS plugin", "ufs_sb offset: 0x{0:X8}", sb_offset); + AaruConsole.DebugWriteLine("FFS plugin", "fs_rlink: 0x{0:X8}", ufs_sb.fs_rlink); + AaruConsole.DebugWriteLine("FFS plugin", "fs_sblkno: 0x{0:X8}", ufs_sb.fs_sblkno); + AaruConsole.DebugWriteLine("FFS plugin", "fs_cblkno: 0x{0:X8}", ufs_sb.fs_cblkno); + AaruConsole.DebugWriteLine("FFS plugin", "fs_iblkno: 0x{0:X8}", ufs_sb.fs_iblkno); + AaruConsole.DebugWriteLine("FFS plugin", "fs_dblkno: 0x{0:X8}", ufs_sb.fs_dblkno); + AaruConsole.DebugWriteLine("FFS plugin", "fs_size: 0x{0:X8}", ufs_sb.fs_size); + AaruConsole.DebugWriteLine("FFS plugin", "fs_dsize: 0x{0:X8}", ufs_sb.fs_dsize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_ncg: 0x{0:X8}", ufs_sb.fs_ncg); + AaruConsole.DebugWriteLine("FFS plugin", "fs_bsize: 0x{0:X8}", ufs_sb.fs_bsize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fsize: 0x{0:X8}", ufs_sb.fs_fsize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_frag: 0x{0:X8}", ufs_sb.fs_frag); + AaruConsole.DebugWriteLine("FFS plugin", "fs_minfree: 0x{0:X8}", ufs_sb.fs_minfree); + AaruConsole.DebugWriteLine("FFS plugin", "fs_bmask: 0x{0:X8}", ufs_sb.fs_bmask); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fmask: 0x{0:X8}", ufs_sb.fs_fmask); + AaruConsole.DebugWriteLine("FFS plugin", "fs_bshift: 0x{0:X8}", ufs_sb.fs_bshift); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fshift: 0x{0:X8}", ufs_sb.fs_fshift); + AaruConsole.DebugWriteLine("FFS plugin", "fs_maxcontig: 0x{0:X8}", ufs_sb.fs_maxcontig); + AaruConsole.DebugWriteLine("FFS plugin", "fs_maxbpg: 0x{0:X8}", ufs_sb.fs_maxbpg); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fragshift: 0x{0:X8}", ufs_sb.fs_fragshift); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fsbtodb: 0x{0:X8}", ufs_sb.fs_fsbtodb); + AaruConsole.DebugWriteLine("FFS plugin", "fs_sbsize: 0x{0:X8}", ufs_sb.fs_sbsize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_csmask: 0x{0:X8}", ufs_sb.fs_csmask); + AaruConsole.DebugWriteLine("FFS plugin", "fs_csshift: 0x{0:X8}", ufs_sb.fs_csshift); + AaruConsole.DebugWriteLine("FFS plugin", "fs_nindir: 0x{0:X8}", ufs_sb.fs_nindir); + AaruConsole.DebugWriteLine("FFS plugin", "fs_inopb: 0x{0:X8}", ufs_sb.fs_inopb); + AaruConsole.DebugWriteLine("FFS plugin", "fs_optim: 0x{0:X8}", ufs_sb.fs_optim); + AaruConsole.DebugWriteLine("FFS plugin", "fs_id_1: 0x{0:X8}", ufs_sb.fs_id_1); + AaruConsole.DebugWriteLine("FFS plugin", "fs_id_2: 0x{0:X8}", ufs_sb.fs_id_2); + AaruConsole.DebugWriteLine("FFS plugin", "fs_csaddr: 0x{0:X8}", ufs_sb.fs_csaddr); + AaruConsole.DebugWriteLine("FFS plugin", "fs_cssize: 0x{0:X8}", ufs_sb.fs_cssize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_cgsize: 0x{0:X8}", ufs_sb.fs_cgsize); + AaruConsole.DebugWriteLine("FFS plugin", "fs_ipg: 0x{0:X8}", ufs_sb.fs_ipg); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fpg: 0x{0:X8}", ufs_sb.fs_fpg); + AaruConsole.DebugWriteLine("FFS plugin", "fs_fmod: 0x{0:X2}", ufs_sb.fs_fmod); + AaruConsole.DebugWriteLine("FFS plugin", "fs_clean: 0x{0:X2}", ufs_sb.fs_clean); + AaruConsole.DebugWriteLine("FFS plugin", "fs_ronly: 0x{0:X2}", ufs_sb.fs_ronly); + AaruConsole.DebugWriteLine("FFS plugin", "fs_flags: 0x{0:X2}", ufs_sb.fs_flags); + AaruConsole.DebugWriteLine("FFS plugin", "fs_magic: 0x{0:X8}", ufs_sb.fs_magic); if(ufs_sb.fs_magic == UFS2_MAGIC) fs_type_ufs2 = true; else diff --git a/Aaru.Filesystems/Fossil.cs b/Aaru.Filesystems/Fossil.cs index 36fcd959b..b55339aba 100644 --- a/Aaru.Filesystems/Fossil.cs +++ b/Aaru.Filesystems/Fossil.cs @@ -63,7 +63,7 @@ namespace Aaru.Filesystems byte[] sector = imagePlugin.ReadSector(partition.Start + hdrSector); FossilHeader hdr = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic, + AaruConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic, FOSSIL_HDR_MAGIC); return hdr.magic == FOSSIL_HDR_MAGIC; @@ -82,7 +82,7 @@ namespace Aaru.Filesystems byte[] sector = imagePlugin.ReadSector(partition.Start + hdrSector); FossilHeader hdr = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic, + AaruConsole.DebugWriteLine("Fossil plugin", "magic at 0x{0:X8} (expected 0x{1:X8})", hdr.magic, FOSSIL_HDR_MAGIC); StringBuilder sb = new StringBuilder(); @@ -107,7 +107,7 @@ namespace Aaru.Filesystems sector = imagePlugin.ReadSector(sbLocation); FossilSuperBlock fsb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("Fossil plugin", "magic 0x{0:X8} (expected 0x{1:X8})", fsb.magic, + AaruConsole.DebugWriteLine("Fossil plugin", "magic 0x{0:X8} (expected 0x{1:X8})", fsb.magic, FOSSIL_SB_MAGIC); if(fsb.magic == FOSSIL_SB_MAGIC) diff --git a/Aaru.Filesystems/HPOFS.cs b/Aaru.Filesystems/HPOFS.cs index b9ac96785..f9613438e 100644 --- a/Aaru.Filesystems/HPOFS.cs +++ b/Aaru.Filesystems/HPOFS.cs @@ -90,70 +90,70 @@ namespace Aaru.Filesystems MediaInformationBlock mib = Marshal.ByteArrayToStructureBigEndian(medInfoSector); VolumeInformationBlock vib = Marshal.ByteArrayToStructureBigEndian(volInfoSector); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.oem_name = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.oem_name = \"{0}\"", StringHandlers.CToString(bpb.oem_name)); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.bps = {0}", bpb.bps); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.spc = {0}", bpb.spc); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.rsectors = {0}", bpb.rsectors); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.fats_no = {0}", bpb.fats_no); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.root_ent = {0}", bpb.root_ent); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.sectors = {0}", bpb.sectors); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.media = 0x{0:X2}", bpb.media); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.spfat = {0}", bpb.spfat); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.sptrk = {0}", bpb.sptrk); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.heads = {0}", bpb.heads); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.hsectors = {0}", bpb.hsectors); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.big_sectors = {0}", bpb.big_sectors); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.drive_no = 0x{0:X2}", bpb.drive_no); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.nt_flags = {0}", bpb.nt_flags); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.signature = 0x{0:X2}", bpb.signature); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.serial_no = 0x{0:X8}", bpb.serial_no); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.volume_label = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.bps = {0}", bpb.bps); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.spc = {0}", bpb.spc); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.rsectors = {0}", bpb.rsectors); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.fats_no = {0}", bpb.fats_no); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.root_ent = {0}", bpb.root_ent); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.sectors = {0}", bpb.sectors); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.media = 0x{0:X2}", bpb.media); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.spfat = {0}", bpb.spfat); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.sptrk = {0}", bpb.sptrk); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.heads = {0}", bpb.heads); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.hsectors = {0}", bpb.hsectors); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.big_sectors = {0}", bpb.big_sectors); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.drive_no = 0x{0:X2}", bpb.drive_no); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.nt_flags = {0}", bpb.nt_flags); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.signature = 0x{0:X2}", bpb.signature); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.serial_no = 0x{0:X8}", bpb.serial_no); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.volume_label = \"{0}\"", StringHandlers.SpacePaddedToString(bpb.volume_label)); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.fs_type = \"{0}\"", StringHandlers.CToString(bpb.fs_type)); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.boot_code is empty? = {0}", + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.fs_type = \"{0}\"", StringHandlers.CToString(bpb.fs_type)); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.boot_code is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(bpb.boot_code)); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.unknown = {0}", bpb.unknown); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.unknown2 = {0}", bpb.unknown2); - DicConsole.DebugWriteLine("HPOFS Plugin", "bpb.signature2 = {0}", bpb.signature2); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.blockId = \"{0}\"", StringHandlers.CToString(mib.blockId)); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.volumeLabel = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.unknown = {0}", bpb.unknown); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.unknown2 = {0}", bpb.unknown2); + AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.signature2 = {0}", bpb.signature2); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.blockId = \"{0}\"", StringHandlers.CToString(mib.blockId)); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.volumeLabel = \"{0}\"", StringHandlers.SpacePaddedToString(mib.volumeLabel)); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.comment = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.comment = \"{0}\"", StringHandlers.SpacePaddedToString(mib.comment)); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.serial = 0x{0:X8}", mib.serial); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.creationTimestamp = {0}", + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.serial = 0x{0:X8}", mib.serial); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.creationTimestamp = {0}", DateHandlers.DosToDateTime(mib.creationDate, mib.creationTime)); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.codepageType = {0}", mib.codepageType); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.codepage = {0}", mib.codepage); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.rps = {0}", mib.rps); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.bps = {0}", mib.bps); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.bpc = {0}", mib.bpc); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown2 = {0}", mib.unknown2); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.sectors = {0}", mib.sectors); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown3 = {0}", mib.unknown3); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown4 = {0}", mib.unknown4); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.major = {0}", mib.major); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.minor = {0}", mib.minor); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown5 = {0}", mib.unknown5); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown6 = {0}", mib.unknown6); - DicConsole.DebugWriteLine("HPOFS Plugin", "mib.filler is empty? = {0}", + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.codepageType = {0}", mib.codepageType); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.codepage = {0}", mib.codepage); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.rps = {0}", mib.rps); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.bps = {0}", mib.bps); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.bpc = {0}", mib.bpc); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown2 = {0}", mib.unknown2); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.sectors = {0}", mib.sectors); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown3 = {0}", mib.unknown3); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown4 = {0}", mib.unknown4); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.major = {0}", mib.major); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.minor = {0}", mib.minor); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown5 = {0}", mib.unknown5); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.unknown6 = {0}", mib.unknown6); + AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.filler is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(mib.filler)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.blockId = \"{0}\"", StringHandlers.CToString(vib.blockId)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown = {0}", vib.unknown); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown2 = {0}", vib.unknown2); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown3 is empty? = {0}", + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.blockId = \"{0}\"", StringHandlers.CToString(vib.blockId)); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown = {0}", vib.unknown); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown2 = {0}", vib.unknown2); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown3 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(vib.unknown3)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown4 = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown4 = \"{0}\"", StringHandlers.SpacePaddedToString(vib.unknown4)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.owner = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.owner = \"{0}\"", StringHandlers.SpacePaddedToString(vib.owner)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown5 = \"{0}\"", + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown5 = \"{0}\"", StringHandlers.SpacePaddedToString(vib.unknown5)); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown6 = {0}", vib.unknown6); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.percentFull = {0}", vib.percentFull); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown7 = {0}", vib.unknown7); - DicConsole.DebugWriteLine("HPOFS Plugin", "vib.filler is empty? = {0}", + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown6 = {0}", vib.unknown6); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.percentFull = {0}", vib.percentFull); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown7 = {0}", vib.unknown7); + AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.filler is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(vib.filler)); sb.AppendLine("High Performance Optical File System"); diff --git a/Aaru.Filesystems/ISO9660/Info.cs b/Aaru.Filesystems/ISO9660/Info.cs index 058241ab1..3697900b2 100644 --- a/Aaru.Filesystems/ISO9660/Info.cs +++ b/Aaru.Filesystems/ISO9660/Info.cs @@ -70,8 +70,8 @@ namespace Aaru.Filesystems.ISO9660 Array.Copy(vdSector, 0x001 + xaOff, vdMagic, 0, 5); Array.Copy(vdSector, 0x009 + xaOff, hsMagic, 0, 5); - DicConsole.DebugWriteLine("ISO9660 plugin", "VDMagic = {0}", Encoding.ASCII.GetString(vdMagic)); - DicConsole.DebugWriteLine("ISO9660 plugin", "HSMagic = {0}", Encoding.ASCII.GetString(hsMagic)); + AaruConsole.DebugWriteLine("ISO9660 plugin", "VDMagic = {0}", Encoding.ASCII.GetString(vdMagic)); + AaruConsole.DebugWriteLine("ISO9660 plugin", "HSMagic = {0}", Encoding.ASCII.GetString(hsMagic)); return Encoding.ASCII.GetString(vdMagic) == ISO_MAGIC || Encoding.ASCII.GetString(hsMagic) == HIGH_SIERRA_MAGIC || @@ -116,15 +116,15 @@ namespace Aaru.Filesystems.ISO9660 while(true) { - DicConsole.DebugWriteLine("ISO9660 plugin", "Processing VD loop no. {0}", counter); + AaruConsole.DebugWriteLine("ISO9660 plugin", "Processing VD loop no. {0}", counter); // Seek to Volume Descriptor - DicConsole.DebugWriteLine("ISO9660 plugin", "Reading sector {0}", 16 + counter + partition.Start); + AaruConsole.DebugWriteLine("ISO9660 plugin", "Reading sector {0}", 16 + counter + partition.Start); byte[] vdSectorTmp = imagePlugin.ReadSector(16 + counter + partition.Start); vdSector = new byte[vdSectorTmp.Length - xaOff]; Array.Copy(vdSectorTmp, xaOff, vdSector, 0, vdSector.Length); byte vdType = vdSector[0 + hsOff]; // Volume Descriptor Type, should be 1 or 2. - DicConsole.DebugWriteLine("ISO9660 plugin", "VDType = {0}", vdType); + AaruConsole.DebugWriteLine("ISO9660 plugin", "VDType = {0}", vdType); if(vdType == 255) // Supposedly we are in the PVD. { @@ -190,7 +190,7 @@ namespace Aaru.Filesystems.ISO9660 if(svd.escape_sequences[2] == '@' || svd.escape_sequences[2] == 'C' || svd.escape_sequences[2] == 'E') jolietvd = svd; else - DicConsole.WriteLine("ISO9660 plugin", + AaruConsole.WriteLine("ISO9660 plugin", "Found unknown supplementary volume descriptor"); } else evd = true; @@ -580,9 +580,9 @@ namespace Aaru.Filesystems.ISO9660 initialEntry.boot_type = (ElToritoEmulation)((byte)initialEntry.boot_type & 0xF); - DicConsole.DebugWriteLine("DEBUG (ISO9660 plugin)", "initialEntry.load_rba = {0}", + AaruConsole.DebugWriteLine("DEBUG (ISO9660 plugin)", "initialEntry.load_rba = {0}", initialEntry.load_rba); - DicConsole.DebugWriteLine("DEBUG (ISO9660 plugin)", "initialEntry.sector_count = {0}", + AaruConsole.DebugWriteLine("DEBUG (ISO9660 plugin)", "initialEntry.sector_count = {0}", initialEntry.sector_count); byte[] bootImage = diff --git a/Aaru.Filesystems/ISO9660/Super.cs b/Aaru.Filesystems/ISO9660/Super.cs index 1ce78243b..3fcf956bd 100644 --- a/Aaru.Filesystems/ISO9660/Super.cs +++ b/Aaru.Filesystems/ISO9660/Super.cs @@ -131,16 +131,16 @@ namespace Aaru.Filesystems.ISO9660 while(true) { - DicConsole.DebugWriteLine("ISO9660 plugin", "Processing VD loop no. {0}", counter); + AaruConsole.DebugWriteLine("ISO9660 plugin", "Processing VD loop no. {0}", counter); // Seek to Volume Descriptor - DicConsole.DebugWriteLine("ISO9660 plugin", "Reading sector {0}", 16 + counter + partition.Start); + AaruConsole.DebugWriteLine("ISO9660 plugin", "Reading sector {0}", 16 + counter + partition.Start); byte[] vdSectorTmp = imagePlugin.ReadSector(16 + counter + partition.Start); vdSector = new byte[vdSectorTmp.Length - xaOff]; Array.Copy(vdSectorTmp, xaOff, vdSector, 0, vdSector.Length); byte vdType = vdSector[0 + hsOff]; // Volume Descriptor Type, should be 1 or 2. - DicConsole.DebugWriteLine("ISO9660 plugin", "VDType = {0}", vdType); + AaruConsole.DebugWriteLine("ISO9660 plugin", "VDType = {0}", vdType); if(vdType == 255) // Supposedly we are in the PVD. { @@ -208,7 +208,7 @@ namespace Aaru.Filesystems.ISO9660 svd.escape_sequences[2] == 'E') jolietvd = svd; else - DicConsole.WriteLine("ISO9660 plugin", + AaruConsole.WriteLine("ISO9660 plugin", "Found unknown supplementary volume descriptor"); if(debug) @@ -252,7 +252,7 @@ namespace Aaru.Filesystems.ISO9660 hsvd == null && fsvd == null) { - DicConsole.ErrorWriteLine("ERROR: Could not find primary volume descriptor"); + AaruConsole.ErrorWriteLine("ERROR: Could not find primary volume descriptor"); return Errno.InvalidArgument; } diff --git a/Aaru.Filesystems/LIF.cs b/Aaru.Filesystems/LIF.cs index e14c790f6..96cfc7715 100644 --- a/Aaru.Filesystems/LIF.cs +++ b/Aaru.Filesystems/LIF.cs @@ -58,7 +58,7 @@ namespace Aaru.Filesystems byte[] sector = imagePlugin.ReadSector(partition.Start); LifSystemBlock lifSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("LIF plugin", "magic 0x{0:X8} (expected 0x{1:X8})", lifSb.magic, LIF_MAGIC); + AaruConsole.DebugWriteLine("LIF plugin", "magic 0x{0:X8} (expected 0x{1:X8})", lifSb.magic, LIF_MAGIC); return lifSb.magic == LIF_MAGIC; } diff --git a/Aaru.Filesystems/LisaFS/Extent.cs b/Aaru.Filesystems/LisaFS/Extent.cs index 0d902bc15..c4e20ea91 100644 --- a/Aaru.Filesystems/LisaFS/Extent.cs +++ b/Aaru.Filesystems/LisaFS/Extent.cs @@ -185,70 +185,70 @@ namespace Aaru.Filesystems.LisaFS if(printedExtents.Contains(fileId)) return Errno.NoError; - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].filenameLen = {1}", fileId, file.filenameLen); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].filename = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].filenameLen = {1}", fileId, file.filenameLen); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].filename = {1}", fileId, StringHandlers.CToString(file.filename, Encoding)); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown1 = 0x{1:X4}", fileId, file.unknown1); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].file_uid = 0x{1:X16}", fileId, file.file_uid); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown2 = 0x{1:X2}", fileId, file.unknown2); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].etype = 0x{1:X2}", fileId, file.etype); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].ftype = {1}", fileId, file.ftype); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown3 = 0x{1:X2}", fileId, file.unknown3); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtc = {1}", fileId, file.dtc); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dta = {1}", fileId, file.dta); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtm = {1}", fileId, file.dtm); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtb = {1}", fileId, file.dtb); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dts = {1}", fileId, file.dts); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].serial = {1}", fileId, file.serial); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown4 = 0x{1:X2}", fileId, file.unknown4); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].locked = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown1 = 0x{1:X4}", fileId, file.unknown1); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].file_uid = 0x{1:X16}", fileId, file.file_uid); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown2 = 0x{1:X2}", fileId, file.unknown2); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].etype = 0x{1:X2}", fileId, file.etype); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].ftype = {1}", fileId, file.ftype); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown3 = 0x{1:X2}", fileId, file.unknown3); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtc = {1}", fileId, file.dtc); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dta = {1}", fileId, file.dta); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtm = {1}", fileId, file.dtm); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dtb = {1}", fileId, file.dtb); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].dts = {1}", fileId, file.dts); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].serial = {1}", fileId, file.serial); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown4 = 0x{1:X2}", fileId, file.unknown4); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].locked = {1}", fileId, file.locked > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].protect = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].protect = {1}", fileId, file.protect > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].master = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].master = {1}", fileId, file.master > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].scavenged = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].scavenged = {1}", fileId, file.scavenged > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].closed = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].closed = {1}", fileId, file.closed > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].open = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].open = {1}", fileId, file.open > 0); - DicConsole.DebugWriteLine("LisaFS plugin", + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown5 = 0x{1:X2}{2:X2}{3:X2}{4:X2}{5:X2}{6:X2}{7:X2}{8:X2}{9:X2}" + "{10:X2}{11:X2}", fileId, file.unknown5[0], file.unknown5[1], file.unknown5[2], file.unknown5[3], file.unknown5[4], file.unknown5[5], file.unknown5[6], file.unknown5[7], file.unknown5[8], file.unknown5[9], file.unknown5[10]); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].release = {1}", fileId, file.release); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].build = {1}", fileId, file.build); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].compatibility = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].release = {1}", fileId, file.release); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].build = {1}", fileId, file.build); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].compatibility = {1}", fileId, file.compatibility); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].revision = {1}", fileId, file.revision); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown6 = 0x{1:X4}", fileId, file.unknown6); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].password_valid = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].revision = {1}", fileId, file.revision); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown6 = 0x{1:X4}", fileId, file.unknown6); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].password_valid = {1}", fileId, file.password_valid > 0); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].password = {1}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].password = {1}", fileId, Encoding.GetString(file.password)); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown7 = 0x{1:X2}{2:X2}{3:X2}", fileId, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown7 = 0x{1:X2}{2:X2}{3:X2}", fileId, file.unknown7[0], file.unknown7[1], file.unknown7[2]); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].overhead = {1}", fileId, file.overhead); - DicConsole.DebugWriteLine("LisaFS plugin", + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].overhead = {1}", fileId, file.overhead); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown8 = 0x{1:X2}{2:X2}{3:X2}{4:X2}{5:X2}{6:X2}{7:X2}{8:X2}{9:X2}" + "{10:X2}{11:X2}{12:X2}{13:X2}{14:X2}{15:X2}{16:X2}", fileId, file.unknown8[0], file.unknown8[1], file.unknown8[2], file.unknown8[3], file.unknown8[4], file.unknown8[5], file.unknown8[6], file.unknown8[7], file.unknown8[8], file.unknown8[9], file.unknown8[10], file.unknown8[11], file.unknown8[12], file.unknown8[13], file.unknown8[14], file.unknown8[15]); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].length = {1}", fileId, file.length); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown9 = 0x{1:X8}", fileId, file.unknown9); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].length = {1}", fileId, file.length); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown9 = 0x{1:X8}", fileId, file.unknown9); for(int ext = 0; ext < file.extents.Length; ext++) { - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].extents[{1}].start = {2}", fileId, ext, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].extents[{1}].start = {2}", fileId, ext, file.extents[ext].start); - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].extents[{1}].length = {2}", fileId, ext, + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].extents[{1}].length = {2}", fileId, ext, file.extents[ext].length); } - DicConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown10 = 0x{1:X4}", fileId, file.unknown10); + AaruConsole.DebugWriteLine("LisaFS plugin", "ExtentFile[{0}].unknown10 = 0x{1:X4}", fileId, file.unknown10); printedExtents.Add(fileId); diff --git a/Aaru.Filesystems/LisaFS/File.cs b/Aaru.Filesystems/LisaFS/File.cs index 2280232b9..b219b1256 100644 --- a/Aaru.Filesystems/LisaFS/File.cs +++ b/Aaru.Filesystems/LisaFS/File.cs @@ -334,7 +334,7 @@ namespace Aaru.Filesystems.LisaFS { if(fileSizeCache.TryGetValue(fileId, out int realSize)) if(realSize > temp.Length) - DicConsole.ErrorWriteLine("File {0} gets truncated.", fileId); + AaruConsole.ErrorWriteLine("File {0} gets truncated.", fileId); buf = temp; fileCache.Add(fileId, buf); diff --git a/Aaru.Filesystems/LisaFS/Info.cs b/Aaru.Filesystems/LisaFS/Info.cs index f980f936f..bb5236399 100644 --- a/Aaru.Filesystems/LisaFS/Info.cs +++ b/Aaru.Filesystems/LisaFS/Info.cs @@ -64,7 +64,7 @@ namespace Aaru.Filesystems.LisaFS DecodeTag(imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag), out LisaTag.PriamTag searchTag); - DicConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); + AaruConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); if(beforeMddf == -1 && searchTag.FileId == FILEID_LOADER_SIGNED) beforeMddf = i - 1; @@ -81,18 +81,18 @@ namespace Aaru.Filesystems.LisaFS datasize = BigEndianBitConverter.ToUInt16(sector, 0x7E) }; - DicConsole.DebugWriteLine("LisaFS plugin", "Current sector = {0}", i); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.mddf_block = {0}", infoMddf.mddf_block); - DicConsole.DebugWriteLine("LisaFS plugin", "Disk size = {0} sectors", imagePlugin.Info.Sectors); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size = {0} sectors", infoMddf.vol_size); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size - 1 = {0}", + AaruConsole.DebugWriteLine("LisaFS plugin", "Current sector = {0}", i); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.mddf_block = {0}", infoMddf.mddf_block); + AaruConsole.DebugWriteLine("LisaFS plugin", "Disk size = {0} sectors", imagePlugin.Info.Sectors); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size = {0} sectors", infoMddf.vol_size); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size - 1 = {0}", infoMddf.volsize_minus_one); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size - mddf.mddf_block -1 = {0}", + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.vol_size - mddf.mddf_block -1 = {0}", infoMddf.volsize_minus_mddf_minus_one); - DicConsole.DebugWriteLine("LisaFS plugin", "Disk sector = {0} bytes", + AaruConsole.DebugWriteLine("LisaFS plugin", "Disk sector = {0} bytes", imagePlugin.Info.SectorSize); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.blocksize = {0} bytes", infoMddf.blocksize); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.datasize = {0} bytes", infoMddf.datasize); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.blocksize = {0} bytes", infoMddf.blocksize); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.datasize = {0} bytes", infoMddf.datasize); if(infoMddf.mddf_block != i - beforeMddf) return false; @@ -113,7 +113,7 @@ namespace Aaru.Filesystems.LisaFS } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); return false; } } @@ -142,7 +142,7 @@ namespace Aaru.Filesystems.LisaFS DecodeTag(imagePlugin.ReadSectorTag((ulong)i, SectorTagType.AppleSectorTag), out LisaTag.PriamTag searchTag); - DicConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); + AaruConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); if(beforeMddf == -1 && searchTag.FileId == FILEID_LOADER_SIGNED) beforeMddf = i - 1; @@ -231,44 +231,44 @@ namespace Aaru.Filesystems.LisaFS infoMddf.vol_sequence = BigEndianBitConverter.ToUInt16(sector, 0x136); infoMddf.vol_left_mounted = sector[0x138]; - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown1 = 0x{0:X2} ({0})", infoMddf.unknown1); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown2 = 0x{0:X2} ({0})", infoMddf.unknown2); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown3 = 0x{0:X8} ({0})", infoMddf.unknown3); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown4 = 0x{0:X4} ({0})", infoMddf.unknown4); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown5 = 0x{0:X8} ({0})", infoMddf.unknown5); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown6 = 0x{0:X8} ({0})", infoMddf.unknown6); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown7 = 0x{0:X8} ({0})", infoMddf.unknown7); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown9 = 0x{0:X4} ({0})", infoMddf.unknown9); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown10 = 0x{0:X8} ({0})", infoMddf.unknown10); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown11 = 0x{0:X8} ({0})", infoMddf.unknown11); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown12 = 0x{0:X8} ({0})", infoMddf.unknown12); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown13 = 0x{0:X8} ({0})", infoMddf.unknown13); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown14 = 0x{0:X8} ({0})", infoMddf.unknown14); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown15 = 0x{0:X8} ({0})", infoMddf.unknown15); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown16 = 0x{0:X8} ({0})", infoMddf.unknown16); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown17 = 0x{0:X4} ({0})", infoMddf.unknown17); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown18 = 0x{0:X8} ({0})", infoMddf.unknown18); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown19 = 0x{0:X8} ({0})", infoMddf.unknown19); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown20 = 0x{0:X8} ({0})", infoMddf.unknown20); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown21 = 0x{0:X8} ({0})", infoMddf.unknown21); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown22 = 0x{0:X8} ({0})", infoMddf.unknown22); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown23 = 0x{0:X8} ({0})", infoMddf.unknown23); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown24 = 0x{0:X8} ({0})", infoMddf.unknown24); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown25 = 0x{0:X8} ({0})", infoMddf.unknown25); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown26 = 0x{0:X8} ({0})", infoMddf.unknown26); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown27 = 0x{0:X8} ({0})", infoMddf.unknown27); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown28 = 0x{0:X8} ({0})", infoMddf.unknown28); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown29 = 0x{0:X8} ({0})", infoMddf.unknown29); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown30 = 0x{0:X8} ({0})", infoMddf.unknown30); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown31 = 0x{0:X8} ({0})", infoMddf.unknown31); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown32 = 0x{0:X8} ({0})", infoMddf.unknown32); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown33 = 0x{0:X8} ({0})", infoMddf.unknown33); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown34 = 0x{0:X8} ({0})", infoMddf.unknown34); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown35 = 0x{0:X8} ({0})", infoMddf.unknown35); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown36 = 0x{0:X8} ({0})", infoMddf.unknown36); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown37 = 0x{0:X8} ({0})", infoMddf.unknown37); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown38 = 0x{0:X8} ({0})", infoMddf.unknown38); - DicConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown_timestamp = 0x{0:X8} ({0}, {1})", + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown1 = 0x{0:X2} ({0})", infoMddf.unknown1); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown2 = 0x{0:X2} ({0})", infoMddf.unknown2); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown3 = 0x{0:X8} ({0})", infoMddf.unknown3); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown4 = 0x{0:X4} ({0})", infoMddf.unknown4); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown5 = 0x{0:X8} ({0})", infoMddf.unknown5); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown6 = 0x{0:X8} ({0})", infoMddf.unknown6); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown7 = 0x{0:X8} ({0})", infoMddf.unknown7); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown9 = 0x{0:X4} ({0})", infoMddf.unknown9); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown10 = 0x{0:X8} ({0})", infoMddf.unknown10); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown11 = 0x{0:X8} ({0})", infoMddf.unknown11); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown12 = 0x{0:X8} ({0})", infoMddf.unknown12); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown13 = 0x{0:X8} ({0})", infoMddf.unknown13); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown14 = 0x{0:X8} ({0})", infoMddf.unknown14); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown15 = 0x{0:X8} ({0})", infoMddf.unknown15); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown16 = 0x{0:X8} ({0})", infoMddf.unknown16); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown17 = 0x{0:X4} ({0})", infoMddf.unknown17); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown18 = 0x{0:X8} ({0})", infoMddf.unknown18); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown19 = 0x{0:X8} ({0})", infoMddf.unknown19); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown20 = 0x{0:X8} ({0})", infoMddf.unknown20); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown21 = 0x{0:X8} ({0})", infoMddf.unknown21); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown22 = 0x{0:X8} ({0})", infoMddf.unknown22); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown23 = 0x{0:X8} ({0})", infoMddf.unknown23); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown24 = 0x{0:X8} ({0})", infoMddf.unknown24); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown25 = 0x{0:X8} ({0})", infoMddf.unknown25); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown26 = 0x{0:X8} ({0})", infoMddf.unknown26); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown27 = 0x{0:X8} ({0})", infoMddf.unknown27); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown28 = 0x{0:X8} ({0})", infoMddf.unknown28); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown29 = 0x{0:X8} ({0})", infoMddf.unknown29); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown30 = 0x{0:X8} ({0})", infoMddf.unknown30); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown31 = 0x{0:X8} ({0})", infoMddf.unknown31); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown32 = 0x{0:X8} ({0})", infoMddf.unknown32); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown33 = 0x{0:X8} ({0})", infoMddf.unknown33); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown34 = 0x{0:X8} ({0})", infoMddf.unknown34); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown35 = 0x{0:X8} ({0})", infoMddf.unknown35); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown36 = 0x{0:X8} ({0})", infoMddf.unknown36); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown37 = 0x{0:X8} ({0})", infoMddf.unknown37); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown38 = 0x{0:X8} ({0})", infoMddf.unknown38); + AaruConsole.DebugWriteLine("LisaFS plugin", "mddf.unknown_timestamp = 0x{0:X8} ({0}, {1})", infoMddf.unknown_timestamp, DateHandlers.LisaToDateTime(infoMddf.unknown_timestamp)); @@ -375,7 +375,7 @@ namespace Aaru.Filesystems.LisaFS } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); } } } diff --git a/Aaru.Filesystems/LisaFS/Super.cs b/Aaru.Filesystems/LisaFS/Super.cs index b2921a1c4..80c7904bd 100644 --- a/Aaru.Filesystems/LisaFS/Super.cs +++ b/Aaru.Filesystems/LisaFS/Super.cs @@ -63,14 +63,14 @@ namespace Aaru.Filesystems.LisaFS if(device.Info.ReadableSectorTags == null || !device.Info.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag)) { - DicConsole.DebugWriteLine("LisaFS plugin", "Underlying device does not support Lisa tags"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Underlying device does not support Lisa tags"); return Errno.InOutError; } // Minimal LisaOS disk is 3.5" single sided double density, 800 sectors if(device.Info.Sectors < 800) { - DicConsole.DebugWriteLine("LisaFS plugin", "Device is too small"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Device is too small"); return Errno.InOutError; } @@ -82,7 +82,7 @@ namespace Aaru.Filesystems.LisaFS { DecodeTag(device.ReadSectorTag(i, SectorTagType.AppleSectorTag), out LisaTag.PriamTag searchTag); - DicConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); + AaruConsole.DebugWriteLine("LisaFS plugin", "Sector {0}, file ID 0x{1:X4}", i, searchTag.FileId); if(volumePrefix == device.Info.Sectors && searchTag.FileId == FILEID_LOADER_SIGNED) volumePrefix = i - 1; @@ -185,7 +185,7 @@ namespace Aaru.Filesystems.LisaFS mddf.blocksize || mddf.blocksize < device.Info.SectorSize || mddf.datasize != device.Info.SectorSize) { - DicConsole.DebugWriteLine("LisaFS plugin", "Incorrect MDDF found"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Incorrect MDDF found"); return Errno.InvalidArgument; } @@ -193,16 +193,16 @@ namespace Aaru.Filesystems.LisaFS switch(mddf.fsversion) { case LISA_V1: - DicConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v1"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v1"); break; case LISA_V2: - DicConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v2"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v2"); break; case LISA_V3: - DicConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v3"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Mounting LisaFS v3"); break; default: - DicConsole.ErrorWriteLine("Cannot mount LisaFS version {0}", mddf.fsversion.ToString()); + AaruConsole.ErrorWriteLine("Cannot mount LisaFS version {0}", mddf.fsversion.ToString()); return Errno.NotSupported; } @@ -223,7 +223,7 @@ namespace Aaru.Filesystems.LisaFS Errno error = ReadSRecords(); if(error != Errno.NoError) { - DicConsole.ErrorWriteLine("Error {0} reading S-Records file.", error); + AaruConsole.ErrorWriteLine("Error {0} reading S-Records file.", error); return error; } @@ -234,7 +234,7 @@ namespace Aaru.Filesystems.LisaFS if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Cannot read Catalog File, error {0}", + AaruConsole.DebugWriteLine("LisaFS plugin", "Cannot read Catalog File, error {0}", error.ToString()); mounted = false; return error; @@ -246,7 +246,7 @@ namespace Aaru.Filesystems.LisaFS error = ReadSystemFile(FILEID_BOOT_SIGNED, out _); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot blocks"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot blocks"); mounted = false; return error; } @@ -254,7 +254,7 @@ namespace Aaru.Filesystems.LisaFS error = ReadSystemFile(FILEID_LOADER_SIGNED, out _); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot loader"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read boot loader"); mounted = false; return error; } @@ -262,7 +262,7 @@ namespace Aaru.Filesystems.LisaFS error = ReadSystemFile((short)FILEID_MDDF, out _); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Unable to read MDDF"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read MDDF"); mounted = false; return error; } @@ -270,7 +270,7 @@ namespace Aaru.Filesystems.LisaFS error = ReadSystemFile((short)FILEID_BITMAP, out _); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Unable to read volume bitmap"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read volume bitmap"); mounted = false; return error; } @@ -278,7 +278,7 @@ namespace Aaru.Filesystems.LisaFS error = ReadSystemFile((short)FILEID_SRECORD, out _); if(error != Errno.NoError) { - DicConsole.DebugWriteLine("LisaFS plugin", "Unable to read S-Records file"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Unable to read S-Records file"); mounted = false; return error; } @@ -312,12 +312,12 @@ namespace Aaru.Filesystems.LisaFS return Errno.NoError; } - DicConsole.DebugWriteLine("LisaFS plugin", "Not a Lisa filesystem"); + AaruConsole.DebugWriteLine("LisaFS plugin", "Not a Lisa filesystem"); return Errno.NotSupported; } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception {0}, {1}, {2}", ex.Message, ex.InnerException, ex.StackTrace); return Errno.InOutError; } } diff --git a/Aaru.Filesystems/Locus.cs b/Aaru.Filesystems/Locus.cs index b1681e0c3..69a792aea 100644 --- a/Aaru.Filesystems/Locus.cs +++ b/Aaru.Filesystems/Locus.cs @@ -90,7 +90,7 @@ namespace Aaru.Filesystems Locus_Superblock locusSb = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("Locus plugin", "magic at {1} = 0x{0:X8}", locusSb.s_magic, location); + AaruConsole.DebugWriteLine("Locus plugin", "magic at {1} = 0x{0:X8}", locusSb.s_magic, location); if(locusSb.s_magic == LOCUS_MAGIC || locusSb.s_magic == LOCUS_CIGAM || locusSb.s_magic == LOCUS_MAGIC_OLD || locusSb.s_magic == LOCUS_CIGAM_OLD) return true; @@ -143,27 +143,27 @@ namespace Aaru.Filesystems string s_fsmnt = StringHandlers.CToString(locusSb.s_fsmnt, Encoding); string s_fpack = StringHandlers.CToString(locusSb.s_fpack, Encoding); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_magic = 0x{0:X8}", locusSb.s_magic); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_gfs = {0}", locusSb.s_gfs); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fsize = {0}", locusSb.s_fsize); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_lwm = {0}", locusSb.s_lwm); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_hwm = {0}", locusSb.s_hwm); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_llst = {0}", locusSb.s_llst); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fstore = {0}", locusSb.s_fstore); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_time = {0}", locusSb.s_time); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_tfree = {0}", locusSb.s_tfree); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_isize = {0}", locusSb.s_isize); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_nfree = {0}", locusSb.s_nfree); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_flags = {0}", locusSb.s_flags); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_tinode = {0}", locusSb.s_tinode); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_lasti = {0}", locusSb.s_lasti); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_nbehind = {0}", locusSb.s_nbehind); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_gfspack = {0}", locusSb.s_gfspack); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_ninode = {0}", locusSb.s_ninode); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_flock = {0}", locusSb.s_flock); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_ilock = {0}", locusSb.s_ilock); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fmod = {0}", locusSb.s_fmod); - DicConsole.DebugWriteLine("Locus plugin", "LocusSb.s_version = {0}", locusSb.s_version); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_magic = 0x{0:X8}", locusSb.s_magic); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_gfs = {0}", locusSb.s_gfs); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fsize = {0}", locusSb.s_fsize); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_lwm = {0}", locusSb.s_lwm); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_hwm = {0}", locusSb.s_hwm); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_llst = {0}", locusSb.s_llst); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fstore = {0}", locusSb.s_fstore); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_time = {0}", locusSb.s_time); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_tfree = {0}", locusSb.s_tfree); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_isize = {0}", locusSb.s_isize); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_nfree = {0}", locusSb.s_nfree); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_flags = {0}", locusSb.s_flags); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_tinode = {0}", locusSb.s_tinode); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_lasti = {0}", locusSb.s_lasti); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_nbehind = {0}", locusSb.s_nbehind); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_gfspack = {0}", locusSb.s_gfspack); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_ninode = {0}", locusSb.s_ninode); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_flock = {0}", locusSb.s_flock); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_ilock = {0}", locusSb.s_ilock); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_fmod = {0}", locusSb.s_fmod); + AaruConsole.DebugWriteLine("Locus plugin", "LocusSb.s_version = {0}", locusSb.s_version); sb.AppendFormat("Superblock last modified on {0}", DateHandlers.UnixToDateTime(locusSb.s_time)) .AppendLine(); diff --git a/Aaru.Filesystems/Nintendo.cs b/Aaru.Filesystems/Nintendo.cs index 1b28e6301..b6e86debb 100644 --- a/Aaru.Filesystems/Nintendo.cs +++ b/Aaru.Filesystems/Nintendo.cs @@ -171,64 +171,64 @@ namespace Aaru.Filesystems fields.FourthPartitions = new NintendoPartition[0]; } - DicConsole.DebugWriteLine("Nintendo plugin", "discType = {0}", fields.DiscType); - DicConsole.DebugWriteLine("Nintendo plugin", "gameCode = {0}", fields.GameCode); - DicConsole.DebugWriteLine("Nintendo plugin", "regionCode = {0}", fields.RegionCode); - DicConsole.DebugWriteLine("Nintendo plugin", "publisherCode = {0}", fields.PublisherCode); - DicConsole.DebugWriteLine("Nintendo plugin", "discID = {0}", fields.DiscId); - DicConsole.DebugWriteLine("Nintendo plugin", "discNumber = {0}", fields.DiscNumber); - DicConsole.DebugWriteLine("Nintendo plugin", "discVersion = {0}", fields.DiscVersion); - DicConsole.DebugWriteLine("Nintendo plugin", "streaming = {0}", fields.Streaming); - DicConsole.DebugWriteLine("Nintendo plugin", "streamBufferSize = {0}", fields.StreamBufferSize); - DicConsole.DebugWriteLine("Nintendo plugin", "title = \"{0}\"", fields.Title); - DicConsole.DebugWriteLine("Nintendo plugin", "debugOff = 0x{0:X8}", fields.DebugOff); - DicConsole.DebugWriteLine("Nintendo plugin", "debugAddr = 0x{0:X8}", fields.DebugAddr); - DicConsole.DebugWriteLine("Nintendo plugin", "dolOff = 0x{0:X8}", fields.DolOff); - DicConsole.DebugWriteLine("Nintendo plugin", "fstOff = 0x{0:X8}", fields.FstOff); - DicConsole.DebugWriteLine("Nintendo plugin", "fstSize = {0}", fields.FstSize); - DicConsole.DebugWriteLine("Nintendo plugin", "fstMax = {0}", fields.FstMax); + AaruConsole.DebugWriteLine("Nintendo plugin", "discType = {0}", fields.DiscType); + AaruConsole.DebugWriteLine("Nintendo plugin", "gameCode = {0}", fields.GameCode); + AaruConsole.DebugWriteLine("Nintendo plugin", "regionCode = {0}", fields.RegionCode); + AaruConsole.DebugWriteLine("Nintendo plugin", "publisherCode = {0}", fields.PublisherCode); + AaruConsole.DebugWriteLine("Nintendo plugin", "discID = {0}", fields.DiscId); + AaruConsole.DebugWriteLine("Nintendo plugin", "discNumber = {0}", fields.DiscNumber); + AaruConsole.DebugWriteLine("Nintendo plugin", "discVersion = {0}", fields.DiscVersion); + AaruConsole.DebugWriteLine("Nintendo plugin", "streaming = {0}", fields.Streaming); + AaruConsole.DebugWriteLine("Nintendo plugin", "streamBufferSize = {0}", fields.StreamBufferSize); + AaruConsole.DebugWriteLine("Nintendo plugin", "title = \"{0}\"", fields.Title); + AaruConsole.DebugWriteLine("Nintendo plugin", "debugOff = 0x{0:X8}", fields.DebugOff); + AaruConsole.DebugWriteLine("Nintendo plugin", "debugAddr = 0x{0:X8}", fields.DebugAddr); + AaruConsole.DebugWriteLine("Nintendo plugin", "dolOff = 0x{0:X8}", fields.DolOff); + AaruConsole.DebugWriteLine("Nintendo plugin", "fstOff = 0x{0:X8}", fields.FstOff); + AaruConsole.DebugWriteLine("Nintendo plugin", "fstSize = {0}", fields.FstSize); + AaruConsole.DebugWriteLine("Nintendo plugin", "fstMax = {0}", fields.FstMax); for(int i = 0; i < fields.FirstPartitions.Length; i++) { - DicConsole.DebugWriteLine("Nintendo plugin", "firstPartitions[{1}].offset = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "firstPartitions[{1}].offset = {0}", fields.FirstPartitions[i].Offset, i); - DicConsole.DebugWriteLine("Nintendo plugin", "firstPartitions[{1}].type = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "firstPartitions[{1}].type = {0}", fields.FirstPartitions[i].Type, i); } for(int i = 0; i < fields.SecondPartitions.Length; i++) { - DicConsole.DebugWriteLine("Nintendo plugin", "secondPartitions[{1}].offset = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "secondPartitions[{1}].offset = {0}", fields.SecondPartitions[i].Offset, i); - DicConsole.DebugWriteLine("Nintendo plugin", "secondPartitions[{1}].type = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "secondPartitions[{1}].type = {0}", fields.SecondPartitions[i].Type, i); } for(int i = 0; i < fields.ThirdPartitions.Length; i++) { - DicConsole.DebugWriteLine("Nintendo plugin", "thirdPartitions[{1}].offset = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "thirdPartitions[{1}].offset = {0}", fields.ThirdPartitions[i].Offset, i); - DicConsole.DebugWriteLine("Nintendo plugin", "thirdPartitions[{1}].type = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "thirdPartitions[{1}].type = {0}", fields.ThirdPartitions[i].Type, i); } for(int i = 0; i < fields.FourthPartitions.Length; i++) { - DicConsole.DebugWriteLine("Nintendo plugin", "fourthPartitions[{1}].offset = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "fourthPartitions[{1}].offset = {0}", fields.FourthPartitions[i].Offset, i); - DicConsole.DebugWriteLine("Nintendo plugin", "fourthPartitions[{1}].type = {0}", + AaruConsole.DebugWriteLine("Nintendo plugin", "fourthPartitions[{1}].type = {0}", fields.FourthPartitions[i].Type, i); } - DicConsole.DebugWriteLine("Nintendo plugin", "region = {0}", fields.Region); - DicConsole.DebugWriteLine("Nintendo plugin", "japanAge = {0}", fields.JapanAge); - DicConsole.DebugWriteLine("Nintendo plugin", "usaAge = {0}", fields.UsaAge); - DicConsole.DebugWriteLine("Nintendo plugin", "germanAge = {0}", fields.GermanAge); - DicConsole.DebugWriteLine("Nintendo plugin", "pegiAge = {0}", fields.PegiAge); - DicConsole.DebugWriteLine("Nintendo plugin", "finlandAge = {0}", fields.FinlandAge); - DicConsole.DebugWriteLine("Nintendo plugin", "portugalAge = {0}", fields.PortugalAge); - DicConsole.DebugWriteLine("Nintendo plugin", "ukAge = {0}", fields.UkAge); - DicConsole.DebugWriteLine("Nintendo plugin", "australiaAge = {0}", fields.AustraliaAge); - DicConsole.DebugWriteLine("Nintendo plugin", "koreaAge = {0}", fields.KoreaAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "region = {0}", fields.Region); + AaruConsole.DebugWriteLine("Nintendo plugin", "japanAge = {0}", fields.JapanAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "usaAge = {0}", fields.UsaAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "germanAge = {0}", fields.GermanAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "pegiAge = {0}", fields.PegiAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "finlandAge = {0}", fields.FinlandAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "portugalAge = {0}", fields.PortugalAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "ukAge = {0}", fields.UkAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "australiaAge = {0}", fields.AustraliaAge); + AaruConsole.DebugWriteLine("Nintendo plugin", "koreaAge = {0}", fields.KoreaAge); sbInformation.AppendLine("Nintendo optical filesystem"); sbInformation.AppendLine(wii ? "Nintendo Wii Optical Disc" : "Nintendo GameCube Optical Disc"); diff --git a/Aaru.Filesystems/ODS.cs b/Aaru.Filesystems/ODS.cs index e51ac5d50..edb488c52 100644 --- a/Aaru.Filesystems/ODS.cs +++ b/Aaru.Filesystems/ODS.cs @@ -71,7 +71,7 @@ namespace Aaru.Filesystems Array.Copy(hbSector, 0x1F0, magicB, 0, 12); string magic = Encoding.ASCII.GetString(magicB); - DicConsole.DebugWriteLine("Files-11 plugin", "magic: \"{0}\"", magic); + AaruConsole.DebugWriteLine("Files-11 plugin", "magic: \"{0}\"", magic); if(magic == "DECFILE11A " || magic == "DECFILE11B ") return true; @@ -85,7 +85,7 @@ namespace Aaru.Filesystems Array.Copy(hbSector, 0x3F0, magicB, 0, 12); magic = Encoding.ASCII.GetString(magicB); - DicConsole.DebugWriteLine("Files-11 plugin", "unaligned magic: \"{0}\"", magic); + AaruConsole.DebugWriteLine("Files-11 plugin", "unaligned magic: \"{0}\"", magic); return magic == "DECFILE11A " || magic == "DECFILE11B "; } diff --git a/Aaru.Filesystems/ProDOS.cs b/Aaru.Filesystems/ProDOS.cs index 0d679abfd..7f1ba296e 100644 --- a/Aaru.Filesystems/ProDOS.cs +++ b/Aaru.Filesystems/ProDOS.cs @@ -126,29 +126,29 @@ namespace Aaru.Filesystems } ushort prePointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0); - DicConsole.DebugWriteLine("ProDOS plugin", "prePointer = {0}", prePointer); + AaruConsole.DebugWriteLine("ProDOS plugin", "prePointer = {0}", prePointer); if(prePointer != 0) return false; byte storageType = (byte)((rootDirectoryKeyBlock[0x04] & STORAGE_TYPE_MASK) >> 4); - DicConsole.DebugWriteLine("ProDOS plugin", "storage_type = {0}", storageType); + AaruConsole.DebugWriteLine("ProDOS plugin", "storage_type = {0}", storageType); if(storageType != ROOT_DIRECTORY_TYPE) return false; byte entryLength = rootDirectoryKeyBlock[0x23]; - DicConsole.DebugWriteLine("ProDOS plugin", "entry_length = {0}", entryLength); + AaruConsole.DebugWriteLine("ProDOS plugin", "entry_length = {0}", entryLength); if(entryLength != ENTRY_LENGTH) return false; byte entriesPerBlock = rootDirectoryKeyBlock[0x24]; - DicConsole.DebugWriteLine("ProDOS plugin", "entries_per_block = {0}", entriesPerBlock); + AaruConsole.DebugWriteLine("ProDOS plugin", "entries_per_block = {0}", entriesPerBlock); if(entriesPerBlock != ENTRIES_PER_BLOCK) return false; ushort bitMapPointer = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x27); - DicConsole.DebugWriteLine("ProDOS plugin", "bit_map_pointer = {0}", bitMapPointer); + AaruConsole.DebugWriteLine("ProDOS plugin", "bit_map_pointer = {0}", bitMapPointer); if(bitMapPointer > partition.End) return false; ushort totalBlocks = BitConverter.ToUInt16(rootDirectoryKeyBlock, 0x29); if(apmFromHddOnCd) totalBlocks /= 4; - DicConsole.DebugWriteLine("ProDOS plugin", "{0} <= ({1} - {2} + 1)? {3}", totalBlocks, partition.End, + AaruConsole.DebugWriteLine("ProDOS plugin", "{0} <= ({1} - {2} + 1)? {3}", totalBlocks, partition.End, partition.Start, totalBlocks <= partition.End - partition.Start + 1); return totalBlocks <= partition.End - partition.Start + 1; } @@ -221,10 +221,10 @@ namespace Aaru.Filesystems year += 1900; if(year < 1940) year += 100; - DicConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp_left = 0x{0:X4}", tempTimestampLeft); - DicConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp_right = 0x{0:X4}", tempTimestampRight); - DicConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp = 0x{0:X8}", tempTimestamp); - DicConsole.DebugWriteLine("ProDOS plugin", + AaruConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp_left = 0x{0:X4}", tempTimestampLeft); + AaruConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp_right = 0x{0:X4}", tempTimestampRight); + AaruConsole.DebugWriteLine("ProDOS plugin", "temp_timestamp = 0x{0:X8}", tempTimestamp); + AaruConsole.DebugWriteLine("ProDOS plugin", "Datetime field year {0}, month {1}, day {2}, hour {3}, minute {4}.", year, month, day, hour, minute); @@ -293,7 +293,7 @@ namespace Aaru.Filesystems sbInformation.AppendLine("Volume must be backed up"); if((rootDirectoryKeyBlock.header.access & RESERVED_ATTRIBUTE_MASK) != 0) - DicConsole.DebugWriteLine("ProDOS plugin", "Reserved attributes are set: {0:X2}", + AaruConsole.DebugWriteLine("ProDOS plugin", "Reserved attributes are set: {0:X2}", rootDirectoryKeyBlock.header.access); information = sbInformation.ToString(); diff --git a/Aaru.Filesystems/QNX4.cs b/Aaru.Filesystems/QNX4.cs index 875e0f7bd..f2e930f4f 100644 --- a/Aaru.Filesystems/QNX4.cs +++ b/Aaru.Filesystems/QNX4.cs @@ -96,77 +96,77 @@ namespace Aaru.Filesystems // Too much useless information /* - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_fname = {0}", CurrentEncoding.GetString(qnxSb.rootDir.di_fname)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_size = {0}", qnxSb.rootDir.di_size); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_first_xtnt.block = {0}", qnxSb.rootDir.di_first_xtnt.block); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_first_xtnt.length = {0}", qnxSb.rootDir.di_first_xtnt.length); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_xblk = {0}", qnxSb.rootDir.di_xblk); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_ftime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_mtime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_atime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_ctime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_num_xtnts = {0}", qnxSb.rootDir.di_num_xtnts); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_mode = {0}", Convert.ToString(qnxSb.rootDir.di_mode, 8)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_uid = {0}", qnxSb.rootDir.di_uid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_gid = {0}", qnxSb.rootDir.di_gid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_nlink = {0}", qnxSb.rootDir.di_nlink); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_zero = {0}", qnxSb.rootDir.di_zero); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_type = {0}", qnxSb.rootDir.di_type); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_status = {0}", qnxSb.rootDir.di_status); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_fname = {0}", CurrentEncoding.GetString(qnxSb.rootDir.di_fname)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_size = {0}", qnxSb.rootDir.di_size); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_first_xtnt.block = {0}", qnxSb.rootDir.di_first_xtnt.block); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_first_xtnt.length = {0}", qnxSb.rootDir.di_first_xtnt.length); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_xblk = {0}", qnxSb.rootDir.di_xblk); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_ftime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_mtime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_atime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.rootDir.di_ctime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_num_xtnts = {0}", qnxSb.rootDir.di_num_xtnts); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_mode = {0}", Convert.ToString(qnxSb.rootDir.di_mode, 8)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_uid = {0}", qnxSb.rootDir.di_uid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_gid = {0}", qnxSb.rootDir.di_gid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_nlink = {0}", qnxSb.rootDir.di_nlink); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_zero = {0}", qnxSb.rootDir.di_zero); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_type = {0}", qnxSb.rootDir.di_type); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.rootDir.di_status = {0}", qnxSb.rootDir.di_status); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_fname = {0}", CurrentEncoding.GetString(qnxSb.inode.di_fname)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_size = {0}", qnxSb.inode.di_size); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_first_xtnt.block = {0}", qnxSb.inode.di_first_xtnt.block); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_first_xtnt.length = {0}", qnxSb.inode.di_first_xtnt.length); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_xblk = {0}", qnxSb.inode.di_xblk); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_ftime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_mtime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_atime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_ctime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_num_xtnts = {0}", qnxSb.inode.di_num_xtnts); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_mode = {0}", Convert.ToString(qnxSb.inode.di_mode, 8)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_uid = {0}", qnxSb.inode.di_uid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_gid = {0}", qnxSb.inode.di_gid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_nlink = {0}", qnxSb.inode.di_nlink); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_zero = {0}", qnxSb.inode.di_zero); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_type = {0}", qnxSb.inode.di_type); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_status = {0}", qnxSb.inode.di_status); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_fname = {0}", CurrentEncoding.GetString(qnxSb.inode.di_fname)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_size = {0}", qnxSb.inode.di_size); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_first_xtnt.block = {0}", qnxSb.inode.di_first_xtnt.block); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_first_xtnt.length = {0}", qnxSb.inode.di_first_xtnt.length); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_xblk = {0}", qnxSb.inode.di_xblk); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_ftime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_mtime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_atime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.inode.di_ctime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_num_xtnts = {0}", qnxSb.inode.di_num_xtnts); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_mode = {0}", Convert.ToString(qnxSb.inode.di_mode, 8)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_uid = {0}", qnxSb.inode.di_uid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_gid = {0}", qnxSb.inode.di_gid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_nlink = {0}", qnxSb.inode.di_nlink); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_zero = {0}", qnxSb.inode.di_zero); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_type = {0}", qnxSb.inode.di_type); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.inode.di_status = {0}", qnxSb.inode.di_status); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_fname = {0}", CurrentEncoding.GetString(qnxSb.boot.di_fname)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_size = {0}", qnxSb.boot.di_size); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_first_xtnt.block = {0}", qnxSb.boot.di_first_xtnt.block); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_first_xtnt.length = {0}", qnxSb.boot.di_first_xtnt.length); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_xblk = {0}", qnxSb.boot.di_xblk); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_ftime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_mtime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_atime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_ctime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_num_xtnts = {0}", qnxSb.boot.di_num_xtnts); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_mode = {0}", Convert.ToString(qnxSb.boot.di_mode, 8)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_uid = {0}", qnxSb.boot.di_uid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_gid = {0}", qnxSb.boot.di_gid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_nlink = {0}", qnxSb.boot.di_nlink); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_zero = {0}", qnxSb.boot.di_zero); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_type = {0}", qnxSb.boot.di_type); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_status = {0}", qnxSb.boot.di_status); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_fname = {0}", CurrentEncoding.GetString(qnxSb.boot.di_fname)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_size = {0}", qnxSb.boot.di_size); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_first_xtnt.block = {0}", qnxSb.boot.di_first_xtnt.block); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_first_xtnt.length = {0}", qnxSb.boot.di_first_xtnt.length); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_xblk = {0}", qnxSb.boot.di_xblk); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_ftime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_mtime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_atime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.boot.di_ctime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_num_xtnts = {0}", qnxSb.boot.di_num_xtnts); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_mode = {0}", Convert.ToString(qnxSb.boot.di_mode, 8)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_uid = {0}", qnxSb.boot.di_uid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_gid = {0}", qnxSb.boot.di_gid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_nlink = {0}", qnxSb.boot.di_nlink); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_zero = {0}", qnxSb.boot.di_zero); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_type = {0}", qnxSb.boot.di_type); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.boot.di_status = {0}", qnxSb.boot.di_status); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_fname = {0}", CurrentEncoding.GetString(qnxSb.altBoot.di_fname)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_size = {0}", qnxSb.altBoot.di_size); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_first_xtnt.block = {0}", qnxSb.altBoot.di_first_xtnt.block); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_first_xtnt.length = {0}", qnxSb.altBoot.di_first_xtnt.length); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_xblk = {0}", qnxSb.altBoot.di_xblk); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_ftime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_mtime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_atime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_ctime)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_num_xtnts = {0}", qnxSb.altBoot.di_num_xtnts); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_mode = {0}", Convert.ToString(qnxSb.altBoot.di_mode, 8)); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_uid = {0}", qnxSb.altBoot.di_uid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_gid = {0}", qnxSb.altBoot.di_gid); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_nlink = {0}", qnxSb.altBoot.di_nlink); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_zero = {0}", qnxSb.altBoot.di_zero); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_type = {0}", qnxSb.altBoot.di_type); - DicConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_status = {0}", qnxSb.altBoot.di_status); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_fname = {0}", CurrentEncoding.GetString(qnxSb.altBoot.di_fname)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_size = {0}", qnxSb.altBoot.di_size); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_first_xtnt.block = {0}", qnxSb.altBoot.di_first_xtnt.block); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_first_xtnt.length = {0}", qnxSb.altBoot.di_first_xtnt.length); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_xblk = {0}", qnxSb.altBoot.di_xblk); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_ftime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_ftime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_mtime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_mtime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_atime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_atime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_ctime = {0}", DateHandlers.UNIXUnsignedToDateTime(qnxSb.altBoot.di_ctime)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_num_xtnts = {0}", qnxSb.altBoot.di_num_xtnts); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_mode = {0}", Convert.ToString(qnxSb.altBoot.di_mode, 8)); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_uid = {0}", qnxSb.altBoot.di_uid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_gid = {0}", qnxSb.altBoot.di_gid); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_nlink = {0}", qnxSb.altBoot.di_nlink); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_zero = {0}", qnxSb.altBoot.di_zero); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_type = {0}", qnxSb.altBoot.di_type); + AaruConsole.DebugWriteLine("QNX4 plugin", "qnxSb.altBoot.di_status = {0}", qnxSb.altBoot.di_status); */ information = diff --git a/Aaru.Filesystems/RBF.cs b/Aaru.Filesystems/RBF.cs index dab4cbd21..c8ddb024d 100644 --- a/Aaru.Filesystems/RBF.cs +++ b/Aaru.Filesystems/RBF.cs @@ -75,7 +75,7 @@ namespace Aaru.Filesystems RBF_IdSector rbfSb = Marshal.ByteArrayToStructureBigEndian(sector); RBF_NewIdSector rbf9000Sb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("RBF plugin", + AaruConsole.DebugWriteLine("RBF plugin", "magic at {0} = 0x{1:X8} or 0x{2:X8} (expected 0x{3:X8} or 0x{4:X8})", location, rbfSb.dd_sync, rbf9000Sb.rid_sync, RBF_SYNC, RBF_CNYS); @@ -108,7 +108,7 @@ namespace Aaru.Filesystems rbfSb = Marshal.ByteArrayToStructureBigEndian(sector); rbf9000Sb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("RBF plugin", + AaruConsole.DebugWriteLine("RBF plugin", "magic at {0} = 0x{1:X8} or 0x{2:X8} (expected 0x{3:X8} or 0x{4:X8})", location, rbfSb.dd_sync, rbf9000Sb.rid_sync, RBF_SYNC, RBF_CNYS); diff --git a/Aaru.Filesystems/ReFS.cs b/Aaru.Filesystems/ReFS.cs index 602eb0dc6..9d4313480 100644 --- a/Aaru.Filesystems/ReFS.cs +++ b/Aaru.Filesystems/ReFS.cs @@ -84,25 +84,25 @@ namespace Aaru.Filesystems RefsVolumeHeader refsVhdr = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.jump empty? = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.jump empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(refsVhdr.jump)); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.signature = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.signature = {0}", StringHandlers.CToString(refsVhdr.signature)); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.mustBeZero empty? = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.mustBeZero empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(refsVhdr.mustBeZero)); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.identifier = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.identifier = {0}", StringHandlers.CToString(BitConverter.GetBytes(refsVhdr.identifier))); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.length = {0}", refsVhdr.length); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.checksum = 0x{0:X4}", refsVhdr.checksum); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.sectors = {0}", refsVhdr.sectors); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.bytesPerSector = {0}", refsVhdr.bytesPerSector); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.sectorsPerCluster = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.length = {0}", refsVhdr.length); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.checksum = 0x{0:X4}", refsVhdr.checksum); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.sectors = {0}", refsVhdr.sectors); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.bytesPerSector = {0}", refsVhdr.bytesPerSector); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.sectorsPerCluster = {0}", refsVhdr.sectorsPerCluster); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown1 zero? = {0}", refsVhdr.unknown1 == 0); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown2 zero? = {0}", refsVhdr.unknown2 == 0); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown3 zero? = {0}", refsVhdr.unknown3 == 0); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown4 zero? = {0}", refsVhdr.unknown4 == 0); - DicConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown5 empty? = {0}", + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown1 zero? = {0}", refsVhdr.unknown1 == 0); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown2 zero? = {0}", refsVhdr.unknown2 == 0); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown3 zero? = {0}", refsVhdr.unknown3 == 0); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown4 zero? = {0}", refsVhdr.unknown4 == 0); + AaruConsole.DebugWriteLine("ReFS plugin", "VolumeHeader.unknown5 empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(refsVhdr.unknown5)); if(refsVhdr.identifier != FSRS || !ArrayHelpers.ArrayIsNullOrEmpty(refsVhdr.mustBeZero) || diff --git a/Aaru.Filesystems/SolarFS.cs b/Aaru.Filesystems/SolarFS.cs index cdb62b39d..79da1c7ae 100644 --- a/Aaru.Filesystems/SolarFS.cs +++ b/Aaru.Filesystems/SolarFS.cs @@ -101,26 +101,26 @@ namespace Aaru.Filesystems Array.Copy(bpbSector, 0x1B, bpb.unk3, 0, 10); bpb.unk4 = BitConverter.ToUInt32(bpbSector, 0x26); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.x86_jump: 0x{0:X2}{1:X2}{2:X2}", bpb.x86_jump[0], + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.x86_jump: 0x{0:X2}{1:X2}{2:X2}", bpb.x86_jump[0], bpb.x86_jump[1], bpb.x86_jump[2]); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.OEMName: \"{0}\"", bpb.OEMName); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.bps: {0}", bpb.bps); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.unk1: 0x{0:X2}", bpb.unk1); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.unk2: 0x{0:X4}", bpb.unk2); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.root_ent: {0}", bpb.root_ent); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.sectors: {0}", bpb.sectors); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.media: 0x{0:X2}", bpb.media); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.spfat: {0}", bpb.spfat); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.sptrk: {0}", bpb.sptrk); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.heads: {0}", bpb.heads); - DicConsole.DebugWriteLine("SolarFS plugin", + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.OEMName: \"{0}\"", bpb.OEMName); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.bps: {0}", bpb.bps); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.unk1: 0x{0:X2}", bpb.unk1); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.unk2: 0x{0:X4}", bpb.unk2); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.root_ent: {0}", bpb.root_ent); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.sectors: {0}", bpb.sectors); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.media: 0x{0:X2}", bpb.media); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.spfat: {0}", bpb.spfat); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.sptrk: {0}", bpb.sptrk); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.heads: {0}", bpb.heads); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.unk3: 0x{0:X2}{1:X2}{2:X2}{3:X2}{4:X2}{5:X2}{6:X2}{7:X2}{8:X2}{9:X2}", bpb.unk3[0], bpb.unk3[1], bpb.unk3[2], bpb.unk3[3], bpb.unk3[4], bpb.unk3[5], bpb.unk3[6], bpb.unk3[7], bpb.unk3[8], bpb.unk3[9]); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.signature: 0x{0:X2}", bpb.signature); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.unk4: 0x{0:X8}", bpb.unk4); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.vol_name: \"{0}\"", bpb.vol_name); - DicConsole.DebugWriteLine("SolarFS plugin", "BPB.fs_type: \"{0}\"", bpb.fs_type); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.signature: 0x{0:X2}", bpb.signature); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.unk4: 0x{0:X8}", bpb.unk4); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.vol_name: \"{0}\"", bpb.vol_name); + AaruConsole.DebugWriteLine("SolarFS plugin", "BPB.fs_type: \"{0}\"", bpb.fs_type); sb.AppendLine("Solar_OS filesystem"); sb.AppendFormat("Media descriptor: 0x{0:X2}", bpb.media).AppendLine(); diff --git a/Aaru.Filesystems/UCSDPascal/Info.cs b/Aaru.Filesystems/UCSDPascal/Info.cs index 43aaafd0e..be3866bfd 100644 --- a/Aaru.Filesystems/UCSDPascal/Info.cs +++ b/Aaru.Filesystems/UCSDPascal/Info.cs @@ -72,15 +72,15 @@ namespace Aaru.Filesystems.UCSDPascal }; Array.Copy(volBlock, 0x06, volEntry.VolumeName, 0, 8); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.firstBlock = {0}", volEntry.FirstBlock); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.lastBlock = {0}", volEntry.LastBlock); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.entryType = {0}", volEntry.EntryType); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.volumeName = {0}", volEntry.VolumeName); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.blocks = {0}", volEntry.Blocks); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.files = {0}", volEntry.Files); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.dummy = {0}", volEntry.Dummy); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.lastBoot = {0}", volEntry.LastBoot); - DicConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.tail = {0}", volEntry.Tail); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.firstBlock = {0}", volEntry.FirstBlock); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.lastBlock = {0}", volEntry.LastBlock); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.entryType = {0}", volEntry.EntryType); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.volumeName = {0}", volEntry.VolumeName); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.blocks = {0}", volEntry.Blocks); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.files = {0}", volEntry.Files); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.dummy = {0}", volEntry.Dummy); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.lastBoot = {0}", volEntry.LastBoot); + AaruConsole.DebugWriteLine("UCSD Pascal Plugin", "volEntry.tail = {0}", volEntry.Tail); // First block is always 0 (even is it's sector 2) if(volEntry.FirstBlock != 0) return false; diff --git a/Aaru.Filesystems/UDF.cs b/Aaru.Filesystems/UDF.cs index 4cc87f31d..ca3320bb2 100644 --- a/Aaru.Filesystems/UDF.cs +++ b/Aaru.Filesystems/UDF.cs @@ -76,25 +76,25 @@ namespace Aaru.Filesystems sector = imagePlugin.ReadSector(position); anchor = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagIdentifier = {0}", anchor.tag.tagIdentifier); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorVersion = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagIdentifier = {0}", anchor.tag.tagIdentifier); + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorVersion = {0}", anchor.tag.descriptorVersion); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagChecksum = 0x{0:X2}", anchor.tag.tagChecksum); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.reserved = {0}", anchor.tag.reserved); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagSerialNumber = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagChecksum = 0x{0:X2}", anchor.tag.tagChecksum); + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.reserved = {0}", anchor.tag.reserved); + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagSerialNumber = {0}", anchor.tag.tagSerialNumber); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorCrc = 0x{0:X4}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorCrc = 0x{0:X4}", anchor.tag.descriptorCrc); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorCrcLength = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.descriptorCrcLength = {0}", anchor.tag.descriptorCrcLength); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagLocation = {0}", anchor.tag.tagLocation); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.mainVolumeDescriptorSequenceExtent.length = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.tag.tagLocation = {0}", anchor.tag.tagLocation); + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.mainVolumeDescriptorSequenceExtent.length = {0}", anchor.mainVolumeDescriptorSequenceExtent.length); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.mainVolumeDescriptorSequenceExtent.location = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.mainVolumeDescriptorSequenceExtent.location = {0}", anchor.mainVolumeDescriptorSequenceExtent.location); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.reserveVolumeDescriptorSequenceExtent.length = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.reserveVolumeDescriptorSequenceExtent.length = {0}", anchor.reserveVolumeDescriptorSequenceExtent.length); - DicConsole.DebugWriteLine("UDF Plugin", "anchor.reserveVolumeDescriptorSequenceExtent.location = {0}", + AaruConsole.DebugWriteLine("UDF Plugin", "anchor.reserveVolumeDescriptorSequenceExtent.location = {0}", anchor.reserveVolumeDescriptorSequenceExtent.location); if(anchor.tag.tagIdentifier != diff --git a/Aaru.Filesystems/UNICOS.cs b/Aaru.Filesystems/UNICOS.cs index 63f3bcd68..f74632bb0 100644 --- a/Aaru.Filesystems/UNICOS.cs +++ b/Aaru.Filesystems/UNICOS.cs @@ -75,7 +75,7 @@ namespace Aaru.Filesystems UNICOS_Superblock unicosSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("UNICOS plugin", "magic = 0x{0:X16} (expected 0x{1:X16})", unicosSb.s_magic, + AaruConsole.DebugWriteLine("UNICOS plugin", "magic = 0x{0:X16} (expected 0x{1:X16})", unicosSb.s_magic, UNICOS_MAGIC); return unicosSb.s_magic == UNICOS_MAGIC; diff --git a/Aaru.Filesystems/UNIXBFS.cs b/Aaru.Filesystems/UNIXBFS.cs index 7d9dca523..1b38433d1 100644 --- a/Aaru.Filesystems/UNIXBFS.cs +++ b/Aaru.Filesystems/UNIXBFS.cs @@ -85,15 +85,15 @@ namespace Aaru.Filesystems Array.Copy(bfsSbSector, 0x22, sbStrings, 0, 6); bfsSb.s_volume = StringHandlers.CToString(sbStrings, Encoding); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_magic: 0x{0:X8}", bfsSb.s_magic); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_start: 0x{0:X8}", bfsSb.s_start); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_end: 0x{0:X8}", bfsSb.s_end); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_from: 0x{0:X8}", bfsSb.s_from); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_to: 0x{0:X8}", bfsSb.s_to); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_bfrom: 0x{0:X8}", bfsSb.s_bfrom); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_bto: 0x{0:X8}", bfsSb.s_bto); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_fsname: 0x{0}", bfsSb.s_fsname); - DicConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_volume: 0x{0}", bfsSb.s_volume); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_magic: 0x{0:X8}", bfsSb.s_magic); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_start: 0x{0:X8}", bfsSb.s_start); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_end: 0x{0:X8}", bfsSb.s_end); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_from: 0x{0:X8}", bfsSb.s_from); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_to: 0x{0:X8}", bfsSb.s_to); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_bfrom: 0x{0:X8}", bfsSb.s_bfrom); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_bto: 0x{0:X8}", bfsSb.s_bto); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_fsname: 0x{0}", bfsSb.s_fsname); + AaruConsole.DebugWriteLine("BFS plugin", "bfs_sb.s_volume: 0x{0}", bfsSb.s_volume); sb.AppendLine("UNIX Boot filesystem"); sb.AppendFormat("Volume goes from byte {0} to byte {1}, for {2} bytes", bfsSb.s_start, bfsSb.s_end, diff --git a/Aaru.Filesystems/XFS.cs b/Aaru.Filesystems/XFS.cs index 37870806d..4978f89c3 100644 --- a/Aaru.Filesystems/XFS.cs +++ b/Aaru.Filesystems/XFS.cs @@ -73,7 +73,7 @@ namespace Aaru.Filesystems XFS_Superblock xfsSb = Marshal.ByteArrayToStructureBigEndian(sbpiece); - DicConsole.DebugWriteLine("XFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8})", + AaruConsole.DebugWriteLine("XFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8})", location, xfsSb.magicnum, XFS_MAGIC); if(xfsSb.magicnum == XFS_MAGIC) return true; @@ -92,7 +92,7 @@ namespace Aaru.Filesystems XFS_Superblock xfsSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("XFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8})", location, + AaruConsole.DebugWriteLine("XFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8})", location, xfsSb.magicnum, XFS_MAGIC); if(xfsSb.magicnum == XFS_MAGIC) return true; @@ -127,7 +127,7 @@ namespace Aaru.Filesystems xfsSb = Marshal.ByteArrayToStructureBigEndian(sbpiece); - DicConsole.DebugWriteLine("XFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8})", + AaruConsole.DebugWriteLine("XFS plugin", "magic at 0x{0:X3} = 0x{1:X8} (expected 0x{2:X8})", location, xfsSb.magicnum, XFS_MAGIC); if(xfsSb.magicnum == XFS_MAGIC) break; @@ -145,7 +145,7 @@ namespace Aaru.Filesystems xfsSb = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("XFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8})", location, + AaruConsole.DebugWriteLine("XFS plugin", "magic at {0} = 0x{1:X8} (expected 0x{2:X8})", location, xfsSb.magicnum, XFS_MAGIC); if(xfsSb.magicnum == XFS_MAGIC) break; diff --git a/Aaru.Filesystems/dump.cs b/Aaru.Filesystems/dump.cs index 0892e3dfa..d35ed032e 100644 --- a/Aaru.Filesystems/dump.cs +++ b/Aaru.Filesystems/dump.cs @@ -122,9 +122,9 @@ namespace Aaru.Filesystems spcl_aix aixHdr = Marshal.ByteArrayToStructureLittleEndian(sector); s_spcl newHdr = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("dump(8) plugin", "old magic = 0x{0:X8}", oldHdr.c_magic); - DicConsole.DebugWriteLine("dump(8) plugin", "aix magic = 0x{0:X8}", aixHdr.c_magic); - DicConsole.DebugWriteLine("dump(8) plugin", "new magic = 0x{0:X8}", newHdr.c_magic); + AaruConsole.DebugWriteLine("dump(8) plugin", "old magic = 0x{0:X8}", oldHdr.c_magic); + AaruConsole.DebugWriteLine("dump(8) plugin", "aix magic = 0x{0:X8}", aixHdr.c_magic); + AaruConsole.DebugWriteLine("dump(8) plugin", "new magic = 0x{0:X8}", newHdr.c_magic); return oldHdr.c_magic == OFS_MAGIC || aixHdr.c_magic == XIX_MAGIC || aixHdr.c_magic == XIX_CIGAM || newHdr.c_magic == OFS_MAGIC || newHdr.c_magic == NFS_MAGIC || newHdr.c_magic == OFS_CIGAM || diff --git a/Aaru.Gui/ConsoleHandler.cs b/Aaru.Gui/ConsoleHandler.cs index 964466b6d..f44bd7038 100644 --- a/Aaru.Gui/ConsoleHandler.cs +++ b/Aaru.Gui/ConsoleHandler.cs @@ -9,7 +9,7 @@ // // --[ Description ] ---------------------------------------------------------- // -// Receives DicConsole events and stores them for showing in the console +// Receives AaruConsole events and stores them for showing in the console // window. // // --[ License ] -------------------------------------------------------------- @@ -51,8 +51,8 @@ namespace Aaru.Gui _debug = value; - if(_debug) DicConsole.DebugWithModuleWriteLineEvent += OnDebugWriteHandler; - else DicConsole.DebugWithModuleWriteLineEvent -= OnDebugWriteHandler; + if(_debug) AaruConsole.DebugWithModuleWriteLineEvent += OnDebugWriteHandler; + else AaruConsole.DebugWithModuleWriteLineEvent -= OnDebugWriteHandler; } } public static bool Verbose @@ -64,8 +64,8 @@ namespace Aaru.Gui _verbose = value; - if(_verbose) DicConsole.VerboseWriteLineEvent += OnVerboseWriteHandler; - else DicConsole.VerboseWriteLineEvent -= OnVerboseWriteHandler; + if(_verbose) AaruConsole.VerboseWriteLineEvent += OnVerboseWriteHandler; + else AaruConsole.VerboseWriteLineEvent -= OnVerboseWriteHandler; } } @@ -73,8 +73,8 @@ namespace Aaru.Gui internal static void Init() { - DicConsole.WriteLineEvent += OnWriteHandler; - DicConsole.ErrorWriteLineEvent += OnErrorWriteHandler; + AaruConsole.WriteLineEvent += OnWriteHandler; + AaruConsole.ErrorWriteLineEvent += OnErrorWriteHandler; } static void OnWriteHandler(string format, params object[] arg) diff --git a/Aaru.Gui/Forms/frmConsole.xeto.cs b/Aaru.Gui/Forms/frmConsole.xeto.cs index af484863a..a74a70ccb 100644 --- a/Aaru.Gui/Forms/frmConsole.xeto.cs +++ b/Aaru.Gui/Forms/frmConsole.xeto.cs @@ -136,7 +136,7 @@ namespace Aaru.Gui.Forms PlatformID platId = DetectOS.GetRealPlatformID(); string platVer = DetectOS.GetVersion(); AssemblyInformationalVersionAttribute assemblyVersion = - Attribute.GetCustomAttribute(typeof(DicConsole).Assembly, + Attribute.GetCustomAttribute(typeof(AaruConsole).Assembly, typeof(AssemblyInformationalVersionAttribute)) as AssemblyInformationalVersionAttribute; @@ -172,8 +172,8 @@ namespace Aaru.Gui.Forms { MessageBox.Show("Exception {0} trying to save logfile, details has been sent to console.", exception.Message); - DicConsole.ErrorWriteLine("Console", exception.Message); - DicConsole.ErrorWriteLine("Console", exception.StackTrace); + AaruConsole.ErrorWriteLine("Console", exception.Message); + AaruConsole.ErrorWriteLine("Console", exception.StackTrace); } } diff --git a/Aaru.Gui/Forms/frmImageChecksum.xeto.cs b/Aaru.Gui/Forms/frmImageChecksum.xeto.cs index d3b280a91..5548aa770 100644 --- a/Aaru.Gui/Forms/frmImageChecksum.xeto.cs +++ b/Aaru.Gui/Forms/frmImageChecksum.xeto.cs @@ -165,7 +165,7 @@ namespace Aaru.Gui.Forms mediaChecksum?.Update(hiddenSector); } - DicConsole.DebugWriteLine("Checksum command", + AaruConsole.DebugWriteLine("Checksum command", "Track {0} starts at sector {1} and ends at sector {2}", currentTrack.TrackSequence, currentTrack.TrackStartSector, currentTrack.TrackEndSector); @@ -261,8 +261,8 @@ namespace Aaru.Gui.Forms } catch(Exception ex) { - DicConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); - DicConsole.WriteLine("Unable to get separate tracks, not checksumming them"); + AaruConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); + AaruConsole.WriteLine("Unable to get separate tracks, not checksumming them"); } else { diff --git a/Aaru.Gui/Forms/frmImageConvert.xeto.cs b/Aaru.Gui/Forms/frmImageConvert.xeto.cs index 12a7e9088..9404d0184 100644 --- a/Aaru.Gui/Forms/frmImageConvert.xeto.cs +++ b/Aaru.Gui/Forms/frmImageConvert.xeto.cs @@ -288,7 +288,7 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); return; } @@ -323,7 +323,7 @@ namespace Aaru.Gui.Forms if(!cancel) if(!outputFormat.SetMetadata(metadata)) { - DicConsole.ErrorWrite("Error {0} setting metadata, ", outputFormat.ErrorMessage); + AaruConsole.ErrorWrite("Error {0} setting metadata, ", outputFormat.ErrorMessage); if(chkForce.Checked != true) { Application.Instance.Invoke(() => @@ -333,12 +333,12 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("not continuing..."); + AaruConsole.ErrorWriteLine("not continuing..."); return; } warning = true; - DicConsole.ErrorWriteLine("continuing..."); + AaruConsole.ErrorWriteLine("continuing..."); } if(tracks != null && !cancel && outputOptical != null) @@ -360,7 +360,7 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("Error {0} sending tracks list to output image.", + AaruConsole.ErrorWriteLine("Error {0} sending tracks list to output image.", outputFormat.ErrorMessage); return; } @@ -386,7 +386,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing media tag, continuing...", outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine("Error {0} writing media tag, continuing...", outputFormat.ErrorMessage); } else { @@ -397,7 +397,7 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", outputFormat.ErrorMessage); return; } @@ -420,7 +420,7 @@ namespace Aaru.Gui.Forms inputFormat.Info.SectorsPerTrack)) { warning = true; - DicConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...", + AaruConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...", outputFormat.ErrorMessage); } @@ -483,7 +483,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); } else @@ -495,7 +495,7 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return; } @@ -576,7 +576,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); } else @@ -588,7 +588,7 @@ namespace Aaru.Gui.Forms MessageBoxType.Error); }); - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return; } @@ -674,7 +674,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); } else @@ -749,7 +749,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing tag, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag, continuing...", outputFormat.ErrorMessage); } else @@ -802,7 +802,7 @@ namespace Aaru.Gui.Forms if(chkForce.Checked == true) { warning = true; - DicConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); } else @@ -840,7 +840,7 @@ namespace Aaru.Gui.Forms ret = outputFormat.SetDumpHardware(dumpHardware); if(!ret) - DicConsole.WriteLine("Error {0} writing dump hardware list to output image.", + AaruConsole.WriteLine("Error {0} writing dump hardware list to output image.", outputFormat.ErrorMessage); } @@ -855,7 +855,7 @@ namespace Aaru.Gui.Forms outputFormat.SetCicmMetadata(cicmMetadata); if(!ret) - DicConsole.WriteLine("Error {0} writing CICM XML metadata to output image.", + AaruConsole.WriteLine("Error {0} writing CICM XML metadata to output image.", outputFormat.ErrorMessage); } diff --git a/Aaru.Gui/Forms/frmImageEntropy.xeto.cs b/Aaru.Gui/Forms/frmImageEntropy.xeto.cs index 4438bd2d9..282c126d5 100644 --- a/Aaru.Gui/Forms/frmImageEntropy.xeto.cs +++ b/Aaru.Gui/Forms/frmImageEntropy.xeto.cs @@ -89,10 +89,10 @@ namespace Aaru.Gui.Forms tracksEntropy = entropyCalculator.CalculateTracksEntropy(chkDuplicatedSectors.Checked == true); foreach(EntropyResults trackEntropy in tracksEntropy) { - DicConsole.WriteLine("Entropy for track {0} is {1:F4}.", trackEntropy.Track, + AaruConsole.WriteLine("Entropy for track {0} is {1:F4}.", trackEntropy.Track, trackEntropy.Entropy); if(trackEntropy.UniqueSectors != null) - DicConsole.WriteLine("Track {0} has {1} unique sectors ({2:P3})", trackEntropy.Track, + AaruConsole.WriteLine("Track {0} has {1} unique sectors ({2:P3})", trackEntropy.Track, trackEntropy.UniqueSectors, (double)trackEntropy.UniqueSectors / (double)trackEntropy.Sectors); } diff --git a/Aaru.Gui/Forms/frmImageSidecar.xeto.cs b/Aaru.Gui/Forms/frmImageSidecar.xeto.cs index 3867e911e..b2abe9021 100644 --- a/Aaru.Gui/Forms/frmImageSidecar.xeto.cs +++ b/Aaru.Gui/Forms/frmImageSidecar.xeto.cs @@ -94,7 +94,7 @@ namespace Aaru.Gui.Forms sidecarClass.EndProgressEvent2 += EndProgress2; CICMMetadataType sidecar = sidecarClass.Create(); - DicConsole.WriteLine("Writing metadata sidecar"); + AaruConsole.WriteLine("Writing metadata sidecar"); FileStream xmlFs = new FileStream(txtDestination.Text, FileMode.Create); diff --git a/Aaru.Gui/Forms/frmImageVerify.xeto.cs b/Aaru.Gui/Forms/frmImageVerify.xeto.cs index 9a546a5b2..351924b08 100644 --- a/Aaru.Gui/Forms/frmImageVerify.xeto.cs +++ b/Aaru.Gui/Forms/frmImageVerify.xeto.cs @@ -157,7 +157,7 @@ namespace Aaru.Gui.Forms }); correctDisc = discCheckStatus; - DicConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", + AaruConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds); } } @@ -305,7 +305,7 @@ namespace Aaru.Gui.Forms TimeSpan checkTime = endCheck - startCheck; - DicConsole.VerboseWriteLine("Checking sector checksums took {0} seconds", checkTime.TotalSeconds); + AaruConsole.VerboseWriteLine("Checking sector checksums took {0} seconds", checkTime.TotalSeconds); Application.Instance.Invoke(() => { diff --git a/Aaru.Gui/Forms/frmMain.xeto.cs b/Aaru.Gui/Forms/frmMain.xeto.cs index 9fea94e58..6194887f7 100644 --- a/Aaru.Gui/Forms/frmMain.xeto.cs +++ b/Aaru.Gui/Forms/frmMain.xeto.cs @@ -353,15 +353,15 @@ namespace Aaru.Gui.Forms return; } - DicConsole.WriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.WriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); try { if(!imageFormat.Open(inputFilter)) { MessageBox.Show("Unable to open image format", MessageBoxType.Error); - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("No error given"); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("No error given"); return; } @@ -392,13 +392,13 @@ namespace Aaru.Gui.Forms if(partitions.Count == 0) { - DicConsole.DebugWriteLine("Analyze command", "No partitions found"); + AaruConsole.DebugWriteLine("Analyze command", "No partitions found"); checkraw = true; } else { - DicConsole.WriteLine("{0} partitions found.", partitions.Count); + AaruConsole.WriteLine("{0} partitions found.", partitions.Count); foreach(string scheme in partitions.Select(p => p.Scheme).Distinct().OrderBy(s => s)) { @@ -423,15 +423,15 @@ namespace Aaru.Gui.Forms } }; - DicConsole.WriteLine("Identifying filesystem on partition"); + AaruConsole.WriteLine("Identifying filesystem on partition"); Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, partition); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) @@ -490,10 +490,10 @@ namespace Aaru.Gui.Forms Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) @@ -544,16 +544,16 @@ namespace Aaru.Gui.Forms catch(Exception ex) { MessageBox.Show("Unable to open image format", MessageBoxType.Error); - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); - DicConsole.DebugWriteLine("Image-info command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.DebugWriteLine("Image-info command", "Stack trace: {0}", ex.StackTrace); } } catch(Exception ex) { MessageBox.Show("Exception reading file", MessageBoxType.Error); - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Image-info command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Image-info command", ex.StackTrace); } Statistics.AddCommand("image-info"); @@ -601,13 +601,13 @@ namespace Aaru.Gui.Forms { try { - DicConsole.WriteLine("Refreshing devices"); + AaruConsole.WriteLine("Refreshing devices"); devicesRoot.Children.Clear(); foreach(DeviceInfo device in Device.ListDevices().Where(d => d.Supported).OrderBy(d => d.Vendor). ThenBy(d => d.Model)) { - DicConsole.DebugWriteLine("Main window", + AaruConsole.DebugWriteLine("Main window", "Found supported device model {0} by manufacturer {1} on bus {2} and path {3}", device.Model, device.Vendor, device.Bus, device.Path); @@ -684,7 +684,7 @@ namespace Aaru.Gui.Forms } catch(InvalidOperationException ex) { - DicConsole.ErrorWriteLine(ex.Message); + AaruConsole.ErrorWriteLine(ex.Message); } } @@ -765,7 +765,7 @@ namespace Aaru.Gui.Forms selectedItem.Values[3] = ex.Message; lblError.Text = ex.Message; splMain.Panel2 = lblError; - DicConsole.ErrorWriteLine(ex.Message); + AaruConsole.ErrorWriteLine(ex.Message); } break; @@ -800,7 +800,7 @@ namespace Aaru.Gui.Forms if(errno != Errno.NoError) { - DicConsole. + AaruConsole. ErrorWriteLine($"Error {errno} trying to get information about filesystem entry named {dirent}"); continue; @@ -854,7 +854,7 @@ namespace Aaru.Gui.Forms deviceItem.Values[3] = ex.Message; e.Cancel = true; treeImages.ReloadData(); - DicConsole.ErrorWriteLine(ex.Message); + AaruConsole.ErrorWriteLine(ex.Message); treeImages.SelectedItem = deviceItem; return; @@ -928,7 +928,7 @@ namespace Aaru.Gui.Forms if(errno != Errno.NoError) { - DicConsole. + AaruConsole. ErrorWriteLine($"Error {errno} trying to get information about filesystem entry named {dirent}"); continue; @@ -973,7 +973,7 @@ namespace Aaru.Gui.Forms if(errno != Errno.NoError) { - DicConsole. + AaruConsole. ErrorWriteLine($"Error {errno} trying to get information about filesystem entry named {dirent}"); continue; diff --git a/Aaru.Gui/Tabs/tabPcmciaInfo.xeto.cs b/Aaru.Gui/Tabs/tabPcmciaInfo.xeto.cs index 9d471fe10..8d83fb4f2 100644 --- a/Aaru.Gui/Tabs/tabPcmciaInfo.xeto.cs +++ b/Aaru.Gui/Tabs/tabPcmciaInfo.xeto.cs @@ -133,7 +133,7 @@ namespace Aaru.Gui.Tabs cisList.Add(new TreeGridItem {Values = new object[] {tupleCode, tupleDescription}}); } - else DicConsole.DebugWriteLine("Device-Info command", "PCMCIA CIS returned no tuples"); + else AaruConsole.DebugWriteLine("Device-Info command", "PCMCIA CIS returned no tuples"); } protected void OnTreePcmciaSelectedItemChanged(object sender, EventArgs e) diff --git a/Aaru.Gui/Tabs/tabScsiInfo.xeto.cs b/Aaru.Gui/Tabs/tabScsiInfo.xeto.cs index 57ec17287..385acd817 100644 --- a/Aaru.Gui/Tabs/tabScsiInfo.xeto.cs +++ b/Aaru.Gui/Tabs/tabScsiInfo.xeto.cs @@ -564,7 +564,7 @@ namespace Aaru.Gui.Tabs evpdPageTitle = $"Page {page.Key:X2}h"; evpdDecodedPage = "Undecoded"; - DicConsole.DebugWriteLine("Device-Info command", "Found undecoded SCSI VPD page 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded SCSI VPD page 0x{0:X2}", page.Key); } @@ -589,16 +589,16 @@ namespace Aaru.Gui.Tabs var ftr = Features.Separate(configuration); - DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes", ftr.DataLength); - DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION current profile is {0:X4}h", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION current profile is {0:X4}h", ftr.CurrentProfile); if (ftr.Descriptors != null) foreach (var desc in ftr.Descriptors) { var featureNumber = $"Feature {desc.Code:X4}h"; string featureDescription; - DicConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code); + AaruConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code); switch (desc.Code) { @@ -784,7 +784,7 @@ namespace Aaru.Gui.Tabs featuresList.Add(new TreeGridItem {Values = new object[] {featureNumber, featureDescription}}); } else - DicConsole.DebugWriteLine("Device-Info command", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION returned no feature descriptors"); } diff --git a/Aaru.Helpers b/Aaru.Helpers index feead08c5..e355423de 160000 --- a/Aaru.Helpers +++ b/Aaru.Helpers @@ -1 +1 @@ -Subproject commit feead08c5ecfc886b40f6e605d77fa9c007d85af +Subproject commit e355423de626d7f22237706842f5ee8fa570b7a5 diff --git a/Aaru.Images/AaruFormat/ClauniaSubchannelTransform.cs b/Aaru.Images/AaruFormat/ClauniaSubchannelTransform.cs index 306945dcd..7b424baf8 100644 --- a/Aaru.Images/AaruFormat/ClauniaSubchannelTransform.cs +++ b/Aaru.Images/AaruFormat/ClauniaSubchannelTransform.cs @@ -155,11 +155,11 @@ namespace Aaru.DiscImages end = DateTime.UtcNow; TimeSpan sequentialize = end - start; - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to deinterleave subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to deinterleave subchannel.", deinterleave.TotalMilliseconds); - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to sequentialize subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to sequentialize subchannel.", sequentialize.TotalMilliseconds); - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to transform subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to transform subchannel.", deinterleave.TotalMilliseconds + sequentialize.TotalMilliseconds); return sequential; @@ -283,11 +283,11 @@ namespace Aaru.DiscImages end = DateTime.UtcNow; TimeSpan interleave = end - start; - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to de-sequentialize subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to de-sequentialize subchannel.", desequentialize.TotalMilliseconds); - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to interleave subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to interleave subchannel.", interleave.TotalMilliseconds); - DicConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to untransform subchannel.", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0}ms to untransform subchannel.", interleave.TotalMilliseconds + desequentialize.TotalMilliseconds); return interleaved; diff --git a/Aaru.Images/AaruFormat/Read.cs b/Aaru.Images/AaruFormat/Read.cs index 6fd11dfa9..9026ef5e8 100644 --- a/Aaru.Images/AaruFormat/Read.cs +++ b/Aaru.Images/AaruFormat/Read.cs @@ -58,7 +58,7 @@ namespace Aaru.DiscImages { public bool Open(IFilter imageFilter) { - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); imageStream = imageFilter.GetDataForkStream(); @@ -79,7 +79,7 @@ namespace Aaru.DiscImages imageInfo.Version = $"{header.imageMajorVersion}.{header.imageMinorVersion}"; imageInfo.MediaType = header.mediaType; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Read the index header @@ -91,10 +91,10 @@ namespace Aaru.DiscImages if(idxHeader.identifier != BlockType.Index) throw new FeatureUnsupportedImageException("Index not found!"); - DicConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", header.indexOffset, idxHeader.entries); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Fill in-memory index @@ -106,14 +106,14 @@ namespace Aaru.DiscImages imageStream.Read(structureBytes, 0, structureBytes.Length); IndexEntry entry = Marshal.SpanToStructureLittleEndian(structureBytes); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Block type {0} with data type {1} is indexed to be at {2}", entry.blockType, entry.dataType, entry.offset); index.Add(entry); } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); imageInfo.ImageSize = 0; @@ -150,7 +150,7 @@ namespace Aaru.DiscImages if(blockHeader.identifier != entry.blockType) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect identifier for data block at position {0}", entry.offset); @@ -159,7 +159,7 @@ namespace Aaru.DiscImages if(blockHeader.type != entry.dataType) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected block with data type {0} at position {1} but found data type {2}", entry.dataType, entry.offset, blockHeader.type); @@ -168,11 +168,11 @@ namespace Aaru.DiscImages byte[] data; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found data block type {0} at position {1}", entry.dataType, entry.offset); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Decompress media tag @@ -182,7 +182,7 @@ namespace Aaru.DiscImages if(blockHeader.compression == CompressionType.LzmaClauniaSubchannelTransform && entry.dataType != DataType.CdSectorSubchannel) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Invalid compression type {0} for block with data type {1}, continuing...", blockHeader.compression, entry.dataType); @@ -206,11 +206,11 @@ namespace Aaru.DiscImages DateTime endDecompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to decompress block", (endDecompress - startDecompress).TotalSeconds); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); } else if(blockHeader.compression == CompressionType.None) @@ -218,12 +218,12 @@ namespace Aaru.DiscImages data = new byte[blockHeader.length]; imageStream.Read(data, 0, (int)blockHeader.length); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); } else { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found unknown compression type {0}, continuing...", (ushort)blockHeader.compression); @@ -235,7 +235,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(blockCrc, 0) != blockHeader.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect CRC found: 0x{0:X16} found, expected 0x{1:X16}, continuing...", BitConverter.ToUInt64(blockCrc, 0), blockHeader.crc64); @@ -261,7 +261,7 @@ namespace Aaru.DiscImages if(!imageInfo.ReadableSectorTags.Contains(SectorTagType.CdSectorHeader)) imageInfo.ReadableSectorTags.Add(SectorTagType.CdSectorHeader); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -290,7 +290,7 @@ namespace Aaru.DiscImages if(!imageInfo.ReadableSectorTags.Contains(SectorTagType.CdSectorEdc)) imageInfo.ReadableSectorTags.Add(SectorTagType.CdSectorEdc); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -300,7 +300,7 @@ namespace Aaru.DiscImages if(!imageInfo.ReadableSectorTags.Contains(SectorTagType.CdSectorSubchannel)) imageInfo.ReadableSectorTags.Add(SectorTagType.CdSectorSubchannel); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -312,14 +312,14 @@ namespace Aaru.DiscImages if(!imageInfo.ReadableSectorTags.Contains(SectorTagType.AppleSectorTag)) imageInfo.ReadableSectorTags.Add(SectorTagType.AppleSectorTag); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; case DataType.CompactDiscMode2Subheader: mode2Subheaders = data; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -328,7 +328,7 @@ namespace Aaru.DiscImages if(mediaTags.ContainsKey(mediaTagType)) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Media tag type {0} duplicated, removing previous entry...", mediaTagType); @@ -337,7 +337,7 @@ namespace Aaru.DiscImages mediaTags.Add(mediaTagType, data); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -358,14 +358,14 @@ namespace Aaru.DiscImages imageInfo.Sectors = ddtHeader.entries; shift = ddtHeader.shift; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Check for DDT compression switch(ddtHeader.compression) { case CompressionType.Lzma: - DicConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); + AaruConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); DateTime ddtStart = DateTime.UtcNow; byte[] compressedDdt = new byte[ddtHeader.cmpLength - LZMA_PROPERTIES_LENGTH]; byte[] lzmaProperties = new byte[LZMA_PROPERTIES_LENGTH]; @@ -381,11 +381,11 @@ namespace Aaru.DiscImages DateTime ddtEnd = DateTime.UtcNow; inMemoryDdt = true; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to decompress DDT", (ddtEnd - ddtStart).TotalSeconds); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -393,7 +393,7 @@ namespace Aaru.DiscImages inMemoryDdt = false; outMemoryDdtPosition = (long)entry.offset; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -410,14 +410,14 @@ namespace Aaru.DiscImages uint[] cdDdt = new uint[ddtHeader.entries]; byte[] decompressedDdt = new byte[ddtHeader.length]; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Check for DDT compression switch(ddtHeader.compression) { case CompressionType.Lzma: - DicConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); + AaruConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); DateTime ddtStart = DateTime.UtcNow; byte[] compressedDdt = new byte[ddtHeader.cmpLength - LZMA_PROPERTIES_LENGTH]; byte[] lzmaProperties = new byte[LZMA_PROPERTIES_LENGTH]; @@ -430,18 +430,18 @@ namespace Aaru.DiscImages compressedDdtMs.Close(); DateTime ddtEnd = DateTime.UtcNow; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to decompress DDT", (ddtEnd - ddtStart).TotalSeconds); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; case CompressionType.None: imageStream.Read(decompressedDdt, 0, decompressedDdt.Length); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -457,7 +457,7 @@ namespace Aaru.DiscImages else if(entry.dataType == DataType.CdSectorSuffixCorrected) sectorSuffixDdt = cdDdt; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); } @@ -471,7 +471,7 @@ namespace Aaru.DiscImages if(geometryBlock.identifier == BlockType.GeometryBlock) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Geometry set to {0} cylinders {1} heads {2} sectors per track", geometryBlock.cylinders, geometryBlock.heads, geometryBlock.sectorsPerTrack); @@ -480,7 +480,7 @@ namespace Aaru.DiscImages imageInfo.Heads = geometryBlock.heads; imageInfo.SectorsPerTrack = geometryBlock.sectorsPerTrack; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); } @@ -496,14 +496,14 @@ namespace Aaru.DiscImages if(metadataBlock.identifier != entry.blockType) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect identifier for data block at position {0}", entry.offset); break; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Found metadata block at position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found metadata block at position {0}", entry.offset); byte[] metadata = new byte[metadataBlock.blockSize]; @@ -516,7 +516,7 @@ namespace Aaru.DiscImages imageInfo.MediaSequence = metadataBlock.mediaSequence; imageInfo.LastMediaSequence = metadataBlock.lastMediaSequence; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media sequence as {0} of {1}", imageInfo.MediaSequence, imageInfo.LastMediaSequence); } @@ -527,7 +527,7 @@ namespace Aaru.DiscImages imageInfo.Creator = Encoding.Unicode.GetString(metadata, (int)metadataBlock.creatorOffset, (int)(metadataBlock.creatorLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting creator: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting creator: {0}", imageInfo.Creator); } @@ -538,7 +538,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.commentsOffset, (int)(metadataBlock.commentsLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting comments: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting comments: {0}", imageInfo.Comments); } @@ -549,7 +549,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaTitleOffset, (int)(metadataBlock.mediaTitleLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media title: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media title: {0}", imageInfo.MediaTitle); } @@ -561,7 +561,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaManufacturerOffset, (int)(metadataBlock.mediaManufacturerLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media manufacturer: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media manufacturer: {0}", imageInfo.MediaManufacturer); } @@ -572,7 +572,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaModelOffset, (int)(metadataBlock.mediaModelLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media model: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media model: {0}", imageInfo.MediaModel); } @@ -584,7 +584,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaSerialNumberOffset, (int)(metadataBlock.mediaSerialNumberLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media serial number: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media serial number: {0}", imageInfo.MediaSerialNumber); } @@ -595,7 +595,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaBarcodeOffset, (int)(metadataBlock.mediaBarcodeLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media barcode: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media barcode: {0}", imageInfo.MediaBarcode); } @@ -606,7 +606,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.mediaPartNumberOffset, (int)(metadataBlock.mediaPartNumberLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting media part number: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting media part number: {0}", imageInfo.MediaPartNumber); } @@ -618,7 +618,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.driveManufacturerOffset, (int)(metadataBlock.driveManufacturerLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting drive manufacturer: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting drive manufacturer: {0}", imageInfo.DriveManufacturer); } @@ -629,7 +629,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.driveModelOffset, (int)(metadataBlock.driveModelLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting drive model: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting drive model: {0}", imageInfo.DriveModel); } @@ -641,7 +641,7 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.driveSerialNumberOffset, (int)(metadataBlock.driveSerialNumberLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", "Setting drive serial number: {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting drive serial number: {0}", imageInfo.DriveSerialNumber); } @@ -653,12 +653,12 @@ namespace Aaru.DiscImages Encoding.Unicode.GetString(metadata, (int)metadataBlock.driveFirmwareRevisionOffset, (int)(metadataBlock.driveFirmwareRevisionLength - 2)); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Setting drive firmware revision: {0}", imageInfo.DriveFirmwareRevision); } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -671,7 +671,7 @@ namespace Aaru.DiscImages if(tracksHeader.identifier != BlockType.TracksBlock) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect identifier for tracks block at position {0}", entry.offset); @@ -684,7 +684,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(trksCrc, 0) != tracksHeader.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect CRC found: 0x{0:X16} found, expected 0x{1:X16}, continuing...", BitConverter.ToUInt64(trksCrc, 0), tracksHeader.crc64); @@ -697,7 +697,7 @@ namespace Aaru.DiscImages trackFlags = new Dictionary(); trackIsrcs = new Dictionary(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Found {0} tracks at position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found {0} tracks at position {0}", tracksHeader.entries, entry.offset); for(ushort i = 0; i < tracksHeader.entries; i++) @@ -724,7 +724,7 @@ namespace Aaru.DiscImages imageInfo.HasPartitions = true; imageInfo.HasSessions = true; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -740,10 +740,10 @@ namespace Aaru.DiscImages if(cicmBlock.identifier != BlockType.CicmBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found CICM XML metadata block at position {0}", entry.offset); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); byte[] cicmBytes = new byte[cicmBlock.length]; @@ -759,13 +759,13 @@ namespace Aaru.DiscImages } catch(XmlException ex) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Exception {0} processing CICM XML metadata block", ex.Message); CicmMetadata = null; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -781,10 +781,10 @@ namespace Aaru.DiscImages if(dumpBlock.identifier != BlockType.DumpHardwareBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found dump hardware block at position {0}", entry.offset); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); structureBytes = new byte[dumpBlock.length]; @@ -793,7 +793,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(dumpCrc, 0) != dumpBlock.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect CRC found: 0x{0:X16} found, expected 0x{1:X16}, continuing...", BitConverter.ToUInt64(dumpCrc, 0), dumpBlock.crc64); @@ -904,7 +904,7 @@ namespace Aaru.DiscImages if(DumpHardware.Count == 0) DumpHardware = null; - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -920,7 +920,7 @@ namespace Aaru.DiscImages if(partitionHeader.identifier != BlockType.TapePartitionBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found tape partition block at position {0}", entry.offset); byte[] tapePartitionBytes = new byte[partitionHeader.length]; @@ -951,7 +951,7 @@ namespace Aaru.DiscImages if(fileHeader.identifier != BlockType.TapeFileBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found tape file block at position {0}", entry.offset); byte[] tapeFileBytes = new byte[fileHeader.length]; @@ -976,10 +976,10 @@ namespace Aaru.DiscImages throw new ImageNotSupportedException("Could not find user data deduplication table."); imageInfo.CreationTime = DateTime.FromFileTimeUtc(header.creationTime); - DicConsole.DebugWriteLine("Aaru Format plugin", "Image created on {0}", imageInfo.CreationTime); + AaruConsole.DebugWriteLine("Aaru Format plugin", "Image created on {0}", imageInfo.CreationTime); imageInfo.LastModificationTime = DateTime.FromFileTimeUtc(header.lastWrittenTime); - DicConsole.DebugWriteLine("Aaru Format plugin", "Image last written on {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Image last written on {0}", imageInfo.LastModificationTime); imageInfo.XmlMediaType = GetXmlMediaType(header.mediaType); @@ -994,7 +994,7 @@ namespace Aaru.DiscImages imageInfo.ReadableMediaTags.AddRange(mediaTags.Keys); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Initialize caches @@ -1005,13 +1005,13 @@ namespace Aaru.DiscImages if(!inMemoryDdt) ddtEntryCache = new Dictionary(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); // Initialize tracks, sessions and partitions if(imageInfo.XmlMediaType == XmlMediaType.OpticalDisc) { - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); if(Tracks == null || @@ -1042,7 +1042,7 @@ namespace Aaru.DiscImages trackIsrcs = new Dictionary(); } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); Sessions = new List(); @@ -1057,7 +1057,7 @@ namespace Aaru.DiscImages EndSector = Tracks.Where(t => t.TrackSession == i).Max(t => t.TrackEndSector) }); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); ulong currentTrackOffset = 0; @@ -1080,7 +1080,7 @@ namespace Aaru.DiscImages (ulong)track.TrackBytesPerSector; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); Track[] tracks = Tracks.ToArray(); @@ -1102,12 +1102,12 @@ namespace Aaru.DiscImages tracks[i].TrackSubchannelType = TrackSubchannelType.Raw; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); Tracks = tracks.ToList(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); } else @@ -1122,7 +1122,7 @@ namespace Aaru.DiscImages if(sectorSuffixDdt != null) EccInit(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); return true; @@ -1170,7 +1170,7 @@ namespace Aaru.DiscImages blockHeader = Marshal.SpanToStructureLittleEndian(structureBytes); // Decompress block - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); switch(blockHeader.compression) @@ -1179,7 +1179,7 @@ namespace Aaru.DiscImages block = new byte[blockHeader.length]; imageStream.Read(block, 0, (int)blockHeader.length); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -1195,7 +1195,7 @@ namespace Aaru.DiscImages lzmaBlock.Close(); compressedBlockMs.Close(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -1211,7 +1211,7 @@ namespace Aaru.DiscImages flakeReader.Close(); flacMs.Close(); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); break; @@ -1236,7 +1236,7 @@ namespace Aaru.DiscImages sector = new byte[blockHeader.sectorSize]; Array.Copy(block, (long)(offset * blockHeader.sectorSize), sector, 0, blockHeader.sectorSize); - DicConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Memory snapshot: {0} bytes", GC.GetTotalMemory(false)); return sector; diff --git a/Aaru.Images/AaruFormat/Verify.cs b/Aaru.Images/AaruFormat/Verify.cs index 4ed5da8c1..7639f2e32 100644 --- a/Aaru.Images/AaruFormat/Verify.cs +++ b/Aaru.Images/AaruFormat/Verify.cs @@ -44,7 +44,7 @@ namespace Aaru.DiscImages public bool? VerifyMediaImage() { // This will traverse all blocks and check their CRC64 without uncompressing them - DicConsole.DebugWriteLine("Aaru Format plugin", "Checking index integrity at {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Checking index integrity at {0}", header.indexOffset); imageStream.Position = (long)header.indexOffset; @@ -54,11 +54,11 @@ namespace Aaru.DiscImages if(idxHeader.identifier != BlockType.Index) { - DicConsole.DebugWriteLine("Aaru Format plugin", "Incorrect index identifier"); + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect index identifier"); return false; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", header.indexOffset, idxHeader.entries); structureBytes = new byte[Marshal.SizeOf() * idxHeader.entries]; @@ -67,7 +67,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(verifyCrc, 0) != idxHeader.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", "Expected index CRC {0:X16} but got {1:X16}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected index CRC {0:X16} but got {1:X16}", idxHeader.crc64, BitConverter.ToUInt64(verifyCrc, 0)); return false; } @@ -80,7 +80,7 @@ namespace Aaru.DiscImages structureBytes = new byte[Marshal.SizeOf()]; imageStream.Read(structureBytes, 0, structureBytes.Length); IndexEntry entry = Marshal.SpanToStructureLittleEndian(structureBytes); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Block type {0} with data type {1} is indexed to be at {2}", entry.blockType, entry.dataType, entry.offset); vrIndex.Add(entry); @@ -106,7 +106,7 @@ namespace Aaru.DiscImages crcVerify = new Crc64Context(); readBytes = 0; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Verifying data block type {0} at position {1}", entry.dataType, entry.offset); @@ -126,7 +126,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(verifyCrc, 0) != blockHeader.cmpCrc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected block CRC {0:X16} but got {1:X16}", blockHeader.cmpCrc64, BitConverter.ToUInt64(verifyCrc, 0)); return false; @@ -141,7 +141,7 @@ namespace Aaru.DiscImages crcVerify = new Crc64Context(); readBytes = 0; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Verifying deduplication table type {0} at position {1}", entry.dataType, entry.offset); @@ -161,7 +161,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(verifyCrc, 0) != ddtHeader.cmpCrc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected DDT CRC {0:X16} but got {1:X16}", ddtHeader.cmpCrc64, BitConverter.ToUInt64(verifyCrc, 0)); return false; @@ -173,7 +173,7 @@ namespace Aaru.DiscImages imageStream.Read(structureBytes, 0, structureBytes.Length); TracksHeader trkHeader = Marshal.SpanToStructureLittleEndian(structureBytes); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Track block at {0} contains {1} entries", header.indexOffset, trkHeader.entries); @@ -183,7 +183,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(verifyCrc, 0) != trkHeader.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected index CRC {0:X16} but got {1:X16}", trkHeader.crc64, BitConverter.ToUInt64(verifyCrc, 0)); return false; @@ -191,7 +191,7 @@ namespace Aaru.DiscImages break; default: - DicConsole.DebugWriteLine("Aaru Format plugin", "Ignored field type {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Ignored field type {0}", entry.blockType); break; } diff --git a/Aaru.Images/AaruFormat/Write.cs b/Aaru.Images/AaruFormat/Write.cs index e914cd786..81784a044 100644 --- a/Aaru.Images/AaruFormat/Write.cs +++ b/Aaru.Images/AaruFormat/Write.cs @@ -209,7 +209,7 @@ namespace Aaru.DiscImages shift++; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Got a shift of {0} for {1} sectors per block", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Got a shift of {0} for {1} sectors per block", shift, oldSectorsPerBlock); imageInfo = new ImageInfo @@ -297,7 +297,7 @@ namespace Aaru.DiscImages return false; } - DicConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Index at {0} contains {1} entries", header.indexOffset, idxHeader.entries); for(ushort i = 0; i < idxHeader.entries; i++) @@ -306,7 +306,7 @@ namespace Aaru.DiscImages imageStream.Read(structureBytes, 0, structureBytes.Length); IndexEntry entry = Marshal.SpanToStructureLittleEndian(structureBytes); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Block type {0} with data type {1} is indexed to be at {2}", entry.blockType, entry.dataType, entry.offset); @@ -345,7 +345,7 @@ namespace Aaru.DiscImages if(blockHeader.identifier != entry.blockType) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect identifier for data block at position {0}", entry.offset); @@ -354,7 +354,7 @@ namespace Aaru.DiscImages if(blockHeader.type != entry.dataType) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Expected block with data type {0} at position {1} but found data type {2}", entry.dataType, entry.offset, blockHeader.type); @@ -363,7 +363,7 @@ namespace Aaru.DiscImages byte[] data; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found data block type {0} at position {1}", entry.dataType, entry.offset); @@ -387,7 +387,7 @@ namespace Aaru.DiscImages } else { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found unknown compression type {0}, continuing...", (ushort)blockHeader.compression); @@ -399,7 +399,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(blockCrc, 0) != blockHeader.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect CRC found: 0x{0:X16} found, expected 0x{1:X16}, continuing...", BitConverter.ToUInt64(blockCrc, 0), blockHeader.crc64); @@ -463,7 +463,7 @@ namespace Aaru.DiscImages switch(ddtHeader.compression) { case CompressionType.Lzma: - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); DateTime ddtStart = DateTime.UtcNow; @@ -483,7 +483,7 @@ namespace Aaru.DiscImages DateTime ddtEnd = DateTime.UtcNow; inMemoryDdt = true; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to decompress DDT", (ddtEnd - ddtStart).TotalSeconds); @@ -535,7 +535,7 @@ namespace Aaru.DiscImages switch(ddtHeader.compression) { case CompressionType.Lzma: - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Decompressing DDT..."); DateTime ddtStart = DateTime.UtcNow; @@ -552,7 +552,7 @@ namespace Aaru.DiscImages compressedDdtMs.Close(); DateTime ddtEnd = DateTime.UtcNow; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to decompress DDT", (ddtEnd - ddtStart).TotalSeconds); @@ -594,7 +594,7 @@ namespace Aaru.DiscImages if(cicmBlock.identifier != BlockType.CicmBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found CICM XML metadata block at position {0}", entry.offset); byte[] cicmBytes = new byte[cicmBlock.length]; @@ -610,7 +610,7 @@ namespace Aaru.DiscImages } catch(XmlException ex) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Exception {0} processing CICM XML metadata block", ex.Message); @@ -630,7 +630,7 @@ namespace Aaru.DiscImages if(dumpBlock.identifier != BlockType.DumpHardwareBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found dump hardware block at position {0}", entry.offset); structureBytes = new byte[dumpBlock.length]; @@ -639,7 +639,7 @@ namespace Aaru.DiscImages if(BitConverter.ToUInt64(dumpCrc, 0) != dumpBlock.crc64) { - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Incorrect CRC found: 0x{0:X16} found, expected 0x{1:X16}, continuing...", BitConverter.ToUInt64(dumpCrc, 0), dumpBlock.crc64); @@ -763,7 +763,7 @@ namespace Aaru.DiscImages if(partitionHeader.identifier != BlockType.TapePartitionBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found tape partition block at position {0}", entry.offset); byte[] tapePartitionBytes = new byte[partitionHeader.length]; @@ -796,7 +796,7 @@ namespace Aaru.DiscImages if(fileHeader.identifier != BlockType.TapeFileBlock) break; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Found tape file block at position {0}", entry.offset); byte[] tapeFileBytes = new byte[fileHeader.length]; @@ -892,7 +892,7 @@ namespace Aaru.DiscImages spamsumProvider = new SpamSumContext(); } - DicConsole.DebugWriteLine("Aaru Format plugin", "In memory DDT?: {0}", inMemoryDdt); + AaruConsole.DebugWriteLine("Aaru Format plugin", "In memory DDT?: {0}", inMemoryDdt); // Initialize tables imageStream.Seek(0, SeekOrigin.End); @@ -1873,7 +1873,7 @@ namespace Aaru.DiscImages } if(deduplicate) - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Of {0} sectors written, {1} are unique ({2:P})", writtenSectors, deduplicationTable.Count, (double)deduplicationTable.Count / writtenSectors); @@ -1886,7 +1886,7 @@ namespace Aaru.DiscImages if(mediaTag.Value is null) { - DicConsole.ErrorWriteLine("Tag type {0} is null, skipping...", dataType); + AaruConsole.ErrorWriteLine("Tag type {0} is null, skipping...", dataType); continue; } @@ -1896,7 +1896,7 @@ namespace Aaru.DiscImages blockType = BlockType.DataBlock, dataType = dataType, offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing tag type {0} to position {1}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing tag type {0} to position {1}", mediaTag.Key, idxEntry.offset); Crc64Context.Data(mediaTag.Value, out byte[] tagCrc); @@ -1960,7 +1960,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing geometry block to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing geometry block to position {0}", idxEntry.offset); structureBytes = new byte[Marshal.SizeOf()]; @@ -2093,7 +2093,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing dump hardware block to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing dump hardware block to position {0}", idxEntry.offset); Crc64Context.Data(dumpMs.ToArray(), out byte[] dumpCrc); @@ -2126,7 +2126,7 @@ namespace Aaru.DiscImages blockType = BlockType.CicmBlock, dataType = DataType.NoData, offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing CICM XML block to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CICM XML block to position {0}", idxEntry.offset); var cicmBlock = new CicmMetadataBlock @@ -2231,7 +2231,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing checksum block to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing checksum block to position {0}", idxEntry.offset); structureBytes = new byte[Marshal.SizeOf()]; @@ -2263,7 +2263,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing tape partitions to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing tape partitions to position {0}", idxEntry.offset); TapePartitionEntry[] tapePartitionEntries = new TapePartitionEntry[TapePartitions.Count]; @@ -2303,7 +2303,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing tape files to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing tape files to position {0}", idxEntry.offset); TapeFileEntry[] tapeFileEntries = new TapeFileEntry[Files.Count]; @@ -2345,7 +2345,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing user data DDT to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing user data DDT to position {0}", idxEntry.offset); var ddtHeader = new DdtHeader @@ -2404,7 +2404,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD sector prefix block to position {0}", idxEntry.offset); Crc64Context.Data(sectorPrefix, out byte[] blockCrc); @@ -2443,7 +2443,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress prefix", (endCompress - startCompress).TotalSeconds); } @@ -2470,7 +2470,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD sector suffix block to position {0}", idxEntry.offset); Crc64Context.Data(sectorSuffix, out blockCrc); @@ -2507,7 +2507,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress suffix", (endCompress - startCompress).TotalSeconds); } @@ -2566,19 +2566,19 @@ namespace Aaru.DiscImages else if((sectorSuffixDdt[i] & CD_DFIX_MASK) > 0) writtenSuffixes++; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "{0} ({1:P}% prefixes are correct, {2} ({3:P}%) prefixes have not been dumped, {4} ({5:P}%) prefixes have been written to image", correctPrefixes, correctPrefixes / imageInfo.Sectors, notDumpedPrefixes, notDumpedPrefixes / imageInfo.Sectors, writtenPrefixes, writtenPrefixes / imageInfo.Sectors); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "{0} ({1:P}% suffixes are correct, {2} ({3:P}%) suffixes have not been dumped, {4} ({5:P}%) suffixes have been written to image", correctSuffixes, correctSuffixes / imageInfo.Sectors, notDumpedSuffixes, notDumpedSuffixes / imageInfo.Sectors, writtenSuffixes, writtenSuffixes / imageInfo.Sectors); - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "{0} ({1:P}% MODE 2 Form 1 are correct, {2} ({3:P}%) MODE 2 Form 2 are correct, {4} ({5:P}%) MODE 2 Form 2 have empty CRC", correctMode2Form1, correctMode2Form1 / imageInfo.Sectors, correctMode2Form2, correctMode2Form2 / imageInfo.Sectors, @@ -2591,7 +2591,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CompactDisc sector prefix DDT to position {0}", idxEntry.offset); @@ -2640,7 +2640,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CompactDisc sector suffix DDT to position {0}", idxEntry.offset); @@ -2688,7 +2688,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD sector corrected prefix block to position {0}", idxEntry.offset); @@ -2729,7 +2729,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress prefix", (endCompress - startCompress).TotalSeconds); } @@ -2756,7 +2756,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD sector corrected suffix block to position {0}", idxEntry.offset); @@ -2797,7 +2797,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress suffix", (endCompress - startCompress).TotalSeconds); } @@ -2827,7 +2827,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD MODE2 subheaders block to position {0}", idxEntry.offset); Crc64Context.Data(mode2Subheaders, out byte[] blockCrc); @@ -2867,7 +2867,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress MODE2 subheaders", (endCompress - startCompress).TotalSeconds); } @@ -2897,7 +2897,7 @@ namespace Aaru.DiscImages offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing CD subchannel block to position {0}", idxEntry.offset); Crc64Context.Data(sectorSubchannel, out byte[] blockCrc); @@ -2938,7 +2938,7 @@ namespace Aaru.DiscImages endCompress = DateTime.Now; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Took {0} seconds to compress subchannel", (endCompress - startCompress).TotalSeconds); } @@ -3009,7 +3009,7 @@ namespace Aaru.DiscImages crc64 = BitConverter.ToUInt64(trksCrc, 0) }; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing tracks to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing tracks to position {0}", imageStream.Position); index.RemoveAll(t => t.blockType == BlockType.TracksBlock && t.dataType == DataType.NoData); @@ -3064,7 +3064,7 @@ namespace Aaru.DiscImages blockType = BlockType.DataBlock, dataType = tagType, offset = (ulong)imageStream.Position }; - DicConsole.DebugWriteLine("Aaru Format plugin", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing apple sector tag block to position {0}", idxEntry.offset); Crc64Context.Data(sectorSubchannel, out byte[] blockCrc); @@ -3325,7 +3325,7 @@ namespace Aaru.DiscImages // Check if we set up any metadata earlier, then write its block if(metadataBlock.identifier == BlockType.MetadataBlock) { - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing metadata to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing metadata to position {0}", imageStream.Position); metadataBlock.blockSize = (uint)blockStream.Length; @@ -3348,7 +3348,7 @@ namespace Aaru.DiscImages header.indexOffset = (ulong)imageStream.Position; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing index to position {0}", + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing index to position {0}", header.indexOffset); blockStream = new MemoryStream(); @@ -3377,7 +3377,7 @@ namespace Aaru.DiscImages blockStream.Close(); blockStream = null; - DicConsole.DebugWriteLine("Aaru Format plugin", "Writing header"); + AaruConsole.DebugWriteLine("Aaru Format plugin", "Writing header"); header.lastWrittenTime = DateTime.UtcNow.ToFileTimeUtc(); imageStream.Position = 0; structurePointer = System.Runtime.InteropServices.Marshal.AllocHGlobal(Marshal.SizeOf()); diff --git a/Aaru.Images/Alcohol120/Read.cs b/Aaru.Images/Alcohol120/Read.cs index 8a0a6b0b3..4a6035837 100644 --- a/Aaru.Images/Alcohol120/Read.cs +++ b/Aaru.Images/Alcohol120/Read.cs @@ -64,39 +64,39 @@ namespace Aaru.DiscImages stream.Read(hdr, 0, 88); AlcoholHeader header = Marshal.ByteArrayToStructureLittleEndian(hdr); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.signature = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.signature = {0}", Encoding.ASCII.GetString(header.signature)); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.version = {0}.{1}", header.version[0], + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.version = {0}.{1}", header.version[0], header.version[1]); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.type = {0}", header.type); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.sessions = {0}", header.sessions); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.type = {0}", header.type); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.sessions = {0}", header.sessions); for(int i = 0; i < header.unknown1.Length; i++) - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown1[{1}] = 0x{0:X4}", header.unknown1[i], + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown1[{1}] = 0x{0:X4}", header.unknown1[i], i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.bcaLength = {0}", header.bcaLength); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.bcaLength = {0}", header.bcaLength); for(int i = 0; i < header.unknown2.Length; i++) - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown2[{1}] = 0x{0:X8}", header.unknown2[i], + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown2[{1}] = 0x{0:X8}", header.unknown2[i], i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.bcaOffset = {0}", header.bcaOffset); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.bcaOffset = {0}", header.bcaOffset); for(int i = 0; i < header.unknown3.Length; i++) - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown3[{1}] = 0x{0:X8}", header.unknown3[i], + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown3[{1}] = 0x{0:X8}", header.unknown3[i], i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.structuresOffset = {0}", header.structuresOffset); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.structuresOffset = {0}", header.structuresOffset); for(int i = 0; i < header.unknown4.Length; i++) - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown4[{1}] = 0x{0:X8}", header.unknown4[i], + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.unknown4[{1}] = 0x{0:X8}", header.unknown4[i], i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.sessionOffset = {0}", header.sessionOffset); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "header.dpmOffset = {0}", header.dpmOffset); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.sessionOffset = {0}", header.sessionOffset); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "header.dpmOffset = {0}", header.dpmOffset); stream.Seek(header.sessionOffset, SeekOrigin.Begin); alcSessions = new Dictionary(); @@ -107,27 +107,27 @@ namespace Aaru.DiscImages stream.Read(sesHdr, 0, 24); AlcoholSession session = Marshal.SpanToStructureLittleEndian(sesHdr); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionStart = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionStart = {0}", session.sessionStart, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionEnd = {0}", session.sessionEnd, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionEnd = {0}", session.sessionEnd, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionSequence = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].sessionSequence = {0}", session.sessionSequence, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].allBlocks = {0}", session.allBlocks, i); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].allBlocks = {0}", session.allBlocks, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].nonTrackBlocks = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].nonTrackBlocks = {0}", session.nonTrackBlocks, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].firstTrack = {0}", session.firstTrack, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].firstTrack = {0}", session.firstTrack, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].lastTrack = {0}", session.lastTrack, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].unknown = 0x{0:X8}", session.unknown, i); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].lastTrack = {0}", session.lastTrack, i); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].unknown = 0x{0:X8}", session.unknown, i); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].trackOffset = {0}", session.trackOffset, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{1}].trackOffset = {0}", session.trackOffset, i); alcSessions.Add(session.sessionSequence, session); @@ -162,64 +162,64 @@ namespace Aaru.DiscImages oldIncorrectImage = true; } - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].mode = {0}", track.mode, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].mode = {0}", track.mode, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].subMode = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].subMode = {0}", track.subMode, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].adrCtl = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].adrCtl = {0}", track.adrCtl, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].tno = {0}", track.tno, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].tno = {0}", track.tno, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].point = {0:X2}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].point = {0:X2}", track.point, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].min = {0}", track.min, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].min = {0}", track.min, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].sec = {0}", track.sec, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].sec = {0}", track.sec, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].frame = {0}", track.frame, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].frame = {0}", track.frame, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].zero = {0}", track.zero, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].zero = {0}", track.zero, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].pmin = {0}", track.pmin, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].pmin = {0}", track.pmin, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].psec = {0}", track.psec, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].psec = {0}", track.psec, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].pframe = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].pframe = {0}", track.pframe, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].extraOffset = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].extraOffset = {0}", track.extraOffset, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].sectorSize = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].sectorSize = {0}", track.sectorSize, track.point, session.sessionSequence); //for(int j = 0; j < track.unknown.Length; j++) - // DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].unknown[{2}] = {0}", track.unknown[j], i, j, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].startLba = {0}", + // AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].unknown[{2}] = {0}", track.unknown[j], i, j, session.sessionSequence); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].startLba = {0}", track.startLba, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].startOffset = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].startOffset = {0}", track.startOffset, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].files = {0}", track.files, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].files = {0}", track.files, track.point, session.sessionSequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].footerOffset = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].footerOffset = {0}", track.footerOffset, track.point, session.sessionSequence); //for(int j = 0; j < track.unknown2.Length; j++) - // DicConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].unknown2[{2}] = {0}", track.unknown2[j], i, j, session.sessionSequence); + // AaruConsole.DebugWriteLine("Alcohol 120% plugin", "session[{2}].track[{1}].unknown2[{2}] = {0}", track.unknown2[j], i, j, session.sessionSequence); if(track.subMode == AlcoholSubchannelMode.Interleaved) track.sectorSize -= 96; @@ -250,10 +250,10 @@ namespace Aaru.DiscImages stream.Read(extHdr, 0, 8); AlcoholTrackExtra extra = Marshal.SpanToStructureLittleEndian(extHdr); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "track[{1}].extra.pregap = {0}", extra.pregap, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "track[{1}].extra.pregap = {0}", extra.pregap, track.point); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "track[{1}].extra.sectors = {0}", extra.sectors, + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "track[{1}].extra.sectors = {0}", extra.sectors, track.point); alcTrackExtras.Add(track.point, extra); @@ -275,12 +275,12 @@ namespace Aaru.DiscImages stream.Read(footer, 0, 16); alcFooter = Marshal.SpanToStructureLittleEndian(footer); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "footer.filenameOffset = {0}", + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "footer.filenameOffset = {0}", alcFooter.filenameOffset); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "footer.widechar = {0}", alcFooter.widechar); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "footer.unknown1 = 0x{0:X8}", alcFooter.unknown1); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "footer.unknown2 = 0x{0:X8}", alcFooter.unknown2); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "footer.widechar = {0}", alcFooter.widechar); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "footer.unknown1 = 0x{0:X8}", alcFooter.unknown1); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "footer.unknown2 = 0x{0:X8}", alcFooter.unknown2); } string alcFile = "*.mdf"; @@ -297,7 +297,7 @@ namespace Aaru.DiscImages alcFile = alcFooter.widechar == 1 ? Encoding.Unicode.GetString(filename) : Encoding.Default.GetString(filename); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "footer.filename = {0}", alcFile); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "footer.filename = {0}", alcFile); } if(alcFooter.filenameOffset == 0 || @@ -499,7 +499,7 @@ namespace Aaru.DiscImages imageInfo.MediaType = MediaType.CD; } - DicConsole.DebugWriteLine("Alcohol 120% plugin", "ImageInfo.mediaType = {0}", imageInfo.MediaType); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "ImageInfo.mediaType = {0}", imageInfo.MediaType); Partitions = new List(); offsetmap = new Dictionary(); @@ -597,23 +597,23 @@ namespace Aaru.DiscImages imageInfo.ReadableSectorTags.Add(SectorTagType.CdSectorSubchannel); } - DicConsole.DebugWriteLine("Alcohol 120% plugin", "printing partition map"); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "printing partition map"); foreach(Partition partition in Partitions) { - DicConsole.DebugWriteLine("Alcohol 120% plugin", "Partition sequence: {0}", partition.Sequence); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition name: {0}", partition.Name); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition description: {0}", partition.Description); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition type: {0}", partition.Type); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition starting sector: {0}", partition.Start); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition sectors: {0}", partition.Length); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition starting offset: {0}", partition.Offset); - DicConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition size in bytes: {0}", partition.Size); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "Partition sequence: {0}", partition.Sequence); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition name: {0}", partition.Name); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition description: {0}", partition.Description); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition type: {0}", partition.Type); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition starting sector: {0}", partition.Start); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition sectors: {0}", partition.Length); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition starting offset: {0}", partition.Offset); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "\tPartition size in bytes: {0}", partition.Size); } imageInfo.Application = "Alcohol 120%"; - DicConsole.DebugWriteLine("Alcohol 120% plugin", "Data filename: {0}", alcFile); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "Data filename: {0}", alcFile); var filtersList = new FiltersList(); alcImage = filtersList.GetFilter(alcFile); @@ -629,7 +629,7 @@ namespace Aaru.DiscImages if(!isDvd) { - DicConsole.DebugWriteLine("Alcohol 120% plugin", "Rebuilding TOC"); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "Rebuilding TOC"); byte firstSession = byte.MaxValue; byte lastSession = 0; var tocMs = new MemoryStream(); @@ -674,7 +674,7 @@ namespace Aaru.DiscImages if(!decodedFullToc.HasValue) { - DicConsole.DebugWriteLine("Alcohol 120% plugin", "TOC not correctly rebuilt"); + AaruConsole.DebugWriteLine("Alcohol 120% plugin", "TOC not correctly rebuilt"); fullToc = null; } else @@ -689,10 +689,10 @@ namespace Aaru.DiscImages imageInfo.Sectors == 4246304) // Wxripper unlock imageInfo.MediaType = MediaType.XGD3; - DicConsole.VerboseWriteLine("Alcohol 120% image describes a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("Alcohol 120% image describes a disc of type {0}", imageInfo.MediaType); if(oldIncorrectImage) - DicConsole.WriteLine("Incorrect Alcohol 120% image created by an old version of Aaru. Convert image to correct it."); + AaruConsole.WriteLine("Incorrect Alcohol 120% image created by an old version of Aaru. Convert image to correct it."); return true; } diff --git a/Aaru.Images/Anex86/Identify.cs b/Aaru.Images/Anex86/Identify.cs index ea18fb46a..29f3a548a 100644 --- a/Aaru.Images/Anex86/Identify.cs +++ b/Aaru.Images/Anex86/Identify.cs @@ -51,14 +51,14 @@ namespace Aaru.DiscImages fdihdr = Marshal.SpanToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.unknown = {0}", fdihdr.unknown); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.hddtype = {0}", fdihdr.hddtype); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.hdrSize = {0}", fdihdr.hdrSize); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.dskSize = {0}", fdihdr.dskSize); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.bps = {0}", fdihdr.bps); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.spt = {0}", fdihdr.spt); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.heads = {0}", fdihdr.heads); - DicConsole.DebugWriteLine("Anex86 plugin", "fdihdr.cylinders = {0}", fdihdr.cylinders); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.unknown = {0}", fdihdr.unknown); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.hddtype = {0}", fdihdr.hddtype); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.hdrSize = {0}", fdihdr.hdrSize); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.dskSize = {0}", fdihdr.dskSize); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.bps = {0}", fdihdr.bps); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.spt = {0}", fdihdr.spt); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.heads = {0}", fdihdr.heads); + AaruConsole.DebugWriteLine("Anex86 plugin", "fdihdr.cylinders = {0}", fdihdr.cylinders); return stream.Length == fdihdr.hdrSize + fdihdr.dskSize && fdihdr.dskSize == fdihdr.bps * fdihdr.spt * fdihdr.heads * fdihdr.cylinders; diff --git a/Aaru.Images/Anex86/Read.cs b/Aaru.Images/Anex86/Read.cs index 9ae1b3d6a..9bf44cae9 100644 --- a/Aaru.Images/Anex86/Read.cs +++ b/Aaru.Images/Anex86/Read.cs @@ -59,7 +59,7 @@ namespace Aaru.DiscImages false)); if(imageInfo.MediaType == MediaType.Unknown) imageInfo.MediaType = MediaType.GENERIC_HDD; - DicConsole.DebugWriteLine("Anex86 plugin", "MediaType: {0}", imageInfo.MediaType); + AaruConsole.DebugWriteLine("Anex86 plugin", "MediaType: {0}", imageInfo.MediaType); imageInfo.ImageSize = (ulong)fdihdr.dskSize; imageInfo.CreationTime = imageFilter.GetCreationTime(); diff --git a/Aaru.Images/Apple2MG/Read.cs b/Aaru.Images/Apple2MG/Read.cs index 2121e3644..6464e4107 100644 --- a/Aaru.Images/Apple2MG/Read.cs +++ b/Aaru.Images/Apple2MG/Read.cs @@ -64,30 +64,30 @@ namespace Aaru.DiscImages if(imageHeader.DataSize == 0x00800C00) { imageHeader.DataSize = 0x000C8000; - DicConsole.DebugWriteLine("2MG plugin", "Detected incorrect endian on data size field, correcting."); + AaruConsole.DebugWriteLine("2MG plugin", "Detected incorrect endian on data size field, correcting."); } - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.magic = \"{0}\"", + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.magic = \"{0}\"", Encoding.ASCII.GetString(magic)); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.creator = \"{0}\"", + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.creator = \"{0}\"", Encoding.ASCII.GetString(creator)); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.headerSize = {0}", imageHeader.HeaderSize); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.version = {0}", imageHeader.Version); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.imageFormat = {0}", imageHeader.ImageFormat); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.flags = 0x{0:X8}", imageHeader.Flags); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.blocks = {0}", imageHeader.Blocks); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.dataOffset = 0x{0:X8}", imageHeader.DataOffset); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.dataSize = {0}", imageHeader.DataSize); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.commentOffset = 0x{0:X8}", imageHeader.CommentOffset); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.commentSize = {0}", imageHeader.CommentSize); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.creatorSpecificOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.headerSize = {0}", imageHeader.HeaderSize); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.version = {0}", imageHeader.Version); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.imageFormat = {0}", imageHeader.ImageFormat); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.flags = 0x{0:X8}", imageHeader.Flags); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.blocks = {0}", imageHeader.Blocks); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.dataOffset = 0x{0:X8}", imageHeader.DataOffset); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.dataSize = {0}", imageHeader.DataSize); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.commentOffset = 0x{0:X8}", imageHeader.CommentOffset); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.commentSize = {0}", imageHeader.CommentSize); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.creatorSpecificOffset = 0x{0:X8}", imageHeader.CreatorSpecificOffset); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.creatorSpecificSize = {0}", + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.creatorSpecificSize = {0}", imageHeader.CreatorSpecificSize); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved1 = 0x{0:X8}", imageHeader.Reserved1); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved2 = 0x{0:X8}", imageHeader.Reserved2); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved3 = 0x{0:X8}", imageHeader.Reserved3); - DicConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved4 = 0x{0:X8}", imageHeader.Reserved4); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved1 = 0x{0:X8}", imageHeader.Reserved1); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved2 = 0x{0:X8}", imageHeader.Reserved2); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved3 = 0x{0:X8}", imageHeader.Reserved3); + AaruConsole.DebugWriteLine("2MG plugin", "ImageHeader.reserved4 = 0x{0:X8}", imageHeader.Reserved4); if(imageHeader.DataSize == 0 && imageHeader.Blocks == 0 && imageHeader.ImageFormat != SectorOrder.ProDos) return false; @@ -211,9 +211,9 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("2MG image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("2MG image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("2MG comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("2MG comments: {0}", imageInfo.Comments); switch(imageInfo.MediaType) { diff --git a/Aaru.Images/AppleNIB/Read.cs b/Aaru.Images/AppleNIB/Read.cs index 2e0d66a52..0ced06f37 100644 --- a/Aaru.Images/AppleNIB/Read.cs +++ b/Aaru.Images/AppleNIB/Read.cs @@ -55,9 +55,9 @@ namespace Aaru.DiscImages byte[] buffer = new byte[stream.Length]; stream.Read(buffer, 0, buffer.Length); - DicConsole.DebugWriteLine("Apple NIB Plugin", "Decoding whole image"); + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Decoding whole image"); List tracks = Apple2.MarshalDisk(buffer); - DicConsole.DebugWriteLine("Apple NIB Plugin", "Got {0} tracks", tracks.Count); + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Got {0} tracks", tracks.Count); Dictionary rawSectors = new Dictionary(); @@ -87,7 +87,7 @@ namespace Aaru.DiscImages if(isDos) skewing = dosSkewing; - DicConsole.DebugWriteLine("Apple NIB Plugin", "Using {0}DOS skewing", + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Using {0}DOS skewing", skewing.SequenceEqual(dosSkewing) ? "" : "Pro"); } @@ -97,7 +97,7 @@ namespace Aaru.DiscImages { ulong sectorNo = (ulong)((((sector.addressField.sector[0] & 0x55) << 1) | (sector.addressField.sector[1] & 0x55)) & 0xFF); - DicConsole.DebugWriteLine("Apple NIB Plugin", + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Hardware sector {0} of track {1} goes to logical sector {2}", sectorNo, i, skewing[sectorNo] + (ulong)(i * spt)); rawSectors.Add(skewing[sectorNo] + (ulong)(i * spt), sector); @@ -109,9 +109,9 @@ namespace Aaru.DiscImages imageInfo.Sectors++; } - DicConsole.DebugWriteLine("Apple NIB Plugin", "Got {0} sectors", imageInfo.Sectors); + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Got {0} sectors", imageInfo.Sectors); - DicConsole.DebugWriteLine("Apple NIB Plugin", "Cooking sectors"); + AaruConsole.DebugWriteLine("Apple NIB Plugin", "Cooking sectors"); longSectors = new Dictionary(); cookedSectors = new Dictionary(); diff --git a/Aaru.Images/Apridisk/Read.cs b/Aaru.Images/Apridisk/Read.cs index 29e2e6009..4b22abe5e 100644 --- a/Aaru.Images/Apridisk/Read.cs +++ b/Aaru.Images/Apridisk/Read.cs @@ -68,24 +68,24 @@ namespace Aaru.DiscImages { // Deleted record, just skip it case RecordType.Deleted: - DicConsole.DebugWriteLine("Apridisk plugin", "Found deleted record at {0}", stream.Position); + AaruConsole.DebugWriteLine("Apridisk plugin", "Found deleted record at {0}", stream.Position); stream.Seek(record.headerSize - recordSize + record.dataSize, SeekOrigin.Current); break; case RecordType.Comment: - DicConsole.DebugWriteLine("Apridisk plugin", "Found comment record at {0}", stream.Position); + AaruConsole.DebugWriteLine("Apridisk plugin", "Found comment record at {0}", stream.Position); stream.Seek(record.headerSize - recordSize, SeekOrigin.Current); byte[] commentB = new byte[record.dataSize]; stream.Read(commentB, 0, commentB.Length); imageInfo.Comments = StringHandlers.CToString(commentB); - DicConsole.DebugWriteLine("Apridisk plugin", "Comment: \"{0}\"", imageInfo.Comments); + AaruConsole.DebugWriteLine("Apridisk plugin", "Comment: \"{0}\"", imageInfo.Comments); break; case RecordType.Creator: - DicConsole.DebugWriteLine("Apridisk plugin", "Found creator record at {0}", stream.Position); + AaruConsole.DebugWriteLine("Apridisk plugin", "Found creator record at {0}", stream.Position); stream.Seek(record.headerSize - recordSize, SeekOrigin.Current); byte[] creatorB = new byte[record.dataSize]; stream.Read(creatorB, 0, creatorB.Length); imageInfo.Creator = StringHandlers.CToString(creatorB); - DicConsole.DebugWriteLine("Apridisk plugin", "Creator: \"{0}\"", imageInfo.Creator); + AaruConsole.DebugWriteLine("Apridisk plugin", "Creator: \"{0}\"", imageInfo.Creator); break; case RecordType.Sector: if(record.compression != CompressType.Compressed && @@ -93,7 +93,7 @@ namespace Aaru.DiscImages throw new ImageNotSupportedException($"Found record with unknown compression type 0x{(ushort)record.compression:X4} at {stream.Position}"); - DicConsole.DebugWriteLine("Apridisk plugin", + AaruConsole.DebugWriteLine("Apridisk plugin", "Found {4} sector record at {0} for cylinder {1} head {2} sector {3}", stream.Position, record.cylinder, record.head, record.sector, record.compression == CompressType.Compressed @@ -125,7 +125,7 @@ namespace Aaru.DiscImages imageInfo.Cylinders = (ushort)totalCylinders; imageInfo.Heads = (byte)totalHeads; - DicConsole.DebugWriteLine("Apridisk plugin", + AaruConsole.DebugWriteLine("Apridisk plugin", "Found {0} cylinders and {1} heads with a maximum sector number of {2}", totalCylinders, totalHeads, maxSector); @@ -182,7 +182,7 @@ namespace Aaru.DiscImages } } - DicConsole.DebugWriteLine("Apridisk plugin", "Found a minimum of {0} bytes per sector", + AaruConsole.DebugWriteLine("Apridisk plugin", "Found a minimum of {0} bytes per sector", imageInfo.SectorSize); // Count sectors per track @@ -196,7 +196,7 @@ namespace Aaru.DiscImages imageInfo.SectorsPerTrack = spt; - DicConsole.DebugWriteLine("Apridisk plugin", "Found a minimum of {0} sectors per track", + AaruConsole.DebugWriteLine("Apridisk plugin", "Found a minimum of {0} sectors per track", imageInfo.SectorsPerTrack); imageInfo.MediaType = Geometry.GetMediaType(((ushort)imageInfo.Cylinders, (byte)imageInfo.Heads, diff --git a/Aaru.Images/BLU/Read.cs b/Aaru.Images/BLU/Read.cs index 0f75df528..191c082ad 100644 --- a/Aaru.Images/BLU/Read.cs +++ b/Aaru.Images/BLU/Read.cs @@ -56,11 +56,11 @@ namespace Aaru.DiscImages imageHeader.DeviceBlocks = BigEndianBitConverter.ToUInt32(header, 0x11) & 0x00FFFFFF; imageHeader.BytesPerBlock = BigEndianBitConverter.ToUInt16(header, 0x15); - DicConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceName = \"{0}\"", + AaruConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceName = \"{0}\"", StringHandlers.CToString(imageHeader.DeviceName)); - DicConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceType = {0}", imageHeader.DeviceType); - DicConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceBlock = {0}", imageHeader.DeviceBlocks); - DicConsole.DebugWriteLine("BLU plugin", "ImageHeader.bytesPerBlock = {0}", imageHeader.BytesPerBlock); + AaruConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceType = {0}", imageHeader.DeviceType); + AaruConsole.DebugWriteLine("BLU plugin", "ImageHeader.deviceBlock = {0}", imageHeader.DeviceBlocks); + AaruConsole.DebugWriteLine("BLU plugin", "ImageHeader.bytesPerBlock = {0}", imageHeader.BytesPerBlock); for(int i = 0; i < 0xD; i++) if(imageHeader.DeviceName[i] < 0x20) @@ -131,7 +131,7 @@ namespace Aaru.DiscImages if(bptag > 0) imageInfo.ReadableSectorTags.Add(SectorTagType.AppleSectorTag); - DicConsole.VerboseWriteLine("BLU image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("BLU image contains a disk of type {0}", imageInfo.MediaType); return true; } diff --git a/Aaru.Images/BlindWrite4/Read.cs b/Aaru.Images/BlindWrite4/Read.cs index 02b9e0abf..b09c43382 100644 --- a/Aaru.Images/BlindWrite4/Read.cs +++ b/Aaru.Images/BlindWrite4/Read.cs @@ -125,36 +125,36 @@ namespace Aaru.DiscImages stream.Read(tmpArray, 0, header.Unknown3); header.Unknown4 = tmpArray; - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.signature = {0}", + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.signature = {0}", StringHandlers.CToString(header.Signature)); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown1 = {0}", header.Unknown1); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.timestamp = {0}", header.Timestamp); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.volumeIdLength = {0}", header.VolumeIdLength); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.volumeIdentifier = {0}", header.VolumeIdentifier); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.sysIdLength = {0}", header.SysIdLength); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.systemIdentifier = {0}", header.SystemIdentifier); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.commentsLength = {0}", header.CommentsLength); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.comments = {0}", header.Comments); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.trackDescriptors = {0}", header.TrackDescriptors); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFileLength = {0}", header.DataFileLength); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFilter = {0}", header.DataFilter); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFile = {0}", header.DataFile); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown1 = {0}", header.Unknown1); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.timestamp = {0}", header.Timestamp); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.volumeIdLength = {0}", header.VolumeIdLength); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.volumeIdentifier = {0}", header.VolumeIdentifier); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.sysIdLength = {0}", header.SysIdLength); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.systemIdentifier = {0}", header.SystemIdentifier); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.commentsLength = {0}", header.CommentsLength); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.comments = {0}", header.Comments); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.trackDescriptors = {0}", header.TrackDescriptors); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFileLength = {0}", header.DataFileLength); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFilter = {0}", header.DataFilter); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.dataFile = {0}", header.DataFile); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFileLength = {0}", + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFileLength = {0}", header.SubchannelFileLength); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFilter = {0}", header.SubchannelFilter); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFile = {0}", header.SubchannelFile); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown2 = {0}", header.Unknown2); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown3 = {0}", header.Unknown3); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown4.Length = {0}", header.Unknown4.Length); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFilter = {0}", header.SubchannelFilter); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.subchannelFile = {0}", header.SubchannelFile); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown2 = {0}", header.Unknown2); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown3 = {0}", header.Unknown3); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "header.unknown4.Length = {0}", header.Unknown4.Length); bwTracks = new List(); for(int i = 0; i < header.TrackDescriptors; i++) { - DicConsole.DebugWriteLine("BlindWrite4 plugin", "stream.Position = {0}", stream.Position); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "stream.Position = {0}", stream.Position); var track = new Bw4TrackDescriptor(); @@ -317,68 +317,68 @@ namespace Aaru.DiscImages track.isrcBytes = tmpArray; track.isrcUpc = StringHandlers.CToString(track.isrcBytes, Encoding.Default); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.filenameLen = {0}", track.filenameLen); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.filename = {0}", track.filename); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.offset = {0}", track.offset); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.subchannel = {0}", track.subchannel); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.filenameLen = {0}", track.filenameLen); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.filename = {0}", track.filename); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.offset = {0}", track.offset); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.subchannel = {0}", track.subchannel); for(int j = 0; j < track.unknown1.Length; j++) - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown1[{1}] = 0x{0:X8}", track.unknown1[j], + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown1[{1}] = 0x{0:X8}", track.unknown1[j], j); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown2 = {0}", track.unknown2); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown3 = {0}", track.unknown3); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.session = {0}", track.session); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown4 = {0}", track.unknown4); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.adrCtl = {0}", track.adrCtl); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown5 = {0}", track.unknown5); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.trackMode = {0}", track.trackMode); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown6 = {0}", track.unknown6); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.point = {0}", track.point); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown7 = {0}", track.unknown7); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown8 = {0}", track.unknown8); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown9 = {0}", track.unknown9); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown10 = {0}", track.unknown10); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown11 = {0}", track.unknown11); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.lastSector = {0}", track.lastSector); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown12 = {0}", track.unknown12); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.pregap = {0}", track.pregap); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.startSector = {0}", track.startSector); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown2 = {0}", track.unknown2); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown3 = {0}", track.unknown3); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.session = {0}", track.session); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown4 = {0}", track.unknown4); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.adrCtl = {0}", track.adrCtl); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown5 = {0}", track.unknown5); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.trackMode = {0}", track.trackMode); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown6 = {0}", track.unknown6); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.point = {0}", track.point); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown7 = {0}", track.unknown7); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown8 = {0}", track.unknown8); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown9 = {0}", track.unknown9); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown10 = {0}", track.unknown10); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown11 = {0}", track.unknown11); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.lastSector = {0}", track.lastSector); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown12 = {0}", track.unknown12); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.pregap = {0}", track.pregap); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.startSector = {0}", track.startSector); for(int j = 0; j < track.unknown13.Length; j++) - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown13[{1}] = 0x{0:X8}", + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unknown13[{1}] = 0x{0:X8}", track.unknown13[j], j); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.titleLen = {0}", track.titleLen); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.title = {0}", track.title); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.performerLen = {0}", track.performerLen); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.performer = {0}", track.performer); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen1 = {0}", track.unkStrLen1); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString1 = {0}", track.unkString1); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen2 = {0}", track.unkStrLen2); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString2 = {0}", track.unkString2); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen3 = {0}", track.unkStrLen3); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString3 = {0}", track.unkString3); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen4 = {0}", track.unkStrLen4); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString4 = {0}", track.unkString4); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.discIdLen = {0}", track.discIdLen); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.discId = {0}", track.discId); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen5 = {0}", track.unkStrLen5); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString5 = {0}", track.unkString5); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen6 = {0}", track.unkStrLen6); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString6 = {0}", track.unkString6); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen7 = {0}", track.unkStrLen7); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString7 = {0}", track.unkString7); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen8 = {0}", track.unkStrLen8); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString8 = {0}", track.unkString8); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen9 = {0}", track.unkStrLen9); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString9 = {0}", track.unkString9); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen10 = {0}", track.unkStrLen10); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString10 = {0}", track.unkString10); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen11 = {0}", track.unkStrLen11); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString11 = {0}", track.unkString11); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.isrcLen = {0}", track.isrcLen); - DicConsole.DebugWriteLine("BlindWrite4 plugin", "track.isrcUpc = {0}", track.isrcUpc); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.titleLen = {0}", track.titleLen); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.title = {0}", track.title); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.performerLen = {0}", track.performerLen); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.performer = {0}", track.performer); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen1 = {0}", track.unkStrLen1); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString1 = {0}", track.unkString1); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen2 = {0}", track.unkStrLen2); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString2 = {0}", track.unkString2); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen3 = {0}", track.unkStrLen3); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString3 = {0}", track.unkString3); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen4 = {0}", track.unkStrLen4); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString4 = {0}", track.unkString4); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.discIdLen = {0}", track.discIdLen); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.discId = {0}", track.discId); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen5 = {0}", track.unkStrLen5); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString5 = {0}", track.unkString5); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen6 = {0}", track.unkStrLen6); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString6 = {0}", track.unkString6); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen7 = {0}", track.unkStrLen7); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString7 = {0}", track.unkString7); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen8 = {0}", track.unkStrLen8); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString8 = {0}", track.unkString8); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen9 = {0}", track.unkStrLen9); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString9 = {0}", track.unkString9); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen10 = {0}", track.unkStrLen10); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString10 = {0}", track.unkString10); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkStrLen11 = {0}", track.unkStrLen11); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.unkString11 = {0}", track.unkString11); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.isrcLen = {0}", track.isrcLen); + AaruConsole.DebugWriteLine("BlindWrite4 plugin", "track.isrcUpc = {0}", track.isrcUpc); bwTracks.Add(track); } @@ -792,10 +792,10 @@ namespace Aaru.DiscImages imageInfo.Comments = header.Comments; - DicConsole.VerboseWriteLine("BlindWrite image describes a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("BlindWrite image describes a disc of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("BlindrWrite comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("BlindrWrite comments: {0}", imageInfo.Comments); return true; } diff --git a/Aaru.Images/BlindWrite5/Read.cs b/Aaru.Images/BlindWrite5/Read.cs index 0a080c59f..11f26ad98 100644 --- a/Aaru.Images/BlindWrite5/Read.cs +++ b/Aaru.Images/BlindWrite5/Read.cs @@ -67,65 +67,65 @@ namespace Aaru.DiscImages stream.Read(hdr, 0, 260); header = Marshal.ByteArrayToStructureLittleEndian(hdr); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.signature = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.signature = {0}", StringHandlers.CToString(header.signature)); for(int i = 0; i < header.unknown1.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown1[{1}] = 0x{0:X8}", header.unknown1[i], + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown1[{1}] = 0x{0:X8}", header.unknown1[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.profile = {0}", header.profile); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.sessions = {0}", header.sessions); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.profile = {0}", header.profile); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.sessions = {0}", header.sessions); for(int i = 0; i < header.unknown2.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown2[{1}] = 0x{0:X8}", header.unknown2[i], + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown2[{1}] = 0x{0:X8}", header.unknown2[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.mcnIsValid = {0}", header.mcnIsValid); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.mcn = {0}", StringHandlers.CToString(header.mcn)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown3 = 0x{0:X4}", header.unknown3); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.mcnIsValid = {0}", header.mcnIsValid); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.mcn = {0}", StringHandlers.CToString(header.mcn)); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown3 = 0x{0:X4}", header.unknown3); for(int i = 0; i < header.unknown4.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown4[{1}] = 0x{0:X8}", header.unknown4[i], + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown4[{1}] = 0x{0:X8}", header.unknown4[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.pmaLen = {0}", header.pmaLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.atipLen = {0}", header.atipLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.cdtLen = {0}", header.cdtLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.cdInfoLen = {0}", header.cdInfoLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.bcaLen = {0}", header.bcaLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.pmaLen = {0}", header.pmaLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.atipLen = {0}", header.atipLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.cdtLen = {0}", header.cdtLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.cdInfoLen = {0}", header.cdInfoLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.bcaLen = {0}", header.bcaLen); for(int i = 0; i < header.unknown5.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown5[{1}] = 0x{0:X8}", header.unknown5[i], + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown5[{1}] = 0x{0:X8}", header.unknown5[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.dvdStrLen = {0}", header.dvdStrLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.dvdInfoLen = {0}", header.dvdInfoLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.dvdStrLen = {0}", header.dvdStrLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.dvdInfoLen = {0}", header.dvdInfoLen); for(int i = 0; i < header.unknown6.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown6[{1}] = 0x{0:X2}", header.unknown6[i], + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unknown6[{1}] = 0x{0:X2}", header.unknown6[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.manufacturer = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.manufacturer = {0}", StringHandlers.CToString(header.manufacturer)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.product = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.product = {0}", StringHandlers.CToString(header.product)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.revision = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.revision = {0}", StringHandlers.CToString(header.revision)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.vendor = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.vendor = {0}", StringHandlers.CToString(header.vendor)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.volumeId = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.volumeId = {0}", StringHandlers.CToString(header.volumeId)); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.mode2ALen = {0}", header.mode2ALen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.unkBlkLen = {0}", header.unkBlkLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.dataLen = {0}", header.dataLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.sessionsLen = {0}", header.sessionsLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "header.dpmLen = {0}", header.dpmLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.mode2ALen = {0}", header.mode2ALen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.unkBlkLen = {0}", header.unkBlkLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.dataLen = {0}", header.dataLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.sessionsLen = {0}", header.sessionsLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "header.dpmLen = {0}", header.dpmLen); mode2A = new byte[header.mode2ALen]; @@ -136,7 +136,7 @@ namespace Aaru.DiscImages var decoded2A = ModePage_2A.Decode(mode2A); if(!(decoded2A is null)) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "mode page 2A: {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "mode page 2A: {0}", Modes.PrettifyModePage_2A(decoded2A)); else mode2A = null; @@ -161,7 +161,7 @@ namespace Aaru.DiscImages PMA.CDPMA? decodedPma = PMA.Decode(pma); if(decodedPma.HasValue) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "PMA: {0}", PMA.Prettify(decodedPma)); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "PMA: {0}", PMA.Prettify(decodedPma)); else pma = null; } @@ -180,7 +180,7 @@ namespace Aaru.DiscImages ATIP.CDATIP? decodedAtip = ATIP.Decode(atip); if(decodedAtip.HasValue) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "ATIP: {0}", ATIP.Prettify(decodedAtip)); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "ATIP: {0}", ATIP.Prettify(decodedAtip)); else atip = null; } @@ -199,7 +199,7 @@ namespace Aaru.DiscImages CDTextOnLeadIn.CDText? decodedCdText = CDTextOnLeadIn.Decode(cdtext); if(decodedCdText.HasValue) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "CD-Text: {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "CD-Text: {0}", CDTextOnLeadIn.Prettify(decodedCdText)); else cdtext = null; @@ -231,7 +231,7 @@ namespace Aaru.DiscImages PFI.PhysicalFormatInformation? decodedPfi = PFI.Decode(pfi); if(decodedPfi.HasValue) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "PFI: {0}", PFI.Prettify(decodedPfi)); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "PFI: {0}", PFI.Prettify(decodedPfi)); else { pfi = null; @@ -263,7 +263,7 @@ namespace Aaru.DiscImages { stream.Read(discInformation, 0, discInformation.Length); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Disc information: {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Disc information: {0}", PrintHex.ByteArrayToHexArrayString(discInformation, 40)); } else @@ -279,7 +279,7 @@ namespace Aaru.DiscImages byte[] dataPathBytes = new byte[dataPathLen]; stream.Read(dataPathBytes, 0, dataPathBytes.Length); dataPath = Encoding.Unicode.GetString(dataPathBytes); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Data path: {0}", dataPath); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Data path: {0}", dataPath); dataFiles = new List(); @@ -318,24 +318,24 @@ namespace Aaru.DiscImages dataFile.Filename = Encoding.Unicode.GetString(dataFile.FilenameBytes); dataFiles.Add(dataFile); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.type = 0x{0:X8}", dataFile.Type); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.length = {0}", dataFile.Length); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.type = 0x{0:X8}", dataFile.Type); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.length = {0}", dataFile.Length); for(int i = 0; i < dataFile.Unknown1.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown1[{1}] = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown1[{1}] = {0}", dataFile.Unknown1[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.offset = {0}", dataFile.Offset); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.offset = {0}", dataFile.Offset); for(int i = 0; i < dataFile.Unknown2.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown2[{1}] = {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown2[{1}] = {0}", dataFile.Unknown2[i], i); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.startLba = {0}", dataFile.StartLba); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.sectors = {0}", dataFile.Sectors); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.filenameLen = {0}", dataFile.FilenameLen); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.filename = {0}", dataFile.Filename); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown3 = {0}", dataFile.Unknown3); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.startLba = {0}", dataFile.StartLba); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.sectors = {0}", dataFile.Sectors); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.filenameLen = {0}", dataFile.FilenameLen); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.filename = {0}", dataFile.Filename); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "dataFile.unknown3 = {0}", dataFile.Unknown3); } bwSessions = new List(); @@ -354,16 +354,16 @@ namespace Aaru.DiscImages session.LastTrack = BitConverter.ToUInt16(tmpArray, 14); session.Tracks = new Bw5TrackDescriptor[session.Entries]; - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].filename = {1}", ses, session.Sequence); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].entries = {1}", ses, session.Entries); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].unknown = {1}", ses, session.Unknown); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].start = {1}", ses, session.Start); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].end = {1}", ses, session.End); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].filename = {1}", ses, session.Sequence); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].entries = {1}", ses, session.Entries); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].unknown = {1}", ses, session.Unknown); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].start = {1}", ses, session.Start); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].end = {1}", ses, session.End); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].firstTrack = {1}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].firstTrack = {1}", ses, session.FirstTrack); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].lastTrack = {1}", ses, session.LastTrack); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].lastTrack = {1}", ses, session.LastTrack); for(int tSeq = 0; tSeq < session.Entries; tSeq++) { @@ -379,82 +379,82 @@ namespace Aaru.DiscImages stream.Seek(-8, SeekOrigin.Current); } - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].type = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].type = {2}", ses, tSeq, session.Tracks[tSeq].type); for(int i = 0; i < session.Tracks[tSeq].unknown1.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown1[{2}] = 0x{3:X2}", ses, tSeq, i, session.Tracks[tSeq].unknown1[i]); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown2 = 0x{2:X8}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown2 = 0x{2:X8}", ses, tSeq, session.Tracks[tSeq].unknown2); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].subchannel = {2}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].subchannel = {2}", ses, tSeq, session.Tracks[tSeq].subchannel); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown3 = 0x{2:X2}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown3 = 0x{2:X2}", ses, tSeq, session.Tracks[tSeq].unknown3); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].ctl = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].ctl = {2}", ses, tSeq, session.Tracks[tSeq].ctl); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].adr = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].adr = {2}", ses, tSeq, session.Tracks[tSeq].adr); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].point = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].point = {2}", ses, tSeq, session.Tracks[tSeq].point); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown4 = 0x{2:X2}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown4 = 0x{2:X2}", ses, tSeq, session.Tracks[tSeq].tno); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].min = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].min = {2}", ses, tSeq, session.Tracks[tSeq].min); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].sec = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].sec = {2}", ses, tSeq, session.Tracks[tSeq].sec); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].frame = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].frame = {2}", ses, tSeq, session.Tracks[tSeq].frame); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].zero = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].zero = {2}", ses, tSeq, session.Tracks[tSeq].zero); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pmin = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pmin = {2}", ses, tSeq, session.Tracks[tSeq].pmin); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].psec = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].psec = {2}", ses, tSeq, session.Tracks[tSeq].psec); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pframe = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pframe = {2}", ses, tSeq, session.Tracks[tSeq].pframe); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown5 = 0x{2:X2}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown5 = 0x{2:X2}", ses, tSeq, session.Tracks[tSeq].unknown5); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pregap = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].pregap = {2}", ses, tSeq, session.Tracks[tSeq].pregap); for(int i = 0; i < session.Tracks[tSeq].unknown6.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown6[{2}] = 0x{3:X8}", ses, tSeq, i, session.Tracks[tSeq].unknown6[i]); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].startLba = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].startLba = {2}", ses, tSeq, session.Tracks[tSeq].startLba); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].sectors = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].sectors = {2}", ses, tSeq, session.Tracks[tSeq].sectors); for(int i = 0; i < session.Tracks[tSeq].unknown7.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown7[{2}] = 0x{3:X8}", ses, tSeq, i, session.Tracks[tSeq].unknown7[i]); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].session = {2}", ses, tSeq, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].session = {2}", ses, tSeq, session.Tracks[tSeq].session); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown8 = 0x{2:X4}", ses, + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown8 = 0x{2:X4}", ses, tSeq, session.Tracks[tSeq].unknown8); if(session.Tracks[tSeq].type == Bw5TrackType.Dvd || @@ -463,7 +463,7 @@ namespace Aaru.DiscImages { for(int i = 0; i < session.Tracks[tSeq].unknown9.Length; i++) - DicConsole.DebugWriteLine("BlindWrite5 plugin", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "session[{0}].track[{1}].unknown9[{2}] = 0x{3:X8}", ses, tSeq, i, session.Tracks[tSeq].unknown9[i]); } @@ -483,9 +483,9 @@ namespace Aaru.DiscImages stream.Read(footer, 0, footer.Length); if(bw5Footer.SequenceEqual(footer)) - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Correctly arrived end of image"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Correctly arrived end of image"); else - DicConsole. + AaruConsole. ErrorWriteLine("BlindWrite5 image ends after expected position. Probably new version with different data. Errors may occur."); filePaths = new List(); @@ -603,7 +603,7 @@ namespace Aaru.DiscImages } else { - DicConsole.ErrorWriteLine("Cannot find data file {0}", dataFile.Filename); + AaruConsole.ErrorWriteLine("Cannot find data file {0}", dataFile.Filename); return false; } @@ -627,7 +627,7 @@ namespace Aaru.DiscImages break; default: - DicConsole.ErrorWriteLine("BlindWrite5 found unknown subchannel size: {0}", + AaruConsole.ErrorWriteLine("BlindWrite5 found unknown subchannel size: {0}", sectorSize - 2352); return false; @@ -660,7 +660,7 @@ namespace Aaru.DiscImages trackFlags = new Dictionary(); imageInfo.Sectors = 0; - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Building maps"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Building maps"); foreach(Bw5SessionDescriptor ses in bwSessions) { @@ -853,40 +853,40 @@ namespace Aaru.DiscImages } } - DicConsole.DebugWriteLine("BlindWrite5 plugin", "printing track map"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "printing track map"); foreach(Track track in Tracks) { - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Partition sequence: {0}", track.TrackSequence); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition description: {0}", track.TrackDescription); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition type: {0}", track.TrackType); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Partition sequence: {0}", track.TrackSequence); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition description: {0}", track.TrackDescription); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition type: {0}", track.TrackType); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting sector: {0}", + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting sector: {0}", track.TrackStartSector); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition ending sector: {0}", track.TrackEndSector); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition ending sector: {0}", track.TrackEndSector); } - DicConsole.DebugWriteLine("BlindWrite5 plugin", "printing partition map"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "printing partition map"); foreach(Partition partition in Partitions) { - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Partition sequence: {0}", partition.Sequence); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition name: {0}", partition.Name); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition description: {0}", partition.Description); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition type: {0}", partition.Type); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting sector: {0}", partition.Start); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition sectors: {0}", partition.Length); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting offset: {0}", partition.Offset); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition size in bytes: {0}", partition.Size); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Partition sequence: {0}", partition.Sequence); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition name: {0}", partition.Name); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition description: {0}", partition.Description); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition type: {0}", partition.Type); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting sector: {0}", partition.Start); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition sectors: {0}", partition.Length); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition starting offset: {0}", partition.Offset); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "\tPartition size in bytes: {0}", partition.Size); } if(!isDvd) { - DicConsole.DebugWriteLine("BlindWrite5 plugin", "Rebuilding TOC"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "Rebuilding TOC"); fullToc = fullTocStream.ToArray(); - DicConsole.DebugWriteLine("BlindWrite5 plugin", "TOC len {0}", fullToc.Length); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "TOC len {0}", fullToc.Length); byte[] fullTocSize = BitConverter.GetBytes((short)(fullToc.Length - 2)); fullToc[0] = fullTocSize[1]; @@ -898,11 +898,11 @@ namespace Aaru.DiscImages if(!decodedFullToc.HasValue) { - DicConsole.DebugWriteLine("BlindWrite5 plugin", "TOC not correctly rebuilt"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "TOC not correctly rebuilt"); fullToc = null; } else - DicConsole.DebugWriteLine("BlindWrite5 plugin", "TOC correctly rebuilt"); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "TOC correctly rebuilt"); imageInfo.ReadableSectorTags.Add(SectorTagType.CdTrackFlags); } @@ -1099,7 +1099,7 @@ namespace Aaru.DiscImages break; } - DicConsole.DebugWriteLine("BlindWrite5 plugin", "ImageInfo.mediaType = {0}", imageInfo.MediaType); + AaruConsole.DebugWriteLine("BlindWrite5 plugin", "ImageInfo.mediaType = {0}", imageInfo.MediaType); if(mode2A != null) imageInfo.ReadableMediaTags.Add(MediaTagType.SCSI_MODEPAGE_2A); @@ -1134,7 +1134,7 @@ namespace Aaru.DiscImages imageInfo.Sectors == 4246304) // Wxripper unlock imageInfo.MediaType = MediaType.XGD3; - DicConsole.VerboseWriteLine("BlindWrite image describes a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("BlindWrite image describes a disc of type {0}", imageInfo.MediaType); return true; } diff --git a/Aaru.Images/CDRDAO/Identify.cs b/Aaru.Images/CDRDAO/Identify.cs index 5ed0f1d0c..24e1a1e72 100644 --- a/Aaru.Images/CDRDAO/Identify.cs +++ b/Aaru.Images/CDRDAO/Identify.cs @@ -88,9 +88,9 @@ namespace Aaru.DiscImages } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", cdrdaoFilter.GetFilename()); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", cdrdaoFilter.GetFilename()); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } } diff --git a/Aaru.Images/CDRDAO/Read.cs b/Aaru.Images/CDRDAO/Read.cs index 94d6ee199..05e3baaaa 100644 --- a/Aaru.Images/CDRDAO/Read.cs +++ b/Aaru.Images/CDRDAO/Read.cs @@ -128,7 +128,7 @@ namespace Aaru.DiscImages if(!matchDiskType.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Not a CDRDAO TOC or TOC type not in line {0}.", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Not a CDRDAO TOC or TOC type not in line {0}.", lineNumber); return false; @@ -182,14 +182,14 @@ namespace Aaru.DiscImages if(matchComment.Groups["comment"].Value.StartsWith(" Track ", StringComparison.Ordinal)) continue; - DicConsole.DebugWriteLine("CDRDAO plugin", "Found comment \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found comment \"{1}\" at line {0}", lineNumber, matchComment.Groups["comment"].Value.Trim()); commentBuilder.AppendLine(matchComment.Groups["comment"].Value.Trim()); } else if(matchDiskType.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found {1} at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found {1} at line {0}", lineNumber, matchDiskType.Groups["type"].Value); discimage.Disktypestr = matchDiskType.Groups["type"].Value; @@ -220,7 +220,7 @@ namespace Aaru.DiscImages } else if(matchMcn.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found CATALOG \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found CATALOG \"{1}\" at line {0}", lineNumber, matchMcn.Groups["catalog"].Value); discimage.Mcn = matchMcn.Groups["catalog"].Value; @@ -228,11 +228,11 @@ namespace Aaru.DiscImages else if(matchTrack.Success) { if(matchTrack.Groups["subchan"].Value == "") - DicConsole.DebugWriteLine("CDRDAO plugin", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found TRACK type \"{1}\" with no subchannel at line {0}", lineNumber, matchTrack.Groups["type"].Value); else - DicConsole.DebugWriteLine("CDRDAO plugin", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found TRACK type \"{1}\" subchannel {2} at line {0}", lineNumber, matchTrack.Groups["type"].Value, matchTrack.Groups["subchan"].Value); @@ -307,28 +307,28 @@ namespace Aaru.DiscImages } else if(matchCopy.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found {1} COPY at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found {1} COPY at line {0}", lineNumber, matchCopy.Groups["no"].Value); currenttrack.FlagDcp |= intrack && matchCopy.Groups["no"].Value == ""; } else if(matchEmphasis.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found {1} PRE_EMPHASIS at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found {1} PRE_EMPHASIS at line {0}", lineNumber, matchEmphasis.Groups["no"].Value); currenttrack.FlagPre |= intrack && matchEmphasis.Groups["no"].Value == ""; } else if(matchStereo.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found {1}_CHANNEL_AUDIO at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found {1}_CHANNEL_AUDIO at line {0}", lineNumber, matchStereo.Groups["num"].Value); currenttrack.Flag_4Ch |= intrack && matchStereo.Groups["num"].Value == "FOUR"; } else if(matchIsrc.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found ISRC \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found ISRC \"{1}\" at line {0}", lineNumber, matchIsrc.Groups["isrc"].Value); if(intrack) @@ -336,7 +336,7 @@ namespace Aaru.DiscImages } else if(matchIndex.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found INDEX \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found INDEX \"{1}\" at line {0}", lineNumber, matchIndex.Groups["address"].Value); string[] lengthString = matchFile.Groups["length"].Value.Split(':'); @@ -349,7 +349,7 @@ namespace Aaru.DiscImages } else if(matchPregap.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found START \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found START \"{1}\" at line {0}", lineNumber, matchPregap.Groups["address"].Value); currenttrack.Indexes.Add(0, currenttrack.StartSector); @@ -367,7 +367,7 @@ namespace Aaru.DiscImages } else if(matchZeroPregap.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found PREGAP \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found PREGAP \"{1}\" at line {0}", lineNumber, matchZeroPregap.Groups["length"].Value); currenttrack.Indexes.Add(0, currenttrack.StartSector); @@ -377,10 +377,10 @@ namespace Aaru.DiscImages (ulong.Parse(lengthString[1]) * 75) + ulong.Parse(lengthString[2]); } else if(matchZeroData.Success) - DicConsole.DebugWriteLine("CDRDAO plugin", "Found ZERO \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found ZERO \"{1}\" at line {0}", lineNumber, matchZeroData.Groups["length"].Value); else if(matchZeroAudio.Success) - DicConsole.DebugWriteLine("CDRDAO plugin", "Found SILENCE \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found SILENCE \"{1}\" at line {0}", lineNumber, matchZeroAudio.Groups["length"].Value); else { @@ -388,7 +388,7 @@ namespace Aaru.DiscImages if(matchAudioFile.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found AUDIOFILE \"{1}\" at line {0}", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found AUDIOFILE \"{1}\" at line {0}", lineNumber, matchAudioFile.Groups["filename"].Value); filtersList = new FiltersList(); @@ -431,7 +431,7 @@ namespace Aaru.DiscImages } else if(matchFile.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found DATAFILE \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found DATAFILE \"{1}\" at line {0}", lineNumber, matchFile.Groups["filename"].Value); filtersList = new FiltersList(); @@ -462,7 +462,7 @@ namespace Aaru.DiscImages } else if(matchTitle.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found TITLE \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found TITLE \"{1}\" at line {0}", lineNumber, matchTitle.Groups["title"].Value); if(intrack) @@ -472,7 +472,7 @@ namespace Aaru.DiscImages } else if(matchPerformer.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found PERFORMER \"{1}\" at line {0}", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found PERFORMER \"{1}\" at line {0}", lineNumber, matchPerformer.Groups["performer"].Value); if(intrack) @@ -482,7 +482,7 @@ namespace Aaru.DiscImages } else if(matchSongwriter.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found SONGWRITER \"{1}\" at line {0}", + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found SONGWRITER \"{1}\" at line {0}", lineNumber, matchSongwriter.Groups["songwriter"].Value); if(intrack) @@ -492,7 +492,7 @@ namespace Aaru.DiscImages } else if(matchComposer.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found COMPOSER \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found COMPOSER \"{1}\" at line {0}", lineNumber, matchComposer.Groups["composer"].Value); if(intrack) @@ -502,7 +502,7 @@ namespace Aaru.DiscImages } else if(matchArranger.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found ARRANGER \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found ARRANGER \"{1}\" at line {0}", lineNumber, matchArranger.Groups["arranger"].Value); if(intrack) @@ -512,7 +512,7 @@ namespace Aaru.DiscImages } else if(matchMessage.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found MESSAGE \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found MESSAGE \"{1}\" at line {0}", lineNumber, matchMessage.Groups["message"].Value); if(intrack) @@ -522,7 +522,7 @@ namespace Aaru.DiscImages } else if(matchDiscId.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found DISC_ID \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found DISC_ID \"{1}\" at line {0}", lineNumber, matchDiscId.Groups["discid"].Value); if(!intrack) @@ -530,7 +530,7 @@ namespace Aaru.DiscImages } else if(matchUpc.Success) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Found UPC_EAN \"{1}\" at line {0}", lineNumber, + AaruConsole.DebugWriteLine("CDRDAO plugin", "Found UPC_EAN \"{1}\" at line {0}", lineNumber, matchUpc.Groups["catalog"].Value); if(!intrack) @@ -568,127 +568,127 @@ namespace Aaru.DiscImages discimage.Comment = commentBuilder.ToString(); // DEBUG information - DicConsole.DebugWriteLine("CDRDAO plugin", "Disc image parsing results"); - DicConsole.DebugWriteLine("CDRDAO plugin", "Disc CD-TEXT:"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Disc image parsing results"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Disc CD-TEXT:"); if(discimage.Arranger == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tArranger is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tArranger is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tArranger: {0}", discimage.Arranger); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tArranger: {0}", discimage.Arranger); if(discimage.Composer == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tComposer is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tComposer is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tComposer: {0}", discimage.Composer); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tComposer: {0}", discimage.Composer); if(discimage.Performer == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPerformer is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPerformer is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPerformer: {0}", discimage.Performer); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPerformer: {0}", discimage.Performer); if(discimage.Songwriter == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tSongwriter is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tSongwriter is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tSongwriter: {0}", discimage.Songwriter); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tSongwriter: {0}", discimage.Songwriter); if(discimage.Title == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tTitle is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tTitle is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tTitle: {0}", discimage.Title); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tTitle: {0}", discimage.Title); - DicConsole.DebugWriteLine("CDRDAO plugin", "Disc information:"); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tGuessed disk type: {0}", discimage.Disktype); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Disc information:"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tGuessed disk type: {0}", discimage.Disktype); if(discimage.Barcode == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tBarcode not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tBarcode not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tBarcode: {0}", discimage.Barcode); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tBarcode: {0}", discimage.Barcode); if(discimage.DiskId == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tDisc ID not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tDisc ID not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tDisc ID: {0}", discimage.DiskId); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tDisc ID: {0}", discimage.DiskId); if(discimage.Mcn == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tMCN not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tMCN not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tMCN: {0}", discimage.Mcn); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tMCN: {0}", discimage.Mcn); if(string.IsNullOrEmpty(discimage.Comment)) - DicConsole.DebugWriteLine("CDRDAO plugin", "\tComment not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tComment not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\tComment: \"{0}\"", discimage.Comment); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tComment: \"{0}\"", discimage.Comment); - DicConsole.DebugWriteLine("CDRDAO plugin", "Track information:"); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tDisc contains {0} tracks", discimage.Tracks.Count); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Track information:"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tDisc contains {0} tracks", discimage.Tracks.Count); for(int i = 0; i < discimage.Tracks.Count; i++) { - DicConsole.DebugWriteLine("CDRDAO plugin", "\tTrack {0} information:", + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tTrack {0} information:", discimage.Tracks[i].Sequence); - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\t{0} bytes per sector", discimage.Tracks[i].Bps); - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tPregap: {0} sectors", discimage.Tracks[i].Pregap); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\t{0} bytes per sector", discimage.Tracks[i].Bps); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tPregap: {0} sectors", discimage.Tracks[i].Pregap); - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tData: {0} sectors starting at sector {1}", + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tData: {0} sectors starting at sector {1}", discimage.Tracks[i].Sectors, discimage.Tracks[i].StartSector); - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tPostgap: {0} sectors", discimage.Tracks[i].Postgap); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tPostgap: {0} sectors", discimage.Tracks[i].Postgap); if(discimage.Tracks[i].Flag_4Ch) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack is flagged as quadraphonic"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack is flagged as quadraphonic"); if(discimage.Tracks[i].FlagDcp) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack allows digital copy"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack allows digital copy"); if(discimage.Tracks[i].FlagPre) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack has pre-emphasis applied"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack has pre-emphasis applied"); - DicConsole.DebugWriteLine("CDRDAO plugin", + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTrack resides in file {0}, type defined as {1}, starting at byte {2}", discimage.Tracks[i].Trackfile.Datafilter.GetFilename(), discimage.Tracks[i].Trackfile.Filetype, discimage.Tracks[i].Trackfile.Offset); - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tIndexes:"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tIndexes:"); foreach(KeyValuePair kvp in discimage.Tracks[i].Indexes) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\t\tIndex {0} starts at sector {1}", kvp.Key, + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\t\tIndex {0} starts at sector {1}", kvp.Key, kvp.Value); if(discimage.Tracks[i].Isrc == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tISRC is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tISRC is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tISRC: {0}", discimage.Tracks[i].Isrc); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tISRC: {0}", discimage.Tracks[i].Isrc); if(discimage.Tracks[i].Arranger == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tArranger is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tArranger is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tArranger: {0}", discimage.Tracks[i].Arranger); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tArranger: {0}", discimage.Tracks[i].Arranger); if(discimage.Tracks[i].Composer == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tComposer is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tComposer is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tComposer: {0}", discimage.Tracks[i].Composer); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tComposer: {0}", discimage.Tracks[i].Composer); if(discimage.Tracks[i].Performer == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tPerformer is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tPerformer is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tPerformer: {0}", discimage.Tracks[i].Performer); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tPerformer: {0}", discimage.Tracks[i].Performer); if(discimage.Tracks[i].Songwriter == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tSongwriter is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tSongwriter is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tSongwriter: {0}", + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tSongwriter: {0}", discimage.Tracks[i].Songwriter); if(discimage.Tracks[i].Title == null) - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tTitle is not set."); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTitle is not set."); else - DicConsole.DebugWriteLine("CDRDAO plugin", "\t\tTitle: {0}", discimage.Tracks[i].Title); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\t\tTitle: {0}", discimage.Tracks[i].Title); } - DicConsole.DebugWriteLine("CDRDAO plugin", "Building offset map"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Building offset map"); Partitions = new List(); offsetmap = new Dictionary(); @@ -734,18 +734,18 @@ namespace Aaru.DiscImages } // Print partition map - DicConsole.DebugWriteLine("CDRDAO plugin", "printing partition map"); + AaruConsole.DebugWriteLine("CDRDAO plugin", "printing partition map"); foreach(Partition partition in Partitions) { - DicConsole.DebugWriteLine("CDRDAO plugin", "Partition sequence: {0}", partition.Sequence); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition name: {0}", partition.Name); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition description: {0}", partition.Description); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition type: {0}", partition.Type); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition starting sector: {0}", partition.Start); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition sectors: {0}", partition.Length); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition starting offset: {0}", partition.Offset); - DicConsole.DebugWriteLine("CDRDAO plugin", "\tPartition size in bytes: {0}", partition.Size); + AaruConsole.DebugWriteLine("CDRDAO plugin", "Partition sequence: {0}", partition.Sequence); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition name: {0}", partition.Name); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition description: {0}", partition.Description); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition type: {0}", partition.Type); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition starting sector: {0}", partition.Start); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition sectors: {0}", partition.Length); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition starting offset: {0}", partition.Offset); + AaruConsole.DebugWriteLine("CDRDAO plugin", "\tPartition size in bytes: {0}", partition.Size); } foreach(CdrdaoTrack track in discimage.Tracks) @@ -852,18 +852,18 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.OpticalDisc; - DicConsole.VerboseWriteLine("CDRDAO image describes a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("CDRDAO image describes a disc of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("CDRDAO comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("CDRDAO comments: {0}", imageInfo.Comments); return true; } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } diff --git a/Aaru.Images/CDRWin/Identify.cs b/Aaru.Images/CDRWin/Identify.cs index 95ae082fc..8452c5cef 100644 --- a/Aaru.Images/CDRWin/Identify.cs +++ b/Aaru.Images/CDRWin/Identify.cs @@ -103,9 +103,9 @@ namespace Aaru.DiscImages } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", _cdrwinFilter); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", _cdrwinFilter); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } diff --git a/Aaru.Images/CDRWin/Read.cs b/Aaru.Images/CDRWin/Read.cs index e08ee6847..d96ab0807 100644 --- a/Aaru.Images/CDRWin/Read.cs +++ b/Aaru.Images/CDRWin/Read.cs @@ -179,7 +179,7 @@ namespace Aaru.DiscImages if(matchTruripDiscCrc32.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM CRC32 at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM CRC32 at line {0}", lineNumber); _discImage.DiscHashes.Add("crc32", matchTruripDiscCrc32.Groups[1].Value.ToLowerInvariant()); continue; @@ -187,7 +187,7 @@ namespace Aaru.DiscImages if(matchTruripDiscMd5.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM MD5 at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM MD5 at line {0}", lineNumber); _discImage.DiscHashes.Add("md5", matchTruripDiscMd5.Groups[1].Value.ToLowerInvariant()); continue; @@ -195,7 +195,7 @@ namespace Aaru.DiscImages if(matchTruripDiscSha1.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM SHA1 at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM SHA1 at line {0}", lineNumber); _discImage.DiscHashes.Add("sha1", matchTruripDiscSha1.Groups[1].Value.ToLowerInvariant()); continue; @@ -210,7 +210,7 @@ namespace Aaru.DiscImages if(matchTruripTrackCrc32.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", lineNumber, matchTruripTrackCrc32.Groups[1].Value == "Trk" ? "track" : "gap", matchTruripTrackCrc32.Groups[2].Value); @@ -220,7 +220,7 @@ namespace Aaru.DiscImages if(matchTruripTrackMd5.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", lineNumber, matchTruripTrackMd5.Groups[1].Value == "Trk" ? "track" : "gap", matchTruripTrackMd5.Groups[2].Value); @@ -230,7 +230,7 @@ namespace Aaru.DiscImages if(matchTruripTrackSha1.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found CRC32 for {1} {2} at line {0}", lineNumber, matchTruripTrackSha1.Groups[1].Value == "Trk" ? "track" : "gap", matchTruripTrackSha1.Groups[2].Value); @@ -240,7 +240,7 @@ namespace Aaru.DiscImages if(matchTruripTrackUnknownHash.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found unknown hash for {1} {2} at line {0}. Please report this disc image.", lineNumber, matchTruripTrackUnknownHash.Groups[1].Value == "Trk" ? "track" @@ -258,7 +258,7 @@ namespace Aaru.DiscImages ulong.TryParse(matchDumpExtent.Groups["start"].Value, out ulong extentStart) && ulong.TryParse(matchDumpExtent.Groups["end"].Value, out ulong extentEnd)) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM METADATA DUMP EXTENT at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM METADATA DUMP EXTENT at line {0}", lineNumber); if(DumpHardware is null) @@ -314,7 +314,7 @@ namespace Aaru.DiscImages else if(matchDicMediaType.Success && !inTrack) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM METADATA DIC MEDIA-TYPE at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM METADATA DIC MEDIA-TYPE at line {0}", lineNumber); _discImage.DicMediaType = matchDicMediaType.Groups[1].Value; @@ -322,43 +322,43 @@ namespace Aaru.DiscImages else if(matchDiskType.Success && !inTrack) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM ORIGINAL MEDIA TYPE at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM ORIGINAL MEDIA TYPE at line {0}", lineNumber); _discImage.OriginalMediaType = matchDiskType.Groups[1].Value; } else if(matchSession.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM SESSION at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM SESSION at line {0}", lineNumber); currentSession = byte.Parse(matchSession.Groups[1].Value); // What happens between sessions } else if(matchLba.Success) - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM MSF at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM MSF at line {0}", lineNumber); else if(matchLeadOut.Success) - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM LEAD-OUT at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM LEAD-OUT at line {0}", lineNumber); else if(matchApplication.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM Ripping Tool at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM Ripping Tool at line {0}", lineNumber); _imageInfo.Application = matchApplication.Groups[1].Value; } else if(matchApplicationVersion.Success && !inTrack) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM Ripping Tool Version at line {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM Ripping Tool Version at line {0}", lineNumber); _imageInfo.ApplicationVersion = matchApplicationVersion.Groups[1].Value; } else if(matchTruripDisc.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM DISC HASHES at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM DISC HASHES at line {0}", lineNumber); inTruripDiscHash = true; } else if(matchTruripTrack.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM Gap Append Method: {1} [{2}] HASHES at line {0}", lineNumber, matchTruripTrack.Groups[1].Value, matchTruripTrack.Groups[2].Value); @@ -368,7 +368,7 @@ namespace Aaru.DiscImages } else if(matchComment.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found REM at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found REM at line {0}", lineNumber); if(_discImage.Comment == "") _discImage.Comment = matchComment.Groups[1].Value; // First comment @@ -398,7 +398,7 @@ namespace Aaru.DiscImages if(matchArranger.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found ARRANGER at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found ARRANGER at line {0}", lineNumber); if(inTrack) currentTrack.Arranger = matchArranger.Groups[1].Value; @@ -407,7 +407,7 @@ namespace Aaru.DiscImages } else if(matchBarCode.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found UPC_EAN at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found UPC_EAN at line {0}", lineNumber); if(!inTrack) _discImage.Barcode = matchBarCode.Groups[1].Value; @@ -417,7 +417,7 @@ namespace Aaru.DiscImages } else if(matchCdText.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found CDTEXTFILE at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found CDTEXTFILE at line {0}", lineNumber); if(!inTrack) _discImage.CdTextFile = matchCdText.Groups[1].Value; @@ -427,7 +427,7 @@ namespace Aaru.DiscImages } else if(matchComposer.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found COMPOSER at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found COMPOSER at line {0}", lineNumber); if(inTrack) currentTrack.Composer = matchComposer.Groups[1].Value; @@ -436,7 +436,7 @@ namespace Aaru.DiscImages } else if(matchDiskId.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found DISC_ID at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found DISC_ID at line {0}", lineNumber); if(!inTrack) _discImage.DiscId = matchDiskId.Groups[1].Value; @@ -446,7 +446,7 @@ namespace Aaru.DiscImages } else if(matchFile.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found FILE at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found FILE at line {0}", lineNumber); if(currentTrack.Sequence != 0) { @@ -543,7 +543,7 @@ namespace Aaru.DiscImages } // File does exist, process it - DicConsole.DebugWriteLine("CDRWin plugin", "File \"{0}\" found", + AaruConsole.DebugWriteLine("CDRWin plugin", "File \"{0}\" found", currentFile.DataFilter.GetFilename()); switch(currentFile.FileType) @@ -565,7 +565,7 @@ namespace Aaru.DiscImages } else if(matchFlags.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found FLAGS at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found FLAGS at line {0}", lineNumber); if(!inTrack) throw new @@ -578,7 +578,7 @@ namespace Aaru.DiscImages } else if(matchGenre.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found GENRE at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found GENRE at line {0}", lineNumber); if(inTrack) currentTrack.Genre = matchGenre.Groups[1].Value; @@ -587,7 +587,7 @@ namespace Aaru.DiscImages } else if(matchIndex.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found INDEX at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found INDEX at line {0}", lineNumber); if(!inTrack) throw new FeatureUnsupportedImageException($"Found INDEX before a track {lineNumber}"); @@ -612,14 +612,14 @@ namespace Aaru.DiscImages cueTracks[currentTrack.Sequence - 2].Sectors * cueTracks[currentTrack.Sequence - 2].Bps; - DicConsole.DebugWriteLine("CDRWin plugin", "Sets currentFile.offset to {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Sets currentFile.offset to {0}", currentFile.Offset); - DicConsole.DebugWriteLine("CDRWin plugin", + AaruConsole.DebugWriteLine("CDRWin plugin", "cueTracks[currentTrack.sequence-2].sectors = {0}", cueTracks[currentTrack.Sequence - 2].Sectors); - DicConsole.DebugWriteLine("CDRWin plugin", + AaruConsole.DebugWriteLine("CDRWin plugin", "cueTracks[currentTrack.sequence-2].bps = {0}", cueTracks[currentTrack.Sequence - 2].Bps); } @@ -627,7 +627,7 @@ namespace Aaru.DiscImages if((index == 0 || (index == 1 && !currentTrack.Indexes.ContainsKey(0))) && currentTrack.Sequence == 1) { - DicConsole.DebugWriteLine("CDRWin plugin", "Sets currentFile.offset to {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Sets currentFile.offset to {0}", offset * currentTrack.Bps); currentFile.Offset = offset * currentTrack.Bps; @@ -638,7 +638,7 @@ namespace Aaru.DiscImages } else if(matchIsrc.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found ISRC at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found ISRC at line {0}", lineNumber); if(!inTrack) throw new FeatureUnsupportedImageException($"Found ISRC before a track {lineNumber}"); @@ -647,7 +647,7 @@ namespace Aaru.DiscImages } else if(matchMcn.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found CATALOG at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found CATALOG at line {0}", lineNumber); if(!inTrack) _discImage.Mcn = matchMcn.Groups[1].Value; @@ -657,7 +657,7 @@ namespace Aaru.DiscImages } else if(matchPerformer.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found PERFORMER at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found PERFORMER at line {0}", lineNumber); if(inTrack) currentTrack.Performer = matchPerformer.Groups[1].Value; @@ -666,7 +666,7 @@ namespace Aaru.DiscImages } else if(matchPostgap.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found POSTGAP at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found POSTGAP at line {0}", lineNumber); if(inTrack) currentTrack.Postgap = CdrWinMsfToLba(matchPostgap.Groups[1].Value); @@ -676,7 +676,7 @@ namespace Aaru.DiscImages } else if(matchPregap.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found PREGAP at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found PREGAP at line {0}", lineNumber); if(inTrack) currentTrack.Pregap = CdrWinMsfToLba(matchPregap.Groups[1].Value); @@ -686,7 +686,7 @@ namespace Aaru.DiscImages } else if(matchSongWriter.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found SONGWRITER at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found SONGWRITER at line {0}", lineNumber); if(inTrack) currentTrack.Songwriter = matchSongWriter.Groups[1].Value; @@ -695,7 +695,7 @@ namespace Aaru.DiscImages } else if(matchTitle.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found TITLE at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found TITLE at line {0}", lineNumber); if(inTrack) currentTrack.Title = matchTitle.Groups[1].Value; @@ -704,7 +704,7 @@ namespace Aaru.DiscImages } else if(matchTrack.Success) { - DicConsole.DebugWriteLine("CDRWin plugin", "Found TRACK at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found TRACK at line {0}", lineNumber); if(currentFile.DataFilter == null) throw new @@ -727,7 +727,7 @@ namespace Aaru.DiscImages Sequence = uint.Parse(matchTrack.Groups[1].Value) }; - DicConsole.DebugWriteLine("CDRWin plugin", "Setting currentTrack.sequence to {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "Setting currentTrack.sequence to {0}", currentTrack.Sequence); currentFile.Sequence = currentTrack.Sequence; @@ -869,172 +869,172 @@ namespace Aaru.DiscImages } // DEBUG information - DicConsole.DebugWriteLine("CDRWin plugin", "Disc image parsing results"); - DicConsole.DebugWriteLine("CDRWin plugin", "Disc CD-TEXT:"); + AaruConsole.DebugWriteLine("CDRWin plugin", "Disc image parsing results"); + AaruConsole.DebugWriteLine("CDRWin plugin", "Disc CD-TEXT:"); if(_discImage.Arranger == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tArranger is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tArranger is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tArranger: {0}", _discImage.Arranger); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tArranger: {0}", _discImage.Arranger); if(_discImage.Composer == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tComposer is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tComposer is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tComposer: {0}", _discImage.Composer); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tComposer: {0}", _discImage.Composer); if(_discImage.Genre == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tGenre is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tGenre is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tGenre: {0}", _discImage.Genre); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tGenre: {0}", _discImage.Genre); if(_discImage.Performer == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tPerformer is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPerformer is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tPerformer: {0}", _discImage.Performer); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPerformer: {0}", _discImage.Performer); if(_discImage.Songwriter == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tSongwriter is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tSongwriter is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tSongwriter: {0}", _discImage.Songwriter); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tSongwriter: {0}", _discImage.Songwriter); if(_discImage.Title == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tTitle is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tTitle is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tTitle: {0}", _discImage.Title); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tTitle: {0}", _discImage.Title); if(_discImage.CdTextFile == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tCD-TEXT binary file not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tCD-TEXT binary file not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tCD-TEXT binary file: {0}", _discImage.CdTextFile); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tCD-TEXT binary file: {0}", _discImage.CdTextFile); - DicConsole.DebugWriteLine("CDRWin plugin", "Disc information:"); + AaruConsole.DebugWriteLine("CDRWin plugin", "Disc information:"); if(_discImage.OriginalMediaType == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tISOBuster disc type not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tISOBuster disc type not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tISOBuster disc type: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\tISOBuster disc type: {0}", _discImage.OriginalMediaType); - DicConsole.DebugWriteLine("CDRWin plugin", "\tGuessed disk type: {0}", _discImage.MediaType); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tGuessed disk type: {0}", _discImage.MediaType); if(_discImage.Barcode == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tBarcode not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tBarcode not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tBarcode: {0}", _discImage.Barcode); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tBarcode: {0}", _discImage.Barcode); if(_discImage.DiscId == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tDisc ID not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tDisc ID not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tDisc ID: {0}", _discImage.DiscId); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tDisc ID: {0}", _discImage.DiscId); if(_discImage.Mcn == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tMCN not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tMCN not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tMCN: {0}", _discImage.Mcn); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tMCN: {0}", _discImage.Mcn); if(_discImage.Comment == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\tComment not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tComment not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\tComment: \"{0}\"", _discImage.Comment); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tComment: \"{0}\"", _discImage.Comment); - DicConsole.DebugWriteLine("CDRWin plugin", "Session information:"); - DicConsole.DebugWriteLine("CDRWin plugin", "\tDisc contains {0} sessions", _discImage.Sessions.Count); + AaruConsole.DebugWriteLine("CDRWin plugin", "Session information:"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tDisc contains {0} sessions", _discImage.Sessions.Count); for(int i = 0; i < _discImage.Sessions.Count; i++) { - DicConsole.DebugWriteLine("CDRWin plugin", "\tSession {0} information:", i + 1); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tSession {0} information:", i + 1); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tStarting track: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tStarting track: {0}", _discImage.Sessions[i].StartTrack); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tStarting sector: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tStarting sector: {0}", _discImage.Sessions[i].StartSector); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tEnding track: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tEnding track: {0}", _discImage.Sessions[i].EndTrack); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tEnding sector: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tEnding sector: {0}", _discImage.Sessions[i].EndSector); } - DicConsole.DebugWriteLine("CDRWin plugin", "Track information:"); - DicConsole.DebugWriteLine("CDRWin plugin", "\tDisc contains {0} tracks", _discImage.Tracks.Count); + AaruConsole.DebugWriteLine("CDRWin plugin", "Track information:"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tDisc contains {0} tracks", _discImage.Tracks.Count); for(int i = 0; i < _discImage.Tracks.Count; i++) { - DicConsole.DebugWriteLine("CDRWin plugin", "\tTrack {0} information:", + AaruConsole.DebugWriteLine("CDRWin plugin", "\tTrack {0} information:", _discImage.Tracks[i].Sequence); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\t{0} bytes per sector", _discImage.Tracks[i].Bps); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tPregap: {0} sectors", _discImage.Tracks[i].Pregap); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tData: {0} sectors", _discImage.Tracks[i].Sectors); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\t{0} bytes per sector", _discImage.Tracks[i].Bps); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tPregap: {0} sectors", _discImage.Tracks[i].Pregap); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tData: {0} sectors", _discImage.Tracks[i].Sectors); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tPostgap: {0} sectors", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tPostgap: {0} sectors", _discImage.Tracks[i].Postgap); if(_discImage.Tracks[i].Flag4ch) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack is flagged as quadraphonic"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack is flagged as quadraphonic"); if(_discImage.Tracks[i].FlagDcp) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack allows digital copy"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack allows digital copy"); if(_discImage.Tracks[i].FlagPre) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack has pre-emphasis applied"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack has pre-emphasis applied"); if(_discImage.Tracks[i].FlagScms) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack has SCMS"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack has SCMS"); - DicConsole.DebugWriteLine("CDRWin plugin", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTrack resides in file {0}, type defined as {1}, starting at byte {2}", _discImage.Tracks[i].TrackFile.DataFilter.GetFilename(), _discImage.Tracks[i].TrackFile.FileType, _discImage.Tracks[i].TrackFile.Offset); - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tIndexes:"); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tIndexes:"); foreach(KeyValuePair kvp in _discImage.Tracks[i].Indexes) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\t\tIndex {0} starts at sector {1}", kvp.Key, + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\t\tIndex {0} starts at sector {1}", kvp.Key, kvp.Value); if(_discImage.Tracks[i].Isrc == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tISRC is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tISRC is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tISRC: {0}", _discImage.Tracks[i].Isrc); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tISRC: {0}", _discImage.Tracks[i].Isrc); if(_discImage.Tracks[i].Arranger == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tArranger is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tArranger is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tArranger: {0}", _discImage.Tracks[i].Arranger); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tArranger: {0}", _discImage.Tracks[i].Arranger); if(_discImage.Tracks[i].Composer == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tComposer is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tComposer is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tComposer: {0}", _discImage.Tracks[i].Composer); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tComposer: {0}", _discImage.Tracks[i].Composer); if(_discImage.Tracks[i].Genre == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tGenre is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tGenre is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tGenre: {0}", _discImage.Tracks[i].Genre); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tGenre: {0}", _discImage.Tracks[i].Genre); if(_discImage.Tracks[i].Performer == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tPerformer is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tPerformer is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tPerformer: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tPerformer: {0}", _discImage.Tracks[i].Performer); if(_discImage.Tracks[i].Songwriter == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tSongwriter is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tSongwriter is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tSongwriter: {0}", + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tSongwriter: {0}", _discImage.Tracks[i].Songwriter); if(_discImage.Tracks[i].Title == null) - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTitle is not set."); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTitle is not set."); else - DicConsole.DebugWriteLine("CDRWin plugin", "\t\tTitle: {0}", _discImage.Tracks[i].Title); + AaruConsole.DebugWriteLine("CDRWin plugin", "\t\tTitle: {0}", _discImage.Tracks[i].Title); } - DicConsole.DebugWriteLine("CDRWin plugin", "Building offset map"); + AaruConsole.DebugWriteLine("CDRWin plugin", "Building offset map"); Partitions = new List(); @@ -1086,18 +1086,18 @@ namespace Aaru.DiscImages } // Print offset map - DicConsole.DebugWriteLine("CDRWin plugin", "printing partition map"); + AaruConsole.DebugWriteLine("CDRWin plugin", "printing partition map"); foreach(Partition partition in Partitions) { - DicConsole.DebugWriteLine("CDRWin plugin", "Partition sequence: {0}", partition.Sequence); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition name: {0}", partition.Name); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition description: {0}", partition.Description); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition type: {0}", partition.Type); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition starting sector: {0}", partition.Start); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition sectors: {0}", partition.Length); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition starting offset: {0}", partition.Offset); - DicConsole.DebugWriteLine("CDRWin plugin", "\tPartition size in bytes: {0}", partition.Size); + AaruConsole.DebugWriteLine("CDRWin plugin", "Partition sequence: {0}", partition.Sequence); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition name: {0}", partition.Name); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition description: {0}", partition.Description); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition type: {0}", partition.Type); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition starting sector: {0}", partition.Start); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition sectors: {0}", partition.Length); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition starting offset: {0}", partition.Offset); + AaruConsole.DebugWriteLine("CDRWin plugin", "\tPartition size in bytes: {0}", partition.Size); } foreach(CdrWinTrack track in _discImage.Tracks) @@ -1224,18 +1224,18 @@ namespace Aaru.DiscImages _imageInfo.XmlMediaType = XmlMediaType.OpticalDisc; - DicConsole.VerboseWriteLine("CDRWIN image describes a disc of type {0}", _imageInfo.MediaType); + AaruConsole.VerboseWriteLine("CDRWIN image describes a disc of type {0}", _imageInfo.MediaType); if(!string.IsNullOrEmpty(_imageInfo.Comments)) - DicConsole.VerboseWriteLine("CDRWIN comments: {0}", _imageInfo.Comments); + AaruConsole.VerboseWriteLine("CDRWIN comments: {0}", _imageInfo.Comments); return true; } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetFilename()); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetFilename()); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } diff --git a/Aaru.Images/CDRWin/Verify.cs b/Aaru.Images/CDRWin/Verify.cs index e6d3376cb..92fced77f 100644 --- a/Aaru.Images/CDRWin/Verify.cs +++ b/Aaru.Images/CDRWin/Verify.cs @@ -78,8 +78,8 @@ namespace Aaru.DiscImages } string verifySha1 = ctx.End(); - DicConsole.DebugWriteLine("CDRWin plugin", "Calculated SHA1: {0}", verifySha1); - DicConsole.DebugWriteLine("CDRWin plugin", "Expected SHA1: {0}", sha1); + AaruConsole.DebugWriteLine("CDRWin plugin", "Calculated SHA1: {0}", verifySha1); + AaruConsole.DebugWriteLine("CDRWin plugin", "Expected SHA1: {0}", sha1); return verifySha1 == sha1; } @@ -107,8 +107,8 @@ namespace Aaru.DiscImages } string verifyMd5 = ctx.End(); - DicConsole.DebugWriteLine("CDRWin plugin", "Calculated MD5: {0}", verifyMd5); - DicConsole.DebugWriteLine("CDRWin plugin", "Expected MD5: {0}", md5); + AaruConsole.DebugWriteLine("CDRWin plugin", "Calculated MD5: {0}", verifyMd5); + AaruConsole.DebugWriteLine("CDRWin plugin", "Expected MD5: {0}", md5); return verifyMd5 == md5; } @@ -136,14 +136,14 @@ namespace Aaru.DiscImages } string verifyCrc = ctx.End(); - DicConsole.DebugWriteLine("CDRWin plugin", "Calculated CRC32: {0}", verifyCrc); - DicConsole.DebugWriteLine("CDRWin plugin", "Expected CRC32: {0}", crc32); + AaruConsole.DebugWriteLine("CDRWin plugin", "Calculated CRC32: {0}", verifyCrc); + AaruConsole.DebugWriteLine("CDRWin plugin", "Expected CRC32: {0}", crc32); return verifyCrc == crc32; } foreach(string hash in _discImage.DiscHashes.Keys) - DicConsole.DebugWriteLine("CDRWin plugin", "Found unsupported hash {0}", hash); + AaruConsole.DebugWriteLine("CDRWin plugin", "Found unsupported hash {0}", hash); return null; } diff --git a/Aaru.Images/CHD/Read.cs b/Aaru.Images/CHD/Read.cs index 5eee29668..838f64b5b 100644 --- a/Aaru.Images/CHD/Read.cs +++ b/Aaru.Images/CHD/Read.cs @@ -81,26 +81,26 @@ namespace Aaru.DiscImages { ChdHeaderV1 hdrV1 = Marshal.ByteArrayToStructureBigEndian(buffer); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV1.tag)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.length = {0} bytes", hdrV1.length); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.version = {0}", hdrV1.version); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.flags = {0}", (ChdFlags)hdrV1.flags); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV1.tag)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.length = {0} bytes", hdrV1.length); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.version = {0}", hdrV1.version); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.flags = {0}", (ChdFlags)hdrV1.flags); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.compression = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.compression = {0}", (ChdCompression)hdrV1.compression); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.hunksize = {0}", hdrV1.hunksize); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.totalhunks = {0}", hdrV1.totalhunks); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.cylinders = {0}", hdrV1.cylinders); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.heads = {0}", hdrV1.heads); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.sectors = {0}", hdrV1.sectors); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV1.md5)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.hunksize = {0}", hdrV1.hunksize); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.totalhunks = {0}", hdrV1.totalhunks); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.cylinders = {0}", hdrV1.cylinders); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.heads = {0}", hdrV1.heads); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.sectors = {0}", hdrV1.sectors); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV1.md5)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV1.parentmd5 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV1.parentmd5 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV1.parentmd5) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV1.parentmd5)); - DicConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); DateTime start = DateTime.UtcNow; hunkTable = new ulong[hdrV1.totalhunks]; @@ -128,7 +128,7 @@ namespace Aaru.DiscImages } DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); + AaruConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); imageInfo.MediaType = MediaType.GENERIC_HDD; imageInfo.Sectors = hdrV1.hunksize * hdrV1.totalhunks; @@ -154,28 +154,28 @@ namespace Aaru.DiscImages { ChdHeaderV2 hdrV2 = Marshal.ByteArrayToStructureBigEndian(buffer); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV2.tag)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.length = {0} bytes", hdrV2.length); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.version = {0}", hdrV2.version); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.flags = {0}", (ChdFlags)hdrV2.flags); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV2.tag)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.length = {0} bytes", hdrV2.length); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.version = {0}", hdrV2.version); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.flags = {0}", (ChdFlags)hdrV2.flags); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.compression = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.compression = {0}", (ChdCompression)hdrV2.compression); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.hunksize = {0}", hdrV2.hunksize); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.totalhunks = {0}", hdrV2.totalhunks); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.cylinders = {0}", hdrV2.cylinders); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.heads = {0}", hdrV2.heads); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.sectors = {0}", hdrV2.sectors); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV2.md5)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.hunksize = {0}", hdrV2.hunksize); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.totalhunks = {0}", hdrV2.totalhunks); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.cylinders = {0}", hdrV2.cylinders); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.heads = {0}", hdrV2.heads); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.sectors = {0}", hdrV2.sectors); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV2.md5)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.parentmd5 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.parentmd5 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV2.parentmd5) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV2.parentmd5)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV2.seclen = {0}", hdrV2.seclen); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV2.seclen = {0}", hdrV2.seclen); - DicConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); DateTime start = DateTime.UtcNow; hunkTable = new ulong[hdrV2.totalhunks]; @@ -204,7 +204,7 @@ namespace Aaru.DiscImages } DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); + AaruConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); imageInfo.MediaType = MediaType.GENERIC_HDD; imageInfo.Sectors = hdrV2.hunksize * hdrV2.totalhunks; @@ -230,40 +230,40 @@ namespace Aaru.DiscImages { ChdHeaderV3 hdrV3 = Marshal.ByteArrayToStructureBigEndian(buffer); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV3.tag)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.length = {0} bytes", hdrV3.length); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.version = {0}", hdrV3.version); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.flags = {0}", (ChdFlags)hdrV3.flags); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV3.tag)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.length = {0} bytes", hdrV3.length); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.version = {0}", hdrV3.version); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.flags = {0}", (ChdFlags)hdrV3.flags); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.compression = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.compression = {0}", (ChdCompression)hdrV3.compression); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.totalhunks = {0}", hdrV3.totalhunks); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.logicalbytes = {0}", hdrV3.logicalbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.metaoffset = {0}", hdrV3.metaoffset); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV3.md5)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.totalhunks = {0}", hdrV3.totalhunks); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.logicalbytes = {0}", hdrV3.logicalbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.metaoffset = {0}", hdrV3.metaoffset); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.md5 = {0}", ArrayHelpers.ByteArrayToHex(hdrV3.md5)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.parentmd5 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.parentmd5 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV3.parentmd5) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV3.parentmd5)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.hunkbytes = {0}", hdrV3.hunkbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.hunkbytes = {0}", hdrV3.hunkbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.sha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.sha1 = {0}", ArrayHelpers.ByteArrayToHex(hdrV3.sha1)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV3.parentsha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV3.parentsha1 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV3.parentsha1) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV3.parentsha1)); - DicConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); DateTime start = DateTime.UtcNow; hunkMap = new byte[hdrV3.totalhunks * 16]; stream.Read(hunkMap, 0, hunkMap.Length); DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); + AaruConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); nextMetaOff = hdrV3.metaoffset; @@ -282,37 +282,37 @@ namespace Aaru.DiscImages { ChdHeaderV4 hdrV4 = Marshal.ByteArrayToStructureBigEndian(buffer); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV4.tag)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.length = {0} bytes", hdrV4.length); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.version = {0}", hdrV4.version); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.flags = {0}", (ChdFlags)hdrV4.flags); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV4.tag)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.length = {0} bytes", hdrV4.length); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.version = {0}", hdrV4.version); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.flags = {0}", (ChdFlags)hdrV4.flags); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.compression = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.compression = {0}", (ChdCompression)hdrV4.compression); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.totalhunks = {0}", hdrV4.totalhunks); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.logicalbytes = {0}", hdrV4.logicalbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.metaoffset = {0}", hdrV4.metaoffset); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.hunkbytes = {0}", hdrV4.hunkbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.totalhunks = {0}", hdrV4.totalhunks); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.logicalbytes = {0}", hdrV4.logicalbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.metaoffset = {0}", hdrV4.metaoffset); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.hunkbytes = {0}", hdrV4.hunkbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.sha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.sha1 = {0}", ArrayHelpers.ByteArrayToHex(hdrV4.sha1)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.parentsha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.parentsha1 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV4.parentsha1) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV4.parentsha1)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV4.rawsha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV4.rawsha1 = {0}", ArrayHelpers.ByteArrayToHex(hdrV4.rawsha1)); - DicConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); DateTime start = DateTime.UtcNow; hunkMap = new byte[hdrV4.totalhunks * 16]; stream.Read(hunkMap, 0, hunkMap.Length); DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); + AaruConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); nextMetaOff = hdrV4.metaoffset; @@ -331,46 +331,46 @@ namespace Aaru.DiscImages { ChdHeaderV5 hdrV5 = Marshal.ByteArrayToStructureBigEndian(buffer); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV5.tag)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.length = {0} bytes", hdrV5.length); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.version = {0}", hdrV5.version); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.tag = \"{0}\"", Encoding.ASCII.GetString(hdrV5.tag)); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.length = {0} bytes", hdrV5.length); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.version = {0}", hdrV5.version); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor0 = \"{0}\"", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor0 = \"{0}\"", Encoding.ASCII.GetString(BigEndianBitConverter. GetBytes(hdrV5.compressor0))); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor1 = \"{0}\"", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor1 = \"{0}\"", Encoding.ASCII.GetString(BigEndianBitConverter. GetBytes(hdrV5.compressor1))); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor2 = \"{0}\"", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor2 = \"{0}\"", Encoding.ASCII.GetString(BigEndianBitConverter. GetBytes(hdrV5.compressor2))); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor3 = \"{0}\"", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.compressor3 = \"{0}\"", Encoding.ASCII.GetString(BigEndianBitConverter. GetBytes(hdrV5.compressor3))); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.logicalbytes = {0}", hdrV5.logicalbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.mapoffset = {0}", hdrV5.mapoffset); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.metaoffset = {0}", hdrV5.metaoffset); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.hunkbytes = {0}", hdrV5.hunkbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.unitbytes = {0}", hdrV5.unitbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.logicalbytes = {0}", hdrV5.logicalbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.mapoffset = {0}", hdrV5.mapoffset); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.metaoffset = {0}", hdrV5.metaoffset); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.hunkbytes = {0}", hdrV5.hunkbytes); + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.unitbytes = {0}", hdrV5.unitbytes); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.sha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.sha1 = {0}", ArrayHelpers.ByteArrayToHex(hdrV5.sha1)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.parentsha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.parentsha1 = {0}", ArrayHelpers.ArrayIsNullOrEmpty(hdrV5.parentsha1) ? "null" : ArrayHelpers.ByteArrayToHex(hdrV5.parentsha1)); - DicConsole.DebugWriteLine("CHD plugin", "hdrV5.rawsha1 = {0}", + AaruConsole.DebugWriteLine("CHD plugin", "hdrV5.rawsha1 = {0}", ArrayHelpers.ByteArrayToHex(hdrV5.rawsha1)); // TODO: Implement compressed CHD v5 if(hdrV5.compressor0 == 0) { - DicConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading Hunk map."); DateTime start = DateTime.UtcNow; hunkTableSmall = new uint[hdrV5.logicalbytes / hdrV5.hunkbytes]; @@ -402,7 +402,7 @@ namespace Aaru.DiscImages } DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); + AaruConsole.DebugWriteLine("CHD plugin", "Took {0} seconds", (end - start).TotalSeconds); } else throw new ImageNotSupportedException("Cannot read compressed CHD version 5"); @@ -434,7 +434,7 @@ namespace Aaru.DiscImages swapAudio = false; tracks = new Dictionary(); - DicConsole.DebugWriteLine("CHD plugin", "Reading metadata."); + AaruConsole.DebugWriteLine("CHD plugin", "Reading metadata."); ulong currentSector = 0; uint currentTrack = 1; @@ -448,7 +448,7 @@ namespace Aaru.DiscImages byte[] meta = new byte[header.flagsAndLength & 0xFFFFFF]; stream.Read(meta, 0, meta.Length); - DicConsole.DebugWriteLine("CHD plugin", "Found metadata \"{0}\"", + AaruConsole.DebugWriteLine("CHD plugin", "Found metadata \"{0}\"", Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(header.tag))); switch(header.tag) diff --git a/Aaru.Images/CPCDSK/Identify.cs b/Aaru.Images/CPCDSK/Identify.cs index 979adaef9..299bc4867 100644 --- a/Aaru.Images/CPCDSK/Identify.cs +++ b/Aaru.Images/CPCDSK/Identify.cs @@ -51,7 +51,7 @@ namespace Aaru.DiscImages stream.Read(headerB, 0, 256); CpcDiskInfo header = Marshal.ByteArrayToStructureLittleEndian(headerB); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.magic = \"{0}\"", + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.magic = \"{0}\"", StringHandlers.CToString(header.magic)); return cpcdskId.SequenceEqual(header.magic.Take(cpcdskId.Length)) || edskId.SequenceEqual(header.magic) || diff --git a/Aaru.Images/CPCDSK/Read.cs b/Aaru.Images/CPCDSK/Read.cs index 25e875ea1..2d6bcb246 100644 --- a/Aaru.Images/CPCDSK/Read.cs +++ b/Aaru.Images/CPCDSK/Read.cs @@ -65,27 +65,27 @@ namespace Aaru.DiscImages return false; extended = edskId.SequenceEqual(header.magic); - DicConsole.DebugWriteLine("CPCDSK plugin", "Extended = {0}", extended); + AaruConsole.DebugWriteLine("CPCDSK plugin", "Extended = {0}", extended); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.magic = \"{0}\"", + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.magic = \"{0}\"", StringHandlers.CToString(header.magic)); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.magic2 = \"{0}\"", + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.magic2 = \"{0}\"", StringHandlers.CToString(header.magic2)); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.creator = \"{0}\"", + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.creator = \"{0}\"", StringHandlers.CToString(header.creator)); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.tracks = {0}", header.tracks); - DicConsole.DebugWriteLine("CPCDSK plugin", "header.sides = {0}", header.sides); + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.tracks = {0}", header.tracks); + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.sides = {0}", header.sides); if(!extended) - DicConsole.DebugWriteLine("CPCDSK plugin", "header.tracksize = {0}", header.tracksize); + AaruConsole.DebugWriteLine("CPCDSK plugin", "header.tracksize = {0}", header.tracksize); else for(int i = 0; i < header.tracks; i++) { for(int j = 0; j < header.sides; j++) - DicConsole.DebugWriteLine("CPCDSK plugin", "Track {0} Side {1} size = {2}", i, j, + AaruConsole.DebugWriteLine("CPCDSK plugin", "Track {0} Side {1} size = {2}", i, j, header.tracksizeTable[(i * header.sides) + j] * 256); } @@ -115,37 +115,37 @@ namespace Aaru.DiscImages if(!trackId.SequenceEqual(trackInfo.magic)) { - DicConsole.ErrorWriteLine("Not the expected track info."); + AaruConsole.ErrorWriteLine("Not the expected track info."); return false; } - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].magic = \"{0}\"", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].magic = \"{0}\"", StringHandlers.CToString(trackInfo.magic), i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].bps = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].bps = {0}", SizeCodeToBytes(trackInfo.bps), i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].dataRate = {0}", trackInfo.dataRate, + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].dataRate = {0}", trackInfo.dataRate, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].filler = 0x{0:X2}", trackInfo.filler, + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].filler = 0x{0:X2}", trackInfo.filler, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].gap3 = 0x{0:X2}", trackInfo.gap3, i, + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].gap3 = 0x{0:X2}", trackInfo.gap3, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].padding = {0}", trackInfo.padding, i, + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].padding = {0}", trackInfo.padding, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].recordingMode = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].recordingMode = {0}", trackInfo.recordingMode, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sectors = {0}", trackInfo.sectors, i, + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sectors = {0}", trackInfo.sectors, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].side = {0}", trackInfo.side, i, j); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].track = {0}", trackInfo.track, i, j); + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].side = {0}", trackInfo.side, i, j); + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].track = {0}", trackInfo.track, i, j); if(trackInfo.sectors != sectorsPerTrack) if(sectorsPerTrack == 0) @@ -158,25 +158,25 @@ namespace Aaru.DiscImages for(int k = 1; k <= trackInfo.sectors; k++) { - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].id = 0x{0:X2}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].id = 0x{0:X2}", trackInfo.sectorsInfo[k - 1].id, i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].len = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].len = {0}", trackInfo.sectorsInfo[k - 1].len, i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].side = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].side = {0}", trackInfo.sectorsInfo[k - 1].side, i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].size = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].size = {0}", SizeCodeToBytes(trackInfo.sectorsInfo[k - 1].size), i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].st1 = 0x{0:X2}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].st1 = 0x{0:X2}", trackInfo.sectorsInfo[k - 1].st1, i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].st2 = 0x{0:X2}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].st2 = 0x{0:X2}", trackInfo.sectorsInfo[k - 1].st2, i, j, k); - DicConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].track = {0}", + AaruConsole.DebugWriteLine("CPCDSK plugin", "trackInfo[{1}:{2}].sector[{3}].track = {0}", trackInfo.sectorsInfo[k - 1].track, i, j, k); int sectLen = extended ? trackInfo.sectorsInfo[k - 1].len @@ -246,9 +246,9 @@ namespace Aaru.DiscImages } } - DicConsole.DebugWriteLine("CPCDSK plugin", "Read {0} sectors", sectors.Count); - DicConsole.DebugWriteLine("CPCDSK plugin", "Read {0} tracks", readtracks); - DicConsole.DebugWriteLine("CPCDSK plugin", "All tracks are same size? {0}", allTracksSameSize); + AaruConsole.DebugWriteLine("CPCDSK plugin", "Read {0} sectors", sectors.Count); + AaruConsole.DebugWriteLine("CPCDSK plugin", "Read {0} tracks", readtracks); + AaruConsole.DebugWriteLine("CPCDSK plugin", "All tracks are same size? {0}", allTracksSameSize); imageInfo.Application = StringHandlers.CToString(header.creator); imageInfo.CreationTime = imageFilter.GetCreationTime(); diff --git a/Aaru.Images/CisCopy/Read.cs b/Aaru.Images/CisCopy/Read.cs index 80a34883d..da7368910 100644 --- a/Aaru.Images/CisCopy/Read.cs +++ b/Aaru.Images/CisCopy/Read.cs @@ -175,7 +175,7 @@ namespace Aaru.DiscImages decodedImage.Close(); - DicConsole.VerboseWriteLine("CisCopy image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("CisCopy image contains a disk of type {0}", imageInfo.MediaType); return true; } diff --git a/Aaru.Images/CloneCD/Identify.cs b/Aaru.Images/CloneCD/Identify.cs index 3de8cf80a..2f6983d7b 100644 --- a/Aaru.Images/CloneCD/Identify.cs +++ b/Aaru.Images/CloneCD/Identify.cs @@ -80,9 +80,9 @@ namespace Aaru.DiscImages } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", ccdFilter); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", ccdFilter); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } } diff --git a/Aaru.Images/CloneCD/Read.cs b/Aaru.Images/CloneCD/Read.cs index ee6fc3a6d..06bb901e2 100644 --- a/Aaru.Images/CloneCD/Read.cs +++ b/Aaru.Images/CloneCD/Read.cs @@ -164,13 +164,13 @@ namespace Aaru.DiscImages if(!ccdVerMatch.Success) continue; - DicConsole.DebugWriteLine("CloneCD plugin", "Found Version at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Version at line {0}", lineNumber); imageInfo.Version = ccdVerMatch.Groups["value"].Value; if(imageInfo.Version != "2" && imageInfo.Version != "3") - DicConsole. + AaruConsole. ErrorWriteLine("(CloneCD plugin): Warning! Unknown CCD image version {0}, may not work!", imageInfo.Version); } @@ -183,22 +183,22 @@ namespace Aaru.DiscImages Match discCatMatch = discCatRegex.Match(line); if(discEntMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found TocEntries at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found TocEntries at line {0}", lineNumber); else if(discSessMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found Sessions at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Sessions at line {0}", lineNumber); else if(discScrMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found DataTracksScrambled at line {0}", + AaruConsole.DebugWriteLine("CloneCD plugin", "Found DataTracksScrambled at line {0}", lineNumber); scrambled |= discScrMatch.Groups["value"].Value == "1"; } else if(cdtLenMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found CDTextLength at line {0}", + AaruConsole.DebugWriteLine("CloneCD plugin", "Found CDTextLength at line {0}", lineNumber); else if(discCatMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found Catalog at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Catalog at line {0}", lineNumber); catalog = discCatMatch.Groups["value"].Value; } } @@ -210,11 +210,11 @@ namespace Aaru.DiscImages Match cdtEntMatch = cdtEntRegex.Match(line); if(cdtEntsMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found CD-Text Entries at line {0}", + AaruConsole.DebugWriteLine("CloneCD plugin", "Found CD-Text Entries at line {0}", lineNumber); else if(cdtEntMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found CD-Text Entry at line {0}", + AaruConsole.DebugWriteLine("CloneCD plugin", "Found CD-Text Entry at line {0}", lineNumber); string[] bytes = cdtEntMatch.Groups["value"].Value.Split(new[] @@ -234,9 +234,9 @@ namespace Aaru.DiscImages Match sessSubcMatch = sessSubcRegex.Match(line); if(sessPregMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found PreGapMode at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PreGapMode at line {0}", lineNumber); else if(sessSubcMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found PreGapSubC at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PreGapSubC at line {0}", lineNumber); } else if(inEntry) { @@ -257,7 +257,7 @@ namespace Aaru.DiscImages if(entSessMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found Session at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Session at line {0}", lineNumber); currentEntry.SessionNumber = Convert.ToByte(entSessMatch.Groups["value"].Value, 10); if(currentEntry.SessionNumber < minSession) @@ -268,65 +268,65 @@ namespace Aaru.DiscImages } else if(entPointMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found Point at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Point at line {0}", lineNumber); currentEntry.POINT = Convert.ToByte(entPointMatch.Groups["value"].Value, 16); } else if(entAdrMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found ADR at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found ADR at line {0}", lineNumber); currentEntry.ADR = Convert.ToByte(entAdrMatch.Groups["value"].Value, 16); } else if(entCtrlMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found Control at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Control at line {0}", lineNumber); currentEntry.CONTROL = Convert.ToByte(entCtrlMatch.Groups["value"].Value, 16); } else if(entTnoMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found TrackNo at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found TrackNo at line {0}", lineNumber); currentEntry.TNO = Convert.ToByte(entTnoMatch.Groups["value"].Value, 10); } else if(entAMinMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found AMin at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found AMin at line {0}", lineNumber); currentEntry.Min = Convert.ToByte(entAMinMatch.Groups["value"].Value, 10); } else if(entASecMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found ASec at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found ASec at line {0}", lineNumber); currentEntry.Sec = Convert.ToByte(entASecMatch.Groups["value"].Value, 10); } else if(entAFrameMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found AFrame at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found AFrame at line {0}", lineNumber); currentEntry.Frame = Convert.ToByte(entAFrameMatch.Groups["value"].Value, 10); } else if(entAlbaMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found ALBA at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found ALBA at line {0}", lineNumber); else if(entZeroMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found Zero at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found Zero at line {0}", lineNumber); currentEntry.Zero = Convert.ToByte(entZeroMatch.Groups["value"].Value, 10); currentEntry.HOUR = (byte)((currentEntry.Zero & 0xF0) >> 4); currentEntry.PHOUR = (byte)(currentEntry.Zero & 0x0F); } else if(entPMinMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found PMin at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PMin at line {0}", lineNumber); currentEntry.PMIN = Convert.ToByte(entPMinMatch.Groups["value"].Value, 10); } else if(entPSecMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found PSec at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PSec at line {0}", lineNumber); currentEntry.PSEC = Convert.ToByte(entPSecMatch.Groups["value"].Value, 10); } else if(entPFrameMatch.Success) { - DicConsole.DebugWriteLine("CloneCD plugin", "Found PFrame at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PFrame at line {0}", lineNumber); currentEntry.PFRAME = Convert.ToByte(entPFrameMatch.Groups["value"].Value, 10); } else if(entPlbaMatch.Success) - DicConsole.DebugWriteLine("CloneCD plugin", "Found PLBA at line {0}", lineNumber); + AaruConsole.DebugWriteLine("CloneCD plugin", "Found PLBA at line {0}", lineNumber); } } } @@ -365,7 +365,7 @@ namespace Aaru.DiscImages fulltoc = tocMs.ToArray(); imageInfo.ReadableMediaTags.Add(MediaTagType.CD_FullTOC); - DicConsole.DebugWriteLine("CloneCD plugin", "{0}", FullTOC.Prettify(toc)); + AaruConsole.DebugWriteLine("CloneCD plugin", "{0}", FullTOC.Prettify(toc)); string dataFile = Path.GetFileNameWithoutExtension(imageFilter.GetBasePath()) + ".img"; string subFile = Path.GetFileNameWithoutExtension(imageFilter.GetBasePath()) + ".sub"; @@ -415,7 +415,7 @@ namespace Aaru.DiscImages { case 0xA0: byte discType = descriptor.PSEC; - DicConsole.DebugWriteLine("CloneCD plugin", "Disc Type: {0}", discType); + AaruConsole.DebugWriteLine("CloneCD plugin", "Disc Type: {0}", discType); break; case 0xA2: @@ -644,7 +644,7 @@ namespace Aaru.DiscImages imageInfo.MediaManufacturer = ATIP.ManufacturerFromATIP(descriptor.PSEC, frm); if(imageInfo.MediaManufacturer != "") - DicConsole.DebugWriteLine("CloneCD plugin", "Disc manufactured by: {0}", + AaruConsole.DebugWriteLine("CloneCD plugin", "Disc manufactured by: {0}", imageInfo.MediaManufacturer); } @@ -655,7 +655,7 @@ namespace Aaru.DiscImages case 6: { uint id = (uint)((descriptor.Min << 16) + (descriptor.Sec << 8) + descriptor.Frame); - DicConsole.DebugWriteLine("CloneCD plugin", "Disc ID: {0:X6}", id & 0x00FFFFFF); + AaruConsole.DebugWriteLine("CloneCD plugin", "Disc ID: {0:X6}", id & 0x00FFFFFF); imageInfo.MediaSerialNumber = $"{id & 0x00FFFFFF:X6}"; break; @@ -785,9 +785,9 @@ namespace Aaru.DiscImages } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetFilename()); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetFilename()); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } diff --git a/Aaru.Images/CopyQM/Read.cs b/Aaru.Images/CopyQM/Read.cs index a944f98e7..9cd67b7ca 100644 --- a/Aaru.Images/CopyQM/Read.cs +++ b/Aaru.Images/CopyQM/Read.cs @@ -52,35 +52,35 @@ namespace Aaru.DiscImages stream.Read(hdr, 0, 133); header = Marshal.ByteArrayToStructureLittleEndian(hdr); - DicConsole.DebugWriteLine("CopyQM plugin", "header.magic = 0x{0:X4}", header.magic); - DicConsole.DebugWriteLine("CopyQM plugin", "header.mark = 0x{0:X2}", header.mark); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectorSize = {0}", header.sectorSize); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectorPerCluster = {0}", header.sectorPerCluster); - DicConsole.DebugWriteLine("CopyQM plugin", "header.reservedSectors = {0}", header.reservedSectors); - DicConsole.DebugWriteLine("CopyQM plugin", "header.fatCopy = {0}", header.fatCopy); - DicConsole.DebugWriteLine("CopyQM plugin", "header.rootEntries = {0}", header.rootEntries); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectors = {0}", header.sectors); - DicConsole.DebugWriteLine("CopyQM plugin", "header.mediaType = 0x{0:X2}", header.mediaType); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectorsPerFat = {0}", header.sectorsPerFat); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectorsPerTrack = {0}", header.sectorsPerTrack); - DicConsole.DebugWriteLine("CopyQM plugin", "header.heads = {0}", header.heads); - DicConsole.DebugWriteLine("CopyQM plugin", "header.hidden = {0}", header.hidden); - DicConsole.DebugWriteLine("CopyQM plugin", "header.sectorsBig = {0}", header.sectorsBig); - DicConsole.DebugWriteLine("CopyQM plugin", "header.description = {0}", header.description); - DicConsole.DebugWriteLine("CopyQM plugin", "header.blind = {0}", header.blind); - DicConsole.DebugWriteLine("CopyQM plugin", "header.density = {0}", header.density); - DicConsole.DebugWriteLine("CopyQM plugin", "header.imageCylinders = {0}", header.imageCylinders); - DicConsole.DebugWriteLine("CopyQM plugin", "header.totalCylinders = {0}", header.totalCylinders); - DicConsole.DebugWriteLine("CopyQM plugin", "header.crc = 0x{0:X8}", header.crc); - DicConsole.DebugWriteLine("CopyQM plugin", "header.volumeLabel = {0}", header.volumeLabel); - DicConsole.DebugWriteLine("CopyQM plugin", "header.time = 0x{0:X4}", header.time); - DicConsole.DebugWriteLine("CopyQM plugin", "header.date = 0x{0:X4}", header.date); - DicConsole.DebugWriteLine("CopyQM plugin", "header.commentLength = {0}", header.commentLength); - DicConsole.DebugWriteLine("CopyQM plugin", "header.secbs = {0}", header.secbs); - DicConsole.DebugWriteLine("CopyQM plugin", "header.unknown = 0x{0:X4}", header.unknown); - DicConsole.DebugWriteLine("CopyQM plugin", "header.interleave = {0}", header.interleave); - DicConsole.DebugWriteLine("CopyQM plugin", "header.skew = {0}", header.skew); - DicConsole.DebugWriteLine("CopyQM plugin", "header.drive = {0}", header.drive); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.magic = 0x{0:X4}", header.magic); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.mark = 0x{0:X2}", header.mark); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectorSize = {0}", header.sectorSize); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectorPerCluster = {0}", header.sectorPerCluster); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.reservedSectors = {0}", header.reservedSectors); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.fatCopy = {0}", header.fatCopy); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.rootEntries = {0}", header.rootEntries); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectors = {0}", header.sectors); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.mediaType = 0x{0:X2}", header.mediaType); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectorsPerFat = {0}", header.sectorsPerFat); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectorsPerTrack = {0}", header.sectorsPerTrack); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.heads = {0}", header.heads); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.hidden = {0}", header.hidden); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.sectorsBig = {0}", header.sectorsBig); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.description = {0}", header.description); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.blind = {0}", header.blind); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.density = {0}", header.density); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.imageCylinders = {0}", header.imageCylinders); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.totalCylinders = {0}", header.totalCylinders); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.crc = 0x{0:X8}", header.crc); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.volumeLabel = {0}", header.volumeLabel); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.time = 0x{0:X4}", header.time); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.date = 0x{0:X4}", header.date); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.commentLength = {0}", header.commentLength); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.secbs = {0}", header.secbs); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.unknown = 0x{0:X4}", header.unknown); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.interleave = {0}", header.interleave); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.skew = {0}", header.skew); + AaruConsole.DebugWriteLine("CopyQM plugin", "header.drive = {0}", header.drive); byte[] cmt = new byte[header.commentLength]; stream.Read(cmt, 0, header.commentLength); @@ -137,9 +137,9 @@ namespace Aaru.DiscImages headerChecksumOk = ((-1 * sum) & 0xFF) == header.headerChecksum; - DicConsole.DebugWriteLine("CopyQM plugin", "Calculated header checksum = 0x{0:X2}, {1}", (-1 * sum) & 0xFF, + AaruConsole.DebugWriteLine("CopyQM plugin", "Calculated header checksum = 0x{0:X2}, {1}", (-1 * sum) & 0xFF, headerChecksumOk); - DicConsole.DebugWriteLine("CopyQM plugin", "Calculated data CRC = 0x{0:X8}, {1}", calculatedDataCrc, + AaruConsole.DebugWriteLine("CopyQM plugin", "Calculated data CRC = 0x{0:X8}, {1}", calculatedDataCrc, calculatedDataCrc == header.crc); imageInfo.Application = "CopyQM"; @@ -172,9 +172,9 @@ namespace Aaru.DiscImages decodedImage.Close(); - DicConsole.VerboseWriteLine("CopyQM image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("CopyQM image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("CopyQM comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("CopyQM comments: {0}", imageInfo.Comments); imageInfo.Heads = header.heads; imageInfo.Cylinders = header.totalCylinders; diff --git a/Aaru.Images/D88/Identify.cs b/Aaru.Images/D88/Identify.cs index a2e5d6df9..57af45153 100644 --- a/Aaru.Images/D88/Identify.cs +++ b/Aaru.Images/D88/Identify.cs @@ -55,14 +55,14 @@ namespace Aaru.DiscImages D88Header d88Hdr = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.name = \"{0}\"", + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.name = \"{0}\"", StringHandlers.CToString(d88Hdr.name, shiftjis)); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.reserved is empty? = {0}", + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.reserved is empty? = {0}", d88Hdr.reserved.SequenceEqual(reservedEmpty)); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.write_protect = 0x{0:X2}", d88Hdr.write_protect); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_type = {0} ({1})", d88Hdr.disk_type, + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.write_protect = 0x{0:X2}", d88Hdr.write_protect); + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_type = {0} ({1})", d88Hdr.disk_type, (byte)d88Hdr.disk_type); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_size = {0}", d88Hdr.disk_size); + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_size = {0}", d88Hdr.disk_size); if(d88Hdr.disk_size != stream.Length) return false; @@ -79,7 +79,7 @@ namespace Aaru.DiscImages if(t < 0 || t > stream.Length) return false; } - DicConsole.DebugWriteLine("D88 plugin", "{0} tracks", counter); + AaruConsole.DebugWriteLine("D88 plugin", "{0} tracks", counter); return counter > 0; } diff --git a/Aaru.Images/D88/Read.cs b/Aaru.Images/D88/Read.cs index 8a229719a..3b38e4481 100644 --- a/Aaru.Images/D88/Read.cs +++ b/Aaru.Images/D88/Read.cs @@ -59,14 +59,14 @@ namespace Aaru.DiscImages stream.Read(hdrB, 0, hdrB.Length); D88Header d88Hdr = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.name = \"{0}\"", + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.name = \"{0}\"", StringHandlers.CToString(d88Hdr.name, shiftjis)); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.reserved is empty? = {0}", + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.reserved is empty? = {0}", d88Hdr.reserved.SequenceEqual(reservedEmpty)); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.write_protect = 0x{0:X2}", d88Hdr.write_protect); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_type = {0} ({1})", d88Hdr.disk_type, + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.write_protect = 0x{0:X2}", d88Hdr.write_protect); + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_type = {0} ({1})", d88Hdr.disk_type, (byte)d88Hdr.disk_type); - DicConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_size = {0}", d88Hdr.disk_size); + AaruConsole.DebugWriteLine("D88 plugin", "d88hdr.disk_size = {0}", d88Hdr.disk_size); if(d88Hdr.disk_size != stream.Length) return false; @@ -83,7 +83,7 @@ namespace Aaru.DiscImages if(t < 0 || t > stream.Length) return false; } - DicConsole.DebugWriteLine("D88 plugin", "{0} tracks", trkCounter); + AaruConsole.DebugWriteLine("D88 plugin", "{0} tracks", trkCounter); if(trkCounter == 0) return false; @@ -93,15 +93,15 @@ namespace Aaru.DiscImages SectorHeader sechdr = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.c = {0}", sechdr.c); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.h = {0}", sechdr.h); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.r = {0}", sechdr.r); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.n = {0}", sechdr.n); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.spt = {0}", sechdr.spt); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.density = {0}", sechdr.density); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.deleted_mark = {0}", sechdr.deleted_mark); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.status = {0}", sechdr.status); - DicConsole.DebugWriteLine("D88 plugin", "sechdr.size_of_data = {0}", sechdr.size_of_data); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.c = {0}", sechdr.c); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.h = {0}", sechdr.h); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.r = {0}", sechdr.r); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.n = {0}", sechdr.n); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.spt = {0}", sechdr.spt); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.density = {0}", sechdr.density); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.deleted_mark = {0}", sechdr.deleted_mark); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.status = {0}", sechdr.status); + AaruConsole.DebugWriteLine("D88 plugin", "sechdr.size_of_data = {0}", sechdr.size_of_data); short spt = sechdr.spt; IBMSectorSizeCode bps = sechdr.n; @@ -118,7 +118,7 @@ namespace Aaru.DiscImages if(sechdr.spt != spt || sechdr.n != bps) { - DicConsole.DebugWriteLine("D88 plugin", + AaruConsole.DebugWriteLine("D88 plugin", "Disk tracks are not same size. spt = {0} (expected {1}), bps = {2} (expected {3}) at track {4} sector {5}", sechdr.spt, spt, sechdr.n, bps, i, 0); allEqual = false; @@ -137,7 +137,7 @@ namespace Aaru.DiscImages if(sechdr.spt == spt && sechdr.n == bps) continue; - DicConsole.DebugWriteLine("D88 plugin", + AaruConsole.DebugWriteLine("D88 plugin", "Disk tracks are not same size. spt = {0} (expected {1}), bps = {2} (expected {3}) at track {4} sector {5}", sechdr.spt, spt, sechdr.n, bps, i, j, sechdr.deleted_mark); allEqual = false; @@ -150,7 +150,7 @@ namespace Aaru.DiscImages foreach(KeyValuePair kvp in sectors) sectorsData.Add(kvp.Value); } - DicConsole.DebugWriteLine("D88 plugin", "{0} sectors", sectorsData.Count); + AaruConsole.DebugWriteLine("D88 plugin", "{0} sectors", sectorsData.Count); imageInfo.MediaType = MediaType.Unknown; if(allEqual) @@ -227,7 +227,7 @@ namespace Aaru.DiscImages break; } - DicConsole.DebugWriteLine("D88 plugin", "MediaType: {0}", imageInfo.MediaType); + AaruConsole.DebugWriteLine("D88 plugin", "MediaType: {0}", imageInfo.MediaType); imageInfo.ImageSize = (ulong)d88Hdr.disk_size; imageInfo.CreationTime = imageFilter.GetCreationTime(); diff --git a/Aaru.Images/DART/Read.cs b/Aaru.Images/DART/Read.cs index 0d2861e5c..5c298cc82 100644 --- a/Aaru.Images/DART/Read.cs +++ b/Aaru.Images/DART/Read.cs @@ -241,7 +241,7 @@ namespace Aaru.DiscImages } catch(InvalidCastException) { } - DicConsole.DebugWriteLine("DART plugin", "Image application = {0} version {1}", imageInfo.Application, + AaruConsole.DebugWriteLine("DART plugin", "Image application = {0} version {1}", imageInfo.Application, imageInfo.ApplicationVersion); imageInfo.Sectors = (ulong)(header.srcSize * 2); diff --git a/Aaru.Images/DIM/Read.cs b/Aaru.Images/DIM/Read.cs index 349a83d9f..a5490fd76 100644 --- a/Aaru.Images/DIM/Read.cs +++ b/Aaru.Images/DIM/Read.cs @@ -71,7 +71,7 @@ namespace Aaru.DiscImages case DiskType.Hd2: if(diskSize % (2 * 8 * 1024) != 0) { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 8 * 1024)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 8 * 1024)); return false; } @@ -82,7 +82,7 @@ namespace Aaru.DiscImages case DiskType.Hs2: if(diskSize % (2 * 9 * 512) != 0) { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 9 * 512)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 9 * 512)); return false; } @@ -93,7 +93,7 @@ namespace Aaru.DiscImages case DiskType.Hc2: if(diskSize % (2 * 15 * 512) != 0) { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 15 * 512)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 15 * 512)); return false; } @@ -104,7 +104,7 @@ namespace Aaru.DiscImages case DiskType.Hde2: if(diskSize % (2 * 9 * 512) != 0) { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 9 * 512)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 9 * 512)); return false; } @@ -115,7 +115,7 @@ namespace Aaru.DiscImages case DiskType.Hq2: if(diskSize % (2 * 18 * 512) != 0) { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 18 * 512)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 18 * 512)); return false; } @@ -136,7 +136,7 @@ namespace Aaru.DiscImages } else { - DicConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 26 * 256)); + AaruConsole.ErrorWriteLine("DIM shows unknown image with {0} tracks", diskSize / (2 * 26 * 256)); return false; } @@ -144,9 +144,9 @@ namespace Aaru.DiscImages default: return false; } - DicConsole.VerboseWriteLine("DIM image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("DIM image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("DIM comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("DIM comments: {0}", imageInfo.Comments); dimImageFilter = imageFilter; diff --git a/Aaru.Images/DiscFerret/Read.cs b/Aaru.Images/DiscFerret/Read.cs index 7e7258d5c..1bf002854 100644 --- a/Aaru.Images/DiscFerret/Read.cs +++ b/Aaru.Images/DiscFerret/Read.cs @@ -65,17 +65,17 @@ namespace Aaru.DiscImages stream.Read(blk, 0, Marshal.SizeOf()); DfiBlockHeader blockHeader = Marshal.ByteArrayToStructureBigEndian(blk); - DicConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.cylinder = {1}", thisOffset, + AaruConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.cylinder = {1}", thisOffset, blockHeader.cylinder); - DicConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.head = {1}", thisOffset, blockHeader.head); - DicConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.sector = {1}", thisOffset, + AaruConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.head = {1}", thisOffset, blockHeader.head); + AaruConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.sector = {1}", thisOffset, blockHeader.sector); - DicConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.length = {1}", thisOffset, + AaruConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.length = {1}", thisOffset, blockHeader.length); if(stream.Position + blockHeader.length > stream.Length) { - DicConsole.DebugWriteLine("DiscFerret plugin", "Invalid track block found at {0}", thisOffset); + AaruConsole.DebugWriteLine("DiscFerret plugin", "Invalid track block found at {0}", thisOffset); break; } diff --git a/Aaru.Images/DiscJuggler/Identify.cs b/Aaru.Images/DiscJuggler/Identify.cs index 3a402d419..d29d9c433 100644 --- a/Aaru.Images/DiscJuggler/Identify.cs +++ b/Aaru.Images/DiscJuggler/Identify.cs @@ -48,7 +48,7 @@ namespace Aaru.DiscImages imageStream.Read(dscLenB, 0, 4); int dscLen = BitConverter.ToInt32(dscLenB, 0); - DicConsole.DebugWriteLine("DiscJuggler plugin", "dscLen = {0}", dscLen); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "dscLen = {0}", dscLen); if(dscLen >= imageStream.Length) return false; diff --git a/Aaru.Images/DiscJuggler/Read.cs b/Aaru.Images/DiscJuggler/Read.cs index 70815e14e..1b21acb9a 100644 --- a/Aaru.Images/DiscJuggler/Read.cs +++ b/Aaru.Images/DiscJuggler/Read.cs @@ -80,14 +80,14 @@ namespace Aaru.DiscImages ushort mediumType; byte maxS = descriptor[0]; - DicConsole.DebugWriteLine("DiscJuggler plugin", "maxS = {0}", maxS); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "maxS = {0}", maxS); uint lastSessionTrack = 0; ulong currentOffset = 0; // Read sessions for(byte s = 0; s <= maxS; s++) { - DicConsole.DebugWriteLine("DiscJuggler plugin", "s = {0}", s); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "s = {0}", s); // Seems all sessions start with this data if(descriptor[position + 0] != 0x00 || @@ -111,7 +111,7 @@ namespace Aaru.DiscImages return false; byte maxT = descriptor[position + 1]; - DicConsole.DebugWriteLine("DiscJuggler plugin", "maxT = {0}", maxT); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "maxT = {0}", maxT); sessionSequence++; @@ -126,7 +126,7 @@ namespace Aaru.DiscImages // Read track for(byte t = 0; t < maxT; t++) { - DicConsole.DebugWriteLine("DiscJuggler plugin", "t = {0}", t); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "t = {0}", t); var track = new Track(); // Skip unknown @@ -137,33 +137,33 @@ namespace Aaru.DiscImages Array.Copy(descriptor, position, trackFilenameB, 0, trackFilenameB.Length); position += trackFilenameB.Length; track.TrackFile = Path.GetFileName(Encoding.Default.GetString(trackFilenameB)); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tfilename = {0}", track.TrackFile); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tfilename = {0}", track.TrackFile); // Skip unknown position += 29; mediumType = BitConverter.ToUInt16(descriptor, position); position += 2; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tmediumType = {0}", mediumType); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tmediumType = {0}", mediumType); // Read indices track.Indexes = new Dictionary(); ushort maxI = BitConverter.ToUInt16(descriptor, position); position += 2; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tmaxI = {0}", maxI); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tmaxI = {0}", maxI); for(ushort i = 0; i < maxI; i++) { uint index = BitConverter.ToUInt32(descriptor, position); track.Indexes.Add(i, index); position += 4; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tindex[{1}] = {0}", index, i); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tindex[{1}] = {0}", index, i); } // Read CD-Text uint maxC = BitConverter.ToUInt32(descriptor, position); position += 4; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tmaxC = {0}", maxC); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tmaxC = {0}", maxC); for(uint c = 0; c < maxC; c++) { @@ -171,7 +171,7 @@ namespace Aaru.DiscImages { int bLen = descriptor[position]; position++; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tc[{1}][{2}].Length = {0}", bLen, c, cb); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tc[{1}][{2}].Length = {0}", bLen, c, cb); if(bLen <= 0) continue; @@ -186,14 +186,14 @@ namespace Aaru.DiscImages track.TrackDescription = Encoding.Default.GetString(textBlk, 0, bLen); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tTrack title = {0}", + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tTrack title = {0}", track.TrackDescription); } } position += 2; uint trackMode = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackMode = {0}", trackMode); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackMode = {0}", trackMode); position += 4; // Skip unknown @@ -201,21 +201,21 @@ namespace Aaru.DiscImages session.SessionSequence = (ushort)(BitConverter.ToUInt32(descriptor, position) + 1); track.TrackSession = (ushort)(session.SessionSequence + 1); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tsession = {0}", session.SessionSequence); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tsession = {0}", session.SessionSequence); position += 4; track.TrackSequence = BitConverter.ToUInt32(descriptor, position) + lastSessionTrack + 1; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrack = {1} + {2} + 1 = {0}", + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrack = {1} + {2} + 1 = {0}", track.TrackSequence, BitConverter.ToUInt32(descriptor, position), lastSessionTrack); position += 4; track.TrackStartSector = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackStart = {0}", track.TrackStartSector); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackStart = {0}", track.TrackStartSector); position += 4; uint trackLen = BitConverter.ToUInt32(descriptor, position); track.TrackEndSector = (track.TrackStartSector + trackLen) - 1; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackEnd = {0}", track.TrackEndSector); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackEnd = {0}", track.TrackEndSector); position += 4; if(track.TrackSequence > session.EndTrack) @@ -234,10 +234,10 @@ namespace Aaru.DiscImages position += 16; uint readMode = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\treadMode = {0}", readMode); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\treadMode = {0}", readMode); position += 4; uint trackCtl = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackCtl = {0}", trackCtl); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackCtl = {0}", trackCtl); position += 4; // Skip unknown @@ -245,28 +245,28 @@ namespace Aaru.DiscImages byte[] isrc = new byte[12]; Array.Copy(descriptor, position, isrc, 0, 12); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tisrc = {0}", StringHandlers.CToString(isrc)); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tisrc = {0}", StringHandlers.CToString(isrc)); position += 12; uint isrcValid = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tisrc_valid = {0}", isrcValid); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tisrc_valid = {0}", isrcValid); position += 4; // Skip unknown position += 87; byte sessionType = descriptor[position]; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tsessionType = {0}", sessionType); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tsessionType = {0}", sessionType); position++; // Skip unknown position += 5; byte trackFollows = descriptor[position]; - DicConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackFollows = {0}", trackFollows); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\ttrackFollows = {0}", trackFollows); position += 2; uint endAddress = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "\tendAddress = {0}", endAddress); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "\tendAddress = {0}", endAddress); position += 4; // As to skip the lead-in @@ -553,57 +553,57 @@ namespace Aaru.DiscImages lastSessionTrack = session.EndTrack; Sessions.Add(session); - DicConsole.DebugWriteLine("DiscJuggler plugin", "session.StartTrack = {0}", session.StartTrack); - DicConsole.DebugWriteLine("DiscJuggler plugin", "session.StartSector = {0}", session.StartSector); - DicConsole.DebugWriteLine("DiscJuggler plugin", "session.EndTrack = {0}", session.EndTrack); - DicConsole.DebugWriteLine("DiscJuggler plugin", "session.EndSector = {0}", session.EndSector); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "session.StartTrack = {0}", session.StartTrack); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "session.StartSector = {0}", session.StartSector); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "session.EndTrack = {0}", session.EndTrack); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "session.EndSector = {0}", session.EndSector); - DicConsole.DebugWriteLine("DiscJuggler plugin", "session.SessionSequence = {0}", + AaruConsole.DebugWriteLine("DiscJuggler plugin", "session.SessionSequence = {0}", session.SessionSequence); } // Skip unknown position += 16; - DicConsole.DebugWriteLine("DiscJuggler plugin", "Current position = {0}", position); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "Current position = {0}", position); byte[] filenameB = new byte[descriptor[position]]; position++; Array.Copy(descriptor, position, filenameB, 0, filenameB.Length); position += filenameB.Length; string filename = Path.GetFileName(Encoding.Default.GetString(filenameB)); - DicConsole.DebugWriteLine("DiscJuggler plugin", "filename = {0}", filename); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "filename = {0}", filename); // Skip unknown position += 29; mediumType = BitConverter.ToUInt16(descriptor, position); position += 2; - DicConsole.DebugWriteLine("DiscJuggler plugin", "mediumType = {0}", mediumType); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "mediumType = {0}", mediumType); uint discSize = BitConverter.ToUInt32(descriptor, position); position += 4; - DicConsole.DebugWriteLine("DiscJuggler plugin", "discSize = {0}", discSize); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "discSize = {0}", discSize); byte[] volidB = new byte[descriptor[position]]; position++; Array.Copy(descriptor, position, volidB, 0, volidB.Length); position += volidB.Length; string volid = Path.GetFileName(Encoding.Default.GetString(volidB)); - DicConsole.DebugWriteLine("DiscJuggler plugin", "volid = {0}", volid); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "volid = {0}", volid); // Skip unknown position += 9; byte[] mcn = new byte[13]; Array.Copy(descriptor, position, mcn, 0, 13); - DicConsole.DebugWriteLine("DiscJuggler plugin", "mcn = {0}", StringHandlers.CToString(mcn)); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "mcn = {0}", StringHandlers.CToString(mcn)); position += 13; uint mcnValid = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "mcn_valid = {0}", mcnValid); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "mcn_valid = {0}", mcnValid); position += 4; uint cdtextLen = BitConverter.ToUInt32(descriptor, position); - DicConsole.DebugWriteLine("DiscJuggler plugin", "cdtextLen = {0}", cdtextLen); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "cdtextLen = {0}", cdtextLen); position += 4; if(cdtextLen > 0) @@ -617,7 +617,7 @@ namespace Aaru.DiscImages // Skip unknown position += 12; - DicConsole.DebugWriteLine("DiscJuggler plugin", "End position = {0}", position); + AaruConsole.DebugWriteLine("DiscJuggler plugin", "End position = {0}", position); if(imageInfo.MediaType == MediaType.CDROM) { diff --git a/Aaru.Images/DiskCopy42/Identify.cs b/Aaru.Images/DiskCopy42/Identify.cs index 87747287c..7bf17b246 100644 --- a/Aaru.Images/DiskCopy42/Identify.cs +++ b/Aaru.Images/DiskCopy42/Identify.cs @@ -65,15 +65,15 @@ namespace Aaru.DiscImages tmpHeader.Valid = buffer[0x52]; tmpHeader.Reserved = buffer[0x53]; - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.diskName = \"{0}\"", tmpHeader.DiskName); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.dataSize = {0} bytes", tmpHeader.DataSize); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.tagSize = {0} bytes", tmpHeader.TagSize); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.dataChecksum = 0x{0:X8}", tmpHeader.DataChecksum); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.tagChecksum = 0x{0:X8}", tmpHeader.TagChecksum); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.format = 0x{0:X2}", tmpHeader.Format); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.fmtByte = 0x{0:X2}", tmpHeader.FmtByte); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.valid = {0}", tmpHeader.Valid); - DicConsole.DebugWriteLine("DC42 plugin", "tmp_header.reserved = {0}", tmpHeader.Reserved); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.diskName = \"{0}\"", tmpHeader.DiskName); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.dataSize = {0} bytes", tmpHeader.DataSize); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.tagSize = {0} bytes", tmpHeader.TagSize); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.dataChecksum = 0x{0:X8}", tmpHeader.DataChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.tagChecksum = 0x{0:X8}", tmpHeader.TagChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.format = 0x{0:X2}", tmpHeader.Format); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.fmtByte = 0x{0:X2}", tmpHeader.FmtByte); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.valid = {0}", tmpHeader.Valid); + AaruConsole.DebugWriteLine("DC42 plugin", "tmp_header.reserved = {0}", tmpHeader.Reserved); if(tmpHeader.Valid != 1 || tmpHeader.Reserved != 0) return false; @@ -95,7 +95,7 @@ namespace Aaru.DiscImages tmpHeader.Format != kSonyFormat1680K && tmpHeader.Format != kSigmaFormatTwiggy && tmpHeader.Format != kNotStandardFormat) { - DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.format = 0x{0:X2} value", + AaruConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.format = 0x{0:X2} value", tmpHeader.Format); return false; @@ -106,7 +106,7 @@ namespace Aaru.DiscImages tmpHeader.FmtByte != kInvalidFmtByte && tmpHeader.FmtByte != kSigmaFmtByteTwiggy && tmpHeader.FmtByte != kFmtNotStandard && tmpHeader.FmtByte != kMacOSXFmtByte) { - DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", + AaruConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", tmpHeader.FmtByte); return false; @@ -114,7 +114,7 @@ namespace Aaru.DiscImages if(tmpHeader.FmtByte != kInvalidFmtByte) return true; - DicConsole.DebugWriteLine("DC42 plugin", "Image says it's unformatted"); + AaruConsole.DebugWriteLine("DC42 plugin", "Image says it's unformatted"); return false; } diff --git a/Aaru.Images/DiskCopy42/Read.cs b/Aaru.Images/DiskCopy42/Read.cs index 97902235b..286a049cd 100644 --- a/Aaru.Images/DiskCopy42/Read.cs +++ b/Aaru.Images/DiskCopy42/Read.cs @@ -71,15 +71,15 @@ namespace Aaru.DiscImages header.Valid = buffer[0x52]; header.Reserved = buffer[0x53]; - DicConsole.DebugWriteLine("DC42 plugin", "header.diskName = \"{0}\"", header.DiskName); - DicConsole.DebugWriteLine("DC42 plugin", "header.dataSize = {0} bytes", header.DataSize); - DicConsole.DebugWriteLine("DC42 plugin", "header.tagSize = {0} bytes", header.TagSize); - DicConsole.DebugWriteLine("DC42 plugin", "header.dataChecksum = 0x{0:X8}", header.DataChecksum); - DicConsole.DebugWriteLine("DC42 plugin", "header.tagChecksum = 0x{0:X8}", header.TagChecksum); - DicConsole.DebugWriteLine("DC42 plugin", "header.format = 0x{0:X2}", header.Format); - DicConsole.DebugWriteLine("DC42 plugin", "header.fmtByte = 0x{0:X2}", header.FmtByte); - DicConsole.DebugWriteLine("DC42 plugin", "header.valid = {0}", header.Valid); - DicConsole.DebugWriteLine("DC42 plugin", "header.reserved = {0}", header.Reserved); + AaruConsole.DebugWriteLine("DC42 plugin", "header.diskName = \"{0}\"", header.DiskName); + AaruConsole.DebugWriteLine("DC42 plugin", "header.dataSize = {0} bytes", header.DataSize); + AaruConsole.DebugWriteLine("DC42 plugin", "header.tagSize = {0} bytes", header.TagSize); + AaruConsole.DebugWriteLine("DC42 plugin", "header.dataChecksum = 0x{0:X8}", header.DataChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "header.tagChecksum = 0x{0:X8}", header.TagChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "header.format = 0x{0:X2}", header.Format); + AaruConsole.DebugWriteLine("DC42 plugin", "header.fmtByte = 0x{0:X2}", header.FmtByte); + AaruConsole.DebugWriteLine("DC42 plugin", "header.valid = {0}", header.Valid); + AaruConsole.DebugWriteLine("DC42 plugin", "header.reserved = {0}", header.Reserved); if(header.Valid != 1 || header.Reserved != 0) return false; @@ -101,7 +101,7 @@ namespace Aaru.DiscImages header.Format != kSonyFormat1680K && header.Format != kSigmaFormatTwiggy && header.Format != kNotStandardFormat) { - DicConsole.DebugWriteLine("DC42 plugin", "Unknown header.format = 0x{0:X2} value", header.Format); + AaruConsole.DebugWriteLine("DC42 plugin", "Unknown header.format = 0x{0:X2} value", header.Format); return false; } @@ -111,14 +111,14 @@ namespace Aaru.DiscImages header.FmtByte != kInvalidFmtByte && header.FmtByte != kSigmaFmtByteTwiggy && header.FmtByte != kFmtNotStandard && header.FmtByte != kMacOSXFmtByte) { - DicConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", header.FmtByte); + AaruConsole.DebugWriteLine("DC42 plugin", "Unknown tmp_header.fmtByte = 0x{0:X2} value", header.FmtByte); return false; } if(header.FmtByte == kInvalidFmtByte) { - DicConsole.DebugWriteLine("DC42 plugin", "Image says it's unformatted"); + AaruConsole.DebugWriteLine("DC42 plugin", "Image says it's unformatted"); return false; } @@ -134,11 +134,11 @@ namespace Aaru.DiscImages if(header.TagSize != 0) { bptag = (uint)(header.TagSize / imageInfo.Sectors); - DicConsole.DebugWriteLine("DC42 plugin", "bptag = {0} bytes", bptag); + AaruConsole.DebugWriteLine("DC42 plugin", "bptag = {0} bytes", bptag); if(bptag != 12 && bptag != 20 && bptag != 24) { - DicConsole.DebugWriteLine("DC42 plugin", "Unknown tag size"); + AaruConsole.DebugWriteLine("DC42 plugin", "Unknown tag size"); return false; } @@ -219,7 +219,7 @@ namespace Aaru.DiscImages // Detect a Macintosh Twiggy if(mfsMagic == 0xD2D7 && mfsAllBlocks == 422) { - DicConsole.DebugWriteLine("DC42 plugin", "Macintosh Twiggy detected, reversing disk sides"); + AaruConsole.DebugWriteLine("DC42 plugin", "Macintosh Twiggy detected, reversing disk sides"); Array.Copy(data, header.DataSize / 2, twiggyCache, 0, header.DataSize / 2); Array.Copy(tags, header.TagSize / 2, twiggyCacheTags, 0, header.TagSize / 2); Array.Copy(data, 0, twiggyCache, header.DataSize / 2, header.DataSize / 2); @@ -227,7 +227,7 @@ namespace Aaru.DiscImages } else { - DicConsole.DebugWriteLine("DC42 plugin", "Lisa Twiggy detected, reversing second half of disk"); + AaruConsole.DebugWriteLine("DC42 plugin", "Lisa Twiggy detected, reversing second half of disk"); Array.Copy(data, 0, twiggyCache, 0, header.DataSize / 2); Array.Copy(tags, 0, twiggyCacheTags, 0, header.TagSize / 2); @@ -323,11 +323,11 @@ namespace Aaru.DiscImages } catch(InvalidCastException) { } - DicConsole.DebugWriteLine("DC42 plugin", "Image application = {0} version {1}", imageInfo.Application, + AaruConsole.DebugWriteLine("DC42 plugin", "Image application = {0} version {1}", imageInfo.Application, imageInfo.ApplicationVersion); imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("DiskCopy 4.2 image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("DiskCopy 4.2 image contains a disk of type {0}", imageInfo.MediaType); switch(imageInfo.MediaType) { diff --git a/Aaru.Images/DiskCopy42/Verify.cs b/Aaru.Images/DiskCopy42/Verify.cs index 8759dd590..42fef381e 100644 --- a/Aaru.Images/DiskCopy42/Verify.cs +++ b/Aaru.Images/DiskCopy42/Verify.cs @@ -43,27 +43,27 @@ namespace Aaru.DiscImages byte[] tags = new byte[header.TagSize]; uint tagsChk = 0; - DicConsole.DebugWriteLine("DC42 plugin", "Reading data"); + AaruConsole.DebugWriteLine("DC42 plugin", "Reading data"); Stream datastream = dc42ImageFilter.GetDataForkStream(); datastream.Seek(dataOffset, SeekOrigin.Begin); datastream.Read(data, 0, (int)header.DataSize); - DicConsole.DebugWriteLine("DC42 plugin", "Calculating data checksum"); + AaruConsole.DebugWriteLine("DC42 plugin", "Calculating data checksum"); uint dataChk = DC42CheckSum(data); - DicConsole.DebugWriteLine("DC42 plugin", "Calculated data checksum = 0x{0:X8}", dataChk); - DicConsole.DebugWriteLine("DC42 plugin", "Stored data checksum = 0x{0:X8}", header.DataChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "Calculated data checksum = 0x{0:X8}", dataChk); + AaruConsole.DebugWriteLine("DC42 plugin", "Stored data checksum = 0x{0:X8}", header.DataChecksum); if(header.TagSize <= 0) return dataChk == header.DataChecksum && tagsChk == header.TagChecksum; - DicConsole.DebugWriteLine("DC42 plugin", "Reading tags"); + AaruConsole.DebugWriteLine("DC42 plugin", "Reading tags"); Stream tagstream = dc42ImageFilter.GetDataForkStream(); tagstream.Seek(tagOffset, SeekOrigin.Begin); tagstream.Read(tags, 0, (int)header.TagSize); - DicConsole.DebugWriteLine("DC42 plugin", "Calculating tag checksum"); + AaruConsole.DebugWriteLine("DC42 plugin", "Calculating tag checksum"); tagsChk = DC42CheckSum(tags); - DicConsole.DebugWriteLine("DC42 plugin", "Calculated tag checksum = 0x{0:X8}", tagsChk); - DicConsole.DebugWriteLine("DC42 plugin", "Stored tag checksum = 0x{0:X8}", header.TagChecksum); + AaruConsole.DebugWriteLine("DC42 plugin", "Calculated tag checksum = 0x{0:X8}", tagsChk); + AaruConsole.DebugWriteLine("DC42 plugin", "Stored tag checksum = 0x{0:X8}", header.TagChecksum); return dataChk == header.DataChecksum && tagsChk == header.TagChecksum; } diff --git a/Aaru.Images/DriDiskCopy/Identify.cs b/Aaru.Images/DriDiskCopy/Identify.cs index aad539509..87483fae6 100644 --- a/Aaru.Images/DriDiskCopy/Identify.cs +++ b/Aaru.Images/DriDiskCopy/Identify.cs @@ -54,35 +54,35 @@ namespace Aaru.DiscImages string sig = StringHandlers.CToString(tmpFooter.signature); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.signature = \"{0}\"", sig); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.five = {0}", tmpFooter.bpb.five); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.driveCode = {0}", tmpFooter.bpb.driveCode); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown = {0}", tmpFooter.bpb.unknown); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.cylinders = {0}", tmpFooter.bpb.cylinders); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown2 = {0}", tmpFooter.bpb.unknown2); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.bps = {0}", tmpFooter.bpb.bps); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.spc = {0}", tmpFooter.bpb.spc); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.rsectors = {0}", tmpFooter.bpb.rsectors); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.fats_no = {0}", tmpFooter.bpb.fats_no); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sectors = {0}", tmpFooter.bpb.sectors); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.media_descriptor = {0}", + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.signature = \"{0}\"", sig); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.five = {0}", tmpFooter.bpb.five); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.driveCode = {0}", tmpFooter.bpb.driveCode); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown = {0}", tmpFooter.bpb.unknown); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.cylinders = {0}", tmpFooter.bpb.cylinders); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown2 = {0}", tmpFooter.bpb.unknown2); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.bps = {0}", tmpFooter.bpb.bps); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.spc = {0}", tmpFooter.bpb.spc); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.rsectors = {0}", tmpFooter.bpb.rsectors); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.fats_no = {0}", tmpFooter.bpb.fats_no); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sectors = {0}", tmpFooter.bpb.sectors); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.media_descriptor = {0}", tmpFooter.bpb.media_descriptor); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.spfat = {0}", tmpFooter.bpb.spfat); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sptrack = {0}", tmpFooter.bpb.sptrack); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.heads = {0}", tmpFooter.bpb.heads); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.hsectors = {0}", tmpFooter.bpb.hsectors); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.drive_no = {0}", tmpFooter.bpb.drive_no); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown3 = {0}", tmpFooter.bpb.unknown3); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown4 = {0}", tmpFooter.bpb.unknown4); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sptrack2 = {0}", tmpFooter.bpb.sptrack2); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.spfat = {0}", tmpFooter.bpb.spfat); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sptrack = {0}", tmpFooter.bpb.sptrack); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.heads = {0}", tmpFooter.bpb.heads); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.hsectors = {0}", tmpFooter.bpb.hsectors); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.drive_no = {0}", tmpFooter.bpb.drive_no); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown3 = {0}", tmpFooter.bpb.unknown3); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.unknown4 = {0}", tmpFooter.bpb.unknown4); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "tmp_footer.bpb.sptrack2 = {0}", tmpFooter.bpb.sptrack2); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "ArrayHelpers.ArrayIsNullOrEmpty(tmp_footer.bpb.unknown5) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(tmpFooter.bpb.unknown5)); Regex regexSignature = new Regex(REGEX_DRI); Match matchSignature = regexSignature.Match(sig); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "MatchSignature.Success? = {0}", matchSignature.Success); + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "MatchSignature.Success? = {0}", matchSignature.Success); if(!matchSignature.Success) return false; diff --git a/Aaru.Images/DriDiskCopy/Read.cs b/Aaru.Images/DriDiskCopy/Read.cs index a9181770c..0a64e49f6 100644 --- a/Aaru.Images/DriDiskCopy/Read.cs +++ b/Aaru.Images/DriDiskCopy/Read.cs @@ -79,7 +79,7 @@ namespace Aaru.DiscImages imageInfo.CreationTime = imageFilter.GetCreationTime(); imageInfo.LastModificationTime = imageFilter.GetLastWriteTime(); - DicConsole.DebugWriteLine("DRI DiskCopy plugin", "Image application = {0} version {1}", + AaruConsole.DebugWriteLine("DRI DiskCopy plugin", "Image application = {0} version {1}", imageInfo.Application, imageInfo.ApplicationVersion); // Correct some incorrect data in images of NEC 2HD disks @@ -112,7 +112,7 @@ namespace Aaru.DiscImages } imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("Digital Research DiskCopy image contains a disk of type {0}", + AaruConsole.VerboseWriteLine("Digital Research DiskCopy image contains a disk of type {0}", imageInfo.MediaType); return true; diff --git a/Aaru.Images/GDI/Identify.cs b/Aaru.Images/GDI/Identify.cs index 49240a956..dbacfb76b 100644 --- a/Aaru.Images/GDI/Identify.cs +++ b/Aaru.Images/GDI/Identify.cs @@ -99,9 +99,9 @@ namespace Aaru.DiscImages } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetBasePath()); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetBasePath()); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } } diff --git a/Aaru.Images/GDI/Read.cs b/Aaru.Images/GDI/Read.cs index e4351f715..c93ff2ab7 100644 --- a/Aaru.Images/GDI/Read.cs +++ b/Aaru.Images/GDI/Read.cs @@ -86,7 +86,7 @@ namespace Aaru.DiscImages if(!trackMatch.Success) throw new ImageNotSupportedException($"Unknown line \"{line}\" at line {lineNumber}"); - DicConsole.DebugWriteLine("GDI plugin", + AaruConsole.DebugWriteLine("GDI plugin", "Found track {0} starts at {1} flags {2} type {3} file {4} offset {5} at line {6}", trackMatch.Groups["track"].Value, trackMatch.Groups["start"].Value, trackMatch.Groups["flags"].Value, trackMatch.Groups["type"].Value, @@ -182,45 +182,45 @@ namespace Aaru.DiscImages discimage.Disktype = MediaType.GDROM; // DEBUG information - DicConsole.DebugWriteLine("GDI plugin", "Disc image parsing results"); + AaruConsole.DebugWriteLine("GDI plugin", "Disc image parsing results"); - DicConsole.DebugWriteLine("GDI plugin", "Session information:"); - DicConsole.DebugWriteLine("GDI plugin", "\tDisc contains {0} sessions", discimage.Sessions.Count); + AaruConsole.DebugWriteLine("GDI plugin", "Session information:"); + AaruConsole.DebugWriteLine("GDI plugin", "\tDisc contains {0} sessions", discimage.Sessions.Count); for(int i = 0; i < discimage.Sessions.Count; i++) { - DicConsole.DebugWriteLine("GDI plugin", "\tSession {0} information:", i + 1); - DicConsole.DebugWriteLine("GDI plugin", "\t\tStarting track: {0}", + AaruConsole.DebugWriteLine("GDI plugin", "\tSession {0} information:", i + 1); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tStarting track: {0}", discimage.Sessions[i].StartTrack); - DicConsole.DebugWriteLine("GDI plugin", "\t\tStarting sector: {0}", + AaruConsole.DebugWriteLine("GDI plugin", "\t\tStarting sector: {0}", discimage.Sessions[i].StartSector); - DicConsole.DebugWriteLine("GDI plugin", "\t\tEnding track: {0}", discimage.Sessions[i].EndTrack); - DicConsole.DebugWriteLine("GDI plugin", "\t\tEnding sector: {0}", discimage.Sessions[i].EndSector); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tEnding track: {0}", discimage.Sessions[i].EndTrack); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tEnding sector: {0}", discimage.Sessions[i].EndSector); } - DicConsole.DebugWriteLine("GDI plugin", "Track information:"); - DicConsole.DebugWriteLine("GDI plugin", "\tDisc contains {0} tracks", discimage.Tracks.Count); + AaruConsole.DebugWriteLine("GDI plugin", "Track information:"); + AaruConsole.DebugWriteLine("GDI plugin", "\tDisc contains {0} tracks", discimage.Tracks.Count); for(int i = 0; i < discimage.Tracks.Count; i++) { - DicConsole.DebugWriteLine("GDI plugin", "\tTrack {0} information:", discimage.Tracks[i].Sequence); - DicConsole.DebugWriteLine("GDI plugin", "\t\t{0} bytes per sector", discimage.Tracks[i].Bps); - DicConsole.DebugWriteLine("GDI plugin", "\t\tPregap: {0} sectors", discimage.Tracks[i].Pregap); + AaruConsole.DebugWriteLine("GDI plugin", "\tTrack {0} information:", discimage.Tracks[i].Sequence); + AaruConsole.DebugWriteLine("GDI plugin", "\t\t{0} bytes per sector", discimage.Tracks[i].Bps); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tPregap: {0} sectors", discimage.Tracks[i].Pregap); if((discimage.Tracks[i].Flags & 0x8) == 0x8) - DicConsole.DebugWriteLine("GDI plugin", "\t\tTrack is flagged as quadraphonic"); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tTrack is flagged as quadraphonic"); if((discimage.Tracks[i].Flags & 0x4) == 0x4) - DicConsole.DebugWriteLine("GDI plugin", "\t\tTrack is data"); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tTrack is data"); if((discimage.Tracks[i].Flags & 0x2) == 0x2) - DicConsole.DebugWriteLine("GDI plugin", "\t\tTrack allows digital copy"); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tTrack allows digital copy"); if((discimage.Tracks[i].Flags & 0x1) == 0x1) - DicConsole.DebugWriteLine("GDI plugin", "\t\tTrack has pre-emphasis applied"); + AaruConsole.DebugWriteLine("GDI plugin", "\t\tTrack has pre-emphasis applied"); - DicConsole.DebugWriteLine("GDI plugin", + AaruConsole.DebugWriteLine("GDI plugin", "\t\tTrack resides in file {0}, type defined as {1}, starting at byte {2}", discimage.Tracks[i].Trackfilter, discimage.Tracks[i].Tracktype, discimage.Tracks[i].Offset); } - DicConsole.DebugWriteLine("GDI plugin", "Building offset map"); + AaruConsole.DebugWriteLine("GDI plugin", "Building offset map"); Partitions = new List(); ulong byteOffset = 0; @@ -276,15 +276,15 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.OpticalDisc; - DicConsole.VerboseWriteLine("GDI image describes a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("GDI image describes a disc of type {0}", imageInfo.MediaType); return true; } catch(Exception ex) { - DicConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetBasePath()); - DicConsole.ErrorWriteLine("Exception: {0}", ex.Message); - DicConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Exception trying to identify image file {0}", imageFilter.GetBasePath()); + AaruConsole.ErrorWriteLine("Exception: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Stack trace: {0}", ex.StackTrace); return false; } } diff --git a/Aaru.Images/HDCopy/Read.cs b/Aaru.Images/HDCopy/Read.cs index c4fa0cf79..c79bc69cc 100644 --- a/Aaru.Images/HDCopy/Read.cs +++ b/Aaru.Images/HDCopy/Read.cs @@ -52,7 +52,7 @@ namespace Aaru.DiscImages stream.Read(header, 0, 2 + 2 * 82); HdcpFileHeader fheader = Marshal.ByteArrayToStructureLittleEndian(header); - DicConsole.DebugWriteLine("HDCP plugin", + AaruConsole.DebugWriteLine("HDCP plugin", "Detected HD-Copy image with {0} tracks and {1} sectors per track.", fheader.lastCylinder + 1, fheader.sectorsPerTrack); @@ -91,7 +91,7 @@ namespace Aaru.DiscImages // assume block sizes are positive if(blkLength < 0) return false; - DicConsole.DebugWriteLine("HDCP plugin", "Track {0} offset 0x{1:x8}, size={2:x4}", i, currentOffset, + AaruConsole.DebugWriteLine("HDCP plugin", "Track {0} offset 0x{1:x8}, size={2:x4}", i, currentOffset, blkLength); trackOffset[i] = currentOffset; diff --git a/Aaru.Images/IMD/Read.cs b/Aaru.Images/IMD/Read.cs index 64802d28f..98b3bc690 100644 --- a/Aaru.Images/IMD/Read.cs +++ b/Aaru.Images/IMD/Read.cs @@ -178,9 +178,9 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("IMD image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("IMD image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("IMD comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("IMD comments: {0}", imageInfo.Comments); return true; } diff --git a/Aaru.Images/KryoFlux/Read.cs b/Aaru.Images/KryoFlux/Read.cs index aa5c3d9f4..f3bd0cc07 100644 --- a/Aaru.Images/KryoFlux/Read.cs +++ b/Aaru.Images/KryoFlux/Read.cs @@ -89,27 +89,27 @@ namespace Aaru.DiscImages { if(head == 0) { - DicConsole.DebugWriteLine("KryoFlux plugin", + AaruConsole.DebugWriteLine("KryoFlux plugin", "Cannot find cyl 0 hd 0, supposing only top head was dumped"); topHead = true; heads = 1; continue; } - DicConsole.DebugWriteLine("KryoFlux plugin", + AaruConsole.DebugWriteLine("KryoFlux plugin", "Cannot find cyl 0 hd 1, supposing only bottom head was dumped"); heads = 1; continue; } else if(cylinder == 1) { - DicConsole.DebugWriteLine("KryoFlux plugin", "Cannot find cyl 1, supposing double stepping"); + AaruConsole.DebugWriteLine("KryoFlux plugin", "Cannot find cyl 1, supposing double stepping"); step = 2; continue; } else { - DicConsole.DebugWriteLine("KryoFlux plugin", "Arrived end of disk at cylinder {0}", cylinder); + AaruConsole.DebugWriteLine("KryoFlux plugin", "Arrived end of disk at cylinder {0}", cylinder); break; } @@ -160,7 +160,7 @@ namespace Aaru.DiscImages { kvp[0] = kvp[0].Trim(); kvp[1] = kvp[1].Trim(); - DicConsole.DebugWriteLine("KryoFlux plugin", "\"{0}\" = \"{1}\"", kvp[0], kvp[1]); + AaruConsole.DebugWriteLine("KryoFlux plugin", "\"{0}\" = \"{1}\"", kvp[0], kvp[1]); switch(kvp[0]) { @@ -187,7 +187,7 @@ namespace Aaru.DiscImages DateTime blockTimestamp = new DateTime(blockDate.Year, blockDate.Month, blockDate.Day, blockTime.Hour, blockTime.Minute, blockTime.Second); - DicConsole.DebugWriteLine("KryoFlux plugin", "Found timestamp: {0}", blockTimestamp); + AaruConsole.DebugWriteLine("KryoFlux plugin", "Found timestamp: {0}", blockTimestamp); if(blockTimestamp < Info.CreationTime) imageInfo.CreationTime = blockTimestamp; if(blockTimestamp > Info.LastModificationTime) imageInfo.LastModificationTime = blockTimestamp; diff --git a/Aaru.Images/MaxiDisk/Identify.cs b/Aaru.Images/MaxiDisk/Identify.cs index 048a71d41..d169f3f5b 100644 --- a/Aaru.Images/MaxiDisk/Identify.cs +++ b/Aaru.Images/MaxiDisk/Identify.cs @@ -51,15 +51,15 @@ namespace Aaru.DiscImages HdkHeader tmpHeader = Marshal.ByteArrayToStructureLittleEndian(buffer); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown = {0}", tmpHeader.unknown); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.diskType = {0}", tmpHeader.diskType); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.heads = {0}", tmpHeader.heads); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.cylinders = {0}", tmpHeader.cylinders); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.bytesPerSector = {0}", tmpHeader.bytesPerSector); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.sectorsPerTrack = {0}", + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown = {0}", tmpHeader.unknown); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.diskType = {0}", tmpHeader.diskType); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.heads = {0}", tmpHeader.heads); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.cylinders = {0}", tmpHeader.cylinders); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.bytesPerSector = {0}", tmpHeader.bytesPerSector); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.sectorsPerTrack = {0}", tmpHeader.sectorsPerTrack); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown2 = {0}", tmpHeader.unknown2); - DicConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown3 = {0}", tmpHeader.unknown3); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown2 = {0}", tmpHeader.unknown2); + AaruConsole.DebugWriteLine("MAXI Disk plugin", "tmp_header.unknown3 = {0}", tmpHeader.unknown3); // This is hardcoded // But its possible values are unknown... diff --git a/Aaru.Images/NDIF/Read.cs b/Aaru.Images/NDIF/Read.cs index d5c01055f..ad24419b0 100644 --- a/Aaru.Images/NDIF/Read.cs +++ b/Aaru.Images/NDIF/Read.cs @@ -78,26 +78,26 @@ namespace Aaru.DiscImages header = Marshal.ByteArrayToStructureBigEndian(bcem); - DicConsole.DebugWriteLine("NDIF plugin", "footer.type = {0}", header.version); - DicConsole.DebugWriteLine("NDIF plugin", "footer.driver = {0}", header.driver); - DicConsole.DebugWriteLine("NDIF plugin", "footer.name = {0}", + AaruConsole.DebugWriteLine("NDIF plugin", "footer.type = {0}", header.version); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.driver = {0}", header.driver); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.name = {0}", StringHandlers.PascalToString(header.name, Encoding.GetEncoding("macintosh"))); - DicConsole.DebugWriteLine("NDIF plugin", "footer.sectors = {0}", header.sectors); - DicConsole.DebugWriteLine("NDIF plugin", "footer.maxSectorsPerChunk = {0}", header.maxSectorsPerChunk); - DicConsole.DebugWriteLine("NDIF plugin", "footer.dataOffset = {0}", header.dataOffset); - DicConsole.DebugWriteLine("NDIF plugin", "footer.crc = 0x{0:X7}", header.crc); - DicConsole.DebugWriteLine("NDIF plugin", "footer.segmented = {0}", header.segmented); - DicConsole.DebugWriteLine("NDIF plugin", "footer.p1 = 0x{0:X8}", header.p1); - DicConsole.DebugWriteLine("NDIF plugin", "footer.p2 = 0x{0:X8}", header.p2); - DicConsole.DebugWriteLine("NDIF plugin", "footer.unknown[0] = 0x{0:X8}", header.unknown[0]); - DicConsole.DebugWriteLine("NDIF plugin", "footer.unknown[1] = 0x{0:X8}", header.unknown[1]); - DicConsole.DebugWriteLine("NDIF plugin", "footer.unknown[2] = 0x{0:X8}", header.unknown[2]); - DicConsole.DebugWriteLine("NDIF plugin", "footer.unknown[3] = 0x{0:X8}", header.unknown[3]); - DicConsole.DebugWriteLine("NDIF plugin", "footer.unknown[4] = 0x{0:X8}", header.unknown[4]); - DicConsole.DebugWriteLine("NDIF plugin", "footer.encrypted = {0}", header.encrypted); - DicConsole.DebugWriteLine("NDIF plugin", "footer.hash = 0x{0:X8}", header.hash); - DicConsole.DebugWriteLine("NDIF plugin", "footer.chunks = {0}", header.chunks); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.sectors = {0}", header.sectors); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.maxSectorsPerChunk = {0}", header.maxSectorsPerChunk); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.dataOffset = {0}", header.dataOffset); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.crc = 0x{0:X7}", header.crc); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.segmented = {0}", header.segmented); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.p1 = 0x{0:X8}", header.p1); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.p2 = 0x{0:X8}", header.p2); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.unknown[0] = 0x{0:X8}", header.unknown[0]); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.unknown[1] = 0x{0:X8}", header.unknown[1]); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.unknown[2] = 0x{0:X8}", header.unknown[2]); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.unknown[3] = 0x{0:X8}", header.unknown[3]); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.unknown[4] = 0x{0:X8}", header.unknown[4]); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.encrypted = {0}", header.encrypted); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.hash = 0x{0:X8}", header.hash); + AaruConsole.DebugWriteLine("NDIF plugin", "footer.chunks = {0}", header.chunks); // Block chunks and headers chunks = new Dictionary(); @@ -114,10 +114,10 @@ namespace Aaru.DiscImages bChnk.offset = BigEndianBitConverter.ToUInt32(bcem, 128 + 4 + i * 12); bChnk.length = BigEndianBitConverter.ToUInt32(bcem, 128 + 8 + i * 12); - DicConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].type = 0x{1:X2}", i, bChnk.type); - DicConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].sector = {1}", i, bChnk.sector); - DicConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].offset = {1}", i, bChnk.offset); - DicConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].length = {1}", i, bChnk.length); + AaruConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].type = 0x{1:X2}", i, bChnk.type); + AaruConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].sector = {1}", i, bChnk.sector); + AaruConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].offset = {1}", i, bChnk.offset); + AaruConsole.DebugWriteLine("NDIF plugin", "bHdr.chunk[{0}].length = {1}", i, bChnk.length); if(bChnk.type == CHUNK_TYPE_END) break; @@ -214,7 +214,7 @@ namespace Aaru.DiscImages } } - DicConsole.DebugWriteLine("NDIF plugin", "Image application = {0} version {1}", imageInfo.Application, + AaruConsole.DebugWriteLine("NDIF plugin", "Image application = {0} version {1}", imageInfo.Application, imageInfo.ApplicationVersion); sectorCache = new Dictionary(); diff --git a/Aaru.Images/NHDr0/Identify.cs b/Aaru.Images/NHDr0/Identify.cs index 3c5c495b0..d39b140a0 100644 --- a/Aaru.Images/NHDr0/Identify.cs +++ b/Aaru.Images/NHDr0/Identify.cs @@ -57,16 +57,16 @@ namespace Aaru.DiscImages if(!nhdhdr.szFileID.SequenceEqual(signature)) return false; - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.szFileID = \"{0}\"", + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.szFileID = \"{0}\"", StringHandlers.CToString(nhdhdr.szFileID, shiftjis)); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.reserved1 = {0}", nhdhdr.reserved1); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.szComment = \"{0}\"", + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.reserved1 = {0}", nhdhdr.reserved1); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.szComment = \"{0}\"", StringHandlers.CToString(nhdhdr.szComment, shiftjis)); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.dwHeadSize = {0}", nhdhdr.dwHeadSize); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.dwCylinder = {0}", nhdhdr.dwCylinder); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wHead = {0}", nhdhdr.wHead); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wSect = {0}", nhdhdr.wSect); - DicConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wSectLen = {0}", nhdhdr.wSectLen); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.dwHeadSize = {0}", nhdhdr.dwHeadSize); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.dwCylinder = {0}", nhdhdr.dwCylinder); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wHead = {0}", nhdhdr.wHead); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wSect = {0}", nhdhdr.wSect); + AaruConsole.DebugWriteLine("NHDr0 plugin", "nhdhdr.wSectLen = {0}", nhdhdr.wSectLen); return true; } diff --git a/Aaru.Images/Nero/Identify.cs b/Aaru.Images/Nero/Identify.cs index 4726afe98..dd44f2577 100644 --- a/Aaru.Images/Nero/Identify.cs +++ b/Aaru.Images/Nero/Identify.cs @@ -56,11 +56,11 @@ namespace Aaru.DiscImages footerV2.ChunkId = BigEndianBitConverter.ToUInt32(buffer, 0); footerV2.FirstChunkOffset = BigEndianBitConverter.ToUInt64(buffer, 4); - DicConsole.DebugWriteLine("Nero plugin", "imageStream.Length = {0}", imageStream.Length); - DicConsole.DebugWriteLine("Nero plugin", "footerV1.ChunkID = 0x{0:X8}", footerV1.ChunkId); - DicConsole.DebugWriteLine("Nero plugin", "footerV1.FirstChunkOffset = {0}", footerV1.FirstChunkOffset); - DicConsole.DebugWriteLine("Nero plugin", "footerV2.ChunkID = 0x{0:X8}", footerV2.ChunkId); - DicConsole.DebugWriteLine("Nero plugin", "footerV2.FirstChunkOffset = {0}", footerV2.FirstChunkOffset); + AaruConsole.DebugWriteLine("Nero plugin", "imageStream.Length = {0}", imageStream.Length); + AaruConsole.DebugWriteLine("Nero plugin", "footerV1.ChunkID = 0x{0:X8}", footerV1.ChunkId); + AaruConsole.DebugWriteLine("Nero plugin", "footerV1.FirstChunkOffset = {0}", footerV1.FirstChunkOffset); + AaruConsole.DebugWriteLine("Nero plugin", "footerV2.ChunkID = 0x{0:X8}", footerV2.ChunkId); + AaruConsole.DebugWriteLine("Nero plugin", "footerV2.FirstChunkOffset = {0}", footerV2.FirstChunkOffset); if(footerV2.ChunkId == NERO_FOOTER_V2 && footerV2.FirstChunkOffset < (ulong)imageStream.Length) return true; diff --git a/Aaru.Images/Nero/Read.cs b/Aaru.Images/Nero/Read.cs index fee0f1a4e..4a79b8540 100644 --- a/Aaru.Images/Nero/Read.cs +++ b/Aaru.Images/Nero/Read.cs @@ -68,17 +68,17 @@ namespace Aaru.DiscImages footerV2.ChunkId = BigEndianBitConverter.ToUInt32(buffer, 0); footerV2.FirstChunkOffset = BigEndianBitConverter.ToUInt64(buffer, 4); - DicConsole.DebugWriteLine("Nero plugin", "imageStream.Length = {0}", imageStream.Length); + AaruConsole.DebugWriteLine("Nero plugin", "imageStream.Length = {0}", imageStream.Length); - DicConsole.DebugWriteLine("Nero plugin", "footerV1.ChunkID = 0x{0:X8} (\"{1}\")", footerV1.ChunkId, + AaruConsole.DebugWriteLine("Nero plugin", "footerV1.ChunkID = 0x{0:X8} (\"{1}\")", footerV1.ChunkId, Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(footerV1.ChunkId))); - DicConsole.DebugWriteLine("Nero plugin", "footerV1.FirstChunkOffset = {0}", footerV1.FirstChunkOffset); + AaruConsole.DebugWriteLine("Nero plugin", "footerV1.FirstChunkOffset = {0}", footerV1.FirstChunkOffset); - DicConsole.DebugWriteLine("Nero plugin", "footerV2.ChunkID = 0x{0:X8} (\"{1}\")", footerV2.ChunkId, + AaruConsole.DebugWriteLine("Nero plugin", "footerV2.ChunkID = 0x{0:X8} (\"{1}\")", footerV2.ChunkId, Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(footerV2.ChunkId))); - DicConsole.DebugWriteLine("Nero plugin", "footerV2.FirstChunkOffset = {0}", footerV2.FirstChunkOffset); + AaruConsole.DebugWriteLine("Nero plugin", "footerV2.FirstChunkOffset = {0}", footerV2.FirstChunkOffset); if(footerV1.ChunkId == NERO_FOOTER_V1 && footerV1.FirstChunkOffset < (ulong)imageStream.Length) @@ -88,7 +88,7 @@ namespace Aaru.DiscImages imageNewFormat = true; else { - DicConsole.DebugWrite("Nero plugin", "Nero version not recognized."); + AaruConsole.DebugWrite("Nero plugin", "Nero version not recognized."); return false; } @@ -117,16 +117,16 @@ namespace Aaru.DiscImages uint chunkId = BigEndianBitConverter.ToUInt32(chunkHeaderBuffer, 0); uint chunkLength = BigEndianBitConverter.ToUInt32(chunkHeaderBuffer, 4); - DicConsole.DebugWriteLine("Nero plugin", "ChunkID = 0x{0:X8} (\"{1}\")", chunkId, + AaruConsole.DebugWriteLine("Nero plugin", "ChunkID = 0x{0:X8} (\"{1}\")", chunkId, Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(chunkId))); - DicConsole.DebugWriteLine("Nero plugin", "ChunkLength = {0}", chunkLength); + AaruConsole.DebugWriteLine("Nero plugin", "ChunkLength = {0}", chunkLength); switch(chunkId) { case NERO_CUE_V1: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"CUES\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"CUES\" chunk, parsing {0} bytes", chunkLength); neroCuesheetV1 = new NeroV1Cuesheet @@ -148,27 +148,27 @@ namespace Aaru.DiscImages entry.Second = tmpbuffer[6]; entry.Frame = tmpbuffer[7]; - DicConsole.DebugWriteLine("Nero plugin", "Cuesheet entry {0}", (i / 8) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Cuesheet entry {0}", (i / 8) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1:X2}", (i / 8) + 1, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = {1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = {1:X2}", (i / 8) + 1, entry.TrackNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].IndexNumber = {1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].IndexNumber = {1:X2}", (i / 8) + 1, entry.IndexNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Dummy = {1:X4}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Dummy = {1:X4}", (i / 8) + 1, entry.Dummy); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Minute = {1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Minute = {1:X2}", (i / 8) + 1, entry.Minute); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Second = {1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Second = {1:X2}", (i / 8) + 1, entry.Second); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Frame = {1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Frame = {1:X2}", (i / 8) + 1, entry.Frame); neroCuesheetV1.Entries.Add(entry); @@ -179,7 +179,7 @@ namespace Aaru.DiscImages case NERO_CUE_V2: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"CUEX\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"CUEX\" chunk, parsing {0} bytes", chunkLength); neroCuesheetV2 = new NeroV2Cuesheet @@ -199,21 +199,21 @@ namespace Aaru.DiscImages entry.Dummy = tmpbuffer[3]; entry.LbaStart = BigEndianBitConverter.ToInt32(tmpbuffer, 4); - DicConsole.DebugWriteLine("Nero plugin", "Cuesheet entry {0}", (i / 8) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Cuesheet entry {0}", (i / 8) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = 0x{1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = 0x{1:X2}", (i / 8) + 1, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = {1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = {1:X2}", (i / 8) + 1, entry.TrackNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].IndexNumber = {1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].IndexNumber = {1:X2}", (i / 8) + 1, entry.IndexNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Dummy = {1:X2}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Dummy = {1:X2}", (i / 8) + 1, entry.Dummy); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].LBAStart = {1}", (i / 8) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].LBAStart = {1}", (i / 8) + 1, entry.LbaStart); neroCuesheetV2.Entries.Add(entry); @@ -224,7 +224,7 @@ namespace Aaru.DiscImages case NERO_DAO_V1: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"DAOI\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"DAOI\" chunk, parsing {0} bytes", chunkLength); neroDaov1 = new NeroV1Dao @@ -248,18 +248,18 @@ namespace Aaru.DiscImages if(!imageInfo.ReadableSectorTags.Contains(SectorTagType.CdTrackIsrc)) imageInfo.ReadableSectorTags.Add(SectorTagType.CdTrackIsrc); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV1.ChunkSizeLe = {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV1.ChunkSizeLe = {0} bytes", neroDaov1.ChunkSizeLe); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV1.UPC = \"{0}\"", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV1.UPC = \"{0}\"", StringHandlers.CToString(neroDaov1.Upc)); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV1.TocType = 0x{0:X4}", neroDaov1.TocType); + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV1.TocType = 0x{0:X4}", neroDaov1.TocType); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV1.FirstTrack = {0}", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV1.FirstTrack = {0}", neroDaov1.FirstTrack); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV1.LastTrack = {0}", neroDaov1.LastTrack); + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV1.LastTrack = {0}", neroDaov1.LastTrack); upc = neroDaov1.Upc; @@ -278,27 +278,27 @@ namespace Aaru.DiscImages entry.Index1 = BigEndianBitConverter.ToUInt32(tmpbuffer, 22); entry.EndOfTrack = BigEndianBitConverter.ToUInt32(tmpbuffer, 26); - DicConsole.DebugWriteLine("Nero plugin", "Disc-At-Once entry {0}", (i / 32) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Disc-At-Once entry {0}", (i / 32) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].ISRC = \"{1}\"", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].ISRC = \"{1}\"", (i / 32) + 1, StringHandlers.CToString(entry.Isrc)); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].SectorSize = {1}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].SectorSize = {1}", (i / 32) + 1, entry.SectorSize); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", (i / 32) + 1, (DaoMode)entry.Mode, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", (i / 32) + 1, entry.Unknown); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index0 = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index0 = {1}", (i / 32) + 1, entry.Index0); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index1 = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index1 = {1}", (i / 32) + 1, entry.Index1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].EndOfTrack = {1}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].EndOfTrack = {1}", (i / 32) + 1, entry.EndOfTrack); neroDaov1.Tracks.Add(entry); @@ -334,7 +334,7 @@ namespace Aaru.DiscImages case NERO_DAO_V2: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"DAOX\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"DAOX\" chunk, parsing {0} bytes", chunkLength); neroDaov2 = new NeroV2Dao @@ -360,18 +360,18 @@ namespace Aaru.DiscImages upc = neroDaov2.Upc; - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV2.ChunkSizeLe = {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV2.ChunkSizeLe = {0} bytes", neroDaov2.ChunkSizeLe); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV2.UPC = \"{0}\"", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV2.UPC = \"{0}\"", StringHandlers.CToString(neroDaov2.Upc)); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV2.TocType = 0x{0:X4}", neroDaov2.TocType); + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV2.TocType = 0x{0:X4}", neroDaov2.TocType); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV2.FirstTrack = {0}", + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV2.FirstTrack = {0}", neroDaov2.FirstTrack); - DicConsole.DebugWriteLine("Nero plugin", "neroDAOV2.LastTrack = {0}", neroDaov2.LastTrack); + AaruConsole.DebugWriteLine("Nero plugin", "neroDAOV2.LastTrack = {0}", neroDaov2.LastTrack); tmpbuffer = new byte[42]; @@ -388,27 +388,27 @@ namespace Aaru.DiscImages entry.Index1 = BigEndianBitConverter.ToUInt64(tmpbuffer, 26); entry.EndOfTrack = BigEndianBitConverter.ToUInt64(tmpbuffer, 34); - DicConsole.DebugWriteLine("Nero plugin", "Disc-At-Once entry {0}", (i / 32) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Disc-At-Once entry {0}", (i / 32) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].ISRC = \"{1}\"", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].ISRC = \"{1}\"", (i / 32) + 1, StringHandlers.CToString(entry.Isrc)); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].SectorSize = {1}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].SectorSize = {1}", (i / 32) + 1, entry.SectorSize); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", (i / 32) + 1, (DaoMode)entry.Mode, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = {1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = {1:X2}", (i / 32) + 1, entry.Unknown); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index0 = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index0 = {1}", (i / 32) + 1, entry.Index0); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index1 = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Index1 = {1}", (i / 32) + 1, entry.Index1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].EndOfTrack = {1}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].EndOfTrack = {1}", (i / 32) + 1, entry.EndOfTrack); neroDaov2.Tracks.Add(entry); @@ -444,7 +444,7 @@ namespace Aaru.DiscImages case NERO_CDTEXT: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"CDTX\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"CDTX\" chunk, parsing {0} bytes", chunkLength); neroCdtxt = new NeroCdText @@ -467,24 +467,24 @@ namespace Aaru.DiscImages Array.Copy(tmpbuffer, 4, entry.Text, 0, 12); entry.Crc = BigEndianBitConverter.ToUInt16(tmpbuffer, 16); - DicConsole.DebugWriteLine("Nero plugin", "CD-TEXT entry {0}", (i / 18) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "CD-TEXT entry {0}", (i / 18) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].PackType = 0x{1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].PackType = 0x{1:X2}", (i / 18) + 1, entry.PackType); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = 0x{1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].TrackNumber = 0x{1:X2}", (i / 18) + 1, entry.TrackNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].PackNumber = 0x{1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].PackNumber = 0x{1:X2}", (i / 18) + 1, entry.PackNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].BlockNumber = 0x{1:X2}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].BlockNumber = 0x{1:X2}", (i / 18) + 1, entry.BlockNumber); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Text = \"{1}\"", (i / 18) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Text = \"{1}\"", (i / 18) + 1, StringHandlers.CToString(entry.Text)); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].CRC = 0x{1:X4}", (i / 18) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].CRC = 0x{1:X4}", (i / 18) + 1, entry.Crc); neroCdtxt.Packs.Add(entry); @@ -495,7 +495,7 @@ namespace Aaru.DiscImages case NERO_TAO_V1: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"ETNF\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"ETNF\" chunk, parsing {0} bytes", chunkLength); neroTaov1 = new NeroV1Tao @@ -516,21 +516,21 @@ namespace Aaru.DiscImages entry.StartLba = BigEndianBitConverter.ToUInt32(tmpbuffer, 12); entry.Unknown = BigEndianBitConverter.ToUInt32(tmpbuffer, 16); - DicConsole.DebugWriteLine("Nero plugin", "Track-at-Once entry {0}", (i / 20) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Track-at-Once entry {0}", (i / 20) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Offset = {1}", (i / 20) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Offset = {1}", (i / 20) + 1, entry.Offset); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Length = {1} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Length = {1} bytes", (i / 20) + 1, entry.Length); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", (i / 20) + 1, (DaoMode)entry.Mode, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].StartLBA = {1}", (i / 20) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].StartLBA = {1}", (i / 20) + 1, entry.StartLba); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", (i / 20) + 1, entry.Unknown); neroTaov1.Tracks.Add(entry); @@ -562,7 +562,7 @@ namespace Aaru.DiscImages case NERO_TAO_V2: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"ETN2\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"ETN2\" chunk, parsing {0} bytes", chunkLength); neroTaov2 = new NeroV2Tao @@ -584,24 +584,24 @@ namespace Aaru.DiscImages entry.Unknown = BigEndianBitConverter.ToUInt32(tmpbuffer, 24); entry.Sectors = BigEndianBitConverter.ToUInt32(tmpbuffer, 28); - DicConsole.DebugWriteLine("Nero plugin", "Track-at-Once entry {0}", (i / 32) + 1); + AaruConsole.DebugWriteLine("Nero plugin", "Track-at-Once entry {0}", (i / 32) + 1); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Offset = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Offset = {1}", (i / 32) + 1, entry.Offset); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Length = {1} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Length = {1} bytes", (i / 32) + 1, entry.Length); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Mode = {1} (0x{2:X4})", (i / 32) + 1, (DaoMode)entry.Mode, entry.Mode); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].StartLBA = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].StartLBA = {1}", (i / 32) + 1, entry.StartLba); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Unknown = 0x{1:X4}", (i / 32) + 1, entry.Unknown); - DicConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Sectors = {1}", (i / 32) + 1, + AaruConsole.DebugWriteLine("Nero plugin", "\t _entry[{0}].Sectors = {1}", (i / 32) + 1, entry.Sectors); neroTaov2.Tracks.Add(entry); @@ -635,7 +635,7 @@ namespace Aaru.DiscImages case NERO_SESSION: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"SINF\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"SINF\" chunk, parsing {0} bytes", chunkLength); byte[] tmpbuffer = new byte[4]; @@ -643,7 +643,7 @@ namespace Aaru.DiscImages uint sessionTracks = BigEndianBitConverter.ToUInt32(tmpbuffer, 0); neroSessions.Add(currentsession, sessionTracks); - DicConsole.DebugWriteLine("Nero plugin", "\tSession {0} has {1} tracks", currentsession, + AaruConsole.DebugWriteLine("Nero plugin", "\tSession {0} has {1} tracks", currentsession, sessionTracks); currentsession++; @@ -653,7 +653,7 @@ namespace Aaru.DiscImages case NERO_DISC_TYPE: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"MTYP\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"MTYP\" chunk, parsing {0} bytes", chunkLength); neroMediaTyp = new NeroMediaType @@ -665,7 +665,7 @@ namespace Aaru.DiscImages imageStream.Read(tmpbuffer, 0, 4); neroMediaTyp.Type = BigEndianBitConverter.ToUInt32(tmpbuffer, 0); - DicConsole.DebugWriteLine("Nero plugin", "\tMedia type is {0} ({1})", + AaruConsole.DebugWriteLine("Nero plugin", "\tMedia type is {0} ({1})", (NeroMediaTypes)neroMediaTyp.Type, neroMediaTyp.Type); imageInfo.MediaType = NeroMediaTypeToMediaType((NeroMediaTypes)neroMediaTyp.Type); @@ -675,7 +675,7 @@ namespace Aaru.DiscImages case NERO_DISC_INFO: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"DINF\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"DINF\" chunk, parsing {0} bytes", chunkLength); neroDiscInfo = new NeroDiscInformation @@ -687,7 +687,7 @@ namespace Aaru.DiscImages imageStream.Read(tmpbuffer, 0, 4); neroDiscInfo.Unknown = BigEndianBitConverter.ToUInt32(tmpbuffer, 0); - DicConsole.DebugWriteLine("Nero plugin", "\tneroDiscInfo.Unknown = 0x{0:X4} ({0})", + AaruConsole.DebugWriteLine("Nero plugin", "\tneroDiscInfo.Unknown = 0x{0:X4} ({0})", neroDiscInfo.Unknown); break; @@ -695,7 +695,7 @@ namespace Aaru.DiscImages case NERO_RELOCATION: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"RELO\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"RELO\" chunk, parsing {0} bytes", chunkLength); neroRelo = new NeroReloChunk @@ -707,7 +707,7 @@ namespace Aaru.DiscImages imageStream.Read(tmpbuffer, 0, 4); neroRelo.Unknown = BigEndianBitConverter.ToUInt32(tmpbuffer, 0); - DicConsole.DebugWriteLine("Nero plugin", "\tneroRELO.Unknown = 0x{0:X4} ({0})", + AaruConsole.DebugWriteLine("Nero plugin", "\tneroRELO.Unknown = 0x{0:X4} ({0})", neroRelo.Unknown); break; @@ -715,7 +715,7 @@ namespace Aaru.DiscImages case NERO_TOC: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"TOCT\" chunk, parsing {0} bytes", + AaruConsole.DebugWriteLine("Nero plugin", "Found \"TOCT\" chunk, parsing {0} bytes", chunkLength); neroToc = new NeroTocChunk @@ -727,7 +727,7 @@ namespace Aaru.DiscImages imageStream.Read(tmpbuffer, 0, 2); neroToc.Unknown = BigEndianBitConverter.ToUInt16(tmpbuffer, 0); - DicConsole.DebugWriteLine("Nero plugin", "\tneroTOC.Unknown = 0x{0:X4} ({0})", + AaruConsole.DebugWriteLine("Nero plugin", "\tneroTOC.Unknown = 0x{0:X4} ({0})", neroToc.Unknown); break; @@ -735,7 +735,7 @@ namespace Aaru.DiscImages case NERO_END: { - DicConsole.DebugWriteLine("Nero plugin", "Found \"END!\" chunk, finishing parse"); + AaruConsole.DebugWriteLine("Nero plugin", "Found \"END!\" chunk, finishing parse"); parsing = false; break; @@ -743,7 +743,7 @@ namespace Aaru.DiscImages default: { - DicConsole.DebugWriteLine("Nero plugin", "Unknown chunk ID \"{0}\", skipping...", + AaruConsole.DebugWriteLine("Nero plugin", "Unknown chunk ID \"{0}\", skipping...", Encoding.ASCII.GetString(BigEndianBitConverter. GetBytes(chunkId))); @@ -791,7 +791,7 @@ namespace Aaru.DiscImages if(neroSessions.Count == 0) neroSessions.Add(1, currenttrack); - DicConsole.DebugWriteLine("Nero plugin", "Building offset, track and session maps"); + AaruConsole.DebugWriteLine("Nero plugin", "Building offset, track and session maps"); currentsession = 1; neroSessions.TryGetValue(1, out uint currentsessionmaxtrack); @@ -805,10 +805,10 @@ namespace Aaru.DiscImages if(!neroTracks.TryGetValue(i, out NeroTrack neroTrack)) continue; - DicConsole.DebugWriteLine("Nero plugin", "\tcurrentsession = {0}", currentsession); - DicConsole.DebugWriteLine("Nero plugin", "\tcurrentsessionmaxtrack = {0}", currentsessionmaxtrack); + AaruConsole.DebugWriteLine("Nero plugin", "\tcurrentsession = {0}", currentsession); + AaruConsole.DebugWriteLine("Nero plugin", "\tcurrentsessionmaxtrack = {0}", currentsessionmaxtrack); - DicConsole.DebugWriteLine("Nero plugin", "\tcurrentsessioncurrenttrack = {0}", + AaruConsole.DebugWriteLine("Nero plugin", "\tcurrentsessioncurrenttrack = {0}", currentsessioncurrenttrack); var track = new Track(); @@ -895,18 +895,18 @@ namespace Aaru.DiscImages Tracks.Add(track); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackDescription = {0}", + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackDescription = {0}", track.TrackDescription); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackEndSector = {0}", track.TrackEndSector); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackPregap = {0}", track.TrackPregap); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackSequence = {0}", track.TrackSequence); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackSession = {0}", track.TrackSession); + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackEndSector = {0}", track.TrackEndSector); + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackPregap = {0}", track.TrackPregap); + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackSequence = {0}", track.TrackSequence); + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackSession = {0}", track.TrackSession); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackStartSector = {0}", + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackStartSector = {0}", track.TrackStartSector); - DicConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackType = {0}", track.TrackType); + AaruConsole.DebugWriteLine("Nero plugin", "\t\t _track.TrackType = {0}", track.TrackType); if(currentsessioncurrenttrack == 1) currentsessionstruct = new Session @@ -938,7 +938,7 @@ namespace Aaru.DiscImages offsetmap.Add(track.TrackSequence, track.TrackStartSector); - DicConsole.DebugWriteLine("Nero plugin", "\t\t Offset[{0}]: {1}", track.TrackSequence, + AaruConsole.DebugWriteLine("Nero plugin", "\t\t Offset[{0}]: {1}", track.TrackSequence, track.TrackStartSector); /*if(_neroTrack.Index0 < _neroTrack.Index1) @@ -1033,13 +1033,13 @@ namespace Aaru.DiscImages } imageInfo.XmlMediaType = XmlMediaType.OpticalDisc; - DicConsole.VerboseWriteLine("Nero image contains a disc of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("Nero image contains a disc of type {0}", imageInfo.MediaType); return true; } catch { - DicConsole.DebugWrite("Nero plugin", "Exception ocurred opening file."); + AaruConsole.DebugWrite("Nero plugin", "Exception ocurred opening file."); return false; } diff --git a/Aaru.Images/Parallels/Read.cs b/Aaru.Images/Parallels/Read.cs index 626779b39..3d112a7ca 100644 --- a/Aaru.Images/Parallels/Read.cs +++ b/Aaru.Images/Parallels/Read.cs @@ -55,23 +55,23 @@ namespace Aaru.DiscImages stream.Read(pHdrB, 0, Marshal.SizeOf()); pHdr = Marshal.ByteArrayToStructureLittleEndian(pHdrB); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.magic = {0}", + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.magic = {0}", StringHandlers.CToString(pHdr.magic)); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.version = {0}", pHdr.version); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.heads = {0}", pHdr.heads); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.cylinders = {0}", pHdr.cylinders); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.cluster_size = {0}", pHdr.cluster_size); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.bat_entries = {0}", pHdr.bat_entries); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.sectors = {0}", pHdr.sectors); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.in_use = 0x{0:X8}", pHdr.in_use); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.data_off = {0}", pHdr.data_off); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.flags = {0}", pHdr.flags); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.ext_off = {0}", pHdr.ext_off); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.version = {0}", pHdr.version); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.heads = {0}", pHdr.heads); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.cylinders = {0}", pHdr.cylinders); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.cluster_size = {0}", pHdr.cluster_size); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.bat_entries = {0}", pHdr.bat_entries); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.sectors = {0}", pHdr.sectors); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.in_use = 0x{0:X8}", pHdr.in_use); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.data_off = {0}", pHdr.data_off); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.flags = {0}", pHdr.flags); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.ext_off = {0}", pHdr.ext_off); extended = parallelsExtMagic.SequenceEqual(pHdr.magic); - DicConsole.DebugWriteLine("Parallels plugin", "pHdr.extended = {0}", extended); + AaruConsole.DebugWriteLine("Parallels plugin", "pHdr.extended = {0}", extended); - DicConsole.DebugWriteLine("Parallels plugin", "Reading BAT"); + AaruConsole.DebugWriteLine("Parallels plugin", "Reading BAT"); bat = new uint[pHdr.bat_entries]; byte[] batB = new byte[pHdr.bat_entries * 4]; stream.Read(batB, 0, batB.Length); diff --git a/Aaru.Images/PartClone/Read.cs b/Aaru.Images/PartClone/Read.cs index ba3f0cd16..17a2ee7c6 100644 --- a/Aaru.Images/PartClone/Read.cs +++ b/Aaru.Images/PartClone/Read.cs @@ -57,32 +57,32 @@ namespace Aaru.DiscImages stream.Read(pHdrB, 0, Marshal.SizeOf()); pHdr = Marshal.ByteArrayToStructureLittleEndian(pHdrB); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.magic = {0}", StringHandlers.CToString(pHdr.magic)); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.filesystem = {0}", + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.magic = {0}", StringHandlers.CToString(pHdr.magic)); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.filesystem = {0}", StringHandlers.CToString(pHdr.filesystem)); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.version = {0}", + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.version = {0}", StringHandlers.CToString(pHdr.version)); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.blockSize = {0}", pHdr.blockSize); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.deviceSize = {0}", pHdr.deviceSize); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.totalBlocks = {0}", pHdr.totalBlocks); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.usedBlocks = {0}", pHdr.usedBlocks); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.blockSize = {0}", pHdr.blockSize); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.deviceSize = {0}", pHdr.deviceSize); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.totalBlocks = {0}", pHdr.totalBlocks); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.usedBlocks = {0}", pHdr.usedBlocks); byteMap = new byte[pHdr.totalBlocks]; - DicConsole.DebugWriteLine("PartClone plugin", "Reading bytemap {0} bytes", byteMap.Length); + AaruConsole.DebugWriteLine("PartClone plugin", "Reading bytemap {0} bytes", byteMap.Length); stream.Read(byteMap, 0, byteMap.Length); byte[] bitmagic = new byte[8]; stream.Read(bitmagic, 0, 8); - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.bitmagic = {0}", StringHandlers.CToString(bitmagic)); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.bitmagic = {0}", StringHandlers.CToString(bitmagic)); if(!biTmAgIc.SequenceEqual(bitmagic)) throw new ImageNotSupportedException("Could not find partclone BiTmAgIc, not continuing..."); dataOff = stream.Position; - DicConsole.DebugWriteLine("PartClone plugin", "pHdr.dataOff = {0}", dataOff); + AaruConsole.DebugWriteLine("PartClone plugin", "pHdr.dataOff = {0}", dataOff); - DicConsole.DebugWriteLine("PartClone plugin", "Filling extents"); + AaruConsole.DebugWriteLine("PartClone plugin", "Filling extents"); DateTime start = DateTime.Now; extents = new ExtentsULong(); extentsOff = new Dictionary(); @@ -113,7 +113,7 @@ namespace Aaru.DiscImages } DateTime end = DateTime.Now; - DicConsole.DebugWriteLine("PartClone plugin", "Took {0} seconds to fill extents", + AaruConsole.DebugWriteLine("PartClone plugin", "Took {0} seconds to fill extents", (end - start).TotalSeconds); sectorCache = new Dictionary(); diff --git a/Aaru.Images/Partimage/Read.cs b/Aaru.Images/Partimage/Read.cs index 6578ab183..a85fb8e49 100644 --- a/Aaru.Images/Partimage/Read.cs +++ b/Aaru.Images/Partimage/Read.cs @@ -56,13 +56,13 @@ namespace Aaru.DiscImages stream.Read(hdrB, 0, Marshal.SizeOf()); cVolumeHeader = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.magic = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.magic = {0}", StringHandlers.CToString(cVolumeHeader.magic)); - DicConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.version = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.version = {0}", StringHandlers.CToString(cVolumeHeader.version)); - DicConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.volumeNumber = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.volumeNumber = {0}", cVolumeHeader.volumeNumber); - DicConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.identificator = {0:X16}", + AaruConsole.DebugWriteLine("Partimage plugin", "CVolumeHeader.identificator = {0:X16}", cVolumeHeader.identificator); // TODO: Support multifile volumes @@ -73,90 +73,90 @@ namespace Aaru.DiscImages stream.Read(hdrB, 0, Marshal.SizeOf()); cMainHeader = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szFileSystem = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szFileSystem = {0}", StringHandlers.CToString(cMainHeader.szFileSystem)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szPartDescription = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szPartDescription = {0}", StringHandlers.CToString(cMainHeader.szPartDescription)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szOriginalDevice = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szOriginalDevice = {0}", StringHandlers.CToString(cMainHeader.szOriginalDevice)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szFirstImageFilepath = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szFirstImageFilepath = {0}", StringHandlers.CToString(cMainHeader.szFirstImageFilepath)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameSysname = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameSysname = {0}", StringHandlers.CToString(cMainHeader.szUnameSysname)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameNodename = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameNodename = {0}", StringHandlers.CToString(cMainHeader.szUnameNodename)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameRelease = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameRelease = {0}", StringHandlers.CToString(cMainHeader.szUnameRelease)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameVersion = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameVersion = {0}", StringHandlers.CToString(cMainHeader.szUnameVersion)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameMachine = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szUnameMachine = {0}", StringHandlers.CToString(cMainHeader.szUnameMachine)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwCompression = {0} ({1})", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwCompression = {0} ({1})", cMainHeader.dwCompression, (uint)cMainHeader.dwCompression); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMainFlags = {0}", cMainHeader.dwMainFlags); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_sec = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMainFlags = {0}", cMainHeader.dwMainFlags); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_sec = {0}", cMainHeader.dateCreate.Second); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_min = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_min = {0}", cMainHeader.dateCreate.Minute); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_hour = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_hour = {0}", cMainHeader.dateCreate.Hour); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_mday = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_mday = {0}", cMainHeader.dateCreate.DayOfMonth); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_mon = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_mon = {0}", cMainHeader.dateCreate.Month); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_year = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_year = {0}", cMainHeader.dateCreate.Year); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_wday = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_wday = {0}", cMainHeader.dateCreate.DayOfWeek); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_yday = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_yday = {0}", cMainHeader.dateCreate.DayOfYear); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_isdst = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_isdst = {0}", cMainHeader.dateCreate.IsDst); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_gmtoffsec = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_gmtoffsec = {0}", cMainHeader.dateCreate.GmtOff); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_zone = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate.tm_zone = {0}", cMainHeader.dateCreate.Timezone); DateTime dateCreate = new DateTime(1900 + (int)cMainHeader.dateCreate.Year, (int)cMainHeader.dateCreate.Month + 1, (int)cMainHeader.dateCreate.DayOfMonth, (int)cMainHeader.dateCreate.Hour, (int)cMainHeader.dateCreate.Minute, (int)cMainHeader.dateCreate.Second); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate = {0}", dateCreate); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dateCreate = {0}", dateCreate); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.qwPartSize = {0}", cMainHeader.qwPartSize); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szHostname = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.qwPartSize = {0}", cMainHeader.qwPartSize); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szHostname = {0}", StringHandlers.CToString(cMainHeader.szHostname)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szVersion = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.szVersion = {0}", StringHandlers.CToString(cMainHeader.szVersion)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMbrCount = {0}", cMainHeader.dwMbrCount); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMbrSize = {0}", cMainHeader.dwMbrSize); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwEncryptAlgo = {0} ({1})", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMbrCount = {0}", cMainHeader.dwMbrCount); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwMbrSize = {0}", cMainHeader.dwMbrSize); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwEncryptAlgo = {0} ({1})", cMainHeader.dwEncryptAlgo, (uint)cMainHeader.dwEncryptAlgo); - DicConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CMainHeader.cHashTestKey) = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CMainHeader.cHashTestKey) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(cMainHeader.cHashTestKey)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture000 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture000 = {0}", cMainHeader.dwReservedFuture000); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture001 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture001 = {0}", cMainHeader.dwReservedFuture001); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture002 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture002 = {0}", cMainHeader.dwReservedFuture002); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture003 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture003 = {0}", cMainHeader.dwReservedFuture003); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture004 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture004 = {0}", cMainHeader.dwReservedFuture004); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture005 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture005 = {0}", cMainHeader.dwReservedFuture005); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture006 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture006 = {0}", cMainHeader.dwReservedFuture006); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture007 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture007 = {0}", cMainHeader.dwReservedFuture007); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture008 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture008 = {0}", cMainHeader.dwReservedFuture008); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture009 = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.dwReservedFuture009 = {0}", cMainHeader.dwReservedFuture009); - DicConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CMainHeader.cReserved) = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CMainHeader.cReserved) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(cMainHeader.cReserved)); - DicConsole.DebugWriteLine("Partimage plugin", "CMainHeader.crc = 0x{0:X8}", cMainHeader.crc); + AaruConsole.DebugWriteLine("Partimage plugin", "CMainHeader.crc = 0x{0:X8}", cMainHeader.crc); // partimage 0.6.1 does not support them either if(cMainHeader.dwEncryptAlgo != PEncryption.None) @@ -187,18 +187,18 @@ namespace Aaru.DiscImages stream.Read(hdrB, 0, Marshal.SizeOf()); CLocalHeader localHeader = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBlockSize = {0}", localHeader.qwBlockSize); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwUsedBlocks = {0}", localHeader.qwUsedBlocks); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBlocksCount = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBlockSize = {0}", localHeader.qwBlockSize); + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwUsedBlocks = {0}", localHeader.qwUsedBlocks); + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBlocksCount = {0}", localHeader.qwBlocksCount); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBitmapSize = {0}", localHeader.qwBitmapSize); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBadBlocksCount = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBitmapSize = {0}", localHeader.qwBitmapSize); + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.qwBadBlocksCount = {0}", localHeader.qwBadBlocksCount); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.szLabel = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.szLabel = {0}", StringHandlers.CToString(localHeader.szLabel)); - DicConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CLocalHeader.cReserved) = {0}", + AaruConsole.DebugWriteLine("Partimage plugin", "ArrayIsNullOrEmpty(CLocalHeader.cReserved) = {0}", ArrayHelpers.ArrayIsNullOrEmpty(localHeader.cReserved)); - DicConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.crc = 0x{0:X8}", localHeader.crc); + AaruConsole.DebugWriteLine("Partimage plugin", "CLocalHeader.crc = 0x{0:X8}", localHeader.crc); hdrB = new byte[MAGIC_BEGIN_BITMAP.Length]; stream.Read(hdrB, 0, MAGIC_BEGIN_BITMAP.Length); @@ -223,7 +223,7 @@ namespace Aaru.DiscImages dataOff = stream.Position; - DicConsole.DebugWriteLine("Partimage plugin", "dataOff = {0}", dataOff); + AaruConsole.DebugWriteLine("Partimage plugin", "dataOff = {0}", dataOff); // Seek to tail stream.Seek(-(Marshal.SizeOf() + MAGIC_BEGIN_TAIL.Length), SeekOrigin.End); @@ -235,7 +235,7 @@ namespace Aaru.DiscImages throw new ImageNotSupportedException("Cannot find tail. Multiple volumes are not supported or image is corrupt."); - DicConsole.DebugWriteLine("Partimage plugin", "Filling extents"); + AaruConsole.DebugWriteLine("Partimage plugin", "Filling extents"); DateTime start = DateTime.Now; extents = new ExtentsULong(); extentsOff = new Dictionary(); @@ -266,7 +266,7 @@ namespace Aaru.DiscImages } DateTime end = DateTime.Now; - DicConsole.DebugWriteLine("Partimage plugin", "Took {0} seconds to fill extents", + AaruConsole.DebugWriteLine("Partimage plugin", "Took {0} seconds to fill extents", (end - start).TotalSeconds); sectorCache = new Dictionary(); diff --git a/Aaru.Images/QCOW/Read.cs b/Aaru.Images/QCOW/Read.cs index 96881a59f..900cde76c 100644 --- a/Aaru.Images/QCOW/Read.cs +++ b/Aaru.Images/QCOW/Read.cs @@ -57,17 +57,17 @@ namespace Aaru.DiscImages stream.Read(qHdrB, 0, 48); qHdr = Marshal.SpanToStructureBigEndian(qHdrB); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.mtime = {0}", qHdr.mtime); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.size = {0}", qHdr.size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.cluster_bits = {0}", qHdr.cluster_bits); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l2_bits = {0}", qHdr.l2_bits); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.padding = {0}", qHdr.padding); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.crypt_method = {0}", qHdr.crypt_method); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.mtime = {0}", qHdr.mtime); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.size = {0}", qHdr.size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.cluster_bits = {0}", qHdr.cluster_bits); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l2_bits = {0}", qHdr.l2_bits); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.padding = {0}", qHdr.padding); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.crypt_method = {0}", qHdr.crypt_method); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); if(qHdr.size <= 1) throw new ArgumentOutOfRangeException(nameof(qHdr.size), "Image size is too small"); @@ -98,17 +98,17 @@ namespace Aaru.DiscImages l1Size = (uint)((qHdr.size + (ulong)(1 << shift) - 1) >> shift); l2Size = 1 << qHdr.l2_bits; - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSize = {0}", clusterSize); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSectors = {0}", clusterSectors); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Size = {0}", l1Size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Size = {0}", l2Size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.sectors = {0}", imageInfo.Sectors); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSize = {0}", clusterSize); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSectors = {0}", clusterSectors); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Size = {0}", l1Size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Size = {0}", l2Size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.sectors = {0}", imageInfo.Sectors); byte[] l1TableB = new byte[l1Size * 8]; stream.Seek((long)qHdr.l1_table_offset, SeekOrigin.Begin); stream.Read(l1TableB, 0, (int)l1Size * 8); l1Table = MemoryMarshal.Cast(l1TableB).ToArray(); - DicConsole.DebugWriteLine("QCOW plugin", "Reading L1 table"); + AaruConsole.DebugWriteLine("QCOW plugin", "Reading L1 table"); for(long i = 0; i < l1Table.LongLength; i++) l1Table[i] = Swapping.Swap(l1Table[i]); l1Mask = 0; @@ -133,10 +133,10 @@ namespace Aaru.DiscImages sectorMask = 0; for(int i = 0; i < qHdr.cluster_bits; i++) sectorMask = (sectorMask << 1) + 1; - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Mask = {0:X}", l1Mask); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Shift = {0}", l1Shift); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Mask = {0:X}", l2Mask); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.sectorMask = {0:X}", sectorMask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Mask = {0:X}", l1Mask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Shift = {0}", l1Shift); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Mask = {0:X}", l2Mask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.sectorMask = {0:X}", sectorMask); maxL2TableCache = MAX_CACHE_SIZE / (l2Size * 8); maxClusterCache = MAX_CACHE_SIZE / clusterSize; @@ -190,7 +190,7 @@ namespace Aaru.DiscImages imageStream.Seek((long)l1Table[l1Off], SeekOrigin.Begin); byte[] l2TableB = new byte[l2Size * 8]; imageStream.Read(l2TableB, 0, l2Size * 8); - DicConsole.DebugWriteLine("QCOW plugin", "Reading L2 table #{0}", l1Off); + AaruConsole.DebugWriteLine("QCOW plugin", "Reading L2 table #{0}", l1Off); l2Table = MemoryMarshal.Cast(l2TableB).ToArray(); for(long i = 0; i < l2Table.LongLength; i++) l2Table[i] = Swapping.Swap(l2Table[i]); diff --git a/Aaru.Images/QCOW2/Identify.cs b/Aaru.Images/QCOW2/Identify.cs index 721bfd1a4..a87d801b0 100644 --- a/Aaru.Images/QCOW2/Identify.cs +++ b/Aaru.Images/QCOW2/Identify.cs @@ -50,8 +50,8 @@ namespace Aaru.DiscImages stream.Read(qHdrB, 0, Marshal.SizeOf()); qHdr = Marshal.SpanToStructureBigEndian(qHdrB); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); return qHdr.magic == QCOW_MAGIC && (qHdr.version == QCOW_VERSION2 || qHdr.version == QCOW_VERSION3); } diff --git a/Aaru.Images/QCOW2/Read.cs b/Aaru.Images/QCOW2/Read.cs index 32a902f9a..558b45922 100644 --- a/Aaru.Images/QCOW2/Read.cs +++ b/Aaru.Images/QCOW2/Read.cs @@ -58,28 +58,28 @@ namespace Aaru.DiscImages stream.Read(qHdrB, 0, Marshal.SizeOf()); qHdr = Marshal.SpanToStructureBigEndian(qHdrB); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.cluster_bits = {0}", qHdr.cluster_bits); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.size = {0}", qHdr.size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.crypt_method = {0}", qHdr.crypt_method); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_size = {0}", qHdr.l1_size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_table_offset = {0}", qHdr.refcount_table_offset); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_table_clusters = {0}", + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.version = {0}", qHdr.version); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.cluster_bits = {0}", qHdr.cluster_bits); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.size = {0}", qHdr.size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.crypt_method = {0}", qHdr.crypt_method); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_size = {0}", qHdr.l1_size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_table_offset = {0}", qHdr.refcount_table_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_table_clusters = {0}", qHdr.refcount_table_clusters); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.nb_snapshots = {0}", qHdr.nb_snapshots); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.snapshots_offset = {0}", qHdr.snapshots_offset); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.nb_snapshots = {0}", qHdr.nb_snapshots); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.snapshots_offset = {0}", qHdr.snapshots_offset); if(qHdr.version >= QCOW_VERSION3) { - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.features = {0:X}", qHdr.features); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.compat_features = {0:X}", qHdr.compat_features); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.autoclear_features = {0:X}", qHdr.autoclear_features); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_order = {0}", qHdr.refcount_order); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.header_length = {0}", qHdr.header_length); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.features = {0:X}", qHdr.features); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.compat_features = {0:X}", qHdr.compat_features); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.autoclear_features = {0:X}", qHdr.autoclear_features); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.refcount_order = {0}", qHdr.refcount_order); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.header_length = {0}", qHdr.header_length); if((qHdr.features & QCOW_FEATURE_MASK) != 0) throw new @@ -106,17 +106,17 @@ namespace Aaru.DiscImages l2Bits = (int)(qHdr.cluster_bits - 3); l2Size = 1 << l2Bits; - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSize = {0}", clusterSize); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSectors = {0}", clusterSectors); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.qHdr.l1_size = {0}", qHdr.l1_size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Size = {0}", l2Size); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.sectors = {0}", imageInfo.Sectors); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSize = {0}", clusterSize); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.clusterSectors = {0}", clusterSectors); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.qHdr.l1_size = {0}", qHdr.l1_size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Size = {0}", l2Size); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.sectors = {0}", imageInfo.Sectors); byte[] l1TableB = new byte[qHdr.l1_size * 8]; stream.Seek((long)qHdr.l1_table_offset, SeekOrigin.Begin); stream.Read(l1TableB, 0, (int)qHdr.l1_size * 8); l1Table = MemoryMarshal.Cast(l1TableB).ToArray(); - DicConsole.DebugWriteLine("QCOW plugin", "Reading L1 table"); + AaruConsole.DebugWriteLine("QCOW plugin", "Reading L1 table"); for(long i = 0; i < l1Table.LongLength; i++) l1Table[i] = Swapping.Swap(l1Table[i]); l1Mask = 0; @@ -141,10 +141,10 @@ namespace Aaru.DiscImages sectorMask = 0; for(int i = 0; i < qHdr.cluster_bits; i++) sectorMask = (sectorMask << 1) + 1; - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Mask = {0:X}", l1Mask); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Shift = {0}", l1Shift); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Mask = {0:X}", l2Mask); - DicConsole.DebugWriteLine("QCOW plugin", "qHdr.sectorMask = {0:X}", sectorMask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Mask = {0:X}", l1Mask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l1Shift = {0}", l1Shift); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.l2Mask = {0:X}", l2Mask); + AaruConsole.DebugWriteLine("QCOW plugin", "qHdr.sectorMask = {0:X}", sectorMask); maxL2TableCache = MAX_CACHE_SIZE / (l2Size * 8); maxClusterCache = MAX_CACHE_SIZE / clusterSize; @@ -197,7 +197,7 @@ namespace Aaru.DiscImages imageStream.Seek((long)(l1Table[l1Off] & QCOW_FLAGS_MASK), SeekOrigin.Begin); byte[] l2TableB = new byte[l2Size * 8]; imageStream.Read(l2TableB, 0, l2Size * 8); - DicConsole.DebugWriteLine("QCOW plugin", "Reading L2 table #{0}", l1Off); + AaruConsole.DebugWriteLine("QCOW plugin", "Reading L2 table #{0}", l1Off); l2Table = MemoryMarshal.Cast(l2TableB).ToArray(); for(long i = 0; i < l2Table.LongLength; i++) l2Table[i] = Swapping.Swap(l2Table[i]); diff --git a/Aaru.Images/QED/Read.cs b/Aaru.Images/QED/Read.cs index 1c02050d6..94cf5dc1f 100644 --- a/Aaru.Images/QED/Read.cs +++ b/Aaru.Images/QED/Read.cs @@ -55,17 +55,17 @@ namespace Aaru.DiscImages stream.Read(qHdrB, 0, 68); qHdr = Marshal.SpanToStructureLittleEndian(qHdrB); - DicConsole.DebugWriteLine("QED plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); - DicConsole.DebugWriteLine("QED plugin", "qHdr.cluster_size = {0}", qHdr.cluster_size); - DicConsole.DebugWriteLine("QED plugin", "qHdr.table_size = {0}", qHdr.table_size); - DicConsole.DebugWriteLine("QED plugin", "qHdr.header_size = {0}", qHdr.header_size); - DicConsole.DebugWriteLine("QED plugin", "qHdr.features = {0}", qHdr.features); - DicConsole.DebugWriteLine("QED plugin", "qHdr.compat_features = {0}", qHdr.compat_features); - DicConsole.DebugWriteLine("QED plugin", "qHdr.autoclear_features = {0}", qHdr.autoclear_features); - DicConsole.DebugWriteLine("QED plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); - DicConsole.DebugWriteLine("QED plugin", "qHdr.image_size = {0}", qHdr.image_size); - DicConsole.DebugWriteLine("QED plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); - DicConsole.DebugWriteLine("QED plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.magic = 0x{0:X8}", qHdr.magic); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.cluster_size = {0}", qHdr.cluster_size); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.table_size = {0}", qHdr.table_size); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.header_size = {0}", qHdr.header_size); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.features = {0}", qHdr.features); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.compat_features = {0}", qHdr.compat_features); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.autoclear_features = {0}", qHdr.autoclear_features); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.l1_table_offset = {0}", qHdr.l1_table_offset); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.image_size = {0}", qHdr.image_size); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.backing_file_offset = {0}", qHdr.backing_file_offset); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.backing_file_size = {0}", qHdr.backing_file_size); if(qHdr.image_size <= 1) throw new ArgumentOutOfRangeException(nameof(qHdr.image_size), "Image size is too small"); @@ -94,13 +94,13 @@ namespace Aaru.DiscImages clusterSectors = qHdr.cluster_size / 512; tableSize = qHdr.cluster_size * qHdr.table_size / 8; - DicConsole.DebugWriteLine("QED plugin", "qHdr.clusterSectors = {0}", clusterSectors); - DicConsole.DebugWriteLine("QED plugin", "qHdr.tableSize = {0}", tableSize); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.clusterSectors = {0}", clusterSectors); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.tableSize = {0}", tableSize); byte[] l1TableB = new byte[tableSize * 8]; stream.Seek((long)qHdr.l1_table_offset, SeekOrigin.Begin); stream.Read(l1TableB, 0, (int)tableSize * 8); - DicConsole.DebugWriteLine("QED plugin", "Reading L1 table"); + AaruConsole.DebugWriteLine("QED plugin", "Reading L1 table"); l1Table = MemoryMarshal.Cast(l1TableB).ToArray(); l1Mask = 0; @@ -122,11 +122,11 @@ namespace Aaru.DiscImages sectorMask = 0; for(int i = 0; i < clusterBits; i++) sectorMask = (sectorMask << 1) + 1; - DicConsole.DebugWriteLine("QED plugin", "qHdr.clusterBits = {0}", clusterBits); - DicConsole.DebugWriteLine("QED plugin", "qHdr.l1Mask = {0:X}", l1Mask); - DicConsole.DebugWriteLine("QED plugin", "qHdr.l1Shift = {0}", l1Shift); - DicConsole.DebugWriteLine("QED plugin", "qHdr.l2Mask = {0:X}", l2Mask); - DicConsole.DebugWriteLine("QED plugin", "qHdr.sectorMask = {0:X}", sectorMask); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.clusterBits = {0}", clusterBits); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.l1Mask = {0:X}", l1Mask); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.l1Shift = {0}", l1Shift); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.l2Mask = {0:X}", l2Mask); + AaruConsole.DebugWriteLine("QED plugin", "qHdr.sectorMask = {0:X}", sectorMask); maxL2TableCache = MAX_CACHE_SIZE / tableSize; maxClusterCache = MAX_CACHE_SIZE / qHdr.cluster_size; @@ -178,7 +178,7 @@ namespace Aaru.DiscImages imageStream.Seek((long)l1Table[l1Off], SeekOrigin.Begin); byte[] l2TableB = new byte[tableSize * 8]; imageStream.Read(l2TableB, 0, (int)tableSize * 8); - DicConsole.DebugWriteLine("QED plugin", "Reading L2 table #{0}", l1Off); + AaruConsole.DebugWriteLine("QED plugin", "Reading L2 table #{0}", l1Off); l2Table = MemoryMarshal.Cast(l2TableB).ToArray(); if(l2TableCache.Count >= maxL2TableCache) l2TableCache.Clear(); diff --git a/Aaru.Images/RayDIM/Identify.cs b/Aaru.Images/RayDIM/Identify.cs index 2a4bdc3fc..7eac70577 100644 --- a/Aaru.Images/RayDIM/Identify.cs +++ b/Aaru.Images/RayDIM/Identify.cs @@ -54,17 +54,17 @@ namespace Aaru.DiscImages string signature = StringHandlers.CToString(header.signature); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.signature = {0}", signature); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.diskType = {0}", header.diskType); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.heads = {0}", header.heads); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.cylinders = {0}", header.cylinders); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.sectorsPerTrack = {0}", + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.signature = {0}", signature); + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.diskType = {0}", header.diskType); + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.heads = {0}", header.heads); + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.cylinders = {0}", header.cylinders); + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.sectorsPerTrack = {0}", header.sectorsPerTrack); Regex sx = new Regex(REGEX_SIGNATURE); Match sm = sx.Match(signature); - DicConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.signature matches? = {0}", + AaruConsole.DebugWriteLine("Ray Arachelian's Disk IMage plugin", "header.signature matches? = {0}", sm.Success); return sm.Success; diff --git a/Aaru.Images/SaveDskF/Read.cs b/Aaru.Images/SaveDskF/Read.cs index e17f32aff..c87734f52 100644 --- a/Aaru.Images/SaveDskF/Read.cs +++ b/Aaru.Images/SaveDskF/Read.cs @@ -54,25 +54,25 @@ namespace Aaru.DiscImages stream.Read(hdr, 0, 40); header = Marshal.ByteArrayToStructureLittleEndian(hdr); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.magic = 0x{0:X4}", header.magic); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.mediaType = 0x{0:X2}", header.mediaType); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.sectorSize = {0}", header.sectorSize); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.clusterMask = {0}", header.clusterMask); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.clusterShift = {0}", header.clusterShift); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.reservedSectors = {0}", header.reservedSectors); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.fatCopies = {0}", header.fatCopies); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.rootEntries = {0}", header.rootEntries); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.firstCluster = {0}", header.firstCluster); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.clustersCopied = {0}", header.clustersCopied); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsPerFat = {0}", header.sectorsPerFat); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.checksum = 0x{0:X8}", header.checksum); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.cylinders = {0}", header.cylinders); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.heads = {0}", header.heads); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsPerTrack = {0}", header.sectorsPerTrack); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.padding = {0}", header.padding); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsCopied = {0}", header.sectorsCopied); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.commentOffset = {0}", header.commentOffset); - DicConsole.DebugWriteLine("SaveDskF plugin", "header.dataOffset = {0}", header.dataOffset); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.magic = 0x{0:X4}", header.magic); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.mediaType = 0x{0:X2}", header.mediaType); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.sectorSize = {0}", header.sectorSize); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.clusterMask = {0}", header.clusterMask); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.clusterShift = {0}", header.clusterShift); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.reservedSectors = {0}", header.reservedSectors); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.fatCopies = {0}", header.fatCopies); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.rootEntries = {0}", header.rootEntries); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.firstCluster = {0}", header.firstCluster); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.clustersCopied = {0}", header.clustersCopied); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsPerFat = {0}", header.sectorsPerFat); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.checksum = 0x{0:X8}", header.checksum); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.cylinders = {0}", header.cylinders); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.heads = {0}", header.heads); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsPerTrack = {0}", header.sectorsPerTrack); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.padding = {0}", header.padding); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.sectorsCopied = {0}", header.sectorsCopied); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.commentOffset = {0}", header.commentOffset); + AaruConsole.DebugWriteLine("SaveDskF plugin", "header.dataOffset = {0}", header.dataOffset); if(header.dataOffset == 0 && header.magic == SDF_MAGIC_OLD) header.dataOffset = 512; @@ -92,7 +92,7 @@ namespace Aaru.DiscImages } while(b >= 0); - DicConsole.DebugWriteLine("SaveDskF plugin", "Calculated checksum = 0x{0:X8}, {1}", calculatedChk, + AaruConsole.DebugWriteLine("SaveDskF plugin", "Calculated checksum = 0x{0:X8}, {1}", calculatedChk, calculatedChk == header.checksum); imageInfo.Application = "SaveDskF"; @@ -108,9 +108,9 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("SaveDskF image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("SaveDskF image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("SaveDskF comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("SaveDskF comments: {0}", imageInfo.Comments); // TODO: Support compressed images if(header.magic == SDF_MAGIC_COMPRESSED) diff --git a/Aaru.Images/SuperCardPro/Read.cs b/Aaru.Images/SuperCardPro/Read.cs index 16d4b1077..765b53970 100644 --- a/Aaru.Images/SuperCardPro/Read.cs +++ b/Aaru.Images/SuperCardPro/Read.cs @@ -55,19 +55,19 @@ namespace Aaru.DiscImages Header = Marshal.ByteArrayToStructureLittleEndian(hdr); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.signature = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.signature = \"{0}\"", StringHandlers.CToString(Header.signature)); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.version = {0}.{1}", (Header.version & 0xF0) >> 4, + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.version = {0}.{1}", (Header.version & 0xF0) >> 4, Header.version & 0xF); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.type = {0}", Header.type); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.revolutions = {0}", Header.revolutions); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.start = {0}", Header.start); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.end = {0}", Header.end); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.flags = {0}", Header.flags); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.bitCellEncoding = {0}", Header.bitCellEncoding); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.heads = {0}", Header.heads); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.reserved = {0}", Header.reserved); - DicConsole.DebugWriteLine("SuperCardPro plugin", "header.checksum = 0x{0:X8}", Header.checksum); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.type = {0}", Header.type); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.revolutions = {0}", Header.revolutions); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.start = {0}", Header.start); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.end = {0}", Header.end); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.flags = {0}", Header.flags); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.bitCellEncoding = {0}", Header.bitCellEncoding); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.heads = {0}", Header.heads); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.reserved = {0}", Header.reserved); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "header.checksum = 0x{0:X8}", Header.checksum); if(!scpSignature.SequenceEqual(Header.signature)) return false; @@ -85,19 +85,19 @@ namespace Aaru.DiscImages if(!trk.Signature.SequenceEqual(trkSignature)) { - DicConsole.DebugWriteLine("SuperCardPro plugin", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "Track header at {0} contains incorrect signature.", Header.offsets[t]); continue; } if(trk.TrackNumber != t) { - DicConsole.DebugWriteLine("SuperCardPro plugin", "Track number at {0} should be {1} but is {2}.", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "Track number at {0} should be {1} but is {2}.", Header.offsets[t], t, trk.TrackNumber); continue; } - DicConsole.DebugWriteLine("SuperCardPro plugin", "Found track {0} at {1}.", t, Header.offsets[t]); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "Found track {0} at {1}.", t, Header.offsets[t]); for(byte r = 0; r < Header.revolutions; r++) { @@ -127,39 +127,39 @@ namespace Aaru.DiscImages { scpStream.Seek(-Marshal.SizeOf(), SeekOrigin.Current); - DicConsole.DebugWriteLine("SuperCardPro plugin", "Found footer at {0}", scpStream.Position); + AaruConsole.DebugWriteLine("SuperCardPro plugin", "Found footer at {0}", scpStream.Position); byte[] ftr = new byte[Marshal.SizeOf()]; scpStream.Read(ftr, 0, Marshal.SizeOf()); ScpFooter footer = Marshal.ByteArrayToStructureLittleEndian(ftr); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.manufacturerOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.manufacturerOffset = 0x{0:X8}", footer.manufacturerOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.modelOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.modelOffset = 0x{0:X8}", footer.modelOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.serialOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.serialOffset = 0x{0:X8}", footer.serialOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.creatorOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.creatorOffset = 0x{0:X8}", footer.creatorOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.applicationOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.applicationOffset = 0x{0:X8}", footer.applicationOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.commentsOffset = 0x{0:X8}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.commentsOffset = 0x{0:X8}", footer.commentsOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.creationTime = {0}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.creationTime = {0}", footer.creationTime); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.modificationTime = {0}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.modificationTime = {0}", footer.modificationTime); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.applicationVersion = {0}.{1}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.applicationVersion = {0}.{1}", (footer.applicationVersion & 0xF0) >> 4, footer.applicationVersion & 0xF); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.hardwareVersion = {0}.{1}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.hardwareVersion = {0}.{1}", (footer.hardwareVersion & 0xF0) >> 4, footer.hardwareVersion & 0xF); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.firmwareVersion = {0}.{1}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.firmwareVersion = {0}.{1}", (footer.firmwareVersion & 0xF0) >> 4, footer.firmwareVersion & 0xF); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.imageVersion = {0}.{1}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.imageVersion = {0}.{1}", (footer.imageVersion & 0xF0) >> 4, footer.imageVersion & 0xF); - DicConsole.DebugWriteLine("SuperCardPro plugin", "footer.signature = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "footer.signature = \"{0}\"", StringHandlers.CToString(BitConverter.GetBytes(footer.signature))); imageInfo.DriveManufacturer = ReadPStringUtf8(scpStream, footer.manufacturerOffset); @@ -169,17 +169,17 @@ namespace Aaru.DiscImages imageInfo.Application = ReadPStringUtf8(scpStream, footer.applicationOffset); imageInfo.Comments = ReadPStringUtf8(scpStream, footer.commentsOffset); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveManufacturer = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveManufacturer = \"{0}\"", imageInfo.DriveManufacturer); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveModel = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveModel = \"{0}\"", imageInfo.DriveModel); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveSerialNumber = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.driveSerialNumber = \"{0}\"", imageInfo.DriveSerialNumber); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageCreator = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageCreator = \"{0}\"", imageInfo.Creator); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageApplication = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageApplication = \"{0}\"", imageInfo.Application); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageComments = \"{0}\"", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageComments = \"{0}\"", imageInfo.Comments); imageInfo.CreationTime = footer.creationTime != 0 @@ -190,9 +190,9 @@ namespace Aaru.DiscImages ? DateHandlers.UnixToDateTime(footer.modificationTime) : imageFilter.GetLastWriteTime(); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageCreationTime = {0}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageCreationTime = {0}", imageInfo.CreationTime); - DicConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageLastModificationTime = {0}", + AaruConsole.DebugWriteLine("SuperCardPro plugin", "ImageInfo.imageLastModificationTime = {0}", imageInfo.LastModificationTime); imageInfo.ApplicationVersion = diff --git a/Aaru.Images/T98/Identify.cs b/Aaru.Images/T98/Identify.cs index 456a5b567..2a3811eea 100644 --- a/Aaru.Images/T98/Identify.cs +++ b/Aaru.Images/T98/Identify.cs @@ -55,7 +55,7 @@ namespace Aaru.DiscImages int cylinders = BitConverter.ToInt32(hdrB, 0); - DicConsole.DebugWriteLine("T98 plugin", "cylinders = {0}", cylinders); + AaruConsole.DebugWriteLine("T98 plugin", "cylinders = {0}", cylinders); // This format is expanding, so length can be smaller // Just grow it, I won't risk false positives... diff --git a/Aaru.Images/TeleDisk/Helpers.cs b/Aaru.Images/TeleDisk/Helpers.cs index ffe816ddf..ac78b889f 100644 --- a/Aaru.Images/TeleDisk/Helpers.cs +++ b/Aaru.Images/TeleDisk/Helpers.cs @@ -119,13 +119,13 @@ namespace Aaru.DiscImages outs += decodedPiece.Length; } - DicConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Input data size: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Input data size: {0} bytes", encodedData.Length); - DicConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Processed input: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Processed input: {0} bytes", ins); - DicConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Output data size: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Output data size: {0} bytes", decodedData.Length); - DicConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Processed Output: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(Block pattern decoder): Processed Output: {0} bytes", outs); break; } @@ -159,12 +159,12 @@ namespace Aaru.DiscImages } } - DicConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Input data size: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Input data size: {0} bytes", encodedData.Length); - DicConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Processed input: {0} bytes", ins); - DicConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Output data size: {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Processed input: {0} bytes", ins); + AaruConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Output data size: {0} bytes", decodedData.Length); - DicConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Processed Output: {0} bytes", outs); + AaruConsole.DebugWriteLine("TeleDisk plugin", "(RLE decoder): Processed Output: {0} bytes", outs); break; } @@ -228,7 +228,7 @@ namespace Aaru.DiscImages case 737280: return MediaType.ECMA_78_2; default: { - DicConsole.DebugWriteLine("TeleDisk plugin", "Unknown 5,25\" disk with {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Unknown 5,25\" disk with {0} bytes", totalDiskSize); return MediaType.Unknown; } @@ -260,7 +260,7 @@ namespace Aaru.DiscImages case 1261568: return MediaType.SHARP_35; default: { - DicConsole.DebugWriteLine("TeleDisk plugin", "Unknown 3,5\" disk with {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Unknown 3,5\" disk with {0} bytes", totalDiskSize); return MediaType.Unknown; } @@ -295,7 +295,7 @@ namespace Aaru.DiscImages case 1021696: return MediaType.ECMA_69_26; default: { - DicConsole.DebugWriteLine("TeleDisk plugin", "Unknown 8\" disk with {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Unknown 8\" disk with {0} bytes", totalDiskSize); return MediaType.Unknown; } @@ -303,7 +303,7 @@ namespace Aaru.DiscImages } default: { - DicConsole.DebugWriteLine("TeleDisk plugin", "Unknown drive type {1} with {0} bytes", totalDiskSize, + AaruConsole.DebugWriteLine("TeleDisk plugin", "Unknown drive type {1} with {0} bytes", totalDiskSize, header.DriveType); return MediaType.Unknown; } diff --git a/Aaru.Images/TeleDisk/Identify.cs b/Aaru.Images/TeleDisk/Identify.cs index c670f8fa6..b709ad128 100644 --- a/Aaru.Images/TeleDisk/Identify.cs +++ b/Aaru.Images/TeleDisk/Identify.cs @@ -66,17 +66,17 @@ namespace Aaru.DiscImages Array.Copy(headerBytes, headerBytesForCrc, 10); ushort calculatedHeaderCrc = TeleDiskCrc(0x0000, headerBytesForCrc); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.signature = 0x{0:X4}", header.Signature); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.sequence = 0x{0:X2}", header.Sequence); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.diskSet = 0x{0:X2}", header.DiskSet); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.version = 0x{0:X2}", header.Version); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.dataRate = 0x{0:X2}", header.DataRate); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.driveType = 0x{0:X2}", header.DriveType); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.stepping = 0x{0:X2}", header.Stepping); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.dosAllocation = 0x{0:X2}", header.DosAllocation); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.sides = 0x{0:X2}", header.Sides); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.crc = 0x{0:X4}", header.Crc); - DicConsole.DebugWriteLine("TeleDisk plugin", "calculated header crc = 0x{0:X4}", calculatedHeaderCrc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.signature = 0x{0:X4}", header.Signature); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.sequence = 0x{0:X2}", header.Sequence); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.diskSet = 0x{0:X2}", header.DiskSet); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.version = 0x{0:X2}", header.Version); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.dataRate = 0x{0:X2}", header.DataRate); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.driveType = 0x{0:X2}", header.DriveType); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.stepping = 0x{0:X2}", header.Stepping); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.dosAllocation = 0x{0:X2}", header.DosAllocation); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.sides = 0x{0:X2}", header.Sides); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.crc = 0x{0:X4}", header.Crc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "calculated header crc = 0x{0:X4}", calculatedHeaderCrc); // We need more checks as the magic is too simply. // This may deny legal images diff --git a/Aaru.Images/TeleDisk/Read.cs b/Aaru.Images/TeleDisk/Read.cs index d12c89e6e..2665ac83f 100644 --- a/Aaru.Images/TeleDisk/Read.cs +++ b/Aaru.Images/TeleDisk/Read.cs @@ -76,17 +76,17 @@ namespace Aaru.DiscImages Array.Copy(headerBytes, headerBytesForCrc, 10); ushort calculatedHeaderCrc = TeleDiskCrc(0x0000, headerBytesForCrc); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.signature = 0x{0:X4}", header.Signature); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.sequence = 0x{0:X2}", header.Sequence); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.diskSet = 0x{0:X2}", header.DiskSet); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.version = 0x{0:X2}", header.Version); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.dataRate = 0x{0:X2}", header.DataRate); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.driveType = 0x{0:X2}", header.DriveType); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.stepping = 0x{0:X2}", header.Stepping); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.dosAllocation = 0x{0:X2}", header.DosAllocation); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.sides = 0x{0:X2}", header.Sides); - DicConsole.DebugWriteLine("TeleDisk plugin", "header.crc = 0x{0:X4}", header.Crc); - DicConsole.DebugWriteLine("TeleDisk plugin", "calculated header crc = 0x{0:X4}", calculatedHeaderCrc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.signature = 0x{0:X4}", header.Signature); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.sequence = 0x{0:X2}", header.Sequence); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.diskSet = 0x{0:X2}", header.DiskSet); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.version = 0x{0:X2}", header.Version); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.dataRate = 0x{0:X2}", header.DataRate); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.driveType = 0x{0:X2}", header.DriveType); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.stepping = 0x{0:X2}", header.Stepping); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.dosAllocation = 0x{0:X2}", header.DosAllocation); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.sides = 0x{0:X2}", header.Sides); + AaruConsole.DebugWriteLine("TeleDisk plugin", "header.crc = 0x{0:X4}", header.Crc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "calculated header crc = 0x{0:X4}", calculatedHeaderCrc); // We need more checks as the magic is too simply. // This may deny legal images @@ -95,7 +95,7 @@ namespace Aaru.DiscImages if(header.Crc != calculatedHeaderCrc) { aDiskCrcHasFailed = true; - DicConsole.DebugWriteLine("TeleDisk plugin", "Calculated CRC does not coincide with stored one."); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Calculated CRC does not coincide with stored one."); } if(header.Sequence != 0x00) return false; @@ -158,17 +158,17 @@ namespace Aaru.DiscImages ushort cmtcrc = TeleDiskCrc(0, commentBlockForCrc); - DicConsole.DebugWriteLine("TeleDisk plugin", "Comment header"); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.crc = 0x{0:X4}", commentHeader.Crc); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tCalculated CRC = 0x{0:X4}", cmtcrc); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.length = {0} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Comment header"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.crc = 0x{0:X4}", commentHeader.Crc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tCalculated CRC = 0x{0:X4}", cmtcrc); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.length = {0} bytes", commentHeader.Length); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.year = {0}", commentHeader.Year); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.month = {0}", commentHeader.Month); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.day = {0}", commentHeader.Day); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.hour = {0}", commentHeader.Hour); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.minute = {0}", commentHeader.Minute); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.second = {0}", commentHeader.Second); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.year = {0}", commentHeader.Year); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.month = {0}", commentHeader.Month); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.day = {0}", commentHeader.Day); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.hour = {0}", commentHeader.Hour); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.minute = {0}", commentHeader.Minute); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tcommentheader.second = {0}", commentHeader.Second); aDiskCrcHasFailed |= cmtcrc != commentHeader.Crc; @@ -179,8 +179,8 @@ namespace Aaru.DiscImages imageInfo.Comments = Encoding.ASCII.GetString(commentBlock); - DicConsole.DebugWriteLine("TeleDisk plugin", "Comment"); - DicConsole.DebugWriteLine("TeleDisk plugin", "{0}", imageInfo.Comments); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Comment"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "{0}", imageInfo.Comments); imageInfo.CreationTime = new DateTime(commentHeader.Year + 1900, commentHeader.Month + 1, commentHeader.Day, commentHeader.Hour, commentHeader.Minute, @@ -190,10 +190,10 @@ namespace Aaru.DiscImages if(imageInfo.CreationTime == DateTime.MinValue) imageInfo.CreationTime = imageFilter.GetCreationTime(); imageInfo.LastModificationTime = imageFilter.GetLastWriteTime(); - DicConsole.DebugWriteLine("TeleDisk plugin", "Image created on {0}", imageInfo.CreationTime); - DicConsole.DebugWriteLine("TeleDisk plugin", "Image modified on {0}", imageInfo.LastModificationTime); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Image created on {0}", imageInfo.CreationTime); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Image modified on {0}", imageInfo.LastModificationTime); - DicConsole.DebugWriteLine("TeleDisk plugin", "Parsing image"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Parsing image"); totalDiskSize = 0; imageInfo.ImageSize = 0; @@ -321,7 +321,7 @@ namespace Aaru.DiscImages // Total sectors per track uint[][] spts = new uint[totalCylinders][]; - DicConsole.DebugWriteLine("TeleDisk plugin", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Found {0} cylinders and {1} heads with a maximum sector number of {2}", totalCylinders, totalHeads, maxSector); @@ -352,19 +352,19 @@ namespace Aaru.DiscImages byte tdTrackCalculatedCrc = (byte)(TeleDiskCrc(0, tdTrackForCrc) & 0xFF); - DicConsole.DebugWriteLine("TeleDisk plugin", "Track follows"); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tTrack cylinder: {0}\t", teleDiskTrack.Cylinder); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tTrack head: {0}\t", teleDiskTrack.Head); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tSectors in track: {0}\t", teleDiskTrack.Sectors); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tTrack header CRC: 0x{0:X2} (calculated 0x{1:X2})\t", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Track follows"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tTrack cylinder: {0}\t", teleDiskTrack.Cylinder); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tTrack head: {0}\t", teleDiskTrack.Head); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tSectors in track: {0}\t", teleDiskTrack.Sectors); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tTrack header CRC: 0x{0:X2} (calculated 0x{1:X2})\t", teleDiskTrack.Crc, tdTrackCalculatedCrc); aDiskCrcHasFailed |= tdTrackCalculatedCrc != teleDiskTrack.Crc; if(teleDiskTrack.Sectors == 0xFF) // End of disk image { - DicConsole.DebugWriteLine("TeleDisk plugin", "End of disk image arrived"); - DicConsole.DebugWriteLine("TeleDisk plugin", "Total of {0} data sectors, for {1} bytes", + AaruConsole.DebugWriteLine("TeleDisk plugin", "End of disk image arrived"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "Total of {0} data sectors, for {1} bytes", totalSectors, totalDiskSize); break; @@ -384,16 +384,16 @@ namespace Aaru.DiscImages teleDiskSector.Flags = (byte)stream.ReadByte(); teleDiskSector.Crc = (byte)stream.ReadByte(); - DicConsole.DebugWriteLine("TeleDisk plugin", "\tSector follows"); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark cylinder: {0}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\tSector follows"); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark cylinder: {0}", teleDiskSector.Cylinder); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark head: {0}", teleDiskSector.Head); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark sector number: {0}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark head: {0}", teleDiskSector.Head); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tAddressMark sector number: {0}", teleDiskSector.SectorNumber); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector size: {0}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector size: {0}", teleDiskSector.SectorSize); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector flags: 0x{0:X2}", teleDiskSector.Flags); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector CRC (plus headers): 0x{0:X2}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector flags: 0x{0:X2}", teleDiskSector.Flags); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tSector CRC (plus headers): 0x{0:X2}", teleDiskSector.Crc); uint lba = (uint)(teleDiskSector.Cylinder * header.Sides * imageInfo.SectorsPerTrack + @@ -409,9 +409,9 @@ namespace Aaru.DiscImages teleDiskData.DataEncoding = (byte)stream.ReadByte(); byte[] data = new byte[teleDiskData.DataSize]; stream.Read(data, 0, teleDiskData.DataSize); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tData size (in-image): {0}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tData size (in-image): {0}", teleDiskData.DataSize); - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tData encoding: 0x{0:X2}", + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tData encoding: 0x{0:X2}", teleDiskData.DataEncoding); decodedData = DecodeTeleDiskData(teleDiskSector.SectorSize, teleDiskData.DataEncoding, data); @@ -420,7 +420,7 @@ namespace Aaru.DiscImages if(tdSectorCalculatedCrc != teleDiskSector.Crc) { - DicConsole.DebugWriteLine("TeleDisk plugin", + AaruConsole.DebugWriteLine("TeleDisk plugin", "Sector {0}:{3}:{4} calculated CRC 0x{1:X2} differs from stored CRC 0x{2:X2}", teleDiskTrack.Cylinder, tdSectorCalculatedCrc, teleDiskSector.Crc, teleDiskTrack.Cylinder, teleDiskSector.SectorNumber); @@ -430,12 +430,12 @@ namespace Aaru.DiscImages } else decodedData = new byte[128 << teleDiskSector.SectorSize]; - DicConsole.DebugWriteLine("TeleDisk plugin", "\t\tLBA: {0}", lba); + AaruConsole.DebugWriteLine("TeleDisk plugin", "\t\tLBA: {0}", lba); if((teleDiskSector.Flags & FLAGS_SECTOR_NO_ID) == FLAGS_SECTOR_NO_ID) continue; if(sectorsData[teleDiskTrack.Cylinder][teleDiskTrack.Head][teleDiskSector.SectorNumber] != null) - DicConsole.DebugWriteLine("TeleDisk plugin", + AaruConsole.DebugWriteLine("TeleDisk plugin", (teleDiskSector.Flags & FLAGS_SECTOR_DUPLICATE) == FLAGS_SECTOR_DUPLICATE ? "\t\tSector {0} on cylinder {1} head {2} is duplicate, and marked so" @@ -474,9 +474,9 @@ namespace Aaru.DiscImages imageInfo.XmlMediaType = XmlMediaType.BlockMedia; - DicConsole.VerboseWriteLine("TeleDisk image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("TeleDisk image contains a disk of type {0}", imageInfo.MediaType); if(!string.IsNullOrEmpty(imageInfo.Comments)) - DicConsole.VerboseWriteLine("TeleDisk comments: {0}", imageInfo.Comments); + AaruConsole.VerboseWriteLine("TeleDisk comments: {0}", imageInfo.Comments); inStream.Dispose(); stream.Dispose(); diff --git a/Aaru.Images/UDIF/Read.cs b/Aaru.Images/UDIF/Read.cs index a6ce038ba..d0bc1879c 100644 --- a/Aaru.Images/UDIF/Read.cs +++ b/Aaru.Images/UDIF/Read.cs @@ -74,38 +74,38 @@ namespace Aaru.DiscImages if(footer.signature != UDIF_SIGNATURE) throw new Exception("Unable to find UDIF signature."); - DicConsole.VerboseWriteLine("Found obsolete UDIF format."); + AaruConsole.VerboseWriteLine("Found obsolete UDIF format."); } - DicConsole.DebugWriteLine("UDIF plugin", "footer.signature = 0x{0:X8}", footer.signature); - DicConsole.DebugWriteLine("UDIF plugin", "footer.version = {0}", footer.version); - DicConsole.DebugWriteLine("UDIF plugin", "footer.headerSize = {0}", footer.headerSize); - DicConsole.DebugWriteLine("UDIF plugin", "footer.flags = {0}", footer.flags); - DicConsole.DebugWriteLine("UDIF plugin", "footer.runningDataForkOff = {0}", footer.runningDataForkOff); - DicConsole.DebugWriteLine("UDIF plugin", "footer.dataForkOff = {0}", footer.dataForkOff); - DicConsole.DebugWriteLine("UDIF plugin", "footer.dataForkLen = {0}", footer.dataForkLen); - DicConsole.DebugWriteLine("UDIF plugin", "footer.rsrcForkOff = {0}", footer.rsrcForkOff); - DicConsole.DebugWriteLine("UDIF plugin", "footer.rsrcForkLen = {0}", footer.rsrcForkLen); - DicConsole.DebugWriteLine("UDIF plugin", "footer.segmentNumber = {0}", footer.segmentNumber); - DicConsole.DebugWriteLine("UDIF plugin", "footer.segmentCount = {0}", footer.segmentCount); - DicConsole.DebugWriteLine("UDIF plugin", "footer.segmentId = {0}", footer.segmentId); - DicConsole.DebugWriteLine("UDIF plugin", "footer.dataForkChkType = {0}", footer.dataForkChkType); - DicConsole.DebugWriteLine("UDIF plugin", "footer.dataForkLen = {0}", footer.dataForkLen); - DicConsole.DebugWriteLine("UDIF plugin", "footer.dataForkChk = 0x{0:X8}", footer.dataForkChk); - DicConsole.DebugWriteLine("UDIF plugin", "footer.plistOff = {0}", footer.plistOff); - DicConsole.DebugWriteLine("UDIF plugin", "footer.plistLen = {0}", footer.plistLen); - DicConsole.DebugWriteLine("UDIF plugin", "footer.masterChkType = {0}", footer.masterChkType); - DicConsole.DebugWriteLine("UDIF plugin", "footer.masterChkLen = {0}", footer.masterChkLen); - DicConsole.DebugWriteLine("UDIF plugin", "footer.masterChk = 0x{0:X8}", footer.masterChk); - DicConsole.DebugWriteLine("UDIF plugin", "footer.imageVariant = {0}", footer.imageVariant); - DicConsole.DebugWriteLine("UDIF plugin", "footer.sectorCount = {0}", footer.sectorCount); - DicConsole.DebugWriteLine("UDIF plugin", "footer.reserved1 is empty? = {0}", + AaruConsole.DebugWriteLine("UDIF plugin", "footer.signature = 0x{0:X8}", footer.signature); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.version = {0}", footer.version); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.headerSize = {0}", footer.headerSize); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.flags = {0}", footer.flags); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.runningDataForkOff = {0}", footer.runningDataForkOff); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.dataForkOff = {0}", footer.dataForkOff); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.dataForkLen = {0}", footer.dataForkLen); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.rsrcForkOff = {0}", footer.rsrcForkOff); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.rsrcForkLen = {0}", footer.rsrcForkLen); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.segmentNumber = {0}", footer.segmentNumber); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.segmentCount = {0}", footer.segmentCount); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.segmentId = {0}", footer.segmentId); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.dataForkChkType = {0}", footer.dataForkChkType); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.dataForkLen = {0}", footer.dataForkLen); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.dataForkChk = 0x{0:X8}", footer.dataForkChk); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.plistOff = {0}", footer.plistOff); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.plistLen = {0}", footer.plistLen); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.masterChkType = {0}", footer.masterChkType); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.masterChkLen = {0}", footer.masterChkLen); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.masterChk = 0x{0:X8}", footer.masterChk); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.imageVariant = {0}", footer.imageVariant); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.sectorCount = {0}", footer.sectorCount); + AaruConsole.DebugWriteLine("UDIF plugin", "footer.reserved1 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(footer.reserved1)); - DicConsole.DebugWriteLine("UDIF plugin", "footer.reserved2 is empty? = {0}", + AaruConsole.DebugWriteLine("UDIF plugin", "footer.reserved2 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(footer.reserved2)); - DicConsole.DebugWriteLine("UDIF plugin", "footer.reserved3 is empty? = {0}", + AaruConsole.DebugWriteLine("UDIF plugin", "footer.reserved3 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(footer.reserved3)); - DicConsole.DebugWriteLine("UDIF plugin", "footer.reserved4 is empty? = {0}", + AaruConsole.DebugWriteLine("UDIF plugin", "footer.reserved4 is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(footer.reserved4)); // Block chunks and headers @@ -118,7 +118,7 @@ namespace Aaru.DiscImages if(footer.plistLen == 0 && footer.rsrcForkLen != 0) { - DicConsole.DebugWriteLine("UDIF plugin", "Reading resource fork."); + AaruConsole.DebugWriteLine("UDIF plugin", "Reading resource fork."); byte[] rsrcB = new byte[footer.rsrcForkLen]; stream.Seek((long)footer.rsrcForkOff, SeekOrigin.Begin); stream.Read(rsrcB, 0, rsrcB.Length); @@ -147,12 +147,12 @@ namespace Aaru.DiscImages } else if(footer.plistLen != 0) { - DicConsole.DebugWriteLine("UDIF plugin", "Reading property list."); + AaruConsole.DebugWriteLine("UDIF plugin", "Reading property list."); byte[] plistB = new byte[footer.plistLen]; stream.Seek((long)footer.plistOff, SeekOrigin.Begin); stream.Read(plistB, 0, plistB.Length); - DicConsole.DebugWriteLine("UDIF plugin", "Parsing property list."); + AaruConsole.DebugWriteLine("UDIF plugin", "Parsing property list."); NSDictionary plist = (NSDictionary)XmlPropertyListParser.Parse(plistB); if(plist == null) throw new Exception("Could not parse property list."); @@ -236,7 +236,7 @@ namespace Aaru.DiscImages } else imageInfo.Application = "DiskCopy"; - DicConsole.DebugWriteLine("UDIF plugin", "Image application = {0} version {1}", imageInfo.Application, + AaruConsole.DebugWriteLine("UDIF plugin", "Image application = {0} version {1}", imageInfo.Application, imageInfo.ApplicationVersion); imageInfo.Sectors = 0; @@ -255,24 +255,24 @@ namespace Aaru.DiscImages Array.Copy(blkxBytes, 0, bHdrB, 0, Marshal.SizeOf()); bHdr = Marshal.ByteArrayToStructureBigEndian(bHdrB); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.signature = 0x{0:X8}", bHdr.signature); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.version = {0}", bHdr.version); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.sectorStart = {0}", bHdr.sectorStart); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.sectorCount = {0}", bHdr.sectorCount); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.dataOffset = {0}", bHdr.dataOffset); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.buffers = {0}", bHdr.buffers); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.descriptor = 0x{0:X8}", bHdr.descriptor); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved1 = {0}", bHdr.reserved1); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved2 = {0}", bHdr.reserved2); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved3 = {0}", bHdr.reserved3); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved4 = {0}", bHdr.reserved4); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved5 = {0}", bHdr.reserved5); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved6 = {0}", bHdr.reserved6); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.checksumType = {0}", bHdr.checksumType); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.checksumLen = {0}", bHdr.checksumLen); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.checksum = 0x{0:X8}", bHdr.checksum); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunks = {0}", bHdr.chunks); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.reservedChk is empty? = {0}", + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.signature = 0x{0:X8}", bHdr.signature); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.version = {0}", bHdr.version); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.sectorStart = {0}", bHdr.sectorStart); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.sectorCount = {0}", bHdr.sectorCount); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.dataOffset = {0}", bHdr.dataOffset); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.buffers = {0}", bHdr.buffers); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.descriptor = 0x{0:X8}", bHdr.descriptor); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved1 = {0}", bHdr.reserved1); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved2 = {0}", bHdr.reserved2); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved3 = {0}", bHdr.reserved3); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved4 = {0}", bHdr.reserved4); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved5 = {0}", bHdr.reserved5); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reserved6 = {0}", bHdr.reserved6); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.checksumType = {0}", bHdr.checksumType); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.checksumLen = {0}", bHdr.checksumLen); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.checksum = 0x{0:X8}", bHdr.checksum); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunks = {0}", bHdr.chunks); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.reservedChk is empty? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(bHdr.reservedChk)); if(bHdr.buffers > buffersize) buffersize = bHdr.buffers * SECTOR_SIZE; @@ -285,12 +285,12 @@ namespace Aaru.DiscImages 0, Marshal.SizeOf()); bChnk = Marshal.ByteArrayToStructureBigEndian(bChnkB); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].type = 0x{1:X8}", i, bChnk.type); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].comment = {1}", i, bChnk.comment); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].sector = {1}", i, bChnk.sector); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].sectors = {1}", i, bChnk.sectors); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].offset = {1}", i, bChnk.offset); - DicConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].length = {1}", i, bChnk.length); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].type = 0x{1:X8}", i, bChnk.type); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].comment = {1}", i, bChnk.comment); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].sector = {1}", i, bChnk.sector); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].sectors = {1}", i, bChnk.sectors); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].offset = {1}", i, bChnk.offset); + AaruConsole.DebugWriteLine("UDIF plugin", "bHdr.chunk[{0}].length = {1}", i, bChnk.length); if(bChnk.type == CHUNK_TYPE_END) break; @@ -448,7 +448,7 @@ namespace Aaru.DiscImages } catch(ZlibException) { - DicConsole.WriteLine("zlib exception on chunk starting at sector {0}", readChunk.sector); + AaruConsole.WriteLine("zlib exception on chunk starting at sector {0}", readChunk.sector); throw; } #endif diff --git a/Aaru.Images/UkvFdi/Read.cs b/Aaru.Images/UkvFdi/Read.cs index 18bf8f975..1810ea75c 100644 --- a/Aaru.Images/UkvFdi/Read.cs +++ b/Aaru.Images/UkvFdi/Read.cs @@ -56,19 +56,19 @@ namespace Aaru.DiscImages hdr = Marshal.ByteArrayToStructureLittleEndian(hdrB); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.addInfoLen = {0}", hdr.addInfoLen); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.cylinders = {0}", hdr.cylinders); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.dataOff = {0}", hdr.dataOff); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.descOff = {0}", hdr.descOff); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.flags = {0}", hdr.flags); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.heads = {0}", hdr.heads); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.addInfoLen = {0}", hdr.addInfoLen); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.cylinders = {0}", hdr.cylinders); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.dataOff = {0}", hdr.dataOff); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.descOff = {0}", hdr.descOff); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.flags = {0}", hdr.flags); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.heads = {0}", hdr.heads); stream.Seek(hdr.descOff, SeekOrigin.Begin); byte[] description = new byte[hdr.dataOff - hdr.descOff]; stream.Read(description, 0, description.Length); imageInfo.Comments = StringHandlers.CToString(description); - DicConsole.DebugWriteLine("UkvFdi plugin", "hdr.description = \"{0}\"", imageInfo.Comments); + AaruConsole.DebugWriteLine("UkvFdi plugin", "hdr.description = \"{0}\"", imageInfo.Comments); stream.Seek(0xE + hdr.addInfoLen, SeekOrigin.Begin); @@ -93,10 +93,10 @@ namespace Aaru.DiscImages byte sectors = (byte)stream.ReadByte(); uint trkOff = BitConverter.ToUInt32(sctB, 0); - DicConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.c = {0}", cyl); - DicConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.h = {0}", head); - DicConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.sectors = {0}", sectors); - DicConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.off = {0}", trkOff); + AaruConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.c = {0}", cyl); + AaruConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.h = {0}", head); + AaruConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.sectors = {0}", sectors); + AaruConsole.DebugWriteLine("UkvFdi plugin", "trkhdr.off = {0}", trkOff); sectorsOff[cyl][head] = new uint[sectors]; sectorsData[cyl][head] = new byte[sectors][]; @@ -114,12 +114,12 @@ namespace Aaru.DiscImages stream.Read(offB, 0, 2); ushort secOff = BitConverter.ToUInt16(offB, 0); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.c = {0}", c); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.h = {0}", h); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.r = {0}", r); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.n = {0} ({1})", n, 128 << n); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.f = {0}", f); - DicConsole.DebugWriteLine("UkvFdi plugin", "sechdr.off = {0} ({1})", secOff, + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.c = {0}", c); + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.h = {0}", h); + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.r = {0}", r); + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.n = {0} ({1})", n, 128 << n); + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.f = {0}", f); + AaruConsole.DebugWriteLine("UkvFdi plugin", "sechdr.off = {0} ({1})", secOff, secOff + trkOff + hdr.dataOff); // TODO: This assumes sequential sectors. diff --git a/Aaru.Images/VDI/Read.cs b/Aaru.Images/VDI/Read.cs index f37975876..73771d90b 100644 --- a/Aaru.Images/VDI/Read.cs +++ b/Aaru.Images/VDI/Read.cs @@ -56,42 +56,42 @@ namespace Aaru.DiscImages stream.Read(vHdrB, 0, Marshal.SizeOf()); vHdr = Marshal.ByteArrayToStructureLittleEndian(vHdrB); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.creator = {0}", vHdr.creator); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.magic = {0}", vHdr.magic); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.version = {0}.{1}", vHdr.majorVersion, + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.creator = {0}", vHdr.creator); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.magic = {0}", vHdr.magic); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.version = {0}.{1}", vHdr.majorVersion, vHdr.minorVersion); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.headerSize = {0}", vHdr.headerSize); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.imageType = {0}", vHdr.imageType); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.imageFlags = {0}", vHdr.imageFlags); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.description = {0}", vHdr.comments); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.offsetBlocks = {0}", vHdr.offsetBlocks); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.offsetData = {0}", vHdr.offsetData); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.cylinders = {0}", vHdr.cylinders); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.heads = {0}", vHdr.heads); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.spt = {0}", vHdr.spt); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.sectorSize = {0}", vHdr.sectorSize); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.size = {0}", vHdr.size); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blockSize = {0}", vHdr.blockSize); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blockExtraData = {0}", vHdr.blockExtraData); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blocks = {0}", vHdr.blocks); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.allocatedBlocks = {0}", vHdr.allocatedBlocks); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.uuid = {0}", vHdr.uuid); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.snapshotUuid = {0}", vHdr.snapshotUuid); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.linkUuid = {0}", vHdr.linkUuid); - DicConsole.DebugWriteLine("VirtualBox plugin", "vHdr.parentUuid = {0}", vHdr.parentUuid); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.headerSize = {0}", vHdr.headerSize); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.imageType = {0}", vHdr.imageType); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.imageFlags = {0}", vHdr.imageFlags); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.description = {0}", vHdr.comments); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.offsetBlocks = {0}", vHdr.offsetBlocks); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.offsetData = {0}", vHdr.offsetData); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.cylinders = {0}", vHdr.cylinders); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.heads = {0}", vHdr.heads); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.spt = {0}", vHdr.spt); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.sectorSize = {0}", vHdr.sectorSize); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.size = {0}", vHdr.size); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blockSize = {0}", vHdr.blockSize); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blockExtraData = {0}", vHdr.blockExtraData); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.blocks = {0}", vHdr.blocks); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.allocatedBlocks = {0}", vHdr.allocatedBlocks); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.uuid = {0}", vHdr.uuid); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.snapshotUuid = {0}", vHdr.snapshotUuid); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.linkUuid = {0}", vHdr.linkUuid); + AaruConsole.DebugWriteLine("VirtualBox plugin", "vHdr.parentUuid = {0}", vHdr.parentUuid); if(vHdr.imageType != VdiImageType.Normal) throw new FeatureSupportedButNotImplementedImageException($"Support for image type {vHdr.imageType} not yet implemented"); DateTime start = DateTime.UtcNow; - DicConsole.DebugWriteLine("VirtualBox plugin", "Reading Image Block Map"); + AaruConsole.DebugWriteLine("VirtualBox plugin", "Reading Image Block Map"); stream.Seek(vHdr.offsetBlocks, SeekOrigin.Begin); byte[] ibmB = new byte[vHdr.blocks * 4]; stream.Read(ibmB, 0, ibmB.Length); ibm = MemoryMarshal.Cast(ibmB).ToArray(); DateTime end = DateTime.UtcNow; - DicConsole.DebugWriteLine("VirtualBox plugin", "Reading Image Block Map took {0} ms", + AaruConsole.DebugWriteLine("VirtualBox plugin", "Reading Image Block Map took {0} ms", (end - start).TotalMilliseconds); sectorCache = new Dictionary(); diff --git a/Aaru.Images/VHD/Read.cs b/Aaru.Images/VHD/Read.cs index be81db317..c37764fab 100644 --- a/Aaru.Images/VHD/Read.cs +++ b/Aaru.Images/VHD/Read.cs @@ -84,9 +84,9 @@ namespace Aaru.DiscImages uint headerCalculatedChecksum = VhdChecksum(header); uint footerCalculatedChecksum = VhdChecksum(footer); - DicConsole.DebugWriteLine("VirtualPC plugin", "Header checksum = 0x{0:X8}, calculated = 0x{1:X8}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "Header checksum = 0x{0:X8}, calculated = 0x{1:X8}", headerChecksum, headerCalculatedChecksum); - DicConsole.DebugWriteLine("VirtualPC plugin", "Header checksum = 0x{0:X8}, calculated = 0x{1:X8}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "Header checksum = 0x{0:X8}, calculated = 0x{1:X8}", footerChecksum, footerCalculatedChecksum); byte[] usableHeader; @@ -133,33 +133,33 @@ namespace Aaru.DiscImages Sha1Context sha1Ctx = new Sha1Context(); sha1Ctx.Update(thisFooter.Reserved); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.cookie = 0x{0:X8}", thisFooter.Cookie); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.features = 0x{0:X8}", thisFooter.Features); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.version = 0x{0:X8}", thisFooter.Version); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.offset = {0}", thisFooter.Offset); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.timestamp = 0x{0:X8} ({1})", thisFooter.Timestamp, + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.cookie = 0x{0:X8}", thisFooter.Cookie); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.features = 0x{0:X8}", thisFooter.Features); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.version = 0x{0:X8}", thisFooter.Version); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.offset = {0}", thisFooter.Offset); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.timestamp = 0x{0:X8} ({1})", thisFooter.Timestamp, thisDateTime); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorApplication = 0x{0:X8} (\"{1}\")", + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorApplication = 0x{0:X8} (\"{1}\")", thisFooter.CreatorApplication, Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(thisFooter .CreatorApplication))); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorVersion = 0x{0:X8}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorVersion = 0x{0:X8}", thisFooter.CreatorVersion); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorHostOS = 0x{0:X8} (\"{1}\")", + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.creatorHostOS = 0x{0:X8} (\"{1}\")", thisFooter.CreatorHostOs, Encoding.ASCII.GetString(BigEndianBitConverter .GetBytes(thisFooter.CreatorHostOs))); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.originalSize = {0}", thisFooter.OriginalSize); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.currentSize = {0}", thisFooter.CurrentSize); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.diskGeometry = 0x{0:X8} (C/H/S: {1}/{2}/{3})", + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.originalSize = {0}", thisFooter.OriginalSize); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.currentSize = {0}", thisFooter.CurrentSize); + 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); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.diskType = 0x{0:X8}", thisFooter.DiskType); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.checksum = 0x{0:X8}", thisFooter.Checksum); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.uniqueId = {0}", thisFooter.UniqueId); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.savedState = 0x{0:X2}", thisFooter.SavedState); - DicConsole.DebugWriteLine("VirtualPC plugin", "footer.reserved's SHA1 = 0x{0}", sha1Ctx.End()); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.diskType = 0x{0:X8}", thisFooter.DiskType); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.checksum = 0x{0:X8}", thisFooter.Checksum); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.uniqueId = {0}", thisFooter.UniqueId); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.savedState = 0x{0:X2}", thisFooter.SavedState); + AaruConsole.DebugWriteLine("VirtualPC plugin", "footer.reserved's SHA1 = 0x{0}", sha1Ctx.End()); if(thisFooter.Version == VERSION1) imageInfo.Version = "1.0"; else @@ -317,7 +317,7 @@ namespace Aaru.DiscImages uint dynamicChecksumCalculated = VhdChecksum(dynamicBytes); - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "Dynamic header checksum = 0x{0:X8}, calculated = 0x{1:X8}", dynamicChecksum, dynamicChecksumCalculated); @@ -364,42 +364,42 @@ namespace Aaru.DiscImages sha1Ctx = new Sha1Context(); sha1Ctx.Update(thisDynamic.Reserved2); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.cookie = 0x{0:X8}", thisDynamic.Cookie); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.dataOffset = {0}", thisDynamic.DataOffset); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.tableOffset = {0}", thisDynamic.TableOffset); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.headerVersion = 0x{0:X8}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.cookie = 0x{0:X8}", thisDynamic.Cookie); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.dataOffset = {0}", thisDynamic.DataOffset); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.tableOffset = {0}", thisDynamic.TableOffset); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.headerVersion = 0x{0:X8}", thisDynamic.HeaderVersion); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.maxTableEntries = {0}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.maxTableEntries = {0}", thisDynamic.MaxTableEntries); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.blockSize = {0}", thisDynamic.BlockSize); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.checksum = 0x{0:X8}", thisDynamic.Checksum); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentID = {0}", thisDynamic.ParentId); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentTimestamp = 0x{0:X8} ({1})", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.blockSize = {0}", thisDynamic.BlockSize); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.checksum = 0x{0:X8}", thisDynamic.Checksum); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentID = {0}", thisDynamic.ParentId); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentTimestamp = 0x{0:X8} ({1})", thisDynamic.ParentTimestamp, parentDateTime); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.reserved = 0x{0:X8}", thisDynamic.Reserved); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.reserved = 0x{0:X8}", thisDynamic.Reserved); for(int i = 0; i < 8; i++) { - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].platformCode = 0x{1:X8} (\"{2}\")", i, thisDynamic.LocatorEntries[i].PlatformCode, Encoding.ASCII.GetString(BigEndianBitConverter.GetBytes(thisDynamic .LocatorEntries[i] .PlatformCode))); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].platformDataSpace = {1}", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].platformDataSpace = {1}", i, thisDynamic.LocatorEntries[i].PlatformDataSpace); - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].platformDataLength = {1}", i, thisDynamic.LocatorEntries[i].PlatformDataLength); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].reserved = 0x{1:X8}", i, + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].reserved = 0x{1:X8}", i, thisDynamic.LocatorEntries[i].Reserved); - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}].platformDataOffset = {1}", i, thisDynamic.LocatorEntries[i].PlatformDataOffset); } - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentName = \"{0}\"", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.parentName = \"{0}\"", thisDynamic.ParentName); - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.reserved2's SHA1 = 0x{0}", sha1Ctx.End()); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.reserved2's SHA1 = 0x{0}", sha1Ctx.End()); if(thisDynamic.HeaderVersion != VERSION1) throw new @@ -423,7 +423,7 @@ namespace Aaru.DiscImages blockAllocationTable[i] = Swapping.Swap(blockAllocationTable[i]); DateTime endTime = DateTime.UtcNow; - DicConsole.DebugWriteLine("VirtualPC plugin", "Filling the BAT took {0} seconds", + AaruConsole.DebugWriteLine("VirtualPC plugin", "Filling the BAT took {0} seconds", (endTime - startTime).TotalSeconds); bitmapSize = (uint)Math.Ceiling((double)thisDynamic.BlockSize / 512 @@ -431,7 +431,7 @@ namespace Aaru.DiscImages / 8 // and aligned to 512 byte boundary / 512); - DicConsole.DebugWriteLine("VirtualPC plugin", "Bitmap is {0} sectors", bitmapSize); + AaruConsole.DebugWriteLine("VirtualPC plugin", "Bitmap is {0} sectors", bitmapSize); } imageInfo.XmlMediaType = XmlMediaType.BlockMedia; @@ -460,24 +460,24 @@ namespace Aaru.DiscImages { case PLATFORM_CODE_WINDOWS_ABSOLUTE: case PLATFORM_CODE_WINDOWS_RELATIVE: - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}] = \"{1}\"", i, Encoding.ASCII.GetString(locatorEntriesData[i])); break; case PLATFORM_CODE_WINDOWS_ABSOLUTE_U: case PLATFORM_CODE_WINDOWS_RELATIVE_U: - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}] = \"{1}\"", i, Encoding.BigEndianUnicode .GetString(locatorEntriesData[i])); break; case PLATFORM_CODE_MACINTOSH_URI: - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}] = \"{1}\"", i, Encoding.UTF8.GetString(locatorEntriesData[i])); break; default: - DicConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}] =", i); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dynamic.locatorEntries[{0}] =", i); PrintHex.PrintHexArray(locatorEntriesData[i], 64); break; } @@ -506,7 +506,7 @@ namespace Aaru.DiscImages parentPath = parentPath.Remove(0, 16); else { - DicConsole.DebugWriteLine("VirtualPC plugin", + AaruConsole.DebugWriteLine("VirtualPC plugin", "Unsupported protocol classified found in URI parent path: \"{0}\"", parentPath); parentPath = null; @@ -517,7 +517,7 @@ namespace Aaru.DiscImages if(parentPath != null) { - DicConsole.DebugWriteLine("VirtualPC plugin", "Possible parent path: \"{0}\"", parentPath); + AaruConsole.DebugWriteLine("VirtualPC plugin", "Possible parent path: \"{0}\"", parentPath); IFilter parentFilter = new FiltersList().GetFilter(Path.Combine(imageFilter.GetParentFolder(), parentPath)); @@ -611,22 +611,22 @@ namespace Aaru.DiscImages bool dirty = (bitmap[bitmapByte] & mask) == mask; /* - DicConsole.DebugWriteLine("VirtualPC plugin", "bitmapSize = {0}", bitmapSize); - DicConsole.DebugWriteLine("VirtualPC plugin", "blockNumber = {0}", blockNumber); - DicConsole.DebugWriteLine("VirtualPC plugin", "sectorInBlock = {0}", sectorInBlock); - DicConsole.DebugWriteLine("VirtualPC plugin", "blockOffset = {0}", blockOffset); - DicConsole.DebugWriteLine("VirtualPC plugin", "bitmapByte = {0}", bitmapByte); - DicConsole.DebugWriteLine("VirtualPC plugin", "bitmapBit = {0}", bitmapBit); - DicConsole.DebugWriteLine("VirtualPC plugin", "mask = 0x{0:X2}", mask); - DicConsole.DebugWriteLine("VirtualPC plugin", "dirty = 0x{0}", dirty); - DicConsole.DebugWriteLine("VirtualPC plugin", "bitmap = "); + AaruConsole.DebugWriteLine("VirtualPC plugin", "bitmapSize = {0}", bitmapSize); + AaruConsole.DebugWriteLine("VirtualPC plugin", "blockNumber = {0}", blockNumber); + AaruConsole.DebugWriteLine("VirtualPC plugin", "sectorInBlock = {0}", sectorInBlock); + AaruConsole.DebugWriteLine("VirtualPC plugin", "blockOffset = {0}", blockOffset); + AaruConsole.DebugWriteLine("VirtualPC plugin", "bitmapByte = {0}", bitmapByte); + AaruConsole.DebugWriteLine("VirtualPC plugin", "bitmapBit = {0}", bitmapBit); + AaruConsole.DebugWriteLine("VirtualPC plugin", "mask = 0x{0:X2}", mask); + AaruConsole.DebugWriteLine("VirtualPC plugin", "dirty = 0x{0}", dirty); + AaruConsole.DebugWriteLine("VirtualPC plugin", "bitmap = "); PrintHex.PrintHexArray(bitmap, 64); */ // Sector has been written, read from child image if(!dirty) return parentImage.ReadSector(sectorAddress); /* Too noisy - DicConsole.DebugWriteLine("VirtualPC plugin", "Sector {0} is dirty", sectorAddress); + AaruConsole.DebugWriteLine("VirtualPC plugin", "Sector {0} is dirty", sectorAddress); */ byte[] data = new byte[512]; @@ -639,7 +639,7 @@ namespace Aaru.DiscImages return data; /* Too noisy - DicConsole.DebugWriteLine("VirtualPC plugin", "Sector {0} is clean", sectorAddress); + AaruConsole.DebugWriteLine("VirtualPC plugin", "Sector {0} is clean", sectorAddress); */ // Read sector from parent image diff --git a/Aaru.Images/VHDX/Read.cs b/Aaru.Images/VHDX/Read.cs index 9b6a744da..07cd39b95 100644 --- a/Aaru.Images/VHDX/Read.cs +++ b/Aaru.Images/VHDX/Read.cs @@ -307,7 +307,7 @@ namespace Aaru.DiscImages } else batEntries = (long)(dataBlocks + (dataBlocks - 1) / (ulong)chunkRatio); - DicConsole.DebugWriteLine("VHDX plugin", "Reading BAT"); + AaruConsole.DebugWriteLine("VHDX plugin", "Reading BAT"); long readChunks = 0; blockAllocationTable = new ulong[dataBlocks]; @@ -333,7 +333,7 @@ namespace Aaru.DiscImages if(hasParent) { - DicConsole.DebugWriteLine("VHDX plugin", "Reading Sector Bitmap"); + AaruConsole.DebugWriteLine("VHDX plugin", "Reading Sector Bitmap"); MemoryStream sectorBmpMs = new MemoryStream(); foreach(ulong pt in sectorBitmapPointers) diff --git a/Aaru.Images/VMware/Read.cs b/Aaru.Images/VMware/Read.cs index 902457773..10593a050 100644 --- a/Aaru.Images/VMware/Read.cs +++ b/Aaru.Images/VMware/Read.cs @@ -151,7 +151,7 @@ namespace Aaru.DiscImages Type = "SPARSE" }; - DicConsole.DebugWriteLine("VMware plugin", "{0} {1} {2} \"{3}\" {4}", newExtent.Access, + AaruConsole.DebugWriteLine("VMware plugin", "{0} {1} {2} \"{3}\" {4}", newExtent.Access, newExtent.Sectors, newExtent.Type, newExtent.Filename, newExtent.Offset); @@ -198,22 +198,22 @@ namespace Aaru.DiscImages if(matchVersion.Success) { uint.TryParse(matchVersion.Groups["version"].Value, out version); - DicConsole.DebugWriteLine("VMware plugin", "version = {0}", version); + AaruConsole.DebugWriteLine("VMware plugin", "version = {0}", version); } else if(matchCid.Success) { cid = Convert.ToUInt32(matchCid.Groups["cid"].Value, 16); - DicConsole.DebugWriteLine("VMware plugin", "cid = {0:x8}", cid); + AaruConsole.DebugWriteLine("VMware plugin", "cid = {0:x8}", cid); } else if(matchParentCid.Success) { parentCid = Convert.ToUInt32(matchParentCid.Groups["cid"].Value, 16); - DicConsole.DebugWriteLine("VMware plugin", "parentCID = {0:x8}", parentCid); + AaruConsole.DebugWriteLine("VMware plugin", "parentCID = {0:x8}", parentCid); } else if(matchType.Success) { imageType = matchType.Groups["type"].Value; - DicConsole.DebugWriteLine("VMware plugin", "createType = \"{0}\"", imageType); + AaruConsole.DebugWriteLine("VMware plugin", "createType = \"{0}\"", imageType); } else if(matchExtent.Success) { @@ -227,7 +227,7 @@ namespace Aaru.DiscImages uint.TryParse(matchExtent.Groups["offset"].Value, out newExtent.Offset); uint.TryParse(matchExtent.Groups["sectors"].Value, out newExtent.Sectors); newExtent.Type = matchExtent.Groups["type"].Value; - DicConsole.DebugWriteLine("VMware plugin", "{0} {1} {2} \"{3}\" {4}", newExtent.Access, + AaruConsole.DebugWriteLine("VMware plugin", "{0} {1} {2} \"{3}\" {4}", newExtent.Access, newExtent.Sectors, newExtent.Type, newExtent.Filename, newExtent.Offset); @@ -237,7 +237,7 @@ namespace Aaru.DiscImages else if(matchParent.Success) { parentName = matchParent.Groups["filename"].Value; - DicConsole.DebugWriteLine("VMware plugin", "parentFileNameHint = \"{0}\"", parentName); + AaruConsole.DebugWriteLine("VMware plugin", "parentFileNameHint = \"{0}\"", parentName); hasParent = true; } else if(matchCylinders.Success) @@ -338,26 +338,26 @@ namespace Aaru.DiscImages if(oneNoFlat && !cowD) { - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.magic = 0x{0:X8}", vmEHdr.magic); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.version = {0}", vmEHdr.version); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.flags = 0x{0:X8}", vmEHdr.flags); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.capacity = {0}", vmEHdr.capacity); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.grainSize = {0}", vmEHdr.grainSize); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.descriptorOffset = {0}", vmEHdr.descriptorOffset); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.descriptorSize = {0}", vmEHdr.descriptorSize); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.GTEsPerGT = {0}", vmEHdr.GTEsPerGT); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.rgdOffset = {0}", vmEHdr.rgdOffset); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.gdOffset = {0}", vmEHdr.gdOffset); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.overhead = {0}", vmEHdr.overhead); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.uncleanShutdown = {0}", vmEHdr.uncleanShutdown); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.singleEndLineChar = 0x{0:X2}", + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.magic = 0x{0:X8}", vmEHdr.magic); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.version = {0}", vmEHdr.version); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.flags = 0x{0:X8}", vmEHdr.flags); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.capacity = {0}", vmEHdr.capacity); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.grainSize = {0}", vmEHdr.grainSize); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.descriptorOffset = {0}", vmEHdr.descriptorOffset); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.descriptorSize = {0}", vmEHdr.descriptorSize); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.GTEsPerGT = {0}", vmEHdr.GTEsPerGT); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.rgdOffset = {0}", vmEHdr.rgdOffset); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.gdOffset = {0}", vmEHdr.gdOffset); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.overhead = {0}", vmEHdr.overhead); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.uncleanShutdown = {0}", vmEHdr.uncleanShutdown); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.singleEndLineChar = 0x{0:X2}", vmEHdr.singleEndLineChar); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.nonEndLineChar = 0x{0:X2}", vmEHdr.nonEndLineChar); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.doubleEndLineChar1 = 0x{0:X2}", + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.nonEndLineChar = 0x{0:X2}", vmEHdr.nonEndLineChar); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.doubleEndLineChar1 = 0x{0:X2}", vmEHdr.doubleEndLineChar1); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.doubleEndLineChar2 = 0x{0:X2}", + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.doubleEndLineChar2 = 0x{0:X2}", vmEHdr.doubleEndLineChar2); - DicConsole.DebugWriteLine("VMware plugin", "vmEHdr.compression = 0x{0:X4}", vmEHdr.compression); + AaruConsole.DebugWriteLine("VMware plugin", "vmEHdr.compression = 0x{0:X4}", vmEHdr.compression); grainSize = vmEHdr.grainSize; grains = (uint)(imageInfo.Sectors / vmEHdr.grainSize) + 1; @@ -370,24 +370,24 @@ namespace Aaru.DiscImages } else if(oneNoFlat && cowD) { - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.magic = 0x{0:X8}", vmCHdr.magic); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.version = {0}", vmCHdr.version); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.flags = 0x{0:X8}", vmCHdr.flags); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.sectors = {0}", vmCHdr.sectors); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.grainSize = {0}", vmCHdr.grainSize); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.gdOffset = {0}", vmCHdr.gdOffset); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.numGDEntries = {0}", vmCHdr.numGDEntries); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.freeSector = {0}", vmCHdr.freeSector); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.cylinders = {0}", vmCHdr.cylinders); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.heads = {0}", vmCHdr.heads); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.spt = {0}", vmCHdr.spt); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.generation = {0}", vmCHdr.generation); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.name = {0}", + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.magic = 0x{0:X8}", vmCHdr.magic); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.version = {0}", vmCHdr.version); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.flags = 0x{0:X8}", vmCHdr.flags); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.sectors = {0}", vmCHdr.sectors); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.grainSize = {0}", vmCHdr.grainSize); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.gdOffset = {0}", vmCHdr.gdOffset); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.numGDEntries = {0}", vmCHdr.numGDEntries); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.freeSector = {0}", vmCHdr.freeSector); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.cylinders = {0}", vmCHdr.cylinders); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.heads = {0}", vmCHdr.heads); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.spt = {0}", vmCHdr.spt); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.generation = {0}", vmCHdr.generation); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.name = {0}", StringHandlers.CToString(vmCHdr.name)); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.description = {0}", + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.description = {0}", StringHandlers.CToString(vmCHdr.description)); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.savedGeneration = {0}", vmCHdr.savedGeneration); - DicConsole.DebugWriteLine("VMware plugin", "vmCHdr.uncleanShutdown = {0}", vmCHdr.uncleanShutdown); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.savedGeneration = {0}", vmCHdr.savedGeneration); + AaruConsole.DebugWriteLine("VMware plugin", "vmCHdr.uncleanShutdown = {0}", vmCHdr.uncleanShutdown); grainSize = vmCHdr.grainSize; grains = (uint)(imageInfo.Sectors / vmCHdr.grainSize) + 1; @@ -403,19 +403,19 @@ namespace Aaru.DiscImages { if(grains == 0 || gdEntries == 0) throw new Exception("Some error ocurred setting GD sizes"); - DicConsole.DebugWriteLine("VMware plugin", "{0} sectors in {1} grains in {2} tables", imageInfo.Sectors, + AaruConsole.DebugWriteLine("VMware plugin", "{0} sectors in {1} grains in {2} tables", imageInfo.Sectors, grains, gdEntries); Stream gdStream = gdFilter.GetDataForkStream(); gdStream.Seek(gdOffset * SECTOR_SIZE, SeekOrigin.Begin); - DicConsole.DebugWriteLine("VMware plugin", "Reading grain directory"); + AaruConsole.DebugWriteLine("VMware plugin", "Reading grain directory"); byte[] gdBytes = new byte[gdEntries * 4]; gdStream.Read(gdBytes, 0, gdBytes.Length); Span gd = MemoryMarshal.Cast(gdBytes); - DicConsole.DebugWriteLine("VMware plugin", "Reading grain tables"); + AaruConsole.DebugWriteLine("VMware plugin", "Reading grain tables"); uint currentGrain = 0; gTable = new uint[grains]; foreach(uint gtOff in gd) diff --git a/Aaru.Images/Virtual98/Identify.cs b/Aaru.Images/Virtual98/Identify.cs index 552d92f7b..42cc9ab9c 100644 --- a/Aaru.Images/Virtual98/Identify.cs +++ b/Aaru.Images/Virtual98/Identify.cs @@ -57,17 +57,17 @@ namespace Aaru.DiscImages if(!v98Hdr.signature.SequenceEqual(signature)) return false; - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.signature = \"{0}\"", + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.signature = \"{0}\"", StringHandlers.CToString(v98Hdr.signature, shiftjis)); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.comment = \"{0}\"", + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.comment = \"{0}\"", StringHandlers.CToString(v98Hdr.comment, shiftjis)); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.padding = {0}", v98Hdr.padding); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.mbsize = {0}", v98Hdr.mbsize); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.sectorsize = {0}", v98Hdr.sectorsize); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.sectors = {0}", v98Hdr.sectors); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.surfaces = {0}", v98Hdr.surfaces); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.cylinders = {0}", v98Hdr.cylinders); - DicConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.totals = {0}", v98Hdr.totals); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.padding = {0}", v98Hdr.padding); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.mbsize = {0}", v98Hdr.mbsize); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.sectorsize = {0}", v98Hdr.sectorsize); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.sectors = {0}", v98Hdr.sectors); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.surfaces = {0}", v98Hdr.surfaces); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.cylinders = {0}", v98Hdr.cylinders); + AaruConsole.DebugWriteLine("Virtual98 plugin", "v98hdr.totals = {0}", v98Hdr.totals); return true; } diff --git a/Aaru.Images/WCDiskImage/Read.cs b/Aaru.Images/WCDiskImage/Read.cs index 9afc42032..872d8e169 100644 --- a/Aaru.Images/WCDiskImage/Read.cs +++ b/Aaru.Images/WCDiskImage/Read.cs @@ -56,7 +56,7 @@ namespace Aaru.DiscImages WCDiskImageFileHeader fheader = Marshal.ByteArrayToStructureLittleEndian(header); - DicConsole.DebugWriteLine("d2f plugin", + AaruConsole.DebugWriteLine("d2f plugin", "Detected WC DISK IMAGE with {0} heads, {1} tracks and {2} sectors per track.", fheader.heads, fheader.cylinders, fheader.sectorsPerTrack); @@ -87,25 +87,25 @@ namespace Aaru.DiscImages /* if there are extra tracks, read them as well */ if(fheader.extraTracks[0] == 1) { - DicConsole.DebugWriteLine("d2f plugin", "Extra track 1 (head 0) present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Extra track 1 (head 0) present, reading"); ReadTrack(stream, (int)imageInfo.Cylinders, 0); } if(fheader.extraTracks[1] == 1) { - DicConsole.DebugWriteLine("d2f plugin", "Extra track 1 (head 1) present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Extra track 1 (head 1) present, reading"); ReadTrack(stream, (int)imageInfo.Cylinders, 1); } if(fheader.extraTracks[2] == 1) { - DicConsole.DebugWriteLine("d2f plugin", "Extra track 2 (head 0) present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Extra track 2 (head 0) present, reading"); ReadTrack(stream, (int)imageInfo.Cylinders + 1, 0); } if(fheader.extraTracks[3] == 1) { - DicConsole.DebugWriteLine("d2f plugin", "Extra track 2 (head 1) present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Extra track 2 (head 1) present, reading"); ReadTrack(stream, (int)imageInfo.Cylinders + 1, 1); } @@ -121,7 +121,7 @@ namespace Aaru.DiscImages /* read the comment and directory data if present */ if(fheader.extraFlags.HasFlag(ExtraFlag.Comment)) { - DicConsole.DebugWriteLine("d2f plugin", "Comment present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Comment present, reading"); byte[] sheaderBuffer = new byte[6]; stream.Read(sheaderBuffer, 0, 6); @@ -139,7 +139,7 @@ namespace Aaru.DiscImages if(fheader.extraFlags.HasFlag(ExtraFlag.Directory)) { - DicConsole.DebugWriteLine("d2f plugin", "Directory listing present, reading"); + AaruConsole.DebugWriteLine("d2f plugin", "Directory listing present, reading"); byte[] sheaderBuffer = new byte[6]; stream.Read(sheaderBuffer, 0, 6); @@ -174,7 +174,7 @@ namespace Aaru.DiscImages if(badSectors[(cylinderNumber, headNumber, sectorNumber)]) { - DicConsole.DebugWriteLine("d2f plugin", "reading bad sector {0} ({1},{2},{3})", sectorAddress, + AaruConsole.DebugWriteLine("d2f plugin", "reading bad sector {0} ({1},{2},{3})", sectorAddress, cylinderNumber, headNumber, sectorNumber); /* if we have sector data, return that */ @@ -241,20 +241,20 @@ namespace Aaru.DiscImages CRC16IBMContext.Data(sectorData, 512, out crc); calculatedCRC = (short)((256 * crc[0]) | crc[1]); /* - DicConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: Regular sector, stored CRC=0x{3:x4}, calculated CRC=0x{4:x4}", + AaruConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: Regular sector, stored CRC=0x{3:x4}, calculated CRC=0x{4:x4}", cyl, head, sect, sheader.crc, 256 * crc[0] + crc[1]); */ badSectors[(cyl, head, sect)] = sheader.crc != calculatedCRC; if(calculatedCRC != sheader.crc) - DicConsole.DebugWriteLine("d2f plugin", + AaruConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: CRC mismatch: stored CRC=0x{3:x4}, calculated CRC=0x{4:x4}", cyl, head, sect, sheader.crc, calculatedCRC); break; case SectorFlag.BadSector: /* - DicConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: Bad sector", + AaruConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: Bad sector", cyl, head, sect); */ badSectors[(cyl, head, sect)] = true; @@ -262,7 +262,7 @@ namespace Aaru.DiscImages break; case SectorFlag.RepeatByte: /* - DicConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: RepeatByte sector, fill byte 0x{0:x2}", + AaruConsole.DebugWriteLine("d2f plugin", "CHS {0},{1},{2}: RepeatByte sector, fill byte 0x{0:x2}", cyl, head, sect, sheader.crc & 0xff); */ for(int i = 0; i < 512; i++) diff --git a/Aaru.Images/ZZZRawImage/Read.cs b/Aaru.Images/ZZZRawImage/Read.cs index 565b15efa..223bd0f6b 100644 --- a/Aaru.Images/ZZZRawImage/Read.cs +++ b/Aaru.Images/ZZZRawImage/Read.cs @@ -321,7 +321,7 @@ namespace Aaru.DiscImages !filter.IsOpened()) continue; - DicConsole.DebugWriteLine("ZZZRawImage Plugin", "Found media tag {0}", sidecar.tag); + AaruConsole.DebugWriteLine("ZZZRawImage Plugin", "Found media tag {0}", sidecar.tag); byte[] data = new byte[filter.GetDataForkLength()]; filter.GetDataForkStream().Read(data, 0, data.Length); mediaTags.Add(sidecar.tag, data); @@ -1071,7 +1071,7 @@ namespace Aaru.DiscImages imageInfo.HasPartitions = true; } - DicConsole.VerboseWriteLine("Raw disk image contains a disk of type {0}", imageInfo.MediaType); + AaruConsole.VerboseWriteLine("Raw disk image contains a disk of type {0}", imageInfo.MediaType); var sidecarXs = new XmlSerializer(typeof(CICMMetadataType)); diff --git a/Aaru.Partitions/AppleMap.cs b/Aaru.Partitions/AppleMap.cs index 2f3c41b1e..b0fe16d1b 100644 --- a/Aaru.Partitions/AppleMap.cs +++ b/Aaru.Partitions/AppleMap.cs @@ -86,13 +86,13 @@ namespace Aaru.Partitions AppleDriverDescriptorMap ddm = Marshal.ByteArrayToStructureBigEndian(ddmSector); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbSig = 0x{0:X4}", ddm.sbSig); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbBlockSize = {0}", ddm.sbBlockSize); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbBlocks = {0}", ddm.sbBlocks); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDevType = {0}", ddm.sbDevType); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDevId = {0}", ddm.sbDevId); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbData = 0x{0:X8}", ddm.sbData); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDrvrCount = {0}", ddm.sbDrvrCount); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbSig = 0x{0:X4}", ddm.sbSig); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbBlockSize = {0}", ddm.sbBlockSize); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbBlocks = {0}", ddm.sbBlocks); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDevType = {0}", ddm.sbDevType); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDevId = {0}", ddm.sbDevId); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbData = 0x{0:X8}", ddm.sbData); + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbDrvrCount = {0}", ddm.sbDrvrCount); uint sequence = 0; @@ -105,11 +105,11 @@ namespace Aaru.Partitions byte[] tmp = new byte[8]; Array.Copy(ddmSector, 18 + i * 8, tmp, 0, 8); ddm.sbMap[i] = Marshal.ByteArrayToStructureBigEndian(tmp); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddBlock = {0}", + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddBlock = {0}", ddm.sbMap[i].ddBlock, i); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddSize = {0}", ddm.sbMap[i].ddSize, + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddSize = {0}", ddm.sbMap[i].ddSize, i); - DicConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddType = {0}", ddm.sbMap[i].ddType, + AaruConsole.DebugWriteLine("AppleMap Plugin", "ddm.sbMap[{1}].ddType = {0}", ddm.sbMap[i].ddType, i); if(ddm.sbMap[i].ddSize == 0) continue; @@ -145,11 +145,11 @@ namespace Aaru.Partitions Array.Copy(partSector, i, tmp, 0, 12); AppleMapOldPartitionEntry oldEntry = Marshal.ByteArrayToStructureBigEndian(tmp); - DicConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdStart = {0}", oldEntry.pdStart, + AaruConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdStart = {0}", oldEntry.pdStart, (i - 2) / 12); - DicConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdSize = {0}", oldEntry.pdSize, + AaruConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdSize = {0}", oldEntry.pdSize, (i - 2) / 12); - DicConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdFSID = 0x{0:X8}", + AaruConsole.DebugWriteLine("AppleMap Plugin", "old_map.sbMap[{1}].pdFSID = 0x{0:X8}", oldEntry.pdFSID, (i - 2) / 12); if(oldEntry.pdSize == 0 && oldEntry.pdFSID == 0) @@ -193,7 +193,7 @@ namespace Aaru.Partitions // Check for a partition entry that's 512-byte aligned if(entry.signature == APM_MAGIC) { - DicConsole.DebugWriteLine("AppleMap Plugin", "Found misaligned entry."); + AaruConsole.DebugWriteLine("AppleMap Plugin", "Found misaligned entry."); entrySize = 512; entryCount = entry.entries; skipDdm = 512; @@ -204,7 +204,7 @@ namespace Aaru.Partitions entry = Marshal.ByteArrayToStructureBigEndian(partSector); if(entry.signature == APM_MAGIC) { - DicConsole.DebugWriteLine("AppleMap Plugin", "Found aligned entry."); + AaruConsole.DebugWriteLine("AppleMap Plugin", "Found aligned entry."); entrySize = sectorSize; entryCount = entry.entries; skipDdm = sectorSize; @@ -218,7 +218,7 @@ namespace Aaru.Partitions entry = Marshal.ByteArrayToStructureBigEndian(partSector); if(entry.signature == APM_MAGIC) { - DicConsole.DebugWriteLine("AppleMap Plugin", "Found aligned entry."); + AaruConsole.DebugWriteLine("AppleMap Plugin", "Found aligned entry."); entrySize = sectorSize; entryCount = entry.entries; skipDdm = sectorSize; @@ -228,10 +228,10 @@ namespace Aaru.Partitions } byte[] entries = imagePlugin.ReadSectors(sectorOffset, sectorsToRead); - DicConsole.DebugWriteLine("AppleMap Plugin", "entry_size = {0}", entrySize); - DicConsole.DebugWriteLine("AppleMap Plugin", "entry_count = {0}", entryCount); - DicConsole.DebugWriteLine("AppleMap Plugin", "skip_ddm = {0}", skipDdm); - DicConsole.DebugWriteLine("AppleMap Plugin", "sectors_to_read = {0}", sectorsToRead); + AaruConsole.DebugWriteLine("AppleMap Plugin", "entry_size = {0}", entrySize); + AaruConsole.DebugWriteLine("AppleMap Plugin", "entry_count = {0}", entryCount); + AaruConsole.DebugWriteLine("AppleMap Plugin", "skip_ddm = {0}", skipDdm); + AaruConsole.DebugWriteLine("AppleMap Plugin", "sectors_to_read = {0}", sectorsToRead); byte[] copy = new byte[entries.Length - skipDdm]; Array.Copy(entries, skipDdm, copy, 0, copy.Length); @@ -244,32 +244,32 @@ namespace Aaru.Partitions entry = Marshal.ByteArrayToStructureBigEndian(tmp); if(entry.signature != APM_MAGIC) continue; - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].signature = 0x{1:X4}", i, entry.signature); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].reserved1 = 0x{1:X4}", i, entry.reserved1); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entries = {1}", i, entry.entries); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].start = {1}", i, entry.start); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].sectors = {1}", i, entry.sectors); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].name = \"{1}\"", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].signature = 0x{1:X4}", i, entry.signature); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].reserved1 = 0x{1:X4}", i, entry.reserved1); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entries = {1}", i, entry.entries); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].start = {1}", i, entry.start); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].sectors = {1}", i, entry.sectors); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].name = \"{1}\"", i, StringHandlers.CToString(entry.name)); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].type = \"{1}\"", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].type = \"{1}\"", i, StringHandlers.CToString(entry.type)); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].first_data_block = {1}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].first_data_block = {1}", i, entry.first_data_block); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].data_sectors = {1}", i, entry.data_sectors); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].flags = {1}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].data_sectors = {1}", i, entry.data_sectors); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].flags = {1}", i, (AppleMapFlags)entry.flags); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].first_boot_block = {1}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].first_boot_block = {1}", i, entry.first_boot_block); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].boot_size = {1}", i, entry.boot_size); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].load_address = 0x{1:X8}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].boot_size = {1}", i, entry.boot_size); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].load_address = 0x{1:X8}", i, entry.load_address); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].load_address2 = 0x{1:X8}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].load_address2 = 0x{1:X8}", i, entry.load_address2); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entry_point = 0x{1:X8}", i, entry.entry_point); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entry_point2 = 0x{1:X8}", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entry_point = 0x{1:X8}", i, entry.entry_point); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].entry_point2 = 0x{1:X8}", i, entry.entry_point2); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].checksum = 0x{1:X8}", i, entry.checksum); - DicConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].processor = \"{1}\"", i, + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].checksum = 0x{1:X8}", i, entry.checksum); + AaruConsole.DebugWriteLine("AppleMap Plugin", "dpme[{0}].processor = \"{1}\"", i, StringHandlers.CToString(entry.processor)); AppleMapFlags flags = (AppleMapFlags)entry.flags; @@ -322,14 +322,14 @@ namespace Aaru.Partitions // Some CD and DVDs end with an Apple_Free that expands beyond the disc size... else if(partition.Start < imagePlugin.Info.Sectors) { - DicConsole.DebugWriteLine("AppleMap Plugin", "Cutting last partition end ({0}) to media size ({1})", + AaruConsole.DebugWriteLine("AppleMap Plugin", "Cutting last partition end ({0}) to media size ({1})", partition.End, imagePlugin.Info.Sectors - 1); partition.Length = imagePlugin.Info.Sectors - partition.Start; partitions.Add(partition); sequence++; } else - DicConsole.DebugWriteLine("AppleMap Plugin", + AaruConsole.DebugWriteLine("AppleMap Plugin", "Not adding partition becaus start ({0}) is outside media size ({1})", partition.Start, imagePlugin.Info.Sectors - 1); } diff --git a/Aaru.Partitions/Apricot.cs b/Aaru.Partitions/Apricot.cs index aac28cb34..baac31264 100644 --- a/Aaru.Partitions/Apricot.cs +++ b/Aaru.Partitions/Apricot.cs @@ -82,163 +82,163 @@ namespace Aaru.Partitions if(label.operatingSystem > 4 || label.bootType > 5 || label.partitionCount > 8 || deviceSizeAccordingToLabel > deviceSectors || label.firstDataBlock > deviceSectors) return false; - DicConsole.DebugWriteLine("Apricot partitions", "label.version = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.version = \"{0}\"", StringHandlers.CToString(label.version)); - DicConsole.DebugWriteLine("Apricot partitions", "label.operatingSystem = {0} ({1})", label.operatingSystem, + AaruConsole.DebugWriteLine("Apricot partitions", "label.operatingSystem = {0} ({1})", label.operatingSystem, label.operatingSystem < operatingSystemCodes.Length ? operatingSystemCodes[label.operatingSystem] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.writeProtected = {0}", label.writeProtected); - DicConsole.DebugWriteLine("Apricot partitions", "label.copyProtected = {0}", label.copyProtected); - DicConsole.DebugWriteLine("Apricot partitions", "label.bootType = {0} ({1})", label.bootType, + AaruConsole.DebugWriteLine("Apricot partitions", "label.writeProtected = {0}", label.writeProtected); + AaruConsole.DebugWriteLine("Apricot partitions", "label.copyProtected = {0}", label.copyProtected); + AaruConsole.DebugWriteLine("Apricot partitions", "label.bootType = {0} ({1})", label.bootType, label.bootType < bootTypeCodes.Length ? bootTypeCodes[label.bootType] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitionCount = {0}", label.partitionCount); - DicConsole.DebugWriteLine("Apricot partitions", "label.winchester = {0}", label.winchester); - DicConsole.DebugWriteLine("Apricot partitions", "label.sectorSize = {0}", label.sectorSize); - DicConsole.DebugWriteLine("Apricot partitions", "label.spt = {0}", label.spt); - DicConsole.DebugWriteLine("Apricot partitions", "label.cylinders = {0}", label.cylinders); - DicConsole.DebugWriteLine("Apricot partitions", "label.heads = {0}", label.heads); - DicConsole.DebugWriteLine("Apricot partitions", "label.interleave = {0}", label.interleave); - DicConsole.DebugWriteLine("Apricot partitions", "label.skew = {0}", label.skew); - DicConsole.DebugWriteLine("Apricot partitions", "label.bootLocation = {0}", label.bootLocation); - DicConsole.DebugWriteLine("Apricot partitions", "label.bootSize = {0}", label.bootSize); - DicConsole.DebugWriteLine("Apricot partitions", "label.bootAddress = 0x{0:X8}", label.bootAddress); - DicConsole.DebugWriteLine("Apricot partitions", "label.bootOffset:label.bootSegment = {0:X4}:{1:X4}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitionCount = {0}", label.partitionCount); + AaruConsole.DebugWriteLine("Apricot partitions", "label.winchester = {0}", label.winchester); + AaruConsole.DebugWriteLine("Apricot partitions", "label.sectorSize = {0}", label.sectorSize); + AaruConsole.DebugWriteLine("Apricot partitions", "label.spt = {0}", label.spt); + AaruConsole.DebugWriteLine("Apricot partitions", "label.cylinders = {0}", label.cylinders); + AaruConsole.DebugWriteLine("Apricot partitions", "label.heads = {0}", label.heads); + AaruConsole.DebugWriteLine("Apricot partitions", "label.interleave = {0}", label.interleave); + AaruConsole.DebugWriteLine("Apricot partitions", "label.skew = {0}", label.skew); + AaruConsole.DebugWriteLine("Apricot partitions", "label.bootLocation = {0}", label.bootLocation); + AaruConsole.DebugWriteLine("Apricot partitions", "label.bootSize = {0}", label.bootSize); + AaruConsole.DebugWriteLine("Apricot partitions", "label.bootAddress = 0x{0:X8}", label.bootAddress); + AaruConsole.DebugWriteLine("Apricot partitions", "label.bootOffset:label.bootSegment = {0:X4}:{1:X4}", label.bootOffset, label.bootSegment); - DicConsole.DebugWriteLine("Apricot partitions", "label.firstDataBlock = {0}", label.firstDataBlock); - DicConsole.DebugWriteLine("Apricot partitions", "label.generation = {0}", label.generation); - DicConsole.DebugWriteLine("Apricot partitions", "label.copyCount = {0}", label.copyCount); - DicConsole.DebugWriteLine("Apricot partitions", "label.maxCopies = {0}", label.maxCopies); - DicConsole.DebugWriteLine("Apricot partitions", "label.serialNumber = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.firstDataBlock = {0}", label.firstDataBlock); + AaruConsole.DebugWriteLine("Apricot partitions", "label.generation = {0}", label.generation); + AaruConsole.DebugWriteLine("Apricot partitions", "label.copyCount = {0}", label.copyCount); + AaruConsole.DebugWriteLine("Apricot partitions", "label.maxCopies = {0}", label.maxCopies); + AaruConsole.DebugWriteLine("Apricot partitions", "label.serialNumber = \"{0}\"", StringHandlers.CToString(label.serialNumber)); - DicConsole.DebugWriteLine("Apricot partitions", "label.partNumber = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partNumber = \"{0}\"", StringHandlers.CToString(label.partNumber)); - DicConsole.DebugWriteLine("Apricot partitions", "label.copyright = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.copyright = \"{0}\"", StringHandlers.CToString(label.copyright)); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.bps = {0}", label.mainBPB.bps); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.spc = {0}", label.mainBPB.spc); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.rsectors = {0}", label.mainBPB.rsectors); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.fats_no = {0}", label.mainBPB.fats_no); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.root_ent = {0}", label.mainBPB.root_ent); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.sectors = {0}", label.mainBPB.sectors); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.media = {0}", label.mainBPB.media); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.spfat = {0}", label.mainBPB.spfat); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.diskType = {0} ({1})", + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.bps = {0}", label.mainBPB.bps); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.spc = {0}", label.mainBPB.spc); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.rsectors = {0}", label.mainBPB.rsectors); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.fats_no = {0}", label.mainBPB.fats_no); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.root_ent = {0}", label.mainBPB.root_ent); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.sectors = {0}", label.mainBPB.sectors); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.media = {0}", label.mainBPB.media); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.spfat = {0}", label.mainBPB.spfat); + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.diskType = {0} ({1})", label.mainBPB.diskType, label.mainBPB.diskType < diskTypeCodes.Length ? diskTypeCodes[label.mainBPB.diskType] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.startSector = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.mainBPB.startSector = {0}", label.mainBPB.startSector); - DicConsole.DebugWriteLine("Apricot partitions", "label.fontName = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.fontName = \"{0}\"", StringHandlers.CToString(label.fontName)); - DicConsole.DebugWriteLine("Apricot partitions", "label.keyboardName = \"{0}\"", + AaruConsole.DebugWriteLine("Apricot partitions", "label.keyboardName = \"{0}\"", StringHandlers.CToString(label.keyboardName)); - DicConsole.DebugWriteLine("Apricot partitions", "label.biosMajorVersion = {0}", label.biosMajorVersion); - DicConsole.DebugWriteLine("Apricot partitions", "label.biosMinorVersion = {0}", label.biosMinorVersion); - DicConsole.DebugWriteLine("Apricot partitions", "label.diagnosticsFlag = {0}", label.diagnosticsFlag); - DicConsole.DebugWriteLine("Apricot partitions", "label.prnDevice = {0} ({1})", label.prnDevice, + AaruConsole.DebugWriteLine("Apricot partitions", "label.biosMajorVersion = {0}", label.biosMajorVersion); + AaruConsole.DebugWriteLine("Apricot partitions", "label.biosMinorVersion = {0}", label.biosMinorVersion); + AaruConsole.DebugWriteLine("Apricot partitions", "label.diagnosticsFlag = {0}", label.diagnosticsFlag); + AaruConsole.DebugWriteLine("Apricot partitions", "label.prnDevice = {0} ({1})", label.prnDevice, label.prnDevice < printDevices.Length ? printDevices[label.prnDevice] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.bellVolume = {0}", label.bellVolume); - DicConsole.DebugWriteLine("Apricot partitions", "label.enableCache = {0}", label.enableCache); - DicConsole.DebugWriteLine("Apricot partitions", "label.enableGraphics = {0}", label.enableGraphics); - DicConsole.DebugWriteLine("Apricot partitions", "label.dosLength = {0}", label.dosLength); - DicConsole.DebugWriteLine("Apricot partitions", "label.fontLength = {0}", label.fontLength); - DicConsole.DebugWriteLine("Apricot partitions", "label.keyboardLength = {0}", label.keyboardLength); - DicConsole.DebugWriteLine("Apricot partitions", "label.dosStart = {0}", label.dosStart); - DicConsole.DebugWriteLine("Apricot partitions", "label.fontStart = {0}", label.fontStart); - DicConsole.DebugWriteLine("Apricot partitions", "label.keyboardStart = {0}", label.keyboardStart); - DicConsole.DebugWriteLine("Apricot partitions", "label.keyboardVolume = {0}", label.keyboardVolume); - DicConsole.DebugWriteLine("Apricot partitions", "label.autorepeat = {0}", label.autorepeat); - DicConsole.DebugWriteLine("Apricot partitions", "label.autorepeatLeadIn = {0}", label.autorepeatLeadIn); - DicConsole.DebugWriteLine("Apricot partitions", "label.autorepeatInterval = {0}", label.autorepeatInterval); - DicConsole.DebugWriteLine("Apricot partitions", "label.microscreenMode = {0}", label.microscreenMode); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareKeyboard is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.bellVolume = {0}", label.bellVolume); + AaruConsole.DebugWriteLine("Apricot partitions", "label.enableCache = {0}", label.enableCache); + AaruConsole.DebugWriteLine("Apricot partitions", "label.enableGraphics = {0}", label.enableGraphics); + AaruConsole.DebugWriteLine("Apricot partitions", "label.dosLength = {0}", label.dosLength); + AaruConsole.DebugWriteLine("Apricot partitions", "label.fontLength = {0}", label.fontLength); + AaruConsole.DebugWriteLine("Apricot partitions", "label.keyboardLength = {0}", label.keyboardLength); + AaruConsole.DebugWriteLine("Apricot partitions", "label.dosStart = {0}", label.dosStart); + AaruConsole.DebugWriteLine("Apricot partitions", "label.fontStart = {0}", label.fontStart); + AaruConsole.DebugWriteLine("Apricot partitions", "label.keyboardStart = {0}", label.keyboardStart); + AaruConsole.DebugWriteLine("Apricot partitions", "label.keyboardVolume = {0}", label.keyboardVolume); + AaruConsole.DebugWriteLine("Apricot partitions", "label.autorepeat = {0}", label.autorepeat); + AaruConsole.DebugWriteLine("Apricot partitions", "label.autorepeatLeadIn = {0}", label.autorepeatLeadIn); + AaruConsole.DebugWriteLine("Apricot partitions", "label.autorepeatInterval = {0}", label.autorepeatInterval); + AaruConsole.DebugWriteLine("Apricot partitions", "label.microscreenMode = {0}", label.microscreenMode); + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareKeyboard is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareKeyboard)); - DicConsole.DebugWriteLine("Apricot partitions", "label.lineMode = {0} ({1} lines)", label.lineMode, + AaruConsole.DebugWriteLine("Apricot partitions", "label.lineMode = {0} ({1} lines)", label.lineMode, label.lineMode < lineModes.Length ? lineModes[label.lineMode] : 0); - DicConsole.DebugWriteLine("Apricot partitions", "label.lineWidth = {0} ({1} columns)", label.lineWidth, + AaruConsole.DebugWriteLine("Apricot partitions", "label.lineWidth = {0} ({1} columns)", label.lineWidth, label.lineWidth < lineWidths.Length ? lineWidths[label.lineWidth] : 0); - DicConsole.DebugWriteLine("Apricot partitions", "label.imageOff = {0}", label.imageOff); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareScreen is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.imageOff = {0}", label.imageOff); + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareScreen is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareScreen)); - DicConsole.DebugWriteLine("Apricot partitions", "label.txBaudRate = {0} ({1} bps)", label.txBaudRate, + AaruConsole.DebugWriteLine("Apricot partitions", "label.txBaudRate = {0} ({1} bps)", label.txBaudRate, label.txBaudRate < baudRates.Length ? baudRates[label.txBaudRate] : 0); - DicConsole.DebugWriteLine("Apricot partitions", "label.rxBaudRate = {0} ({1} bps)", label.rxBaudRate, + AaruConsole.DebugWriteLine("Apricot partitions", "label.rxBaudRate = {0} ({1} bps)", label.rxBaudRate, label.rxBaudRate < baudRates.Length ? baudRates[label.rxBaudRate] : 0); - DicConsole.DebugWriteLine("Apricot partitions", "label.txBits = {0}", label.txBits); - DicConsole.DebugWriteLine("Apricot partitions", "label.rxBits = {0}", label.rxBits); - DicConsole.DebugWriteLine("Apricot partitions", "label.stopBits = {0} ({1} bits)", label.stopBits, + AaruConsole.DebugWriteLine("Apricot partitions", "label.txBits = {0}", label.txBits); + AaruConsole.DebugWriteLine("Apricot partitions", "label.rxBits = {0}", label.rxBits); + AaruConsole.DebugWriteLine("Apricot partitions", "label.stopBits = {0} ({1} bits)", label.stopBits, label.stopBits < stopBits.Length ? stopBits[label.stopBits] : 0); - DicConsole.DebugWriteLine("Apricot partitions", "label.parityCheck = {0}", label.parityCheck); - DicConsole.DebugWriteLine("Apricot partitions", "label.parityType = {0} ({1})", label.parityType, + AaruConsole.DebugWriteLine("Apricot partitions", "label.parityCheck = {0}", label.parityCheck); + AaruConsole.DebugWriteLine("Apricot partitions", "label.parityType = {0} ({1})", label.parityType, label.parityType < parityTypes.Length ? parityTypes[label.parityType] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.txXonXoff = {0}", label.txXonXoff); - DicConsole.DebugWriteLine("Apricot partitions", "label.rxXonXoff = {0}", label.rxXonXoff); - DicConsole.DebugWriteLine("Apricot partitions", "label.xonCharacter = {0}", label.xonCharacter); - DicConsole.DebugWriteLine("Apricot partitions", "label.xoffCharacter = {0}", label.xoffCharacter); - DicConsole.DebugWriteLine("Apricot partitions", "label.rxXonXoffBuffer = {0}", label.rxXonXoffBuffer); - DicConsole.DebugWriteLine("Apricot partitions", "label.dtrDsr = {0}", label.dtrDsr); - DicConsole.DebugWriteLine("Apricot partitions", "label.ctsRts = {0}", label.ctsRts); - DicConsole.DebugWriteLine("Apricot partitions", "label.nullsAfterCr = {0}", label.nullsAfterCr); - DicConsole.DebugWriteLine("Apricot partitions", "label.nullsAfterFF = {0}", label.nullsAfterFF); - DicConsole.DebugWriteLine("Apricot partitions", "label.lfAfterCRSerial = {0}", label.lfAfterCRSerial); - DicConsole.DebugWriteLine("Apricot partitions", "label.biosErrorReportSerial = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.txXonXoff = {0}", label.txXonXoff); + AaruConsole.DebugWriteLine("Apricot partitions", "label.rxXonXoff = {0}", label.rxXonXoff); + AaruConsole.DebugWriteLine("Apricot partitions", "label.xonCharacter = {0}", label.xonCharacter); + AaruConsole.DebugWriteLine("Apricot partitions", "label.xoffCharacter = {0}", label.xoffCharacter); + AaruConsole.DebugWriteLine("Apricot partitions", "label.rxXonXoffBuffer = {0}", label.rxXonXoffBuffer); + AaruConsole.DebugWriteLine("Apricot partitions", "label.dtrDsr = {0}", label.dtrDsr); + AaruConsole.DebugWriteLine("Apricot partitions", "label.ctsRts = {0}", label.ctsRts); + AaruConsole.DebugWriteLine("Apricot partitions", "label.nullsAfterCr = {0}", label.nullsAfterCr); + AaruConsole.DebugWriteLine("Apricot partitions", "label.nullsAfterFF = {0}", label.nullsAfterFF); + AaruConsole.DebugWriteLine("Apricot partitions", "label.lfAfterCRSerial = {0}", label.lfAfterCRSerial); + AaruConsole.DebugWriteLine("Apricot partitions", "label.biosErrorReportSerial = {0}", label.biosErrorReportSerial); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareSerial is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareSerial is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareSerial)); - DicConsole.DebugWriteLine("Apricot partitions", "label.lfAfterCrParallel = {0}", label.lfAfterCrParallel); - DicConsole.DebugWriteLine("Apricot partitions", "label.selectLine = {0}", label.selectLine); - DicConsole.DebugWriteLine("Apricot partitions", "label.paperEmpty = {0}", label.paperEmpty); - DicConsole.DebugWriteLine("Apricot partitions", "label.faultLine = {0}", label.faultLine); - DicConsole.DebugWriteLine("Apricot partitions", "label.biosErrorReportParallel = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.lfAfterCrParallel = {0}", label.lfAfterCrParallel); + AaruConsole.DebugWriteLine("Apricot partitions", "label.selectLine = {0}", label.selectLine); + AaruConsole.DebugWriteLine("Apricot partitions", "label.paperEmpty = {0}", label.paperEmpty); + AaruConsole.DebugWriteLine("Apricot partitions", "label.faultLine = {0}", label.faultLine); + AaruConsole.DebugWriteLine("Apricot partitions", "label.biosErrorReportParallel = {0}", label.biosErrorReportParallel); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareParallel is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareParallel is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareParallel)); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareWinchester is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareWinchester is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareWinchester)); - DicConsole.DebugWriteLine("Apricot partitions", "label.parkingEnabled = {0}", label.parkingEnabled); - DicConsole.DebugWriteLine("Apricot partitions", "label.formatProtection = {0}", label.formatProtection); - DicConsole.DebugWriteLine("Apricot partitions", "label.spareRamDisk is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.parkingEnabled = {0}", label.parkingEnabled); + AaruConsole.DebugWriteLine("Apricot partitions", "label.formatProtection = {0}", label.formatProtection); + AaruConsole.DebugWriteLine("Apricot partitions", "label.spareRamDisk is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spareRamDisk)); for(int i = 0; i < 32; i++) - DicConsole.DebugWriteLine("Apricot partitions", "label.badBlocks[{1}] = {0}", label.badBlocks[i], i); + AaruConsole.DebugWriteLine("Apricot partitions", "label.badBlocks[{1}] = {0}", label.badBlocks[i], i); for(int i = 0; i < 8; i++) { - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].bps = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].bps = {0}", label.partitions[i].bps, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].spc = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].spc = {0}", label.partitions[i].spc, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].rsectors = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].rsectors = {0}", label.partitions[i].rsectors, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].fats_no = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].fats_no = {0}", label.partitions[i].fats_no, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].root_ent = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].root_ent = {0}", label.partitions[i].root_ent, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].sectors = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].sectors = {0}", label.partitions[i].sectors, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].media = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].media = {0}", label.partitions[i].media, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].spfat = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].spfat = {0}", label.partitions[i].spfat, i); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].diskType = {0} ({2})", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].diskType = {0} ({2})", label.partitions[i].diskType, i, label.partitions[i].diskType < diskTypeCodes.Length ? diskTypeCodes[label.partitions[i].diskType] : "Unknown"); - DicConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].startSector = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.partitions[{1}].startSector = {0}", label.partitions[i].startSector, i); } - DicConsole.DebugWriteLine("Apricot partitions", "label.spare is null? = {0}", + AaruConsole.DebugWriteLine("Apricot partitions", "label.spare is null? = {0}", ArrayHelpers.ArrayIsNullOrEmpty(label.spare)); - DicConsole.DebugWriteLine("Apricot partitions", "label.cpmDoubleSided = {0}", label.cpmDoubleSided); + AaruConsole.DebugWriteLine("Apricot partitions", "label.cpmDoubleSided = {0}", label.cpmDoubleSided); // Only hard disks can contain partitions if(!label.winchester) return false; diff --git a/Aaru.Partitions/Atari.cs b/Aaru.Partitions/Atari.cs index 35338f3c9..746e19433 100644 --- a/Aaru.Partitions/Atari.cs +++ b/Aaru.Partitions/Atari.cs @@ -101,37 +101,37 @@ namespace Aaru.Partitions Sha1Context sha1Ctx = new Sha1Context(); sha1Ctx.Update(table.boot); - DicConsole.DebugWriteLine("Atari partition plugin", "Boot code SHA1: {0}", sha1Ctx.End()); + AaruConsole.DebugWriteLine("Atari partition plugin", "Boot code SHA1: {0}", sha1Ctx.End()); for(int i = 0; i < 8; i++) { - DicConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].flag = 0x{1:X2}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].flag = 0x{1:X2}", i, (table.icdEntries[i].type & 0xFF000000) >> 24); - DicConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].type = 0x{1:X6}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].type = 0x{1:X6}", i, table.icdEntries[i].type & 0x00FFFFFF); - DicConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].start = {1}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].start = {1}", i, table.icdEntries[i].start); - DicConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].length = {1}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.icdEntries[{0}].length = {1}", i, table.icdEntries[i].length); } - DicConsole.DebugWriteLine("Atari partition plugin", "table.size = {0}", table.size); + AaruConsole.DebugWriteLine("Atari partition plugin", "table.size = {0}", table.size); for(int i = 0; i < 4; i++) { - DicConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].flag = 0x{1:X2}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].flag = 0x{1:X2}", i, (table.entries[i].type & 0xFF000000) >> 24); - DicConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].type = 0x{1:X6}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].type = 0x{1:X6}", i, table.entries[i].type & 0x00FFFFFF); - DicConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].start = {1}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].start = {1}", i, table.entries[i].start); - DicConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].length = {1}", i, + AaruConsole.DebugWriteLine("Atari partition plugin", "table.entries[{0}].length = {1}", i, table.entries[i].length); } - DicConsole.DebugWriteLine("Atari partition plugin", "table.badStart = {0}", table.badStart); - DicConsole.DebugWriteLine("Atari partition plugin", "table.badLength = {0}", table.badLength); - DicConsole.DebugWriteLine("Atari partition plugin", "table.checksum = 0x{0:X4}", table.checksum); + AaruConsole.DebugWriteLine("Atari partition plugin", "table.badStart = {0}", table.badStart); + AaruConsole.DebugWriteLine("Atari partition plugin", "table.badLength = {0}", table.badLength); + AaruConsole.DebugWriteLine("Atari partition plugin", "table.checksum = 0x{0:X4}", table.checksum); bool validTable = false; ulong partitionSequence = 0; @@ -157,7 +157,7 @@ namespace Aaru.Partitions if(table.entries[i].start <= imagePlugin.Info.Sectors) { if(table.entries[i].start + table.entries[i].length > imagePlugin.Info.Sectors) - DicConsole.DebugWriteLine("Atari partition plugin", + AaruConsole.DebugWriteLine("Atari partition plugin", "WARNING: End of partition goes beyond device size"); ulong sectorSize = imagePlugin.Info.SectorSize; @@ -254,7 +254,7 @@ namespace Aaru.Partitions if(extendedTable.entries[j].start + extendedTable.entries[j].length > imagePlugin.Info.Sectors) - DicConsole.DebugWriteLine("Atari partition plugin", + AaruConsole.DebugWriteLine("Atari partition plugin", "WARNING: End of partition goes beyond device size"); ulong sectorSize = imagePlugin.Info.SectorSize; @@ -335,7 +335,7 @@ namespace Aaru.Partitions if(table.icdEntries[i].start > imagePlugin.Info.Sectors) continue; if(table.icdEntries[i].start + table.icdEntries[i].length > imagePlugin.Info.Sectors) - DicConsole.DebugWriteLine("Atari partition plugin", + AaruConsole.DebugWriteLine("Atari partition plugin", "WARNING: End of partition goes beyond device size"); ulong sectorSize = imagePlugin.Info.SectorSize; diff --git a/Aaru.Partitions/BSD.cs b/Aaru.Partitions/BSD.cs index af4854dfe..572c1099d 100644 --- a/Aaru.Partitions/BSD.cs +++ b/Aaru.Partitions/BSD.cs @@ -78,7 +78,7 @@ namespace Aaru.Partitions Array.Copy(tmp, offset, sector, 0, MAX_LABEL_SIZE); dl = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("BSD plugin", + AaruConsole.DebugWriteLine("BSD plugin", "dl.magic on sector {0} at offset {1} = 0x{2:X8} (expected 0x{3:X8})", location + sectorOffset, offset, dl.d_magic, DISKMAGIC); if((dl.d_magic != DISKMAGIC || dl.d_magic2 != DISKMAGIC) && @@ -95,53 +95,53 @@ namespace Aaru.Partitions if(dl.d_magic == DISKCIGAM && dl.d_magic2 == DISKCIGAM) dl = SwapDiskLabel(dl); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_type = {0}", dl.d_type); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_subtype = {0}", dl.d_subtype); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_typename = {0}", + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_type = {0}", dl.d_type); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_subtype = {0}", dl.d_subtype); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_typename = {0}", StringHandlers.CToString(dl.d_typename)); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_packname = {0}", + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_packname = {0}", StringHandlers.CToString(dl.d_packname)); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_secsize = {0}", dl.d_secsize); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_nsectors = {0}", dl.d_nsectors); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_ntracks = {0}", dl.d_ntracks); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_ncylinders = {0}", dl.d_ncylinders); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_secpercyl = {0}", dl.d_secpercyl); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_secperunit = {0}", dl.d_secperunit); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_sparespertrack = {0}", dl.d_sparespertrack); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_sparespercyl = {0}", dl.d_sparespercyl); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_acylinders = {0}", dl.d_acylinders); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_rpm = {0}", dl.d_rpm); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_interleave = {0}", dl.d_interleave); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_trackskew = {0}", dl.d_trackskew); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_cylskeew = {0}", dl.d_cylskeew); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_headswitch = {0}", dl.d_headswitch); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_trkseek = {0}", dl.d_trkseek); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_flags = {0}", dl.d_flags); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[0] = {0}", dl.d_drivedata[0]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[1] = {0}", dl.d_drivedata[1]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[2] = {0}", dl.d_drivedata[2]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[3] = {0}", dl.d_drivedata[3]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[4] = {0}", dl.d_drivedata[4]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_spare[0] = {0}", dl.d_spare[0]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_spare[1] = {0}", dl.d_spare[1]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_spare[2] = {0}", dl.d_spare[2]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_spare[3] = {0}", dl.d_spare[3]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_spare[4] = {0}", dl.d_spare[4]); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_magic2 = 0x{0:X8}", dl.d_magic2); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_checksum = 0x{0:X8}", dl.d_checksum); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_npartitions = {0}", dl.d_npartitions); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_bbsize = {0}", dl.d_bbsize); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_sbsize = {0}", dl.d_sbsize); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_secsize = {0}", dl.d_secsize); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_nsectors = {0}", dl.d_nsectors); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_ntracks = {0}", dl.d_ntracks); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_ncylinders = {0}", dl.d_ncylinders); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_secpercyl = {0}", dl.d_secpercyl); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_secperunit = {0}", dl.d_secperunit); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_sparespertrack = {0}", dl.d_sparespertrack); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_sparespercyl = {0}", dl.d_sparespercyl); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_acylinders = {0}", dl.d_acylinders); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_rpm = {0}", dl.d_rpm); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_interleave = {0}", dl.d_interleave); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_trackskew = {0}", dl.d_trackskew); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_cylskeew = {0}", dl.d_cylskeew); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_headswitch = {0}", dl.d_headswitch); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_trkseek = {0}", dl.d_trkseek); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_flags = {0}", dl.d_flags); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[0] = {0}", dl.d_drivedata[0]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[1] = {0}", dl.d_drivedata[1]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[2] = {0}", dl.d_drivedata[2]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[3] = {0}", dl.d_drivedata[3]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_drivedata[4] = {0}", dl.d_drivedata[4]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_spare[0] = {0}", dl.d_spare[0]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_spare[1] = {0}", dl.d_spare[1]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_spare[2] = {0}", dl.d_spare[2]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_spare[3] = {0}", dl.d_spare[3]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_spare[4] = {0}", dl.d_spare[4]); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_magic2 = 0x{0:X8}", dl.d_magic2); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_checksum = 0x{0:X8}", dl.d_checksum); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_npartitions = {0}", dl.d_npartitions); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_bbsize = {0}", dl.d_bbsize); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_sbsize = {0}", dl.d_sbsize); ulong counter = 0; bool addSectorOffset = false; for(int i = 0; i < dl.d_npartitions && i < 22; i++) { - DicConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_offset = {0}", + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_offset = {0}", dl.d_partitions[i].p_offset); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_size = {0}", dl.d_partitions[i].p_size); - DicConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_fstype = {0} ({1})", + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_size = {0}", dl.d_partitions[i].p_size); + AaruConsole.DebugWriteLine("BSD plugin", "dl.d_partitions[i].p_fstype = {0} ({1})", dl.d_partitions[i].p_fstype, fsTypeToString(dl.d_partitions[i].p_fstype)); Partition part = new Partition { @@ -164,8 +164,8 @@ namespace Aaru.Partitions part.Offset += sectorOffset * imagePlugin.Info.SectorSize; } - DicConsole.DebugWriteLine("BSD plugin", "part.start = {0}", part.Start); - DicConsole.DebugWriteLine("BSD plugin", "Adding it..."); + AaruConsole.DebugWriteLine("BSD plugin", "part.start = {0}", part.Start); + AaruConsole.DebugWriteLine("BSD plugin", "Adding it..."); partitions.Add(part); counter++; } diff --git a/Aaru.Partitions/GPT.cs b/Aaru.Partitions/GPT.cs index 8a6309f88..e3c13fc48 100644 --- a/Aaru.Partitions/GPT.cs +++ b/Aaru.Partitions/GPT.cs @@ -63,17 +63,17 @@ namespace Aaru.Partitions ulong signature = BitConverter.ToUInt64(hdrBytes, 0); bool misaligned = false; - DicConsole.DebugWriteLine("GPT Plugin", "hdr.signature = 0x{0:X16}", signature); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.signature = 0x{0:X16}", signature); if(signature != GPT_MAGIC) if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc) { hdrBytes = imagePlugin.ReadSector(sectorOffset); signature = BitConverter.ToUInt64(hdrBytes, 512); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.signature @ 0x200 = 0x{0:X16}", signature); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.signature @ 0x200 = 0x{0:X16}", signature); if(signature == GPT_MAGIC) { - DicConsole.DebugWriteLine("GPT Plugin", "Found unaligned signature", signature); + AaruConsole.DebugWriteLine("GPT Plugin", "Found unaligned signature", signature); byte[] real = new byte[512]; Array.Copy(hdrBytes, 512, real, 0, 512); hdrBytes = real; @@ -87,19 +87,19 @@ namespace Aaru.Partitions try { hdr = Marshal.ByteArrayToStructureLittleEndian(hdrBytes); } catch { return false; } - DicConsole.DebugWriteLine("GPT Plugin", "hdr.revision = 0x{0:X8}", hdr.revision); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.headerSize = {0}", hdr.headerSize); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.headerCrc = 0x{0:X8}", hdr.headerCrc); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.reserved = 0x{0:X8}", hdr.reserved); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.myLBA = {0}", hdr.myLBA); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.alternateLBA = {0}", hdr.alternateLBA); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.firstUsableLBA = {0}", hdr.firstUsableLBA); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.lastUsableLBA = {0}", hdr.lastUsableLBA); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.diskGuid = {0}", hdr.diskGuid); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.entryLBA = {0}", hdr.entryLBA); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.entries = {0}", hdr.entries); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.entriesSize = {0}", hdr.entriesSize); - DicConsole.DebugWriteLine("GPT Plugin", "hdr.entriesCrc = 0x{0:X8}", hdr.entriesCrc); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.revision = 0x{0:X8}", hdr.revision); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.headerSize = {0}", hdr.headerSize); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.headerCrc = 0x{0:X8}", hdr.headerCrc); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.reserved = 0x{0:X8}", hdr.reserved); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.myLBA = {0}", hdr.myLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.alternateLBA = {0}", hdr.alternateLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.firstUsableLBA = {0}", hdr.firstUsableLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.lastUsableLBA = {0}", hdr.lastUsableLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.diskGuid = {0}", hdr.diskGuid); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.entryLBA = {0}", hdr.entryLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.entries = {0}", hdr.entries); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.entriesSize = {0}", hdr.entriesSize); + AaruConsole.DebugWriteLine("GPT Plugin", "hdr.entriesCrc = 0x{0:X8}", hdr.entriesCrc); if(hdr.signature != GPT_MAGIC) return false; @@ -151,12 +151,12 @@ namespace Aaru.Partitions foreach(GptEntry entry in entries.Where(entry => entry.partitionType != Guid.Empty && entry.partitionId != Guid.Empty)) { - DicConsole.DebugWriteLine("GPT Plugin", "entry.partitionType = {0}", entry.partitionType); - DicConsole.DebugWriteLine("GPT Plugin", "entry.partitionId = {0}", entry.partitionId); - DicConsole.DebugWriteLine("GPT Plugin", "entry.startLBA = {0}", entry.startLBA); - DicConsole.DebugWriteLine("GPT Plugin", "entry.endLBA = {0}", entry.endLBA); - DicConsole.DebugWriteLine("GPT Plugin", "entry.attributes = 0x{0:X16}", entry.attributes); - DicConsole.DebugWriteLine("GPT Plugin", "entry.name = {0}", entry.name); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.partitionType = {0}", entry.partitionType); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.partitionId = {0}", entry.partitionId); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.startLBA = {0}", entry.startLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.endLBA = {0}", entry.endLBA); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.attributes = 0x{0:X16}", entry.attributes); + AaruConsole.DebugWriteLine("GPT Plugin", "entry.name = {0}", entry.name); if(entry.startLBA / divisor > imagePlugin.Info.Sectors || entry.endLBA / divisor > imagePlugin.Info.Sectors) return false; @@ -173,7 +173,7 @@ namespace Aaru.Partitions Type = GetGuidTypeName(entry.partitionType), Scheme = Name }; - DicConsole.DebugWriteLine("GPT Plugin", "part.PartitionType = {0}", part.Type); + AaruConsole.DebugWriteLine("GPT Plugin", "part.PartitionType = {0}", part.Type); partitions.Add(part); } diff --git a/Aaru.Partitions/Human68k.cs b/Aaru.Partitions/Human68k.cs index c9883cabc..7fee84c18 100644 --- a/Aaru.Partitions/Human68k.cs +++ b/Aaru.Partitions/Human68k.cs @@ -56,7 +56,7 @@ namespace Aaru.Partitions byte[] sector; ulong sectsPerUnit; - DicConsole.DebugWriteLine("Human68k plugin", "sectorSize = {0}", imagePlugin.Info.SectorSize); + AaruConsole.DebugWriteLine("Human68k plugin", "sectorSize = {0}", imagePlugin.Info.SectorSize); if(sectorOffset + 4 >= imagePlugin.Info.Sectors) return false; @@ -79,26 +79,26 @@ namespace Aaru.Partitions X68kTable table = Marshal.ByteArrayToStructureBigEndian(sector); - DicConsole.DebugWriteLine("Human68k plugin", "table.magic = {0:X4}", table.magic); + AaruConsole.DebugWriteLine("Human68k plugin", "table.magic = {0:X4}", table.magic); if(table.magic != X68K_MAGIC) return false; for(int i = 0; i < table.entries.Length; i++) table.entries[i] = (X68kEntry)Marshal.SwapStructureMembersEndian(table.entries[i]); - DicConsole.DebugWriteLine("Human68k plugin", "table.size = {0:X4}", table.size); - DicConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2); - DicConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown); + AaruConsole.DebugWriteLine("Human68k plugin", "table.size = {0:X4}", table.size); + AaruConsole.DebugWriteLine("Human68k plugin", "table.size2 = {0:X4}", table.size2); + AaruConsole.DebugWriteLine("Human68k plugin", "table.unknown = {0:X4}", table.unknown); ulong counter = 0; foreach(X68kEntry entry in table.entries) { - DicConsole.DebugWriteLine("Human68k plugin", "entry.name = {0}", + AaruConsole.DebugWriteLine("Human68k plugin", "entry.name = {0}", StringHandlers.CToString(entry.name, Encoding.GetEncoding(932))); - DicConsole.DebugWriteLine("Human68k plugin", "entry.stateStart = {0}", entry.stateStart); - DicConsole.DebugWriteLine("Human68k plugin", "entry.length = {0}", entry.length); - DicConsole.DebugWriteLine("Human68k plugin", "sectsPerUnit = {0} {1}", sectsPerUnit, + AaruConsole.DebugWriteLine("Human68k plugin", "entry.stateStart = {0}", entry.stateStart); + AaruConsole.DebugWriteLine("Human68k plugin", "entry.length = {0}", entry.length); + AaruConsole.DebugWriteLine("Human68k plugin", "sectsPerUnit = {0} {1}", sectsPerUnit, imagePlugin.Info.SectorSize); Partition part = new Partition diff --git a/Aaru.Partitions/MBR.cs b/Aaru.Partitions/MBR.cs index 001a740dd..0f1b1bb6f 100644 --- a/Aaru.Partitions/MBR.cs +++ b/Aaru.Partitions/MBR.cs @@ -219,8 +219,8 @@ namespace Aaru.Partitions DiskManagerMasterBootRecord mbrOntrack = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("MBR plugin", "xmlmedia = {0}", imagePlugin.Info.XmlMediaType); - DicConsole.DebugWriteLine("MBR plugin", "mbr.magic = {0:X4}", mbr.magic); + AaruConsole.DebugWriteLine("MBR plugin", "xmlmedia = {0}", imagePlugin.Info.XmlMediaType); + AaruConsole.DebugWriteLine("MBR plugin", "mbr.magic = {0:X4}", mbr.magic); if(mbr.magic != MBR_MAGIC) return false; // Not MBR @@ -228,7 +228,7 @@ namespace Aaru.Partitions ulong signature = BitConverter.ToUInt64(hdrBytes, 0); - DicConsole.DebugWriteLine("MBR Plugin", "gpt.signature = 0x{0:X16}", signature); + AaruConsole.DebugWriteLine("MBR Plugin", "gpt.signature = 0x{0:X16}", signature); if(signature == GPT_MAGIC) return false; @@ -236,7 +236,7 @@ namespace Aaru.Partitions { hdrBytes = imagePlugin.ReadSector(sectorOffset); signature = BitConverter.ToUInt64(hdrBytes, 512); - DicConsole.DebugWriteLine("MBR Plugin", "gpt.signature @ 0x200 = 0x{0:X16}", signature); + AaruConsole.DebugWriteLine("MBR Plugin", "gpt.signature @ 0x200 = 0x{0:X16}", signature); if(signature == GPT_MAGIC) return false; } @@ -300,21 +300,21 @@ namespace Aaru.Partitions // Some buggy implementations do some rounding errors getting a few sectors beyond device size if(lbaStart + lbaSectors > imagePlugin.Info.Sectors) lbaSectors = imagePlugin.Info.Sectors - lbaStart; - DicConsole.DebugWriteLine("MBR plugin", "entry.status {0}", entry.status); - DicConsole.DebugWriteLine("MBR plugin", "entry.type {0}", entry.type); - DicConsole.DebugWriteLine("MBR plugin", "entry.lba_start {0}", entry.lba_start); - DicConsole.DebugWriteLine("MBR plugin", "entry.lba_sectors {0}", entry.lba_sectors); - DicConsole.DebugWriteLine("MBR plugin", "entry.start_cylinder {0}", startCylinder); - DicConsole.DebugWriteLine("MBR plugin", "entry.start_head {0}", entry.start_head); - DicConsole.DebugWriteLine("MBR plugin", "entry.start_sector {0}", startSector); - DicConsole.DebugWriteLine("MBR plugin", "entry.end_cylinder {0}", endCylinder); - DicConsole.DebugWriteLine("MBR plugin", "entry.end_head {0}", entry.end_head); - DicConsole.DebugWriteLine("MBR plugin", "entry.end_sector {0}", endSector); + AaruConsole.DebugWriteLine("MBR plugin", "entry.status {0}", entry.status); + AaruConsole.DebugWriteLine("MBR plugin", "entry.type {0}", entry.type); + AaruConsole.DebugWriteLine("MBR plugin", "entry.lba_start {0}", entry.lba_start); + AaruConsole.DebugWriteLine("MBR plugin", "entry.lba_sectors {0}", entry.lba_sectors); + AaruConsole.DebugWriteLine("MBR plugin", "entry.start_cylinder {0}", startCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "entry.start_head {0}", entry.start_head); + AaruConsole.DebugWriteLine("MBR plugin", "entry.start_sector {0}", startSector); + AaruConsole.DebugWriteLine("MBR plugin", "entry.end_cylinder {0}", endCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "entry.end_head {0}", entry.end_head); + AaruConsole.DebugWriteLine("MBR plugin", "entry.end_sector {0}", endSector); - DicConsole.DebugWriteLine("MBR plugin", "entry.minix = {0}", minix); + AaruConsole.DebugWriteLine("MBR plugin", "entry.minix = {0}", minix); - DicConsole.DebugWriteLine("MBR plugin", "lba_start {0}", lbaStart); - DicConsole.DebugWriteLine("MBR plugin", "lba_sectors {0}", lbaSectors); + AaruConsole.DebugWriteLine("MBR plugin", "lba_start {0}", lbaStart); + AaruConsole.DebugWriteLine("MBR plugin", "lba_sectors {0}", lbaSectors); if(valid && minix) // Let's mix the fun if(GetMinix(imagePlugin, lbaStart, divider, sectorOffset, sectorSize, out List mnxParts)) @@ -348,7 +348,7 @@ namespace Aaru.Partitions } } - DicConsole.DebugWriteLine("MBR plugin", "entry.extended = {0}", extended); + AaruConsole.DebugWriteLine("MBR plugin", "entry.extended = {0}", extended); if(!extended) continue; @@ -361,7 +361,7 @@ namespace Aaru.Partitions ExtendedBootRecord ebr = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("MBR plugin", "ebr.magic == MBR_Magic = {0}", ebr.magic == MBR_MAGIC); + AaruConsole.DebugWriteLine("MBR plugin", "ebr.magic == MBR_Magic = {0}", ebr.magic == MBR_MAGIC); if(ebr.magic != MBR_MAGIC) break; @@ -378,16 +378,16 @@ namespace Aaru.Partitions ulong extSectors = ebrEntry.lba_sectors; bool extMinix = false; - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.status {0}", ebrEntry.status); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.type {0}", ebrEntry.type); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.lba_start {0}", ebrEntry.lba_start); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.lba_sectors {0}", ebrEntry.lba_sectors); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_cylinder {0}", startCylinder); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_head {0}", ebrEntry.start_head); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_sector {0}", startSector); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_cylinder {0}", endCylinder); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_head {0}", ebrEntry.end_head); - DicConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_sector {0}", endSector); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.status {0}", ebrEntry.status); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.type {0}", ebrEntry.type); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.lba_start {0}", ebrEntry.lba_start); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.lba_sectors {0}", ebrEntry.lba_sectors); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_cylinder {0}", startCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_head {0}", ebrEntry.start_head); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.start_sector {0}", startSector); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_cylinder {0}", endCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_head {0}", ebrEntry.end_head); + AaruConsole.DebugWriteLine("MBR plugin", "ebr_entry.end_sector {0}", endSector); // Let's start the fun... extValid &= ebrEntry.status == 0x00 || ebrEntry.status == 0x80; @@ -410,8 +410,8 @@ namespace Aaru.Partitions extStart /= divider; extSectors /= divider; - DicConsole.DebugWriteLine("MBR plugin", "ext_start {0}", extStart); - DicConsole.DebugWriteLine("MBR plugin", "ext_sectors {0}", extSectors); + AaruConsole.DebugWriteLine("MBR plugin", "ext_start {0}", extStart); + AaruConsole.DebugWriteLine("MBR plugin", "ext_sectors {0}", extSectors); if(ebrEntry.type == 0x05 || ebrEntry.type == 0x0F || ebrEntry.type == 0x15 || ebrEntry.type == 0x1F || ebrEntry.type == 0x85 || ebrEntry.type == 0x91 || @@ -460,7 +460,7 @@ namespace Aaru.Partitions partitions.Add(part); } - DicConsole.DebugWriteLine("MBR plugin", "next_start {0}", nextStart); + AaruConsole.DebugWriteLine("MBR plugin", "next_start {0}", nextStart); processingExtended &= nextStart != 0; processingExtended &= nextStart <= imagePlugin.Info.Sectors; lbaStart = nextStart; @@ -481,7 +481,7 @@ namespace Aaru.Partitions ExtendedBootRecord mnx = Marshal.ByteArrayToStructureLittleEndian(sector); - DicConsole.DebugWriteLine("MBR plugin", "mnx.magic == MBR_Magic = {0}", mnx.magic == MBR_MAGIC); + AaruConsole.DebugWriteLine("MBR plugin", "mnx.magic == MBR_Magic = {0}", mnx.magic == MBR_MAGIC); if(mnx.magic != MBR_MAGIC) return false; @@ -497,16 +497,16 @@ namespace Aaru.Partitions ulong mnxStart = mnxEntry.lba_start; ulong mnxSectors = mnxEntry.lba_sectors; - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.status {0}", mnxEntry.status); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.type {0}", mnxEntry.type); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.lba_start {0}", mnxEntry.lba_start); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.lba_sectors {0}", mnxEntry.lba_sectors); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_cylinder {0}", startCylinder); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_head {0}", mnxEntry.start_head); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_sector {0}", startSector); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_cylinder {0}", endCylinder); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_head {0}", mnxEntry.end_head); - DicConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_sector {0}", endSector); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.status {0}", mnxEntry.status); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.type {0}", mnxEntry.type); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.lba_start {0}", mnxEntry.lba_start); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.lba_sectors {0}", mnxEntry.lba_sectors); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_cylinder {0}", startCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_head {0}", mnxEntry.start_head); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.start_sector {0}", startSector); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_cylinder {0}", endCylinder); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_head {0}", mnxEntry.end_head); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_entry.end_sector {0}", endSector); mnxValid &= mnxEntry.status == 0x00 || mnxEntry.status == 0x80; mnxValid &= mnxEntry.type == 0x81 || mnxEntry.type == 0x80; @@ -525,8 +525,8 @@ namespace Aaru.Partitions mnxStart /= divider; mnxSectors /= divider; - DicConsole.DebugWriteLine("MBR plugin", "mnx_start {0}", mnxStart); - DicConsole.DebugWriteLine("MBR plugin", "mnx_sectors {0}", mnxSectors); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_start {0}", mnxStart); + AaruConsole.DebugWriteLine("MBR plugin", "mnx_sectors {0}", mnxSectors); if(!mnxValid) continue; diff --git a/Aaru.Partitions/NeXT.cs b/Aaru.Partitions/NeXT.cs index 0c8b0b4b6..2efe1a449 100644 --- a/Aaru.Partitions/NeXT.cs +++ b/Aaru.Partitions/NeXT.cs @@ -100,67 +100,67 @@ namespace Aaru.Partitions label.dl_dt = Marshal.ByteArrayToStructureBigEndian(disktabB); label.dl_dt.d_partitions = new NeXTEntry[8]; - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_version = 0x{0:X8}", label.dl_version); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_label_blkno = {0}", label.dl_label_blkno); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_size = {0}", label.dl_size); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_label = \"{0}\"", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_version = 0x{0:X8}", label.dl_version); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_label_blkno = {0}", label.dl_label_blkno); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_size = {0}", label.dl_size); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_label = \"{0}\"", StringHandlers.CToString(label.dl_label)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_flags = {0}", label.dl_flags); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_tag = 0x{0:X8}", label.dl_tag); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_name = \"{0}\"", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_flags = {0}", label.dl_flags); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_tag = 0x{0:X8}", label.dl_tag); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_name = \"{0}\"", StringHandlers.CToString(label.dl_dt.d_name)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_type = \"{0}\"", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_type = \"{0}\"", StringHandlers.CToString(label.dl_dt.d_type)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_secsize = {0}", label.dl_dt.d_secsize); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ntracks = {0}", label.dl_dt.d_ntracks); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_nsectors = {0}", label.dl_dt.d_nsectors); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ncylinders = {0}", label.dl_dt.d_ncylinders); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rpm = {0}", label.dl_dt.d_rpm); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_front = {0}", label.dl_dt.d_front); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_back = {0}", label.dl_dt.d_back); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ngroups = {0}", label.dl_dt.d_ngroups); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_size = {0}", label.dl_dt.d_ag_size); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_alts = {0}", label.dl_dt.d_ag_alts); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_off = {0}", label.dl_dt.d_ag_off); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_boot0_blkno[0] = {0}", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_secsize = {0}", label.dl_dt.d_secsize); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ntracks = {0}", label.dl_dt.d_ntracks); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_nsectors = {0}", label.dl_dt.d_nsectors); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ncylinders = {0}", label.dl_dt.d_ncylinders); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rpm = {0}", label.dl_dt.d_rpm); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_front = {0}", label.dl_dt.d_front); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_back = {0}", label.dl_dt.d_back); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ngroups = {0}", label.dl_dt.d_ngroups); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_size = {0}", label.dl_dt.d_ag_size); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_alts = {0}", label.dl_dt.d_ag_alts); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_ag_off = {0}", label.dl_dt.d_ag_off); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_boot0_blkno[0] = {0}", label.dl_dt.d_boot0_blkno[0]); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_boot0_blkno[1] = {0}", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_boot0_blkno[1] = {0}", label.dl_dt.d_boot0_blkno[1]); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_bootfile = \"{0}\"", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_bootfile = \"{0}\"", StringHandlers.CToString(label.dl_dt.d_bootfile)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_hostname = \"{0}\"", + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_hostname = \"{0}\"", StringHandlers.CToString(label.dl_dt.d_hostname)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rootpartition = {0}", label.dl_dt.d_rootpartition); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rwpartition = {0}", label.dl_dt.d_rwpartition); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rootpartition = {0}", label.dl_dt.d_rootpartition); + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_rwpartition = {0}", label.dl_dt.d_rwpartition); for(int i = 0; i < 8; i++) { byte[] partB = new byte[44]; Array.Copy(labelSector, 44 + 146 + 44 * i, partB, 0, 44); label.dl_dt.d_partitions[i] = Marshal.ByteArrayToStructureBigEndian(partB); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_base = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_base = {1}", i, label.dl_dt.d_partitions[i].p_base); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_size = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_size = {1}", i, label.dl_dt.d_partitions[i].p_size); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_bsize = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_bsize = {1}", i, label.dl_dt.d_partitions[i].p_bsize); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_fsize = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_fsize = {1}", i, label.dl_dt.d_partitions[i].p_fsize); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_opt = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_opt = {1}", i, label.dl_dt.d_partitions[i].p_opt); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_cpg = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_cpg = {1}", i, label.dl_dt.d_partitions[i].p_cpg); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_density = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_density = {1}", i, label.dl_dt.d_partitions[i].p_density); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_minfree = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_minfree = {1}", i, label.dl_dt.d_partitions[i].p_minfree); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_newfs = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_newfs = {1}", i, label.dl_dt.d_partitions[i].p_newfs); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_mountpt = \"{1}\"", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_mountpt = \"{1}\"", i, StringHandlers.CToString(label.dl_dt.d_partitions[i].p_mountpt)); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_automnt = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_automnt = {1}", i, label.dl_dt.d_partitions[i].p_automnt); - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_type = \"{1}\"", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_type = \"{1}\"", i, StringHandlers.CToString(label.dl_dt.d_partitions[i].p_type)); if(label.dl_dt.d_partitions[i].p_size <= 0 || label.dl_dt.d_partitions[i].p_base < 0 || @@ -184,10 +184,10 @@ namespace Aaru.Partitions if(part.Start + part.Length > imagePlugin.Info.Sectors) { - DicConsole.DebugWriteLine("NeXT Plugin", "Partition bigger than device, reducing..."); + AaruConsole.DebugWriteLine("NeXT Plugin", "Partition bigger than device, reducing..."); part.Length = imagePlugin.Info.Sectors - part.Start; part.Size = part.Length * sectorSize; - DicConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_size = {1}", i, + AaruConsole.DebugWriteLine("NeXT Plugin", "label.dl_dt.d_partitions[{0}].p_size = {1}", i, part.Length); } diff --git a/Aaru.Partitions/PC98.cs b/Aaru.Partitions/PC98.cs index 55b68bfe1..cdefbbbc9 100644 --- a/Aaru.Partitions/PC98.cs +++ b/Aaru.Partitions/PC98.cs @@ -67,20 +67,20 @@ namespace Aaru.Partitions foreach(PC98Partition entry in table.entries) { - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_mid = {0}", entry.dp_mid); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_sid = {0}", entry.dp_sid); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_dum1 = {0}", entry.dp_dum1); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_dum2 = {0}", entry.dp_dum2); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_sct = {0}", entry.dp_ipl_sct); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_head = {0}", entry.dp_ipl_head); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_cyl = {0}", entry.dp_ipl_cyl); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ssect = {0}", entry.dp_ssect); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_shd = {0}", entry.dp_shd); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_scyl = {0}", entry.dp_scyl); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_esect = {0}", entry.dp_esect); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ehd = {0}", entry.dp_ehd); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_ecyl = {0}", entry.dp_ecyl); - DicConsole.DebugWriteLine("PC98 plugin", "entry.dp_name = \"{0}\"", + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_mid = {0}", entry.dp_mid); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_sid = {0}", entry.dp_sid); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_dum1 = {0}", entry.dp_dum1); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_dum2 = {0}", entry.dp_dum2); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_sct = {0}", entry.dp_ipl_sct); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_head = {0}", entry.dp_ipl_head); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ipl_cyl = {0}", entry.dp_ipl_cyl); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ssect = {0}", entry.dp_ssect); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_shd = {0}", entry.dp_shd); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_scyl = {0}", entry.dp_scyl); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_esect = {0}", entry.dp_esect); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ehd = {0}", entry.dp_ehd); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_ecyl = {0}", entry.dp_ecyl); + AaruConsole.DebugWriteLine("PC98 plugin", "entry.dp_name = \"{0}\"", StringHandlers.CToString(entry.dp_name, Encoding.GetEncoding(932))); if(entry.dp_scyl == entry.dp_ecyl || entry.dp_ecyl <= 0 || @@ -103,13 +103,13 @@ namespace Aaru.Partitions imagePlugin.Info.SectorsPerTrack) - part.Start; part.Size = part.Length * imagePlugin.Info.SectorSize; - DicConsole.DebugWriteLine("PC98 plugin", "part.Start = {0}", part.Start); - DicConsole.DebugWriteLine("PC98 plugin", "part.Type = {0}", part.Type); - DicConsole.DebugWriteLine("PC98 plugin", "part.Name = {0}", part.Name); - DicConsole.DebugWriteLine("PC98 plugin", "part.Sequence = {0}", part.Sequence); - DicConsole.DebugWriteLine("PC98 plugin", "part.Offset = {0}", part.Offset); - DicConsole.DebugWriteLine("PC98 plugin", "part.Length = {0}", part.Length); - DicConsole.DebugWriteLine("PC98 plugin", "part.Size = {0}", part.Size); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Start = {0}", part.Start); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Type = {0}", part.Type); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Name = {0}", part.Name); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Sequence = {0}", part.Sequence); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Offset = {0}", part.Offset); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Length = {0}", part.Length); + AaruConsole.DebugWriteLine("PC98 plugin", "part.Size = {0}", part.Size); if((entry.dp_mid & 0x20) != 0x20 && (entry.dp_mid & 0x44) != 0x44 || part.Start >= imagePlugin.Info.Sectors || diff --git a/Aaru.Partitions/RDB.cs b/Aaru.Partitions/RDB.cs index 80506d248..0ef90987e 100644 --- a/Aaru.Partitions/RDB.cs +++ b/Aaru.Partitions/RDB.cs @@ -294,12 +294,12 @@ namespace Aaru.Partitions byte[] tmpSector = imagePlugin.ReadSector(rdbBlock + sectorOffset); uint magic = BigEndianBitConverter.ToUInt32(tmpSector, 0); - DicConsole.DebugWriteLine("Amiga RDB plugin", "Possible magic at block {0} is 0x{1:X8}", rdbBlock, + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Possible magic at block {0} is 0x{1:X8}", rdbBlock, magic); if(magic == RIGID_DISK_BLOCK_MAGIC) { - DicConsole.DebugWriteLine("Amiga RDB plugin", "Found RDB magic at block {0}", rdbBlock); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Found RDB magic at block {0}", rdbBlock); foundRdb = true; break; @@ -388,68 +388,68 @@ namespace Aaru.Partitions rdb.Reserved24 = BigEndianBitConverter.ToUInt32(sector, 0xF8); rdb.Reserved25 = BigEndianBitConverter.ToUInt32(sector, 0xFC); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.magic = 0x{0:X8}", rdb.Magic); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.size = {0} longs, {1} bytes", rdb.Size, rdb.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.checksum = 0x{0:X8}", rdb.Checksum); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.targetID = {0}", rdb.TargetId); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.block_size = {0}", rdb.BlockSize); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.badblock_ptr = {0}", rdb.BadblockPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.partition_ptr = {0}", rdb.PartitionPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.fsheader_ptr = {0}", rdb.FsheaderPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.driveinitcode = {0}", rdb.Driveinitcode); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved1 = 0x{0:X8}", rdb.Reserved1); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved2 = 0x{0:X8}", rdb.Reserved2); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved3 = 0x{0:X8}", rdb.Reserved3); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved4 = 0x{0:X8}", rdb.Reserved4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved5 = 0x{0:X8}", rdb.Reserved5); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved6 = 0x{0:X8}", rdb.Reserved6); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.cylinders = {0}", rdb.Cylinders); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.spt = {0}", rdb.Spt); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.heads = {0}", rdb.Heads); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.interleave = {0}", rdb.Interleave); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.parking = {0}", rdb.Parking); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved7 = 0x{0:X8}", rdb.Reserved7); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved8 = 0x{0:X8}", rdb.Reserved8); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved9 = 0x{0:X8}", rdb.Reserved9); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.writeprecomp = {0}", rdb.Writeprecomp); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reducedwrite = {0}", rdb.Reducedwrite); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.steprate = {0}", rdb.Steprate); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved10 = 0x{0:X8}", rdb.Reserved10); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved11 = 0x{0:X8}", rdb.Reserved11); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved12 = 0x{0:X8}", rdb.Reserved12); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved13 = 0x{0:X8}", rdb.Reserved13); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved14 = 0x{0:X8}", rdb.Reserved14); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.RDBBlockLow = {0}", rdb.RdbBlockLow); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.RDBBlockHigh = {0}", rdb.RdbBlockHigh); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.LowCylinder = {0}", rdb.LowCylinder); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.HighCylinder = {0}", rdb.HighCylinder); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.CylBlocks = {0}", rdb.CylBlocks); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.AutoParkSeconds = {0}", rdb.AutoParkSeconds); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.HighCylinder = {0}", rdb.HighCylinder); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved15 = 0x{0:X8}", rdb.Reserved15); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskVendor = \"{0}\"", rdb.DiskVendor); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskProduct = \"{0}\"", rdb.DiskProduct); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskRevision = \"{0}\"", rdb.DiskRevision); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerVendor = \"{0}\"", rdb.ControllerVendor); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerProduct = \"{0}\"", rdb.ControllerProduct); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerRevision = \"{0}\"", rdb.ControllerRevision); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved16 = 0x{0:X8}", rdb.Reserved16); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved17 = 0x{0:X8}", rdb.Reserved17); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved18 = 0x{0:X8}", rdb.Reserved18); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved19 = 0x{0:X8}", rdb.Reserved19); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved20 = 0x{0:X8}", rdb.Reserved20); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved21 = 0x{0:X8}", rdb.Reserved21); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved22 = 0x{0:X8}", rdb.Reserved22); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved23 = 0x{0:X8}", rdb.Reserved23); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved24 = 0x{0:X8}", rdb.Reserved24); - DicConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved25 = 0x{0:X8}", rdb.Reserved25); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.magic = 0x{0:X8}", rdb.Magic); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.size = {0} longs, {1} bytes", rdb.Size, rdb.Size * 4); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.checksum = 0x{0:X8}", rdb.Checksum); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.targetID = {0}", rdb.TargetId); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.block_size = {0}", rdb.BlockSize); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.badblock_ptr = {0}", rdb.BadblockPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.partition_ptr = {0}", rdb.PartitionPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.fsheader_ptr = {0}", rdb.FsheaderPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.driveinitcode = {0}", rdb.Driveinitcode); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved1 = 0x{0:X8}", rdb.Reserved1); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved2 = 0x{0:X8}", rdb.Reserved2); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved3 = 0x{0:X8}", rdb.Reserved3); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved4 = 0x{0:X8}", rdb.Reserved4); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved5 = 0x{0:X8}", rdb.Reserved5); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved6 = 0x{0:X8}", rdb.Reserved6); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.cylinders = {0}", rdb.Cylinders); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.spt = {0}", rdb.Spt); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.heads = {0}", rdb.Heads); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.interleave = {0}", rdb.Interleave); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.parking = {0}", rdb.Parking); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved7 = 0x{0:X8}", rdb.Reserved7); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved8 = 0x{0:X8}", rdb.Reserved8); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved9 = 0x{0:X8}", rdb.Reserved9); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.writeprecomp = {0}", rdb.Writeprecomp); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reducedwrite = {0}", rdb.Reducedwrite); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.steprate = {0}", rdb.Steprate); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved10 = 0x{0:X8}", rdb.Reserved10); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved11 = 0x{0:X8}", rdb.Reserved11); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved12 = 0x{0:X8}", rdb.Reserved12); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved13 = 0x{0:X8}", rdb.Reserved13); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved14 = 0x{0:X8}", rdb.Reserved14); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.RDBBlockLow = {0}", rdb.RdbBlockLow); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.RDBBlockHigh = {0}", rdb.RdbBlockHigh); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.LowCylinder = {0}", rdb.LowCylinder); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.HighCylinder = {0}", rdb.HighCylinder); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.CylBlocks = {0}", rdb.CylBlocks); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.AutoParkSeconds = {0}", rdb.AutoParkSeconds); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.HighCylinder = {0}", rdb.HighCylinder); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved15 = 0x{0:X8}", rdb.Reserved15); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskVendor = \"{0}\"", rdb.DiskVendor); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskProduct = \"{0}\"", rdb.DiskProduct); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.diskRevision = \"{0}\"", rdb.DiskRevision); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerVendor = \"{0}\"", rdb.ControllerVendor); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerProduct = \"{0}\"", rdb.ControllerProduct); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.controllerRevision = \"{0}\"", rdb.ControllerRevision); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved16 = 0x{0:X8}", rdb.Reserved16); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved17 = 0x{0:X8}", rdb.Reserved17); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved18 = 0x{0:X8}", rdb.Reserved18); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved19 = 0x{0:X8}", rdb.Reserved19); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved20 = 0x{0:X8}", rdb.Reserved20); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved21 = 0x{0:X8}", rdb.Reserved21); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved22 = 0x{0:X8}", rdb.Reserved22); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved23 = 0x{0:X8}", rdb.Reserved23); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved24 = 0x{0:X8}", rdb.Reserved24); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "RDB.reserved25 = 0x{0:X8}", rdb.Reserved25); // Reading BadBlock list List badBlockChain = new List(); ulong nextBlock = rdb.BadblockPtr; while(nextBlock != 0xFFFFFFFF) { - DicConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a BadBlock block", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a BadBlock block", nextBlock); sector = imagePlugin.ReadSector(nextBlock); @@ -457,7 +457,7 @@ namespace Aaru.Partitions if(magic != BAD_BLOCK_LIST_MAGIC) break; - DicConsole.DebugWriteLine("Amiga RDB plugin", "Found BadBlock block"); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Found BadBlock block"); BadBlockList chainEntry = new BadBlockList { @@ -471,13 +471,13 @@ namespace Aaru.Partitions ulong entries = (chainEntry.Size - 6) / 2; chainEntry.BlockPairs = new BadBlockEntry[entries]; - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.magic = 0x{0:X8}", chainEntry.Magic); - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.size = {0} longs, {1} bytes", chainEntry.Size, + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.magic = 0x{0:X8}", chainEntry.Magic); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.size = {0} longs, {1} bytes", chainEntry.Size, chainEntry.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.checksum = 0x{0:X8}", chainEntry.Checksum); - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.targetID = {0}", chainEntry.TargetId); - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.next_ptr = {0}", chainEntry.NextPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.reserved = 0x{0:X8}", chainEntry.Reserved); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.checksum = 0x{0:X8}", chainEntry.Checksum); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.targetID = {0}", chainEntry.TargetId); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.next_ptr = {0}", chainEntry.NextPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "chainEntry.reserved = 0x{0:X8}", chainEntry.Reserved); for(ulong i = 0; i < entries; i++) { @@ -485,7 +485,7 @@ namespace Aaru.Partitions chainEntry.BlockPairs[i].GoodBlock = BigEndianBitConverter.ToUInt32(sector, (int)(0x18 + i * 8 + 4)); - DicConsole.DebugWriteLine("Amiga RDB plugin", "Bad block at {0} replaced with good block at {1}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Bad block at {0} replaced with good block at {1}", chainEntry.BlockPairs[i].BadBlock, chainEntry.BlockPairs[i].GoodBlock); } @@ -498,7 +498,7 @@ namespace Aaru.Partitions nextBlock = rdb.PartitionPtr; while(nextBlock != 0xFFFFFFFF) { - DicConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a PartitionEntry block", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a PartitionEntry block", nextBlock + sectorOffset); sector = imagePlugin.ReadSector(nextBlock + sectorOffset); @@ -506,7 +506,7 @@ namespace Aaru.Partitions if(magic != PARTITION_BLOCK_MAGIC) break; - DicConsole.DebugWriteLine("Amiga RDB plugin", "Found PartitionEntry block"); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Found PartitionEntry block"); PartitionEntry partEntry = new PartitionEntry { @@ -564,72 +564,72 @@ namespace Aaru.Partitions Array.Copy(sector, 0x24, driveName, 0, 32); partEntry.DriveName = StringHandlers.PascalToString(driveName, Encoding.GetEncoding("iso-8859-1")); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.magic = 0x{0:X8}", partEntry.Magic); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.size = {0} longs, {1} bytes", partEntry.Size, + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.magic = 0x{0:X8}", partEntry.Magic); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.size = {0} longs, {1} bytes", partEntry.Size, partEntry.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.checksum = 0x{0:X8}", partEntry.Checksum); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.targetID = {0}", partEntry.TargetId); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.next_ptr = {0}", partEntry.NextPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.flags = 0x{0:X8}", partEntry.Flags); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved1 = 0x{0:X8}", partEntry.Reserved1); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved2 = 0x{0:X8}", partEntry.Reserved2); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.devFlags = 0x{0:X8}", partEntry.DevFlags); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.driveNameLen = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.checksum = 0x{0:X8}", partEntry.Checksum); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.targetID = {0}", partEntry.TargetId); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.next_ptr = {0}", partEntry.NextPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.flags = 0x{0:X8}", partEntry.Flags); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved1 = 0x{0:X8}", partEntry.Reserved1); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved2 = 0x{0:X8}", partEntry.Reserved2); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.devFlags = 0x{0:X8}", partEntry.DevFlags); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.driveNameLen = {0}", partEntry.DriveNameLen); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.driveName = \"{0}\"", partEntry.DriveName); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved3 = 0x{0:X8}", partEntry.Reserved3); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved4 = 0x{0:X8}", partEntry.Reserved4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved5 = 0x{0:X8}", partEntry.Reserved5); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved6 = 0x{0:X8}", partEntry.Reserved6); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved7 = 0x{0:X8}", partEntry.Reserved7); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved8 = 0x{0:X8}", partEntry.Reserved8); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved9 = 0x{0:X8}", partEntry.Reserved9); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved10 = 0x{0:X8}", partEntry.Reserved10); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved11 = 0x{0:X8}", partEntry.Reserved11); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved12 = 0x{0:X8}", partEntry.Reserved12); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved13 = 0x{0:X8}", partEntry.Reserved13); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved14 = 0x{0:X8}", partEntry.Reserved14); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved15 = 0x{0:X8}", partEntry.Reserved15); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved16 = 0x{0:X8}", partEntry.Reserved16); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved17 = 0x{0:X8}", partEntry.Reserved17); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.driveName = \"{0}\"", partEntry.DriveName); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved3 = 0x{0:X8}", partEntry.Reserved3); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved4 = 0x{0:X8}", partEntry.Reserved4); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved5 = 0x{0:X8}", partEntry.Reserved5); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved6 = 0x{0:X8}", partEntry.Reserved6); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved7 = 0x{0:X8}", partEntry.Reserved7); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved8 = 0x{0:X8}", partEntry.Reserved8); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved9 = 0x{0:X8}", partEntry.Reserved9); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved10 = 0x{0:X8}", partEntry.Reserved10); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved11 = 0x{0:X8}", partEntry.Reserved11); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved12 = 0x{0:X8}", partEntry.Reserved12); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved13 = 0x{0:X8}", partEntry.Reserved13); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved14 = 0x{0:X8}", partEntry.Reserved14); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved15 = 0x{0:X8}", partEntry.Reserved15); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved16 = 0x{0:X8}", partEntry.Reserved16); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.reserved17 = 0x{0:X8}", partEntry.Reserved17); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.size = {0} longs, {1} bytes", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.size = {0} longs, {1} bytes", partEntry.DosEnvVec.Size, partEntry.DosEnvVec.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.block_size = {0} longs, {1} bytes", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.block_size = {0} longs, {1} bytes", partEntry.DosEnvVec.BlockSize, partEntry.DosEnvVec.BlockSize * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.sec_org = 0x{0:X8}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.sec_org = 0x{0:X8}", partEntry.DosEnvVec.SecOrg); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.surfaces = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.surfaces = {0}", partEntry.DosEnvVec.Surfaces); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.spb = {0}", partEntry.DosEnvVec.Spb); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bpt = {0}", partEntry.DosEnvVec.Bpt); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.reservedblocks = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.spb = {0}", partEntry.DosEnvVec.Spb); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bpt = {0}", partEntry.DosEnvVec.Bpt); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.reservedblocks = {0}", partEntry.DosEnvVec.Reservedblocks); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.prealloc = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.prealloc = {0}", partEntry.DosEnvVec.Prealloc); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.interleave = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.interleave = {0}", partEntry.DosEnvVec.Interleave); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.lowCylinder = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.lowCylinder = {0}", partEntry.DosEnvVec.LowCylinder); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.highCylinder = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.highCylinder = {0}", partEntry.DosEnvVec.HighCylinder); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.numBuffer = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.numBuffer = {0}", partEntry.DosEnvVec.NumBuffer); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bufMemType = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bufMemType = {0}", partEntry.DosEnvVec.BufMemType); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.maxTransfer = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.maxTransfer = {0}", partEntry.DosEnvVec.MaxTransfer); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.Mask = 0x{0:X8}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.Mask = 0x{0:X8}", partEntry.DosEnvVec.Mask); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bootPriority = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bootPriority = {0}", partEntry.DosEnvVec.BootPriority); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.dosType = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.dosType = {0}", AmigaDosTypeToString(partEntry.DosEnvVec.DosType)); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.baud = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.baud = {0}", partEntry.DosEnvVec.Baud); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.control = 0x{0:X8}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.control = 0x{0:X8}", partEntry.DosEnvVec.Control); - DicConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bootBlocks = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "partEntry.dosEnvVec.bootBlocks = {0}", partEntry.DosEnvVec.BootBlocks); partitionEntries.Add(partEntry); @@ -642,7 +642,7 @@ namespace Aaru.Partitions nextBlock = rdb.FsheaderPtr; while(nextBlock != 0xFFFFFFFF) { - DicConsole.DebugWriteLine("Amiga RDB plugin", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a FileSystemHeader block", nextBlock); sector = imagePlugin.ReadSector(nextBlock); @@ -650,7 +650,7 @@ namespace Aaru.Partitions if(magic != FILESYSTEM_HEADER_MAGIC) break; - DicConsole.DebugWriteLine("Amiga RDB plugin", "Found FileSystemHeader block"); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Found FileSystemHeader block"); FileSystemHeader fshd = new FileSystemHeader { @@ -679,38 +679,38 @@ namespace Aaru.Partitions } }; - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.magic = 0x{0:X8}", fshd.Magic); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.size = {0} longs, {1} bytes", fshd.Size, + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.magic = 0x{0:X8}", fshd.Magic); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.size = {0} longs, {1} bytes", fshd.Size, fshd.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.checksum = 0x{0:X8}", fshd.Checksum); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.targetID = {0}", fshd.TargetId); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.next_ptr = {0}", fshd.NextPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.flags = 0x{0:X8}", fshd.Flags); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.reserved1 = 0x{0:X8}", fshd.Reserved1); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.reserved2 = 0x{0:X8}", fshd.Reserved2); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dosType = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.checksum = 0x{0:X8}", fshd.Checksum); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.targetID = {0}", fshd.TargetId); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.next_ptr = {0}", fshd.NextPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.flags = 0x{0:X8}", fshd.Flags); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.reserved1 = 0x{0:X8}", fshd.Reserved1); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.reserved2 = 0x{0:X8}", fshd.Reserved2); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dosType = {0}", AmigaDosTypeToString(fshd.DosType)); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.version = {0:D2}.{1:D2} (0x{2:X8})", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.version = {0:D2}.{1:D2} (0x{2:X8})", (fshd.Version & 0xFFFF0000) >> 16, fshd.Version & 0xFFFF, fshd.Version); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.patchFlags = 0x{0:X8}", fshd.PatchFlags); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.patchFlags = 0x{0:X8}", fshd.PatchFlags); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.type = {0}", fshd.Dnode.Type); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.task = {0}", fshd.Dnode.Task); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.locked = {0}", fshd.Dnode.Locked); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.handler = {0}", fshd.Dnode.Handler); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.stackSize = {0}", fshd.Dnode.StackSize); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.priority = {0}", fshd.Dnode.Priority); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.startup = {0}", fshd.Dnode.Startup); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.seglist_ptr = {0}", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.type = {0}", fshd.Dnode.Type); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.task = {0}", fshd.Dnode.Task); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.locked = {0}", fshd.Dnode.Locked); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.handler = {0}", fshd.Dnode.Handler); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.stackSize = {0}", fshd.Dnode.StackSize); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.priority = {0}", fshd.Dnode.Priority); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.startup = {0}", fshd.Dnode.Startup); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.seglist_ptr = {0}", fshd.Dnode.SeglistPtr); - DicConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.global_vec = 0x{0:X8}", fshd.Dnode.GlobalVec); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "FSHD.dnode.global_vec = 0x{0:X8}", fshd.Dnode.GlobalVec); nextBlock = fshd.Dnode.SeglistPtr; bool thereAreLoadSegments = false; Sha1Context sha1Ctx = new Sha1Context(); while(nextBlock != 0xFFFFFFFF) { - DicConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a LoadSegment block", + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Going to block {0} in search of a LoadSegment block", nextBlock); sector = imagePlugin.ReadSector(nextBlock); @@ -718,7 +718,7 @@ namespace Aaru.Partitions if(magicSeg != LOAD_SEG_MAGIC) break; - DicConsole.DebugWriteLine("Amiga RDB plugin", "Found LoadSegment block"); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "Found LoadSegment block"); thereAreLoadSegments = true; LoadSegment loadSeg = new LoadSegment @@ -732,12 +732,12 @@ namespace Aaru.Partitions loadSeg.LoadData = new byte[(loadSeg.Size - 5) * 4]; Array.Copy(sector, 0x14, loadSeg.LoadData, 0, (loadSeg.Size - 5) * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.magic = 0x{0:X8}", loadSeg.Magic); - DicConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.size = {0} longs, {1} bytes", loadSeg.Size, + AaruConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.magic = 0x{0:X8}", loadSeg.Magic); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.size = {0} longs, {1} bytes", loadSeg.Size, loadSeg.Size * 4); - DicConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.checksum = 0x{0:X8}", loadSeg.Checksum); - DicConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.targetID = {0}", loadSeg.TargetId); - DicConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.next_ptr = {0}", loadSeg.NextPtr); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.checksum = 0x{0:X8}", loadSeg.Checksum); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.targetID = {0}", loadSeg.TargetId); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "loadSeg.next_ptr = {0}", loadSeg.NextPtr); segmentEntries.Add(loadSeg); nextBlock = loadSeg.NextPtr; @@ -748,7 +748,7 @@ namespace Aaru.Partitions if(thereAreLoadSegments) { string loadSegSha1 = sha1Ctx.End(); - DicConsole.DebugWriteLine("Amiga RDB plugin", "LoadSegment data SHA1: {0}", loadSegSha1); + AaruConsole.DebugWriteLine("Amiga RDB plugin", "LoadSegment data SHA1: {0}", loadSegSha1); } fshdEntries.Add(fshd); diff --git a/Aaru.Partitions/SGI.cs b/Aaru.Partitions/SGI.cs index ffe30bb98..d3edf3dae 100644 --- a/Aaru.Partitions/SGI.cs +++ b/Aaru.Partitions/SGI.cs @@ -67,55 +67,55 @@ namespace Aaru.Partitions for(int i = 0; i < dvh.partitions.Length; i++) dvh.partitions[i] = (SGIPartition)Marshal.SwapStructureMembersEndian(dvh.partitions[i]); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.magic = 0x{0:X8} (should be 0x{1:X8})", dvh.magic, + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.magic = 0x{0:X8} (should be 0x{1:X8})", dvh.magic, SGI_MAGIC); if(dvh.magic != SGI_MAGIC) return false; - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.root_part_num = {0}", dvh.root_part_num); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.swap_part_num = {0}", dvh.swap_part_num); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.boot_file = \"{0}\"", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.root_part_num = {0}", dvh.root_part_num); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.swap_part_num = {0}", dvh.swap_part_num); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.boot_file = \"{0}\"", StringHandlers.CToString(dvh.boot_file)); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_skew = {0}", dvh.device_params.dp_skew); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_gap1 = {0}", dvh.device_params.dp_gap1); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_gap2 = {0}", dvh.device_params.dp_gap2); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_spares_cyl = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_skew = {0}", dvh.device_params.dp_skew); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_gap1 = {0}", dvh.device_params.dp_gap1); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_gap2 = {0}", dvh.device_params.dp_gap2); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_spares_cyl = {0}", dvh.device_params.dp_spares_cyl); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_cyls = {0}", dvh.device_params.dp_cyls); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_shd0 = {0}", dvh.device_params.dp_shd0); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_trks0 = {0}", dvh.device_params.dp_trks0); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_ctq_depth = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_cyls = {0}", dvh.device_params.dp_cyls); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_shd0 = {0}", dvh.device_params.dp_shd0); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_trks0 = {0}", dvh.device_params.dp_trks0); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_ctq_depth = {0}", dvh.device_params.dp_ctq_depth); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_cylshi = {0}", dvh.device_params.dp_cylshi); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_secs = {0}", dvh.device_params.dp_secs); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_secbytes = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_cylshi = {0}", dvh.device_params.dp_cylshi); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_secs = {0}", dvh.device_params.dp_secs); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_secbytes = {0}", dvh.device_params.dp_secbytes); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_interleave = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_interleave = {0}", dvh.device_params.dp_interleave); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_flags = {0}", dvh.device_params.dp_flags); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_datarate = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_flags = {0}", dvh.device_params.dp_flags); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_datarate = {0}", dvh.device_params.dp_datarate); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_nretries = {0}", + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_nretries = {0}", dvh.device_params.dp_nretries); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_mspw = {0}", dvh.device_params.dp_mspw); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xgap1 = {0}", dvh.device_params.dp_xgap1); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xsync = {0}", dvh.device_params.dp_xsync); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xrdly = {0}", dvh.device_params.dp_xrdly); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xgap2 = {0}", dvh.device_params.dp_xgap2); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xrgate = {0}", dvh.device_params.dp_xrgate); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xwcont = {0}", dvh.device_params.dp_xwcont); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_mspw = {0}", dvh.device_params.dp_mspw); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xgap1 = {0}", dvh.device_params.dp_xgap1); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xsync = {0}", dvh.device_params.dp_xsync); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xrdly = {0}", dvh.device_params.dp_xrdly); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xgap2 = {0}", dvh.device_params.dp_xgap2); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xrgate = {0}", dvh.device_params.dp_xrgate); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.device_params.dp_xwcont = {0}", dvh.device_params.dp_xwcont); ulong counter = 0; for(int i = 0; i < dvh.partitions.Length; i++) { - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].num_blocks = {1}", i, + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].num_blocks = {1}", i, dvh.partitions[i].num_blocks); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].first_block = {1}", i, + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].first_block = {1}", i, dvh.partitions[i].first_block); // TODO: Solve big endian marshal with enumerations dvh.partitions[i].type = (SGIType)Swapping.Swap((uint)dvh.partitions[i].type); - DicConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].type = {1}", i, dvh.partitions[i].type); + AaruConsole.DebugWriteLine("SGIVH plugin", "dvh.partitions[{0}].type = {1}", i, dvh.partitions[i].type); Partition part = new Partition { diff --git a/Aaru.Partitions/Sun.cs b/Aaru.Partitions/Sun.cs index eda8ae5e3..6571472ee 100644 --- a/Aaru.Partitions/Sun.cs +++ b/Aaru.Partitions/Sun.cs @@ -91,9 +91,9 @@ namespace Aaru.Partitions dk_label8 dkl8 = Marshal.ByteArrayToStructureLittleEndian(sunSector); dk_label16 dkl16 = Marshal.ByteArrayToStructureLittleEndian(sunSector); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_magic = 0x{0:X4}", dkl.dkl_magic); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_sanity = 0x{0:X8}", dkl8.dkl_vtoc.v_sanity); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sanity = 0x{0:X8}", dkl16.dkl_vtoc.v_sanity); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_magic = 0x{0:X4}", dkl.dkl_magic); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_sanity = 0x{0:X8}", dkl8.dkl_vtoc.v_sanity); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sanity = 0x{0:X8}", dkl16.dkl_vtoc.v_sanity); if(dkl.dkl_magic == DKL_MAGIC || dkl.dkl_magic == DKL_CIGAM) if(dkl16.dkl_vtoc.v_sanity == VTOC_SANE || dkl16.dkl_vtoc.v_sanity == VTOC_ENAS) @@ -126,31 +126,31 @@ namespace Aaru.Partitions { ulong sectorsPerCylinder = (ulong)(dkl.dkl_nsect * dkl.dkl_nhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_asciilabel = \"{0}\"", + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_asciilabel = \"{0}\"", StringHandlers.CToString(dkl.dkl_asciilabel)); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_rpm = {0}", dkl.dkl_rpm); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_pcyl = {0}", dkl.dkl_pcyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_apc = {0}", dkl.dkl_apc); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_gap1 = {0}", dkl.dkl_gap1); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_gap2 = {0}", dkl.dkl_gap2); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_intrlv = {0}", dkl.dkl_intrlv); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_ncyl = {0}", dkl.dkl_ncyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_acyl = {0}", dkl.dkl_acyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_nhead = {0}", dkl.dkl_nhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_nsect = {0}", dkl.dkl_nsect); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_bhead = {0}", dkl.dkl_bhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_ppart = {0}", dkl.dkl_ppart); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_rpm = {0}", dkl.dkl_rpm); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_pcyl = {0}", dkl.dkl_pcyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_apc = {0}", dkl.dkl_apc); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_gap1 = {0}", dkl.dkl_gap1); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_gap2 = {0}", dkl.dkl_gap2); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_intrlv = {0}", dkl.dkl_intrlv); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_ncyl = {0}", dkl.dkl_ncyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_acyl = {0}", dkl.dkl_acyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_nhead = {0}", dkl.dkl_nhead); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_nsect = {0}", dkl.dkl_nsect); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_bhead = {0}", dkl.dkl_bhead); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_ppart = {0}", dkl.dkl_ppart); for(int i = 0; i < NDKMAP; i++) { - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_map[{0}].dkl_cylno = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_map[{0}].dkl_cylno = {1}", i, dkl.dkl_map[i].dkl_cylno); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_map[{0}].dkl_nblk = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_map[{0}].dkl_nblk = {1}", i, dkl.dkl_map[i].dkl_nblk); } - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_magic = 0x{0:X4}", dkl.dkl_magic); - DicConsole.DebugWriteLine("Sun plugin", "dkl.dkl_cksum = 0x{0:X4}", dkl.dkl_cksum); - DicConsole.DebugWriteLine("Sun plugin", "sectorsPerCylinder = {0}", sectorsPerCylinder); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_magic = 0x{0:X4}", dkl.dkl_magic); + AaruConsole.DebugWriteLine("Sun plugin", "dkl.dkl_cksum = 0x{0:X4}", dkl.dkl_cksum); + AaruConsole.DebugWriteLine("Sun plugin", "sectorsPerCylinder = {0}", sectorsPerCylinder); for(int i = 0; i < NDKMAP; i++) if(dkl.dkl_map[i].dkl_cylno > 0 && dkl.dkl_map[i].dkl_nblk > 0) @@ -176,44 +176,44 @@ namespace Aaru.Partitions { ulong sectorsPerCylinder = (ulong)(dkl8.dkl_nsect * dkl8.dkl_nhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_asciilabel = \"{0}\"", + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_asciilabel = \"{0}\"", StringHandlers.CToString(dkl8.dkl_asciilabel)); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_version = {0}", dkl8.dkl_vtoc.v_version); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_volume = \"{0}\"", + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_version = {0}", dkl8.dkl_vtoc.v_version); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_volume = \"{0}\"", StringHandlers.CToString(dkl8.dkl_vtoc.v_volume)); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_nparts = {0}", dkl8.dkl_vtoc.v_nparts); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_sanity = 0x{0:X8}", dkl8.dkl_vtoc.v_sanity); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_write_reinstruct = {0}", dkl8.dkl_write_reinstruct); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_read_reinstruct = {0}", dkl8.dkl_read_reinstruct); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_rpm = {0}", dkl8.dkl_rpm); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_pcyl = {0}", dkl8.dkl_pcyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_apc = {0}", dkl8.dkl_apc); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs1 = {0}", dkl8.dkl_obs1); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs2 = {0}", dkl8.dkl_obs2); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_intrlv = {0}", dkl8.dkl_intrlv); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_ncyl = {0}", dkl8.dkl_ncyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_acyl = {0}", dkl8.dkl_acyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_nhead = {0}", dkl8.dkl_nhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_nsect = {0}", dkl8.dkl_nsect); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs3 = {0}", dkl8.dkl_obs3); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs4 = {0}", dkl8.dkl_obs4); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_nparts = {0}", dkl8.dkl_vtoc.v_nparts); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_sanity = 0x{0:X8}", dkl8.dkl_vtoc.v_sanity); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_write_reinstruct = {0}", dkl8.dkl_write_reinstruct); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_read_reinstruct = {0}", dkl8.dkl_read_reinstruct); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_rpm = {0}", dkl8.dkl_rpm); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_pcyl = {0}", dkl8.dkl_pcyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_apc = {0}", dkl8.dkl_apc); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs1 = {0}", dkl8.dkl_obs1); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs2 = {0}", dkl8.dkl_obs2); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_intrlv = {0}", dkl8.dkl_intrlv); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_ncyl = {0}", dkl8.dkl_ncyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_acyl = {0}", dkl8.dkl_acyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_nhead = {0}", dkl8.dkl_nhead); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_nsect = {0}", dkl8.dkl_nsect); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs3 = {0}", dkl8.dkl_obs3); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_obs4 = {0}", dkl8.dkl_obs4); for(int i = 0; i < NDKMAP; i++) { - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_map[{0}].dkl_cylno = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_map[{0}].dkl_cylno = {1}", i, dkl8.dkl_map[i].dkl_cylno); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_map[{0}].dkl_nblk = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_map[{0}].dkl_nblk = {1}", i, dkl8.dkl_map[i].dkl_nblk); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_part[{0}].p_tag = {1} ({2})", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_part[{0}].p_tag = {1} ({2})", i, dkl8.dkl_vtoc.v_part[i].p_tag, (ushort)dkl8.dkl_vtoc.v_part[i].p_tag); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_part[{0}].p_flag = {1} ({2})", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_part[{0}].p_flag = {1} ({2})", i, dkl8.dkl_vtoc.v_part[i].p_flag, (ushort)dkl8.dkl_vtoc.v_part[i].p_flag); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_timestamp[{0}] = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_vtoc.v_timestamp[{0}] = {1}", i, DateHandlers.UnixToDateTime(dkl8.dkl_vtoc.v_timestamp[i])); } - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_magic = 0x{0:X4}", dkl8.dkl_magic); - DicConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_cksum = 0x{0:X4}", dkl8.dkl_cksum); - DicConsole.DebugWriteLine("Sun plugin", "sectorsPerCylinder = {0}", sectorsPerCylinder); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_magic = 0x{0:X4}", dkl8.dkl_magic); + AaruConsole.DebugWriteLine("Sun plugin", "dkl8.dkl_cksum = 0x{0:X4}", dkl8.dkl_cksum); + AaruConsole.DebugWriteLine("Sun plugin", "sectorsPerCylinder = {0}", sectorsPerCylinder); if(dkl8.dkl_vtoc.v_nparts > NDKMAP) return false; @@ -246,42 +246,42 @@ namespace Aaru.Partitions } else { - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sanity = 0x{0:X8}", dkl16.dkl_vtoc.v_sanity); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_version = {0}", dkl16.dkl_vtoc.v_version); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_volume = \"{0}\"", + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sanity = 0x{0:X8}", dkl16.dkl_vtoc.v_sanity); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_version = {0}", dkl16.dkl_vtoc.v_version); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_volume = \"{0}\"", StringHandlers.CToString(dkl16.dkl_vtoc.v_volume)); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sectorsz = {0}", dkl16.dkl_vtoc.v_sectorsz); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_nparts = {0}", dkl16.dkl_vtoc.v_nparts); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_asciilabel = \"{0}\"", + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_sectorsz = {0}", dkl16.dkl_vtoc.v_sectorsz); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_nparts = {0}", dkl16.dkl_vtoc.v_nparts); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_asciilabel = \"{0}\"", StringHandlers.CToString(dkl16.dkl_vtoc.v_asciilabel)); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_pcyl = {0}", dkl16.dkl_pcyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_ncyl = {0}", dkl16.dkl_ncyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_acyl = {0}", dkl16.dkl_acyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_bcyl = {0}", dkl16.dkl_bcyl); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_nhead = {0}", dkl16.dkl_nhead); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_nsect = {0}", dkl16.dkl_nsect); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_intrlv = {0}", dkl16.dkl_intrlv); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_skew = {0}", dkl16.dkl_skew); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_apc = {0}", dkl16.dkl_apc); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_rpm = {0}", dkl16.dkl_rpm); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_write_reinstruct = {0}", dkl16.dkl_write_reinstruct); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_read_reinstruct = {0}", dkl16.dkl_read_reinstruct); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_pcyl = {0}", dkl16.dkl_pcyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_ncyl = {0}", dkl16.dkl_ncyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_acyl = {0}", dkl16.dkl_acyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_bcyl = {0}", dkl16.dkl_bcyl); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_nhead = {0}", dkl16.dkl_nhead); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_nsect = {0}", dkl16.dkl_nsect); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_intrlv = {0}", dkl16.dkl_intrlv); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_skew = {0}", dkl16.dkl_skew); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_apc = {0}", dkl16.dkl_apc); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_rpm = {0}", dkl16.dkl_rpm); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_write_reinstruct = {0}", dkl16.dkl_write_reinstruct); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_read_reinstruct = {0}", dkl16.dkl_read_reinstruct); for(int i = 0; i < NDKMAP16; i++) { - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_start = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_start = {1}", i, dkl16.dkl_vtoc.v_part[i].p_start); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_size = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_size = {1}", i, dkl16.dkl_vtoc.v_part[i].p_size); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_tag = {1} ({2})", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_tag = {1} ({2})", i, dkl16.dkl_vtoc.v_part[i].p_tag, (ushort)dkl16.dkl_vtoc.v_part[i].p_tag); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_flag = {1} ({2})", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_part[{0}].p_flag = {1} ({2})", i, dkl16.dkl_vtoc.v_part[i].p_flag, (ushort)dkl16.dkl_vtoc.v_part[i].p_flag); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_timestamp[{0}] = {1}", i, + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_vtoc.v_timestamp[{0}] = {1}", i, DateHandlers.UnixToDateTime(dkl16.dkl_vtoc.v_timestamp[i])); } - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_magic = 0x{0:X4}", dkl16.dkl_magic); - DicConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_cksum = 0x{0:X4}", dkl16.dkl_cksum); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_magic = 0x{0:X4}", dkl16.dkl_magic); + AaruConsole.DebugWriteLine("Sun plugin", "dkl16.dkl_cksum = 0x{0:X4}", dkl16.dkl_cksum); if(dkl16.dkl_vtoc.v_nparts > NDKMAP16) return false; @@ -318,7 +318,7 @@ namespace Aaru.Partitions static dk_label SwapDiskLabel(dk_label label) { - DicConsole.DebugWriteLine("Sun plugin", "Swapping dk_label"); + AaruConsole.DebugWriteLine("Sun plugin", "Swapping dk_label"); label = (dk_label)Marshal.SwapStructureMembersEndian(label); for(int i = 0; i < label.dkl_map.Length; i++) label.dkl_map[i] = (dk_map)Marshal.SwapStructureMembersEndian(label.dkl_map[i]); @@ -328,7 +328,7 @@ namespace Aaru.Partitions static dk_label8 SwapDiskLabel(dk_label8 label) { - DicConsole.DebugWriteLine("Sun plugin", "Swapping dk_label8"); + AaruConsole.DebugWriteLine("Sun plugin", "Swapping dk_label8"); label = (dk_label8)Marshal.SwapStructureMembersEndian(label); for(int i = 0; i < label.dkl_map.Length; i++) label.dkl_map[i] = (dk_map)Marshal.SwapStructureMembersEndian(label.dkl_map[i]); @@ -351,7 +351,7 @@ namespace Aaru.Partitions static dk_label16 SwapDiskLabel(dk_label16 label) { - DicConsole.DebugWriteLine("Sun plugin", "Swapping dk_label16"); + AaruConsole.DebugWriteLine("Sun plugin", "Swapping dk_label16"); label = (dk_label16)Marshal.SwapStructureMembersEndian(label); for(int i = 0; i < label.dkl_vtoc.v_bootinfo.Length; i++) label.dkl_vtoc.v_bootinfo[i] = Swapping.Swap(label.dkl_vtoc.v_bootinfo[i]); diff --git a/Aaru.Partitions/VTOC.cs b/Aaru.Partitions/VTOC.cs index ded3a3f73..13b6bbdea 100644 --- a/Aaru.Partitions/VTOC.cs +++ b/Aaru.Partitions/VTOC.cs @@ -68,7 +68,7 @@ namespace Aaru.Partitions { pdsector = imagePlugin.ReadSector(i + sectorOffset); magic = BitConverter.ToUInt32(pdsector, 4); - DicConsole.DebugWriteLine("VTOC plugin", "sanity at {0} is 0x{1:X8} (should be 0x{2:X8} or 0x{3:X8})", + AaruConsole.DebugWriteLine("VTOC plugin", "sanity at {0} is 0x{1:X8} (should be 0x{2:X8} or 0x{3:X8})", i + sectorOffset, magic, PD_MAGIC, PD_CIGAM); if(magic != PD_MAGIC && magic != PD_CIGAM) continue; @@ -93,48 +93,48 @@ namespace Aaru.Partitions pdold = Marshal.ByteArrayToStructureBigEndian(pdsector); } - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.driveid = {0}", pd.driveid); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.sanity = 0x{0:X8} (should be 0x{1:X8})", pd.sanity, + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.driveid = {0}", pd.driveid); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.sanity = 0x{0:X8} (should be 0x{1:X8})", pd.sanity, PD_MAGIC); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.version = {0}", pd.version); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.serial = \"{0}\"", StringHandlers.CToString(pd.serial)); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.cyls = {0}", pd.cyls); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.tracks = {0}", pd.tracks); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.sectors = {0}", pd.sectors); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.bytes = {0}", pd.bytes); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.logicalst = {0}", pd.logicalst); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.errlogst = {0}", pd.errlogst); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.errlogsz = {0}", pd.errlogsz); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.mfgst = {0}", pd.mfgst); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.mfgsz = {0}", pd.mfgsz); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.defectst = {0}", pd.defectst); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.defectsz = {0}", pd.defectsz); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.relno = {0}", pd.relno); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.relst = {0}", pd.relst); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.relsz = {0}", pd.relsz); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.relnext = {0}", pd.relnext); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.allcstrt = {0}", pdold.allcstrt); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.allcend = {0}", pdold.allcend); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_ptr = {0}", pd.vtoc_ptr); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_len = {0}", pd.vtoc_len); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_pad = {0}", pd.vtoc_pad); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.alt_ptr = {0}", pd.alt_ptr); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.alt_len = {0}", pd.alt_len); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pcyls = {0}", pd.pcyls); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.ptracks = {0}", pd.ptracks); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.psectors = {0}", pd.psectors); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pbytes = {0}", pd.pbytes); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.secovhd = {0}", pd.secovhd); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.interleave = {0}", pd.interleave); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.skew = {0}", pd.skew); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[0] = {0}", pd.pad[0]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[1] = {0}", pd.pad[1]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[2] = {0}", pd.pad[2]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[3] = {0}", pd.pad[3]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[4] = {0}", pd.pad[4]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[5] = {0}", pd.pad[5]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[6] = {0}", pd.pad[6]); - DicConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[7] = {0}", pd.pad[7]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.version = {0}", pd.version); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.serial = \"{0}\"", StringHandlers.CToString(pd.serial)); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.cyls = {0}", pd.cyls); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.tracks = {0}", pd.tracks); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.sectors = {0}", pd.sectors); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.bytes = {0}", pd.bytes); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.logicalst = {0}", pd.logicalst); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.errlogst = {0}", pd.errlogst); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.errlogsz = {0}", pd.errlogsz); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.mfgst = {0}", pd.mfgst); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.mfgsz = {0}", pd.mfgsz); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.defectst = {0}", pd.defectst); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.defectsz = {0}", pd.defectsz); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.relno = {0}", pd.relno); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.relst = {0}", pd.relst); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.relsz = {0}", pd.relsz); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.relnext = {0}", pd.relnext); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.allcstrt = {0}", pdold.allcstrt); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.allcend = {0}", pdold.allcend); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_ptr = {0}", pd.vtoc_ptr); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_len = {0}", pd.vtoc_len); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.vtoc_pad = {0}", pd.vtoc_pad); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.alt_ptr = {0}", pd.alt_ptr); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.alt_len = {0}", pd.alt_len); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pcyls = {0}", pd.pcyls); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.ptracks = {0}", pd.ptracks); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.psectors = {0}", pd.psectors); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pbytes = {0}", pd.pbytes); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.secovhd = {0}", pd.secovhd); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.interleave = {0}", pd.interleave); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.skew = {0}", pd.skew); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[0] = {0}", pd.pad[0]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[1] = {0}", pd.pad[1]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[2] = {0}", pd.pad[2]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[3] = {0}", pd.pad[3]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[4] = {0}", pd.pad[4]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[5] = {0}", pd.pad[5]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[6] = {0}", pd.pad[6]); + AaruConsole.DebugWriteLine("VTOC plugin", "pdinfo.pad[7] = {0}", pd.pad[7]); magicFound = false; bool useOld = false; @@ -146,7 +146,7 @@ namespace Aaru.Partitions if(magic == VTOC_SANE || magic == VTOC_ENAS) { magicFound = true; - DicConsole.DebugWriteLine("VTOC plugin", "New VTOC found at {0}", pdloc + sectorOffset + 1); + AaruConsole.DebugWriteLine("VTOC plugin", "New VTOC found at {0}", pdloc + sectorOffset + 1); if(magic == VTOC_SANE) vtoc = Marshal.ByteArrayToStructureLittleEndian(vtocsector); else { @@ -170,7 +170,7 @@ namespace Aaru.Partitions { magicFound = true; useOld = true; - DicConsole.DebugWriteLine("VTOC plugin", "Old VTOC found at {0}", pdloc + sectorOffset + 1); + AaruConsole.DebugWriteLine("VTOC plugin", "Old VTOC found at {0}", pdloc + sectorOffset + 1); if(magic == VTOC_SANE) vtocOld = Marshal.ByteArrayToStructureLittleEndian(vtocsector); else { @@ -189,17 +189,17 @@ namespace Aaru.Partitions if(!magicFound) { - DicConsole.DebugWriteLine("VTOC plugin", "Searching for VTOC on relative byte {0}", pd.vtoc_ptr); + AaruConsole.DebugWriteLine("VTOC plugin", "Searching for VTOC on relative byte {0}", pd.vtoc_ptr); ulong relSecPtr = pd.vtoc_ptr / imagePlugin.Info.SectorSize; uint relSecOff = pd.vtoc_ptr % imagePlugin.Info.SectorSize; uint secCount = (relSecOff + pd.vtoc_len) / imagePlugin.Info.SectorSize; if((relSecOff + pd.vtoc_len) % imagePlugin.Info.SectorSize > 0) secCount++; - DicConsole.DebugWriteLine("VTOC plugin", + AaruConsole.DebugWriteLine("VTOC plugin", "Going to read {0} sectors from sector {1}, getting VTOC from byte {2}", secCount, relSecPtr + sectorOffset, relSecOff); if(relSecPtr + sectorOffset + secCount >= imagePlugin.Info.Sectors) { - DicConsole.DebugWriteLine("VTOC plugin", "Going to read past device size, aborting..."); + AaruConsole.DebugWriteLine("VTOC plugin", "Going to read past device size, aborting..."); return false; } @@ -211,7 +211,7 @@ namespace Aaru.Partitions if(magic == VTOC_SANE || magic == VTOC_ENAS) { magicFound = true; - DicConsole.DebugWriteLine("VTOC plugin", "New VTOC found."); + AaruConsole.DebugWriteLine("VTOC plugin", "New VTOC found."); if(magic == VTOC_SANE) vtoc = Marshal.ByteArrayToStructureLittleEndian(vtocsector); else { @@ -230,52 +230,52 @@ namespace Aaru.Partitions if(!magicFound) { - DicConsole.DebugWriteLine("VTOC plugin", "Cannot find VTOC."); + AaruConsole.DebugWriteLine("VTOC plugin", "Cannot find VTOC."); return false; } if(useOld) { - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_sanity = 0x{0:X8} (should be 0x{1:X8})", + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_sanity = 0x{0:X8} (should be 0x{1:X8})", vtocOld.v_sanity, VTOC_SANE); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_version = {0}", vtocOld.v_version); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_volume = \"{0}\"", + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_version = {0}", vtocOld.v_version); + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_volume = \"{0}\"", StringHandlers.CToString(vtocOld.v_volume)); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_sectorsz = {0}", vtocOld.v_sectorsz); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_nparts = {0}", vtocOld.v_nparts); + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_sectorsz = {0}", vtocOld.v_sectorsz); + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_nparts = {0}", vtocOld.v_nparts); for(int i = 0; i < V_NUMPAR; i++) { - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_tag = {1} ({2})", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_tag = {1} ({2})", i, vtocOld.v_part[i].p_tag, (ushort)vtocOld.v_part[i].p_tag); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_flag = {1} ({2})", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_flag = {1} ({2})", i, vtocOld.v_part[i].p_flag, (ushort)vtocOld.v_part[i].p_flag); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_start = {1}", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_start = {1}", i, vtocOld.v_part[i].p_start); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_size = {1}", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.v_part[{0}].p_size = {1}", i, vtocOld.v_part[i].p_size); - DicConsole.DebugWriteLine("VTOC plugin", "vtocOld.timestamp[{0}] = {1}", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtocOld.timestamp[{0}] = {1}", i, DateHandlers.UnixToDateTime(vtocOld.timestamp[i])); } } else { - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_sanity = 0x{0:X8} (should be 0x{1:X8})", vtoc.v_sanity, + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_sanity = 0x{0:X8} (should be 0x{1:X8})", vtoc.v_sanity, VTOC_SANE); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_version = {0}", vtoc.v_version); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_volume = \"{0}\"", + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_version = {0}", vtoc.v_version); + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_volume = \"{0}\"", StringHandlers.CToString(vtoc.v_volume)); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_pad = {0}", vtoc.v_pad); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_nparts = {0}", vtoc.v_nparts); + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_pad = {0}", vtoc.v_pad); + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_nparts = {0}", vtoc.v_nparts); for(int i = 0; i < V_NUMPAR; i++) { - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_tag = {1} ({2})", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_tag = {1} ({2})", i, vtoc.v_part[i].p_tag, (ushort)vtoc.v_part[i].p_tag); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_flag = {1} ({2})", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_flag = {1} ({2})", i, vtoc.v_part[i].p_flag, (ushort)vtoc.v_part[i].p_flag); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_start = {1}", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_start = {1}", i, vtoc.v_part[i].p_start); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_size = {1}", i, vtoc.v_part[i].p_size); - DicConsole.DebugWriteLine("VTOC plugin", "vtoc.timestamp[{0}] = {1}", i, + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.v_part[{0}].p_size = {1}", i, vtoc.v_part[i].p_size); + AaruConsole.DebugWriteLine("VTOC plugin", "vtoc.timestamp[{0}] = {1}", i, DateHandlers.UnixToDateTime(vtoc.timestamp[i])); } } diff --git a/Aaru.Partitions/XENIX.cs b/Aaru.Partitions/XENIX.cs index 596928d0e..39d5c38b8 100644 --- a/Aaru.Partitions/XENIX.cs +++ b/Aaru.Partitions/XENIX.cs @@ -63,15 +63,15 @@ namespace Aaru.Partitions Partable xnxtbl = Marshal.ByteArrayToStructureLittleEndian(tblsector); - DicConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p_magic = 0x{0:X4} (should be 0x{1:X4})", xnxtbl.p_magic, + AaruConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p_magic = 0x{0:X4} (should be 0x{1:X4})", xnxtbl.p_magic, PAMAGIC); if(xnxtbl.p_magic != PAMAGIC) return false; for(int i = 0; i < MAXPARTS; i++) { - DicConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p[{0}].p_off = {1}", i, xnxtbl.p[i].p_off); - DicConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p[{0}].p_size = {1}", i, xnxtbl.p[i].p_size); + AaruConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p[{0}].p_off = {1}", i, xnxtbl.p[i].p_off); + AaruConsole.DebugWriteLine("XENIX plugin", "xnxtbl.p[{0}].p_size = {1}", i, xnxtbl.p[i].p_size); if(xnxtbl.p[i].p_size <= 0) continue; CommonTypes.Partition part = new CommonTypes.Partition diff --git a/Aaru/Commands/Configure.cs b/Aaru/Commands/Configure.cs index cfda18ba8..a78db2ffb 100644 --- a/Aaru/Commands/Configure.cs +++ b/Aaru/Commands/Configure.cs @@ -60,27 +60,27 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; } if(_gdprChange) { - DicConsole.WriteLine("In compliance with the European Union General Data Protection Regulation 2016/679 (GDPR),\n" + + 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" + "in some information sharing."); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Disclaimer: Because Aaru is an open source software this information, and therefore,\n" + + AaruConsole.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."); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("For any information sharing your IP address may be stored in our server, in a way that is not\n" + + 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" + "specified otherwise."); } @@ -88,9 +88,9 @@ namespace Aaru.Commands var pressedKey = new ConsoleKeyInfo(); #region Device reports - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.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" + @@ -102,17 +102,17 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to save device reports in shared folder of your computer? (Y/N): "); + AaruConsole.Write("Do you want to save device reports in shared folder of your computer? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.SaveReportsGlobally = pressedKey.Key == ConsoleKey.Y; pressedKey = new ConsoleKeyInfo(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Sharing a report with us will send it to our server, that's in the european union territory, where it\n" + + 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.discimagechef.app\n" + "These report will be used to improve Aaru support, and in some cases, to provide emulation of the\n" + @@ -121,18 +121,18 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to share your device reports with us? (Y/N): "); + AaruConsole.Write("Do you want to share your device reports with us? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.ShareReports = pressedKey.Key == ConsoleKey.Y; #endregion Device reports #region Statistics - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Aaru can store some usage statistics. These statistics are limited to the number of times a\n" + + 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" + "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."); @@ -142,9 +142,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to save stats about your Aaru usage? (Y/N): "); + AaruConsole.Write("Do you want to save stats about your Aaru usage? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key == ConsoleKey.Y) @@ -156,9 +156,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to share your stats anonymously? (Y/N): "); + AaruConsole.Write("Do you want to share your stats anonymously? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.ShareStats = pressedKey.Key == ConsoleKey.Y; @@ -168,9 +168,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about command usage? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about command usage? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.CommandStats = pressedKey.Key == ConsoleKey.Y; @@ -180,9 +180,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about found devices? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about found devices? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.DeviceStats = pressedKey.Key == ConsoleKey.Y; @@ -192,9 +192,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about found filesystems? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about found filesystems? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.FilesystemStats = pressedKey.Key == ConsoleKey.Y; @@ -204,9 +204,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about found file filters? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about found file filters? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.FilterStats = pressedKey.Key == ConsoleKey.Y; @@ -216,9 +216,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about found media image formats? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about found media image formats? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.MediaImageStats = pressedKey.Key == ConsoleKey.Y; @@ -228,9 +228,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about scanned media? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about scanned media? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.MediaScanStats = pressedKey.Key == ConsoleKey.Y; @@ -240,9 +240,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about found partitioning schemes? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about found partitioning schemes? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.PartitionStats = pressedKey.Key == ConsoleKey.Y; @@ -252,9 +252,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about media types? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about media types? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.MediaStats = pressedKey.Key == ConsoleKey.Y; @@ -264,9 +264,9 @@ namespace Aaru.Commands while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you want to gather statistics about media image verifications? (Y/N): "); + AaruConsole.Write("Do you want to gather statistics about media image verifications? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Aaru.Settings.Settings.Current.Stats.VerifyStats = pressedKey.Key == ConsoleKey.Y; diff --git a/Aaru/Commands/Database/Statistics.cs b/Aaru/Commands/Database/Statistics.cs index 1cf1bc3db..f2a568f02 100644 --- a/Aaru/Commands/Database/Statistics.cs +++ b/Aaru/Commands/Database/Statistics.cs @@ -50,10 +50,10 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; var ctx = DicContext.Create(Aaru.Settings.Settings.LocalDbPath); @@ -65,7 +65,7 @@ namespace Aaru.Commands !ctx.Partitions.Any() && !ctx.SeenDevices.Any()) { - DicConsole.WriteLine("There are no statistics."); + AaruConsole.WriteLine("There are no statistics."); return(int)ErrorNumber.NothingFound; } @@ -74,8 +74,8 @@ namespace Aaru.Commands if(ctx.Commands.Any()) { - DicConsole.WriteLine("Commands statistics"); - DicConsole.WriteLine("==================="); + AaruConsole.WriteLine("Commands statistics"); + AaruConsole.WriteLine("==================="); foreach(string command in ctx.Commands.OrderBy(c => c.Name).Select(c => c.Name).Distinct()) { @@ -87,17 +87,17 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("You have called the {0} command {1} times.", command, count); + AaruConsole.WriteLine("You have called the {0} command {1} times.", command, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(ctx.Filters.Any()) { - DicConsole.WriteLine("Filters statistics"); - DicConsole.WriteLine("=================="); + AaruConsole.WriteLine("Filters statistics"); + AaruConsole.WriteLine("=================="); foreach(string filter in ctx.Filters.OrderBy(c => c.Name).Select(c => c.Name).Distinct()) { @@ -109,17 +109,17 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("Filter {0} has been found {1} times.", filter, count); + AaruConsole.WriteLine("Filter {0} has been found {1} times.", filter, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(ctx.MediaFormats.Any()) { - DicConsole.WriteLine("Media image statistics"); - DicConsole.WriteLine("======================"); + AaruConsole.WriteLine("Media image statistics"); + AaruConsole.WriteLine("======================"); foreach(string format in ctx.MediaFormats.OrderBy(c => c.Name).Select(c => c.Name).Distinct()) { @@ -131,17 +131,17 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("Format {0} has been found {1} times.", format, count); + AaruConsole.WriteLine("Format {0} has been found {1} times.", format, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(ctx.Partitions.Any()) { - DicConsole.WriteLine("Partition statistics"); - DicConsole.WriteLine("===================="); + AaruConsole.WriteLine("Partition statistics"); + AaruConsole.WriteLine("===================="); foreach(string partition in ctx.Partitions.OrderBy(c => c.Name).Select(c => c.Name).Distinct()) { @@ -153,17 +153,17 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("Partitioning scheme {0} has been found {1} times.", partition, count); + AaruConsole.WriteLine("Partitioning scheme {0} has been found {1} times.", partition, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(ctx.Filesystems.Any()) { - DicConsole.WriteLine("Filesystem statistics"); - DicConsole.WriteLine("====================="); + AaruConsole.WriteLine("Filesystem statistics"); + AaruConsole.WriteLine("====================="); foreach(string filesystem in ctx.Filesystems.OrderBy(c => c.Name).Select(c => c.Name).Distinct()) { @@ -175,32 +175,32 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("Filesystem {0} has been found {1} times.", filesystem, count); + AaruConsole.WriteLine("Filesystem {0} has been found {1} times.", filesystem, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(ctx.SeenDevices.Any()) { - DicConsole.WriteLine("Device statistics"); - DicConsole.WriteLine("================="); + AaruConsole.WriteLine("Device statistics"); + AaruConsole.WriteLine("================="); foreach(DeviceStat ds in ctx.SeenDevices.OrderBy(ds => ds.Manufacturer).ThenBy(ds => ds.Model). ThenBy(ds => ds.Revision).ThenBy(ds => ds.Bus)) - DicConsole. + AaruConsole. WriteLine("Device model {0}, manufactured by {1}, with revision {2} and attached via {3}.", ds.Model, ds.Manufacturer, ds.Revision, ds.Bus); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); thereAreStats = true; } if(ctx.Medias.Any()) { - DicConsole.WriteLine("Media statistics"); - DicConsole.WriteLine("================"); + AaruConsole.WriteLine("Media statistics"); + AaruConsole.WriteLine("================"); foreach(string media in ctx.Medias.OrderBy(ms => ms.Type).Select(ms => ms.Type).Distinct()) { @@ -211,7 +211,7 @@ namespace Aaru.Commands if(count > 0) { - DicConsole.WriteLine("Media type {0} has been found {1} times in a real device.", media, count); + AaruConsole.WriteLine("Media type {0} has been found {1} times in a real device.", media, count); thereAreStats = true; } @@ -223,15 +223,15 @@ namespace Aaru.Commands if(count == 0) continue; - DicConsole.WriteLine("Media type {0} has been found {1} times in a media image.", media, count); + AaruConsole.WriteLine("Media type {0} has been found {1} times in a media image.", media, count); thereAreStats = true; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(!thereAreStats) - DicConsole.WriteLine("There are no statistics."); + AaruConsole.WriteLine("There are no statistics."); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Database/Update.cs b/Aaru/Commands/Database/Update.cs index 40c22f02b..114d147c3 100644 --- a/Aaru/Commands/Database/Update.cs +++ b/Aaru/Commands/Database/Update.cs @@ -72,13 +72,13 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; - DicConsole.DebugWriteLine("Update command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Update command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Update command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Update command", "--verbose={0}", verbose); if(clearAll) { @@ -95,7 +95,7 @@ namespace Aaru.Commands if(Debugger.IsAttached) throw; - DicConsole.ErrorWriteLine("Could not remove local database."); + AaruConsole.ErrorWriteLine("Could not remove local database."); return(int)ErrorNumber.CannotRemoveDatabase; } @@ -112,7 +112,7 @@ namespace Aaru.Commands if(Debugger.IsAttached) throw; - DicConsole.ErrorWriteLine("Could not remove master database."); + AaruConsole.ErrorWriteLine("Could not remove master database."); return(int)ErrorNumber.CannotRemoveDatabase; } diff --git a/Aaru/Commands/Device/DeviceReport.cs b/Aaru/Commands/Device/DeviceReport.cs index f9ceed91c..424b51223 100644 --- a/Aaru/Commands/Device/DeviceReport.cs +++ b/Aaru/Commands/Device/DeviceReport.cs @@ -71,16 +71,16 @@ namespace Aaru.Commands.Device MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("device-report"); - DicConsole.DebugWriteLine("Device-Report command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Device-Report command", "--device={0}", devicePath); - DicConsole.DebugWriteLine("Device-Report command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Device-Report command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Device-Report command", "--device={0}", devicePath); + AaruConsole.DebugWriteLine("Device-Report command", "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && @@ -100,14 +100,14 @@ namespace Aaru.Commands.Device if(dev.Error) { - DicConsole.ErrorWriteLine(Error.Print(dev.LastError)); + AaruConsole.ErrorWriteLine(Error.Print(dev.LastError)); return(int)ErrorNumber.CannotOpenDevice; } } catch(DeviceException e) { - DicConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); return(int)ErrorNumber.CannotOpenDevice; } @@ -120,10 +120,10 @@ namespace Aaru.Commands.Device if(!isAdmin) { - DicConsole. + AaruConsole. ErrorWriteLine("Because of the commands sent to a device, device report must be run with administrative privileges."); - DicConsole.ErrorWriteLine("Not continuing."); + AaruConsole.ErrorWriteLine("Not continuing."); return(int)ErrorNumber.NotEnoughPermissions; } @@ -159,9 +159,9 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Is the device natively USB (in case of doubt, press Y)? (Y/N): "); + AaruConsole.Write("Is the device natively USB (in case of doubt, press Y)? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key == ConsoleKey.Y) @@ -173,9 +173,9 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); + AaruConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } report.USB.RemovableMedia = pressedKey.Key == ConsoleKey.Y; @@ -190,9 +190,9 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Is the device natively FireWire (in case of doubt, press Y)? (Y/N): "); + AaruConsole.Write("Is the device natively FireWire (in case of doubt, press Y)? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key != ConsoleKey.Y) @@ -204,9 +204,9 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); + AaruConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } report.FireWire.RemovableMedia = pressedKey.Key == ConsoleKey.Y; @@ -225,7 +225,7 @@ namespace Aaru.Commands.Device { case DeviceType.ATA: { - DicConsole.WriteLine("Querying ATA IDENTIFY..."); + AaruConsole.WriteLine("Querying ATA IDENTIFY..."); dev.AtaIdentify(out buffer, out _, dev.Timeout, out _); @@ -254,9 +254,9 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); + AaruConsole.Write("Is the media removable from the reading/writing elements? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } removable = pressedKey.Key == ConsoleKey.Y; @@ -264,11 +264,11 @@ namespace Aaru.Commands.Device if(removable) { - DicConsole. + AaruConsole. WriteLine("Please remove any media from the device and press any key when it is out."); System.Console.ReadKey(true); - DicConsole.WriteLine("Querying ATA IDENTIFY..."); + AaruConsole.WriteLine("Querying ATA IDENTIFY..."); dev.AtaIdentify(out buffer, out _, dev.Timeout, out _); report.ATA.Identify = DeviceReport.ClearIdentify(buffer); List mediaTests = new List(); @@ -282,20 +282,20 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); + AaruConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key != ConsoleKey.Y) continue; - DicConsole.WriteLine("Please insert it in the drive and press any key when it is ready."); + AaruConsole.WriteLine("Please insert it in the drive and press any key when it is ready."); System.Console.ReadKey(true); - DicConsole.Write("Please write a description of the media type and press enter: "); + AaruConsole.Write("Please write a description of the media type and press enter: "); mediumTypeName = System.Console.ReadLine(); - DicConsole.Write("Please write the media model and press enter: "); + AaruConsole.Write("Please write the media model and press enter: "); mediumModel = System.Console.ReadLine(); TestedMedia mediaTest = reporter.ReportAtaMedia(); @@ -325,7 +325,7 @@ namespace Aaru.Commands.Device break; case DeviceType.NVMe: throw new NotImplementedException("NVMe devices not yet supported."); case DeviceType.ATAPI: - DicConsole.WriteLine("Querying ATAPI IDENTIFY..."); + AaruConsole.WriteLine("Querying ATAPI IDENTIFY..."); dev.AtapiIdentify(out buffer, out _, dev.Timeout, out _); @@ -346,11 +346,11 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Is the media removable from the reading/writing elements (flash memories ARE NOT removable)? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } removable = pressedKey.Key == ConsoleKey.Y; @@ -367,13 +367,13 @@ namespace Aaru.Commands.Device break; case PeripheralDeviceTypes.SequentialAccess: dev.SpcAllowMediumRemoval(out buffer, dev.Timeout, out _); - DicConsole.WriteLine("Asking drive to unload tape (can take a few minutes)..."); + AaruConsole.WriteLine("Asking drive to unload tape (can take a few minutes)..."); dev.Unload(out buffer, dev.Timeout, out _); break; } - DicConsole. + AaruConsole. WriteLine("Please remove any media from the device and press any key when it is out."); System.Console.ReadKey(true); @@ -635,11 +635,11 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Do you have want to try Plextor vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } tryPlextor |= pressedKey.Key == ConsoleKey.Y; @@ -652,11 +652,11 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Do you have want to try NEC vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } tryNec |= pressedKey.Key == ConsoleKey.Y; @@ -669,11 +669,11 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Do you have want to try Pioneer vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } tryPioneer |= pressedKey.Key == ConsoleKey.Y; @@ -686,11 +686,11 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Do you have want to try HL-DT-ST (aka LG) vendor commands? THIS IS DANGEROUS AND CAN IRREVERSIBLY DESTROY YOUR DRIVE (IF IN DOUBT PRESS 'N') (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } tryHldtst |= pressedKey.Key == ConsoleKey.Y; @@ -709,17 +709,17 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you have a {0} disc that you can insert in the drive? (Y/N): ", + AaruConsole.Write("Do you have a {0} disc that you can insert in the drive? (Y/N): ", mediaType); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key != ConsoleKey.Y) continue; - DicConsole. + AaruConsole. WriteLine("Please insert it in the drive and press any key when it is ready."); System.Console.ReadKey(true); @@ -740,7 +740,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -759,7 +759,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -779,7 +779,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -793,7 +793,7 @@ namespace Aaru.Commands.Device } else { - DicConsole.DebugWriteLine("Device-Report command", + AaruConsole.DebugWriteLine("Device-Report command", "Device not ready. Sense {0}h ASC {1:X2}h ASCQ {2:X2}h", decSense.Value.SenseKey, decSense.Value.ASC, decSense.Value.ASCQ); @@ -803,7 +803,7 @@ namespace Aaru.Commands.Device } else { - DicConsole.DebugWriteLine("Device-Report command", + AaruConsole.DebugWriteLine("Device-Report command", "Got sense status but no sense buffer"); mediaIsRecognized = false; @@ -828,18 +828,18 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key == ConsoleKey.Y) { for(ushort i = (ushort)mediaTest.BlockSize;; i++) { - DicConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", + AaruConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", i); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, i, @@ -857,7 +857,7 @@ namespace Aaru.Commands.Device break; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } @@ -901,30 +901,30 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); + AaruConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key != ConsoleKey.Y) continue; - DicConsole. + AaruConsole. WriteLine("Please insert it in the drive and press any key when it is ready."); System.Console.ReadKey(true); - DicConsole.Write("Please write a description of the media type and press enter: "); + AaruConsole.Write("Please write a description of the media type and press enter: "); mediumTypeName = System.Console.ReadLine(); - DicConsole.Write("Please write the media manufacturer and press enter: "); + AaruConsole.Write("Please write the media manufacturer and press enter: "); mediumManufacturer = System.Console.ReadLine(); - DicConsole.Write("Please write the media model and press enter: "); + AaruConsole.Write("Please write the media model and press enter: "); mediumModel = System.Console.ReadLine(); bool mediaIsRecognized = true; sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); - DicConsole.DebugWriteLine("Device reporting", "sense = {0}", sense); + AaruConsole.DebugWriteLine("Device reporting", "sense = {0}", sense); if(sense) { @@ -938,7 +938,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -957,7 +957,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -977,7 +977,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -991,7 +991,7 @@ namespace Aaru.Commands.Device } else { - DicConsole.DebugWriteLine("Device-Report command", + AaruConsole.DebugWriteLine("Device-Report command", "Device not ready. Sense {0} ASC {1:X2}h ASCQ {2:X2}h", decSense.Value.SenseKey, decSense.Value.ASC, decSense.Value.ASCQ); @@ -1001,7 +1001,7 @@ namespace Aaru.Commands.Device } else { - DicConsole.DebugWriteLine("Device-Report command", + AaruConsole.DebugWriteLine("Device-Report command", "Got sense status but no sense buffer"); mediaIsRecognized = false; @@ -1021,7 +1021,7 @@ namespace Aaru.Commands.Device seqTests.Add(seqTest); dev.SpcAllowMediumRemoval(out buffer, dev.Timeout, out _); - DicConsole.WriteLine("Asking drive to unload tape (can take a few minutes)..."); + AaruConsole.WriteLine("Asking drive to unload tape (can take a few minutes)..."); dev.Unload(out buffer, dev.Timeout, out _); } @@ -1044,24 +1044,24 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); + AaruConsole.Write("Do you have media that you can insert in the drive? (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key != ConsoleKey.Y) continue; - DicConsole. + AaruConsole. WriteLine("Please insert it in the drive and press any key when it is ready."); System.Console.ReadKey(true); - DicConsole.Write("Please write a description of the media type and press enter: "); + AaruConsole.Write("Please write a description of the media type and press enter: "); mediumTypeName = System.Console.ReadLine(); - DicConsole.Write("Please write the media manufacturer and press enter: "); + AaruConsole.Write("Please write the media manufacturer and press enter: "); mediumManufacturer = System.Console.ReadLine(); - DicConsole.Write("Please write the media model and press enter: "); + AaruConsole.Write("Please write the media model and press enter: "); mediumModel = System.Console.ReadLine(); bool mediaIsRecognized = true; @@ -1079,7 +1079,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -1098,7 +1098,7 @@ namespace Aaru.Commands.Device while(leftRetries > 0) { - DicConsole.Write("\rWaiting for drive to become ready"); + AaruConsole.Write("\rWaiting for drive to become ready"); Thread.Sleep(2000); sense = dev.ScsiTestUnitReady(out senseBuffer, dev.Timeout, out _); @@ -1132,18 +1132,18 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key == ConsoleKey.Y) { for(ushort i = (ushort)mediaTest.BlockSize;; i++) { - DicConsole. + AaruConsole. Write("\rTrying to READ LONG with a size of {0} bytes...", i); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, @@ -1160,7 +1160,7 @@ namespace Aaru.Commands.Device break; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } @@ -1201,18 +1201,18 @@ namespace Aaru.Commands.Device while(pressedKey.Key != ConsoleKey.Y && pressedKey.Key != ConsoleKey.N) { - DicConsole. + AaruConsole. Write("Drive supports SCSI READ LONG but I cannot find the correct size. Do you want me to try? (This can take hours) (Y/N): "); pressedKey = System.Console.ReadKey(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(pressedKey.Key == ConsoleKey.Y) { for(ushort i = (ushort)report.SCSI.ReadCapabilities.BlockSize;; i++) { - DicConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", i); + AaruConsole.Write("\rTrying to READ LONG with a size of {0} bytes...", i); sense = dev.ReadLong10(out buffer, out senseBuffer, false, false, 0, i, dev.Timeout, out _); @@ -1229,7 +1229,7 @@ namespace Aaru.Commands.Device break; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } diff --git a/Aaru/Commands/Device/Devices.cs b/Aaru/Commands/Device/Devices.cs index 5fc5f2624..04d554de7 100644 --- a/Aaru/Commands/Device/Devices.cs +++ b/Aaru/Commands/Device/Devices.cs @@ -57,15 +57,15 @@ namespace Aaru.Commands.Device MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("list-devices"); - DicConsole.DebugWriteLine("List-Devices command", "--debug={0}", debug); - DicConsole.DebugWriteLine("List-Devices command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("List-Devices command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("List-Devices command", "--verbose={0}", verbose); DeviceInfo[] devices = Aaru.Devices.Device.ListDevices(out bool isRemote, out string serverApplication, out string serverVersion, @@ -82,7 +82,7 @@ namespace Aaru.Commands.Device if(devices == null || devices.Length == 0) { - DicConsole.WriteLine("No known devices attached."); + AaruConsole.WriteLine("No known devices attached."); } else { @@ -90,29 +90,29 @@ namespace Aaru.Commands.Device if(dicRemoteHost is null) { - DicConsole.WriteLine("{0,-22}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", "Path", "Vendor", "Model", + AaruConsole.WriteLine("{0,-22}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", "Path", "Vendor", "Model", "Serial", "Bus", "Supported?"); - DicConsole.WriteLine("{0,-22}+{1,-16}+{2,-24}+{3,-24}+{4,-10}+{5,-10}", "----------------------", + AaruConsole.WriteLine("{0,-22}+{1,-16}+{2,-24}+{3,-24}+{4,-10}+{5,-10}", "----------------------", "----------------", "------------------------", "------------------------", "----------", "----------"); foreach(DeviceInfo dev in devices) - DicConsole.WriteLine("{0,-22}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", dev.Path, dev.Vendor, + AaruConsole.WriteLine("{0,-22}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", dev.Path, dev.Vendor, dev.Model, dev.Serial, dev.Bus, dev.Supported); } else { - DicConsole.WriteLine("{0,-48}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", "Path", "Vendor", "Model", + AaruConsole.WriteLine("{0,-48}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", "Path", "Vendor", "Model", "Serial", "Bus", "Supported?"); - DicConsole.WriteLine("{0,-48}+{1,-16}+{2,-24}+{3,-24}+{4,-10}+{5,-10}", + AaruConsole.WriteLine("{0,-48}+{1,-16}+{2,-24}+{3,-24}+{4,-10}+{5,-10}", "------------------------------------------------", "----------------", "------------------------", "------------------------", "----------", "----------"); foreach(DeviceInfo dev in devices) - DicConsole.WriteLine("{0,-48}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", dev.Path, dev.Vendor, + AaruConsole.WriteLine("{0,-48}|{1,-16}|{2,-24}|{3,-24}|{4,-10}|{5,-10}", dev.Path, dev.Vendor, dev.Model, dev.Serial, dev.Bus, dev.Supported); } } diff --git a/Aaru/Commands/Device/Info.cs b/Aaru/Commands/Device/Info.cs index 8ac7c974c..a8b8b64eb 100644 --- a/Aaru/Commands/Device/Info.cs +++ b/Aaru/Commands/Device/Info.cs @@ -80,17 +80,17 @@ namespace Aaru.Commands.Device MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("device-info"); - DicConsole.DebugWriteLine("Device-Info command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Device-Info command", "--device={0}", devicePath); - DicConsole.DebugWriteLine("Device-Info command", "--output-prefix={0}", outputPrefix); - DicConsole.DebugWriteLine("Device-Info command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Device-Info command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Device-Info command", "--device={0}", devicePath); + AaruConsole.DebugWriteLine("Device-Info command", "--output-prefix={0}", outputPrefix); + AaruConsole.DebugWriteLine("Device-Info command", "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && @@ -110,14 +110,14 @@ namespace Aaru.Commands.Device if(dev.Error) { - DicConsole.ErrorWriteLine(Error.Print(dev.LastError)); + AaruConsole.ErrorWriteLine(Error.Print(dev.LastError)); return(int)ErrorNumber.CannotOpenDevice; } } catch(DeviceException e) { - DicConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); return(int)ErrorNumber.CannotOpenDevice; } @@ -126,34 +126,34 @@ namespace Aaru.Commands.Device if(dev.IsUsb) { - DicConsole.WriteLine("USB device"); + AaruConsole.WriteLine("USB device"); if(dev.UsbDescriptors != null) - DicConsole.WriteLine("USB descriptor is {0} bytes", dev.UsbDescriptors.Length); + AaruConsole.WriteLine("USB descriptor is {0} bytes", dev.UsbDescriptors.Length); - DicConsole.WriteLine("USB Vendor ID: {0:X4}", dev.UsbVendorId); - DicConsole.WriteLine("USB Product ID: {0:X4}", dev.UsbProductId); - DicConsole.WriteLine("USB Manufacturer: {0}", dev.UsbManufacturerString); - DicConsole.WriteLine("USB Product: {0}", dev.UsbProductString); - DicConsole.WriteLine("USB Serial number: {0}", dev.UsbSerialString); - DicConsole.WriteLine(); + AaruConsole.WriteLine("USB Vendor ID: {0:X4}", dev.UsbVendorId); + AaruConsole.WriteLine("USB Product ID: {0:X4}", dev.UsbProductId); + AaruConsole.WriteLine("USB Manufacturer: {0}", dev.UsbManufacturerString); + AaruConsole.WriteLine("USB Product: {0}", dev.UsbProductString); + AaruConsole.WriteLine("USB Serial number: {0}", dev.UsbSerialString); + AaruConsole.WriteLine(); } if(dev.IsFireWire) { - DicConsole.WriteLine("FireWire device"); - DicConsole.WriteLine("FireWire Vendor ID: {0:X6}", dev.FireWireVendor); - DicConsole.WriteLine("FireWire Model ID: {0:X6}", dev.FireWireModel); - DicConsole.WriteLine("FireWire Manufacturer: {0}", dev.FireWireVendorName); - DicConsole.WriteLine("FireWire Model: {0}", dev.FireWireModelName); - DicConsole.WriteLine("FireWire GUID: {0:X16}", dev.FireWireGuid); - DicConsole.WriteLine(); + AaruConsole.WriteLine("FireWire device"); + AaruConsole.WriteLine("FireWire Vendor ID: {0:X6}", dev.FireWireVendor); + AaruConsole.WriteLine("FireWire Model ID: {0:X6}", dev.FireWireModel); + AaruConsole.WriteLine("FireWire Manufacturer: {0}", dev.FireWireVendorName); + AaruConsole.WriteLine("FireWire Model: {0}", dev.FireWireModelName); + AaruConsole.WriteLine("FireWire GUID: {0:X16}", dev.FireWireGuid); + AaruConsole.WriteLine(); } if(dev.IsPcmcia) { - DicConsole.WriteLine("PCMCIA device"); - DicConsole.WriteLine("PCMCIA CIS is {0} bytes", dev.Cis.Length); + AaruConsole.WriteLine("PCMCIA device"); + AaruConsole.WriteLine("PCMCIA CIS is {0} bytes", dev.Cis.Length); Tuple[] tuples = CIS.GetTuples(dev.Cis); if(tuples != null) @@ -164,15 +164,15 @@ namespace Aaru.Commands.Device case TupleCodes.CISTPL_END: break; case TupleCodes.CISTPL_DEVICEGEO: case TupleCodes.CISTPL_DEVICEGEO_A: - DicConsole.WriteLine("{0}", CIS.PrettifyDeviceGeometryTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyDeviceGeometryTuple(tuple)); break; case TupleCodes.CISTPL_MANFID: - DicConsole.WriteLine("{0}", CIS.PrettifyManufacturerIdentificationTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyManufacturerIdentificationTuple(tuple)); break; case TupleCodes.CISTPL_VERS_1: - DicConsole.WriteLine("{0}", CIS.PrettifyLevel1VersionTuple(tuple)); + AaruConsole.WriteLine("{0}", CIS.PrettifyLevel1VersionTuple(tuple)); break; case TupleCodes.CISTPL_ALTSTR: @@ -209,18 +209,18 @@ namespace Aaru.Commands.Device case TupleCodes.CISTPL_SPCL: case TupleCodes.CISTPL_SWIL: case TupleCodes.CISTPL_VERS_2: - DicConsole.DebugWriteLine("Device-Info command", "Found undecoded tuple ID {0}", + AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded tuple ID {0}", tuple.Code); break; default: - DicConsole.DebugWriteLine("Device-Info command", "Found unknown tuple ID 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "Found unknown tuple ID 0x{0:X2}", (byte)tuple.Code); break; } else - DicConsole.DebugWriteLine("Device-Info command", "Could not get tuples"); + AaruConsole.DebugWriteLine("Device-Info command", "Could not get tuples"); } var devInfo = new DeviceInfo(dev); @@ -231,49 +231,49 @@ namespace Aaru.Commands.Device devInfo.AtaIdentify); Identify.IdentifyDevice? decodedIdentify = Identify.Decode(devInfo.AtaIdentify); - DicConsole.WriteLine(Aaru.Decoders.ATA.Identify.Prettify(decodedIdentify)); + AaruConsole.WriteLine(Aaru.Decoders.ATA.Identify.Prettify(decodedIdentify)); if(devInfo.AtaMcptError.HasValue) { - DicConsole.WriteLine("Device supports the Media Card Pass Through Command Set"); + AaruConsole.WriteLine("Device supports the Media Card Pass Through Command Set"); switch(devInfo.AtaMcptError.Value.DeviceHead & 0x7) { case 0: - DicConsole.WriteLine("Device reports incorrect media card type"); + AaruConsole.WriteLine("Device reports incorrect media card type"); break; case 1: - DicConsole.WriteLine("Device contains a Secure Digital card"); + AaruConsole.WriteLine("Device contains a Secure Digital card"); break; case 2: - DicConsole.WriteLine("Device contains a MultiMediaCard "); + AaruConsole.WriteLine("Device contains a MultiMediaCard "); break; case 3: - DicConsole.WriteLine("Device contains a Secure Digital I/O card"); + AaruConsole.WriteLine("Device contains a Secure Digital I/O card"); break; case 4: - DicConsole.WriteLine("Device contains a Smart Media card"); + AaruConsole.WriteLine("Device contains a Smart Media card"); break; default: - DicConsole.WriteLine("Device contains unknown media card type {0}", + AaruConsole.WriteLine("Device contains unknown media card type {0}", devInfo.AtaMcptError.Value.DeviceHead & 0x07); break; } if((devInfo.AtaMcptError.Value.DeviceHead & 0x08) == 0x08) - DicConsole.WriteLine("Media card is write protected"); + AaruConsole.WriteLine("Media card is write protected"); ushort specificData = (ushort)((devInfo.AtaMcptError.Value.CylinderHigh * 0x100) + devInfo.AtaMcptError.Value.CylinderLow); if(specificData != 0) - DicConsole.WriteLine("Card specific data: 0x{0:X4}", specificData); + AaruConsole.WriteLine("Card specific data: 0x{0:X4}", specificData); } if(decodedIdentify.HasValue) @@ -326,7 +326,7 @@ namespace Aaru.Commands.Device dev.IsCompactFlash, dev.IsPcmcia, blocks, blockSize); - DicConsole.WriteLine(removable ? "Media identified as {0}" : "Device identified as {0}", mediaType); + AaruConsole.WriteLine(removable ? "Media identified as {0}" : "Device identified as {0}", mediaType); Statistics.AddMedia(mediaType, true); } } @@ -336,45 +336,45 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_atapi_identify.bin", "ATAPI IDENTIFY", devInfo.AtapiIdentify); - DicConsole.WriteLine(Aaru.Decoders.ATA.Identify.Prettify(devInfo.AtapiIdentify)); + AaruConsole.WriteLine(Aaru.Decoders.ATA.Identify.Prettify(devInfo.AtapiIdentify)); } if(devInfo.ScsiInquiry != null) { if(dev.Type != DeviceType.ATAPI) - DicConsole.WriteLine("SCSI device"); + AaruConsole.WriteLine("SCSI device"); DataFile.WriteTo("Device-Info command", outputPrefix, "_scsi_inquiry.bin", "SCSI INQUIRY", devInfo.ScsiInquiryData); - DicConsole.WriteLine(Inquiry.Prettify(devInfo.ScsiInquiry)); + AaruConsole.WriteLine(Inquiry.Prettify(devInfo.ScsiInquiry)); if(devInfo.ScsiEvpdPages != null) foreach(KeyValuePair page in devInfo.ScsiEvpdPages) if(page.Key >= 0x01 && page.Key <= 0x7F) { - DicConsole.WriteLine("ASCII Page {0:X2}h: {1}", page.Key, EVPD.DecodeASCIIPage(page.Value)); + AaruConsole.WriteLine("ASCII Page {0:X2}h: {1}", page.Key, EVPD.DecodeASCIIPage(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, page.Value); } else if(page.Key == 0x80) { - DicConsole.WriteLine("Unit Serial Number: {0}", EVPD.DecodePage80(page.Value)); + AaruConsole.WriteLine("Unit Serial Number: {0}", EVPD.DecodePage80(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x81) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_81(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_81(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x82) { - DicConsole.WriteLine("ASCII implemented operating definitions: {0}", + AaruConsole.WriteLine("ASCII implemented operating definitions: {0}", EVPD.DecodePage82(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -382,49 +382,49 @@ namespace Aaru.Commands.Device } else if(page.Key == 0x83) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_83(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_83(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x84) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_84(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_84(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x85) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_85(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_85(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x86) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_86(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_86(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0x89) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_89(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_89(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0xB0) { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_B0(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_B0(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0xB1) { - DicConsole.WriteLine("Manufacturer-assigned Serial Number: {0}", + AaruConsole.WriteLine("Manufacturer-assigned Serial Number: {0}", EVPD.DecodePageB1(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -432,7 +432,7 @@ namespace Aaru.Commands.Device } else if(page.Key == 0xB2) { - DicConsole.WriteLine("TapeAlert Supported Flags Bitmap: 0x{0:X16}", + AaruConsole.WriteLine("TapeAlert Supported Flags Bitmap: 0x{0:X16}", EVPD.DecodePageB2(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -440,14 +440,14 @@ namespace Aaru.Commands.Device } else if(page.Key == 0xB3) { - DicConsole.WriteLine("Automation Device Serial Number: {0}", EVPD.DecodePageB3(page.Value)); + AaruConsole.WriteLine("Automation Device Serial Number: {0}", EVPD.DecodePageB3(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); } else if(page.Key == 0xB4) { - DicConsole.WriteLine("Data Transfer Device Element Address: 0x{0}", + AaruConsole.WriteLine("Data Transfer Device Element Address: 0x{0}", EVPD.DecodePageB4(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -457,7 +457,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "quantum") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_Quantum(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_Quantum(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -466,7 +466,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "seagate") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_Seagate(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_Seagate(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -475,7 +475,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "ibm") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_IBM(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_IBM(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -484,7 +484,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "ibm") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C1_IBM(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C1_IBM(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -493,7 +493,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "certance") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_C1_Certance(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_C1_Certance(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -503,7 +503,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "certance") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C2_C3_C4_C5_C6_Certance(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -513,7 +513,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "hp") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_to_C5_HP(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_C0_to_C5_HP(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -522,7 +522,7 @@ namespace Aaru.Commands.Device StringHandlers.CToString(devInfo.ScsiInquiry.Value.VendorIdentification). ToLowerInvariant().Trim() == "certance") { - DicConsole.WriteLine("{0}", EVPD.PrettifyPage_DF_Certance(page.Value)); + AaruConsole.WriteLine("{0}", EVPD.PrettifyPage_DF_Certance(page.Value)); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", $"SCSI INQUIRY EVPD {page.Key:X2}h", page.Value); @@ -532,7 +532,7 @@ namespace Aaru.Commands.Device if(page.Key == 0x00) continue; - DicConsole.DebugWriteLine("Device-Info command", "Found undecoded SCSI VPD page 0x{0:X2}", + AaruConsole.DebugWriteLine("Device-Info command", "Found undecoded SCSI VPD page 0x{0:X2}", page.Key); DataFile.WriteTo("Device-Info command", outputPrefix, $"_scsi_evpd_{page.Key:X2}h.bin", @@ -559,256 +559,256 @@ namespace Aaru.Commands.Device Features.SeparatedFeatures ftr = Features.Separate(devInfo.MmcConfiguration); - DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION length is {0} bytes", ftr.DataLength); - DicConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION current profile is {0:X4}h", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION current profile is {0:X4}h", ftr.CurrentProfile); if(ftr.Descriptors != null) { - DicConsole.WriteLine("SCSI MMC GET CONFIGURATION Features:"); + AaruConsole.WriteLine("SCSI MMC GET CONFIGURATION Features:"); foreach(Features.FeatureDescriptor desc in ftr.Descriptors) { - DicConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code); + AaruConsole.DebugWriteLine("Device-Info command", "Feature {0:X4}h", desc.Code); switch(desc.Code) { case 0x0000: - DicConsole.WriteLine(Features.Prettify_0000(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0000(desc.Data)); break; case 0x0001: - DicConsole.WriteLine(Features.Prettify_0001(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0001(desc.Data)); break; case 0x0002: - DicConsole.WriteLine(Features.Prettify_0002(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0002(desc.Data)); break; case 0x0003: - DicConsole.WriteLine(Features.Prettify_0003(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0003(desc.Data)); break; case 0x0004: - DicConsole.WriteLine(Features.Prettify_0004(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0004(desc.Data)); break; case 0x0010: - DicConsole.WriteLine(Features.Prettify_0010(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0010(desc.Data)); break; case 0x001D: - DicConsole.WriteLine(Features.Prettify_001D(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_001D(desc.Data)); break; case 0x001E: - DicConsole.WriteLine(Features.Prettify_001E(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_001E(desc.Data)); break; case 0x001F: - DicConsole.WriteLine(Features.Prettify_001F(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_001F(desc.Data)); break; case 0x0020: - DicConsole.WriteLine(Features.Prettify_0020(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0020(desc.Data)); break; case 0x0021: - DicConsole.WriteLine(Features.Prettify_0021(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0021(desc.Data)); break; case 0x0022: - DicConsole.WriteLine(Features.Prettify_0022(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0022(desc.Data)); break; case 0x0023: - DicConsole.WriteLine(Features.Prettify_0023(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0023(desc.Data)); break; case 0x0024: - DicConsole.WriteLine(Features.Prettify_0024(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0024(desc.Data)); break; case 0x0025: - DicConsole.WriteLine(Features.Prettify_0025(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0025(desc.Data)); break; case 0x0026: - DicConsole.WriteLine(Features.Prettify_0026(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0026(desc.Data)); break; case 0x0027: - DicConsole.WriteLine(Features.Prettify_0027(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0027(desc.Data)); break; case 0x0028: - DicConsole.WriteLine(Features.Prettify_0028(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0028(desc.Data)); break; case 0x0029: - DicConsole.WriteLine(Features.Prettify_0029(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0029(desc.Data)); break; case 0x002A: - DicConsole.WriteLine(Features.Prettify_002A(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002A(desc.Data)); break; case 0x002B: - DicConsole.WriteLine(Features.Prettify_002B(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002B(desc.Data)); break; case 0x002C: - DicConsole.WriteLine(Features.Prettify_002C(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002C(desc.Data)); break; case 0x002D: - DicConsole.WriteLine(Features.Prettify_002D(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002D(desc.Data)); break; case 0x002E: - DicConsole.WriteLine(Features.Prettify_002E(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002E(desc.Data)); break; case 0x002F: - DicConsole.WriteLine(Features.Prettify_002F(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_002F(desc.Data)); break; case 0x0030: - DicConsole.WriteLine(Features.Prettify_0030(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0030(desc.Data)); break; case 0x0031: - DicConsole.WriteLine(Features.Prettify_0031(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0031(desc.Data)); break; case 0x0032: - DicConsole.WriteLine(Features.Prettify_0032(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0032(desc.Data)); break; case 0x0033: - DicConsole.WriteLine(Features.Prettify_0033(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0033(desc.Data)); break; case 0x0035: - DicConsole.WriteLine(Features.Prettify_0035(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0035(desc.Data)); break; case 0x0037: - DicConsole.WriteLine(Features.Prettify_0037(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0037(desc.Data)); break; case 0x0038: - DicConsole.WriteLine(Features.Prettify_0038(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0038(desc.Data)); break; case 0x003A: - DicConsole.WriteLine(Features.Prettify_003A(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_003A(desc.Data)); break; case 0x003B: - DicConsole.WriteLine(Features.Prettify_003B(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_003B(desc.Data)); break; case 0x0040: - DicConsole.WriteLine(Features.Prettify_0040(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0040(desc.Data)); break; case 0x0041: - DicConsole.WriteLine(Features.Prettify_0041(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0041(desc.Data)); break; case 0x0042: - DicConsole.WriteLine(Features.Prettify_0042(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0042(desc.Data)); break; case 0x0050: - DicConsole.WriteLine(Features.Prettify_0050(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0050(desc.Data)); break; case 0x0051: - DicConsole.WriteLine(Features.Prettify_0051(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0051(desc.Data)); break; case 0x0080: - DicConsole.WriteLine(Features.Prettify_0080(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0080(desc.Data)); break; case 0x0100: - DicConsole.WriteLine(Features.Prettify_0100(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0100(desc.Data)); break; case 0x0101: - DicConsole.WriteLine(Features.Prettify_0101(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0101(desc.Data)); break; case 0x0102: - DicConsole.WriteLine(Features.Prettify_0102(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0102(desc.Data)); break; case 0x0103: - DicConsole.WriteLine(Features.Prettify_0103(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0103(desc.Data)); break; case 0x0104: - DicConsole.WriteLine(Features.Prettify_0104(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0104(desc.Data)); break; case 0x0105: - DicConsole.WriteLine(Features.Prettify_0105(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0105(desc.Data)); break; case 0x0106: - DicConsole.WriteLine(Features.Prettify_0106(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0106(desc.Data)); break; case 0x0107: - DicConsole.WriteLine(Features.Prettify_0107(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0107(desc.Data)); break; case 0x0108: - DicConsole.WriteLine(Features.Prettify_0108(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0108(desc.Data)); break; case 0x0109: - DicConsole.WriteLine(Features.Prettify_0109(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0109(desc.Data)); break; case 0x010A: - DicConsole.WriteLine(Features.Prettify_010A(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_010A(desc.Data)); break; case 0x010B: - DicConsole.WriteLine(Features.Prettify_010B(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_010B(desc.Data)); break; case 0x010C: - DicConsole.WriteLine(Features.Prettify_010C(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_010C(desc.Data)); break; case 0x010D: - DicConsole.WriteLine(Features.Prettify_010D(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_010D(desc.Data)); break; case 0x010E: - DicConsole.WriteLine(Features.Prettify_010E(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_010E(desc.Data)); break; case 0x0110: - DicConsole.WriteLine(Features.Prettify_0110(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0110(desc.Data)); break; case 0x0113: - DicConsole.WriteLine(Features.Prettify_0113(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0113(desc.Data)); break; case 0x0142: - DicConsole.WriteLine(Features.Prettify_0142(desc.Data)); + AaruConsole.WriteLine(Features.Prettify_0142(desc.Data)); break; default: - DicConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code); + AaruConsole.WriteLine("Found unknown feature code {0:X4}h", desc.Code); break; } @@ -816,7 +816,7 @@ namespace Aaru.Commands.Device } else { - DicConsole.DebugWriteLine("Device-Info command", + AaruConsole.DebugWriteLine("Device-Info command", "GET CONFIGURATION returned no feature descriptors"); } } @@ -828,26 +828,26 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_plextor_eeprom.bin", "PLEXTOR READ EEPROM", devInfo.PlextorFeatures.Eeprom); - DicConsole.WriteLine("Drive has loaded a total of {0} discs", devInfo.PlextorFeatures.Discs); + AaruConsole.WriteLine("Drive has loaded a total of {0} discs", devInfo.PlextorFeatures.Discs); - DicConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs", + AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading CDs", devInfo.PlextorFeatures.CdReadTime / 3600, (devInfo.PlextorFeatures.CdReadTime / 60) % 60, devInfo.PlextorFeatures.CdReadTime % 60); - DicConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs", + AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing CDs", devInfo.PlextorFeatures.CdWriteTime / 3600, (devInfo.PlextorFeatures.CdWriteTime / 60) % 60, devInfo.PlextorFeatures.CdWriteTime % 60); if(devInfo.PlextorFeatures.IsDvd) { - DicConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs", + AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds reading DVDs", devInfo.PlextorFeatures.DvdReadTime / 3600, (devInfo.PlextorFeatures.DvdReadTime / 60) % 60, devInfo.PlextorFeatures.DvdReadTime % 60); - DicConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs", + AaruConsole.WriteLine("Drive has spent {0} hours, {1} minutes and {2} seconds writing DVDs", devInfo.PlextorFeatures.DvdWriteTime / 3600, (devInfo.PlextorFeatures.DvdWriteTime / 60) % 60, devInfo.PlextorFeatures.DvdWriteTime % 60); @@ -856,147 +856,147 @@ namespace Aaru.Commands.Device if(devInfo.PlextorFeatures.PoweRec) { - DicConsole.Write("Drive supports PoweRec"); + AaruConsole.Write("Drive supports PoweRec"); if(devInfo.PlextorFeatures.PoweRecEnabled) { - DicConsole.Write(", has it enabled"); + AaruConsole.Write(", has it enabled"); if(devInfo.PlextorFeatures.PoweRecRecommendedSpeed > 0) - DicConsole.WriteLine(" and recommends {0} Kb/sec.", + AaruConsole.WriteLine(" and recommends {0} Kb/sec.", devInfo.PlextorFeatures.PoweRecRecommendedSpeed); else - DicConsole.WriteLine("."); + AaruConsole.WriteLine("."); if(devInfo.PlextorFeatures.PoweRecSelected > 0) - DicConsole. + AaruConsole. WriteLine("Selected PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)", devInfo.PlextorFeatures.PoweRecSelected, devInfo.PlextorFeatures.PoweRecSelected / 177); if(devInfo.PlextorFeatures.PoweRecMax > 0) - DicConsole. + AaruConsole. WriteLine("Maximum PoweRec speed for currently inserted media is {0} Kb/sec ({1}x)", devInfo.PlextorFeatures.PoweRecMax, devInfo.PlextorFeatures.PoweRecMax / 177); if(devInfo.PlextorFeatures.PoweRecLast > 0) - DicConsole.WriteLine("Last used PoweRec was {0} Kb/sec ({1}x)", + AaruConsole.WriteLine("Last used PoweRec was {0} Kb/sec ({1}x)", devInfo.PlextorFeatures.PoweRecLast, devInfo.PlextorFeatures.PoweRecLast / 177); } else { - DicConsole.WriteLine("."); - DicConsole.WriteLine("PoweRec is disabled"); + AaruConsole.WriteLine("."); + AaruConsole.WriteLine("PoweRec is disabled"); } } if(devInfo.PlextorFeatures.SilentMode) { - DicConsole.WriteLine("Drive supports Plextor SilentMode"); + AaruConsole.WriteLine("Drive supports Plextor SilentMode"); if(devInfo.PlextorFeatures.SilentModeEnabled) { - DicConsole.WriteLine("Plextor SilentMode is enabled:"); + AaruConsole.WriteLine("Plextor SilentMode is enabled:"); - DicConsole.WriteLine(devInfo.PlextorFeatures.AccessTimeLimit == 2 ? "\tAccess time is slow" + AaruConsole.WriteLine(devInfo.PlextorFeatures.AccessTimeLimit == 2 ? "\tAccess time is slow" : "\tAccess time is fast"); if(devInfo.PlextorFeatures.CdReadSpeedLimit > 0) - DicConsole.WriteLine("\tCD read speed limited to {0}x", + AaruConsole.WriteLine("\tCD read speed limited to {0}x", devInfo.PlextorFeatures.CdReadSpeedLimit); if(devInfo.PlextorFeatures.DvdReadSpeedLimit > 0 && devInfo.PlextorFeatures.IsDvd) - DicConsole.WriteLine("\tDVD read speed limited to {0}x", + AaruConsole.WriteLine("\tDVD read speed limited to {0}x", devInfo.PlextorFeatures.DvdReadSpeedLimit); if(devInfo.PlextorFeatures.CdWriteSpeedLimit > 0) - DicConsole.WriteLine("\tCD write speed limited to {0}x", + AaruConsole.WriteLine("\tCD write speed limited to {0}x", devInfo.PlextorFeatures.CdWriteSpeedLimit); } } if(devInfo.PlextorFeatures.GigaRec) - DicConsole.WriteLine("Drive supports Plextor GigaRec"); + AaruConsole.WriteLine("Drive supports Plextor GigaRec"); if(devInfo.PlextorFeatures.SecuRec) - DicConsole.WriteLine("Drive supports Plextor SecuRec"); + AaruConsole.WriteLine("Drive supports Plextor SecuRec"); if(devInfo.PlextorFeatures.SpeedRead) { - DicConsole.Write("Drive supports Plextor SpeedRead"); + AaruConsole.Write("Drive supports Plextor SpeedRead"); if(devInfo.PlextorFeatures.SpeedReadEnabled) - DicConsole.WriteLine("and has it enabled"); + AaruConsole.WriteLine("and has it enabled"); else - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } if(devInfo.PlextorFeatures.Hiding) { - DicConsole.WriteLine("Drive supports hiding CD-Rs and forcing single session"); + AaruConsole.WriteLine("Drive supports hiding CD-Rs and forcing single session"); if(devInfo.PlextorFeatures.HidesRecordables) - DicConsole.WriteLine("Drive currently hides CD-Rs"); + AaruConsole.WriteLine("Drive currently hides CD-Rs"); if(devInfo.PlextorFeatures.HidesSessions) - DicConsole.WriteLine("Drive currently forces single session"); + AaruConsole.WriteLine("Drive currently forces single session"); } if(devInfo.PlextorFeatures.VariRec) - DicConsole.WriteLine("Drive supports Plextor VariRec"); + AaruConsole.WriteLine("Drive supports Plextor VariRec"); if(devInfo.PlextorFeatures.IsDvd) { if(devInfo.PlextorFeatures.VariRecDvd) - DicConsole.WriteLine("Drive supports Plextor VariRec for DVDs"); + AaruConsole.WriteLine("Drive supports Plextor VariRec for DVDs"); if(devInfo.PlextorFeatures.BitSetting) - DicConsole.WriteLine("Drive supports bitsetting DVD+R book type"); + AaruConsole.WriteLine("Drive supports bitsetting DVD+R book type"); if(devInfo.PlextorFeatures.BitSettingDl) - DicConsole.WriteLine("Drive supports bitsetting DVD+R DL book type"); + AaruConsole.WriteLine("Drive supports bitsetting DVD+R DL book type"); if(devInfo.PlextorFeatures.DvdPlusWriteTest) - DicConsole.WriteLine("Drive supports test writing DVD+"); + AaruConsole.WriteLine("Drive supports test writing DVD+"); } } if(devInfo.ScsiInquiry.Value.KreonPresent) { - DicConsole.WriteLine("Drive has kreon firmware:"); + AaruConsole.WriteLine("Drive has kreon firmware:"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse)) - DicConsole.WriteLine("\tCan do challenge/response with Xbox discs"); + AaruConsole.WriteLine("\tCan do challenge/response with Xbox discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs)) - DicConsole.WriteLine("\tCan read and decrypt SS from Xbox discs"); + AaruConsole.WriteLine("\tCan read and decrypt SS from Xbox discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock)) - DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox discs"); + AaruConsole.WriteLine("\tCan set xtreme unlock state with Xbox discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock)) - DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox discs"); + AaruConsole.WriteLine("\tCan set wxripper unlock state with Xbox discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ChallengeResponse360)) - DicConsole.WriteLine("\tCan do challenge/response with Xbox 360 discs"); + AaruConsole.WriteLine("\tCan do challenge/response with Xbox 360 discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.DecryptSs360)) - DicConsole.WriteLine("\tCan read and decrypt SS from Xbox 360 discs"); + AaruConsole.WriteLine("\tCan read and decrypt SS from Xbox 360 discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.XtremeUnlock360)) - DicConsole.WriteLine("\tCan set xtreme unlock state with Xbox 360 discs"); + AaruConsole.WriteLine("\tCan set xtreme unlock state with Xbox 360 discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.WxripperUnlock360)) - DicConsole.WriteLine("\tCan set wxripper unlock state with Xbox 360 discs"); + AaruConsole.WriteLine("\tCan set wxripper unlock state with Xbox 360 discs"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.Lock)) - DicConsole.WriteLine("\tCan set locked state"); + AaruConsole.WriteLine("\tCan set locked state"); if(devInfo.KreonFeatures.HasFlag(KreonFeatures.ErrorSkipping)) - DicConsole.WriteLine("\tCan skip read errors"); + AaruConsole.WriteLine("\tCan skip read errors"); } if(devInfo.BlockLimits != null) @@ -1004,8 +1004,8 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_ssc_readblocklimits.bin", "SSC READ BLOCK LIMITS", devInfo.BlockLimits); - DicConsole.WriteLine("Block limits for device:"); - DicConsole.WriteLine(BlockLimits.Prettify(devInfo.BlockLimits)); + AaruConsole.WriteLine("Block limits for device:"); + AaruConsole.WriteLine(BlockLimits.Prettify(devInfo.BlockLimits)); } if(devInfo.DensitySupport != null) @@ -1015,8 +1015,8 @@ namespace Aaru.Commands.Device if(devInfo.DensitySupportHeader.HasValue) { - DicConsole.WriteLine("Densities supported by device:"); - DicConsole.WriteLine(DensitySupport.PrettifyDensity(devInfo.DensitySupportHeader)); + AaruConsole.WriteLine("Densities supported by device:"); + AaruConsole.WriteLine(DensitySupport.PrettifyDensity(devInfo.DensitySupportHeader)); } } @@ -1027,11 +1027,11 @@ namespace Aaru.Commands.Device if(devInfo.MediaTypeSupportHeader.HasValue) { - DicConsole.WriteLine("Medium types supported by device:"); - DicConsole.WriteLine(DensitySupport.PrettifyMediumType(devInfo.MediaTypeSupportHeader)); + AaruConsole.WriteLine("Medium types supported by device:"); + AaruConsole.WriteLine(DensitySupport.PrettifyMediumType(devInfo.MediaTypeSupportHeader)); } - DicConsole.WriteLine(DensitySupport.PrettifyMediumType(devInfo.MediumDensitySupport)); + AaruConsole.WriteLine(DensitySupport.PrettifyMediumType(devInfo.MediumDensitySupport)); } } @@ -1045,21 +1045,21 @@ namespace Aaru.Commands.Device { noInfo = false; DataFile.WriteTo("Device-Info command", outputPrefix, "_mmc_cid.bin", "MMC CID", devInfo.CID); - DicConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCID(devInfo.CID)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCID(devInfo.CID)); } if(devInfo.CSD != null) { noInfo = false; DataFile.WriteTo("Device-Info command", outputPrefix, "_mmc_csd.bin", "MMC CSD", devInfo.CSD); - DicConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCSD(devInfo.CSD)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyCSD(devInfo.CSD)); } if(devInfo.OCR != null) { noInfo = false; DataFile.WriteTo("Device-Info command", outputPrefix, "_mmc_ocr.bin", "MMC OCR", devInfo.OCR); - DicConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyOCR(devInfo.OCR)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyOCR(devInfo.OCR)); } if(devInfo.ExtendedCSD != null) @@ -1069,11 +1069,11 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_mmc_ecsd.bin", "MMC Extended CSD", devInfo.ExtendedCSD); - DicConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(devInfo.ExtendedCSD)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.MMC.Decoders.PrettifyExtendedCSD(devInfo.ExtendedCSD)); } if(noInfo) - DicConsole.WriteLine("Could not get any kind of information from the device !!!"); + AaruConsole.WriteLine("Could not get any kind of information from the device !!!"); } break; @@ -1088,7 +1088,7 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_sd_cid.bin", "SecureDigital CID", devInfo.CID); - DicConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCID(devInfo.CID)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCID(devInfo.CID)); } if(devInfo.CSD != null) @@ -1098,7 +1098,7 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_sd_csd.bin", "SecureDigital CSD", devInfo.CSD); - DicConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCSD(devInfo.CSD)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyCSD(devInfo.CSD)); } if(devInfo.OCR != null) @@ -1108,7 +1108,7 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_sd_ocr.bin", "SecureDigital OCR", devInfo.OCR); - DicConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyOCR(devInfo.OCR)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifyOCR(devInfo.OCR)); } if(devInfo.SCR != null) @@ -1118,11 +1118,11 @@ namespace Aaru.Commands.Device DataFile.WriteTo("Device-Info command", outputPrefix, "_sd_scr.bin", "SecureDigital SCR", devInfo.SCR); - DicConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifySCR(devInfo.SCR)); + AaruConsole.WriteLine("{0}", Aaru.Decoders.SecureDigital.Decoders.PrettifySCR(devInfo.SCR)); } if(noInfo) - DicConsole.WriteLine("Could not get any kind of information from the device !!!"); + AaruConsole.WriteLine("Could not get any kind of information from the device !!!"); } break; @@ -1130,7 +1130,7 @@ namespace Aaru.Commands.Device dev.Close(); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); // Open master database var ctx = DicContext.Create(Aaru.Settings.Settings.MasterDbPath); @@ -1141,20 +1141,20 @@ namespace Aaru.Commands.Device d.Revision == dev.FirmwareRevision); if(dbDev is null) - DicConsole.WriteLine("Device not in database, please create a device report and attach it to a Github issue."); + AaruConsole.WriteLine("Device not in database, please create a device report and attach it to a Github issue."); else { - DicConsole.WriteLine($"Device in database since {dbDev.LastSynchronized}."); + AaruConsole.WriteLine($"Device in database since {dbDev.LastSynchronized}."); if(dbDev.OptimalMultipleSectorsRead > 0) - DicConsole.WriteLine($"Optimal multiple read is {dbDev.LastSynchronized} sectors."); + AaruConsole.WriteLine($"Optimal multiple read is {dbDev.LastSynchronized} sectors."); } // Search for read offset in master database CdOffset cdOffset = ctx.CdOffsets.FirstOrDefault(d => d.Manufacturer == dev.Manufacturer && d.Model == dev.Model); - DicConsole.WriteLine(cdOffset is null ? "CD reading offset not found in database." + AaruConsole.WriteLine(cdOffset is null ? "CD reading offset not found in database." : $"CD reading offset is {cdOffset.Offset} samples ({cdOffset.Offset * 4} bytes)."); return(int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Filesystem/ExtractFiles.cs b/Aaru/Commands/Filesystem/ExtractFiles.cs index 617e479f9..950c81076 100644 --- a/Aaru/Commands/Filesystem/ExtractFiles.cs +++ b/Aaru/Commands/Filesystem/ExtractFiles.cs @@ -103,35 +103,35 @@ namespace Aaru.Commands.Filesystem MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("extract-files"); - DicConsole.DebugWriteLine("Extract-Files command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Extract-Files command", "--encoding={0}", encoding); - DicConsole.DebugWriteLine("Extract-Files command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Extract-Files command", "--options={0}", options); - DicConsole.DebugWriteLine("Extract-Files command", "--output={0}", outputDir); - DicConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", xattrs); + AaruConsole.DebugWriteLine("Extract-Files command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Extract-Files command", "--encoding={0}", encoding); + AaruConsole.DebugWriteLine("Extract-Files command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Extract-Files command", "--options={0}", options); + AaruConsole.DebugWriteLine("Extract-Files command", "--output={0}", outputDir); + AaruConsole.DebugWriteLine("Extract-Files command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Extract-Files command", "--xattrs={0}", xattrs); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); Dictionary parsedOptions = Aaru.Core.Options.Parse(options); - DicConsole.DebugWriteLine("Extract-Files command", "Parsed options:"); + AaruConsole.DebugWriteLine("Extract-Files command", "Parsed options:"); foreach(KeyValuePair parsedOption in parsedOptions) - DicConsole.DebugWriteLine("Extract-Files command", "{0} = {1}", parsedOption.Key, parsedOption.Value); + AaruConsole.DebugWriteLine("Extract-Files command", "{0} = {1}", parsedOption.Key, parsedOption.Value); parsedOptions.Add("debug", debug.ToString()); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -144,11 +144,11 @@ namespace Aaru.Commands.Filesystem encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - DicConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); } catch(ArgumentException) { - DicConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine("Specified encoding is not supported."); return(int)ErrorNumber.EncodingUnknown; } @@ -161,20 +161,20 @@ namespace Aaru.Commands.Filesystem if(imageFormat == null) { - DicConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, + AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); else - DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); if(outputDir == null) { - DicConsole.WriteLine("Output directory missing."); + AaruConsole.WriteLine("Output directory missing."); return(int)ErrorNumber.MissingArgument; } @@ -182,7 +182,7 @@ namespace Aaru.Commands.Filesystem if(Directory.Exists(outputDir) || File.Exists(outputDir)) { - DicConsole.ErrorWriteLine("Destination exists, aborting."); + AaruConsole.ErrorWriteLine("Destination exists, aborting."); return(int)ErrorNumber.DestinationExists; } @@ -193,21 +193,21 @@ namespace Aaru.Commands.Filesystem { if(!imageFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } - DicConsole.DebugWriteLine("Extract-Files command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Extract-Files command", "Correctly opened image file."); - DicConsole.DebugWriteLine("Extract-Files command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Extract-Files command", "Image without headers is {0} bytes.", imageFormat.Info.ImageSize); - DicConsole.DebugWriteLine("Extract-Files command", "Image has {0} sectors.", + AaruConsole.DebugWriteLine("Extract-Files command", "Image has {0} sectors.", imageFormat.Info.Sectors); - DicConsole.DebugWriteLine("Extract-Files command", "Image identifies disk type as {0}.", + AaruConsole.DebugWriteLine("Extract-Files command", "Image identifies disk type as {0}.", imageFormat.Info.MediaType); Statistics.AddMediaFormat(imageFormat.Format); @@ -216,8 +216,8 @@ namespace Aaru.Commands.Filesystem } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); return(int)ErrorNumber.CannotOpenFormat; } @@ -230,30 +230,30 @@ namespace Aaru.Commands.Filesystem Errno error; if(partitions.Count == 0) - DicConsole.DebugWriteLine("Extract-Files command", "No partitions found"); + AaruConsole.DebugWriteLine("Extract-Files command", "No partitions found"); else { - DicConsole.WriteLine("{0} partitions found.", partitions.Count); + AaruConsole.WriteLine("{0} partitions found.", partitions.Count); for(int i = 0; i < partitions.Count; i++) { - DicConsole.WriteLine(); - DicConsole.WriteLine("Partition {0}:", partitions[i].Sequence); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Partition {0}:", partitions[i].Sequence); - DicConsole.WriteLine("Identifying filesystem on partition"); + AaruConsole.WriteLine("Identifying filesystem on partition"); Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?. @@ -274,14 +274,14 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } else { plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] @@ -299,7 +299,7 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } } @@ -313,15 +313,15 @@ namespace Aaru.Commands.Filesystem Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] @@ -339,13 +339,13 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } else { plugins.ReadOnlyFilesystems.TryGetValue(idPlugins[0], out plugin); - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin.GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] { }); @@ -362,13 +362,13 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } catch(Exception ex) { - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Extract-Files command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Extract-Files command", ex.StackTrace); return(int)ErrorNumber.UnexpectedException; } @@ -386,7 +386,7 @@ namespace Aaru.Commands.Filesystem if(error != Errno.NoError) { - DicConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Error {0} reading root directory {0}", error.ToString()); return; } @@ -407,7 +407,7 @@ namespace Aaru.Commands.Filesystem Directory.CreateDirectory(outputPath); - DicConsole.WriteLine("Created subdirectory at {0}", outputPath); + AaruConsole.WriteLine("Created subdirectory at {0}", outputPath); ExtractFilesInDir(path + "/" + entry, fs, volumeName, outputDir, doXattrs); @@ -508,11 +508,11 @@ namespace Aaru.Commands.Filesystem // ignored } #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body - DicConsole.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}", + AaruConsole.WriteLine("Written {0} bytes of xattr {1} from file {2} to {3}", xattrBuf.Length, xattr, entry, outputPath); } else - DicConsole.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists", xattr, + AaruConsole.ErrorWriteLine("Cannot write xattr {0} for {1}, output exists", xattr, entry); } } @@ -566,17 +566,17 @@ namespace Aaru.Commands.Filesystem // ignored } #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body - DicConsole.WriteLine("Written {0} bytes of file {1} to {2}", outBuf.Length, entry, + AaruConsole.WriteLine("Written {0} bytes of file {1} to {2}", outBuf.Length, entry, outputPath); } else - DicConsole.ErrorWriteLine("Error {0} reading file {1}", error, entry); + AaruConsole.ErrorWriteLine("Error {0} reading file {1}", error, entry); } else - DicConsole.ErrorWriteLine("Cannot write file {0}, output exists", entry); + AaruConsole.ErrorWriteLine("Cannot write file {0}, output exists", entry); } else - DicConsole.ErrorWriteLine("Error reading file {0}", entry); + AaruConsole.ErrorWriteLine("Error reading file {0}", entry); } } } diff --git a/Aaru/Commands/Filesystem/Ls.cs b/Aaru/Commands/Filesystem/Ls.cs index 2e88ac64c..f7831c454 100644 --- a/Aaru/Commands/Filesystem/Ls.cs +++ b/Aaru/Commands/Filesystem/Ls.cs @@ -97,32 +97,32 @@ namespace Aaru.Commands.Filesystem MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; - DicConsole.DebugWriteLine("Ls command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Ls command", "--encoding={0}", encoding); - DicConsole.DebugWriteLine("Ls command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Ls command", "--options={0}", options); - DicConsole.DebugWriteLine("Ls command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Ls command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Ls command", "--encoding={0}", encoding); + AaruConsole.DebugWriteLine("Ls command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Ls command", "--options={0}", options); + AaruConsole.DebugWriteLine("Ls command", "--verbose={0}", verbose); Statistics.AddCommand("ls"); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); Dictionary parsedOptions = Aaru.Core.Options.Parse(options); - DicConsole.DebugWriteLine("Ls command", "Parsed options:"); + AaruConsole.DebugWriteLine("Ls command", "Parsed options:"); foreach(KeyValuePair parsedOption in parsedOptions) - DicConsole.DebugWriteLine("Ls command", "{0} = {1}", parsedOption.Key, parsedOption.Value); + AaruConsole.DebugWriteLine("Ls command", "{0} = {1}", parsedOption.Key, parsedOption.Value); parsedOptions.Add("debug", debug.ToString()); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -135,11 +135,11 @@ namespace Aaru.Commands.Filesystem encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - DicConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); } catch(ArgumentException) { - DicConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine("Specified encoding is not supported."); return(int)ErrorNumber.EncodingUnknown; } @@ -152,35 +152,35 @@ namespace Aaru.Commands.Filesystem if(imageFormat == null) { - DicConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, + AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); else - DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); try { if(!imageFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } - DicConsole.DebugWriteLine("Ls command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Ls command", "Correctly opened image file."); - DicConsole.DebugWriteLine("Ls command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Ls command", "Image without headers is {0} bytes.", imageFormat.Info.ImageSize); - DicConsole.DebugWriteLine("Ls command", "Image has {0} sectors.", imageFormat.Info.Sectors); + AaruConsole.DebugWriteLine("Ls command", "Image has {0} sectors.", imageFormat.Info.Sectors); - DicConsole.DebugWriteLine("Ls command", "Image identifies disk type as {0}.", + AaruConsole.DebugWriteLine("Ls command", "Image identifies disk type as {0}.", imageFormat.Info.MediaType); Statistics.AddMediaFormat(imageFormat.Format); @@ -189,8 +189,8 @@ namespace Aaru.Commands.Filesystem } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); return(int)ErrorNumber.CannotOpenFormat; } @@ -203,30 +203,30 @@ namespace Aaru.Commands.Filesystem Errno error; if(partitions.Count == 0) - DicConsole.DebugWriteLine("Ls command", "No partitions found"); + AaruConsole.DebugWriteLine("Ls command", "No partitions found"); else { - DicConsole.WriteLine("{0} partitions found.", partitions.Count); + AaruConsole.WriteLine("{0} partitions found.", partitions.Count); for(int i = 0; i < partitions.Count; i++) { - DicConsole.WriteLine(); - DicConsole.WriteLine("Partition {0}:", partitions[i].Sequence); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Partition {0}:", partitions[i].Sequence); - DicConsole.WriteLine("Identifying filesystem on partition"); + AaruConsole.WriteLine("Identifying filesystem on partition"); Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, partitions[i]); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?. @@ -246,7 +246,7 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } @@ -257,7 +257,7 @@ namespace Aaru.Commands.Filesystem if(plugin == null) continue; - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] @@ -275,7 +275,7 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } } @@ -289,15 +289,15 @@ namespace Aaru.Commands.Filesystem Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.ReadOnlyFilesystems.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] @@ -315,7 +315,7 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } else @@ -324,7 +324,7 @@ namespace Aaru.Commands.Filesystem if(plugin != null) { - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); var fs = (IReadOnlyFilesystem)plugin. GetType().GetConstructor(Type.EmptyTypes)?.Invoke(new object[] @@ -341,15 +341,15 @@ namespace Aaru.Commands.Filesystem Statistics.AddFilesystem(fs.XmlFsType.Type); } else - DicConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); + AaruConsole.ErrorWriteLine("Unable to mount device, error {0}", error.ToString()); } } } } catch(Exception ex) { - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Ls command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Ls command", ex.StackTrace); return(int)ErrorNumber.UnexpectedException; } @@ -362,13 +362,13 @@ namespace Aaru.Commands.Filesystem if(path.StartsWith("/")) path = path.Substring(1); - DicConsole.WriteLine(string.IsNullOrEmpty(path) ? "Root directory" : $"Directory: {path}"); + AaruConsole.WriteLine(string.IsNullOrEmpty(path) ? "Root directory" : $"Directory: {path}"); Errno error = fs.ReadDir(path, out List directory); if(error != Errno.NoError) { - DicConsole.ErrorWriteLine("Error {0} reading root directory {1}", error.ToString(), path); + AaruConsole.ErrorWriteLine("Error {0} reading root directory {1}", error.ToString(), path); return; } @@ -389,10 +389,10 @@ namespace Aaru.Commands.Filesystem if(entry.Value != null) { if(entry.Value.Attributes.HasFlag(FileAttributes.Directory)) - DicConsole.WriteLine("{0, 10:d} {0, 12:T} {1, -20} {2}", entry.Value.CreationTimeUtc, + AaruConsole.WriteLine("{0, 10:d} {0, 12:T} {1, -20} {2}", entry.Value.CreationTimeUtc, "", entry.Key); else - DicConsole.WriteLine("{0, 10:d} {0, 12:T} {1, 6}{2, 14:##,#} {3}", + AaruConsole.WriteLine("{0, 10:d} {0, 12:T} {1, 6}{2, 14:##,#} {3}", entry.Value.CreationTimeUtc, entry.Value.Inode, entry.Value.Length, entry.Key); @@ -407,22 +407,22 @@ namespace Aaru.Commands.Filesystem error = fs.GetXattr(path + "/" + entry.Key, xattr, ref xattrBuf); if(error == Errno.NoError) - DicConsole.WriteLine("\t\t{0}\t{1:##,#}", xattr, xattrBuf.Length); + AaruConsole.WriteLine("\t\t{0}\t{1:##,#}", xattr, xattrBuf.Length); } } else - DicConsole.WriteLine("{0, 47}{1}", string.Empty, entry.Key); + AaruConsole.WriteLine("{0, 47}{1}", string.Empty, entry.Key); } else { if(entry.Value != null && entry.Value.Attributes.HasFlag(FileAttributes.Directory)) - DicConsole.WriteLine("{0}/", entry.Key); + AaruConsole.WriteLine("{0}/", entry.Key); else - DicConsole.WriteLine("{0}", entry.Key); + AaruConsole.WriteLine("{0}", entry.Key); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); foreach(KeyValuePair subdirectory in stats.Where(e => e.Value?.Attributes.HasFlag(FileAttributes.Directory) == true)) diff --git a/Aaru/Commands/Filesystem/Options.cs b/Aaru/Commands/Filesystem/Options.cs index 6635a3f2d..f08398c05 100644 --- a/Aaru/Commands/Filesystem/Options.cs +++ b/Aaru/Commands/Filesystem/Options.cs @@ -54,18 +54,18 @@ namespace Aaru.Commands.Filesystem MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; - DicConsole.DebugWriteLine("List-Options command", "--debug={0}", debug); - DicConsole.DebugWriteLine("List-Options command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("List-Options command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("List-Options command", "--verbose={0}", verbose); Statistics.AddCommand("list-options"); PluginBase plugins = GetPluginBase.Instance; - DicConsole.WriteLine("Read-only filesystems options:"); + AaruConsole.WriteLine("Read-only filesystems options:"); foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) { @@ -74,14 +74,14 @@ namespace Aaru.Commands.Filesystem if(options.Count == 0) continue; - DicConsole.WriteLine("\tOptions for {0}:", kvp.Value.Name); - DicConsole.WriteLine("\t\t{0,-16} {1,-16} {2,-8}", "Name", "Type", "Description"); + AaruConsole.WriteLine("\tOptions for {0}:", kvp.Value.Name); + AaruConsole.WriteLine("\t\t{0,-16} {1,-16} {2,-8}", "Name", "Type", "Description"); foreach((string name, Type type, string description) option in options.OrderBy(t => t.name)) - DicConsole.WriteLine("\t\t{0,-16} {1,-16} {2,-8}", option.name, TypeToString(option.type), + AaruConsole.WriteLine("\t\t{0,-16} {1,-16} {2,-8}", option.name, TypeToString(option.type), option.description); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } return(int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Formats.cs b/Aaru/Commands/Formats.cs index bf79bf8d6..dd9e8945f 100644 --- a/Aaru/Commands/Formats.cs +++ b/Aaru/Commands/Formats.cs @@ -54,38 +54,38 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("formats"); - DicConsole.DebugWriteLine("Formats command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Formats command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Formats command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Formats command", "--verbose={0}", verbose); PluginBase plugins = GetPluginBase.Instance; var filtersList = new FiltersList(); - DicConsole.WriteLine("Supported filters ({0}):", filtersList.Filters.Count); + AaruConsole.WriteLine("Supported filters ({0}):", filtersList.Filters.Count); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tFilter"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tFilter"); foreach(KeyValuePair kvp in filtersList.Filters) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Read-only media image formats ({0}):", + AaruConsole.WriteLine("Read-only media image formats ({0}):", plugins.ImagePluginsList.Count(t => !t.Value.GetType().GetInterfaces(). Contains(typeof(IWritableImage)))); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.ImagePluginsList.Where(t => !t.Value.GetType(). GetInterfaces(). @@ -93,30 +93,30 @@ namespace Aaru.Commands IWritableImage )))) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); - DicConsole.WriteLine(); - DicConsole.WriteLine("Read/write media image formats ({0}):", plugins.WritableImages.Count); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Read/write media image formats ({0}):", plugins.WritableImages.Count); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.WritableImages) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Supported filesystems for identification and information only ({0}):", + AaruConsole.WriteLine("Supported filesystems for identification and information only ({0}):", plugins.PluginsList.Count(t => !t.Value.GetType().GetInterfaces(). Contains(typeof(IReadOnlyFilesystem)))); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.PluginsList.Where(t => !t.Value.GetType(). GetInterfaces(). @@ -124,35 +124,35 @@ namespace Aaru.Commands IReadOnlyFilesystem )))) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); - DicConsole.WriteLine("Supported filesystems that can read their contents ({0}):", + AaruConsole.WriteLine("Supported filesystems that can read their contents ({0}):", plugins.ReadOnlyFilesystems.Count); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.ReadOnlyFilesystems) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); - DicConsole.WriteLine(); - DicConsole.WriteLine("Supported partitioning schemes ({0}):", plugins.PartPluginsList.Count); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Supported partitioning schemes ({0}):", plugins.PartPluginsList.Count); if(verbose) - DicConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); + AaruConsole.VerboseWriteLine("GUID\t\t\t\t\tPlugin"); foreach(KeyValuePair kvp in plugins.PartPluginsList) if(verbose) - DicConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); + AaruConsole.VerboseWriteLine("{0}\t{1}", kvp.Value.Id, kvp.Value.Name); else - DicConsole.WriteLine(kvp.Value.Name); + AaruConsole.WriteLine(kvp.Value.Name); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/Analyze.cs b/Aaru/Commands/Image/Analyze.cs index 204057969..f0812b7bc 100644 --- a/Aaru/Commands/Image/Analyze.cs +++ b/Aaru/Commands/Image/Analyze.cs @@ -86,26 +86,26 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("analyze"); - DicConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Analyze command", "--encoding={0}", encoding); - DicConsole.DebugWriteLine("Analyze command", "--filesystems={0}", filesystems); - DicConsole.DebugWriteLine("Analyze command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Analyze command", "--partitions={0}", partitions); - DicConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Analyze command", "--encoding={0}", encoding); + AaruConsole.DebugWriteLine("Analyze command", "--filesystems={0}", filesystems); + AaruConsole.DebugWriteLine("Analyze command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Analyze command", "--partitions={0}", partitions); + AaruConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -118,11 +118,11 @@ namespace Aaru.Commands.Image encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - DicConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); } catch(ArgumentException) { - DicConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine("Specified encoding is not supported."); return(int)ErrorNumber.EncodingUnknown; } @@ -137,25 +137,25 @@ namespace Aaru.Commands.Image if(imageFormat == null) { - DicConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, + AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); else - DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); try { if(!imageFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } @@ -163,7 +163,7 @@ namespace Aaru.Commands.Image if(verbose) { ImageInfo.PrintImageInfo(imageFormat); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } Statistics.AddMediaFormat(imageFormat.Format); @@ -172,9 +172,9 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); - DicConsole.DebugWriteLine("Analyze command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.DebugWriteLine("Analyze command", "Stack trace: {0}", ex.StackTrace); return(int)ErrorNumber.CannotOpenFormat; } @@ -190,11 +190,11 @@ namespace Aaru.Commands.Image if(partitionsList.Count == 0) { - DicConsole.DebugWriteLine("Analyze command", "No partitions found"); + AaruConsole.DebugWriteLine("Analyze command", "No partitions found"); if(!filesystems) { - DicConsole.WriteLine("No partitions founds, not searching for filesystems"); + AaruConsole.WriteLine("No partitions founds, not searching for filesystems"); return(int)ErrorNumber.NothingFound; } @@ -203,47 +203,47 @@ namespace Aaru.Commands.Image } else { - DicConsole.WriteLine("{0} partitions found.", partitionsList.Count); + AaruConsole.WriteLine("{0} partitions found.", partitionsList.Count); for(int i = 0; i < partitionsList.Count; i++) { - DicConsole.WriteLine(); - DicConsole.WriteLine("Partition {0}:", partitionsList[i].Sequence); - DicConsole.WriteLine("Partition name: {0}", partitionsList[i].Name); - DicConsole.WriteLine("Partition type: {0}", partitionsList[i].Type); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Partition {0}:", partitionsList[i].Sequence); + AaruConsole.WriteLine("Partition name: {0}", partitionsList[i].Name); + AaruConsole.WriteLine("Partition type: {0}", partitionsList[i].Type); - DicConsole.WriteLine("Partition start: sector {0}, byte {1}", partitionsList[i].Start, + AaruConsole.WriteLine("Partition start: sector {0}, byte {1}", partitionsList[i].Start, partitionsList[i].Offset); - DicConsole.WriteLine("Partition length: {0} sectors, {1} bytes", partitionsList[i].Length, + AaruConsole.WriteLine("Partition length: {0} sectors, {1} bytes", partitionsList[i].Length, partitionsList[i].Size); - DicConsole.WriteLine("Partition scheme: {0}", partitionsList[i].Scheme); - DicConsole.WriteLine("Partition description:"); - DicConsole.WriteLine(partitionsList[i].Description); + AaruConsole.WriteLine("Partition scheme: {0}", partitionsList[i].Scheme); + AaruConsole.WriteLine("Partition description:"); + AaruConsole.WriteLine(partitionsList[i].Description); if(!filesystems) continue; - DicConsole.WriteLine("Identifying filesystem on partition"); + AaruConsole.WriteLine("Identifying filesystem on partition"); Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, partitionsList[i]); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); plugin.GetInformation(imageFormat, partitionsList[i], out information, encodingClass); - DicConsole.Write(information); + AaruConsole.Write(information); Statistics.AddFilesystem(plugin.XmlFsType.Type); } } @@ -254,9 +254,9 @@ namespace Aaru.Commands.Image if(plugin == null) continue; - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); plugin.GetInformation(imageFormat, partitionsList[i], out information, encodingClass); - DicConsole.Write("{0}", information); + AaruConsole.Write("{0}", information); Statistics.AddFilesystem(plugin.XmlFsType.Type); } } @@ -274,17 +274,17 @@ namespace Aaru.Commands.Image Aaru.Core.Filesystems.Identify(imageFormat, out idPlugins, wholePart); if(idPlugins.Count == 0) - DicConsole.WriteLine("Filesystem not identified"); + AaruConsole.WriteLine("Filesystem not identified"); else if(idPlugins.Count > 1) { - DicConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); + AaruConsole.WriteLine($"Identified by {idPlugins.Count} plugins"); foreach(string pluginName in idPlugins) if(plugins.PluginsList.TryGetValue(pluginName, out plugin)) { - DicConsole.WriteLine($"As identified by {plugin.Name}."); + AaruConsole.WriteLine($"As identified by {plugin.Name}."); plugin.GetInformation(imageFormat, wholePart, out information, encodingClass); - DicConsole.Write(information); + AaruConsole.Write(information); Statistics.AddFilesystem(plugin.XmlFsType.Type); } } @@ -294,9 +294,9 @@ namespace Aaru.Commands.Image if(plugin != null) { - DicConsole.WriteLine($"Identified by {plugin.Name}."); + AaruConsole.WriteLine($"Identified by {plugin.Name}."); plugin.GetInformation(imageFormat, wholePart, out information, encodingClass); - DicConsole.Write(information); + AaruConsole.Write(information); Statistics.AddFilesystem(plugin.XmlFsType.Type); } } @@ -304,8 +304,8 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Analyze command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Analyze command", ex.StackTrace); return(int)ErrorNumber.UnexpectedException; } diff --git a/Aaru/Commands/Image/Checksum.cs b/Aaru/Commands/Image/Checksum.cs index fc3762717..16adfc694 100644 --- a/Aaru/Commands/Image/Checksum.cs +++ b/Aaru/Commands/Image/Checksum.cs @@ -159,37 +159,37 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("checksum"); - DicConsole.DebugWriteLine("Checksum command", "--adler32={0}", adler32); - DicConsole.DebugWriteLine("Checksum command", "--crc16={0}", crc16); - DicConsole.DebugWriteLine("Checksum command", "--crc32={0}", crc32); - DicConsole.DebugWriteLine("Checksum command", "--crc64={0}", crc64); - DicConsole.DebugWriteLine("Checksum command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Checksum command", "--fletcher16={0}", fletcher16); - DicConsole.DebugWriteLine("Checksum command", "--fletcher32={0}", fletcher32); - DicConsole.DebugWriteLine("Checksum command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Checksum command", "--md5={0}", md5); - DicConsole.DebugWriteLine("Checksum command", "--separated-tracks={0}", separatedTracks); - DicConsole.DebugWriteLine("Checksum command", "--sha1={0}", sha1); - DicConsole.DebugWriteLine("Checksum command", "--sha256={0}", sha256); - DicConsole.DebugWriteLine("Checksum command", "--sha384={0}", sha384); - DicConsole.DebugWriteLine("Checksum command", "--sha512={0}", sha512); - DicConsole.DebugWriteLine("Checksum command", "--spamsum={0}", spamSum); - DicConsole.DebugWriteLine("Checksum command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("Checksum command", "--whole-disc={0}", wholeDisc); + AaruConsole.DebugWriteLine("Checksum command", "--adler32={0}", adler32); + AaruConsole.DebugWriteLine("Checksum command", "--crc16={0}", crc16); + AaruConsole.DebugWriteLine("Checksum command", "--crc32={0}", crc32); + AaruConsole.DebugWriteLine("Checksum command", "--crc64={0}", crc64); + AaruConsole.DebugWriteLine("Checksum command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Checksum command", "--fletcher16={0}", fletcher16); + AaruConsole.DebugWriteLine("Checksum command", "--fletcher32={0}", fletcher32); + AaruConsole.DebugWriteLine("Checksum command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Checksum command", "--md5={0}", md5); + AaruConsole.DebugWriteLine("Checksum command", "--separated-tracks={0}", separatedTracks); + AaruConsole.DebugWriteLine("Checksum command", "--sha1={0}", sha1); + AaruConsole.DebugWriteLine("Checksum command", "--sha256={0}", sha256); + AaruConsole.DebugWriteLine("Checksum command", "--sha384={0}", sha384); + AaruConsole.DebugWriteLine("Checksum command", "--sha512={0}", sha512); + AaruConsole.DebugWriteLine("Checksum command", "--spamsum={0}", spamSum); + AaruConsole.DebugWriteLine("Checksum command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Checksum command", "--whole-disc={0}", wholeDisc); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -198,7 +198,7 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); + AaruConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); return(int)ErrorNumber.UnrecognizedFormat; } @@ -266,14 +266,14 @@ namespace Aaru.Commands.Image if(currentTrack.TrackStartSector - previousTrackEnd != 0 && wholeDisc) for(ulong i = previousTrackEnd + 1; i < currentTrack.TrackStartSector; i++) { - DicConsole.Write("\rHashing track-less sector {0}", i); + AaruConsole.Write("\rHashing track-less sector {0}", i); byte[] hiddenSector = inputFormat.ReadSector(i); mediaChecksum?.Update(hiddenSector); } - DicConsole.DebugWriteLine("Checksum command", + AaruConsole.DebugWriteLine("Checksum command", "Track {0} starts at sector {1} and ends at sector {2}", currentTrack.TrackSequence, currentTrack.TrackStartSector, currentTrack.TrackEndSector); @@ -283,7 +283,7 @@ namespace Aaru.Commands.Image ulong sectors = (currentTrack.TrackEndSector - currentTrack.TrackStartSector) + 1; ulong doneSectors = 0; - DicConsole.WriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, sectors); + AaruConsole.WriteLine("Track {0} has {1} sectors", currentTrack.TrackSequence, sectors); while(doneSectors < sectors) { @@ -294,7 +294,7 @@ namespace Aaru.Commands.Image sector = opticalInput.ReadSectors(doneSectors, SECTORS_TO_READ, currentTrack.TrackSequence); - DicConsole.Write("\rHashing sectors {0} to {2} of track {1}", doneSectors, + AaruConsole.Write("\rHashing sectors {0} to {2} of track {1}", doneSectors, currentTrack.TrackSequence, doneSectors + SECTORS_TO_READ); doneSectors += SECTORS_TO_READ; @@ -304,7 +304,7 @@ namespace Aaru.Commands.Image sector = opticalInput.ReadSectors(doneSectors, (uint)(sectors - doneSectors), currentTrack.TrackSequence); - DicConsole.Write("\rHashing sectors {0} to {2} of track {1}", doneSectors, + AaruConsole.Write("\rHashing sectors {0} to {2} of track {1}", doneSectors, currentTrack.TrackSequence, doneSectors + (sectors - doneSectors)); doneSectors += sectors - doneSectors; @@ -317,12 +317,12 @@ namespace Aaru.Commands.Image trackChecksum?.Update(sector); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); if(separatedTracks) if(trackChecksum != null) foreach(ChecksumType chk in trackChecksum.End()) - DicConsole.WriteLine("Track {0}'s {1}: {2}", currentTrack.TrackSequence, + AaruConsole.WriteLine("Track {0}'s {1}: {2}", currentTrack.TrackSequence, chk.type, chk.Value); previousTrackEnd = currentTrack.TrackEndSector; @@ -331,7 +331,7 @@ namespace Aaru.Commands.Image if(opticalInput.Info.Sectors - previousTrackEnd != 0 && wholeDisc) for(ulong i = previousTrackEnd + 1; i < opticalInput.Info.Sectors; i++) { - DicConsole.Write("\rHashing track-less sector {0}", i); + AaruConsole.Write("\rHashing track-less sector {0}", i); byte[] hiddenSector = inputFormat.ReadSector(i); mediaChecksum?.Update(hiddenSector); @@ -340,14 +340,14 @@ namespace Aaru.Commands.Image if(wholeDisc) if(mediaChecksum != null) foreach(ChecksumType chk in mediaChecksum.End()) - DicConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value); + AaruConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value); } catch(Exception ex) { if(debug) - DicConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); + AaruConsole.DebugWriteLine("Could not get tracks because {0}", ex.Message); else - DicConsole.WriteLine("Unable to get separate tracks, not checksumming them"); + AaruConsole.WriteLine("Unable to get separate tracks, not checksumming them"); } break; @@ -366,14 +366,14 @@ namespace Aaru.Commands.Image if(currentFile.FirstBlock - previousTrackEnd != 0 && wholeDisc) for(ulong i = previousTrackEnd + 1; i < currentFile.FirstBlock; i++) { - DicConsole.Write("\rHashing file-less block {0}", i); + AaruConsole.Write("\rHashing file-less block {0}", i); byte[] hiddenSector = inputFormat.ReadSector(i); mediaChecksum?.Update(hiddenSector); } - DicConsole.DebugWriteLine("Checksum command", + AaruConsole.DebugWriteLine("Checksum command", "Track {0} starts at sector {1} and ends at block {2}", currentFile.File, currentFile.FirstBlock, currentFile.LastBlock); @@ -382,7 +382,7 @@ namespace Aaru.Commands.Image ulong sectors = (currentFile.LastBlock - currentFile.FirstBlock) + 1; ulong doneSectors = 0; - DicConsole.WriteLine("File {0} has {1} sectors", currentFile.File, sectors); + AaruConsole.WriteLine("File {0} has {1} sectors", currentFile.File, sectors); while(doneSectors < sectors) { @@ -392,7 +392,7 @@ namespace Aaru.Commands.Image { sector = tapeImage.ReadSectors(doneSectors + currentFile.FirstBlock, SECTORS_TO_READ); - DicConsole.Write("\rHashing blocks {0} to {2} of file {1}", doneSectors, + AaruConsole.Write("\rHashing blocks {0} to {2} of file {1}", doneSectors, currentFile.File, doneSectors + SECTORS_TO_READ); doneSectors += SECTORS_TO_READ; @@ -402,7 +402,7 @@ namespace Aaru.Commands.Image sector = tapeImage.ReadSectors(doneSectors + currentFile.FirstBlock, (uint)(sectors - doneSectors)); - DicConsole.Write("\rHashing blocks {0} to {2} of file {1}", doneSectors, + AaruConsole.Write("\rHashing blocks {0} to {2} of file {1}", doneSectors, currentFile.File, doneSectors + (sectors - doneSectors)); doneSectors += sectors - doneSectors; @@ -415,12 +415,12 @@ namespace Aaru.Commands.Image trackChecksum?.Update(sector); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); if(separatedTracks) if(trackChecksum != null) foreach(ChecksumType chk in trackChecksum.End()) - DicConsole.WriteLine("File {0}'s {1}: {2}", currentFile.File, chk.type, chk.Value); + AaruConsole.WriteLine("File {0}'s {1}: {2}", currentFile.File, chk.type, chk.Value); previousTrackEnd = currentFile.LastBlock; } @@ -428,7 +428,7 @@ namespace Aaru.Commands.Image if(tapeImage.Info.Sectors - previousTrackEnd != 0 && wholeDisc) for(ulong i = previousTrackEnd + 1; i < tapeImage.Info.Sectors; i++) { - DicConsole.Write("\rHashing file-less sector {0}", i); + AaruConsole.Write("\rHashing file-less sector {0}", i); byte[] hiddenSector = inputFormat.ReadSector(i); mediaChecksum?.Update(hiddenSector); @@ -437,7 +437,7 @@ namespace Aaru.Commands.Image if(wholeDisc) if(mediaChecksum != null) foreach(ChecksumType chk in mediaChecksum.End()) - DicConsole.WriteLine("Tape's {0}: {1}", chk.type, chk.Value); + AaruConsole.WriteLine("Tape's {0}: {1}", chk.type, chk.Value); break; } @@ -447,7 +447,7 @@ namespace Aaru.Commands.Image mediaChecksum = new Checksum(enabledChecksums); ulong sectors = inputFormat.Info.Sectors; - DicConsole.WriteLine("Sectors {0}", sectors); + AaruConsole.WriteLine("Sectors {0}", sectors); ulong doneSectors = 0; while(doneSectors < sectors) @@ -458,7 +458,7 @@ namespace Aaru.Commands.Image { sector = inputFormat.ReadSectors(doneSectors, SECTORS_TO_READ); - DicConsole.Write("\rHashing sectors {0} to {1}", doneSectors, + AaruConsole.Write("\rHashing sectors {0} to {1}", doneSectors, doneSectors + SECTORS_TO_READ); doneSectors += SECTORS_TO_READ; @@ -467,7 +467,7 @@ namespace Aaru.Commands.Image { sector = inputFormat.ReadSectors(doneSectors, (uint)(sectors - doneSectors)); - DicConsole.Write("\rHashing sectors {0} to {1}", doneSectors, + AaruConsole.Write("\rHashing sectors {0} to {1}", doneSectors, doneSectors + (sectors - doneSectors)); doneSectors += sectors - doneSectors; @@ -476,10 +476,10 @@ namespace Aaru.Commands.Image mediaChecksum.Update(sector); } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); foreach(ChecksumType chk in mediaChecksum.End()) - DicConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value); + AaruConsole.WriteLine("Disk's {0}: {1}", chk.type, chk.Value); break; } diff --git a/Aaru/Commands/Image/Compare.cs b/Aaru/Commands/Image/Compare.cs index da028b57d..45f4a0fe8 100644 --- a/Aaru/Commands/Image/Compare.cs +++ b/Aaru/Commands/Image/Compare.cs @@ -69,17 +69,17 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("compare"); - DicConsole.DebugWriteLine("Compare command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Compare command", "--input1={0}", imagePath1); - DicConsole.DebugWriteLine("Compare command", "--input2={0}", imagePath2); - DicConsole.DebugWriteLine("Compare command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Compare command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Compare command", "--input1={0}", imagePath1); + AaruConsole.DebugWriteLine("Compare command", "--input2={0}", imagePath2); + AaruConsole.DebugWriteLine("Compare command", "--verbose={0}", verbose); var filtersList = new FiltersList(); IFilter inputFilter1 = filtersList.GetFilter(imagePath1); @@ -88,14 +88,14 @@ namespace Aaru.Commands.Image if(inputFilter1 == null) { - DicConsole.ErrorWriteLine("Cannot open input file 1"); + AaruConsole.ErrorWriteLine("Cannot open input file 1"); return(int)ErrorNumber.CannotOpenFile; } if(inputFilter2 == null) { - DicConsole.ErrorWriteLine("Cannot open input file 2"); + AaruConsole.ErrorWriteLine("Cannot open input file 2"); return(int)ErrorNumber.CannotOpenFile; } @@ -105,29 +105,29 @@ namespace Aaru.Commands.Image if(input1Format == null) { - DicConsole.ErrorWriteLine("Input file 1 format not identified, not proceeding with comparison."); + AaruConsole.ErrorWriteLine("Input file 1 format not identified, not proceeding with comparison."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Input file 1 format identified by {0} ({1}).", input1Format.Name, + AaruConsole.VerboseWriteLine("Input file 1 format identified by {0} ({1}).", input1Format.Name, input1Format.Id); else - DicConsole.WriteLine("Input file 1 format identified by {0}.", input1Format.Name); + AaruConsole.WriteLine("Input file 1 format identified by {0}.", input1Format.Name); if(input2Format == null) { - DicConsole.ErrorWriteLine("Input file 2 format not identified, not proceeding with comparison."); + AaruConsole.ErrorWriteLine("Input file 2 format not identified, not proceeding with comparison."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Input file 2 format identified by {0} ({1}).", input2Format.Name, + AaruConsole.VerboseWriteLine("Input file 2 format identified by {0} ({1}).", input2Format.Name, input2Format.Id); else - DicConsole.WriteLine("Input file 2 format identified by {0}.", input2Format.Name); + AaruConsole.WriteLine("Input file 2 format identified by {0}.", input2Format.Name); input1Format.Open(inputFilter1); input2Format.Open(inputFilter2); @@ -258,7 +258,7 @@ namespace Aaru.Commands.Image image2DiskTags.ContainsKey(disktag)).AppendLine(); } - DicConsole.WriteLine("Comparing disk image characteristics"); + AaruConsole.WriteLine("Comparing disk image characteristics"); if(image1Info.HasPartitions != image2Info.HasPartitions) { @@ -321,11 +321,11 @@ namespace Aaru.Commands.Image else leastSectors = image1Info.Sectors; - DicConsole.WriteLine("Comparing sectors..."); + AaruConsole.WriteLine("Comparing sectors..."); for(ulong sector = 0; sector < leastSectors; sector++) { - DicConsole.Write("\rComparing sector {0} of {1}...", sector + 1, leastSectors); + AaruConsole.Write("\rComparing sector {0} of {1}...", sector + 1, leastSectors); try { @@ -355,11 +355,11 @@ namespace Aaru.Commands.Image #pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); sb.AppendLine(imagesDiffer ? "Images differ" : "Images do not differ"); - DicConsole.WriteLine(sb.ToString()); + AaruConsole.WriteLine(sb.ToString()); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/Convert.cs b/Aaru/Commands/Image/Convert.cs index 732b0ff53..3ae3acb70 100644 --- a/Aaru/Commands/Image/Convert.cs +++ b/Aaru/Commands/Image/Convert.cs @@ -201,47 +201,47 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("convert-image"); - DicConsole.DebugWriteLine("Analyze command", "--cicm-xml={0}", cicmXml); - DicConsole.DebugWriteLine("Analyze command", "--comments={0}", comments); - DicConsole.DebugWriteLine("Analyze command", "--count={0}", count); - DicConsole.DebugWriteLine("Analyze command", "--creator={0}", creator); - DicConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Analyze command", "--drive-manufacturer={0}", driveManufacturer); - DicConsole.DebugWriteLine("Analyze command", "--drive-model={0}", driveModel); - DicConsole.DebugWriteLine("Analyze command", "--drive-revision={0}", driveFirmwareRevision); - DicConsole.DebugWriteLine("Analyze command", "--drive-serial={0}", driveSerialNumber); - DicConsole.DebugWriteLine("Analyze command", "--force={0}", force); - DicConsole.DebugWriteLine("Analyze command", "--format={0}", format); - DicConsole.DebugWriteLine("Analyze command", "--input={0}", inputPath); - DicConsole.DebugWriteLine("Analyze command", "--media-barcode={0}", mediaBarcode); - DicConsole.DebugWriteLine("Analyze command", "--media-lastsequence={0}", lastMediaSequence); - DicConsole.DebugWriteLine("Analyze command", "--media-manufacturer={0}", mediaManufacturer); - DicConsole.DebugWriteLine("Analyze command", "--media-model={0}", mediaModel); - DicConsole.DebugWriteLine("Analyze command", "--media-partnumber={0}", mediaPartNumber); - DicConsole.DebugWriteLine("Analyze command", "--media-sequence={0}", mediaSequence); - DicConsole.DebugWriteLine("Analyze command", "--media-serial={0}", mediaSerialNumber); - DicConsole.DebugWriteLine("Analyze command", "--media-title={0}", mediaTitle); - DicConsole.DebugWriteLine("Analyze command", "--options={0}", outputOptions); - DicConsole.DebugWriteLine("Analyze command", "--output={0}", outputPath); - DicConsole.DebugWriteLine("Analyze command", "--resume-file={0}", resumeFile); - DicConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Analyze command", "--cicm-xml={0}", cicmXml); + AaruConsole.DebugWriteLine("Analyze command", "--comments={0}", comments); + AaruConsole.DebugWriteLine("Analyze command", "--count={0}", count); + AaruConsole.DebugWriteLine("Analyze command", "--creator={0}", creator); + AaruConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Analyze command", "--drive-manufacturer={0}", driveManufacturer); + AaruConsole.DebugWriteLine("Analyze command", "--drive-model={0}", driveModel); + AaruConsole.DebugWriteLine("Analyze command", "--drive-revision={0}", driveFirmwareRevision); + AaruConsole.DebugWriteLine("Analyze command", "--drive-serial={0}", driveSerialNumber); + AaruConsole.DebugWriteLine("Analyze command", "--force={0}", force); + AaruConsole.DebugWriteLine("Analyze command", "--format={0}", format); + AaruConsole.DebugWriteLine("Analyze command", "--input={0}", inputPath); + AaruConsole.DebugWriteLine("Analyze command", "--media-barcode={0}", mediaBarcode); + AaruConsole.DebugWriteLine("Analyze command", "--media-lastsequence={0}", lastMediaSequence); + AaruConsole.DebugWriteLine("Analyze command", "--media-manufacturer={0}", mediaManufacturer); + AaruConsole.DebugWriteLine("Analyze command", "--media-model={0}", mediaModel); + AaruConsole.DebugWriteLine("Analyze command", "--media-partnumber={0}", mediaPartNumber); + AaruConsole.DebugWriteLine("Analyze command", "--media-sequence={0}", mediaSequence); + AaruConsole.DebugWriteLine("Analyze command", "--media-serial={0}", mediaSerialNumber); + AaruConsole.DebugWriteLine("Analyze command", "--media-title={0}", mediaTitle); + AaruConsole.DebugWriteLine("Analyze command", "--options={0}", outputOptions); + AaruConsole.DebugWriteLine("Analyze command", "--output={0}", outputPath); + AaruConsole.DebugWriteLine("Analyze command", "--resume-file={0}", resumeFile); + AaruConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); Dictionary parsedOptions = Aaru.Core.Options.Parse(outputOptions); - DicConsole.DebugWriteLine("Analyze command", "Parsed options:"); + AaruConsole.DebugWriteLine("Analyze command", "Parsed options:"); foreach(KeyValuePair parsedOption in parsedOptions) - DicConsole.DebugWriteLine("Analyze command", "{0} = {1}", parsedOption.Key, parsedOption.Value); + AaruConsole.DebugWriteLine("Analyze command", "{0} = {1}", parsedOption.Key, parsedOption.Value); if(count == 0) { - DicConsole.ErrorWriteLine("Need to specify more than 0 sectors to copy at once"); + AaruConsole.ErrorWriteLine("Need to specify more than 0 sectors to copy at once"); return(int)ErrorNumber.InvalidArgument; } @@ -262,14 +262,14 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); - DicConsole.DebugWriteLine("Image conversion", $"{ex}"); + AaruConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); + AaruConsole.DebugWriteLine("Image conversion", $"{ex}"); return(int)ErrorNumber.InvalidSidecar; } else { - DicConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); + AaruConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); return(int)ErrorNumber.FileNotFound; } @@ -286,14 +286,14 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); - DicConsole.DebugWriteLine("Image conversion", $"{ex}"); + AaruConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); + AaruConsole.DebugWriteLine("Image conversion", $"{ex}"); return(int)ErrorNumber.InvalidResume; } else { - DicConsole.ErrorWriteLine("Could not find resume file, not continuing..."); + AaruConsole.ErrorWriteLine("Could not find resume file, not continuing..."); return(int)ErrorNumber.FileNotFound; } @@ -303,14 +303,14 @@ namespace Aaru.Commands.Image if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } if(File.Exists(outputPath)) { - DicConsole.ErrorWriteLine("Output file already exists, not continuing."); + AaruConsole.ErrorWriteLine("Output file already exists, not continuing."); return(int)ErrorNumber.DestinationExists; } @@ -320,23 +320,23 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.WriteLine("Input image format not identified, not proceeding with conversion."); + AaruConsole.WriteLine("Input image format not identified, not proceeding with conversion."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Input image format identified by {0} ({1}).", inputFormat.Name, + AaruConsole.VerboseWriteLine("Input image format identified by {0} ({1}).", inputFormat.Name, inputFormat.Id); else - DicConsole.WriteLine("Input image format identified by {0}.", inputFormat.Name); + AaruConsole.WriteLine("Input image format identified by {0}.", inputFormat.Name); try { if(!inputFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } @@ -362,14 +362,14 @@ namespace Aaru.Commands.Image } #pragma warning restore 612 - DicConsole.DebugWriteLine("Convert-image command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Convert-image command", "Correctly opened image file."); - DicConsole.DebugWriteLine("Convert-image command", "Image without headers is {0} bytes.", + AaruConsole.DebugWriteLine("Convert-image command", "Image without headers is {0} bytes.", inputFormat.Info.ImageSize); - DicConsole.DebugWriteLine("Convert-image command", "Image has {0} sectors.", inputFormat.Info.Sectors); + AaruConsole.DebugWriteLine("Convert-image command", "Image has {0} sectors.", inputFormat.Info.Sectors); - DicConsole.DebugWriteLine("Convert-image command", "Image identifies media type as {0}.", mediaType); + AaruConsole.DebugWriteLine("Convert-image command", "Image identifies media type as {0}.", mediaType); Statistics.AddMediaFormat(inputFormat.Format); Statistics.AddMedia(mediaType, false); @@ -377,9 +377,9 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); - DicConsole.DebugWriteLine("Convert-image command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.DebugWriteLine("Convert-image command", "Stack trace: {0}", ex.StackTrace); return(int)ErrorNumber.CannotOpenFormat; } @@ -404,14 +404,14 @@ namespace Aaru.Commands.Image if(candidates.Count == 0) { - DicConsole.WriteLine("No plugin supports requested extension."); + AaruConsole.WriteLine("No plugin supports requested extension."); return(int)ErrorNumber.FormatNotFound; } if(candidates.Count > 1) { - DicConsole.WriteLine("More than one plugin supports requested extension."); + AaruConsole.WriteLine("More than one plugin supports requested extension."); return(int)ErrorNumber.TooManyFormats; } @@ -419,13 +419,13 @@ namespace Aaru.Commands.Image IWritableImage outputFormat = candidates[0]; if(verbose) - DicConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); + AaruConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); else - DicConsole.WriteLine("Output image format: {0}.", outputFormat.Name); + AaruConsole.WriteLine("Output image format: {0}.", outputFormat.Name); if(!outputFormat.SupportedMediaTypes.Contains(mediaType)) { - DicConsole.ErrorWriteLine("Output format does not support media type, cannot continue..."); + AaruConsole.ErrorWriteLine("Output format does not support media type, cannot continue..."); return(int)ErrorNumber.UnsupportedMedia; } @@ -435,8 +435,8 @@ namespace Aaru.Commands.Image if(outputFormat.SupportedMediaTags.Contains(mediaTag) || force) continue; - DicConsole.ErrorWriteLine("Converting image will lose media tag {0}, not continuing...", mediaTag); - DicConsole.ErrorWriteLine("If you don't care, use force option."); + AaruConsole.ErrorWriteLine("Converting image will lose media tag {0}, not continuing...", mediaTag); + AaruConsole.ErrorWriteLine("If you don't care, use force option."); return(int)ErrorNumber.DataWillBeLost; } @@ -458,9 +458,9 @@ namespace Aaru.Commands.Image continue; } - DicConsole.ErrorWriteLine("Converting image will lose sector tag {0}, not continuing...", sectorTag); + AaruConsole.ErrorWriteLine("Converting image will lose sector tag {0}, not continuing...", sectorTag); - DicConsole. + AaruConsole. ErrorWriteLine("If you don't care, use force option. This will skip all sector tags converting only user data."); return(int)ErrorNumber.DataWillBeLost; @@ -469,7 +469,7 @@ namespace Aaru.Commands.Image if(!outputFormat.Create(outputPath, mediaType, parsedOptions, inputFormat.Info.Sectors, inputFormat.Info.SectorSize)) { - DicConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine("Error {0} creating output image.", outputFormat.ErrorMessage); return(int)ErrorNumber.CannotCreateFormat; } @@ -496,16 +496,16 @@ namespace Aaru.Commands.Image if(!outputFormat.SetMetadata(metadata)) { - DicConsole.ErrorWrite("Error {0} setting metadata, ", outputFormat.ErrorMessage); + AaruConsole.ErrorWrite("Error {0} setting metadata, ", outputFormat.ErrorMessage); if(!force) { - DicConsole.ErrorWriteLine("not continuing..."); + AaruConsole.ErrorWriteLine("not continuing..."); return(int)ErrorNumber.WriteError; } - DicConsole.ErrorWriteLine("continuing..."); + AaruConsole.ErrorWriteLine("continuing..."); } CICMMetadataType cicmMetadata = inputFormat.CicmMetadata; @@ -516,24 +516,24 @@ namespace Aaru.Commands.Image if(force && !outputFormat.SupportedMediaTags.Contains(mediaTag)) continue; - DicConsole.WriteLine("Converting media tag {0}", mediaTag); + AaruConsole.WriteLine("Converting media tag {0}", mediaTag); byte[] tag = inputFormat.ReadDiskTag(mediaTag); if(outputFormat.WriteMediaTag(tag, mediaTag)) continue; if(force) - DicConsole.ErrorWriteLine("Error {0} writing media tag, continuing...", outputFormat.ErrorMessage); + AaruConsole.ErrorWriteLine("Error {0} writing media tag, continuing...", outputFormat.ErrorMessage); else { - DicConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing media tag, not continuing...", outputFormat.ErrorMessage); return(int)ErrorNumber.WriteError; } } - DicConsole.WriteLine("{0} sectors to convert", inputFormat.Info.Sectors); + AaruConsole.WriteLine("{0} sectors to convert", inputFormat.Info.Sectors); ulong doneSectors = 0; if(inputFormat is IOpticalMediaImage inputOptical && @@ -542,7 +542,7 @@ namespace Aaru.Commands.Image { if(!outputOptical.SetTracks(inputOptical.Tracks)) { - DicConsole.ErrorWriteLine("Error {0} sending tracks list to output image.", + AaruConsole.ErrorWriteLine("Error {0} sending tracks list to output image.", outputFormat.ErrorMessage); return(int)ErrorNumber.WriteError; @@ -564,7 +564,7 @@ namespace Aaru.Commands.Image else sectorsToDo = (uint)(trackSectors - doneSectors); - DicConsole.Write("\rConverting sectors {0} to {1} in track {3} ({2:P2} done)", + AaruConsole.Write("\rConverting sectors {0} to {1} in track {3} ({2:P2} done)", doneSectors + track.TrackStartSector, doneSectors + sectorsToDo + track.TrackStartSector, (doneSectors + track.TrackStartSector) / (double)inputFormat.Info.Sectors, @@ -603,11 +603,11 @@ namespace Aaru.Commands.Image if(!result) if(force) - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); else { - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return(int)ErrorNumber.WriteError; @@ -617,10 +617,10 @@ namespace Aaru.Commands.Image } } - DicConsole.Write("\rConverting sectors {0} to {1} in track {3} ({2:P2} done)", inputFormat.Info.Sectors, + AaruConsole.Write("\rConverting sectors {0} to {1} in track {3} ({2:P2} done)", inputFormat.Info.Sectors, inputFormat.Info.Sectors, 1.0, inputOptical.Tracks.Count); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); foreach(SectorTagType tag in inputFormat.Info.ReadableSectorTags.OrderBy(t => t)) { @@ -655,7 +655,7 @@ namespace Aaru.Commands.Image { case SectorTagType.CdTrackFlags: case SectorTagType.CdTrackIsrc: - DicConsole.Write("\rConverting tag {0} in track {1} ({2:P2} done).", tag, + AaruConsole.Write("\rConverting tag {0} in track {1} ({2:P2} done).", tag, track.TrackSequence, track.TrackSequence / (double)inputOptical.Tracks.Count); @@ -664,11 +664,11 @@ namespace Aaru.Commands.Image if(!result) if(force) - DicConsole.ErrorWriteLine("Error {0} writing tag, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag, continuing...", outputFormat.ErrorMessage); else { - DicConsole.ErrorWriteLine("Error {0} writing tag, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag, not continuing...", outputFormat.ErrorMessage); return(int)ErrorNumber.WriteError; @@ -686,7 +686,7 @@ namespace Aaru.Commands.Image else sectorsToDo = (uint)(trackSectors - doneSectors); - DicConsole.Write("\rConverting tag {4} for sectors {0} to {1} in track {3} ({2:P2} done)", + AaruConsole.Write("\rConverting tag {4} for sectors {0} to {1} in track {3} ({2:P2} done)", doneSectors + track.TrackStartSector, doneSectors + sectorsToDo + track.TrackStartSector, (doneSectors + track.TrackStartSector) / (double)inputFormat.Info.Sectors, @@ -708,11 +708,11 @@ namespace Aaru.Commands.Image if(!result) if(force) - DicConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); else { - DicConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing tag for sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return(int)ErrorNumber.WriteError; @@ -726,30 +726,30 @@ namespace Aaru.Commands.Image { case SectorTagType.CdTrackFlags: case SectorTagType.CdTrackIsrc: - DicConsole.Write("\rConverting tag {0} in track {1} ({2:P2} done).", tag, + AaruConsole.Write("\rConverting tag {0} in track {1} ({2:P2} done).", tag, inputOptical.Tracks.Count, 1.0); break; default: - DicConsole.Write("\rConverting tag {4} for sectors {0} to {1} in track {3} ({2:P2} done)", + AaruConsole.Write("\rConverting tag {4} for sectors {0} to {1} in track {3} ({2:P2} done)", inputFormat.Info.Sectors, inputFormat.Info.Sectors, 1.0, inputOptical.Tracks.Count, tag); break; } - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } else { - DicConsole.WriteLine("Setting geometry to {0} cylinders, {1} heads and {2} sectors per track", + AaruConsole.WriteLine("Setting geometry to {0} cylinders, {1} heads and {2} sectors per track", inputFormat.Info.Cylinders, inputFormat.Info.Heads, inputFormat.Info.SectorsPerTrack); if(!outputFormat.SetGeometry(inputFormat.Info.Cylinders, inputFormat.Info.Heads, inputFormat.Info.SectorsPerTrack)) - DicConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...", + AaruConsole.ErrorWriteLine("Error {0} setting geometry, image may be incorrect, continuing...", outputFormat.ErrorMessage); while(doneSectors < inputFormat.Info.Sectors) @@ -763,7 +763,7 @@ namespace Aaru.Commands.Image else sectorsToDo = (uint)(inputFormat.Info.Sectors - doneSectors); - DicConsole.Write("\rConverting sectors {0} to {1} ({2:P2} done)", doneSectors, + AaruConsole.Write("\rConverting sectors {0} to {1} ({2:P2} done)", doneSectors, doneSectors + sectorsToDo, doneSectors / (double)inputFormat.Info.Sectors); bool result; @@ -795,11 +795,11 @@ namespace Aaru.Commands.Image if(!result) if(force) - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); else { - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return(int)ErrorNumber.WriteError; @@ -808,10 +808,10 @@ namespace Aaru.Commands.Image doneSectors += sectorsToDo; } - DicConsole.Write("\rConverting sectors {0} to {1} ({2:P2} done)", inputFormat.Info.Sectors, + AaruConsole.Write("\rConverting sectors {0} to {1} ({2:P2} done)", inputFormat.Info.Sectors, inputFormat.Info.Sectors, 1.0); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); foreach(SectorTagType tag in inputFormat.Info.ReadableSectorTags) { @@ -848,7 +848,7 @@ namespace Aaru.Commands.Image else sectorsToDo = (uint)(inputFormat.Info.Sectors - doneSectors); - DicConsole.Write("\rConverting tag {2} for sectors {0} to {1} ({2:P2} done)", doneSectors, + AaruConsole.Write("\rConverting tag {2} for sectors {0} to {1} ({2:P2} done)", doneSectors, doneSectors + sectorsToDo, doneSectors / (double)inputFormat.Info.Sectors, tag); @@ -867,11 +867,11 @@ namespace Aaru.Commands.Image if(!result) if(force) - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, continuing...", outputFormat.ErrorMessage, doneSectors); else { - DicConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", + AaruConsole.ErrorWriteLine("Error {0} writing sector {1}, not continuing...", outputFormat.ErrorMessage, doneSectors); return(int)ErrorNumber.WriteError; @@ -880,10 +880,10 @@ namespace Aaru.Commands.Image doneSectors += sectorsToDo; } - DicConsole.Write("\rConverting tag {2} for sectors {0} to {1} ({2:P2} done)", + AaruConsole.Write("\rConverting tag {2} for sectors {0} to {1} ({2:P2} done)", inputFormat.Info.Sectors, inputFormat.Info.Sectors, 1.0, tag); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } } @@ -898,7 +898,7 @@ namespace Aaru.Commands.Image ret = outputFormat.SetDumpHardware(dumpHardware); if(ret) - DicConsole.WriteLine("Written dump hardware list to output image."); + AaruConsole.WriteLine("Written dump hardware list to output image."); } ret = false; @@ -912,17 +912,17 @@ namespace Aaru.Commands.Image ret = outputFormat.SetCicmMetadata(cicmMetadata); if(ret) - DicConsole.WriteLine("Written CICM XML metadata to output image."); + AaruConsole.WriteLine("Written CICM XML metadata to output image."); } - DicConsole.WriteLine("Closing output image."); + AaruConsole.WriteLine("Closing output image."); if(!outputFormat.Close()) - DicConsole.ErrorWriteLine("Error {0} closing output image... Contents are not correct.", + AaruConsole.ErrorWriteLine("Error {0} closing output image... Contents are not correct.", outputFormat.ErrorMessage); - DicConsole.WriteLine(); - DicConsole.WriteLine("Conversion done."); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Conversion done."); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/CreateSidecar.cs b/Aaru/Commands/Image/CreateSidecar.cs index 30c36a290..50f60d6a9 100644 --- a/Aaru/Commands/Image/CreateSidecar.cs +++ b/Aaru/Commands/Image/CreateSidecar.cs @@ -91,19 +91,19 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("create-sidecar"); - DicConsole.DebugWriteLine("Create sidecar command", "--block-size={0}", blockSize); - DicConsole.DebugWriteLine("Create sidecar command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Create sidecar command", "--encoding={0}", encodingName); - DicConsole.DebugWriteLine("Create sidecar command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Create sidecar command", "--tape={0}", tape); - DicConsole.DebugWriteLine("Create sidecar command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Create sidecar command", "--block-size={0}", blockSize); + AaruConsole.DebugWriteLine("Create sidecar command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Create sidecar command", "--encoding={0}", encodingName); + AaruConsole.DebugWriteLine("Create sidecar command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Create sidecar command", "--tape={0}", tape); + AaruConsole.DebugWriteLine("Create sidecar command", "--verbose={0}", verbose); Encoding encodingClass = null; @@ -113,11 +113,11 @@ namespace Aaru.Commands.Image encodingClass = Claunia.Encoding.Encoding.GetEncoding(encodingName); if(verbose) - DicConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); } catch(ArgumentException) { - DicConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine("Specified encoding is not supported."); return(int)ErrorNumber.EncodingUnknown; } @@ -126,7 +126,7 @@ namespace Aaru.Commands.Image { if(tape) { - DicConsole.ErrorWriteLine("You cannot use --tape option when input is a file."); + AaruConsole.ErrorWriteLine("You cannot use --tape option when input is a file."); return(int)ErrorNumber.ExpectedDirectory; } @@ -136,7 +136,7 @@ namespace Aaru.Commands.Image if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -147,33 +147,33 @@ namespace Aaru.Commands.Image if(imageFormat == null) { - DicConsole.WriteLine("Image format not identified, not proceeding with analysis."); + AaruConsole.WriteLine("Image format not identified, not proceeding with analysis."); return(int)ErrorNumber.UnrecognizedFormat; } if(verbose) - DicConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, + AaruConsole.VerboseWriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); else - DicConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); + AaruConsole.WriteLine("Image format identified by {0}.", imageFormat.Name); try { if(!imageFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } - DicConsole.DebugWriteLine("Analyze command", "Correctly opened image file."); + AaruConsole.DebugWriteLine("Analyze command", "Correctly opened image file."); } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); return(int)ErrorNumber.CannotOpenFormat; } @@ -198,7 +198,7 @@ namespace Aaru.Commands.Image CICMMetadataType sidecar = sidecarClass.Create(); - DicConsole.WriteLine("Writing metadata sidecar"); + AaruConsole.WriteLine("Writing metadata sidecar"); var xmlFs = new @@ -211,8 +211,8 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Analyze command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Analyze command", ex.StackTrace); return(int)ErrorNumber.UnexpectedException; } @@ -221,7 +221,7 @@ namespace Aaru.Commands.Image { if(!tape) { - DicConsole.ErrorWriteLine("Cannot create a sidecar from a directory."); + AaruConsole.ErrorWriteLine("Cannot create a sidecar from a directory."); return(int)ErrorNumber.ExpectedFile; } @@ -241,7 +241,7 @@ namespace Aaru.Commands.Image sidecarClass.UpdateStatusEvent += Progress.UpdateStatus; CICMMetadataType sidecar = sidecarClass.BlockTape(Path.GetFileName(imagePath), files, blockSize); - DicConsole.WriteLine("Writing metadata sidecar"); + AaruConsole.WriteLine("Writing metadata sidecar"); var xmlFs = new @@ -253,7 +253,7 @@ namespace Aaru.Commands.Image xmlFs.Close(); } else - DicConsole.ErrorWriteLine("The specified input file cannot be found."); + AaruConsole.ErrorWriteLine("The specified input file cannot be found."); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/Image/Decode.cs b/Aaru/Commands/Image/Decode.cs index b874bf95f..5f5e0d58b 100644 --- a/Aaru/Commands/Image/Decode.cs +++ b/Aaru/Commands/Image/Decode.cs @@ -93,27 +93,27 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("decode"); - DicConsole.DebugWriteLine("Decode command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Decode command", "--disk-tags={0}", diskTags); - DicConsole.DebugWriteLine("Decode command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Decode command", "--length={0}", length); - DicConsole.DebugWriteLine("Decode command", "--sector-tags={0}", sectorTags); - DicConsole.DebugWriteLine("Decode command", "--start={0}", startSector); - DicConsole.DebugWriteLine("Decode command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Decode command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Decode command", "--disk-tags={0}", diskTags); + AaruConsole.DebugWriteLine("Decode command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Decode command", "--length={0}", length); + AaruConsole.DebugWriteLine("Decode command", "--sector-tags={0}", sectorTags); + AaruConsole.DebugWriteLine("Decode command", "--start={0}", startSector); + AaruConsole.DebugWriteLine("Decode command", "--verbose={0}", verbose); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -122,7 +122,7 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.ErrorWriteLine("Unable to recognize image format, not decoding"); + AaruConsole.ErrorWriteLine("Unable to recognize image format, not decoding"); return(int)ErrorNumber.UnrecognizedFormat; } @@ -134,7 +134,7 @@ namespace Aaru.Commands.Image if(diskTags) if(inputFormat.Info.ReadableMediaTags.Count == 0) - DicConsole.WriteLine("There are no disk tags in chosen disc image."); + AaruConsole.WriteLine("There are no disk tags in chosen disc image."); else foreach(MediaTagType tag in inputFormat.Info.ReadableMediaTags) switch(tag) @@ -144,17 +144,17 @@ namespace Aaru.Commands.Image byte[] inquiry = inputFormat.ReadDiskTag(MediaTagType.SCSI_INQUIRY); if(inquiry == null) - DicConsole.WriteLine("Error reading SCSI INQUIRY response from disc image"); + AaruConsole.WriteLine("Error reading SCSI INQUIRY response from disc image"); else { - DicConsole.WriteLine("SCSI INQUIRY command response:"); + AaruConsole.WriteLine("SCSI INQUIRY command response:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(Inquiry.Prettify(inquiry)); + AaruConsole.WriteLine(Inquiry.Prettify(inquiry)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -165,17 +165,17 @@ namespace Aaru.Commands.Image byte[] identify = inputFormat.ReadDiskTag(MediaTagType.ATA_IDENTIFY); if(identify == null) - DicConsole.WriteLine("Error reading ATA IDENTIFY DEVICE response from disc image"); + AaruConsole.WriteLine("Error reading ATA IDENTIFY DEVICE response from disc image"); else { - DicConsole.WriteLine("ATA IDENTIFY DEVICE command response:"); + AaruConsole.WriteLine("ATA IDENTIFY DEVICE command response:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(Identify.Prettify(identify)); + AaruConsole.WriteLine(Identify.Prettify(identify)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -186,18 +186,18 @@ namespace Aaru.Commands.Image byte[] identify = inputFormat.ReadDiskTag(MediaTagType.ATAPI_IDENTIFY); if(identify == null) - DicConsole. + AaruConsole. WriteLine("Error reading ATA IDENTIFY PACKET DEVICE response from disc image"); else { - DicConsole.WriteLine("ATA IDENTIFY PACKET DEVICE command response:"); + AaruConsole.WriteLine("ATA IDENTIFY PACKET DEVICE command response:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(Identify.Prettify(identify)); + AaruConsole.WriteLine(Identify.Prettify(identify)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -208,17 +208,17 @@ namespace Aaru.Commands.Image byte[] atip = inputFormat.ReadDiskTag(MediaTagType.CD_ATIP); if(atip == null) - DicConsole.WriteLine("Error reading CD ATIP from disc image"); + AaruConsole.WriteLine("Error reading CD ATIP from disc image"); else { - DicConsole.WriteLine("CD ATIP:"); + AaruConsole.WriteLine("CD ATIP:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(ATIP.Prettify(atip)); + AaruConsole.WriteLine(ATIP.Prettify(atip)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -229,17 +229,17 @@ namespace Aaru.Commands.Image byte[] fullToc = inputFormat.ReadDiskTag(MediaTagType.CD_FullTOC); if(fullToc == null) - DicConsole.WriteLine("Error reading CD full TOC from disc image"); + AaruConsole.WriteLine("Error reading CD full TOC from disc image"); else { - DicConsole.WriteLine("CD full TOC:"); + AaruConsole.WriteLine("CD full TOC:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(FullTOC.Prettify(fullToc)); + AaruConsole.WriteLine(FullTOC.Prettify(fullToc)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -250,17 +250,17 @@ namespace Aaru.Commands.Image byte[] pma = inputFormat.ReadDiskTag(MediaTagType.CD_PMA); if(pma == null) - DicConsole.WriteLine("Error reading CD PMA from disc image"); + AaruConsole.WriteLine("Error reading CD PMA from disc image"); else { - DicConsole.WriteLine("CD PMA:"); + AaruConsole.WriteLine("CD PMA:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(PMA.Prettify(pma)); + AaruConsole.WriteLine(PMA.Prettify(pma)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -271,17 +271,17 @@ namespace Aaru.Commands.Image byte[] sessionInfo = inputFormat.ReadDiskTag(MediaTagType.CD_SessionInfo); if(sessionInfo == null) - DicConsole.WriteLine("Error reading CD session information from disc image"); + AaruConsole.WriteLine("Error reading CD session information from disc image"); else { - DicConsole.WriteLine("CD session information:"); + AaruConsole.WriteLine("CD session information:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(Session.Prettify(sessionInfo)); + AaruConsole.WriteLine(Session.Prettify(sessionInfo)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -292,17 +292,17 @@ namespace Aaru.Commands.Image byte[] cdText = inputFormat.ReadDiskTag(MediaTagType.CD_TEXT); if(cdText == null) - DicConsole.WriteLine("Error reading CD-TEXT from disc image"); + AaruConsole.WriteLine("Error reading CD-TEXT from disc image"); else { - DicConsole.WriteLine("CD-TEXT:"); + AaruConsole.WriteLine("CD-TEXT:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(CDTextOnLeadIn.Prettify(cdText)); + AaruConsole.WriteLine(CDTextOnLeadIn.Prettify(cdText)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } @@ -313,24 +313,24 @@ namespace Aaru.Commands.Image byte[] toc = inputFormat.ReadDiskTag(MediaTagType.CD_TOC); if(toc == null) - DicConsole.WriteLine("Error reading CD TOC from disc image"); + AaruConsole.WriteLine("Error reading CD TOC from disc image"); else { - DicConsole.WriteLine("CD TOC:"); + AaruConsole.WriteLine("CD TOC:"); - DicConsole. + AaruConsole. WriteLine("================================================================================"); - DicConsole.WriteLine(TOC.Prettify(toc)); + AaruConsole.WriteLine(TOC.Prettify(toc)); - DicConsole. + AaruConsole. WriteLine("================================================================================"); } break; } default: - DicConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", + AaruConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", tag); break; @@ -343,21 +343,21 @@ namespace Aaru.Commands.Image { if(!ulong.TryParse(length, out ulong _)) { - DicConsole.WriteLine("Value \"{0}\" is not a valid number for length.", length); - DicConsole.WriteLine("Not decoding sectors tags"); + AaruConsole.WriteLine("Value \"{0}\" is not a valid number for length.", length); + AaruConsole.WriteLine("Not decoding sectors tags"); return 3; } } if(inputFormat.Info.ReadableSectorTags.Count == 0) - DicConsole.WriteLine("There are no sector tags in chosen disc image."); + AaruConsole.WriteLine("There are no sector tags in chosen disc image."); else foreach(SectorTagType tag in inputFormat.Info.ReadableSectorTags) switch(tag) { default: - DicConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", + AaruConsole.WriteLine("Decoder for disk tag type \"{0}\" not yet implemented, sorry.", tag); break; diff --git a/Aaru/Commands/Image/Entropy.cs b/Aaru/Commands/Image/Entropy.cs index 0f6ea0d7f..372e86ec0 100644 --- a/Aaru/Commands/Image/Entropy.cs +++ b/Aaru/Commands/Image/Entropy.cs @@ -82,26 +82,26 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("entropy"); - DicConsole.DebugWriteLine("Entropy command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Entropy command", "--duplicated-sectors={0}", duplicatedSectors); - DicConsole.DebugWriteLine("Entropy command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Entropy command", "--separated-tracks={0}", separatedTracks); - DicConsole.DebugWriteLine("Entropy command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("Entropy command", "--whole-disc={0}", wholeDisc); + AaruConsole.DebugWriteLine("Entropy command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Entropy command", "--duplicated-sectors={0}", duplicatedSectors); + AaruConsole.DebugWriteLine("Entropy command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Entropy command", "--separated-tracks={0}", separatedTracks); + AaruConsole.DebugWriteLine("Entropy command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Entropy command", "--whole-disc={0}", wholeDisc); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -110,7 +110,7 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); + AaruConsole.ErrorWriteLine("Unable to recognize image format, not checksumming"); return(int)ErrorNumber.UnrecognizedFormat; } @@ -134,10 +134,10 @@ namespace Aaru.Commands.Image foreach(EntropyResults trackEntropy in tracksEntropy) { - DicConsole.WriteLine("Entropy for track {0} is {1:F4}.", trackEntropy.Track, trackEntropy.Entropy); + AaruConsole.WriteLine("Entropy for track {0} is {1:F4}.", trackEntropy.Track, trackEntropy.Entropy); if(trackEntropy.UniqueSectors != null) - DicConsole.WriteLine("Track {0} has {1} unique sectors ({2:P3})", trackEntropy.Track, + AaruConsole.WriteLine("Track {0} has {1} unique sectors ({2:P3})", trackEntropy.Track, trackEntropy.UniqueSectors, (double)trackEntropy.UniqueSectors / (double)trackEntropy.Sectors); } @@ -148,10 +148,10 @@ namespace Aaru.Commands.Image EntropyResults entropy = entropyCalculator.CalculateMediaEntropy(duplicatedSectors); - DicConsole.WriteLine("Entropy for disk is {0:F4}.", entropy.Entropy); + AaruConsole.WriteLine("Entropy for disk is {0:F4}.", entropy.Entropy); if(entropy.UniqueSectors != null) - DicConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", entropy.UniqueSectors, + AaruConsole.WriteLine("Disk has {0} unique sectors ({1:P3})", entropy.UniqueSectors, (double)entropy.UniqueSectors / (double)entropy.Sectors); return(int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Image/Info.cs b/Aaru/Commands/Image/Info.cs index 9b4063c4c..f5a05bc70 100644 --- a/Aaru/Commands/Image/Info.cs +++ b/Aaru/Commands/Image/Info.cs @@ -59,23 +59,23 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("image-info"); - DicConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Analyze command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Analyze command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Analyze command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Analyze command", "--verbose={0}", verbose); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -86,20 +86,20 @@ namespace Aaru.Commands.Image if(imageFormat == null) { - DicConsole.WriteLine("Image format not identified."); + AaruConsole.WriteLine("Image format not identified."); return(int)ErrorNumber.UnrecognizedFormat; } - DicConsole.WriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Image format identified by {0} ({1}).", imageFormat.Name, imageFormat.Id); + AaruConsole.WriteLine(); try { if(!imageFormat.Open(inputFilter)) { - DicConsole.WriteLine("Unable to open image format"); - DicConsole.WriteLine("No error given"); + AaruConsole.WriteLine("Unable to open image format"); + AaruConsole.WriteLine("No error given"); return(int)ErrorNumber.CannotOpenFormat; } @@ -112,17 +112,17 @@ namespace Aaru.Commands.Image } catch(Exception ex) { - DicConsole.ErrorWriteLine("Unable to open image format"); - DicConsole.ErrorWriteLine("Error: {0}", ex.Message); - DicConsole.DebugWriteLine("Image-info command", "Stack trace: {0}", ex.StackTrace); + AaruConsole.ErrorWriteLine("Unable to open image format"); + AaruConsole.ErrorWriteLine("Error: {0}", ex.Message); + AaruConsole.DebugWriteLine("Image-info command", "Stack trace: {0}", ex.StackTrace); return(int)ErrorNumber.CannotOpenFormat; } } catch(Exception ex) { - DicConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); - DicConsole.DebugWriteLine("Image-info command", ex.StackTrace); + AaruConsole.ErrorWriteLine($"Error reading file: {ex.Message}"); + AaruConsole.DebugWriteLine("Image-info command", ex.StackTrace); return(int)ErrorNumber.UnexpectedException; } diff --git a/Aaru/Commands/Image/Options.cs b/Aaru/Commands/Image/Options.cs index c74297c5d..9f929ddb0 100644 --- a/Aaru/Commands/Image/Options.cs +++ b/Aaru/Commands/Image/Options.cs @@ -54,18 +54,18 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; - DicConsole.DebugWriteLine("List-Options command", "--debug={0}", debug); - DicConsole.DebugWriteLine("List-Options command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("List-Options command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("List-Options command", "--verbose={0}", verbose); Statistics.AddCommand("list-options"); PluginBase plugins = GetPluginBase.Instance; - DicConsole.WriteLine("Read/Write media images options:"); + AaruConsole.WriteLine("Read/Write media images options:"); foreach(KeyValuePair kvp in plugins.WritableImages) { @@ -75,15 +75,15 @@ namespace Aaru.Commands.Image if(options.Count == 0) continue; - DicConsole.WriteLine("\tOptions for {0}:", kvp.Value.Name); - DicConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", "Name", "Type", "Default", "Description"); + AaruConsole.WriteLine("\tOptions for {0}:", kvp.Value.Name); + AaruConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", "Name", "Type", "Default", "Description"); foreach((string name, Type type, string description, object @default) option in options.OrderBy(t => t.name)) - DicConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", option.name, TypeToString(option.type), + AaruConsole.WriteLine("\t\t{0,-20} {1,-10} {2,-12} {3,-8}", option.name, TypeToString(option.type), option.@default, option.description); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } return(int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Image/Print.cs b/Aaru/Commands/Image/Print.cs index d188f78f1..05059e0d7 100644 --- a/Aaru/Commands/Image/Print.cs +++ b/Aaru/Commands/Image/Print.cs @@ -90,27 +90,27 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("print-hex"); - DicConsole.DebugWriteLine("PrintHex command", "--debug={0}", debug); - DicConsole.DebugWriteLine("PrintHex command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("PrintHex command", "--length={0}", length); - DicConsole.DebugWriteLine("PrintHex command", "--long-sectors={0}", longSectors); - DicConsole.DebugWriteLine("PrintHex command", "--start={0}", start); - DicConsole.DebugWriteLine("PrintHex command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("PrintHex command", "--width={0}", width); + AaruConsole.DebugWriteLine("PrintHex command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("PrintHex command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("PrintHex command", "--length={0}", length); + AaruConsole.DebugWriteLine("PrintHex command", "--long-sectors={0}", longSectors); + AaruConsole.DebugWriteLine("PrintHex command", "--start={0}", start); + AaruConsole.DebugWriteLine("PrintHex command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("PrintHex command", "--width={0}", width); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -119,7 +119,7 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); + AaruConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); return(int)ErrorNumber.UnrecognizedFormat; } @@ -128,11 +128,11 @@ namespace Aaru.Commands.Image for(ulong i = 0; i < length; i++) { - DicConsole.WriteLine("Sector {0}", start + i); + AaruConsole.WriteLine("Sector {0}", start + i); if(inputFormat.Info.ReadableSectorTags == null) { - DicConsole. + AaruConsole. WriteLine("Requested sectors with tags, unsupported by underlying image format, printing only user data."); longSectors = false; @@ -141,7 +141,7 @@ namespace Aaru.Commands.Image { if(inputFormat.Info.ReadableSectorTags.Count == 0) { - DicConsole. + AaruConsole. WriteLine("Requested sectors with tags, unsupported by underlying image format, printing only user data."); longSectors = false; diff --git a/Aaru/Commands/Image/Verify.cs b/Aaru/Commands/Image/Verify.cs index 6d337c9e3..8b4ae77b9 100644 --- a/Aaru/Commands/Image/Verify.cs +++ b/Aaru/Commands/Image/Verify.cs @@ -77,25 +77,25 @@ namespace Aaru.Commands.Image MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("verify"); - DicConsole.DebugWriteLine("Verify command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Verify command", "--input={0}", imagePath); - DicConsole.DebugWriteLine("Verify command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("Verify command", "--verify-disc={0}", verifyDisc); - DicConsole.DebugWriteLine("Verify command", "--verify-sectors={0}", verifySectors); + AaruConsole.DebugWriteLine("Verify command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Verify command", "--input={0}", imagePath); + AaruConsole.DebugWriteLine("Verify command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Verify command", "--verify-disc={0}", verifyDisc); + AaruConsole.DebugWriteLine("Verify command", "--verify-sectors={0}", verifySectors); var filtersList = new FiltersList(); IFilter inputFilter = filtersList.GetFilter(imagePath); if(inputFilter == null) { - DicConsole.ErrorWriteLine("Cannot open specified file."); + AaruConsole.ErrorWriteLine("Cannot open specified file."); return(int)ErrorNumber.CannotOpenFile; } @@ -104,7 +104,7 @@ namespace Aaru.Commands.Image if(inputFormat == null) { - DicConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); + AaruConsole.ErrorWriteLine("Unable to recognize image format, not verifying"); return(int)ErrorNumber.FormatNotFound; } @@ -125,7 +125,7 @@ namespace Aaru.Commands.Image if(verifiableImage is null && verifiableSectorsImage is null) { - DicConsole.ErrorWriteLine("The specified image does not support any kind of verification"); + AaruConsole.ErrorWriteLine("The specified image does not support any kind of verification"); return(int)ErrorNumber.NotVerificable; } @@ -141,21 +141,21 @@ namespace Aaru.Commands.Image switch(discCheckStatus) { case true: - DicConsole.WriteLine("Disc image checksums are correct"); + AaruConsole.WriteLine("Disc image checksums are correct"); break; case false: - DicConsole.WriteLine("Disc image checksums are incorrect"); + AaruConsole.WriteLine("Disc image checksums are incorrect"); break; case null: - DicConsole.WriteLine("Disc image does not contain checksums"); + AaruConsole.WriteLine("Disc image does not contain checksums"); break; } correctImage = discCheckStatus; - DicConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds); + AaruConsole.VerboseWriteLine("Checking disc image checksums took {0} seconds", checkTime.TotalSeconds); } if(verifySectors) @@ -179,7 +179,7 @@ namespace Aaru.Commands.Image while(remainingSectors > 0) { - DicConsole.Write("\rChecking sector {0} of {1}, on track {2}", currentSectorAll, + AaruConsole.Write("\rChecking sector {0} of {1}, on track {2}", currentSectorAll, inputFormat.Info.Sectors, currentTrack.TrackSequence); List tempFailingLbas; @@ -223,7 +223,7 @@ namespace Aaru.Commands.Image while(remainingSectors > 0) { - DicConsole.Write("\rChecking sector {0} of {1}", currentSector, inputFormat.Info.Sectors); + AaruConsole.Write("\rChecking sector {0} of {1}", currentSector, inputFormat.Info.Sectors); List tempFailingLbas; List tempUnknownLbas; @@ -256,43 +256,43 @@ namespace Aaru.Commands.Image TimeSpan checkTime = endCheck - startCheck; - DicConsole.Write("\r" + new string(' ', System.Console.WindowWidth - 1) + "\r"); + AaruConsole.Write("\r" + new string(' ', System.Console.WindowWidth - 1) + "\r"); if(unknownSectors > 0) - DicConsole.WriteLine("There is at least one sector that does not contain a checksum"); + AaruConsole.WriteLine("There is at least one sector that does not contain a checksum"); if(errorSectors > 0) - DicConsole.WriteLine("There is at least one sector with incorrect checksum or errors"); + AaruConsole.WriteLine("There is at least one sector with incorrect checksum or errors"); if(unknownSectors == 0 && errorSectors == 0) - DicConsole.WriteLine("All sector checksums are correct"); + AaruConsole.WriteLine("All sector checksums are correct"); - DicConsole.VerboseWriteLine("Checking sector checksums took {0} seconds", checkTime.TotalSeconds); + AaruConsole.VerboseWriteLine("Checking sector checksums took {0} seconds", checkTime.TotalSeconds); if(verbose) { - DicConsole.VerboseWriteLine("LBAs with error:"); + AaruConsole.VerboseWriteLine("LBAs with error:"); if(failingLbas.Count == (int)inputFormat.Info.Sectors) - DicConsole.VerboseWriteLine("\tall sectors."); + AaruConsole.VerboseWriteLine("\tall sectors."); else foreach(ulong t in failingLbas) - DicConsole.VerboseWriteLine("\t{0}", t); + AaruConsole.VerboseWriteLine("\t{0}", t); - DicConsole.WriteLine("LBAs without checksum:"); + AaruConsole.WriteLine("LBAs without checksum:"); if(unknownLbas.Count == (int)inputFormat.Info.Sectors) - DicConsole.VerboseWriteLine("\tall sectors."); + AaruConsole.VerboseWriteLine("\tall sectors."); else foreach(ulong t in unknownLbas) - DicConsole.VerboseWriteLine("\t{0}", t); + AaruConsole.VerboseWriteLine("\t{0}", t); } - DicConsole.WriteLine("Total sectors........... {0}", inputFormat.Info.Sectors); - DicConsole.WriteLine("Total errors............ {0}", failingLbas.Count); - DicConsole.WriteLine("Total unknowns.......... {0}", unknownLbas.Count); - DicConsole.WriteLine("Total errors+unknowns... {0}", failingLbas.Count + unknownLbas.Count); + AaruConsole.WriteLine("Total sectors........... {0}", inputFormat.Info.Sectors); + AaruConsole.WriteLine("Total errors............ {0}", failingLbas.Count); + AaruConsole.WriteLine("Total unknowns.......... {0}", unknownLbas.Count); + AaruConsole.WriteLine("Total errors+unknowns... {0}", failingLbas.Count + unknownLbas.Count); if(failingLbas.Count > 0) correctSectors = false; diff --git a/Aaru/Commands/ListEncodings.cs b/Aaru/Commands/ListEncodings.cs index fa30a998b..f2f099c80 100644 --- a/Aaru/Commands/ListEncodings.cs +++ b/Aaru/Commands/ListEncodings.cs @@ -51,15 +51,15 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("list-encodings"); - DicConsole.DebugWriteLine("List-Encodings command", "--debug={0}", debug); - DicConsole.DebugWriteLine("List-Encodings command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("List-Encodings command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("List-Encodings command", "--verbose={0}", verbose); List encodings = Encoding.GetEncodings().Select(info => new CommonEncodingInfo { @@ -71,10 +71,10 @@ namespace Aaru.Commands Name = info.Name, DisplayName = info.DisplayName })); - DicConsole.WriteLine("{0,-16} {1,-8}", "Name", "Description"); + AaruConsole.WriteLine("{0,-16} {1,-8}", "Name", "Description"); foreach(CommonEncodingInfo info in encodings.OrderBy(t => t.DisplayName)) - DicConsole.WriteLine("{0,-16} {1,-8}", info.Name, info.DisplayName); + AaruConsole.WriteLine("{0,-16} {1,-8}", info.Name, info.DisplayName); return(int)ErrorNumber.NoError; } diff --git a/Aaru/Commands/ListNamespaces.cs b/Aaru/Commands/ListNamespaces.cs index 61e9f4ce3..d81f26f03 100644 --- a/Aaru/Commands/ListNamespaces.cs +++ b/Aaru/Commands/ListNamespaces.cs @@ -53,13 +53,13 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; - DicConsole.DebugWriteLine("List-Namespaces command", "--debug={0}", debug); - DicConsole.DebugWriteLine("List-Namespaces command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("List-Namespaces command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("List-Namespaces command", "--verbose={0}", verbose); Statistics.AddCommand("list-namespaces"); PluginBase plugins = GetPluginBase.Instance; @@ -69,13 +69,13 @@ namespace Aaru.Commands if(kvp.Value.Namespaces is null) continue; - DicConsole.WriteLine("\tNamespaces for {0}:", kvp.Value.Name); - DicConsole.WriteLine("\t\t{0,-16} {1,-16}", "Namespace", "Description"); + AaruConsole.WriteLine("\tNamespaces for {0}:", kvp.Value.Name); + AaruConsole.WriteLine("\t\t{0,-16} {1,-16}", "Namespace", "Description"); foreach(KeyValuePair @namespace in kvp.Value.Namespaces.OrderBy(t => t.Key)) - DicConsole.WriteLine("\t\t{0,-16} {1,-16}", @namespace.Key, @namespace.Value); + AaruConsole.WriteLine("\t\t{0,-16} {1,-16}", @namespace.Key, @namespace.Value); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } return(int)ErrorNumber.NoError; diff --git a/Aaru/Commands/Media/Dump.cs b/Aaru/Commands/Media/Dump.cs index 3bba2bac8..0b1499ea7 100644 --- a/Aaru/Commands/Media/Dump.cs +++ b/Aaru/Commands/Media/Dump.cs @@ -186,41 +186,41 @@ namespace Aaru.Commands.Media MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("dump-media"); - DicConsole.DebugWriteLine("Dump-Media command", "--cicm-xml={0}", cicmXml); - DicConsole.DebugWriteLine("Dump-Media command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Dump-Media command", "--device={0}", devicePath); - DicConsole.DebugWriteLine("Dump-Media command", "--encoding={0}", encoding); - DicConsole.DebugWriteLine("Dump-Media command", "--first-pregap={0}", firstPregap); - DicConsole.DebugWriteLine("Dump-Media command", "--fix-offset={0}", fixOffset); - DicConsole.DebugWriteLine("Dump-Media command", "--force={0}", force); - DicConsole.DebugWriteLine("Dump-Media command", "--format={0}", format); - DicConsole.DebugWriteLine("Dump-Media command", "--metadata={0}", metadata); - DicConsole.DebugWriteLine("Dump-Media command", "--options={0}", options); - DicConsole.DebugWriteLine("Dump-Media command", "--output={0}", outputPath); - DicConsole.DebugWriteLine("Dump-Media command", "--persistent={0}", persistent); - DicConsole.DebugWriteLine("Dump-Media command", "--resume={0}", resume); - DicConsole.DebugWriteLine("Dump-Media command", "--retry-passes={0}", retryPasses); - DicConsole.DebugWriteLine("Dump-Media command", "--skip={0}", skip); - DicConsole.DebugWriteLine("Dump-Media command", "--stop-on-error={0}", stopOnError); - DicConsole.DebugWriteLine("Dump-Media command", "--trim={0}", trim); - DicConsole.DebugWriteLine("Dump-Media command", "--verbose={0}", verbose); - DicConsole.DebugWriteLine("Dump-Media command", "--subchannel={0}", subchannel); + AaruConsole.DebugWriteLine("Dump-Media command", "--cicm-xml={0}", cicmXml); + AaruConsole.DebugWriteLine("Dump-Media command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Dump-Media command", "--device={0}", devicePath); + AaruConsole.DebugWriteLine("Dump-Media command", "--encoding={0}", encoding); + AaruConsole.DebugWriteLine("Dump-Media command", "--first-pregap={0}", firstPregap); + AaruConsole.DebugWriteLine("Dump-Media command", "--fix-offset={0}", fixOffset); + AaruConsole.DebugWriteLine("Dump-Media command", "--force={0}", force); + AaruConsole.DebugWriteLine("Dump-Media command", "--format={0}", format); + AaruConsole.DebugWriteLine("Dump-Media command", "--metadata={0}", metadata); + AaruConsole.DebugWriteLine("Dump-Media command", "--options={0}", options); + AaruConsole.DebugWriteLine("Dump-Media command", "--output={0}", outputPath); + AaruConsole.DebugWriteLine("Dump-Media command", "--persistent={0}", persistent); + AaruConsole.DebugWriteLine("Dump-Media command", "--resume={0}", resume); + AaruConsole.DebugWriteLine("Dump-Media command", "--retry-passes={0}", retryPasses); + AaruConsole.DebugWriteLine("Dump-Media command", "--skip={0}", skip); + AaruConsole.DebugWriteLine("Dump-Media command", "--stop-on-error={0}", stopOnError); + AaruConsole.DebugWriteLine("Dump-Media command", "--trim={0}", trim); + AaruConsole.DebugWriteLine("Dump-Media command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Dump-Media command", "--subchannel={0}", subchannel); // TODO: Disabled temporarily - //DicConsole.DebugWriteLine("Dump-Media command", "--raw={0}", raw); + //AaruConsole.DebugWriteLine("Dump-Media command", "--raw={0}", raw); Dictionary parsedOptions = Aaru.Core.Options.Parse(options); - DicConsole.DebugWriteLine("Dump-Media command", "Parsed options:"); + AaruConsole.DebugWriteLine("Dump-Media command", "Parsed options:"); foreach(KeyValuePair parsedOption in parsedOptions) - DicConsole.DebugWriteLine("Dump-Media command", "{0} = {1}", parsedOption.Key, parsedOption.Value); + AaruConsole.DebugWriteLine("Dump-Media command", "{0} = {1}", parsedOption.Key, parsedOption.Value); Encoding encodingClass = null; @@ -230,11 +230,11 @@ namespace Aaru.Commands.Media encodingClass = Claunia.Encoding.Encoding.GetEncoding(encoding); if(verbose) - DicConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); + AaruConsole.VerboseWriteLine("Using encoding for {0}.", encodingClass.EncodingName); } catch(ArgumentException) { - DicConsole.ErrorWriteLine("Specified encoding is not supported."); + AaruConsole.ErrorWriteLine("Specified encoding is not supported."); return(int)ErrorNumber.EncodingUnknown; } @@ -265,7 +265,7 @@ namespace Aaru.Commands.Media break; default: - DicConsole.WriteLine("Incorrect subchannel type \"{0}\" requested.", subchannel); + AaruConsole.WriteLine("Incorrect subchannel type \"{0}\" requested.", subchannel); break; } @@ -288,14 +288,14 @@ namespace Aaru.Commands.Media if(dev.Error) { - DicConsole.ErrorWriteLine(Error.Print(dev.LastError)); + AaruConsole.ErrorWriteLine(Error.Print(dev.LastError)); return(int)ErrorNumber.CannotOpenDevice; } } catch(DeviceException e) { - DicConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); return(int)ErrorNumber.CannotOpenDevice; } @@ -317,7 +317,7 @@ namespace Aaru.Commands.Media } catch { - DicConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); + AaruConsole.ErrorWriteLine("Incorrect resume file, not continuing..."); return(int)ErrorNumber.InvalidResume; } @@ -327,7 +327,7 @@ namespace Aaru.Commands.Media resumeClass.BadBlocks.Count == 0 && !resumeClass.Tape) { - DicConsole.WriteLine("Media already dumped correctly, not continuing..."); + AaruConsole.WriteLine("Media already dumped correctly, not continuing..."); return(int)ErrorNumber.AlreadyDumped; } @@ -346,14 +346,14 @@ namespace Aaru.Commands.Media } catch { - DicConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); + AaruConsole.ErrorWriteLine("Incorrect metadata sidecar file, not continuing..."); return(int)ErrorNumber.InvalidSidecar; } } else { - DicConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); + AaruConsole.ErrorWriteLine("Could not find metadata sidecar, not continuing..."); return(int)ErrorNumber.FileNotFound; } @@ -379,14 +379,14 @@ namespace Aaru.Commands.Media if(candidates.Count == 0) { - DicConsole.WriteLine("No plugin supports requested extension."); + AaruConsole.WriteLine("No plugin supports requested extension."); return(int)ErrorNumber.FormatNotFound; } if(candidates.Count > 1) { - DicConsole.WriteLine("More than one plugin supports requested extension."); + AaruConsole.WriteLine("More than one plugin supports requested extension."); return(int)ErrorNumber.TooManyFormats; } @@ -398,12 +398,12 @@ namespace Aaru.Commands.Media if(verbose) { dumpLog.WriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); - DicConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); + AaruConsole.VerboseWriteLine("Output image format: {0} ({1}).", outputFormat.Name, outputFormat.Id); } else { dumpLog.WriteLine("Output image format: {0}.", outputFormat.Name); - DicConsole.WriteLine("Output image format: {0}.", outputFormat.Name); + AaruConsole.WriteLine("Output image format: {0}.", outputFormat.Name); } var dumper = new Dump(resume, dev, devicePath, outputFormat, retryPasses, force, false, persistent, diff --git a/Aaru/Commands/Media/Info.cs b/Aaru/Commands/Media/Info.cs index 61eb3e9e1..1a7b58d91 100644 --- a/Aaru/Commands/Media/Info.cs +++ b/Aaru/Commands/Media/Info.cs @@ -86,17 +86,17 @@ namespace Aaru.Commands.Media MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("media-info"); - DicConsole.DebugWriteLine("Media-Info command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Media-Info command", "--device={0}", devicePath); - DicConsole.DebugWriteLine("Media-Info command", "--output-prefix={0}", outputPrefix); - DicConsole.DebugWriteLine("Media-Info command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Media-Info command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Media-Info command", "--device={0}", devicePath); + AaruConsole.DebugWriteLine("Media-Info command", "--output-prefix={0}", outputPrefix); + AaruConsole.DebugWriteLine("Media-Info command", "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && @@ -116,14 +116,14 @@ namespace Aaru.Commands.Media if(dev.Error) { - DicConsole.ErrorWriteLine(Error.Print(dev.LastError)); + AaruConsole.ErrorWriteLine(Error.Print(dev.LastError)); return(int)ErrorNumber.CannotOpenDevice; } } catch(DeviceException e) { - DicConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); return(int)ErrorNumber.CannotOpenDevice; } @@ -156,12 +156,12 @@ namespace Aaru.Commands.Media return(int)ErrorNumber.NoError; } - static void DoAtaMediaInfo() => DicConsole.ErrorWriteLine("Please use device-info command for ATA devices."); + static void DoAtaMediaInfo() => AaruConsole.ErrorWriteLine("Please use device-info command for ATA devices."); static void DoNvmeMediaInfo(string outputPrefix, Aaru.Devices.Device dev) => throw new NotImplementedException("NVMe devices not yet supported."); - static void DoSdMediaInfo() => DicConsole.ErrorWriteLine("Please use device-info command for MMC/SD devices."); + static void DoSdMediaInfo() => AaruConsole.ErrorWriteLine("Please use device-info command for MMC/SD devices."); static void DoScsiMediaInfo(bool debug, bool verbose, string outputPrefix, Aaru.Devices.Device dev) { @@ -196,7 +196,7 @@ namespace Aaru.Commands.Media if(scsiInfo.Blocks != 0 && scsiInfo.BlockSize != 0) - DicConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2} bytes)", + AaruConsole.WriteLine("Media has {0} blocks of {1} bytes/each. (for a total of {2} bytes)", scsiInfo.Blocks, scsiInfo.BlockSize, scsiInfo.Blocks * scsiInfo.BlockSize); break; @@ -208,8 +208,8 @@ namespace Aaru.Commands.Media if(scsiInfo.DensitySupportHeader.HasValue) { - DicConsole.WriteLine("Densities supported by currently inserted media:"); - DicConsole.WriteLine(DensitySupport.PrettifyDensity(scsiInfo.DensitySupportHeader)); + AaruConsole.WriteLine("Densities supported by currently inserted media:"); + AaruConsole.WriteLine(DensitySupport.PrettifyDensity(scsiInfo.DensitySupportHeader)); } } @@ -221,11 +221,11 @@ namespace Aaru.Commands.Media if(scsiInfo.MediaTypeSupportHeader.HasValue) { - DicConsole.WriteLine("Medium types currently inserted in device:"); - DicConsole.WriteLine(DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupportHeader)); + AaruConsole.WriteLine("Medium types currently inserted in device:"); + AaruConsole.WriteLine(DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupportHeader)); } - DicConsole.WriteLine(DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupport)); + AaruConsole.WriteLine(DensitySupport.PrettifyMediumType(scsiInfo.MediaTypeSupport)); } break; @@ -251,7 +251,7 @@ namespace Aaru.Commands.Media "SCSI READ DISC STRUCTURE", scsiInfo.DvdPfi); if(scsiInfo.DecodedPfi.HasValue) - DicConsole.WriteLine("PFI:\n{0}", PFI.Prettify(scsiInfo.DecodedPfi)); + AaruConsole.WriteLine("PFI:\n{0}", PFI.Prettify(scsiInfo.DecodedPfi)); } if(scsiInfo.DvdDmi != null) @@ -260,9 +260,9 @@ namespace Aaru.Commands.Media "SCSI READ DISC STRUCTURE", scsiInfo.DvdDmi); if(DMI.IsXbox(scsiInfo.DvdDmi)) - DicConsole.WriteLine("Xbox DMI:\n{0}", DMI.PrettifyXbox(scsiInfo.DvdDmi)); + AaruConsole.WriteLine("Xbox DMI:\n{0}", DMI.PrettifyXbox(scsiInfo.DvdDmi)); else if(DMI.IsXbox360(scsiInfo.DvdDmi)) - DicConsole.WriteLine("Xbox 360 DMI:\n{0}", DMI.PrettifyXbox360(scsiInfo.DvdDmi)); + AaruConsole.WriteLine("Xbox 360 DMI:\n{0}", DMI.PrettifyXbox360(scsiInfo.DvdDmi)); } if(scsiInfo.DvdCmi != null) @@ -270,7 +270,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvd_cmi.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdCmi); - DicConsole.WriteLine("Lead-In CMI:\n{0}", CSS_CPRM.PrettifyLeadInCopyright(scsiInfo.DvdCmi)); + AaruConsole.WriteLine("Lead-In CMI:\n{0}", CSS_CPRM.PrettifyLeadInCopyright(scsiInfo.DvdCmi)); } if(scsiInfo.DvdBca != null) @@ -286,7 +286,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_dds.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamDds); - DicConsole.WriteLine("Disc Definition Structure:\n{0}", DDS.Prettify(scsiInfo.DvdRamDds)); + AaruConsole.WriteLine("Disc Definition Structure:\n{0}", DDS.Prettify(scsiInfo.DvdRamDds)); } if(scsiInfo.DvdRamCartridgeStatus != null) @@ -294,7 +294,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_status.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamCartridgeStatus); - DicConsole.WriteLine("Medium Status:\n{0}", Cartridge.Prettify(scsiInfo.DvdRamCartridgeStatus)); + AaruConsole.WriteLine("Medium Status:\n{0}", Cartridge.Prettify(scsiInfo.DvdRamCartridgeStatus)); } if(scsiInfo.DvdRamSpareArea != null) @@ -302,7 +302,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_dvdram_spare.bin", "SCSI READ DISC STRUCTURE", scsiInfo.DvdRamSpareArea); - DicConsole.WriteLine("Spare Area Information:\n{0}", Spare.Prettify(scsiInfo.DvdRamSpareArea)); + AaruConsole.WriteLine("Spare Area Information:\n{0}", Spare.Prettify(scsiInfo.DvdRamSpareArea)); } if(scsiInfo.LastBorderOutRmd != null) @@ -366,7 +366,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_di.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayDiscInformation); - DicConsole.WriteLine("Blu-ray Disc Information:\n{0}", DI.Prettify(scsiInfo.BlurayDiscInformation)); + AaruConsole.WriteLine("Blu-ray Disc Information:\n{0}", DI.Prettify(scsiInfo.BlurayDiscInformation)); } if(scsiInfo.BlurayPac != null) @@ -378,7 +378,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_bca.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayBurstCuttingArea); - DicConsole.WriteLine("Blu-ray Burst Cutting Area:\n{0}", + AaruConsole.WriteLine("Blu-ray Burst Cutting Area:\n{0}", BCA.Prettify(scsiInfo.BlurayBurstCuttingArea)); } @@ -387,7 +387,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_dds.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayDds); - DicConsole.WriteLine("Blu-ray Disc Definition Structure:\n{0}", + AaruConsole.WriteLine("Blu-ray Disc Definition Structure:\n{0}", Aaru.Decoders.Bluray.DDS.Prettify(scsiInfo.BlurayDds)); } @@ -396,7 +396,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_cartstatus.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BlurayCartridgeStatus); - DicConsole.WriteLine("Blu-ray Cartridge Status:\n{0}", + AaruConsole.WriteLine("Blu-ray Cartridge Status:\n{0}", Aaru.Decoders.Bluray.Cartridge.Prettify(scsiInfo.BlurayCartridgeStatus)); } @@ -405,7 +405,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscstructure_bd_spare.bin", "SCSI READ DISC STRUCTURE", scsiInfo.BluraySpareAreaInformation); - DicConsole.WriteLine("Blu-ray Spare Area Information:\n{0}", + AaruConsole.WriteLine("Blu-ray Spare Area Information:\n{0}", Aaru.Decoders.Bluray.Spare.Prettify(scsiInfo.BluraySpareAreaInformation)); } @@ -415,7 +415,7 @@ namespace Aaru.Commands.Media if(scsiInfo.BlurayTrackResources != null) { - DicConsole.WriteLine("Track Resources Information:\n{0}", + AaruConsole.WriteLine("Track Resources Information:\n{0}", DiscInformation.Prettify(scsiInfo.BlurayTrackResources)); DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscinformation_001b.bin", @@ -424,7 +424,7 @@ namespace Aaru.Commands.Media if(scsiInfo.BlurayPowResources != null) { - DicConsole.WriteLine("POW Resources Information:\n{0}", + AaruConsole.WriteLine("POW Resources Information:\n{0}", DiscInformation.Prettify(scsiInfo.BlurayPowResources)); DataFile.WriteTo("Media-Info command", outputPrefix, "_readdiscinformation_010b.bin", @@ -437,7 +437,7 @@ namespace Aaru.Commands.Media scsiInfo.Toc); if(scsiInfo.DecodedToc.HasValue) - DicConsole.WriteLine("TOC:\n{0}", TOC.Prettify(scsiInfo.DecodedToc)); + AaruConsole.WriteLine("TOC:\n{0}", TOC.Prettify(scsiInfo.DecodedToc)); } if(scsiInfo.Atip != null) @@ -446,7 +446,7 @@ namespace Aaru.Commands.Media scsiInfo.Atip); if(scsiInfo.DecodedAtip.HasValue) - DicConsole.WriteLine("ATIP:\n{0}", ATIP.Prettify(scsiInfo.DecodedAtip)); + AaruConsole.WriteLine("ATIP:\n{0}", ATIP.Prettify(scsiInfo.DecodedAtip)); } if(scsiInfo.CompactDiscInformation != null) @@ -455,7 +455,7 @@ namespace Aaru.Commands.Media "SCSI READ DISC INFORMATION", scsiInfo.CompactDiscInformation); if(scsiInfo.DecodedCompactDiscInformation.HasValue) - DicConsole.WriteLine("Standard Disc Information:\n{0}", + AaruConsole.WriteLine("Standard Disc Information:\n{0}", DiscInformation.Prettify000b(scsiInfo.DecodedCompactDiscInformation)); } @@ -465,7 +465,7 @@ namespace Aaru.Commands.Media scsiInfo.Session); if(scsiInfo.DecodedSession.HasValue) - DicConsole.WriteLine("Session information:\n{0}", Session.Prettify(scsiInfo.DecodedSession)); + AaruConsole.WriteLine("Session information:\n{0}", Session.Prettify(scsiInfo.DecodedSession)); } if(scsiInfo.RawToc != null) @@ -474,7 +474,7 @@ namespace Aaru.Commands.Media scsiInfo.RawToc); if(scsiInfo.FullToc.HasValue) - DicConsole.WriteLine("Raw TOC:\n{0}", FullTOC.Prettify(scsiInfo.RawToc)); + AaruConsole.WriteLine("Raw TOC:\n{0}", FullTOC.Prettify(scsiInfo.RawToc)); } if(scsiInfo.Pma != null) @@ -482,7 +482,7 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_pma.bin", "SCSI READ TOC/PMA/ATIP", scsiInfo.Pma); - DicConsole.WriteLine("PMA:\n{0}", PMA.Prettify(scsiInfo.Pma)); + AaruConsole.WriteLine("PMA:\n{0}", PMA.Prettify(scsiInfo.Pma)); } if(scsiInfo.CdTextLeadIn != null) @@ -491,33 +491,33 @@ namespace Aaru.Commands.Media scsiInfo.CdTextLeadIn); if(scsiInfo.DecodedCdTextLeadIn.HasValue) - DicConsole.WriteLine("CD-TEXT on Lead-In:\n{0}", + AaruConsole.WriteLine("CD-TEXT on Lead-In:\n{0}", CDTextOnLeadIn.Prettify(scsiInfo.DecodedCdTextLeadIn)); } if(!string.IsNullOrEmpty(scsiInfo.Mcn)) - DicConsole.WriteLine("MCN: {0}", scsiInfo.Mcn); + AaruConsole.WriteLine("MCN: {0}", scsiInfo.Mcn); if(scsiInfo.Isrcs != null) foreach(KeyValuePair isrc in scsiInfo.Isrcs) - DicConsole.WriteLine("Track's {0} ISRC: {1}", isrc.Key, isrc.Value); + AaruConsole.WriteLine("Track's {0} ISRC: {1}", isrc.Key, isrc.Value); if(scsiInfo.XboxSecuritySector != null) DataFile.WriteTo("Media-Info command", outputPrefix, "_xbox_ss.bin", "KREON EXTRACT SS", scsiInfo.XboxSecuritySector); if(scsiInfo.DecodedXboxSecuritySector.HasValue) - DicConsole.WriteLine("Xbox Security Sector:\n{0}", SS.Prettify(scsiInfo.DecodedXboxSecuritySector)); + AaruConsole.WriteLine("Xbox Security Sector:\n{0}", SS.Prettify(scsiInfo.DecodedXboxSecuritySector)); if(scsiInfo.XgdInfo != null) { - DicConsole.WriteLine("Video layer 0 size: {0} sectors", scsiInfo.XgdInfo.L0Video); - DicConsole.WriteLine("Video layer 1 size: {0} sectors", scsiInfo.XgdInfo.L1Video); - DicConsole.WriteLine("Middle zone size: {0} sectors", scsiInfo.XgdInfo.MiddleZone); - DicConsole.WriteLine("Game data size: {0} sectors", scsiInfo.XgdInfo.GameSize); - DicConsole.WriteLine("Total size: {0} sectors", scsiInfo.XgdInfo.TotalSize); - DicConsole.WriteLine("Real layer break: {0}", scsiInfo.XgdInfo.LayerBreak); - DicConsole.WriteLine(); + AaruConsole.WriteLine("Video layer 0 size: {0} sectors", scsiInfo.XgdInfo.L0Video); + AaruConsole.WriteLine("Video layer 1 size: {0} sectors", scsiInfo.XgdInfo.L1Video); + AaruConsole.WriteLine("Middle zone size: {0} sectors", scsiInfo.XgdInfo.MiddleZone); + AaruConsole.WriteLine("Game data size: {0} sectors", scsiInfo.XgdInfo.GameSize); + AaruConsole.WriteLine("Total size: {0} sectors", scsiInfo.XgdInfo.TotalSize); + AaruConsole.WriteLine("Real layer break: {0}", scsiInfo.XgdInfo.LayerBreak); + AaruConsole.WriteLine(); } } @@ -526,15 +526,15 @@ namespace Aaru.Commands.Media DataFile.WriteTo("Media-Info command", outputPrefix, "_mediaserialnumber.bin", "SCSI READ MEDIA SERIAL NUMBER", scsiInfo.MediaSerialNumber); - DicConsole.Write("Media Serial Number: "); + AaruConsole.Write("Media Serial Number: "); for(int i = 4; i < scsiInfo.MediaSerialNumber.Length; i++) - DicConsole.Write("{0:X2}", scsiInfo.MediaSerialNumber[i]); + AaruConsole.Write("{0:X2}", scsiInfo.MediaSerialNumber[i]); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } - DicConsole.WriteLine("Media identified as {0}", scsiInfo.MediaType); + AaruConsole.WriteLine("Media identified as {0}", scsiInfo.MediaType); Statistics.AddMedia(scsiInfo.MediaType, true); if(scsiInfo.Toc != null || @@ -567,21 +567,21 @@ namespace Aaru.Commands.Media tracks[tracks.Length - 1].TrackEndSector = (ulong)lastSector; - DicConsole.WriteLine(); - DicConsole.WriteLine("Track calculations:"); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Track calculations:"); if(inexactPositioning) - DicConsole. + AaruConsole. WriteLine("WARNING: The drive has returned incorrect Q positioning when calculating pregaps. A best effort has been tried but they may be incorrect."); foreach(Track track in tracks) - DicConsole. + AaruConsole. WriteLine("Track {0} starts at LBA {1}, ends at LBA {2}, has a pregap of {3} sectors and is of type {4}", track.TrackSequence, track.TrackStartSector, track.TrackEndSector, track.TrackPregap, track.TrackType); - DicConsole.WriteLine(); - DicConsole.WriteLine("Offsets:"); + AaruConsole.WriteLine(); + AaruConsole.WriteLine("Offsets:"); CdOffset cdOffset = null; @@ -596,15 +596,15 @@ namespace Aaru.Commands.Media { if(driveOffset is null) { - DicConsole.WriteLine("Drive reading offset not found in database."); - DicConsole.WriteLine("Disc offset cannot be calculated."); + AaruConsole.WriteLine("Drive reading offset not found in database."); + AaruConsole.WriteLine("Disc offset cannot be calculated."); } else { - DicConsole. + AaruConsole. WriteLine($"Drive reading offset is {driveOffset} bytes ({driveOffset / 4} samples)."); - DicConsole.WriteLine("Disc write offset is unknown."); + AaruConsole.WriteLine("Disc write offset is unknown."); } } else @@ -613,21 +613,21 @@ namespace Aaru.Commands.Media if(driveOffset is null) { - DicConsole.WriteLine("Drive reading offset not found in database."); + AaruConsole.WriteLine("Drive reading offset not found in database."); - DicConsole. + AaruConsole. WriteLine($"Combined disc and drive offset are {offsetBytes} bytes ({offsetBytes / 4} samples)."); } else { - DicConsole. + AaruConsole. WriteLine($"Drive reading offset is {driveOffset} bytes ({driveOffset / 4} samples)."); - DicConsole.WriteLine($"Combined offset is {offsetBytes} bytes ({offsetBytes / 4} samples)"); + AaruConsole.WriteLine($"Combined offset is {offsetBytes} bytes ({offsetBytes / 4} samples)"); int? discOffset = offsetBytes - driveOffset; - DicConsole.WriteLine($"Disc offset is {discOffset} bytes ({discOffset / 4} samples)"); + AaruConsole.WriteLine($"Disc offset is {discOffset} bytes ({discOffset / 4} samples)"); } } } diff --git a/Aaru/Commands/Media/Scan.cs b/Aaru/Commands/Media/Scan.cs index 39de5ed9f..812424d0c 100644 --- a/Aaru/Commands/Media/Scan.cs +++ b/Aaru/Commands/Media/Scan.cs @@ -73,18 +73,18 @@ namespace Aaru.Commands.Media MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("media-scan"); - DicConsole.DebugWriteLine("Media-Scan command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Media-Scan command", "--device={0}", devicePath); - DicConsole.DebugWriteLine("Media-Scan command", "--ibg-log={0}", ibgLog); - DicConsole.DebugWriteLine("Media-Scan command", "--mhdd-log={0}", mhddLog); - DicConsole.DebugWriteLine("Media-Scan command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Media-Scan command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Media-Scan command", "--device={0}", devicePath); + AaruConsole.DebugWriteLine("Media-Scan command", "--ibg-log={0}", ibgLog); + AaruConsole.DebugWriteLine("Media-Scan command", "--mhdd-log={0}", mhddLog); + AaruConsole.DebugWriteLine("Media-Scan command", "--verbose={0}", verbose); if(devicePath.Length == 2 && devicePath[1] == ':' && @@ -104,14 +104,14 @@ namespace Aaru.Commands.Media if(dev.Error) { - DicConsole.ErrorWriteLine(Error.Print(dev.LastError)); + AaruConsole.ErrorWriteLine(Error.Print(dev.LastError)); return(int)ErrorNumber.CannotOpenDevice; } } catch(DeviceException e) { - DicConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); + AaruConsole.ErrorWriteLine(e.Message ?? Error.Print(e.LastError)); return(int)ErrorNumber.CannotOpenDevice; } @@ -134,26 +134,26 @@ namespace Aaru.Commands.Media ScanResults results = scanner.Scan(); - DicConsole.WriteLine("Took a total of {0} seconds ({1} processing commands).", results.TotalTime, + AaruConsole.WriteLine("Took a total of {0} seconds ({1} processing commands).", results.TotalTime, results.ProcessingTime); - DicConsole.WriteLine("Average speed: {0:F3} MiB/sec.", results.AvgSpeed); - DicConsole.WriteLine("Fastest speed burst: {0:F3} MiB/sec.", results.MaxSpeed); - DicConsole.WriteLine("Slowest speed burst: {0:F3} MiB/sec.", results.MinSpeed); - DicConsole.WriteLine("Summary:"); - DicConsole.WriteLine("{0} sectors took less than 3 ms.", results.A); - DicConsole.WriteLine("{0} sectors took less than 10 ms but more than 3 ms.", results.B); - DicConsole.WriteLine("{0} sectors took less than 50 ms but more than 10 ms.", results.C); - DicConsole.WriteLine("{0} sectors took less than 150 ms but more than 50 ms.", results.D); - DicConsole.WriteLine("{0} sectors took less than 500 ms but more than 150 ms.", results.E); - DicConsole.WriteLine("{0} sectors took more than 500 ms.", results.F); - DicConsole.WriteLine("{0} sectors could not be read.", results.UnreadableSectors.Count); + AaruConsole.WriteLine("Average speed: {0:F3} MiB/sec.", results.AvgSpeed); + AaruConsole.WriteLine("Fastest speed burst: {0:F3} MiB/sec.", results.MaxSpeed); + AaruConsole.WriteLine("Slowest speed burst: {0:F3} MiB/sec.", results.MinSpeed); + AaruConsole.WriteLine("Summary:"); + AaruConsole.WriteLine("{0} sectors took less than 3 ms.", results.A); + AaruConsole.WriteLine("{0} sectors took less than 10 ms but more than 3 ms.", results.B); + AaruConsole.WriteLine("{0} sectors took less than 50 ms but more than 10 ms.", results.C); + AaruConsole.WriteLine("{0} sectors took less than 150 ms but more than 50 ms.", results.D); + AaruConsole.WriteLine("{0} sectors took less than 500 ms but more than 150 ms.", results.E); + AaruConsole.WriteLine("{0} sectors took more than 500 ms.", results.F); + AaruConsole.WriteLine("{0} sectors could not be read.", results.UnreadableSectors.Count); if(results.UnreadableSectors.Count > 0) foreach(ulong bad in results.UnreadableSectors) - DicConsole.WriteLine("Sector {0} could not be read", bad); + AaruConsole.WriteLine("Sector {0} could not be read", bad); - DicConsole.WriteLine(); + AaruConsole.WriteLine(); #pragma warning disable RECS0018 // Comparison of floating point numbers with equality operator @@ -164,7 +164,7 @@ namespace Aaru.Commands.Media // ReSharper restore CompareOfFloatsByEqualityOperator #pragma warning restore RECS0018 // Comparison of floating point numbers with equality operator - DicConsole.WriteLine("Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average)", + AaruConsole.WriteLine("Testing {0} seeks, longest seek took {1:F3} ms, fastest one took {2:F3} ms. ({3:F3} ms average)", results.SeekTimes, results.SeekMax, results.SeekMin, results.SeekTotal / 1000); dev.Close(); diff --git a/Aaru/Commands/Remote.cs b/Aaru/Commands/Remote.cs index 65f8aa0f6..ff20d2450 100644 --- a/Aaru/Commands/Remote.cs +++ b/Aaru/Commands/Remote.cs @@ -59,16 +59,16 @@ namespace Aaru.Commands MainClass.PrintCopyright(); if(debug) - DicConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.DebugWriteLineEvent += System.Console.Error.WriteLine; if(verbose) - DicConsole.VerboseWriteLineEvent += System.Console.WriteLine; + AaruConsole.VerboseWriteLineEvent += System.Console.WriteLine; Statistics.AddCommand("remote"); - DicConsole.DebugWriteLine("Remote command", "--debug={0}", debug); - DicConsole.DebugWriteLine("Remote command", "--host={0}", host); - DicConsole.DebugWriteLine("Remote command", "--verbose={0}", verbose); + AaruConsole.DebugWriteLine("Remote command", "--debug={0}", debug); + AaruConsole.DebugWriteLine("Remote command", "--host={0}", host); + AaruConsole.DebugWriteLine("Remote command", "--verbose={0}", verbose); try { @@ -77,17 +77,17 @@ namespace Aaru.Commands Statistics.AddRemote(remote.ServerApplication, remote.ServerVersion, remote.ServerOperatingSystem, remote.ServerOperatingSystemVersion, remote.ServerArchitecture); - DicConsole.WriteLine("Server application: {0} {1}", remote.ServerApplication, remote.ServerVersion); + AaruConsole.WriteLine("Server application: {0} {1}", remote.ServerApplication, remote.ServerVersion); - DicConsole.WriteLine("Server operating system: {0} {1} ({2})", remote.ServerOperatingSystem, + AaruConsole.WriteLine("Server operating system: {0} {1} ({2})", remote.ServerOperatingSystem, remote.ServerOperatingSystemVersion, remote.ServerArchitecture); - DicConsole.WriteLine("Server maximum protocol: {0}", remote.ServerProtocolVersion); + AaruConsole.WriteLine("Server maximum protocol: {0}", remote.ServerProtocolVersion); remote.Disconnect(); } catch(Exception) { - DicConsole.ErrorWriteLine("Error connecting to host."); + AaruConsole.ErrorWriteLine("Error connecting to host."); return(int)ErrorNumber.CannotOpenDevice; } diff --git a/Aaru/Main.cs b/Aaru/Main.cs index a0d906cfc..81e417556 100644 --- a/Aaru/Main.cs +++ b/Aaru/Main.cs @@ -70,9 +70,9 @@ namespace Aaru _assemblyCopyright = ((AssemblyCopyrightAttribute)attributes[0]).Copyright; - DicConsole.WriteLineEvent += System.Console.WriteLine; - DicConsole.WriteEvent += System.Console.Write; - DicConsole.ErrorWriteLineEvent += System.Console.Error.WriteLine; + AaruConsole.WriteLineEvent += System.Console.WriteLine; + AaruConsole.WriteEvent += System.Console.Write; + AaruConsole.ErrorWriteLineEvent += System.Console.Error.WriteLine; Aaru.Settings.Settings.LoadSettings(); @@ -92,7 +92,7 @@ namespace Aaru if(masterContext.Database.GetPendingMigrations().Any()) { - DicConsole.WriteLine("New database version, updating..."); + AaruConsole.WriteLine("New database version, updating..."); try { @@ -100,8 +100,8 @@ namespace Aaru } catch(Exception) { - DicConsole.ErrorWriteLine("Exception trying to remove old database version, cannot continue..."); - DicConsole.ErrorWriteLine("Please manually remove file at {0}", Aaru.Settings.Settings.MasterDbPath); + AaruConsole.ErrorWriteLine("Exception trying to remove old database version, cannot continue..."); + AaruConsole.ErrorWriteLine("Please manually remove file at {0}", Aaru.Settings.Settings.MasterDbPath); } UpdateCommand.DoUpdate(true); @@ -159,9 +159,9 @@ namespace Aaru internal static void PrintCopyright() { - DicConsole.WriteLine("{0} {1}", _assemblyTitle, _assemblyVersion?.InformationalVersion); - DicConsole.WriteLine("{0}", _assemblyCopyright); - DicConsole.WriteLine(); + AaruConsole.WriteLine("{0} {1}", _assemblyTitle, _assemblyVersion?.InformationalVersion); + AaruConsole.WriteLine("{0}", _assemblyCopyright); + AaruConsole.WriteLine(); } } } \ No newline at end of file diff --git a/Aaru/Progress.cs b/Aaru/Progress.cs index 6264a6a23..c2ab12c3d 100644 --- a/Aaru/Progress.cs +++ b/Aaru/Progress.cs @@ -40,57 +40,57 @@ namespace Aaru internal static void EndProgress() { - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } internal static void UpdateProgress(string text, long current, long maximum) { ClearCurrentConsoleLine(); - DicConsole.Write(text); + AaruConsole.Write(text); } internal static void PulseProgress(string text) { ClearCurrentConsoleLine(); - DicConsole.Write(text); + AaruConsole.Write(text); } internal static void InitProgress2() { } internal static void EndProgress2() { - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } internal static void UpdateProgress2(string text, long current, long maximum) { ClearCurrentConsoleLine(); - DicConsole.Write(text); + AaruConsole.Write(text); } internal static void InitTwoProgress() { } internal static void EndTwoProgress() { - DicConsole.WriteLine(); + AaruConsole.WriteLine(); } internal static void UpdateTwoProgress(string text, long current, long maximum, string text2, long current2, long maximum2) { ClearCurrentConsoleLine(); - DicConsole.Write(text + ": " + text2); + AaruConsole.Write(text + ": " + text2); } internal static void UpdateStatus(string text) { ClearCurrentConsoleLine(); - DicConsole.WriteLine(text); + AaruConsole.WriteLine(text); } internal static void ErrorMessage(string text) { - DicConsole.ErrorWriteLine(text); + AaruConsole.ErrorWriteLine(text); } static void ClearCurrentConsoleLine()