SHA256
1
0
forked from pool/qemu
qemu/0004-qemu-cvs-ioctl_debug.patch
Bruce Rogers efcf6cdbc8 Accepting request 655897 from Virtualization:Staging
Update to qemu 3.1.0-rc5. Is almost certainly the last rc, so should be same as 3.1.0 final. Putting into devel project 'early' because of SLE and Leap needs, not to get into Factory early. Look for the final 3.1 within a week.

OBS-URL: https://build.opensuse.org/request/show/655897
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=433
2018-12-06 21:20:59 +00:00

41 lines
1.8 KiB
Diff

From 84d95b3a1986dadb0ca832c20141dadfdb6bacdd Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH] qemu-cvs-ioctl_debug
Extends unsupported ioctl debug output.
Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
[BR: minor edits to pass qemu's checkpatch script]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
linux-user/syscall.c | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0f6ce7231a..331177716b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4773,7 +4773,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {
- gemu_log("Unsupported ioctl: cmd=0x%04lx\n", (long)cmd);
+ 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);
+ for (i = 0; ioctl_entries[i].target_cmd; i++) {
+ 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);
+ }
return -TARGET_ENOSYS;
}
if (ie->target_cmd == cmd)