SHA256
1
0
forked from pool/qemu

- qemu-user: fix fallocate

OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=48
This commit is contained in:
Alexander Graf 2012-02-06 21:23:05 +00:00 committed by Git OBS Bridge
parent 63ae614b53
commit 37ef84ed38
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From 3ed04f86397af1b58f67e449df558370d5125e27 Mon Sep 17 00:00:00 2001
From: Alexander Graf <agraf@suse.de>
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 <agraf@suse.de>
---
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

View File

@ -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

View File

@ -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