mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Fix returning from remote commands.
This commit is contained in:
@@ -86,7 +86,12 @@ namespace DiscImageChef.Devices
|
||||
uint timeout, bool transferBlocks,
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null)) throw new NotImplementedException("Remote CHS ATA commands not yet implemented...");
|
||||
if (!(remote is null))
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
out duration, out sense);
|
||||
|
||||
return Command.SendAtaCommand(PlatformId, FileHandle, registers, out errorRegisters, protocol,
|
||||
transferRegister,
|
||||
@@ -116,7 +121,7 @@ namespace DiscImageChef.Devices
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
remote.SendAtaCommand(registers, out errorRegisters,
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
@@ -150,7 +155,7 @@ namespace DiscImageChef.Devices
|
||||
out double duration, out bool sense)
|
||||
{
|
||||
if (!(remote is null))
|
||||
remote.SendAtaCommand(registers, out errorRegisters,
|
||||
return remote.SendAtaCommand(registers, out errorRegisters,
|
||||
protocol, transferRegister,
|
||||
ref buffer,
|
||||
timeout, transferBlocks,
|
||||
@@ -232,7 +237,7 @@ namespace DiscImageChef.Devices
|
||||
}
|
||||
|
||||
if (!(remote is null))
|
||||
remote.SendMmcCommand(command, write, isApplication, flags,
|
||||
return remote.SendMmcCommand(command, write, isApplication, flags,
|
||||
argument,
|
||||
blockSize, blocks, ref buffer, out response,
|
||||
out duration, out sense, timeout);
|
||||
|
||||
@@ -578,7 +578,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
if (!(remote is null))
|
||||
{
|
||||
if (remote.GetFirewireData(out firewireVendor, out firewireModel,
|
||||
if (remote.GetFireWireData(out firewireVendor, out firewireModel,
|
||||
out firewireGuid, out var remoteFireWireVendorName, out var remoteFireWireModelName))
|
||||
{
|
||||
IsFireWire = true;
|
||||
@@ -656,7 +656,7 @@ namespace DiscImageChef.Devices
|
||||
|
||||
#region PCMCIA
|
||||
|
||||
if(remote is null)
|
||||
if (remote is null)
|
||||
{
|
||||
if (PlatformId == PlatformID.Linux)
|
||||
{
|
||||
|
||||
@@ -248,9 +248,9 @@ namespace DiscImageChef.Devices.Remote
|
||||
return devices.ToArray();
|
||||
}
|
||||
|
||||
public bool Open(string devicePath, out int LastError)
|
||||
public bool Open(string devicePath, out int lastError)
|
||||
{
|
||||
LastError = 0;
|
||||
lastError = 0;
|
||||
|
||||
var cmdPkt = new DicPacketCommandOpenDevice
|
||||
{
|
||||
@@ -271,7 +271,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
if (len != buf.Length)
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Could not write to the network...");
|
||||
LastError = -1;
|
||||
lastError = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
if (len < hdrBuf.Length)
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Could not read from the network...");
|
||||
LastError = -1;
|
||||
lastError = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
if (hdr.id != Consts.PacketId)
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Received data is not a DIC Remote Packet...");
|
||||
LastError = -1;
|
||||
lastError = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Expected List Devices Response Packet, got packet type {0}...",
|
||||
hdr.packetType);
|
||||
LastError = -1;
|
||||
lastError = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -309,7 +309,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
if (len < buf.Length)
|
||||
{
|
||||
DicConsole.ErrorWriteLine("Could not read from the network...");
|
||||
LastError = -1;
|
||||
lastError = -1;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
}
|
||||
|
||||
DicConsole.ErrorWriteLine($"{nop.reason}");
|
||||
LastError = nop.errno;
|
||||
lastError = nop.errno;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1038,7 +1038,7 @@ namespace DiscImageChef.Devices.Remote
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool GetFirewireData(out uint idVendor, out uint idProduct,
|
||||
public bool GetFireWireData(out uint idVendor, out uint idProduct,
|
||||
out ulong guid, out string vendor, out string model)
|
||||
{
|
||||
idVendor = 0;
|
||||
|
||||
@@ -188,5 +188,6 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PCMCIA/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Portillo/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Reiser/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=SDHCI/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=umounting/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=xeto/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
Reference in New Issue
Block a user