SHA256
1
0
forked from pool/qemu
qemu/0007-qemu-cvs-ioctl_debug.patch
OBS User autobuild 74f46db5e6 Accepting request 2136 from GNOME:Factory
Copy from IBS home:uli_suse:branches:SUSE:Factory:Head/qemu based on submit request 2136 from user uli_suse

OBS-URL: https://build.opensuse.org/request/show/2136
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=34
2009-10-12 14:47:59 +00:00

34 lines
1.4 KiB
Diff

From 4ec256fd6d555ec61f0a1bd530ff66860937b232 Mon Sep 17 00:00:00 2001
From: Ulrich Hecht <uli@suse.de>
Date: Tue, 14 Apr 2009 16:26:33 +0200
Subject: [PATCH 07/33] qemu-cvs-ioctl_debug
Extends unsupported ioctl debug output.
Signed-off-by: Ulrich Hecht <uli@suse.de>
---
linux-user/syscall.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 70d3b2d..ce5283c 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2890,7 +2890,12 @@ static abi_long do_ioctl(int fd, abi_long 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)
--
1.6.2.1