Skip to content

Commit

Permalink
linux-user: Fix type for SIOCATMARK ioctl
Browse files Browse the repository at this point in the history
The SIOCATMARK ioctl takes an argument which should be a
pointer to an integer where the kernel will write the result.
We were incorrectly declaring it as TYPE_NULL which would mean
it would always fail (with EFAULT) when it should succeed.
Correct the type.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
  • Loading branch information
pm215 authored and Riku Voipio committed Jul 19, 2016
1 parent 74642d0 commit a57f1f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linux-user/ioctls.h
Expand Up @@ -120,7 +120,7 @@
MK_PTR(MK_STRUCT(STRUCT_fiemap)))
#endif

IOCTL(SIOCATMARK, 0, TYPE_NULL)
IOCTL(SIOCATMARK, IOC_R, MK_PTR(TYPE_INT))
IOCTL(SIOCGIFNAME, IOC_RW, MK_PTR(TYPE_INT))
IOCTL(SIOCGIFFLAGS, IOC_W | IOC_R, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
IOCTL(SIOCSIFFLAGS, IOC_W, MK_PTR(MK_STRUCT(STRUCT_short_ifreq)))
Expand Down

0 comments on commit a57f1f8

Please sign in to comment.