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:26:33 +0200
|
2019-01-04 22:08:16 +01:00
|
|
|
Subject: qemu-cvs-ioctl_debug
|
2009-08-11 17:37:13 +02:00
|
|
|
|
|
|
|
Extends unsupported ioctl debug output.
|
|
|
|
|
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
|
|
|
---
|
2018-12-06 22:20:59 +01:00
|
|
|
linux-user/syscall.c | 14 +++++++++++++-
|
|
|
|
1 file changed, 13 insertions(+), 1 deletion(-)
|
2009-08-11 17:37:13 +02:00
|
|
|
|
|
|
|
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
|
2019-09-12 17:54:03 +02:00
|
|
|
index 17914fadfc9f3390d4b8ab8d74a6..25fd641816c0a54e49a167f5e818 100644
|
2009-08-11 17:37:13 +02:00
|
|
|
--- a/linux-user/syscall.c
|
|
|
|
+++ b/linux-user/syscall.c
|
2019-09-12 17:54:03 +02:00
|
|
|
@@ -5043,7 +5043,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
|
2009-08-11 17:37:13 +02:00
|
|
|
ie = ioctl_entries;
|
|
|
|
for(;;) {
|
|
|
|
if (ie->target_cmd == 0) {
|
|
|
|
- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
|
2018-12-06 22:20:59 +01:00
|
|
|
+ int i;
|
|
|
|
+ gemu_log("Unsupported ioctl: cmd=0x%04lx (%x)\n", (unsigned long)cmd,
|
|
|
|
+ (unsigned int)(cmd & (TARGET_IOC_SIZEMASK << TARGET_IOC_SIZESHIFT))
|
|
|
|
+ >> TARGET_IOC_SIZESHIFT);
|
2011-12-11 03:42:09 +01:00
|
|
|
+ for (i = 0; ioctl_entries[i].target_cmd; i++) {
|
2018-12-06 22:20:59 +01:00
|
|
|
+ if ((ioctl_entries[i].target_cmd & ~(TARGET_IOC_SIZEMASK
|
|
|
|
+ << TARGET_IOC_SIZESHIFT)) == (cmd & ~(TARGET_IOC_SIZEMASK <<
|
|
|
|
+ TARGET_IOC_SIZESHIFT)))
|
|
|
|
+ gemu_log("%p\t->\t%s (%x)\n", (void *)(unsigned long)
|
|
|
|
+ ioctl_entries[i].host_cmd, ioctl_entries[i].name,
|
|
|
|
+ (ioctl_entries[i].target_cmd & (TARGET_IOC_SIZEMASK
|
|
|
|
+ << TARGET_IOC_SIZESHIFT)) >> TARGET_IOC_SIZESHIFT);
|
|
|
|
+ }
|
2009-08-11 17:37:13 +02:00
|
|
|
return -TARGET_ENOSYS;
|
|
|
|
}
|
|
|
|
if (ie->target_cmd == cmd)
|