ioctl decoding fix

Andreas Schwab schwab at suse.de
Fri Jul 18 09:40:30 UTC 2008


All those ioctls with indirect integer parameters are returning an int,
not a long.

Andreas.

2008-07-18  Andreas Schwab  <schwab at suse.de>

	* term.c (term_ioctl): Decode indirect parameter as int, not long.

--- term.c	07 Okt 2005 18:10:06 +0200	1.8
+++ term.c	18 Jul 2008 11:39:16 +0200	
@@ -337,10 +337,10 @@ long code, arg;
 	case TIOCMBIS:
 	case TIOCMBIC:
 	case TIOCMSET:
-		if (umove(tcp, arg, &arg) < 0)
+		if (umove(tcp, arg, &i) < 0)
 			return 0;
 		tprintf(", [");
-		printflags(modem_flags, arg, "TIOCM_???");
+		printflags(modem_flags, i, "TIOCM_???");
 		tprintf("]");
 		return 1;
 #endif /* TIOCMGET */
@@ -414,7 +414,7 @@ long code, arg;
 	case TIOCGPTN:
 #endif
 		tprintf(", ");
-		printnum(tcp, arg, "%d");
+		printnum_int(tcp, arg, "%d");
 		return 1;
 
 #if 0

-- 
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