General cleanup and refactor.

This commit is contained in:
2022-03-07 07:36:44 +00:00
parent bc6e432565
commit 762e3eb6d2
1321 changed files with 44657 additions and 45479 deletions

View File

@@ -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);