- Add fix for bogus losetup ioctl to not warn us about it

OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=80
This commit is contained in:
Alexander Graf 2012-06-13 08:19:32 +00:00 committed by Git OBS Bridge
parent 771ce6e1b1
commit fa372379e4
5 changed files with 82 additions and 5 deletions

View File

@ -1,8 +1,7 @@
From 8cc5120497695e7ea8dde9b096eb6c8cb9b6ac35 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 29 May 2012 17:28:07 +0200
Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb
mode
Subject: [PATCH] linux-user: ARM: Ignore immediate value for svc in thumb mode
When running in thumb mode, Linux doesn't evaluate the immediate value
of the svc instruction, but instead just always assumes the syscall number

View File

@ -1,10 +1,9 @@
From 57fd4d50146ef90693d569ee799f7e9e9d606e05 Mon Sep 17 00:00:00 2001
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Thu, 7 Jun 2012 01:11:00 +0400
Subject: [PATCH] use --libexecdir instead of ignoring it first and
reinventing it later
Subject: [PATCH] use --libexecdir instead of ignoring it first and reinventing it later
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Commit 7b93fadf3a38d1ed65ea5536a52efc2772c6e3b8 "Add basic version

View File

@ -0,0 +1,72 @@
From fa3ea9d74060806eb6fc0792483d41c3a684e2d0 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
Date: Tue, 12 Jun 2012 04:41:10 +0200
Subject: [PATCH] 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>
---
linux-user/ioctls.h | 1 +
linux-user/linux_loop.h | 1 +
linux-user/syscall.c | 7 +++++++
linux-user/syscall_defs.h | 1 +
4 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h
index e8c1c69..97c3f10 100644
--- a/linux-user/ioctls.h
+++ b/linux-user/ioctls.h
@@ -328,6 +328,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 8974caa..810ae61 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 06408bd..46e964b 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3580,6 +3580,13 @@ out:
return ret;
}
+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 be8760c..b76f64a 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -968,6 +968,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

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Wed Jun 13 08:19:01 UTC 2012 - agraf@suse.com
- Add fix for bogus losetup ioctl to not warn us about it
-------------------------------------------------------------------
Sat Jun 9 19:09:39 UTC 2012 - brogers@suse.com

View File

@ -46,6 +46,7 @@ Patch0019: 0019-linux-user-ARM-Ignore-immediate-val.patch
Patch0020: 0020-linux-user-arm-no-tb_flush-on-reset.patch
Patch0021: 0021-linux-user-fix-multi-threaded-proc-.patch
Patch0022: 0022-use-libexecdir-instead-of-ignoring-.patch
Patch0023: 0023-linux-user-Ignore-broken-loop-ioctl.patch
# this is to make lint happy
Source300: rpmlintrc
Source301: qemu-tools-rpmlintrc
@ -161,6 +162,7 @@ run cross-architecture builds.
%patch0020 -p1
%patch0021 -p1
%patch0022 -p1
%patch0023 -p1
%build
# build QEMU