Added FreeBSD support for ATA commands.

This commit is contained in:
2017-12-11 00:23:13 +00:00
parent 60bc3eb8e5
commit 7e4ba43063
3 changed files with 309 additions and 7 deletions

View File

@@ -195,6 +195,11 @@ namespace DiscImageChef.Devices
return Linux.Command.SendAtaCommand((int)fd, registers, out errorRegisters, protocol,
transferRegister, ref buffer, timeout, transferBlocks, out duration, out sense);
}
case Interop.PlatformID.FreeBSD:
{
return FreeBSD.Command.SendAtaCommand((IntPtr)fd, registers, out errorRegisters, protocol,
ref buffer, timeout, out duration, out sense);
}
default:
throw new InvalidOperationException(string.Format("Platform {0} not yet supported.", ptID));
}
@@ -245,6 +250,11 @@ namespace DiscImageChef.Devices
return Linux.Command.SendAtaCommand((int)fd, registers, out errorRegisters, protocol,
transferRegister, ref buffer, timeout, transferBlocks, out duration, out sense);
}
case Interop.PlatformID.FreeBSD:
{
return FreeBSD.Command.SendAtaCommand((IntPtr)fd, registers, out errorRegisters, protocol,
ref buffer, timeout, out duration, out sense);
}
default:
throw new InvalidOperationException(string.Format("Platform {0} not yet supported.", ptID));
}
@@ -279,6 +289,11 @@ namespace DiscImageChef.Devices
return Linux.Command.SendAtaCommand((int)fd, registers, out errorRegisters, protocol,
transferRegister, ref buffer, timeout, transferBlocks, out duration, out sense);
}
case Interop.PlatformID.FreeBSD:
{
return FreeBSD.Command.SendAtaCommand((IntPtr)fd, registers, out errorRegisters, protocol,
ref buffer, timeout, out duration, out sense);
}
default:
throw new InvalidOperationException(string.Format("Platform {0} not yet supported.", ptID));
}