mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
General cleanup and refactor.
This commit is contained in:
@@ -30,10 +30,10 @@
|
||||
// Copyright © 2011-2022 Natalia Portillo
|
||||
// ****************************************************************************/
|
||||
|
||||
using Aaru.Console;
|
||||
|
||||
namespace Aaru.Devices;
|
||||
|
||||
using Aaru.Console;
|
||||
|
||||
public sealed partial class Device
|
||||
{
|
||||
/// <summary>Reads an attribute from the medium auxiliary memory, or reports which elements in the changer contain one</summary>
|
||||
@@ -53,7 +53,7 @@ public sealed partial class Device
|
||||
uint timeout, out double duration)
|
||||
{
|
||||
buffer = new byte[256];
|
||||
byte[] cdb = new byte[16];
|
||||
var cdb = new byte[16];
|
||||
senseBuffer = new byte[64];
|
||||
|
||||
cdb[0] = (byte)ScsiCommands.ReadAttribute;
|
||||
@@ -81,7 +81,7 @@ public sealed partial class Device
|
||||
if(sense)
|
||||
return true;
|
||||
|
||||
uint attrLen = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] + 4);
|
||||
var attrLen = (uint)((buffer[0] << 24) + (buffer[1] << 16) + (buffer[2] << 8) + buffer[3] + 4);
|
||||
buffer = new byte[attrLen];
|
||||
cdb[10] = (byte)((buffer.Length & 0xFF000000) >> 24);
|
||||
cdb[11] = (byte)((buffer.Length & 0xFF0000) >> 16);
|
||||
|
||||
Reference in New Issue
Block a user