Index: ChangeLog
===================================================================
RCS file: /cvsroot/strace/strace/ChangeLog,v
retrieving revision 1.167
diff -b -p -u -r1.167 ChangeLog
--- ChangeLog	11 Nov 2002 12:50:47 -0000	1.167
+++ ChangeLog	15 Dec 2002 10:04:25 -0000
@@ -1,3 +1,43 @@
+2002-12-15  Roland McGrath  <roland@redhat.com>
+
+	* desc.c (sys_osf_select): Add missing return type.
+
+	* syscall.c (trace_syscall): Use strerror, not sys_errlist/sys_nerr.
+
+	* linux/ia64/syscallent.h: Remove macros for sys_delete_module,
+	sys_nanosleep, both already in linux/dummy.h.
+
+	* syscall.c (get_scno): Move static `currpers' inside #ifdef X86_64.
+	(trace_syscall): Fix return without value.
+
+	* linux/syscallent.h: Update table with names of new syscalls
+	io_setup, io_destroy, io_getvents, io_submit, io_cancel.
+	* linux/ia64/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+
+	* signal.c [LINUX && I386]: Provide SA_RESTORER constant if not
+	defined.  If the bit is set, print the sa_restorer field of sigaction.
+
+	* mem.c: Add sys_{get,set}_thread_area.
+	* linux/syscall.h: Declare them.
+	* linux/syscallent.h: Update the table for these.
+	* linux/dummy.h (sys_modify_ldt): Define only #ifndef I386.
+	(sys_get_thread_area, sys_set_thread_area): New macros #ifndef I386.
+
+	* configure.in: Check for linux/xattr.h and linux/futex.h headers.
+	* linux/syscall.h: Add sys_* decls for new syscalls getpmsg, putpmsg,
+	readahead, sendfile64, setxattr, fsetxattr, getxattr, fgetxattr, int
+	listxattr, flistxattr, removexattr, fremovexattr, sched_setaffinity,
+	sched_getaffinity, futex.
+	* linux/syscallent.h: Update the table.
+	* io.c: Add sys_sendfile64.
+	* file.c: Add sys_readahead, sys_*xattr.
+	* process.c: Add sys_futex, sys_*affinity.
+
+	* linux/syscall.h (SYS_socket_subcall): Define to 256 on all machines.
+	(SYS_ipc_subcall): Always SYS_socket_subcall + SYS_socket_nsubcalls.
+	* linux/syscallent.h: Update the table for socket and ipc subcalls.
+
 2002-11-09  Heiko Carstens <heiko.carstens@de.ibm.com>
 
 	Bugfix for s390/s390x:
Index: configure.in
===================================================================
RCS file: /cvsroot/strace/strace/configure.in,v
retrieving revision 1.39
diff -b -p -u -r1.39 configure.in
--- configure.in	7 Oct 2002 14:31:05 -0000	1.39
+++ configure.in	15 Dec 2002 10:04:25 -0000
@@ -173,7 +173,7 @@ if test x$OPSYS != xLINUX; then
 AC_CHECK_LIB(nsl, main)
 fi
 AC_CHECK_FUNCS(sigaction strerror strsignal pread sys_siglist _sys_siglist getdents mctl putpmsg prctl sendmsg inet_ntop if_indextoname)
-AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/icmp.h linux/in6.h sys/uio.h sys/aio.h linux/netlink.h linux/if_packet.h poll.h sys/poll.h sys/vfs.h netinet/tcp.h netinet/udp.h asm/sysmips.h linux/utsname.h sys/nscsys.h)
+AC_CHECK_HEADERS(sys/reg.h sys/filio.h sys/acl.h sys/asynch.h sys/door.h stropts.h sys/conf.h sys/stream.h sys/tihdr.h sys/tiuser.h sys/sysconfig.h asm/sigcontext.h ioctls.h sys/ioctl.h sys/ptrace.h termio.h linux/ptrace.h asm/reg.h linux/icmp.h linux/in6.h sys/uio.h sys/aio.h linux/netlink.h linux/if_packet.h poll.h sys/poll.h sys/vfs.h netinet/tcp.h netinet/udp.h asm/sysmips.h linux/utsname.h sys/nscsys.h linux/xattr.h linux/futex.h)
 AC_DECL_SYS_ERRLIST
 AC_DECL_SYS_SIGLIST
 AC_DECL__SYS_SIGLIST
Index: desc.c
===================================================================
RCS file: /cvsroot/strace/strace/desc.c,v
retrieving revision 1.10
diff -b -p -u -r1.10 desc.c
--- desc.c	9 Oct 2001 23:47:38 -0000	1.10
+++ desc.c	15 Dec 2002 10:04:25 -0000
@@ -540,6 +540,7 @@ struct tcb *tcp;
 }
 
 #ifdef ALPHA
+int
 sys_osf_select(tcp)
 struct tcb *tcp;
 {
Index: file.c
===================================================================
RCS file: /cvsroot/strace/strace/file.c,v
retrieving revision 1.47
diff -b -p -u -r1.47 file.c
--- file.c	7 Oct 2002 14:31:06 -0000	1.47
+++ file.c	15 Dec 2002 10:04:25 -0000
@@ -133,6 +133,13 @@ struct stat {
 #include <sys/vfs.h>
 #endif
 
+#ifdef HAVE_LINUX_XATTR_H
+#include <linux/xattr.h>
+#elif defined linux
+#define XATTR_CREATE 1
+#define XATTR_REPLACE 2
+#endif
+
 #ifdef FREEBSD
 #include <sys/param.h>
 #include <sys/mount.h>
@@ -421,6 +428,24 @@ struct tcb *tcp;
     }
     return 0;
 }
+
+int
+sys_readahead (tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, %lld, %ld", tcp->u_arg[0],
+# if defined IA64 || defined X86_64 || defined ALPHA
+		(long long int) tcp->u_arg[1], tcp->u_arg[2]
+# else
+		(((long long int) tcp->u_arg[1]) << 32
+		 | ((unsigned long *) tcp->u_arg)[2]),
+		tcp->u_arg[3]
+# endif
+		);
+    }
+    return 0;
+}
 #endif
 
 #if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
@@ -1854,7 +1879,9 @@ struct tcb *tcp;
 #ifdef SVR4
 		if (!abbrev(tcp)) {
 			tprintf("%s{d_ino=%lu, d_off=%lu, ",
-				i ? " " : "", d->d_ino, d->d_off);
+				i ? " " : "",
+				(unsigned long) d->d_ino,
+				(unsigned long) d->d_off);
 			tprintf("d_reclen=%u, d_name=\"%s\"}",
 				d->d_reclen, d->d_name);
 		}
@@ -2124,3 +2151,120 @@ struct tcb *tcp;
 }
 
 #endif /* HAVE_SYS_ASYNCH_H */
+
+#ifdef XATTR_CREATE
+
+struct xlat xattrflags[] = {
+	{ XATTR_CREATE,	 "XATTR_CREATE" },
+	{ XATTR_REPLACE, "XATTR_REPLACE" },
+	{ 0,		 NULL }
+};
+
+int
+sys_setxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	printpath(tcp, tcp->u_arg[0]);
+	tprintf(", ");
+	printstr(tcp, tcp->u_arg[1], -1);
+	/* XXX Print value in format */
+	tprintf(", %p, %ld, ", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+	printflags(xattrflags, tcp->u_arg[4]);
+    }
+    return 0;
+}
+
+int
+sys_fsetxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, ", tcp->u_arg[0]);
+	printstr(tcp, tcp->u_arg[1], -1);
+	/* XXX Print value in format */
+	tprintf(", %p, %ld, ", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+	printflags(xattrflags, tcp->u_arg[4]);
+    }
+    return 0;
+}
+
+int
+sys_getxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	printpath(tcp, tcp->u_arg[0]);
+	tprintf(", ");
+	printstr(tcp, tcp->u_arg[1], -1);
+    } else {
+	/* XXX Print value in format */
+	tprintf(", %p, %ld", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+    }
+    return 0;
+}
+
+int
+sys_fgetxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, ", tcp->u_arg[0]);
+	printstr(tcp, tcp->u_arg[1], -1);
+    } else {
+	/* XXX Print value in format */
+	tprintf(", %p, %ld", (void *) tcp->u_arg[2], tcp->u_arg[3]);
+    }
+    return 0;
+}
+
+int
+sys_listxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	printpath(tcp, tcp->u_arg[0]);
+    } else {
+	/* XXX Print value in format */
+	tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+    }
+    return 0;
+}
+
+int
+sys_flistxattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld", tcp->u_arg[0]);
+    } else {
+	/* XXX Print value in format */
+	tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+    }
+    return 0;
+}
+
+int
+sys_removexattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	printpath(tcp, tcp->u_arg[0]);
+	tprintf(", ");
+	printstr(tcp, tcp->u_arg[1], -1);
+    }
+    return 0;
+}
+
+int
+sys_fremovexattr(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, ", tcp->u_arg[0]);
+	printstr(tcp, tcp->u_arg[1], -1);
+    }
+    return 0;
+}
+
+#endif
Index: io.c
===================================================================
RCS file: /cvsroot/strace/strace/io.c,v
retrieving revision 1.12
diff -b -p -u -r1.12 io.c
--- io.c	23 May 2002 11:48:58 -0000	1.12
+++ io.c	15 Dec 2002 10:04:26 -0000
@@ -280,6 +280,25 @@ struct tcb *tcp;
 	return 0;
 }
 
+int
+sys_sendfile64(tcp)
+struct tcb *tcp;
+{
+	if (entering(tcp)) {
+		loff_t offset;
+
+		tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
+		if (!tcp->u_arg[2])
+			tprintf("NULL");
+		else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
+			tprintf("%#lx", tcp->u_arg[2]);
+		else
+			tprintf("[%llu]", (unsigned long long int) offset);
+		tprintf(", %lu", tcp->u_arg[3]);
+	}
+	return 0;
+}
+
 #endif /* LINUX */
 
 #if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
Index: mem.c
===================================================================
RCS file: /cvsroot/strace/strace/mem.c,v
retrieving revision 1.22
diff -b -p -u -r1.22 mem.c
--- mem.c	23 Sep 2002 15:41:02 -0000	1.22
+++ mem.c	15 Dec 2002 10:04:26 -0000
@@ -505,6 +505,28 @@ struct tcb *tcp;
 }
 
 #if defined(LINUX) && defined(__i386__)
+static void
+print_ldt_entry (ldt_entry)
+struct modify_ldt_ldt_s *ldt_entry;
+{
+	tprintf("base_addr:%#08lx, "
+		"limit:%d, "
+		"seg_32bit:%d, "
+		"contents:%d, "
+		"read_exec_only:%d, "
+		"limit_in_pages:%d, "
+		"seg_not_present:%d, "
+		"useable:%d}",
+		ldt_entry->base_addr,
+		ldt_entry->limit,
+		ldt_entry->seg_32bit,
+		ldt_entry->contents,
+		ldt_entry->read_exec_only,
+		ldt_entry->limit_in_pages,
+		ldt_entry->seg_not_present,
+		ldt_entry->useable);
+}
+
 int
 sys_modify_ldt(tcp)
 struct tcb *tcp;
@@ -521,27 +543,62 @@ struct tcb *tcp;
 			if (!verbose(tcp))
 				tprintf("...}");
 			else {
-				tprintf("base_addr:%#08lx, "
-						"limit:%d, "
-						"seg_32bit:%d, "
-						"contents:%d, "
-						"read_exec_only:%d, "
-						"limit_in_pages:%d, "
-						"seg_not_present:%d, "
-						"useable:%d}",
-						copy.base_addr,
-						copy.limit,
-						copy.seg_32bit,
-						copy.contents,
-						copy.read_exec_only,
-						copy.limit_in_pages,
-						copy.seg_not_present,
-						copy.useable);
+				print_ldt_entry(&copy);
 			}
 		}
 		tprintf(", %lu", tcp->u_arg[2]);
 	}
 	return 0;
+}
+
+int
+sys_set_thread_area(tcp)
+struct tcb *tcp;
+{
+	struct modify_ldt_ldt_s copy;
+	if (entering(tcp)) {
+		if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
+			if (copy.entry_number == -1)
+				tprintf("{entry_number:%d -> ",
+					copy.entry_number);
+			else
+				tprintf("{entry_number:");
+		}
+	} else {
+		if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
+			tprintf("%d, ", copy.entry_number);
+			if (!verbose(tcp))
+				tprintf("...}");
+			else {
+				print_ldt_entry(&copy);
+			}
+		} else {
+			tprintf("%lx", tcp->u_arg[0]);
+		}
+	}
+	return 0;
+			
+}
+
+int
+sys_get_thread_area(tcp)
+struct tcb *tcp;
+{
+	struct modify_ldt_ldt_s copy;
+	if (exiting(tcp)) {
+		if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
+			tprintf("{entry_number:%d, ", copy.entry_number);
+			if (!verbose(tcp))
+				tprintf("...}");
+			else {
+				print_ldt_entry(&copy);
+			}
+		} else {
+			tprintf("%lx", tcp->u_arg[0]);
+		}
+	}
+	return 0;
+			
 }
 #endif /* LINUX && __i386__ */
 
Index: process.c
===================================================================
RCS file: /cvsroot/strace/strace/process.c,v
retrieving revision 1.38
diff -b -p -u -r1.38 process.c
--- process.c	7 Oct 2002 14:31:07 -0000	1.38
+++ process.c	15 Dec 2002 10:04:27 -0000
@@ -83,6 +83,20 @@
 #include <linux/ptrace.h>
 #endif
 
+#ifdef HAVE_LINUX_FUTEX_H
+#include <linux/futex.h>
+#endif
+#if defined LINUX
+# ifndef FUTEX_WAIT
+#  define FUTEX_WAIT 0
+# endif
+# ifndef FUTEX_WAKE
+#  define FUTEX_WAKE 1
+# endif
+# ifndef FUTEX_FD
+#  define FUTEX_FD 2
+# endif
+#endif
 
 #ifdef LINUX
 #include <asm/posix_types.h>
@@ -2352,3 +2366,63 @@ struct tcb *tcp;
 }
 
 #endif /* !SVR4 */
+
+#ifdef LINUX
+static struct xlat futexops[] = {
+	{ FUTEX_WAIT,	"FUTEX_WAIT" },
+	{ FUTEX_WAKE,	"FUTEX_WAKE" },
+	{ FUTEX_FD,	"FUTEX_FD" },
+	{ 0,		NULL }
+};
+
+int
+sys_futex(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%p, ", (void *) tcp->u_arg[0]);
+	printflags(futexops, tcp->u_arg[1]);
+	tprintf(", %ld, ", tcp->u_arg[2]);
+	printtv(tcp, tcp->u_arg[3]);
+    }
+    return 0;
+}
+
+static void
+print_affinitylist(list, len)
+unsigned long *list;
+unsigned int len;
+{
+    int first = 1;
+    tprintf(" {");
+    while (len > sizeof (unsigned long)) {
+	tprintf("%s %lx", first ? "" : ",", *list++);
+	first = 0;
+	len -= sizeof (unsigned long);
+    }
+    tprintf(" }");
+}
+
+int
+sys_sched_setaffinity(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
+	print_affinitylist((unsigned long *) tcp->u_arg[2], tcp->u_arg[1]);
+    }
+    return 0;
+}
+
+int
+sys_sched_getaffinity(tcp)
+struct tcb *tcp;
+{
+    if (entering(tcp)) {
+	tprintf("%ld, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
+    } else {
+	print_affinitylist((unsigned long *) tcp->u_arg[2], tcp->u_rval);
+    }
+    return 0;
+}
+#endif
Index: signal.c
===================================================================
RCS file: /cvsroot/strace/strace/signal.c,v
retrieving revision 1.36
diff -b -p -u -r1.36 signal.c
--- signal.c	7 Oct 2002 14:31:09 -0000	1.36
+++ signal.c	15 Dec 2002 10:04:28 -0000
@@ -174,6 +174,14 @@ static struct xlat sigvec_flags[] = {
 
 #ifdef HAVE_SIGACTION
 
+#if defined LINUX && defined I386
+/* The libc headers do not define this constant since it should only be
+   used by the implementation.  So wwe define it here.  */
+# ifndef SA_RESTORER
+#  define SA_RESTORER 0x04000000
+# endif
+#endif
+
 static struct xlat sigact_flags[] = {
 #ifdef SA_RESTORER
 	{ SA_RESTORER,	"SA_RESTORER"	},
@@ -1084,6 +1092,10 @@ struct tcb *tcp;
 			tprintf(", ");
 			if (!printflags(sigact_flags, sa.sa_flags))
 				tprintf("0");
+#ifdef SA_RESTORER
+			if (sa.sa_flags & SA_RESTORER)
+				tprintf(", %p", sa.sa_restorer);
+#endif
 			tprintf("}");
 		}
 	}
@@ -1771,6 +1783,10 @@ sys_rt_sigaction(tcp)
 				tprintf(", ");
 				if (!printflags(sigact_flags, sa.sa_flags))
 					tprintf("0");
+#ifdef SA_RESTORER
+				if (sa.sa_flags & SA_RESTORER)
+					tprintf(", %p", sa.sa_restorer);
+#endif
 				tprintf("}");
 		}
 	}
Index: syscall.c
===================================================================
RCS file: /cvsroot/strace/strace/syscall.c,v
retrieving revision 1.40
diff -b -p -u -r1.40 syscall.c
--- syscall.c	11 Nov 2002 12:50:47 -0000	1.40
+++ syscall.c	15 Dec 2002 10:04:29 -0000
@@ -71,11 +71,6 @@
 # include <asm/rse.h>
 #endif
 
-#ifndef SYS_ERRLIST_DECLARED
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif /* SYS_ERRLIST_DECLARED */
-
 #define NR_SYSCALL_BASE 0
 #ifdef LINUX
 #ifndef ERESTARTSYS
@@ -701,7 +696,6 @@ get_scno(tcp)
 struct tcb *tcp;
 {
 	long scno = 0;
-	static int currpers=-1;
 #ifndef USE_PROCFS
 	int pid = tcp->pid;
 #endif /* !PROCFS */	
@@ -803,6 +797,7 @@ struct tcb *tcp;
 		return -1;
 
 	if (!(tcp->flags & TCB_INSYSCALL)) { 
+	  	static int currpers=-1;
 		long val;
 
 		/* Check CS register value. On x86-64 linux it is:
@@ -1818,7 +1813,7 @@ struct tcb *tcp;
 			sys_res = printargs(tcp);
 		else {
 			if (not_failing_only && tcp->u_error)
-				return;	/* ignore failed syscalls */
+				return 0;	/* ignore failed syscalls */
 			sys_res = (*sysent[tcp->scno].sys_func)(tcp);
 		}	
 		u_error = tcp->u_error;
@@ -1848,17 +1843,12 @@ struct tcb *tcp;
 				tprintf("= -1 ");
 				if (u_error < 0)
 					tprintf("E??? (errno %ld)", u_error);
-				else if (u_error < nerrnos && u_error < sys_nerr)
-					tprintf("%s (%s)", errnoent[u_error],
-						sys_errlist[u_error]);
 				else if (u_error < nerrnos)
-					tprintf("%s (errno %ld)",
-						errnoent[u_error], u_error);
-				else if (u_error < sys_nerr)
-					tprintf("ERRNO_%ld (%s)", u_error,
-						sys_errlist[u_error]);
+					tprintf("%s (%s)", errnoent[u_error],
+						strerror(u_error));
 				else
-					tprintf("E??? (errno %ld)", u_error);
+					tprintf("ERRNO_%ld (%s)", u_error,
+						strerror(u_error));
 				break;
 			}
 		}
Index: linux/dummy.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/dummy.h,v
retrieving revision 1.8
diff -b -p -u -r1.8 dummy.h
--- linux/dummy.h	1 May 2000 01:54:00 -0000	1.8
+++ linux/dummy.h	15 Dec 2002 10:04:29 -0000
@@ -33,11 +33,17 @@
 #define	sys_syslog		printargs
 #define	sys_iopl		printargs
 #define	sys_vm86old		printargs
-#define	sys_modify_ldt		printargs
 #define	sys_get_kernel_syms	printargs
 #define	sys_bdflush		printargs
 #define	sys_sysfs		printargs
 #define	sys_afs_syscall		printargs
+
+/* machine-specific */
+#ifndef I386
+#define	sys_modify_ldt		printargs
+#define sys_get_thread_area	printargs
+#define sys_set_thread_area	printargs
+#endif
 
 #define sys_sched_setparam	printargs
 #define sys_sched_getparam	printargs
Index: linux/syscall.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/syscall.h,v
retrieving revision 1.19
diff -b -p -u -r1.19 syscall.h
--- linux/syscall.h	7 Oct 2002 14:31:13 -0000	1.19
+++ linux/syscall.h	15 Dec 2002 10:04:29 -0000
@@ -84,6 +84,11 @@ int sys_rt_sigtimedwait(), sys_prctl(), 
 int sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64();
 int sys_truncate64(), sys_ftruncate64(), sys_pivotroot();
 int sys_getdents64(), sys_clone2();
+int sys_getpmsg(), sys_putpmsg(), sys_readahead(), sys_sendfile64();
+int sys_setxattr(), sys_fsetxattr(), sys_getxattr(), sys_fgetxattr();
+int sys_listxattr(), sys_flistxattr(), sys_removexattr(), sys_fremovexattr();
+int sys_sched_setaffinity(), sys_sched_getaffinity(), sys_futex();
+int sys_set_thread_area(), sys_get_thread_area();
 
 
 /* sys_socketcall subcalls */
@@ -138,11 +143,7 @@ int sys_osf_utimes();
 #  undef SYS_sendmsg
 #  undef SYS_recvmsg
 #endif /* IA64 */
-#if defined(POWERPC) || defined(S390) || defined(S390X)
-#  define SYS_socket_subcall	256
-#else
-#  define SYS_socket_subcall	230
-#endif /* (POWERPC || S390 || S390X) */
+#define SYS_socket_subcall	256
 #define SYS_socket		(SYS_socket_subcall + 1)
 #define SYS_bind		(SYS_socket_subcall + 2)
 #define SYS_connect		(SYS_socket_subcall + 3)
@@ -193,11 +194,7 @@ int sys_shmat(), sys_shmdt(), sys_shmget
 #  undef SYS_shmget
 #  undef SYS_shmctl
 # endif /* IA64 */
-#if defined(POWERPC) || defined(S390) || defined(S390X)
-#  define SYS_ipc_subcall		((SYS_socket_subcall)+(SYS_socket_nsubcalls))
-#else
-#  define SYS_ipc_subcall		250
-#endif /* (POWERPC || S390 || S390X) */
+#define SYS_ipc_subcall		((SYS_socket_subcall)+(SYS_socket_nsubcalls))
 #define SYS_semop		(SYS_ipc_subcall + 1)
 #define SYS_semget		(SYS_ipc_subcall + 2)
 #define SYS_semctl		(SYS_ipc_subcall + 3)
Index: linux/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/syscallent.h,v
retrieving revision 1.11
diff -b -p -u -r1.11 syscallent.h
--- linux/syscallent.h	31 Mar 2002 18:54:14 -0000	1.11
+++ linux/syscallent.h	15 Dec 2002 10:04:30 -0000
@@ -233,8 +233,8 @@
 	{ 2,	0,	sys_capset,		"capset"	}, /* 185 */
 	{ 2,	TS,	sys_sigaltstack,	"sigaltstack"	}, /* 186 */
 	{ 4,	TF,	sys_sendfile,		"sendfile"	}, /* 187 */
-	{ 5,	0,	printargs,		"getpmsg"	}, /* 188 */
-	{ 5,	0,	printargs,		"putpmsg"	}, /* 189 */
+	{ 5,	0,	sys_getpmsg,		"getpmsg"	}, /* 188 */
+	{ 5,	0,	sys_putpmsg,		"putpmsg"	}, /* 189 */
 	{ 0,	TP,	sys_vfork,		"vfork"		}, /* 190 */
 	{ 2,	0,	printargs,		"getrlimit"	}, /* 191 */
 	{ 6,	0,	sys_mmap,		"mmap2"		}, /* 192 */
@@ -243,8 +243,8 @@
 	{ 2,	TF,	sys_stat64,		"stat64"	}, /* 195 */
 	{ 2,	TF,	sys_lstat64,		"lstat64"	}, /* 196 */
 	{ 2,	TF,	sys_fstat64,		"fstat64"	}, /* 197 */
-/*TODO*/{ 3,	TF,	printargs,		"lchown32"	}, /* 198 */
-/*TODO*/{ 0,	0,	printargs,		"getuid32"	}, /* 199 */
+	{ 3,	TF,	sys_chown,		"lchown32"	}, /* 198 */
+	{ 0,	0,	sys_getuid,		"getuid32"	}, /* 199 */
 
 	{ 0,	0,	printargs,		"getgid32"	}, /* 200 */
 	{ 0,	0,	printargs,		"geteuid32"	}, /* 201 */
@@ -269,59 +269,81 @@
 	{ 4,	0,	printargs,		"getdents64"	}, /* 220 */
 	{ 3,	0,	sys_fcntl,		"fcntl64"	}, /* 221 */
 	{ 4,	0,	printargs,		"SYS_222"	}, /* 222 */
-	{ 4,	0,	printargs,		"SYS_223"	}, /* 223 */
-	{ 4,	0,	printargs,		"SYS_224"	}, /* 224 */
-	{ 5,	0,	printargs,		"SYS_225"	}, /* 225 */
-	{ 5,	0,	printargs,		"SYS_226"	}, /* 226 */
-	{ 5,	0,	printargs,		"SYS_227"	}, /* 227 */
-	{ 5,	0,	printargs,		"SYS_228"	}, /* 228 */
-	{ 5,	0,	printargs,		"SYS_229"	}, /* 229 */
-
-	{ 8,	0,	printargs,		"socket_subcall"}, /* 230 */
-	{ 3,	TN,	sys_socket,		"socket"	}, /* 231 */
-	{ 3,	TN,	sys_bind,		"bind"		}, /* 232 */
-	{ 3,	TN,	sys_connect,		"connect"	}, /* 233 */
-	{ 2,	TN,	sys_listen,		"listen"	}, /* 234 */
-	{ 3,	TN,	sys_accept,		"accept"	}, /* 235 */
-	{ 3,	TN,	sys_getsockname,	"getsockname"	}, /* 236 */
-	{ 3,	TN,	sys_getpeername,	"getpeername"	}, /* 237 */
-	{ 4,	TN,	sys_socketpair,		"socketpair"	}, /* 238 */
-	{ 4,	TN,	sys_send,		"send"		}, /* 239 */
-	{ 4,	TN,	sys_recv,		"recv"		}, /* 240 */
-	{ 6,	TN,	sys_sendto,		"sendto"	}, /* 241 */
-	{ 6,	TN,	sys_recvfrom,		"recvfrom"	}, /* 242 */
-	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 243 */
-	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 244 */
-	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 245 */
-	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 246 */
-	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 247 */
-	{ 5,	0,	printargs,		"SYS_248"	}, /* 248 */
-	{ 5,	0,	printargs,		"SYS_249"	}, /* 249 */
-
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 250 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 251 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 252 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 253 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 254 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 255 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 256 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 257 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 258 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 259 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 260 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 261 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 262 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 263 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 264 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 265 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 266 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 267 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 268 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 269 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 270 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 271 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 272 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 273 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 274 */
+/*TODO*/{ 5,	0,	printargs,		"security"	}, /* 223 */
+	{ 0,	0,	printargs,		"gettid"	}, /* 224 */
+	{ 4,	0,	sys_readahead,		"readahead"	}, /* 225 */
+	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 226 */
+	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 227 */
+	{ 5,	0,	sys_fsetxattr,		"fsetxattr"	}, /* 228 */
+	{ 4,	TF,	sys_getxattr,		"getxattr"	}, /* 229 */
+	{ 4,	TF,	sys_getxattr,		"lgetxattr"	}, /* 230 */
+	{ 4,	0,	sys_fgetxattr,		"fgetxattr"	}, /* 231 */
+	{ 3,	TF,	sys_listxattr,		"listxattr"	}, /* 232 */
+	{ 3,	TF,	sys_listxattr,		"llistxattr"	}, /* 233 */
+	{ 3,	0,	sys_flistxattr,		"flistxattr"	}, /* 234 */
+	{ 2,	TF,	sys_removexattr,	"removexattr"	}, /* 235 */
+	{ 2,	TF,	sys_removexattr,	"lremovexattr"	}, /* 236 */
+	{ 2,	0,	sys_fremovexattr,	"fremovexattr"	}, /* 237 */
+	{ 2,	TS,	sys_kill,		"tkill"		}, /* 238 */
+	{ 4,	TF,	sys_sendfile64,		"sendfile64"	}, /* 239 */
+	{ 4,	0,	sys_futex,		"futex"		}, /* 240 */
+	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity" },/* 241 */
+	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity" },/* 242 */
+	{ 1,	0,	sys_set_thread_area,	"set_thread_area" }, /* 243 */
+	{ 1,	0,	sys_get_thread_area,	"get_thread_area" }, /* 244 */
+	{ 2,	0,	printargs,		"io_setup"	}, /* 245 */
+	{ 1,	0,	printargs,		"io_destroy"	}, /* 246 */
+	{ 5,	0,	printargs,		"io_getevents"	}, /* 247 */
+	{ 3,	0,	printargs,		"io_submit"	}, /* 248 */
+	{ 3,	0,	printargs,		"io_cancel"	}, /* 249 */
+	{ 5,	0,	printargs,		"SYS_250"	}, /* 250 */
+	{ 5,	0,	printargs,		"SYS_251"	}, /* 251 */
+	{ 5,	0,	printargs,		"SYS_252"	}, /* 252 */
+	{ 5,	0,	printargs,		"SYS_253"	}, /* 253 */
+	{ 5,	0,	printargs,		"SYS_254"	}, /* 254 */
+	{ 5,	0,	printargs,		"SYS_255"	}, /* 255 */
 
+	{ 8,	0,	printargs,		"socket_subcall"}, /* 256 */
+	{ 3,	TN,	sys_socket,		"socket"	}, /* 257 */
+	{ 3,	TN,	sys_bind,		"bind"		}, /* 258 */
+	{ 3,	TN,	sys_connect,		"connect"	}, /* 259 */
+	{ 2,	TN,	sys_listen,		"listen"	}, /* 260 */
+	{ 3,	TN,	sys_accept,		"accept"	}, /* 261 */
+	{ 3,	TN,	sys_getsockname,	"getsockname"	}, /* 262 */
+	{ 3,	TN,	sys_getpeername,	"getpeername"	}, /* 263 */
+	{ 4,	TN,	sys_socketpair,		"socketpair"	}, /* 264 */
+	{ 4,	TN,	sys_send,		"send"		}, /* 265 */
+	{ 4,	TN,	sys_recv,		"recv"		}, /* 266 */
+	{ 6,	TN,	sys_sendto,		"sendto"	}, /* 267 */
+	{ 6,	TN,	sys_recvfrom,		"recvfrom"	}, /* 268 */
+	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 269 */
+	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 270 */
+	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 271 */
+	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 272 */
+	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 273 */
 
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 274 */
+	{ 4,	TI,	sys_semop,		"semop"		}, /* 275 */
+	{ 4,	TI,	sys_semget,		"semget"	}, /* 276 */
+	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 277 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 278 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 279 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 280 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 281 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 282 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 283 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 284 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 285 */
+	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 286 */
+	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 287 */
+	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 288 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 289 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 290 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 291 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 292 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 293 */
+	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 294 */
+	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 295 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 296 */
+	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 297 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 298 */
Index: linux/ia64/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/ia64/syscallent.h,v
retrieving revision 1.4
diff -b -p -u -r1.4 syscallent.h
--- linux/ia64/syscallent.h	9 Oct 2001 23:47:38 -0000	1.4
+++ linux/ia64/syscallent.h	15 Dec 2002 10:04:30 -0000
@@ -100,7 +100,6 @@
 #define sys_sigprocmask		printargs
 #define sys_create_module	printargs
 #define sys_init_module		printargs
-#define sys_delete_module	printargs
 #define sys_get_kernel_syms	printargs
 #define sys_quotactl		printargs
 #define sys_bdflush		printargs
@@ -112,7 +111,6 @@
 #define sys_writev		printargs
 #define sys__sysctl		printargs
 #define sys_sched_rr_get_interval printargs
-#define sys_nanosleep		printargs
 #define sys_getresuid		printargs
 #define sys_vm86		printargs
 #define sys_query_module	printargs
@@ -1207,11 +1205,11 @@
 	{ 8,	0,	printargs,		"SYS_1235"	}, /* 1235 */
 	{ 8,	0,	printargs,		"SYS_1236"	}, /* 1236 */
 	{ 8,	0,	printargs,		"SYS_1237"	}, /* 1237 */
-	{ 8,	0,	printargs,		"SYS_1238"	}, /* 1238 */
-	{ 8,	0,	printargs,		"SYS_1239"	}, /* 1239 */
-	{ 8,	0,	printargs,		"SYS_1240"	}, /* 1240 */
-	{ 8,	0,	printargs,		"SYS_1241"	}, /* 1241 */
-	{ 8,	0,	printargs,		"SYS_1242"	}, /* 1242 */
+	{ 2,	0,	printargs,		"io_setup"	}, /* 1238 */
+	{ 1,	0,	printargs,		"io_destroy"	}, /* 1239 */
+	{ 5,	0,	printargs,		"io_getevents"	}, /* 1240 */
+	{ 3,	0,	printargs,		"io_submit"	}, /* 1241 */
+	{ 3,	0,	printargs,		"io_cancel"	}, /* 1242 */
 	{ 8,	0,	printargs,		"SYS_1243"	}, /* 1243 */
 	{ 8,	0,	printargs,		"SYS_1244"	}, /* 1244 */
 	{ 8,	0,	printargs,		"SYS_1245"	}, /* 1245 */
Index: linux/powerpc/syscallent.h
===================================================================
RCS file: /cvsroot/strace/strace/linux/powerpc/syscallent.h,v
retrieving revision 1.7
diff -b -p -u -r1.7 syscallent.h
--- linux/powerpc/syscallent.h	3 Aug 2001 12:27:54 -0000	1.7
+++ linux/powerpc/syscallent.h	15 Dec 2002 10:04:30 -0000
@@ -255,11 +255,11 @@
 	{ 5,	0,	printargs,		"SYS_224"		}, /* 224 */
 	{ 5,	0,	printargs,		"SYS_225"		}, /* 225 */
 	{ 5,	0,	printargs,		"SYS_226"		}, /* 226 */
-	{ 5,	0,	printargs,		"SYS_227"		}, /* 227 */
-	{ 5,	0,	printargs,		"SYS_228"		}, /* 228 */
-	{ 5,	0,	printargs,		"SYS_229"		}, /* 229 */
-	{ 5,	0,	printargs,		"SYS_230"		}, /* 230 */
-	{ 5,	0,	printargs,		"SYS_231"		}, /* 231 */
+	{ 2,	0,	printargs,		"io_setup"		}, /* 227 */
+	{ 1,	0,	printargs,		"io_destroy"		}, /* 228 */
+	{ 5,	0,	printargs,		"io_getevents"		}, /* 229 */
+	{ 3,	0,	printargs,		"io_submit"		}, /* 230 */
+	{ 3,	0,	printargs,		"io_cancel"		}, /* 231 */
 	{ 5,	0,	printargs,		"SYS_232"		}, /* 232 */
 	{ 5,	0,	printargs,		"SYS_233"		}, /* 233 */
 	{ 5,	0,	printargs,		"SYS_234"		}, /* 234 */
