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
|
2019-01-04 22:08:16 +01:00
|
|
|
Subject: 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>
|
2018-12-06 22:20:59 +01:00
|
|
|
[BR: minor edits to pass qemu's checkpatch script]
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
2009-08-11 17:37:13 +02:00
|
|
|
---
|
2019-05-02 00:51:10 +02:00
|
|
|
linux-user/syscall.c | 8 ++++++++
|
|
|
|
1 file changed, 8 insertions(+)
|
2009-08-11 17:37:13 +02:00
|
|
|
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
2020-04-29 02:12:31 +02:00
|
|
|
index 946c1e3a1957ea43368311acecda..894627b9dc8d4f72c06bab90aa9b 100644
|
2009-08-11 17:37:13 +02:00
|
|
|
--- a/linux-user/syscall.c
|
|
|
|
+++ b/linux-user/syscall.c
|
2020-04-29 02:12:31 +02:00
|
|
|
@@ -5346,6 +5346,13 @@ static abi_long do_ioctl(int fd, int 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) {
|
2019-05-02 00:51:10 +02:00
|
|
|
+ /*
|
|
|
|
+ * FIXME: actually the direction given in the ioctl should be
|
2018-12-06 22:20:59 +01:00
|
|
|
+ * correct so we can assume the communication is uni-directional.
|
|
|
|
+ * The alsa developers did not like this concept though and
|
2019-05-02 00:51:10 +02:00
|
|
|
+ * declared ioctls IOC_R and IOC_W even though they were IOC_RW.
|
|
|
|
+ */
|
2009-08-11 17:37:13 +02:00
|
|
|
+/*
|
|
|
|
case IOC_R:
|
2016-09-19 19:06:58 +02:00
|
|
|
ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp));
|
2009-08-11 17:37:13 +02:00
|
|
|
if (!is_error(ret)) {
|
2020-04-29 02:12:31 +02:00
|
|
|
@@ -5364,6 +5371,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
|
2009-08-11 17:37:13 +02:00
|
|
|
unlock_user(argptr, arg, 0);
|
2016-09-19 19:06:58 +02:00
|
|
|
ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp));
|
2009-08-11 17:37:13 +02:00
|
|
|
break;
|
|
|
|
+*/
|
|
|
|
default:
|
|
|
|
case IOC_RW:
|
|
|
|
argptr = lock_user(VERIFY_READ, arg, target_size, 1);
|