diff mbox

[PULL,15/16] linux-user: Fix type for SIOCATMARK ioctl

Message ID 96069eea4bdf15b482e505b70f13548ee6ca0d01.1468932683.git.riku.voipio@linaro.org
State Accepted
Commit a57f1f8f52aec5c83e63ddf274fd18e2eece5f2b
Headers show

Commit Message

Riku Voipio July 19, 2016, 12:54 p.m. UTC
From: Peter Maydell <peter.maydell@linaro.org>


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>

---
 linux-user/ioctls.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.1.4
diff mbox

Patch

diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 4b36baa..7e2c133 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -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)))