summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2012-06-12 04:41:10 +0200
committerYury Usishchev <y.usishchev@samsung.com>2014-12-10 13:48:35 +0300
commit9c047ef19e0dc42a6e280aa9a6e54bc6a26ebd2b (patch)
tree1768260915b9c59f597c8909ca4293d15d273d3e
parent19b1e30663fcae89a7fb0d38e863a15c667ea0ec (diff)
downloadqemu-9c047ef19e0dc42a6e280aa9a6e54bc6a26ebd2b.tar.gz
qemu-9c047ef19e0dc42a6e280aa9a6e54bc6a26ebd2b.tar.bz2
qemu-9c047ef19e0dc42a6e280aa9a6e54bc6a26ebd2b.zip
linux-user: Ignore broken loop ioctl
During invocations of losetup, we run into an ioctl that doesn't exist. However, because of that we output an error, which then screws up the kiwi logic around that call. So let's silently ignore that bogus ioctl. Signed-off-by: Alexander Graf <agraf@suse.de> [AF: Rebased for v2.1.0-rc0] Signed-off-by: Andreas Färber <afaerber@suse.de>
-rw-r--r--linux-user/ioctls.h1
-rw-r--r--linux-user/linux_loop.h1
-rw-r--r--linux-user/syscall.c7
-rw-r--r--linux-user/syscall_defs.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index 921d48216..c180fafb1 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -331,6 +331,7 @@
IOCTL(LOOP_SET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
IOCTL(LOOP_GET_STATUS64, IOC_W, MK_PTR(MK_STRUCT(STRUCT_loop_info64)))
IOCTL(LOOP_CHANGE_FD, 0, TYPE_INT)
+ IOCTL_SPECIAL(LOOP_BOGUS_CMD, 0, do_ioctl_fail, TYPE_INT)
IOCTL(MTIOCTOP, IOC_W, MK_PTR(MK_STRUCT(STRUCT_mtop)))
IOCTL(MTIOCGET, IOC_R, MK_PTR(MK_STRUCT(STRUCT_mtget)))
diff --git a/linux-user/linux_loop.h b/linux-user/linux_loop.h
index 8974caa9d..810ae616e 100644
--- a/linux-user/linux_loop.h
+++ b/linux-user/linux_loop.h
@@ -91,5 +91,6 @@ struct loop_info64 {
#define LOOP_SET_STATUS64 0x4C04
#define LOOP_GET_STATUS64 0x4C05
#define LOOP_CHANGE_FD 0x4C06
+#define LOOP_BOGUS_CMD 0x4C82
#endif
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f6187cec1..84621cc21 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3821,6 +3821,13 @@ static abi_long do_ioctl_kdsigaccept(const IOCTLEntry *ie, uint8_t *buf_temp,
return get_errno(ioctl(fd, ie->host_cmd, sig));
}
+static abi_long do_ioctl_fail(const IOCTLEntry *ie, uint8_t *buf_temp, int fd,
+ abi_long cmd, abi_long arg)
+{
+ /* Fail silently */
+ return -EINVAL;
+}
+
static IOCTLEntry ioctl_entries[] = {
#define IOCTL(cmd, access, ...) \
{ TARGET_ ## cmd, cmd, #cmd, access, 0, { __VA_ARGS__ } },
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 3a559896f..d6ccacc22 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -1061,6 +1061,7 @@ struct target_pollfd {
#define TARGET_LOOP_SET_STATUS64 0x4C04
#define TARGET_LOOP_GET_STATUS64 0x4C05
#define TARGET_LOOP_CHANGE_FD 0x4C06
+#define TARGET_LOOP_BOGUS_CMD 0x4C82
/* fb ioctls */
#define TARGET_FBIOGET_VSCREENINFO 0x4600