mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.Filesystems] Introduced constants for module names
Introduces constant fields for respective debug module names, replacing the hardcoded ones. This is done to standardize the naming convention, reduce redundancy and potentially avoid any typos or name mismatches across the project. This change makes the code more maintainable and easier to update in case module names need to be changed.
This commit is contained in:
@@ -43,4 +43,5 @@ public sealed partial class HPOFS : IFilesystem
|
||||
public Guid Id => new("1b72dcd5-d031-4757-8a9f-8d2fb18c59e2");
|
||||
/// <inheritdoc />
|
||||
public string Author => Authors.NataliaPortillo;
|
||||
const string MODULE_NAME = "HPOFS Plugin";
|
||||
}
|
||||
@@ -98,87 +98,87 @@ public sealed partial class HPOFS
|
||||
MediaInformationBlock mib = Marshal.ByteArrayToStructureBigEndian<MediaInformationBlock>(medInfoSector);
|
||||
VolumeInformationBlock vib = Marshal.ByteArrayToStructureBigEndian<VolumeInformationBlock>(volInfoSector);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.oem_name = \"{0}\"", StringHandlers.CToString(bpb.oem_name));
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.oem_name = \"{0}\"", StringHandlers.CToString(bpb.oem_name));
|
||||
|
||||
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(MODULE_NAME, "bpb.bps = {0}", bpb.bps);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spc = {0}", bpb.spc);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.rsectors = {0}", bpb.rsectors);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.fats_no = {0}", bpb.fats_no);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.root_ent = {0}", bpb.root_ent);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sectors = {0}", bpb.sectors);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.media = 0x{0:X2}", bpb.media);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.spfat = {0}", bpb.spfat);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.sptrk = {0}", bpb.sptrk);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.heads = {0}", bpb.heads);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.hsectors = {0}", bpb.hsectors);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.big_sectors = {0}", bpb.big_sectors);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.drive_no = 0x{0:X2}", bpb.drive_no);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.nt_flags = {0}", bpb.nt_flags);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.signature = 0x{0:X2}", bpb.signature);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.serial_no = 0x{0:X8}", bpb.serial_no);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.volume_label = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.volume_label = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(bpb.volume_label));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.fs_type = \"{0}\"", StringHandlers.CToString(bpb.fs_type));
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.fs_type = \"{0}\"", StringHandlers.CToString(bpb.fs_type));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "bpb.boot_code is empty? = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.boot_code is empty? = {0}",
|
||||
ArrayHelpers.ArrayIsNullOrEmpty(bpb.boot_code));
|
||||
|
||||
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(MODULE_NAME, "bpb.unknown = {0}", bpb.unknown);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.unknown2 = {0}", bpb.unknown2);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "bpb.signature2 = {0}", bpb.signature2);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.blockId = \"{0}\"", StringHandlers.CToString(mib.blockId));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.volumeLabel = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.volumeLabel = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(mib.volumeLabel));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.comment = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.comment = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(mib.comment));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.serial = 0x{0:X8}", mib.serial);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.serial = 0x{0:X8}", mib.serial);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.creationTimestamp = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.creationTimestamp = {0}",
|
||||
DateHandlers.DosToDateTime(mib.creationDate, mib.creationTime));
|
||||
|
||||
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(MODULE_NAME, "mib.codepageType = {0}", mib.codepageType);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.codepage = {0}", mib.codepage);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.rps = {0}", mib.rps);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bps = {0}", mib.bps);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.bpc = {0}", mib.bpc);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown2 = {0}", mib.unknown2);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.sectors = {0}", mib.sectors);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown3 = {0}", mib.unknown3);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown4 = {0}", mib.unknown4);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.major = {0}", mib.major);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.minor = {0}", mib.minor);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown5 = {0}", mib.unknown5);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.unknown6 = {0}", mib.unknown6);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "mib.filler is empty? = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "mib.filler is empty? = {0}",
|
||||
ArrayHelpers.ArrayIsNullOrEmpty(mib.filler));
|
||||
|
||||
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(MODULE_NAME, "vib.blockId = \"{0}\"", StringHandlers.CToString(vib.blockId));
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown = {0}", vib.unknown);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown2 = {0}", vib.unknown2);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown3 is empty? = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown3 is empty? = {0}",
|
||||
ArrayHelpers.ArrayIsNullOrEmpty(vib.unknown3));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown4 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown4 = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(vib.unknown4));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.owner = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.owner = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(vib.owner));
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.unknown5 = \"{0}\"",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown5 = \"{0}\"",
|
||||
StringHandlers.SpacePaddedToString(vib.unknown5));
|
||||
|
||||
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(MODULE_NAME, "vib.unknown6 = {0}", vib.unknown6);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.percentFull = {0}", vib.percentFull);
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.unknown7 = {0}", vib.unknown7);
|
||||
|
||||
AaruConsole.DebugWriteLine("HPOFS Plugin", "vib.filler is empty? = {0}",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME, "vib.filler is empty? = {0}",
|
||||
ArrayHelpers.ArrayIsNullOrEmpty(vib.filler));
|
||||
|
||||
sb.AppendLine(Localization.HPOFS_Name);
|
||||
|
||||
Reference in New Issue
Block a user