2011-12-14 02:35:41 +01:00
|
|
|
From 926d75fa4b4b5d95d4b0111e3e0af4d983a9d46b Mon Sep 17 00:00:00 2001
|
2011-12-11 03:42:09 +01:00
|
|
|
From: Alexander Graf <agraf@suse.de>
|
2009-08-11 17:37:13 +02:00
|
|
|
Date: Tue, 14 Apr 2009 16:27:36 +0200
|
2012-01-10 17:25:36 +01:00
|
|
|
Subject: [PATCH 24/44] qemu-cvs-ioctl_nodirection
|
2009-08-11 17:37:13 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2011-12-11 03:42:09 +01:00
|
|
|
Signed-off-by: Alexander Graf <agraf@suse.de>
|
2009-08-11 17:37:13 +02:00
|
|
|
Signed-off-by: Ulrich Hecht <uli@suse.de>
|
|
|
|
---
|
|
|
|
linux-user/syscall.c | 6 ++++++
|
|
|
|
1 files changed, 6 insertions(+), 0 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
2011-12-11 03:42:09 +01:00
|
|
|
index 4f1a5b4..eabeee6 100644
|
2009-08-11 17:37:13 +02:00
|
|
|
--- a/linux-user/syscall.c
|
|
|
|
+++ b/linux-user/syscall.c
|
2011-12-11 03:42:09 +01:00
|
|
|
@@ -3377,6 +3377,11 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
2009-08-11 17:37:13 +02:00
|
|
|
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)) {
|
2011-12-11 03:42:09 +01:00
|
|
|
@@ -3395,6 +3400,7 @@ static abi_long do_ioctl(int fd, abi_long cmd, abi_long arg)
|
2009-08-11 17:37:13 +02:00
|
|
|
unlock_user(argptr, arg, 0);
|
|
|
|
ret = get_errno(ioctl(fd, ie->host_cmd, buf_temp));
|
|
|
|
break;
|
|
|
|
+*/
|
|
|
|
default:
|
|
|
|
case IOC_RW:
|
|
|
|
argptr = lock_user(VERIFY_READ, arg, target_size, 1);
|
|
|
|
--
|
2011-12-11 03:42:09 +01:00
|
|
|
1.6.0.2
|
2009-08-11 17:37:13 +02:00
|
|
|
|