Skip to contentSkip to conversation

linux-user: fix ppc target_stat64 st_blocks layout

PATCH New Max Filippov 1 participant 1 message Sep 1, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux-user: fix ppc target_stat64 st_blocks layout

Swap __pad1 and st_blocks fields location to maintain proper alignment. This fixes incorrect 'du' and 'stat' report on ppc guest.

---
 linux-user/syscall_defs.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
linux-user/syscall_defs.h +1 -1
index 7db7a8c..b8c3eaa 100644
@@ -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;
Signature · 1 line
1.6.2.5