From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KIIU3-00057R-6y for qemu-devel@nongnu.org; Mon, 14 Jul 2008 03:28:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KIIU1-00056s-Pz for qemu-devel@nongnu.org; Mon, 14 Jul 2008 03:28:30 -0400 Received: from [199.232.76.173] (port=57824 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KIIU1-00056f-AP for qemu-devel@nongnu.org; Mon, 14 Jul 2008 03:28:29 -0400 Received: from mx20.gnu.org ([199.232.41.8]:5847) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KIIU0-0006Xi-V8 for qemu-devel@nongnu.org; Mon, 14 Jul 2008 03:28:29 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KIIU0-0006ct-0L for qemu-devel@nongnu.org; Mon, 14 Jul 2008 03:28:28 -0400 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id 29B0BE7DCDDD for ; Mon, 14 Jul 2008 09:28:27 +0200 (CEST) Received: from [88.65.248.219] (helo=[192.168.1.198]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1KIITz-00021E-00 for qemu-devel@nongnu.org; Mon, 14 Jul 2008 09:28:27 +0200 Message-ID: <487B001A.70706@web.de> Date: Mon, 14 Jul 2008 09:28:26 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <487A6593.5020508@web.de> In-Reply-To: <487A6593.5020508@web.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Sender: jan.kiszka@web.de Subject: [Qemu-devel] Re: [PATCH] linux-user: Fix target_statfs[64] on 64-bit hosts Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jan Kiszka wrote: > Testing qemu-x86_64, I happen to run df and came across these mistakes > in the target_statfs/target_statfs64 structure definitions (reference: > linux/include/asm-x86/statfs.h). Forget this, broke 32-bit guest. The trick is to enable the last but one #if block also for x86_64 on x86_64. I've nothing to test here, but my strong feeling is that SPARC64 needs an according fix as well. -------- Use correct target_statfs[_64] definitions for x86/sparc64 on 64-bit. Signed-off-by: Jan Kiszka --- linux-user/syscall_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: b/linux-user/syscall_defs.h =================================================================== --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1570,7 +1570,7 @@ struct target_statfs64 { uint32_t f_namelen; uint32_t f_spare[6]; }; -#elif defined(TARGET_PPC64) && !defined(TARGET_ABI32) +#elif (defined(TARGET_PPC64) || defined(TARGET_X86_64) || defined(TARGET_SPARC64)) && !defined(TARGET_ABI32) struct target_statfs { abi_long f_type; abi_long f_bsize;