Fix fstatat decoding on ppc64

Andreas Schwab schwab at suse.de
Wed Mar 21 22:12:07 UTC 2007


The struct stat64 defined in asm-powerpc/stat.h is only used for ppc32 and
quite different from the struct stat that is always used on ppc64 (which
has no *stat64 syscalls).  The effect of this bug is that everything
printed after st_nlink is wrong.

Andreas.

2007-03-21  Andreas Schwab  <schwab at suse.de>

	* file.c (sys_newfstatat): Don't use printstat64 on ppc64.

--- file.c.~1.81.~	2007-02-09 15:59:27.000000000 +0100
+++ file.c	2007-03-21 22:45:58.000000000 +0100
@@ -1193,7 +1193,7 @@ sys_newfstatat(struct tcb *tcp)
 		printpath(tcp, tcp->u_arg[1]);
 		tprintf(", ");
 	} else {
-#ifdef HAVE_STAT64
+#if defined HAVE_STAT64 && !(defined POWERPC && defined __powerpc64__)
 		printstat64(tcp, tcp->u_arg[2]);
 #else
 		printstat(tcp, tcp->u_arg[2]);

-- 
Andreas Schwab, SuSE Labs, schwab at suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




More information about the Strace-devel mailing list