From fc989161e70628463a8a4f6e67c1033bfdc89f0472755821c6328087270c8d56 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Mon, 6 Feb 2012 21:23:05 +0000 Subject: [PATCH] - qemu-user: fix fallocate OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=48 --- 0053-linux-user-fix-fallocate.patch | 39 +++++++++++++++++++++++++++++ qemu.changes | 5 ++++ qemu.spec | 2 ++ 3 files changed, 46 insertions(+) create mode 100644 0053-linux-user-fix-fallocate.patch diff --git a/0053-linux-user-fix-fallocate.patch b/0053-linux-user-fix-fallocate.patch new file mode 100644 index 0000000..33d9449 --- /dev/null +++ b/0053-linux-user-fix-fallocate.patch @@ -0,0 +1,39 @@ +From 3ed04f86397af1b58f67e449df558370d5125e27 Mon Sep 17 00:00:00 2001 +From: Alexander Graf +Date: Mon, 6 Feb 2012 21:37:07 +0100 +Subject: [PATCH] linux-user: fix fallocate + +Fallocate gets off_t parameters passed in, so we should also read them out +accordingly. + +Signed-off-by: Alexander Graf + +--- + +v1 -> v2: + + - unbreak 64-bit guests +--- + linux-user/syscall.c | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/linux-user/syscall.c b/linux-user/syscall.c +index 7a20af4..cbd37f6 100644 +--- a/linux-user/syscall.c ++++ b/linux-user/syscall.c +@@ -8479,7 +8479,12 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, + #endif /* CONFIG_EVENTFD */ + #if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate) + case TARGET_NR_fallocate: ++#if TARGET_ABI_BITS == 32 ++ ret = get_errno(fallocate(arg1, arg2, target_offset64(arg3, arg4), ++ target_offset64(arg5, arg6))); ++#else + ret = get_errno(fallocate(arg1, arg2, arg3, arg4)); ++#endif + break; + #endif + #if defined(CONFIG_SYNC_FILE_RANGE) +-- +1.6.0.2 + diff --git a/qemu.changes b/qemu.changes index 24aab27..5d91ca1 100644 --- a/qemu.changes +++ b/qemu.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Feb 6 19:29:33 UTC 2012 - agraf@suse.de + +- qemu-user: fix fallocate + ------------------------------------------------------------------- Fri Feb 3 11:49:24 UTC 2012 - agraf@suse.de diff --git a/qemu.spec b/qemu.spec index 315f3a4..7bcfd2e 100644 --- a/qemu.spec +++ b/qemu.spec @@ -78,6 +78,7 @@ Patch0049: 0049-linux-user-add-BLKSSZGET-ioctl-wrapper.patch Patch0050: 0050-linux-user-Add-ioctl-for-BLKBSZGET.patch Patch0051: 0051-linux-user-take-RESERVED_VA-into-account-for-g2h_va.patch Patch0052: 0052-linux-user-binfmt-support-host-binaries.patch +Patch0053: 0053-linux-user-fix-fallocate.patch # this is to make lint happy Source300: rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -189,6 +190,7 @@ run cross architectures builds %patch0050 -p1 %patch0051 -p1 %patch0052 -p1 +%patch0053 -p1 %build # build QEMU