-
Notifications
You must be signed in to change notification settings - Fork 714
Open
Description
Greetings,
here's my setup :
aarch64-unknown-linux-gnu
rust 1.88.0gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
ldd (Ubuntu GLIBC 2.35-0ubuntu3.10) 2.35
The C IOCTL is defined with _IOW(IOCTL_MAGIC, 3, ulong)
I'm using ioctl_write_int!
, docs specifies that nix::sys::ioctl::ioctl_param_type
on linux is libc::c_ulong
, which is 8 bytes.
I have checked that
- on rust side with
size_of::<nix::sys::ioctl::ioctl_param_type>()
, reports 8 bytes - on C side with
sizeof(ulong)
, 8 bytes as well
However the ioctl cmd call I receive in my c driver is 0x4004f003
which decodes to dir=1 type=240 nr=3 size=4
.
I couldn't figure where this could be coming from...
My current workaround is to set IOCTL to _IOW(IOCTL_MAGIC, 3, uint)
as I'm ok with this type, but I'm confused by the mismatch.
Please let me know if I can bring more info to help !
Metadata
Metadata
Assignees
Labels
No labels