summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2009-04-14 16:26:33 +0200
committerYury Usishchev <y.usishchev@samsung.com>2014-12-10 13:47:57 +0300
commit3ca2975347d0f9d18346ba41d7de2c839360aefa (patch)
tree3aa7a44738bfa081ed9e4b5d294b914927878fe9
parentf16053b719c6c720375263558966ebc9364a3aec (diff)
downloadqemu-3ca2975347d0f9d18346ba41d7de2c839360aefa.tar.gz
qemu-3ca2975347d0f9d18346ba41d7de2c839360aefa.tar.bz2
qemu-3ca2975347d0f9d18346ba41d7de2c839360aefa.zip
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>
-rw-r--r--linux-user/syscall.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0ea86cbb8..ea8e4dda2 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3844,7 +3844,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)