From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiZ1G-0000dB-2t for qemu-devel@nongnu.org; Tue, 01 Sep 2009 15:27:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiZ1E-0000cg-Qd for qemu-devel@nongnu.org; Tue, 01 Sep 2009 15:27:53 -0400 Received: from [199.232.76.173] (port=43369 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiZ1E-0000cX-N0 for qemu-devel@nongnu.org; Tue, 01 Sep 2009 15:27:52 -0400 Received: from ey-out-1920.google.com ([74.125.78.145]:62022) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiZ1E-0006xO-Cl for qemu-devel@nongnu.org; Tue, 01 Sep 2009 15:27:52 -0400 Received: by ey-out-1920.google.com with SMTP id 13so75019eye.14 for ; Tue, 01 Sep 2009 12:27:50 -0700 (PDT) From: Max Filippov Date: Tue, 1 Sep 2009 23:27:47 +0400 Message-Id: <1251833267-27347-1-git-send-email-jcmvbkbc@gmail.com> Subject: [Qemu-devel] [PATCH] linux-user: fix ppc target_stat64 st_blocks layout List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Max Filippov Swap __pad1 and st_blocks fields location to maintain proper alignment. This fixes incorrect 'du' and 'stat' report on ppc guest. Signed-off-by: Max Filippov --- linux-user/syscall_defs.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 7db7a8c..b8c3eaa 100644 --- a/linux-user/syscall_defs.h +++ b/linux-user/syscall_defs.h @@ -1152,8 +1152,8 @@ struct __attribute__((__packed__)) target_stat64 { unsigned long long __pad0; long long st_size; int st_blksize; - long long st_blocks; /* Number 512-byte blocks allocated. */ unsigned int __pad1; + long long st_blocks; /* Number 512-byte blocks allocated. */ int target_st_atime; unsigned int target_st_atime_nsec; int target_st_mtime; -- 1.6.2.5