__put_user — Write a simple value into user space, with less checking.
__put_user ( | x, | |
ptr); |
This macro copies a single simple value from kernel space to user space. It supports simple types like char and int, but not larger data types like structures or arrays.
ptr must have pointer-to-simple-variable type, and x must be assignable
to the result of dereferencing ptr.
Caller must check the pointer with access_ok before calling this
function.
Returns zero on success, or -EFAULT on error.