mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[Aaru.CommonTypes] 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:
@@ -51,6 +51,7 @@ namespace Aaru.CommonTypes.Structs.Devices.SCSI;
|
||||
SuppressMessage("ReSharper", "MemberCanBePrivate.Global")]
|
||||
public struct Inquiry
|
||||
{
|
||||
const string MODULE_NAME = "SCSI INQUIRY decoder";
|
||||
/// <summary>Peripheral qualifier Byte 0, bits 7 to 5</summary>
|
||||
public byte PeripheralQualifier;
|
||||
/// <summary>Peripheral device type Byte 0, bits 4 to 0</summary>
|
||||
@@ -260,7 +261,7 @@ public struct Inquiry
|
||||
if(SCSIInquiryResponse.Length < 36 &&
|
||||
SCSIInquiryResponse.Length != 5)
|
||||
{
|
||||
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.INQUIRY_response_is_0_bytes_less_than_minimum_of_36_bytes,
|
||||
SCSIInquiryResponse.Length);
|
||||
|
||||
@@ -270,7 +271,7 @@ public struct Inquiry
|
||||
if(SCSIInquiryResponse.Length < SCSIInquiryResponse[4] + 4 &&
|
||||
SCSIInquiryResponse.Length != SCSIInquiryResponse[4])
|
||||
{
|
||||
AaruConsole.DebugWriteLine("SCSI INQUIRY decoder",
|
||||
AaruConsole.DebugWriteLine(MODULE_NAME,
|
||||
Localization.
|
||||
INQUIRY_response_length_0_bytes_is_different_than_specified_in_length_field,
|
||||
SCSIInquiryResponse.Length, SCSIInquiryResponse[4] + 4);
|
||||
|
||||
Reference in New Issue
Block a user