qemu/qemu-cvs-ioctl_nodirection.patch

25 lines
1010 B
Diff

Index: qemu/linux-user/syscall.c
===================================================================
--- qemu.orig/linux-user/syscall.c
+++ qemu/linux-user/syscall.c
@@ -1980,6 +1980,11 @@ static long do_ioctl(long fd, long cmd,
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)) {
@@ -1994,6 +1999,7 @@ static long do_ioctl(long fd, long cmd,
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);