[Refactor] Fix indentation issues.

This commit is contained in:
2025-11-24 19:38:40 +00:00
parent 5774885431
commit 8331fba1e4
43 changed files with 1700 additions and 1751 deletions

View File

@@ -46,7 +46,7 @@ public sealed partial class DeviceReport
/// <returns>Media report</returns>
public TestedMedia ReportAtaMedia()
{
bool sense = true;
var sense = true;
AtaErrorRegistersChs errorChs = new();
AtaErrorRegistersLba28 errorLba = new();
AtaErrorRegistersLba48 errorLba48 = new();
@@ -181,7 +181,7 @@ public sealed partial class DeviceReport
mediaTest.Manufacturer = ataId.MediaManufacturer;
}
ulong checkCorrectRead = BitConverter.ToUInt64(buffer, 0);
var checkCorrectRead = BitConverter.ToUInt64(buffer, 0);
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -193,11 +193,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadSectorsData = readBuf;
@@ -211,11 +211,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadSectorsRetryData = readBuf;
@@ -229,11 +229,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadDmaData = readBuf;
@@ -247,11 +247,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadDmaRetryData = readBuf;
@@ -264,10 +264,10 @@ public sealed partial class DeviceReport
mediaTest.SupportsSeek = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -279,11 +279,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLbaData = readBuf;
@@ -297,11 +297,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadRetryLbaData = readBuf;
@@ -315,11 +315,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadDmaLbaData = readBuf;
@@ -333,11 +333,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadDmaRetryLbaData = readBuf;
@@ -350,10 +350,10 @@ public sealed partial class DeviceReport
mediaTest.SupportsSeekLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -365,11 +365,11 @@ public sealed partial class DeviceReport
!sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLba48Data = readBuf;
@@ -383,11 +383,11 @@ public sealed partial class DeviceReport
!sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadDmaLba48Data = readBuf;
@@ -432,11 +432,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLongData = readBuf;
@@ -462,11 +462,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLongRetryData = readBuf;
@@ -490,11 +490,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLongLbaData = readBuf;
@@ -518,11 +518,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
mediaTest.ReadLongRetryLbaData = readBuf;
}
@@ -535,7 +535,7 @@ public sealed partial class DeviceReport
/// <summary>Creates a report of an ATA device</summary>
public TestedMedia ReportAta(Identify.IdentifyDevice ataId)
{
bool sense = true;
var sense = true;
byte[] readBuf = [];
AtaErrorRegistersChs errorChs = new();
AtaErrorRegistersLba28 errorLba = new();
@@ -657,11 +657,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadSectorsData = readBuf;
@@ -675,11 +675,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadSectorsRetryData = readBuf;
@@ -693,11 +693,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadDmaData = readBuf;
@@ -711,11 +711,11 @@ public sealed partial class DeviceReport
!sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadDmaRetryData = readBuf;
@@ -728,10 +728,10 @@ public sealed partial class DeviceReport
capabilities.SupportsSeek = !sense && (errorChs.Status & 0x01) != 0x01 && errorChs.Error == 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorChs.Status,
errorChs.Error);
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -743,11 +743,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadLbaData = readBuf;
@@ -761,11 +761,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadRetryLbaData = readBuf;
@@ -779,11 +779,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadDmaLbaData = readBuf;
@@ -797,11 +797,11 @@ public sealed partial class DeviceReport
!sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadDmaRetryLbaData = readBuf;
@@ -814,10 +814,10 @@ public sealed partial class DeviceReport
capabilities.SupportsSeekLba = !sense && (errorLba.Status & 0x01) != 0x01 && errorLba.Error == 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorLba.Status,
errorLba.Error);
Localization.Core.Sense_0_Status_1_Error_2,
sense,
errorLba.Status,
errorLba.Error);
Spectre.ProgressSingleSpinner(ctx =>
{
@@ -829,11 +829,11 @@ public sealed partial class DeviceReport
!sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba48.Status,
errorLba48.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba48.Status,
errorLba48.Error,
readBuf.Length);
capabilities.ReadLba48Data = readBuf;
@@ -847,11 +847,11 @@ public sealed partial class DeviceReport
!sense && (errorLba48.Status & 0x01) != 0x01 && errorLba48.Error == 0 && readBuf.Length > 0;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba48.Status,
errorLba48.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba48.Status,
errorLba48.Error,
readBuf.Length);
capabilities.ReadDmaLba48Data = readBuf;
@@ -896,11 +896,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadLongData = readBuf;
@@ -926,11 +926,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorChs.Status,
errorChs.Error,
readBuf.Length);
capabilities.ReadLongRetryData = readBuf;
@@ -954,11 +954,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadLongLbaData = readBuf;
@@ -982,11 +982,11 @@ public sealed partial class DeviceReport
BitConverter.ToUInt64(readBuf, 0) != checkCorrectRead;
AaruLogging.Debug(ATA_MODULE_NAME,
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
Localization.Core.Sense_0_Status_1_Error_2_Length_3,
sense,
errorLba.Status,
errorLba.Error,
readBuf.Length);
capabilities.ReadLongRetryLbaData = readBuf;
@@ -998,7 +998,7 @@ public sealed partial class DeviceReport
/// <returns>IDENTIFY ATA DEVICE response without the private fields</returns>
public static byte[] ClearIdentify(byte[] buffer)
{
byte[] empty = new byte[512];
var empty = new byte[512];
Array.Copy(empty, 0, buffer, 20, 20);
Array.Copy(empty, 0, buffer, 216, 8);