-
Notifications
You must be signed in to change notification settings - Fork 702
Closed
Description
The KVM ioctl
KVM_GET_API_VERSION
is of type none
/ _IO
. I've tried defining it as:
const KVMIO: u8 = 0xAE;
ioctl!(none get_api_version with KVMIO, 0x00);
let version = unsafe { get_api_version(self.fd)? };
However, this fails with EINVAL
, since the code in the kernel still expects one i32
parameter, which should be 0.
nix
should have some support for an additional parameter with none
ioctl
s. Right now I am manually using libc::ioctl
for this, but the macro should support something like
let version = unsafe { get_api_version(self.fd, 0)? };
Or perhaps add a new ioctl
type, which is the same as none
, but called none_int
, which takes the second parameter.
Metadata
Metadata
Assignees
Labels
No labels