From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:34311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuVj3-00037b-0f for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:03:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RuVj0-0004LL-PC for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:03:48 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:64687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RuVj0-0004L2-KV for qemu-devel@nongnu.org; Mon, 06 Feb 2012 16:03:46 -0500 Received: by qcsc20 with SMTP id c20so3848352qcs.4 for ; Mon, 06 Feb 2012 13:03:45 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1328561133-5485-1-git-send-email-agraf@suse.de> References: <1328561133-5485-1-git-send-email-agraf@suse.de> Date: Mon, 6 Feb 2012 21:03:45 +0000 Message-ID: From: Peter Maydell Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] linux-user: fix fallocate List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Riku Voipio , "qemu-devel@nongnu.org Developers" On 6 February 2012 20:45, Alexander Graf wrote: > Fallocate gets off_t parameters passed in, so we should also read them ou= t > accordingly. > > Signed-off-by: Alexander Graf > --- > =C2=A0linux-user/syscall.c | =C2=A0 =C2=A03 ++- > =C2=A01 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index ee8899e..ca63594 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -8237,7 +8237,8 @@ abi_long do_syscall(void *cpu_env, int num, abi_lon= g arg1, > =C2=A0#endif /* CONFIG_EVENTFD =C2=A0*/ > =C2=A0#if defined(CONFIG_FALLOCATE) && defined(TARGET_NR_fallocate) > =C2=A0 =C2=A0 case TARGET_NR_fallocate: > - =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D get_errno(fallocate(arg1, arg2, arg3= , arg4)); > + =C2=A0 =C2=A0 =C2=A0 =C2=A0ret =3D get_errno(fallocate(arg1, arg2, targ= et_offset64(arg3, arg4), > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0target_offset64(arg5, arg6)= )); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 break; > =C2=A0#endif > =C2=A0#if defined(CONFIG_SYNC_FILE_RANGE) This needs to be guarded with a TARGET_ABI_BITS =3D=3D 32 conditional: 64 bit guests want the original version. -- PMM