qemu/qemu-cvs-ioctl_nodirection.patch

25 lines
936 B
Diff

Index: qemu/linux-user/syscall.c
================================================================================
--- qemu/linux-user/syscall.c
+++ qemu/linux-user/syscall.c
@@ -2117,6 +2117,11 @@
arg_type++;
target_size = thunk_type_size(arg_type, 0);
switch(ie->access) {
+ /* FIXME: actually the direction given in the ioctl should be
+ * correct so we can assume the communication is uni-directional.
+ * The alsa developers did not like this concept though and
+ * declared ioctls IOC_R and IOC_W even though they were IOC_RW.*/
+/*
case IOC_R:
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
if (!is_error(ret)) {
@@ -2131,6 +2136,7 @@
unlock_user(argptr, arg, 0);
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
break;
+*/
default:
case IOC_RW:
argptr = lock_user(arg, target_size, 1);