linux-user: fix ppc target_stat64 st_blocks layout linux-user-for-upstream
authorMax Filippov <jcmvbkbc@gmail.com>
Tue, 1 Sep 2009 19:27:47 +0000 (23:27 +0400)
committerRiku Voipio <riku.voipio@iki.fi>
Thu, 17 Sep 2009 18:20:03 +0000 (21:20 +0300)
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 <jcmvbkbc@gmail.com>
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>

linux-user/syscall_defs.h

index c018165..dce36b2 100644 (file)
@@ -1187,8 +1187,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;