tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
ioctl(), passed structure zeroed
Hello,
I call ioctl() containing request code created with _IOR(..., mystruct)
and kernel module processed it.
When I create instance of mystruct, fill it's members with some values
and I pass it's pointer like third parameter to ioctl() then members of
structure appears zeroed in kernel code.
Is it correct behavior or am I doing something wrong ?
These things are working like I expect:
Regarding to _IOR(..., mystruct) I am able to fill some member values in
kernel code and then these are visible when ioctl() returns in user-mode.
When I use _IOWR(..., mystruct) or _IOW(..., mystruct) and call ioctl()
then members of structure are not zeroed in kernel code.
Peter
Home |
Main Index |
Thread Index |
Old Index