From patchwork Tue Sep 1 19:27:47 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Max Filippov X-Patchwork-Id: 32763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id AE261B7BA0 for ; Wed, 2 Sep 2009 05:28:35 +1000 (EST) Received: from localhost ([127.0.0.1]:37271 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiZ1q-0000eE-Dw for incoming@patchwork.ozlabs.org; Tue, 01 Sep 2009 15:28:30 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:to:cc:subject :date:message-id:x-mailer; bh=8pVU60vi8nJDwvMEADIYTIFknVuVh3ycjDLNn2ug7yg=; b=xVeRaYm9hAIFabpayv/CwjEDkwAaiqjpZEsnZHGlDL12ysoRnDvcb9zBKysfSfVTui BEvJhAiht8Ix+krt6hOkKPnuJCRlXmJ0EzT6L7tobxVxMR8SjNBg395PqIMMqc8/g8TK xtTU3L4DzTx+eRV9z3nymbIClO3mOnBhUzwSg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=nB1Ky3kOq1H4BzpVsNSyAGjXVEKDcV4PiURF48mrX50SuDzHbsUF+tN5+B9r6hT6A6 KJwIm9sLDSPS0S/qDshC402VmIbgfQDBkYmhmrgQ+l0njgujQUz7neev+aJCFuFQuHUW XE15N431XTV1i3Jpd2hdGq/mUYw1P6e0FGfwk= Received: by 10.211.159.15 with SMTP id l15mr7626268ebo.96.1251833270806; Tue, 01 Sep 2009 12:27:50 -0700 (PDT) Received: from octofox.metropolis ([91.191.180.215]) by mx.google.com with ESMTPS id 24sm10974eyx.29.2009.09.01.12.27.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Sep 2009 12:27:50 -0700 (PDT) Received: by octofox.metropolis (sSMTP sendmail emulation); Tue, 1 Sep 2009 23:27:47 +0400 From: Max Filippov To: qemu-devel@nongnu.org Date: Tue, 1 Sep 2009 23:27:47 +0400 Message-Id: <1251833267-27347-1-git-send-email-jcmvbkbc@gmail.com> X-Mailer: git-send-email 1.6.2.5 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: Max Filippov Subject: [Qemu-devel] [PATCH] linux-user: fix ppc target_stat64 st_blocks layout X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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;