From patchwork Fri Apr 6 16:35:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 151262 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 508BCB7099 for ; Sat, 7 Apr 2012 06:01:16 +1000 (EST) Received: from localhost ([::1]:33972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGEUe-0007jB-4a for incoming@patchwork.ozlabs.org; Fri, 06 Apr 2012 15:06:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:37953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGCGH-00042Y-Cc for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SGCGF-0006aL-OM for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:43:44 -0400 Received: from afflict.kos.to ([92.243.29.197]:59849) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SGC89-0004we-SV for qemu-devel@nongnu.org; Fri, 06 Apr 2012 12:35:21 -0400 Received: by afflict.kos.to (Postfix, from userid 1000) id CED8F2653A; Fri, 6 Apr 2012 16:35:17 +0000 (UTC) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Fri, 6 Apr 2012 19:35:08 +0300 Message-Id: <20249ae189ac0baa5011770bccabf3ee802eb2ab.1333729958.git.riku.voipio@linaro.org> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 92.243.29.197 X-Mailman-Approved-At: Fri, 06 Apr 2012 15:05:48 -0400 Cc: Alexander Graf Subject: [Qemu-devel] [PATCH 08/17] linux-user: fix fallocate X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alexander Graf 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 Signed-off-by: Riku Voipio --- 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 9d1c8b2..fdd49b1 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -8485,7 +8485,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)