Use object initializer.

This commit is contained in:
2022-11-14 01:23:52 +00:00
parent c4a95c40ca
commit 2b40eab0d2
9 changed files with 85 additions and 68 deletions

View File

@@ -133,11 +133,10 @@ public partial class Device
Command = (byte)AtaCommands.ReadLogExt,
SectorCount = count,
LbaMidCurrent = (byte)(pageNumber & 0xFF),
LbaMidPrevious = (byte)((pageNumber & 0xFF00) / 0x100)
LbaMidPrevious = (byte)((pageNumber & 0xFF00) / 0x100),
LbaLowCurrent = logAddress
};
registers.LbaLowCurrent = logAddress;
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.PioIn, AtaTransferRegister.SectorCount,
ref buffer, timeout, true, out duration, out bool sense);
@@ -167,11 +166,10 @@ public partial class Device
Command = (byte)AtaCommands.ReadLogDmaExt,
SectorCount = count,
LbaMidCurrent = (byte)(pageNumber & 0xFF),
LbaMidPrevious = (byte)((pageNumber & 0xFF00) / 0x100)
LbaMidPrevious = (byte)((pageNumber & 0xFF00) / 0x100),
LbaLowCurrent = logAddress
};
registers.LbaLowCurrent = logAddress;
LastError = SendAtaCommand(registers, out statusRegisters, AtaProtocol.Dma, AtaTransferRegister.SectorCount,
ref buffer, timeout, true, out duration, out bool sense);