Upgrade to strace 4.7.

* Changes in behavior
  * strace no longer suspends waitpid until there is a child
    for waitpid'ing process to collect status from.
  * strace no longer detaches from a tracee which is supposed
    to be going to die.
  * strace now issues a new message: "+++ exited with EXITCODE +++"
    which shows exact moment strace got exit notification,
    analogous to existing "+++ killed by SIG +++" message.

* Improvements
  * Added x32 personality support (x86_64 architecture).
  * Added -y and -P options to print file descriptor paths and
    filter by those paths.
  * Added -I option to control strace interactivity.
  * Allowed -p option to take comma or whitespace-separated list of PIDs.
  * Added strace_log_merge script helper to merge timestamped "strace -ff"
    log files.
  * Implemented decoding of clock_adjtime, get_robust_list, migrate_pages,
    preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev,
    recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list,
    sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls.
  * Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit,
    listxattr, setrlimit and swapon syscalls.
  * Implemented decoding of loop and mtd ioctls.
  * Added syscall entries for new linux syscalls.
  * Added syscall entries for direct socket system calls on powerpc.
  * Updated the list of errno constants.
  * Updated lists of MSG_*, STA_*, and TCP_* constants.
  * Regenerated the list of ioctl names from Linux 3.3.
  * Enhanced switching between processes with different personalities.
  * Enhanced signals reporting by using short signal names.
  * Made ERESTART* messages more descriptive.
  * Made parsing of numbers from strings more robust.
  * Added support for compat_statfs64 and statfs64.f_flags.
  * Changed read of data blocks to use single process_vm_readv syscall
    (when available) instead of several PTRACE_PEEKDATA operations.
  * Changed read of registers on x86 and x86-64 to use single PTRACE_GETREGS
    operation instead of several PTRACE_PEEKUSER operations.
  * Applied various optimizations to make strace work faster.

* Bug fixes
  * Implemented proper handling of real SIGTRAPs on kernels supporting
    PTRACE_O_TRACESYSGOOD.
    (Addresses Fedora bug #162774).
  * Fixed sockaddr_un.sun_path name in decoded output.
    (Addresses Debian bug #554946).
  * Fixed to avoid potential core file clobbering on exit.
    (Addresses Debian bug #656398).
  * Fixed a typo in documentation.
    (Addresses Debian bug #653309).
  * Fixed decoding of timer id returned by timer_create.
  * Fixed epoll_create1, epoll_wait and epoll_pwait decoding.
  * Fixed *at syscalls flags decoding.
  * Fixed ARM EABI 64-bit syscall's arguments decoding.
  * Fixed semtimedop decoding on s390.
  * Fixed osf_sigprocmask decoding on alpha.
  * Fixed ipc and socket subcall decoding on several architectures.
  * Corrected syscall entries for epoll_pwait, epoll_create, epoll_ctl,
    epoll_wait, mincore, mlockall, prctl, reboot, sendfile, sendfile64,
    sendmsg, sgetmask, ssetmask, swapon, tgkill and tkill syscalls.
  * Corrected io_* syscall entries on ARM.
  * Fixed PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
  * Fixed logging of unfinished lines in "strace -oLOG -ff" case.
  * Fixed build when libaio-devel is not available.
  * Fixed configure checks for PTRACE_* constants.
  * Fixed compilation warnings remained on several architectures.

* Portability
  * Removed all non-Linux code.  After years of neglect, that dead code
    just hampered further strace development.
  * Linux kernel >= 2.6.18 is recommended.  Older versions might still
    work but they haven't been thoroughly tested with this release.

Change-Id: Ic2287760ba9f604ede83894670b8b382febf6099
diff --git a/Android.mk b/Android.mk
index 341f6f1..7682998 100644
--- a/Android.mk
+++ b/Android.mk
@@ -3,23 +3,47 @@
 LOCAL_PATH := $(my-dir)
 include $(CLEAR_VARS)
 
-# From autoconf-generated Makefile
-strace_SOURCES = strace.c syscall.c count.c util.c desc.c file.c ipc.c \
-                 io.c ioctl.c mem.c net.c process.c bjm.c quota.c \
-                 resource.c signal.c sock.c system.c term.c time.c \
-                 proc.c stream.c block.c
+strace_VERSION = 4.7
 
-#excluded_sources = scsi.c
-
-strace_VERSION = 4.6
-
-LOCAL_SRC_FILES:= $(strace_SOURCES)
+LOCAL_SRC_FILES := \
+    bjm.c \
+    block.c \
+    count.c \
+    desc.c \
+    file.c \
+    io.c \
+    ioctl.c \
+    ipc.c \
+    loop.c \
+    mem.c \
+    mtd.c \
+    net.c \
+    pathtrace.c \
+    proc.c \
+    process.c \
+    quota.c \
+    resource.c \
+    signal.c \
+    sock.c \
+    strace.c \
+    stream.c \
+    syscall.c \
+    system.c \
+    term.c \
+    time.c \
+    util.c \
 
 LOCAL_SHARED_LIBRARIES :=
 
 LOCAL_CFLAGS := -DLINUX=1 \
 	-DGETGROUPS_T=gid_t \
 	-DHAVE_ASM_SIGCONTEXT_H=1 \
+	-DHAVE_DECL_PTRACE_O_TRACECLONE=1 \
+	-DHAVE_DECL_PTRACE_O_TRACEEXEC=1 \
+	-DHAVE_DECL_PTRACE_O_TRACEEXIT=1 \
+	-DHAVE_DECL_PTRACE_O_TRACEFORK=1 \
+	-DHAVE_DECL_PTRACE_O_TRACESYSGOOD=1 \
+	-DHAVE_DECL_PTRACE_O_TRACEVFORK=1 \
 	-DHAVE_DECL_SYS_ERRLIST=1 \
 	-DHAVE_DECL_SYS_SIGLIST=1 \
 	-DHAVE_DECL_____PTRACE_EVENT_CLONE=1 \
@@ -45,6 +69,7 @@
 	-DHAVE_LINUX_IN6_H=1 \
 	-DHAVE_LINUX_NETLINK_H=1 \
 	-DHAVE_LINUX_UTSNAME_H=1 \
+	-DHAVE_LITTLE_ENDIAN_LONG_LONG=1 \
 	-DHAVE_LONG_LONG=1 \
 	-DHAVE_LONG_LONG_RLIM_T=1 \
 	-DHAVE_MEMORY_H=1 \
@@ -91,6 +116,7 @@
 	-DPACKAGE_TARNAME='"strace"' \
 	-DPACKAGE_VERSION='"$(strace_VERSION)"' \
 	-DRETSIGTYPE=void \
+	-DSIZEOF_RLIM_T=8 \
 	-DSTDC_HEADER=1 \
 	-DVERSION='"$(strace_VERSION)"' \
 	-D_GNU_SOURCE=1 \
@@ -98,7 +124,12 @@
 	-Dfopen64=fopen \
 	-Dd_fileno=d_ino \
 	-D_LFS64_LARGEFILE=1 \
-	-D__KERNEL__=1
+	-D__KERNEL__=1 \
+
+# bionic doesn't have fputs_unlocked.
+LOCAL_CFLAGS += -Dfputs_unlocked=fputs
+# uapi's asm/sigcontext.h doesn't have sigcontext_struct.
+LOCAL_CFLAGS += -Dsigcontext_struct=sigcontext
 
 #These are defined in AndroidConfig.h so we omit them above.
 #	-DHAVE_SYS_UIO_H=1 \
@@ -107,21 +138,22 @@
 
 arch := $(TARGET_ARCH)
 ifeq ($(TARGET_ARCH),arm)
-	LOCAL_CFLAGS += -DARM=1 -DHAVE_LITTLE_ENDIAN_LONG_LONG=1
+	LOCAL_CFLAGS += -DARM=1
 	LOCAL_CFLAGS += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
+else ifeq ($(TARGET_ARCH),mips)
+	LOCAL_CFLAGS += -DMIPS=1
+	LOCAL_CFLAGS += -DHAVE_ASM_SYSMIPS_H=1
+#	Mips does not use STRUCT__OLD_KERNEL_STAT type
 else ifeq ($(TARGET_ARCH),x86)
-	LOCAL_CFLAGS += -DI386=1 -DHAVE_LITTLE_ENDIAN_LONG_LONG=1
+	LOCAL_CFLAGS += -DI386=1
         LOCAL_CFLAGS += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
 	arch := i386
-else ifeq ($(TARGET_ARCH),sh)
-	LOCAL_CFLAGS += -DSH=1 -DHAVE_LITTLE_ENDIAN_LONG_LONG=1
-        LOCAL_CFLAGS += -DHAVE_STRUCT___OLD_KERNEL_STAT=1
-else ifeq ($(TARGET_ARCH),mips)
-	LOCAL_CFLAGS += -DMIPS=1 -DHAVE_LITTLE_ENDIAN_LONG_LONG=1
-#	Mips does not use STRUCT__OLD_KERNEL_STAT type
 endif
 
-LOCAL_CFLAGS += -Wno-missing-field-initializers
+LOCAL_CFLAGS += \
+    -Wno-missing-field-initializers \
+    -Wno-unused-parameter \
+    -Wno-sign-compare \
 
 LOCAL_C_INCLUDES := \
 	$(KERNEL_HEADERS) \
@@ -134,4 +166,6 @@
 
 LOCAL_MODULE_TAGS := debug
 
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
 include $(BUILD_EXECUTABLE)
diff --git a/Android.patch b/Android.patch
index 9885fe3..8e87336 100644
--- a/Android.patch
+++ b/Android.patch
@@ -1,49 +1,24 @@
-diff -r -u -d /home/enh/Downloads/strace-4.6/defs.h ./defs.h
---- /home/enh/Downloads/strace-4.6/defs.h	2011-03-15 10:19:09.000000000 -0700
-+++ ./defs.h	2014-01-03 15:29:29.552592456 -0800
-@@ -33,10 +33,6 @@
- #include "config.h"
+diff -r -u -d /home/enh/Downloads/strace-4.7/defs.h ./defs.h
+--- /home/enh/Downloads/strace-4.7/defs.h	2012-04-28 05:58:35.000000000 -0700
++++ ./defs.h	2014-01-07 18:55:56.199027145 -0800
+@@ -36,9 +36,6 @@
+ #  define _LFS64_LARGEFILE 1
+ # endif
  #endif
- 
 -#ifdef MIPS
--#include <sgidefs.h>
+-# include <sgidefs.h>
 -#endif
--
- #ifdef linux
  #include <features.h>
- #endif
-@@ -319,13 +315,19 @@
- #  define PTRACE_GETSIGINFO	0x4202
- # endif
- # if !HAVE_DECL_PTRACE_O_TRACEFORK
-+#  ifndef PTRACE_O_TRACEFORK
- #  define PTRACE_O_TRACEFORK	0x00000002
-+#  endif
- # endif
- # if !HAVE_DECL_PTRACE_O_TRACEVFORK
-+#  ifndef PTRACE_O_TRACEVFORK
- #  define PTRACE_O_TRACEVFORK	0x00000004
-+#  endif
- # endif
- # if !HAVE_DECL_PTRACE_O_TRACECLONE
-+#  ifndef PTRACE_O_TRACECLONE
- #  define PTRACE_O_TRACECLONE	0x00000008
-+#  endif
- # endif
- 
- # if !HAVE_DECL_PTRACE_EVENT_FORK
-diff -r -u -d /home/enh/Downloads/strace-4.6/file.c ./file.c
---- /home/enh/Downloads/strace-4.6/file.c	2011-03-03 18:08:02.000000000 -0800
-+++ ./file.c	2014-01-03 15:29:29.552592456 -0800
-@@ -45,6 +45,21 @@
- # define kernel_dirent dirent
- #endif
+ #ifdef HAVE_STDBOOL_H
+ # include <stdbool.h>
+diff -r -u -d /home/enh/Downloads/strace-4.7/file.c ./file.c
+--- /home/enh/Downloads/strace-4.7/file.c	2012-04-18 08:02:40.000000000 -0700
++++ ./file.c	2014-01-07 18:55:26.409389991 -0800
+@@ -32,6 +32,16 @@
+ #include <dirent.h>
+ #include <sys/swap.h>
  
 +#ifdef HAVE_ANDROID_OS
-+#include <linux/fadvise.h>
-+
-+// ANDROID: From linux/dirent.h
-+
 +struct dirent64 {
 + __u64 d_ino;
 + __s64 d_off;
@@ -51,32 +26,30 @@
 + unsigned char d_type;
 + char d_name[256];
 +};
-+
 +#endif /* HAVE_ANDROID_OS */
 +
- #ifdef LINUX
- #  ifdef LINUXSPARC
+ #ifdef LINUXSPARC
  struct stat {
-diff -r -u -d /home/enh/Downloads/strace-4.6/ioctl.c ./ioctl.c
---- /home/enh/Downloads/strace-4.6/ioctl.c	2011-01-15 12:15:31.000000000 -0800
-+++ ./ioctl.c	2014-01-03 15:29:29.552592456 -0800
-@@ -155,9 +155,11 @@
+ 	unsigned short	st_dev;
+diff -r -u -d /home/enh/Downloads/strace-4.7/ioctl.c ./ioctl.c
+--- /home/enh/Downloads/strace-4.7/ioctl.c	2012-04-18 08:27:25.000000000 -0700
++++ ./ioctl.c	2014-01-07 18:55:26.409389991 -0800
+@@ -86,8 +86,10 @@
  	case 0x03:
  	case 0x12:
  		return block_ioctl(tcp, code, arg);
 +#ifndef HAVE_ANDROID_OS
  	case 0x22:
  		return scsi_ioctl(tcp, code, arg);
- #endif
 +#endif
- 	default:
- 		break;
- 	}
-diff -r -u -d /home/enh/Downloads/strace-4.6/ipc.c ./ipc.c
---- /home/enh/Downloads/strace-4.6/ipc.c	2010-03-31 15:22:01.000000000 -0700
-+++ ./ipc.c	2014-01-03 15:29:29.552592456 -0800
-@@ -40,9 +40,15 @@
- 
+ 	case 'L':
+ 		return loop_ioctl(tcp, code, arg);
+ 	case 'M':
+diff -r -u -d /home/enh/Downloads/strace-4.7/ipc.c ./ipc.c
+--- /home/enh/Downloads/strace-4.7/ipc.c	2012-04-16 04:00:01.000000000 -0700
++++ ./ipc.c	2014-01-07 18:55:26.409389991 -0800
+@@ -34,9 +34,15 @@
+ #endif
  #include <fcntl.h>
  #include <sys/ipc.h>
 +#ifdef HAVE_ANDROID_OS
@@ -91,248 +64,26 @@
  
  #ifndef MSG_STAT
  #define MSG_STAT 11
-diff -r -u -d /home/enh/Downloads/strace-4.6/process.c ./process.c
---- /home/enh/Downloads/strace-4.6/process.c	2011-03-14 14:58:59.000000000 -0700
-+++ ./process.c	2014-01-03 15:29:29.552592456 -0800
-@@ -114,6 +114,10 @@
- #define GETGROUPS32_T __kernel_gid32_t
- #endif /* LINUX */
- 
-+#ifdef HAVE_ANDROID_OS
-+#define __sched_priority sched_priority
-+#endif
-+
- #if defined(LINUX) && defined(IA64)
- # include <asm/ptrace_offsets.h>
- # include <asm/rse.h>
-diff -r -u -d /home/enh/Downloads/strace-4.6/signal.c ./signal.c
---- /home/enh/Downloads/strace-4.6/signal.c	2011-03-10 15:14:47.000000000 -0800
-+++ ./signal.c	2014-01-07 14:53:10.703113250 -0800
-@@ -40,6 +40,12 @@
- #include <sys/user.h>
- #include <fcntl.h>
- 
-+#ifdef HAVE_ANDROID_OS
-+//FIXME use "sigprocmask" or something
-+#define sigmask(sig)    (1UL << ((sig) - 1))
-+#define sigcontext_struct sigcontext
-+#endif
-+
- #ifdef SVR4
- #include <sys/ucontext.h>
- #endif /* SVR4 */
-@@ -455,7 +461,7 @@
- 
- #endif /* LINUX */
+diff -r -u -d /home/enh/Downloads/strace-4.7/signal.c ./signal.c
+--- /home/enh/Downloads/strace-4.7/signal.c	2012-04-16 19:38:17.000000000 -0700
++++ ./signal.c	2014-01-07 18:55:26.439389625 -0800
+@@ -419,7 +419,7 @@
+ # define SI_FROMUSER(sip)	((sip)->si_code <= 0)
+ #endif
  
 -#if __GLIBC_MINOR__ < 1
 +#if __GLIBC_MINOR__ < 1 && !defined(HAVE_ANDROID_OS)
  /* Type for data associated with a signal.  */
  typedef union sigval
  {
-@@ -1091,7 +1097,12 @@
- 
- #ifdef HAVE_SIGACTION
- 
--#ifdef LINUX
-+/* For MIPS, struct sigaction is common between kernel and userland */
-+#if defined(LINUX) && !defined(MIPS)
-+#define USE_OLD_SIGACTION
-+#endif
-+
-+#ifdef USE_OLD_SIGACTION
- struct old_sigaction {
- 	__sighandler_t __sa_handler;
- 	unsigned long sa_mask;
-@@ -1099,7 +1110,7 @@
- 	void (*sa_restorer)(void);
- };
- #define SA_HANDLER __sa_handler
--#endif /* LINUX */
-+#endif /* USE_OLD_SIGACTION */
- 
- #ifndef SA_HANDLER
- #define SA_HANDLER sa_handler
-@@ -1110,7 +1121,7 @@
- struct tcb *tcp;
- {
- 	long addr;
--#ifdef LINUX
-+#ifdef USE_OLD_SIGACTION
- 	sigset_t sigset;
- 	struct old_sigaction sa;
- #else
-@@ -1159,28 +1170,24 @@
- 				kill(tcp->pid, SIGSTOP);
- 			}
- #endif /* !USE_PROCFS */
--			tprintf("{%#lx, ", (long) sa.SA_HANDLER);
--#ifndef LINUX
--			printsigmask (&sa.sa_mask, 0);
-+			tprintf("{%p, ", sa.SA_HANDLER);
-+		}
-+#ifndef USE_OLD_SIGACTION
-+		printsigmask (&sa.sa_mask, 0);
- #else
--			long_to_sigset(sa.sa_mask, &sigset);
--			printsigmask(&sigset, 0);
-+		long_to_sigset(sa.sa_mask, &sigset);
-+		printsigmask(&sigset, 0);
- #endif
--			tprintf(", ");
--			printflags(sigact_flags, sa.sa_flags, "SA_???");
--#ifdef SA_RESTORER
--			if (sa.sa_flags & SA_RESTORER)
--				tprintf(", %p", sa.sa_restorer);
-+		tprintf(", ");
-+		printflags(sigact_flags, sa.sa_flags, "SA_???");
-+#if defined(SA_RESTORER) && !defined(MIPS)
-+		if (sa.sa_flags & SA_RESTORER)
-+			tprintf(", %p", sa.sa_restorer);
- #endif
--			tprintf("}");
--		}
-+		tprintf("}");
- 	}
- 	if (entering(tcp))
- 		tprintf(", ");
--#ifdef LINUX
--	else
--		tprintf(", %#lx", (unsigned long) sa.sa_restorer);
--#endif
- 	return 0;
- }
- 
-@@ -1492,6 +1499,7 @@
- 		tcp->u_arg[0] = 0;
- 		sp = regs.regs[29];
- 		if (umove(tcp, sp, &si) < 0)
-+			return 0;
- 		tcp->u_arg[0] = 1;
- 		tcp->u_arg[1] = si.si_mask;
- 	} else {
-@@ -1934,9 +1942,13 @@
- 
- 
- /* Structure describing the action to be taken when a signal arrives.  */
-+#ifdef MIPS
-+#define new_sigaction sigaction
-+#define new_sigaction2 sigaction
-+#else
- struct new_sigaction
- {
--	__sighandler_t __sa_handler;
-+	__sighandler_t SA_HANDLER;
- 	unsigned long sa_flags;
- 	void (*sa_restorer) (void);
- 	/* Kernel treats sa_mask as an array of longs. */
-@@ -1945,12 +1957,12 @@
- /* Same for i386-on-x86_64 and similar cases */
- struct new_sigaction32
- {
--	uint32_t __sa_handler;
-+	uint32_t SA_HANDLER;
- 	uint32_t sa_flags;
- 	uint32_t sa_restorer;
- 	uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)];
- };
--
-+#endif
- 
- int
- sys_rt_sigaction(struct tcb *tcp)
-@@ -1983,9 +1995,11 @@
- 		r = umove(tcp, addr, &sa32);
- 		if (r >= 0) {
- 			memset(&sa, 0, sizeof(sa));
--			sa.__sa_handler = (void*)(unsigned long)sa32.__sa_handler;
-+			sa.SA_HANDLER   = (void*)(unsigned long)sa32.SA_HANDLER;
- 			sa.sa_flags     = sa32.sa_flags;
-+#ifndef MIPS
- 			sa.sa_restorer  = (void*)(unsigned long)sa32.sa_restorer;
-+#endif
- 			/* Kernel treats sa_mask as an array of longs.
- 			 * For 32-bit process, "long" is uint32_t, thus, for example,
- 			 * 32th bit in sa_mask will end up as bit 0 in sa_mask[1].
-@@ -2013,14 +2027,14 @@
- 	 * be manipulated by strace. In order to prevent the
- 	 * compiler from generating code to manipulate
- 	 * SA_HANDLER we cast the function pointers to long. */
--	if ((long)sa.__sa_handler == (long)SIG_ERR)
-+	if ((long)sa.SA_HANDLER == (long)SIG_ERR)
- 		tprintf("{SIG_ERR, ");
--	else if ((long)sa.__sa_handler == (long)SIG_DFL)
-+	else if ((long)sa.SA_HANDLER == (long)SIG_DFL)
- 		tprintf("{SIG_DFL, ");
--	else if ((long)sa.__sa_handler == (long)SIG_IGN)
-+	else if ((long)sa.SA_HANDLER == (long)SIG_IGN)
- 		tprintf("{SIG_IGN, ");
- 	else
--		tprintf("{%#lx, ", (long) sa.__sa_handler);
-+		tprintf("{%#lx, ", (long) sa.SA_HANDLER);
- 	/* Questionable code below.
- 	 * Kernel won't handle sys_rt_sigaction
- 	 * with wrong sigset size (just returns EINVAL)
-@@ -2039,7 +2053,7 @@
- 	printsigmask(&sigset, 1);
- 	tprintf(", ");
- 	printflags(sigact_flags, sa.sa_flags, "SA_???");
--#ifdef SA_RESTORER
-+#if defined(SA_RESTORER) && !defined(MIPS)
- 	if (sa.sa_flags & SA_RESTORER)
- 		tprintf(", %p", sa.sa_restorer);
- #endif
-diff -r -u -d /home/enh/Downloads/strace-4.6/syscall.c ./syscall.c
---- /home/enh/Downloads/strace-4.6/syscall.c	2011-02-18 16:02:27.000000000 -0800
-+++ ./syscall.c	2014-01-07 14:53:32.312851042 -0800
-@@ -2600,6 +2600,7 @@
- 	}
- 
- 	switch (known_scno(tcp)) {
-+#ifndef __ARM_EABI__
- #ifdef SYS_socket_subcall
- 	case SYS_socketcall:
- 		decode_subcall(tcp, SYS_socket_subcall,
-@@ -2612,6 +2613,7 @@
- 			SYS_ipc_nsubcalls, shift_style);
- 		break;
- #endif
-+#endif
- #ifdef SVR4
- #ifdef SYS_pgrpsys_subcall
- 	case SYS_pgrpsys:
-diff -r -u -d /home/enh/Downloads/strace-4.6/system.c ./system.c
---- /home/enh/Downloads/strace-4.6/system.c	2011-02-22 02:22:13.000000000 -0800
-+++ ./system.c	2014-01-03 15:29:29.552592456 -0800
-@@ -32,6 +32,11 @@
+diff -r -u -d /home/enh/Downloads/strace-4.7/time.c ./time.c
+--- /home/enh/Downloads/strace-4.7/time.c	2012-05-01 14:17:51.000000000 -0700
++++ ./time.c	2014-01-07 18:55:26.439389625 -0800
+@@ -29,7 +29,11 @@
  
  #include "defs.h"
- 
-+#ifdef HAVE_ANDROID_OS
-+#undef __unused
-+#include <linux/socket.h>
-+#endif
-+
- #ifdef LINUX
- #define _LINUX_SOCKET_H
- #define _LINUX_FS_H
-@@ -83,7 +88,7 @@
- #include <linux/utsname.h>
- #endif
- 
--#ifdef HAVE_ASM_SYSMIPS_H
-+#ifdef MIPS
- #include <asm/sysmips.h>
- #endif
- 
-diff -r -u -d /home/enh/Downloads/strace-4.6/time.c ./time.c
---- /home/enh/Downloads/strace-4.6/time.c	2011-03-03 18:08:02.000000000 -0800
-+++ ./time.c	2014-01-03 15:29:29.552592456 -0800
-@@ -33,7 +33,11 @@
- 
- #ifdef LINUX
  #include <linux/version.h>
-+#ifdef HAVE_ANDROID_OS
++#if HAVE_ANDROID_OS
 +#include <linux/timex.h>
 +#else
  #include <sys/timex.h>
diff --git a/COPYRIGHT b/COPYRIGHT
index faaa2d8..e9078d3 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -27,5 +27,3 @@
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-$Id$
diff --git a/CREDITS b/CREDITS
index 488c606..98eb532 100644
--- a/CREDITS
+++ b/CREDITS
@@ -14,7 +14,7 @@
 
 	Aaron Ucko <ucko@vax1.rockhurst.edu>
 	Adrien Kunysz <adrien@kunysz.be>
-	Andi Kleen <ak@suse.de>
+	Andi Kleen <ak@linux.intel.com>
 	Andreas Schwab <schwab@linux-m68k.org>
 	Anton Blanchard <anton@samba.org>
 	Arkadiusz Miskiewicz <misiek@pld.org.pl>
@@ -26,12 +26,13 @@
 	Carmelo AMOROSO <carmelo.amoroso@st.com>
 	Chris Metcalf <cmetcalf@tilera.com>
 	D.J. Barrow <djbarrow@de.ibm.com>
+	Damir Shayhutdinov <damir@altlinux.ru>
 	David Daney <ddaney@caviumnetworks.com>
 	David Mosberger-Tang <davidm@hpl.hp.com>
 	David S. Miller <davem@caip.rutgers.edu>
 	David Wilder <wilder@us.ibm.com>
 	David Woodhouse <dwmw2@redhat.com>
-	Denys Vlasenko <dvlasenk@redhat.com>
+	Denys Vlasenko <vda.linux@googlemail.com>
 	Dmitry V. Levin <ldv@altlinux.org>
 	Douglas Mencken <dougmencken@gmail.com>
 	Edgar E. Iglesias <edgar.iglesias@gmail.com>
@@ -41,7 +42,9 @@
 	Gabor Gombas <gombasg@sztaki.hu>
 	Ganesan Rajagopal <rganesan@myrealbox.com>
 	Gaël Roualland <gael.roualland@iname.com>
+	Grant Edwards <grant.b.edwards@gmail.com>
 	Greg Banks <gbanks@pocketpenguins.com>
+	H.J. Lu <hongjiu.lu@intel.com>
 	Heiko Carstens <heiko.carstens@de.ibm.com>
 	Henrik Storner <storner@osiris.ping.dk>
 	Holger Hans Peter Freyther <holger@freyther.de>
@@ -93,6 +96,7 @@
 	Sami Farin <safari@u.safari.iki.fi>
 	Scott Tsai <scottt958@yahoo.com.tw>
 	Sebastian Pipping <sebastian@pipping.org>
+	Sergei Trofimovich <slyfox@gentoo.org>
 	Simon Murray <simon@transitive.com>
 	Solar Designer <solar@openwall.com>
 	Srinivasa Ds <srinivasa@in.ibm.com>
diff --git a/ChangeLog b/ChangeLog
index 7a79abb..408a554 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,3771 @@
+2012-05-02  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Prepare for 4.7 release.
+	* configure.ac: Version 4.7.
+	* debian/changelog: 4.7-1.
+	* strace.spec: 4.7-1.
+
+	Fix build with <linux/loop.h> from 2.6.18 kernel headers.
+	* configure.ac: Check for LO_FLAGS_AUTOCLEAR and LO_FLAGS_PARTSCAN
+	declarations.
+	* loop.c (loop_flags_options): Use LO_FLAGS_AUTOCLEAR and
+	LO_FLAGS_PARTSCAN only when appropriate declarations are available.
+	(loop_ioctl): Use LOOP_SET_CAPACITY only when it is defined.
+
+2012-05-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* vsprintf.c: Check for USE_CUSTOM_PRINTF earlier.
+
+	Remove duplicate names from CREDITS.
+	* .mailmap: Merge email addresses.
+	* CREDITS.in: Remove a duplicate name.
+
+	tests: raise strace check timeout to 60 seconds.
+	* tests/init.sh (check_timeout): New variable.
+	* tests/ptrace_setoptions: Use it.
+	* tests/strace-f: Likewise.
+
+	Reported-by: Mike Frysinger <vapier@gentoo.org>
+
+	Update STA_* constants.
+	* time.c (adjtimex_status): Add STA_NANO, STA_MODE, and STA_CLK.
+	* NEWS (Improvements): Mention it.
+
+	NEWS: update for release.
+	* NEWS (Improvements): Mention recent recvmsg/recvmmsg decoders
+	enhancements.
+	(Portability): Add a recommendation for the minimum Linux kernel
+	version to use.
+
+	Make printing of utsname.domainname more portable.
+	* configure.ac: Check for struct utsname.domainname field.
+	* process.c (sys_uname): Print utsname.domainname when the field is
+	available.
+
+	Fix recvmmsg decode: do not show more data than actually returned.
+	This change complements recent fix for recvmsg decoding.
+
+	* net.c (printmmsghdr): Add msg_len parameter to pass down to do_msghdr.
+	When this parameter is zero, pass mmsghdr.msg_len to do_msghdr instead.
+	(decode_mmsg): Add msg_len parameter, pass it down to printmmsghdr.
+	(sys_sendmmsg): Call decode_mmsg with msg_len == (unsigned long) -1L.
+	(sys_recvmmsg): Call decode_mmsg with msg_len == 0.
+
+	Remove recently introduced use of ULONG_MAX.
+	* io.c: Remove limits.h inclusion.
+	(tprint_iov): Use "(unsigned long) -1L" instead of "ULONG_MAX".
+	* net.c: Remove limits.h inclusion.
+	(printmmsghdr, sys_sendmsg): Use "(unsigned long) -1L" instead of
+	"ULONG_MAX".
+
+2012-04-28  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Enable printing of uts.domainname in uname syscall.
+	* process.c (sys_uname): Enable printing of uts.domainname
+
+	Fix printstr's len parameter width.
+	We often pass syscall params and other long-sized values
+	as printstr(len). Truncating them to int may be a bad thing.
+
+	* defs.h: Change len parameter's type from int to long in
+	string_quote and printstr function declarations.
+	* util.c (string_quote): Special-case only len==-1, not all len<0.
+	(printstr): Likewise.
+
+	Fix recvmsg decode: do not show more data than actually returned.
+	I noticed that "hostname -d" talks over netlink and gets 20 bytes
+	of response, but we show entire 1024 bytes of iov.
+	This changes fixes that.
+
+	* defs.h: New function tprint_iov_upto.
+	* io.c (tprint_iov_upto): Definition of this function.
+	(tprint_iov): Call tprint_iov_upto.
+	* net.c (do_msghdr): Add data_size parameter, pass it down to tprint_iov_upto.
+	(printmsghdr): Add data_size parameter, pass it down to do_msghdr.
+	(printmmsghdr): Call do_msghdr with data_size==ULONG_MAX.
+	(sys_sendmsg): Call printmsghdr with data_size==ULONG_MAX.
+	(sys_recvmsg): Call printmsghdr with data_size==tcp->u_rval.
+
+2012-04-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Package strace-log-merge.
+	* strace.spec (%files): Add strace-log-merge.
+
+2012-04-27  Mike Frysinger  <vapier@gentoo.org>
+
+	NEWS: clarify & fix typo.
+
+	Cast current_wordsize to an int.
+	On 64bit systems with a single personality, we see:
+	count.c: In function 'call_summary':
+	count.c:223:5: warning: format '%u' expects type 'unsigned int',
+		but argument 3 has type 'long unsigned int'
+
+	Since on multi-personality systems this is an array of ints, cast
+	the multiplication to an int and update the printf format.
+
+	* count.c (call_summary): Change %u to %d and cast first argument to int.
+
+2012-04-20  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update NEWS for upcoming 4.7 release.
+	* NEWS: Update for 4.7 release.
+
+	Sync strace.spec and debian/ with packages.
+	* debian/changelog: Sync with 4.5.20-2.3.
+	* debian/control: Likewise.
+	* strace.spec: Sync with 4.6-2.
+
+2012-04-18  Mike Frysinger  <vapier@gentoo.org>
+
+	Decode /dev/loop ioctls.
+	Needed to debug some losetup failures, and it's easier when you can see
+	what the kernel is getting vs what you think you're sending, so add some
+	decoders for those ioctls.
+
+	* loop.c: New file.
+	* Makefile.am (strace_SOURCES): Add loop.c.
+	* defs.h (loop_ioctl): New prototype.
+	(string_quote): Likewise.
+	* ioctl.c (ioctl_decode): Call loop_ioctl when code is 'L'.
+	* util.c (string_quote): Remove static keyword.
+
+2012-04-18  H.J. Lu  <hongjiu.lu@intel.com>
+
+	x32: add ia32 support.
+	* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent1.h,
+	linux/x32/ioctlent1.h, linux/x32/signalent1.h and
+	linux/x32/syscallent1.h.
+	* configure.ac: Remove AC_GNU_SOURCE, obsoleted by
+	AC_USE_SYSTEM_EXTENSIONS.
+	* defs.h (SUPPORTED_PERSONALITIES): Set to 2 for X32.
+	(PERSONALITY1_WORDSIZE): Set to 4 for X32.
+	* file.c (stat64): New struct for X32.
+	(sys_lseek32): New function for X32.
+	(stat64): Undef.
+	(sys_fstat64): Likewise.
+	(sys_stat64): Likewise.
+	(realprintstat64): New function for X32.
+	(sys_fstat64): Likewise.
+	(sys_stat64): Likewise.
+	* mem.c (sys_old_mmap): New function for X32.
+	* pathtrace.c (pathtrace_match): Also check sys_old_mmap for X32.
+	* syscall.c (update_personality): Add X32 support.
+	(get_scno): Support currpers == 1 for X32.
+	* linux/syscall.h (sys_lseek32): New function prototype for X32.
+	* linux/x32/errnoent1.h: New file.
+	* linux/x32/ioctlent1.h: Likewise.
+	* linux/x32/signalent1.h: Likewise.
+	* linux/x32/syscallent1.h: Likewise.
+
+2012-04-17  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Cast clock_t type to unsigned long long.
+	* resource.c (sys_times): Cast clock_t type to unsigned long long.
+	* signal.c (printsiginfo): Likewise.
+
+2012-04-16  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Add custom (faster) vfprintf implementation (disabled by default)
+	* defs.h: Declare strace_vfprintf either as a alias to vfprintf
+	or as a bona fide function. USE_CUSTOM_PRINTF define controls whether
+	we use strace_vfprintf. By default, we don't.
+	* strace.c (tprintf): Call strace_vfprintf instead of vfprintf.
+	* vsprintf.c: New file, implements strace_vfprintf.
+
+	Stop using %h[h]u format specifiers.
+	This is needed for simplified printf, and reduces code size a bit.
+
+	* block.c (block_ioctl): Cast the value to unsinged and use %u
+	instead of using %hu.
+	* desc.c (sys_io_cancel): Likewise.
+	* resource.c (sys_sysinfo): Likewise.
+
+	Trivial speed optimization.
+	* strace.c (tprints): Use fputs_unlocked instead of fputs.
+
+2012-04-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Fix a problem with sys_lseek on x32.
+	* file.c (sys_lseek): Use MIPS-n32 variant also for x32
+
+	Add x32 support to strace.
+	X32 support is added to Linux kernel 3.4. In a nutshell, x32 is x86-64 with
+	32bit pointers.  At system call level, x32 is also identical to x86-64,
+	as shown by many changes like "defined(X86_64) || defined(X32)".  The
+	main differerence bewteen x32 and x86-64 is off_t in x32 is long long
+	instead of long.
+
+	This patch adds x32 support to strace.  Tested on Linux/x32.
+
+	* configure.ac: Support X32.
+	* defs.h: Set SUPPORTED_PERSONALITIES to 3 for X86_64,
+	Set PERSONALITY2_WORDSIZE to 4 for X86_64.
+	Add tcb::ext_arg for X32.
+	* file.c (stat): New for X32.
+	(sys_lseek): Use 64-bit version for X32.
+	(printstat64): Check current_personality != 1 for X86_64.
+	* ipc.c (indirect_ipccall): Check current_personality == 1
+	for X86_64.
+	* mem.c (sys_mmap64): Also use tcp->u_arg for X32.  Print NULL
+	for zero address.  Call printllval for offset for X32.
+	* pathtrace.c (pathtrace_match): Don't check sys_old_mmap for
+	X32.
+	* process.c (ARG_FLAGS): Defined for X32.
+	(ARG_STACK): Likewise.
+	(ARG_PTID): Likewise.
+	(change_syscall): Handle X32.
+	(struct_user_offsets): Support X32.
+	(sys_arch_prctl): Likewise.
+	* signal.c: Include <asm/sigcontext.h> for X32.
+	(SA_RESTORER): Also define for X32.
+	* syscall.c (update_personality): Support X32 for X86_64.
+	(is_restart_error): Likewise.
+	(syscall_fixup_on_sysenter): Likewise.
+	(get_syscall_args): Likewise.
+	(get_syscall_result): Likewise.
+	(get_error): Likewise.
+	(__X32_SYSCALL_BIT): Define if not defined.
+	(__X32_SYSCALL_MASK): Likewise.
+	(get_scno): Check DS register value for X32.  Use
+	__X32_SYSCALL_MASK on X32 system calls.
+	* util.c (printllval): Use ext_arg for X32.
+	(printcall): Support X32.
+	(change_syscall): Likewise.
+	(arg0_offset): Likewise.
+	(arg1_offset): Likewise.
+	* Makefile.am (EXTRA_DIST): Add linux/x32/errnoent.h,
+	linux/x32/ioctlent.h.in, linux/x32/signalent.h,
+	linux/x32/syscallent.h, linux/x86_64/errnoent2.h,
+	linux/x86_64/ioctlent2.h, linux/x86_64/signalent2.h and
+	linux/x86_64/syscallent2.h.
+	* linux/x32/errnoent.h: New.
+	* linux/x32/ioctlent.h.in: Likewise.
+	* linux/x32/signalent.h: Likewise.
+	* linux/x32/syscallent.h: Likewise.
+	* linux/x86_64/errnoent2.h: Likewise.
+	* linux/x86_64/ioctlent2.h: Likewise.
+	* linux/x86_64/signalent2.h: Likewise.
+	* linux/x86_64/syscallent2.h: Likewise.
+
+	Restore tcb::u_lrval; fix lseek on MIPS-n32.
+	Linux kernel v3.4 adds x32 support.  Both x32 and n32 use 64bit offset
+	for lseek parameter and return value.  We need u_lrval to handle it
+	properly.  Also we shouldn't check HAVE_LONG_LONG_OFF_T for n32 lseek.
+	This patch fixes it properly and prepares lseek for x32.
+
+	* defs.h (tcb): Restore tcb::u_lrval field, RVAL_Lfoo constants.
+	Set RVAL_MASK to 7.
+	* file.c (sys_lseek): Print 64bit offset and return RVAL_LUDECIMAL
+	for n32.
+	* syscall.c (get_error): Set u_lrval for MIPS-n32.
+	(trace_syscall_exiting): Handle RVAL_Lfoo return value types.
+
+2012-04-06  Mike Frysinger  <vapier@gentoo.org>
+
+	Decode mtd ioctls.
+	I got tired of figuring out mtd structures (which show up a lot
+	in the embedded space), so add decoders for those ioctls.
+
+	* defs.h (mtd_ioctl): New prototype.
+	(print_loff_t): Likewise.
+	* io.c (print_loff_t): Delete static keyword
+	* ioctl.c (ioctl_decode): Call mtd_ioctl when code is 'M'.
+	* Makefile.am (strace_SOURCES): Add mtd.c.
+	(EXTRA_DIST): Add linux/mtd-abi.h.
+	* mtd.c: New file.
+	* linux/mtd-abi.h: New file.
+
+2012-04-05  Mike Frysinger  <vapier@gentoo.org>
+
+	Fix indefinite hang on no-mmu systems.
+	The ptrace setoptions code will fork a child which goes to sleep and
+	expects the parent to continue on to do tests.  Unfortunately, this
+	does not work on no-mmu systems as fork() is actually vfork() and any
+	vforked children will hang the parent until it exits or execs.
+
+	We might be able to make this test work on no-mmu systems with a bit
+	of work, but easier to just disable this for the release so it works
+	now.
+
+	* strace.c (test_ptrace_setoptions_for_all): Return if strace_vforked.
+
+2012-03-29  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Makefile.am: whitespace fix.
+
+2012-03-27  Anton Blanchard  <anton@samba.org>
+
+	powerpc: Add syscall entries for direct socket system calls.
+	* linux/powerpc/syscallent.h: Add direct socket system calls.
+
+2012-03-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	qual_syscall: fix potential NULL dereference.
+	Fix regression introduced by commit
+	c1371ebc400fe9578908beca87f2bf407daf1506
+
+	* syscall.c (qual_syscall): Handle null sys_name.
+
+	Reported-by: Fr. Br. George <george@altlinux.org>
+
+	strace-log-merge: fix file suffix calculation.
+	* strace-log-merge: Quote file prefix to fix file suffix calculation.
+
+	Reported-by: Denys Vlasenko <vda.linux@googlemail.com>
+	Suggested-by: Andreas Schwab <schwab@linux-m68k.org>
+
+2012-03-26  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Remove unreachable code.
+	* strace.c (process_opt_p_list): Remove unreachable code.
+
+	manpage: remove false info about -p being limited to 32 processes.
+
+	Tweak help text and manpage (added -In to manpage)
+
+2012-03-25  Dmitry V. Levin  <ldv@altlinux.org>
+
+	printstr: check for potential integer overflow.
+	* util.c (printstr): Check for potential integer overflow during outstr
+	buffer size calculation.
+
+	Robustify parsing of numbers from strings.
+	* defs.h (string_to_uint): New prototype.
+	* util.c (string_to_uint): New function.
+	* strace.c (error_opt_arg): New function.
+	(process_opt_p_list): Use string_to_uint instead of atoi.
+	Terminate in case of invalid process id.
+	(init): Use string_to_uint instead of atoi.
+	Use error_opt_arg in case of invalid option argument.
+	* syscall.c (qual_syscall, qual_signal, qual_desc): Use string_to_uint
+	instead of atoi.
+
+	strace-log-merge: enhance usage error diagnostics.
+	* strace-log-merge: Add --help option.  Check number of arguments.
+	Issue an error message when no strace output was merged.
+
+	configure.ac: sort lists and use m4_normalize to ease maintenance.
+	* configure.ac (AC_CHECK_FUNCS, AC_CHECK_HEADERS, AC_CHECK_MEMBERS,
+	AC_CHECK_DECLS): Sort lists, use m4_normalize.
+
+2012-03-23  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Simple optimizations.
+	Why open-coding isdigit is a good idea?
+
+	Before: call   __ctype_b_loc
+	        movzbl (%ebx),%edx
+	        mov    (%eax),%eax
+	        testb  $0x8,0x1(%eax,%edx,2)
+	        je     lbl
+
+	After:  movzbl (%eax),%edx
+	        sub    $0x30,%edx
+	        cmp    $0x9,%dl
+	        ja     lbl
+
+	   text	   data	    bss	    dec	    hex	filename
+	 236869	    704	  18944	 256517	  3ea05	strace.before
+	 236719	    700	  18944	 256363	  3e96b	strace
+
+	* defs.h: Alias sigemptyset to __sigemptyset on glibc.
+	* syscall.c (qual_syscall): Open-code isdigit.
+	(qual_desc): Likewise.
+	(qual_signal): Open-code isdigit. Remove string copying
+	which was done for no apparent reason.
+
+	Reorder declarations in defs.h. No code changes.
+	* defs.h: Reorder declarations (such as: keep all printing functions together).
+
+2012-03-22  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Simplify current tcp switching and current column handling.
+	Instead of using "static FILE *outf and static unsigned int curcol"
+	to cache current outfile and its position, we can simply
+	remember current tcb and use its ->outf and ->curcol.
+	This allows to drop numerous "tcp->curcol = curcol" ops in trace().
+
+	Turns out we can't drop "static FILE *outf", but now its role is
+	a bit clearer: it newer changes after init, stays == stderr or
+	opened to shared log (which may be the same thing if neither -o
+	nor -ff was specified). Let's rename it then.
+
+	   text	   data	    bss	    dec	    hex	filename
+	 236953	    704	  18944	 256601	  3ea59	strace.before.prev.commit
+	 236905	    704	  18944	 256553	  3ea29	strace.before
+	 236869	    704	  18944	 256517	  3ea05	strace
+
+	* strace.c: Replace curcol static variable by struct tcb *current_tcp.
+	Rename static FILE *outf to shared_log (since it no longer caches tcp->outf).
+	(ptrace_restart): Use current_tcp->curcol instead of curcol.
+	(tprintf): Check current_tcp != NULL instead of outf != NULL.
+	Use current_tcp->outf instead of outf, current_tcp->curcol instead of curcol.
+	(tprints): Likewise.
+	(line_ended): Likewise.
+	(printleader): Switch current tcb by "current_tcp = tcp" istead of
+	assignments to outf and curcol.
+	(droptcb): Set current_tcp to NULL if we dropped it.
+	(startup_child): Rename outf to shared_log.
+	(init): Likewise.
+	(cleanup): Likewise.
+	(trace): Simplify current tcp switching and current column handling.
+
+	Make threaded execve handling code more reabable and somewhat simpler.
+	* strace.c (droptcb): Remove outfname check in "outfname && followfork >= 2" -
+	with recent changes, followfork >= 2 check guarantees that outfile
+	was specified, and _is already opened_.
+	(trace): Move tcb existence check before threaded execve handling.
+	This allows to remove tcp != NULL checks in threaded execve handling.
+	Rewrite threaded execve handling code to be less indented,
+	keeping the same logic.
+
+2012-03-21  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	simple cleanups in defs.h. No logic changes.
+	* defs.h: Move offsetof macro definition into "libc stuff" section.
+	Renumber TCB_foo constants (smaller constants -> sometimes smaller code).
+	Remove uoff macro.
+	* process.c: Move uoff macro here (sole user).
+
+	Show "+++ exited..." with -C.
+	* strace.c (trace): Show "+++ exited..." with -C too.
+	Save tcp->curcol after PTRACE_LISTEN failure too, just in case.
+
+	Slight tweak to qemu_multiarch_testing scripts.
+
+	Replace reprinting decision logic.
+	After this change, we no longer need to decide when we need
+	to set TCB_REPRINT, and when we don't: it's never needed :)
+
+	Well, almost. That pesky pid-changing execve needs special treatment.
+	If not it, it'd be possible to nuke TCB_REPRINT...
+
+	While at it, fix a case of mishandled -C.
+
+	* strace.c (printleader): Do not set TCB_REPRINT.
+	(trace): Set TCB_REPRINT only for execve with changing pid.
+	Fix mishandling of -C.
+	* syscall.c (trace_syscall_entering): Do not clear TCB_REPRINT.
+	(trace_syscall_exiting): Replace reprinting decision logic.
+	Remove call to printargs(): it is known to just return 0 here.
+
+	Report some ptrace failures; nuke tcp->ptrace_errno.
+	Report some (not all) ptrace errors, namely,
+	errors on ptrace restart operations.
+
+	Before: 10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <unfinished ...>
+	After:  10533 sendto(-1, 0x804895e, 17, 0, NULL, 0 <ptrace(SYSCALL):No such process>
+
+	This tells user that strace failed to let sendto syscall
+	to be entered - process was dead at that point of time.
+	It is (marginally) better than to always say "<unfinished ...>"
+
+	While at it, patch removes tcp->ptrace_errno.
+	I added it many months ago, and it looks that after all
+	it is not needed for ptrace error detection: I failed to execute
+	a single existing code path which is accessible
+	through that variable only.
+
+	* defs.h: Remove struct tcp::ptrace_errno field.
+	* strace.c (ptrace_restart): Emit message to log on error.
+	(printleader): Remove "if (printing_tcp->ptrace_errno)..." code.
+	(trace): Remove !tcp->ptrace_errno check, it's always true.
+
+2012-03-20  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Eliminate redundant checks of res variable.
+	* syscall.c (trace_syscall_entering): Eliminate redundant checks of res variable.
+	(trace_syscall_exiting): Likewise.
+
+	Rename POWERPC-specific static variable result to ppc_result.
+	* syscall.c: Rename POWERPC-specific static variable result to ppc_result.
+
+	Remove redundant checks in syscall entry/exit, rename badly named function
+	* syscall.c (syscall_enter): Rename to get_syscall_args.
+	Document its return values.
+	(trace_syscall_entering): Don't check get_syscall_args() return
+	value for 0, it never returns that.
+	(syscall_fixup_on_sysexit): Make it return void.
+	(trace_syscall_exiting): Fix up syscall_fixup_on_sysexit()
+	call site accordingly.
+
+	Trivial tweaks. No logic changes.
+	* process.c (sys_ptrace): Remove unneeded line wrapping.
+	* syscall.c (trace_syscall_entering): Use tprints() instead of tprintf().
+
+	Make ptrace_restart() static. No code changes.
+	* defs.h: Remove ptrace_restart() declaration.
+	* strace.c (ptrace_restart): Move its definition here.
+	* util.c (ptrace_restart): Remove its definition.
+
+2012-03-20  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Do not include limits.h unnecessarily.
+	* ioctl.c: Remove limits.h inclusion left after the reverted change.
+
+2012-03-20  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Partially revert last change.
+	Thank you Dmitry for spotting it.
+
+	* ioctl.c (compare): Partially revert last change - the new
+	comparison logic was buggy.
+
+	Simplify search in ioctl table.
+	   text	   data	    bss	    dec	    hex	filename
+	 236973	    704	  18944	 256621	  3ea6d	strace.before
+	 236929	    704	  18944	 256577	  3ea41	strace
+
+	* ioctl.c (compare): Simplify generation of compare result.
+	(ioctl_lookup): Pass key directly, not as part of dummy struct.
+	(ioctl_next_match): More readable code. No logic changes.
+
+2012-03-19  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Update qemu build script: now tries to upload result back to host.
+
+	Shrink space needed by undefined syscalls in syscall tables.
+	Undefined syscall looked like this before this change:
+	{ 5,    0,      printargs,              "SYS_53"                },
+	That is, "SYS_53" string had to be allocated and stored in strace binary.
+	Since now SCNO_IN_RANGE() macro requires sysent[scno].sys_func != NULL
+	for valid syscalls, we can replace printargs with NULL in such lines
+	and make them "invalid", thus not requiring syscall name string.
+
+	Savings on i386:
+	   text	   data	    bss	    dec	    hex	filename
+	 237389	    704	  18944	 257037	  3ec0d	strace.before
+	 236973	    704	  18944	 256621	  3ea6d	strace
+	Savings on mips:
+	 336551  153692   38320  528563   810b3 strace.before
+	 275543  153688   38320  467551   7225f strace
+
+	Tested to still decode undefined syscalls correctly (syscall no. 222 on i386).
+
+	* linux/*/syscallent.h: Replace 'printargs, "SYS_nnn"' with
+	'NULL, NULL'.
+
+	Optimize code if we have only one personality.
+	On i386:
+	   text	   data	    bss	    dec	    hex	filename
+	 238025	    672	  18980	 257677	  3ee8d	strace.before
+	 237389	    704	  18944	 257037	  3ec0d	strace
+
+	* defs.h: Define PERSONALITY0_WORDSIZE as sizeof(long) if not defined.
+	Introduce new define, current_wordsize as
+	(personality_wordsize[current_personality]).
+	Make set_personality() no-op, current_personality constant zero,
+	current_wordsize as PERSONALITY0_WORDSIZE if we have only one personality.
+	* count.c (call_summary): Use current_wordsize instead of
+	personality_wordsize[current_personality].
+	* desc.c (printflock): Likewise.
+	* file.c (sys_utime): Likewise.
+	* io.c (tprint_iov): Likewise.
+	* process.c (printargv): Likewise.
+	* resource.c (decode_rlimit): Likewise.
+	* signal.c (sys_kill): Likewise.
+	(sys_rt_sigaction): Likewise.
+	* time.c (sprinttv): Likewise.
+	(sprint_timespec): Likewise.
+	(printitv_bitness): Likewise.
+	(tprint_timex): Likewise.
+	(printsigevent): Likewise.
+	* util.c (dumpiov): Likewise.
+	(umoven): Likewise.
+	(umovestr): Likewise.
+	* syscall.c: Initialize sysent to sysent0 etc.
+	Make current_personality, personality_wordsize[], set_personality()
+	conditional on SUPPORTED_PERSONALITIES > 1.
+
+2012-03-18  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Fix mips64 build failure: sys_pwrite64 doesn't exist.
+	sys_pwrite seems to do the same thing as sys_pwrite64
+	which we deleted when we removed non-Linux code.
+
+	* linux/mips/syscallent.h: s/sys_pwrite64/sys_pwrite/
+
+	qemu_multiarch_testing/: a directory with scripts for build testing.
+
+	Make internal_fork and internal_exec static.
+	   text	   data	    bss	    dec	    hex	filename
+	 237917	    672	  18980	 257569	  3ee21	strace
+	 237845	    672	  18980	 257497	  3edd9	strace_new
+
+	* defs.h: Remove declarations of internal_fork and internal_exec.
+	* process.c: Remove definitions of internal_fork and internal_exec.
+	* syscall.c: Move them here.
+	(internal_syscall): Return void instead of int. We were always
+	returning zero, and callers weren't checking it anyway.
+
+	Remove code which is not used on Linux.
+	Compile tested in qemu on armv4l,armv4tl,armv5l,armv6l,i686,
+	mipsel,mips,x86_64
+
+	* syscall.c: Remove code which handles RVAL_Lfoo constants.
+	* defs.h: Remove struct tcb::u_lrval member - it is never set.
+	Remove RVAL_Lfoo constants which signify return of "long" result -
+	they are never used.
+
+	Remove unused version of sys_lseek.
+	It is buggy: it returns RVAL_LUDECIMAL, which means the return value
+	is in tcp->u_lrval. But tcp->u_lrval is never set
+	(on Linux - it used to be set on other OSes).
+
+	* file.c (sys_lseek): Remove a version of this function which is
+	supposed to be used if off_t is long long. It appears to be buggy
+	and unused.
+
+2012-03-17  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Revert "Remove underscores from a few syscall names which have them"
+	This reverts commit 31972d52b1059d8faca1c5f417c2db1a90b868ae.
+
+	Simplify sys_lseek64 conditional compilation.
+	It looks like sys_lseek64() is never used.
+	For one, it is buggy (always shows 0 return value), and no one complains.
+
+	From code inspection: sys_lseek64 name is not used anywhere.
+	It is defined to sys_lseek if HAVE_LONG_LONG_OFF_T is true.
+	Thus, if !HAVE_LONG_LONG_OFF_T, it is never used.
+	Therefore "if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T"
+	conditional it sits in can be simplified to
+	"if HAVE_LONG_LONG_OFF_T".
+	Therefore, we can move it a bit up and merge with
+	"if !HAVE_LONG_LONG_OFF_T, use this sys_lseek()" code block,
+	by addind an "else" clause to it.
+	To simplify it more, drop define and just rename sys_lseek64 ->
+	sys_lseek.
+
+	Since the function is buggy, I think it is unused and we can
+	just drop it. (I checked: at least I386 never uses it).
+
+	* file.c (sys_lseek64): Rename to sys_lseek; don't compile it
+	if _LFS64_LARGEFILE but !HAVE_LONG_LONG_OFF_T since in this case
+	it is never used.
+
+	Remove underscores from a few syscall names which have them.
+	Affected names are "_newselect", "_llseek", "_sysctl".
+	I see no apparent reason why they have leading underscores.
+	Moreover, some arches have underscored names and some have
+	non-underscored ones. This is not consistent.
+
+	I verified that every architectire I touched did not have
+	a similarly named syscall without underscore, thus this change
+	does not introduce new ambiquities.
+
+	I left "_exit" untouched for now, but the same points stand for it too:
+	some architectures use "exit" and no one complains. So why many
+	arches are using "_exit"?
+
+	* linux/*/syscallent.h: Remove underscores from displayed
+	syscall names for _newselect, _llseek, _sysctl.
+
+	Remove unused struct tcb::baddr field.
+	* defs.h: Remove unused struct tcb::baddr field.
+
+	Remove unused PTRACE_WRITE{TEXT,DATA} constants (they are from SunOS)
+	* util.c: Remove unused PTRACE_WRITE{TEXT,DATA} constants.
+
+	Reindent case labels. No code changes.
+	* net.c (printsockopt): Reindent case labels.
+	* signal.c (sys_signal): Likewise.
+
+	Remove unused constants. No code changes.
+	* syscall.c: Remove unused ENOIOCTLCMD constant. Fix indentation.
+	* util.c: Remove unused CLONE_STOPPED constant.
+
+	Move change_syscall() to its only user and make it static.
+	* defs.h: Remove declaration of change_syscall().
+	* process.c (change_syscall): Remove definition of this function.
+	* util.c (change_syscall): Add definition of change_syscall().
+
+	MAP_ANON is the same as MAP_ANONYMOUS, no need to have the former.
+	* mem.c: Do not allocate string for MAP_ANON if it is the same as
+	MAP_ANONYMOUS.
+
+	Indentation and whitespace fixes. No code changes.
+
+	test/threaded_execve: make it also test a case when leader is not in syscall
+
+2012-03-16  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Implement prlimit64 decoding, rewrite [gs]etrlimit decoding.
+	* configure.ac: Remove AC_RLIM_T_IS_LONG_LONG call.
+	Define SIZEOF_RLIM_T.
+	* m4/long_long.m4 (AC_RLIM_T_IS_LONG_LONG): Remove.
+	* linux/dummy.h (sys_prlimit64): Remove.
+	* linux/syscall.h (sys_prlimit64): New prototype.
+	* resource.c (resources): Reindent, add RLIMIT_RTTIME.
+	(sprintrlim, print_rlimit32, sys_getrlimit, sys_setrlimit): Remove.
+	[HAVE_LONG_LONG_RLIM_T]: Remove dead code.
+	[_LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T]: Likewise.
+	(sprint_rlim64, print_rlimit64, decode_rlimit64, sprint_rlim32,
+	print_rlimit32, decode_rlimit, sys_getrlimit, sys_setrlimit,
+	sys_prlimit64): New functions.
+
+2012-03-16  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Remove another "interrupt to quit" message.
+	* strace.c (startup_attach): Remove another "interrupt to quit" message.
+
+	Fix "strace -oFILE -ff -p<nonexistant_pid>" behavior.
+	* strace.c (newoutf): Set tcp->outf in non-ff mode too.
+	(alloctcb): This define is removed.
+	(alloc_tcb): Renamed to alloctcb. Does not set tcp->outf anymore.
+	Lost 'command_options_parsed' flag parameter.
+	(startup_attach): Do not say "interrupt to quit" in attach message -
+	^C does not work in all cases, we mislead users.
+	Call newoutf(tcp) after successful attach.
+	(startup_child): Call newoutf(tcp) after successful attach.
+	(trace): Call newoutf(tcp) when we picked up already attached child.
+
+	Make alloc_tcb and droptcb static. No code changes.
+	The change is trivial. Diff is large because it is confused
+	by function definitions being moved around.
+
+	* defs.h: Remove declarations of alloc_tcb and droptcb.
+	* strace.c: Make alloc_tcb and droptcb static.
+	Shuffle functions around to make compiler happy.
+
+	Tidy up includes and copyright notices, fix indentation.
+	The files not mentioned in changelog below had only
+	copyright notices fixes and indentation fixes.
+
+	* defs.h: Include <stdint.h> and <inttypes.h>.
+	* file.c: Do not include <inttypes.h>.
+	Move struct kernel_dirent declaration below top include block.
+	* block.c: Do not include <stdint.h> and <inttypes.h>.
+	* quota.c: Likewise.
+	* desc.c: Likewise.
+	* signal.c: Likewise.
+
+2012-03-16  Dmitry V. Levin  <ldv@altlinux.org>
+
+	scsi.c: add copyright header.
+	* scsi.c: This file was added back in 2007 without a copyright header.
+	Add it now.
+
+2012-03-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Enhance capget and capset syscalls decoding.
+	* system.c (cap_version): New xlat structure.
+	(print_cap_header, print_cap_data): New functions.
+	(sys_capget, sys_capset): Use them.
+
+	Remove unused code.
+	* syscall.c (subcall_style, decode_subcall): Remove.
+	[SYS_socket_subcall] (decode_socket_subcall): New function, based on
+	decode_subcall in deref_style.
+	[SYS_ipc_subcall] (decode_ipc_subcall): New function, based on
+	decode_subcall in shift_style.
+	(trace_syscall_entering): Use decode_socket_subcall and
+	decode_ipc_subcall instead of decode_subcall.
+
+	Fix IPC decoding on alpha and arm.
+	* ipc.c (indirect_ipccall): Return 0 on ALPHA and ARM EABI.
+	(sys_shmat): Use indirect_ipccall for proper return value decoding.
+
+	arm: fix compilation warnings.
+	* configure.ac: Define SIZEOF_LONG.
+	* signal.c (sys_rt_sigaction) [SUPPORTED_PERSONALITIES > 1]: Help
+	compiler to optimize out unreachable code that is not expected to work
+	on platforms where sizeof(long) <= 4.
+
+	tests: robustify again buggy shells.
+	* tests/init.sh (check_strace): Use "${parameter:-word}" shell syntax
+	instead of "${parameter-word}".
+
+	Reported-by: Mike Frysinger <vapier@gentoo.org>
+
+2012-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+	improve ifdef check with decode_subcall.
+	Use the same ifdef logic around the call sites of decode_subcall()
+	to protect the definition of the func itself.  This fixes warnings
+	for targets like hppa which don't use this func.
+
+	* syscall.c (decode_subcall): Wrap in SYS_socket_subcall and
+	SYS_ipc_subcall define checks.
+
+	alpha: fix decode of osf_sigprocmask.
+	The alpha sigprocmask syscall is special in that it comes from OSF rather
+	than the style that everyone else uses.
+
+	Tested with this simple code:
+	$ cat test.c
+	#include <signal.h>
+	main() {
+		sigset_t set, oldset;
+		sigemptyset(&set);
+		sigaddset(&set, SIGINT);
+		sigaddset(&set, SIGHUP);
+		sigprocmask(SIG_SETMASK, &set, &oldset);
+		sigprocmask(SIG_UNBLOCK, &oldset, &set);
+		sleep(3);
+	}
+	$ gcc test.c && ./strace ./a.out
+	...
+	osf_sigprocmask(SIG_SETMASK, [HUP INT]) = 0 (old mask [])
+	osf_sigprocmask(SIG_UNBLOCK, [])        = 0x3 (old mask [HUP INT])
+	osf_sigprocmask(SIG_BLOCK, [CHLD])      = 0x3 (old mask [HUP INT])
+	...
+
+	* linux/alpha/syscallent.h: Call sys_sigprocmask for osf_sigprocmask,
+	and change number of arguments to two.
+	* signal.c (sys_sigprocmask): Fix decoding of alpha osf sigprocmask.
+
+2012-03-15  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Fix array size calculation in previous commit.
+	* pathtrace.c (getfdpath): Fix array size calculation.
+
+	pathtrace_select() is never called with NULL, remove dead code.
+	pathtrace_select() is only called for -P FILE options,
+	and FILE is never a NULL pointer.
+
+	   text	   data	    bss	    dec	    hex	filename
+	 239453	    672	  19012	 259137	  3f441	strace.before
+	 239329	    672	  19012	 259013	  3f3c5	strace
+
+	* pathtrace.c (pathtrace_select): Remove "if (path == NULL)...".
+	(pathtrace_select): Remove code which only executes if path == NULL.
+	The code was also buggy, it can free non-malloced pointer.
+	(getfdpath): Simplify snprintf to sprintf.
+	(pathmatch): Use strcmp() == 0 idiom for string equality test.
+	(pathtrace_match): Likewise.
+
+	manpage: remove bugs which are fixed.
+	"A traced process ignores SIGSTOP" - fixed, expected to be in linux-3.4.x.
+	"A traced process which tries to block SIGTRAP will be sent a SIGSTOP
+	in an attempt to force continuation of tracing." - not needed
+	and no longer done.
+	"On Linux, exciting as it would be, tracing the init process is forbidden"
+	- not true anymore.
+	"When a traced process receives a SIGTRAP signal not
+	associated with tracing, strace will not report that signal correctly."
+	- not true anymore.
+
+	Simplify SIGCHLD handler setting.
+	* strace.c (init): Set SIGCHLD to SIG_DFL earlier.
+	(startup_child): Do not bother restoring SIGCHLD handler.
+
+	When reporting signals, use short signal names (SIGfoo) instead of strerror
+	* defs.h: Remove strsignal declaration.
+	* signal.c: Better check for SI_FROMUSER define.
+	* strace.c (strerror): Remove this function.
+	(trace): Use short signal names (SIGfoo) instead of strerror.
+
+	Remove TODO file: it's eleven years old and completely outdated.
+
+	Clean up defs.h order. No code changes.
+	* defs.h: Group together related declarations. No code changes.
+
+	Fix lame kernel version checking code.
+	The code "os_release[0] >= '3'" is not good for any
+	finer-grained checks such as "kernel >= 3.2.1".
+	Let's proactively fix it.
+
+	* strace.c: Change os_release from string to integer.
+	(get_os_release): Parse uname.release to KERNEL_VERSION
+	representation.
+	(init): Convert kernel version check to KERNEL_VERSION.
+
+	Experimental support for "detach on execve" feature.
+	* strace.c: Define new detach_on_execve, skip_startup_execve bool variables.
+	(init): Set detach_on_execve on -b, set skip_startup_execve if
+	"strace PROG" form is used.
+	(trace): Detach from process if -b and we see PTRACE_EVENT_EXEC event.
+
+	Simple fixes.
+	* strace.c (usage): Document -d; document that -F is deprecated.
+	(droptcb): Print "<detached ...>" correctly for non-ff mode too.
+	(detach): Suppress a warning.
+
+	Remove an outdated comment.
+	* defs.h: Remove an outdated comment.
+
+	Remove extra include directives. No code changes.
+	* defs.h: Include <signal.h> unconditionally.
+	Other files were doing it unconditionally, so no harm done.
+	* bjm.c: Remove system includes which are already included by defs.h.
+	* pathtrace.c: Likewise.
+	* process.c: Likewise.
+	* signal.c: Likewise.
+	* strace.c: Likewise.
+	* stream.c: Likewise.
+	* syscall.c: Likewise.
+	* system.c: Likewise.
+	* util.c: Likewise.
+
+	Tidy up order of includes; make bool variables explicit.
+	Bool variables are more compact in data and (on x86) on code too:
+
+	   text	   data	    bss	    dec	    hex	filename
+	 237950	    676	  19044	 257670	  3ee86	strace.before
+	 237838	    676	  19012	 257526	  3edf6	strace
+
+	* defs.h: Group library includes at the top of the file.
+	Rename dtime to Tflag, debug to debug_flag.
+	Change debug_flag,Tflag,qflag,not_failing_only,show_fd_path,tracing_paths
+	variable declarations from int to bool.
+	* strace.c: Change corresponding definitions. Do the same for static
+	variables iflag,rflag,print_pid_pfx.
+	Rename dtime to Tflag, debug to debug_flag.
+	* syscall.c: Rename dtime to Tflag, debug to debug_flag.
+
+2012-03-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix compiler warnings about breaking strict-aliasing rules.
+	* system.c (sys_capget, sys_capset): Use proxy unions to cast long*
+	pointers to cap_user_header_t and cap_user_data_t pointers without
+	breaking strict-aliasing rules.
+
+	Reported-by: Mike Frysinger <vapier@gentoo.org>
+
+2012-03-15  Mike Frysinger  <vapier@gentoo.org>
+
+	ppc64: drop unused pid variable.
+	* syscall.c (get_scno) [POWERPC64]: Delete unused pid variable.
+
+2012-03-15  Dmitry V. Levin  <ldv@altlinux.org>
+
+	ia64: fix compilation warnings.
+	* linux/ia64/syscallent.h: Remove improper defines and undefs.
+
+	Reported-by: Mike Frysinger <vapier@gentoo.org>
+
+	Ensure that SWAP_FLAG_* constants are defined.
+	* file.c: Define those of SWAP_FLAG_* constants which are not yet
+	provided by <sys/swap.h>.
+
+	Reported-by: Mike Frysinger <vapier@gentoo.org>
+
+2012-03-14  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Enhance *listxattr syscalls decoding.
+	* file.c (print_xattr_list): New function.
+	(sys_listxattr, sys_flistxattr): Use it.
+
+2012-03-13  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix *at syscalls flags decoding.
+	Several *at decoders were defining own incomplete *atflags xlat
+	structures.  That was error prone, and fchownat decoder actually
+	failed to recognize AT_EMPTY_PATH.  Merging these incomplete
+	structures into the single at_flags xlat structure will fix
+	flags handling in all these decoders altogether.
+
+	* file.c: Define all AT_* constants used by *at decoders.
+	(at_flags): New xlat structure, with records for all AT_* constants.
+	(fstatatflags, linkat_flags, unlinkatflags): Remove.
+	(sys_newfstatat, sys_linkat, sys_unlinkat, sys_fchownat,
+	sys_utimensat):  Use at_flags.
+
+	Fix linkat flags decoding.
+	* file.c (linkat_flags): New xlat structure.
+	(sys_linkat): Decode flags using linkat_flags.
+
+	Implement sys_rt_tgsigqueueinfo syscall decoder.
+	* linux/dummy.h (sys_rt_tgsigqueueinfo): Remove.
+	* linux/syscall.h (sys_rt_tgsigqueueinfo): New prototype.
+	* signal.c (print_sigqueueinfo): New function, based on
+	sys_rt_sigqueueinfo.
+	(sys_rt_sigqueueinfo): Use print_sigqueueinfo.
+	(sys_rt_tgsigqueueinfo): New function.
+
+	Implement syslog syscall decoder.
+	* linux/dummy.h (sys_syslog): Remove.
+	* linux/syscall.h (sys_syslog): New prototype.
+	* system.c (syslog_action_type): New xlat structure.
+	(sys_syslog): New function.
+
+2012-03-13  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Less ugly debug display of ptrace events.
+	* strace.c (trace): Less ugly debug display of ptrace events.
+
+	Make manpage mention that -p "`pidof PROG`" works.
+
+	Fix logging for "strace -o FILE -ff test/threaded_execve" test case.
+	Our logic which was deciding whether to print "<unfinished ...>"
+	thingy wasn't working properly for -ff case.
+
+	* defs.h: Group log generation-related declarations together.
+	Add a large comment which explains how it works.
+	Add declaration of line_ended() function.
+	* strace.c (line_ended): New function which sets up internal data
+	to indicate that previous line was finished.
+	(printleader): Change logic to fix log generation in -ff mode.
+	(newoutf): Make check for -ff mode consistent with other places.
+	(droptcb): Print "<detached ...>" if last line for this tcp wasn't finished.
+	(cleanup): Remove code to print "<unfinished ...>", printleader()
+	or detach() will do it instead.
+	(trace): Remove code to print "<unfinished ...>".
+	Add code which finishes threaded execve's incomplete line
+	with " <pid changed to PID ...>" message. Replace printing_tcp = NULL
+	followed by fflush() by line_ended() call.
+	* process.c (sys_exit): Call line_ended() to indicate that we finished priting.
+	* syscall.c (trace_syscall_exiting): Set printing_tcp to current tcp.
+	Call line_ended() to indicate that we finished priting.
+	Remove call to fflush(), it is done by line_ended() now.
+
+2012-03-13  Dmitry V. Levin  <ldv@altlinux.org>
+
+	net.c: recognize MSG_WAITFORONE.
+	* net.c (msg_flags): Add MSG_WAITFORONE.
+
+2012-03-12  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Treat -ff without -o FILE as single -f.
+	* strace.c (init): Treat -ff without -o FILE as single -f.
+
+	Style fix. No code changes.
+	* strace.c (process_opt_p_list): Style fix.
+
+	Reduce stack usage by ~0.5k.
+	main() uses ~0.5k of stack for local variables and such. When we enter
+	main tracing loop, most of these variables are no longer used.
+	But they still take up stack for the entire life of strace.
+	We can avoid this wastage if we move init code into a separate function.
+	(Need to be careful and not allow automatic inlining).
+
+	* strace.c (init): New function. Most of pre-existing code of
+	main is now living here.
+	(main): Call init() to do initialization.
+
+	Preparatory cosmetic changes for the next commit.
+	* strace.c (tprintf): Move function up in the source file. No code changes.
+	(tprints): Likewise.
+	(printleader): Likewise.
+	(tabto): Likewise.
+
+2012-03-11  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Implement sendmmsg syscall decoder.
+	* linux/dummy.h (sys_sendmmsg): Remove.
+	* linux/syscall.h (sys_sendmmsg): New prototype.
+	* net.c (printmmsghdr): Add index argument specifying the element in
+	mmsghdr array to print.
+	(decode_mmsg): New function, prints the whole mmsghdr array, its length
+	and message flags.
+	(sys_sendmmsg): New function.
+	(sys_recvmmsg): Use decode_mmsg to fix mmsghdr array decoding.
+
+	Implement sched_rr_get_interval syscall decoder.
+	* linux/dummy.h (sys_sched_rr_get_interval): Remove.
+	* linux/syscall.h (sys_sched_rr_get_interval): New prototype.
+	* process.c (sys_sched_rr_get_interval): New function.
+
+	Implement migrate_pages syscall decoder.
+	* linux/dummy.h (sys_migrate_pages): Remove.
+	* linux/syscall.h (sys_migrate_pages): New prototype.
+	* mem.c (sys_migrate_pages): New function.
+
+	Implement get_robust_list syscall decoder.
+	* linux/dummy.h (sys_get_robust_list): Remove.
+	* linux/syscall.h (sys_get_robust_list): New prototype.
+	* process.c (sys_get_robust_list): New function.
+
+	Define sys_set_robust_list as an alias to sys_munmap.
+	* linux/dummy.h (sys_set_robust_list): Redefine to sys_munmap.
+
+	Implement clock_adjtime syscall decoder.
+	* linux/dummy.h (sys_clock_adjtime): Remove.
+	* linux/syscall.h (sys_clock_adjtime): New prototype.
+	* time.c (do_adjtimex): New function, based on sys_adjtimex.
+	(sys_adjtimex): Use it.
+	(sys_clock_adjtime): New function.
+
+	Define sys_setns as an alias to sys_inotify_rm_watch.
+	* linux/dummy.h (sys_setns): Redefine to sys_inotify_rm_watch.
+
+	Sort definitions of dummy parsers.  No code changes.
+	* linux/dummy.h: Sort definitions of parsers implemented as aliases.
+
+	Correct inotify_rm_watch decoder.
+	* file.c (sys_inotify_rm_watch): Print second argument as int.
+
+	Alias sys_fsync to sys_close.
+	* file.c (sys_fsync): Remove.
+	* linux/syscall.h (sys_fsync): Likewise.
+	* linux/dummy.h (sys_fsync): Alias to sys_close.
+	* linux/m68k/syscallent.h: Add TD flag to fsync entry.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+
+2012-03-10  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Update ioctl entries.
+	* linux/ioctlent.h.in: Regenerate from v3.3 headers.
+	* linux/i386/ioctlent.h.in: Likewise.
+
+	strace-log-merge: cleanup.
+	* strace-log-merge: Redirect usage to stderr, make the check
+	for numeric suffix simpler.
+
+	Add syscall entries for new linux syscalls.
+	* linux/i386/syscallent.h: Update process_vm_writev handler.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+	* linux/alpha/syscallent.h: Add entries for accept4 and sendmmsg.
+	* linux/arm/syscallent.h: Add entries for process_vm_readv and
+	process_vm_writev.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Add entries for process_vm_readv,
+	process_vm_writev and accept4.
+	* linux/microblaze/syscallent.h: Add entries for sendmmsg,
+	process_vm_readv and process_vm_writev.
+
+	Implement process_vm_writev decoder.
+	* process.c (sys_process_vm_writev): New function.
+	* linux/syscall.h (sys_process_vm_writev): New prototype.
+
+	Output iovec length in vmsplice and process_vm_readv decoders.
+	* io.c (sys_vmsplice): Output iovec length.
+	* process.c (sys_process_vm_readv): Likewise.
+
+2012-03-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	swapon: decode swap flags.
+	* file.c: Include <sys/swap.h>.
+	(swap_flags): New xlat structure.
+	(sys_swapon): New function.
+	* linux/dummy.h (sys_swapon): Remove.
+	* linux/syscall.h (sys_swapon): New declaration.
+
+2012-03-09  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Trivial simplification.
+	* strace.c (detach): Use waitpid instead of wait4.
+
+	Don't consider PROG to be our child in "strace -D PROG" case.
+	TCB_STRACE_CHILD is used for the case when "strace PROG" is ^C-ed
+	or something like that. strace should not just exit - it should
+	do something with its child (such as signal it too).
+
+	In -D case, PROG is not really a child of _strace_, it is a child
+	of strace's parent. It's ok to handle it exactly as an attached process.
+
+	While we are at it, remove nonsensical special-casing of TCB_STRACE_CHILD
+	in printing of "<unfinished ...>" message.
+
+	* strace.c (startup_attach): Don't set TCB_STRACE_CHILD if -D.
+	(trace): Print "<unfinished ...>" on error regardless of TCB_STRACE_CHILD.
+
+	Fix the case where we try to detach unattached processes.
+	Before this change:
+	$ strace -D -p1
+	strace: -D and -p are mutually exclusive options
+	Process 1 detached  <==== WRONG! (and we try to SIGSTOP it!!!)
+
+	* defs.h: Change the meaning of TCB_ATTACHED: now it means "this tracee
+	is attached to us". Add TCB_STRACE_CHILD: "this tracee is our child".
+	* strace.c (kill_save_errno): Move up. No code changes.
+	(process_opt_p_list): Don't set TCB_ATTACHED on new tcb.
+	(startup_attach): Change how we work with TCB_ATTACHED.
+	Set TCB_STRACE_CHILD on -D.
+	(startup_child): Use kill_save_errno instead of kill.
+	Set TCB_ATTACHED and TCB_STRACE_CHILD on attached strace child.
+	If we are in -D case, don't set TCB_ATTACHED (we aren't attached yet).
+	(detach): do not do PTRACE_DETACH if TCB_ATTACHED is not set.
+	(cleanup): Check TCB_STRACE_CHILD instead of TCB_ATTACHED.
+	(trace): Likewise.
+
+	Call PTRACE_CONT with addr=0.
+	* strace.c (trace): Call PTRACE_CONT with addr=0.
+
+	install strace-log-merge by "make install"
+
+	strace_log_merge: new file. Helper to merge timestamped strace -ff logs.
+
+	Fix PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
+	In this case we were printing PIDs to LOG.* files
+	even though it is not necessary.
+
+	The fix is in the addition of "&& followfork < 2" condition.
+
+	* strace.c: Remove pflag_seen variable, add print_pid_pfx one.
+	(process_opt_p_list): Do not pflag_seen++.
+	(main): Use "nprocs != 0" condition instead of "pflag_seen != 0".
+	Set print_pid_pfx before entering main tracing loop.
+	(printleader): Use print_pid_pfx to decide whether to print pid prefix.
+
+	Allow -p PID to take comma or whitespace-separated list of PIDs.
+	* defs.h: Clarify meaning of TCB_ATTACHED. No code changes.
+	* strace.c (process_opt_p_list): New function.
+	(main): Call process_opt_p_list to process -p PIDs argument.
+
+2012-03-08  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Pass addr=0 instead of 1 into restarting ptrace calls.
+	While we are at it, fold do_ptrace into its lone caller.
+	We no longer set tcp->ptrace_errno = ESRCH on ESRC error in upeek.
+	Other code paths where ptrace fails wern't doing it, and the code which
+	checks tcp->ptrace_errno even assumes it is never set to ESRCH.
+	(It was me who added this code sometime ago, so it was my fault
+	that it was a bit messy)
+
+	I ran sigkill_rain test and verified that unfinished syscalls are
+	still handled correctly.
+
+	* util.c (ptrace_restart): Do not pass addr=1 to ptrace(), pass 0 instead.
+	I have no idea why we were passing 1. Ptrace documentation says
+	that addr parameter is ignored.
+	(do_ptrace): Remove this function.
+	(upeek): Use ptrace() instead of do_ptrace().
+	* defs.h: Remove do_ptrace() declaration.
+
+	Trivial tweaks to error messages.
+	* strace.c (test_ptrace_setoptions_followfork): Use kill_save_errno
+	instead of kill.
+	(trace): Use perror_msg instead of perror.
+	* count.c (set_sortby): Use error_msg_and_die instead of fprintf.
+	* syscall.c (qualify): Likewise.
+	* util.c (ptrace_restart): Expand error message.
+	(umoven): Likewise.
+	(umovestr): Likewise.
+	(upeek): Use perror_msg instead of sprintf + perror.
+
+2012-02-28  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Remove stray sys_swapon() declaration.
+	* linux/syscall.h: Remove stray sys_swapon() declaration.
+	* linux/mips/syscallent.h: Include dummy.h with correct relative path.
+	* linux/dummy.h: Tweak one place where spaces are used instead of tabs.
+	* linux/dummy_check.sh: New script. It helps in finding stray syscall
+	handler declarations.
+
+2012-02-27  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Correct syscall entries for t[g]kill.
+	* linux/hppa/syscallent.h: Make tgkill use sys_tgkill, not printargs.
+	* linux/sh/syscallent.h: Change tkill type TD -> TS.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Change tkill type 0 -> TS.
+	* linux/x86_64/syscallent.h: Likewise.
+	* linux/avr32/syscallent.h: Likewise.
+
+	Assorted trivial optimizations.
+	   text	   data	    bss	    dec	    hex	filename
+	 236448	    672	  19044	 256164	  3e8a4	strace.before
+	 236360	    672	  19044	 256076	  3e84c	strace
+
+	* file.c (sprintmode): Use smaller static buffer, eliminate strlen call.
+	(sprinttime): Use smaller static buffer.
+	(printstat_sparc64): Coalesce two printing calls into one.
+	(printstat_powerpc32): Likewise.
+	(printcompat_statfs6): Likewise.
+	(sys_utime): Do not fetch personality_wordsize[current_personality]
+	repeatedly - cache it in local variable instead.
+	* process.c (printargv): Likewise.
+	* resource.c (sprintrlim): Return const char*, not char*. This allows
+	to eliminate sprintf(buf, "RLIM_INFINITY"). Use smaller static buffer.
+	(sprintrlim64): Likewise.
+	* strace.c (strerror): Use smaller static buffer.
+	(strsignal): Likewise.
+
+	Alias a few more syscall printing functions.
+	   text	   data	    bss	    dec	    hex	filename
+	 237384	    672	  19044	 257100	  3ec4c	strace.before
+	 236448	    672	  19044	 256164	  3e8a4	strace
+
+	* defs.h: Declare new functions printargs_lu(), printargs_ld()
+	which simply print syscall all args as unsigned or signed longs.
+	* desc.c (sys_epoll_create): Call printargs_ld() instead of open-coding it.
+	* linux/syscall.h: Remove declarations of the following functions:
+	sys_alarm, sys_getresgid, sys_getsid, sys_nice, sys_setgid, sys_setpgid,
+	sys_setpgrp, sys_setregid, sys_setresgid.
+	* process.c (sys_setgid): Delete this function: now aliased to sys_setuid().
+	(sys_getresgid): Delete this function: now aliased to sys_getresuid().
+	(sys_setregid): Delete this function: now aliased to sys_setreuid().
+	(sys_setresgid): Delete this function: now aliased to sys_setresuid().
+	(sys_setpgrp): Delete this function: now aliased to printargs_lu().
+	(sys_getsid): Likewise.
+	(sys_setpgid): Likewise.
+	(sys_alarm): Likewise.
+	(sys_getpgrp): Delete this function: was unused - was already shadowed
+	by a define in linux/dummy.h.
+	(sys_setsid): Likewise.
+	(sys_getpgid): Likewise.
+	* resource.c (sys_nice): Delete this function: now aliased to printargs_ld().
+	* linux/dummy.h: Define new aliases (see above for the list).
+	* syscall.c (printargs_lu): New function.
+	(printargs_ld): New function.
+
+	Style fixes, no code changes.
+	* desc.c (sys_io_getevents): Indentation fix.
+	* file.c (sys_xstat): Remove space after function name.
+	(decode_mknod): Indentation fix.
+	* net.c (printsockopt): Indentation fix.
+	* process.c (unalignctl_string): Indentation fix.
+	(sys_sched_getscheduler): Remove space after ! operator.
+
+2012-02-25  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Compress blank lines.
+	Suppress repeated empty lines left after automated code removal.
+	This change was made by filtering every source code file through
+	"cat -s".
+
+	Remove parts of automake machinery which are not needed on Linux.
+	This change is a verbatim part of Dmitry's changes to remove support
+	for non-Linux architectures.
+
+	* Makefile.am: Don't install PORTING file. Install README-linux-ptrace file.
+	Set OS variable to linux unconditionally.
+	* configure.ac: Remove code to set opsys variable, and its usage.
+	Remove checks for headers which are never present on Linux.
+	* m4/stat.m4: Remove 'ifdef LINUX' check.
+	* m4/statfs.m4: Likewise.
+
+	Remove and update documentation.
+	This change is a verbatim part of Dmitry's changes to remove support
+	for non-Linux architectures.
+
+	* PORTING: Deleted.
+	* INSTALL: Modified.
+	* README: Modified.
+	* strace.1: Modified: bugs should be reported to mailing list, not Debian.
+	* strace.spec: do not install PORTING file.
+
+2012-02-25  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Remove a few more code parts which are unused on Linux.
+	This change is abapted from Dmitry's changes to remove support for
+	non-Linux architectures.
+
+	* Makefile.am: Remove if LINUX/endif pairs.
+	* defs.h: Remove stream_ioctl() declaration.
+	* ioctl.c (ioctl_decode): Remove 'ifdef HAVE_SYS_STREAM_H' block.
+	* resource.c: Use 'defined(FOO)' instead of 'defined FOO' form.
+	* util.c: Likewise.
+	* signal.c: Remove conditional includes which are never used on Linux.
+	* stream.c: Likewise.
+	* file.c: Remove excessive empty lines.
+
+	Build fixes after non-Linux code removal.
+	* configure.ac: Remove calls to proc-based ptrace checks.
+	* proc.c: Remove, it's empty now.
+	* Makefile.am: Remove reference to proc.c.
+	* net.c: Remove trailing newlines.
+	* quota.c: Likewise
+	* resource.c: Likewise
+	* strace.c: Likewise
+	* stream.c: Likewise
+	* time.c: Likewise
+
+	Fix defined(FOO) style.
+	* file.c: Consistently use defined(FOO) instead of defined (FOO).
+	* mem.c: Likewise.
+	* net.c: Likewise.
+	* signal.c: Likewise.
+	* sock.c: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+
+	Reindent preprocessor directives in util.c; fix style.
+	* util.c: Fix indentation of preprocessor directives broken by
+	automatic removal of non-Linux code. Fix style to use consistent
+	defined(FOO) instead of defined (FOO).
+
+	Reindent preprocessor directives in syscall.c; fix style.
+	* syscall.c: Fix indentation of preprocessor directives broken by
+	automatic removal of non-Linux code. Fix style to use consistent
+	defined(FOO) instead of defined (FOO).
+
+	Reindent defs.h preprocessor directives.
+	* defs.h: Fix indentation of preprocessor directives broken by
+	automatic removal of non-Linux code.
+
+	Cleanup after non-Linux code removal.
+	Conditions such as defined(LINUX) are always true now,
+	defined(FREEBSD) etc are always false.
+	When if directive has them as subexpressions, it can be simplified.
+	Another trivial changes here are fixes for directive indentation.
+
+	Manual removal of non-Linux source, documentation, etc.
+	Remove non-Linux source directories: freebsd/, svr4/, sunos4/, svr4/.
+	Remove README-freebsd, README-sunos4, README-svr4, m4/procfs.m4.
+
+	linux/sparc/{errnoent1,ioctlent1,signalent1}.h used to point to svr4/ files -
+	replace their contents with copies of used (and now deleted) files.
+	Make linux/sparc64/{errnoent1,ioctlent1,signalent1}.h include these files
+	instead of svr4/* ones.
+
+	Makefile.am: remove references to deleted files.
+	configure.ac: Remove a few tests which make no sense on Linux.
+	Man page: remove non-Linux quirks information.
+
+	Automated removal of non-Linux code.
+	This change is generated by running every source through the following command:
+
+	unifdef -DLINUX -Dlinux -USUNOS4 -USVR4 -UUNIXWARE -UFREEBSD
+	-USUNOS4_KERNEL_ARCH_KLUDGE -UHAVE_MP_PROCFS
+	-UHAVE_POLLABLE_PROCFS -UHAVE_PR_SYSCALL -UUSE_PROCFS file.c
+
+2012-02-24  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	When accessing data blocks, truncate addr to wordsize.
+	* util.c (umoven): Truncate addr to wordsize before use.
+
+2012-02-22  Dmitry V. Levin  <ldv@altlinux.org>
+
+	strace.1: fix a typo.
+	* strace.1: Fix a typo in example description.
+	This fixes Debian bug #653309.
+
+	Fix sockaddr_un.sun_path name in decoded output.
+	* net.c (printsock): Show sockaddr_un.sun_path as "sun_path".
+	This fixes Debian bug #554946.
+
+	Avoid potential core file clobbering on exit.
+	* strace.c (main): Set RLIMIT_CORE to zero before terminating itself
+	with a deadly signal.
+	This fixes Debian bug #656398.
+
+2012-02-20  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Eliminate native_scno and known_scno.
+	* defs.h (known_scno): Remove.
+	(sysent): Remove native_scno field.
+	* process.c [IA64]: Replace known_scno(tcp) with tcp->scno.
+	(internal_fork) [USE_PROCFS || !LINUX]: Likewise.
+	* syscall.c: Do not define NR_SYSCALL_BASE.
+	(known_scno): Remove.
+	(syscall_fixup_on_sysenter) [USE_PROCFS]: Replace known_scno(tcp)
+	with tcp->scno.
+	(trace_syscall_entering) [SVR4 || FREEBSD || SUNOS4]: Likewise.
+	(syscall_fixup_on_sysexit) [SUNOS4]: Likewise.
+
+	Remove initialization of native_scno field.
+	* linux/i386/syscallent.h: Remove native_scno initialization for clone,
+	fork and vfork.
+	* linux/ia64/syscallent.h (sys_fork, sys_vfork): Remove redirections
+	to printargs.
+	* linux/syscall.h [IA64]: Do not define SYS_fork and SYS_vfork.
+	* util.c (printcall) [IA64]: Likewise.
+	(setbpt): Use sys_func to check for clone, fork and vfork syscalls.
+
+	Do not use SYS_ipc and SYS_socketcall.
+	* linux/dummy.h (sys_ipc, sys_socketcall): Remove redirections to
+	printargs.
+	* linux/ia64/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Remove native_scno initialization for "ipc"
+	and "socketcall".
+	* linux/syscall.h (sys_ipc, sys_socketcall): New prototypes.
+	(SYS_ipc, SYS_socketcall): Remove no longer used constants.
+	[IA64]: Remove undefining of ipc and socket SYS_* constants.
+	[SPARC || SPARC64]: Remove unused ipc SYS_* constants.
+	* ipc.c (sys_ipc): New function.
+	* sock.c (sys_socketcall): Likewise.
+	* syscall.c (trace_syscall_entering): Use sys_func to check for ipc and
+	socket subcalls.
+
+	Remove initialization of native_scno field for most of syscalls.
+	The native_scno field is not so much used in the code than before.
+	In many cases sys_func is checked instead, and for most of syscall
+	entries there is no need to initialize native_scno.
+
+	* linux/i386/syscallent.h: Remove native_scno initialization for
+	_exit, read, write, waitpid, execve, wait4, sysfs, readv, writev,
+	pread64, pwrite64, exit_group, waitid, send, recv, sendto and
+	recvfrom syscall entries.
+	* linux/syscall.h: Do not define no longer used SYS_waitid and
+	SYS_sub_* constants.
+	[IA64]: Do not define SYS_waitpid and SYS32_* constants.
+	* defs.h: Do not define no longer used  __NR_exit_group constant.
+	* strace.c [USE_PROCFS] (proc_open): Use sys_func to check for execve.
+
+2012-02-14  Mike Frysinger  <vapier@gentoo.org>
+
+	util: check for process_vm_readv in C library.
+	glibc-2.15 provides process_vm_readv, so trying to provide it ourselves
+	with that version fails.
+
+	* configure.ac (AC_CHECK_FUNCS): Add process_vm_readv.
+	* util.c: Handle HAVE_PROCESS_VM_READV.
+
+2012-02-09  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	README-linux-ptrace: correct the description of suppressed signals.
+
+2012-02-06  Dmitry V. Levin  <ldv@altlinux.org>
+
+	strace -P: fix handling of invalid syscalls.
+	* pathtrace.c (pathtrace_match): Check the given syscall number using
+	SCNO_IN_RANGE.
+
+2012-02-06  H.J. Lu  <hongjiu.lu@intel.com>
+
+	Skip the syscall entry if the sys_func field is NULL.
+	Avoid NULL dereference when there are holes in sysent tables.
+	It can happen with syscall (number, ...) and number is in those holes.
+	There are no targets with holey systent tables so far, but at least
+	one such a target, x32, is already on the horizon.
+
+	* defs.h (SCNO_IN_RANGE): Also check the sys_func field.
+
+	Define RLIM64_INFINITY only if not defined.
+	* resource.c (RLIM64_INFINITY): Define only if it isn't defined.
+
+	Cast to long for %l in printf.
+	Cast a value to long for %l in printf to avoid compiler warning
+	on systems where it may be long long.
+
+	* count.c (call_summary_pers): Cast to long.
+	* ipc.c (sys_mq_open, printmqattr): Likewise.
+	* quota.c (decode_cmd_data): Likewise.
+	* resource.c (sys_sysinfo): Likewise.
+	* time.c (tprint_timex): Likewise.
+
+	Check HAVE_LONG_LONG_OFF_T when printing offset.
+	When HAVE_LONG_LONG_OFF_T is defined, we need to use %llu to print
+	offset.
+
+	* io.c (sys_sendfile): Check HAVE_LONG_LONG_OFF_T when printing
+	offset.
+
+	Define old stat functions only if needed.
+	When HAVE_LONG_LONG_OFF_T is defined, those old stat functions aren't
+	used and strace won't link since they use realprintstat which isn't
+	defined when HAVE_LONG_LONG_OFF_T is defined.
+
+	* file.c (convertoldstat, sys_oldstat, sys_oldfstat, sys_oldlstat):
+	Define only if HAVE_LONG_LONG_OFF_T isn't defined.
+
+	Print NULL for zero address in sys_mmap64.
+	* mem.c (sys_mmap64): Print NULL for zero address so that it is
+	consistent with sys_mmap.
+
+2012-02-04  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Remove unused sys_pread64 and sys_pwrite64 parsers on Linux.
+	* io.c [HAVE_LONG_LONG_OFF_T]: Remove sys_pread64 and sys_pwrite64
+	aliases.
+	(sys_pread64, sys_pwrite64): Define these functions only on
+	[SVR4 && _LFS64_LARGEFILE] platform.
+	* linux/mips/syscallent.h: Use sys_pread and sys_pwrite to handle
+	appropriate syscalls.
+	* linux/syscall.h (sys_pread64, sys_pwrite64): Remove.
+	* syscall.c (dumpio): Check sys_pread64 and sys_pwrite64 only on
+	[SVR4 && _LFS64_LARGEFILE] platform.
+
+2012-02-03  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Trivial changes to help text. No code changes.
+	* strace.c (usage): Tweak help text: remove unpaired closing brackets,
+	make -V and -h sit on separate lines (hard to see them otherwise).
+
+2012-01-29  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Simple optimizations.
+	   text	   data	    bss	    dec	    hex	filename
+	 239474	    672	  20484	 260630	  3fa16	strace.before
+	 239234	    668	  19044	 258946	  3f382	strace
+
+	* file.c (sprint_open_modes): Reduce static buffer size.
+	Simplify separator printing.
+	* signal.c (sprintsigmask): Reduce static buffer size.
+	Simplify separator printing and printing of almost full masks.
+	Use stpcpy instead of sprintf and strcpy+strlen.
+	* strace.c (startup_child): Don't strchr() for ':' twice in a row.
+	* util.c (sprintflags): Exit loop early if possible.
+
+	Trivial optimization.
+	* strace.c (cleanup): Read 'interrupted' volatile variable only once.
+
+	Make interactive-ness directly controllable via command line option.
+	Defaults are often ok, but when they are not, people get confused.
+	"Why can't I kill strace?" and "Why strace dies on ^C when I want
+	to _tracee_ to die instead?" are typical complaints.
+
+	* strace.c: Replace 'interactive' variable with 'opt_intr' variable.
+	Define INTR_foo constants for its possible values.
+	Define 'interactive' as a macro.
+	(usage): Document -I n option.
+	(main): Parse -I n option, modify signal handling to accomidate new
+	-I 1 and -I 4 modes.
+
+	Suppress compiler warning.
+	* strace.c (trace): Frame potentially unused label with ifdef/endif.
+
+	On Ctrl-C induced detach, send SIGINT to child tracee, not SIGTERM.
+	* strace.c (interrupt): Remember signal number.
+	(cleanup): If we exiting due to signal, send that signal to child tracee.
+
+	Add experimental code to use PTRACE_SEIZE, disabled by default.
+	All new code is predicated on "ifdef USE_SEIZE". If it is not defined,
+	behavior is not changed.
+
+	If USE_SEIZE is enabled and run-time check shows that PTRACE_SEIZE works, then:
+	- All attaching is done with PTRACE_SEIZE + PTRACE_INTERRUPT.
+	  This means that we no longer generate (and possibly race with) SIGSTOP.
+	- PTRACE_EVENT_STOP will be generated if tracee is group-stopped.
+	  When we detect it, we issue PTRACE_LISTEN instead of PTRACE_SYSCALL.
+	  This leaves tracee stopped. This fixes the inability to SIGSTOP or ^Z
+	  a straced process.
+
+	* defs.h: Add commented-out "define USE_SEIZE 1" and define PTRACE_SEIZE
+	and related constants.
+	* strace.c: New variable post_attach_sigstop shows whether we age going
+	to expect SIGSTOP on attach (IOW: are we going to use PTRACE_SEIZE).
+	(ptrace_attach_or_seize): New function. Uses PTRACE_ATTACH or
+	PTRACE_SEIZE + PTRACE_INTERRUPT to attach to given pid.
+	(startup_attach): Use ptrace_attach_or_seize() instead of ptrace(PTRACE_ATTACH).
+	(startup_child): Conditionally use alternative attach method using PTRACE_SEIZE.
+	(test_ptrace_setoptions_followfork): More robust parameters to PTRACE_TRACEME.
+	(test_ptrace_seize): New function to test whether PTRACE_SEIZE works.
+	(main): Call test_ptrace_seize() while initializing.
+	(trace): If PTRACE_EVENT_STOP is seen, restart using PTRACE_LISTEN in order
+	to not let tracee run.
+	* process.c: Decode PTRACE_SEIZE, PTRACE_INTERRUPT, PTRACE_LISTEN.
+	* util.c (ptrace_restart): Add "LISTEN" to a possible error message.
+
+2012-01-28  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	process_vm_readv gets EINVAL if process is gone (SIGKILLed). Don't complain.
+	* util.c (umoven): Don't complain on EINVAL from process_vm_readv.
+	(umovestr): Likewise.
+
+	Revert last change. Add a comment to prevent further misunderstanding.
+	* time.c (sys_nanosleep): Display remaining time only on interrupt.
+
+	Fix nanosleep decoding: second argument was not shown after success.
+	* time.c (sys_nanosleep): Fix bug - inverted is_restart_error() check.
+	* syscall.c (is_restart_error): Remove redundant check.
+
+	Use process_vm_readv instead of PTRACE_PEEKDATA to read data blocks.
+	Currently, we use PTRACE_PEEKDATA to read things like filenames and
+	data passed by I/O syscalls.
+	PTRACE_PEEKDATA gets one word per syscall. This is VERY expensive.
+	For example, in order to print fstat syscall, we need to perform
+	more than twenty trips into kernel to fetch one struct stat!
+
+	Kernel 3.2 got a new syscall, process_vm_readv(), which can be used to
+	copy data blocks out of process' address space.
+
+	This change uses it in umoven() and umovestr() functions if possible,
+	with fallback to old method if process_vm_readv() fails.
+	If it returns ENOSYS, we don't try to use it anymore, eliminating
+	overhead of trying it on older kernels.
+
+	Result of "time strace -oLOG ls -l /usr/lib >/dev/null":
+	before patch: 0.372s
+	After patch:  0.262s
+
+	* util.c (process_vm_readv): Wrapper to call process_vm_readv syscall.
+	(umoven): Use process_vm_readv for block reads of tracee memory.
+	(umovestr): Likewise.
+	* linux/syscall.h: Declare new function sys_process_vm_readv.
+	* process.c (sys_process_vm_readv): Decoder for new syscall.
+	* linux/i386/syscallent.h: Add process_vm_readv, process_vm_writev syscalls.
+	* linux/x86_64/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+
+	Fix a case of broken output if last seen syscall was exit.
+	* defs.h: Rename tcp_last to printing_tcp. Explain what it means.
+	Remove printtrailer() function.
+	* process.c (sys_exit): Convert printtrailer() call to "printing_tcp = NULL".
+	* strace.c: Add new variable printing_tcp.
+	(cleanup): Convert printtrailer() call to "printing_tcp = NULL".
+	(trace): Likewise.
+	(trace): Fix checks for incomplete line - it was working wrongly if last syscall was exit.
+	(printleader): Set printing_tcp.
+	(printtrailer): Remove this function.
+	* syscall.c: Remove tcp_last variable.
+	(trace_syscall_entering): Don't set printing_tcp, printleader call now does it.
+	(trace_syscall_exiting): Convert printtrailer() call to "printing_tcp = NULL".
+
+	Fix handling of test/threaded_execve.c testcase.
+	Since 3.0, Linux has a way to identify which thread execve'ed.
+	This patch makes use of it in order to properly dispose
+	of disappeared ("superseded") thread leader,
+	and replace it with execve'ed thread.
+
+	Before this patch, strace was "leaking" thread which exec'ed.
+	It was thinking that it still runs. It would look like this:
+
+	18460 pause( <unfinished ...>     <=== thread leader
+	18466 execve("/proc/self/exe", ["exe", "exe"], [/* 47 vars */] <unfinished ...>
+	18465 +++ exited with 0 +++       <=== exits from other threads
+	18460 <... pause resumed> )             = 0
+
+	The last line is wrong: it's not pause resumed, it's execve resumed.
+	If thread leader would do exit instead of pause, it is much worse:
+	strace panics because it thinks it sees return from exit syscall!
+
+	And strace isn't aware 18466 (exec'ed thread) is gone.
+	It still thinks it's executes execve syscall.
+
+	* strace.c: New variable "static char *os_release".
+	(get_os_release): New static function.
+	(main): Call get_os_release to retrieve Linux version.
+	(trace): If we see PTRACE_EVENT_EXEC, retrieve old pid, and if it
+	differs from new one, free one of tcbs and print correct messages.
+
+2012-01-27  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Fix readlink result display - was printing bogus "..." semi-randomly.
+	* file.c (decode_readlink): Use printstr() instead of printpathn().
+
+	Add new test program: test/threaded_execve.c.
+
+	Make pid2tcb static.
+	* defs.h: Remove pid2tcb declaration.
+	* strace.c (pid2tcb): Make this function static.
+
+2012-01-24  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Per Dmitry's request, remove paranoid check in verror_msg()
+	* strace.c (verror_msg): Remove redundant check for msg != NULL.
+
+	More robust error check for vasprintf.
+	* strace.c (verror_msg): More robust error check for vasprintf.
+
+	Slightly more compact handling of argv[]
+	   text	   data	    bss	    dec	    hex	filename
+	 238274	    672	  20484	 259430	  3f566	strace.before
+	 238226	    672	  20484	 259382	  3f536	strace
+
+	* strace.c (main): Slightly more compact handling of argv[]
+
+	Trivial optimization.
+	* strace.c: Set default interactive = 1 statically instead
+	of doing it in main().
+
+	Allocate -o OUTFILE buffer only if needed.
+	   text	   data	    bss	    dec	    hex	filename
+	 238258	    668	  28676	 267602	  41552	strace.before
+	 238274	    668	  20484	 259426	  3f562	strace
+
+	* strace.c (main): Allocate -o OUTFILE buffer only if needed:
+	unused buffer in bss is not entirely free.
+
+	Use single fprintf in verror_msg()
+	This change partially reverts commit 44d0532.
+
+	In code before commit 44d0532, single fprintf was used on purpose:
+	we want to send entire message as one write() call. Since stderr
+	is unbuffered, separate fprintf's to it always result in separate
+	writes, they are not coalesced. If we aren't the only program
+	which writes to this particular stderr, this may result
+	in interleaved messages.
+
+	Since this function is not performance critical, I guess
+	it's ok to make it less efficient.
+
+	* strace.c (verror_msg): Attempt to print the message in single
+	write operation. Use separate fprintfs as a fallback if malloc fails.
+
+2012-01-21  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Improve code readability (logic is unchanged)
+	* util.c (umoven): Move assignment out of function call. Make assignment
+	to a flag variable later, closer to the place where it will be used.
+	(umovestr): Likewise.
+	(uload): Likewise.
+
+2012-01-20  Denys Vlasenko  <vda.linux@googlemail.com>
+
+	Change umovestr API: return > 0 instead of 0 if NUL was seen.
+	* pathtrace.c (upathmatch): Adjust umovestr return value check for new API.
+	* util.c (printpathn): Use umovestr() > 0 return value for more efficient
+	(and robust - we don't depend on "no overwrote past NUL" behavior anymore)
+	handling of terminating NUL.
+	(printstr): Remove useless NUL placement before umovestr() call.
+	Allocate 1 byte more to outstr[] array - for NUL.
+	(umovestr): Change to return 1 if NUL was seen.
+
+	umovestr result may have no NUL, use "%.*s" instead of "%s" to print it.
+	* system.c (sys_mount): Be careful when printing umovestr result,
+	it may have no terminating NUL.
+	(sys_sysmips): Likewise.
+
+	Eliminate code duplication in time printing, reduce a few static buffers
+	   text	   data	    bss	    dec	    hex	filename
+	 238454	    664	  28772	 267890	  41672	strace.before
+	 238106	    664	  28676	 267446	  414b6	strace
+
+	* defs.h: Add TIMESPEC_TEXT_BUFSIZE and TIMEVAL_TEXT_BUFSIZE defines.
+	Add 'int special' parameter to sprinttv().
+	* time.c (sprinttv): Add 'int special' parameter, and use it
+	similarly to 'int special' parameter of printtv_bitness().
+	(printtv_bitness): Use sprinttv() instead of duplicating its code.
+	(print_timespec): Use sprint_timespec() instead of duplicating
+	its code.
+	* desc.c (decode_select): Use TIMEVAL_TEXT_BUFSIZE instead of 128
+	when checking remaining buffer size.
+	* net.c (sys_recvmsg): Use TIMESPEC_TEXT_BUFSIZE instead of 128
+	for static buffer size.
+	* stream.c (decode_poll): Use TIMESPEC_TEXT_BUFSIZE instead of 128
+	when checking remaining buffer size.
+
+2012-01-19  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Reduce bss usage and speed up string printing.
+	   text	   data	    bss	    dec	    hex	filename
+	 237913	    660	  49284	 287857	  46471	strace.before
+	 237973	    660	  28772	 267405	  4148d	strace
+
+	This reduces L1 D-cache pressure a bit: instead of dirtying
+	20k of bss, we will reuse already dirty stack area.
+
+	* util.c (printpathn): Use on-stack buffers instead of static ones.
+	Saves 5*MAXPATHLEN in bss.
+	(printstr): Use tprints() instead of tprintf("%s") when printing
+	formatted string. May be a bit faster, depending on libc.
+
+2012-01-18  Andreas Schwab  <schwab@linux-m68k.org>
+
+	Add support for compat_statfs64.
+	* file.c (struct compat_statfs64, printcompat_statfs64): Define.
+	(sys_statfs64, sys_fstatfs64): Use it.
+
+	Add support for statfs64.f_flags.
+	* file.c (printstatfs64): Print f_flags if available.
+
+	Fix missing parens.
+	* signal.c (sys_sigreturn): Add missing parens.
+
+2012-01-18  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Get rid of TCB_SIGTRAPPED.
+	On attempts to block or set SIGTRAP handler,
+	for example, using sigaction syscall, we generate
+	an additional SIGSTOP.
+
+	This change gets rid of this SIGSTOP sending/ignoring.
+	It appears to work just fine.
+
+	It also works if I force strace to not use PTRACE_O_TRACESYSGOOD,
+	which means strace stops will be marked with SIGTRAP,
+	not (SIGTRAP | 0x80) - I wondered maybe that's when
+	this hack is needed.
+
+	So, why we even have TCB_SIGTRAPPED? No one knows. It predates
+	version control: this code was present in the initial commit,
+	in 1999. No adequate comments, either.
+
+	Moreover, TCB_SIGTRAPPED is not set in sys_rt_sigaction
+	and sys_sigprocmask syscalls - the ones which are most usually
+	used to implement signal blocking, it is only set in obsolete
+	sys_signal, sys_sigaction, sys_sigsetmask, and in some dead
+	non-Linux code.
+
+	I think whatever bug it was fixing is gone long ago -
+	at least as long as sys_rt_sigaction is used by glibc.
+	Again, since glibc (and uclibc) uses sys_rt_sigaction
+	and sys_sigprocmask, modified code paths are not used
+	by most programs anyway.
+
+	* defs.h: Remove definition of TCB_SIGTRAPPED.
+	* signal.c (sys_sigvec): Don't set TCB_SIGTRAPPED and don't send SIGSTOP.
+	(sys_sigsetmask): Likewise.
+	(sys_sigaction): Likewise.
+	(sys_signal): Likewise.
+	* strace.c (trace): Remove code which executes if TCB_SIGTRAPPED is set.
+
+	When we write log, flush output buffers in a few more cases.
+	I observed a case when signal delivery message was buffered
+	by stdio until it was flushed along with the next syscall
+	entry message.
+
+	* strace.c (trace): Flush output buffers in a few more cases.
+
+	Fix old sigaction display.
+	* signal.c (sys_sigaction): Fix display of sigaction with
+	SIG_DFL/SIG_IGN handlers.
+
+	Change x86_64_regs struct type from pt_regs to user_regs_struct.
+	* syscall.c: Change x86_64_regs struct type from
+	pt_regs to user_regs_struct, and explain the change in comment.
+
+2012-01-17  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix struct pt_regs declaration on i386 and x86-64.
+	* defs.h [I386] (i386_regs): Replace definition with declaration.
+	[X86_64] (x86_64_regs): Remove.
+	* syscall.c [X86_64] (x86_64_regs): Make static.
+
+2012-01-12  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Make ERESTARTxyz messages more descriptive.
+	There is widespread confusion about exact meaning
+	of ERESTARTxyz codes. Before this change, we were showing
+	all four of them the same: as "(To be restarted)".
+
+	This change prints better explanations for these codes,
+	and contains verbose comments which explain *why* we display
+	codes that way - or else someone confused
+	is bound to come later and mangle them again.
+	New messages are:
+
+	ERESTARTSYS (To be restarted if SA_RESTART is set)
+	ERESTARTNOINTR (To be restarted)
+	ERESTARTNOHAND (Interrupted by signal)
+	ERESTART_RESTARTBLOCK (Interrupted by signal)
+
+	* syscall.c (trace_syscall_exiting): Make ERESTARTxyz messages
+	more descriptive.
+
+2012-01-10  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Fix sigreturn arg count from 1 to 0 on all architectures.
+	* linux/alpha/syscallent.h: Change [rt_]sigreturn's arg count to 0.
+	* linux/arm/syscallent.h: Likewise.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+
+	Display mask on enter to sigreturn, not on exit.
+	sys_sigreturn() performs ugly manipulations in order to show
+	signal mask which is restored by this syscall: on syscall entry,
+	fetches it from the stack, saves it in tcp->u_arg[]
+	(where it used to overflow this array - fixed sometime ago),
+	then retrieves the mask and displays it on syscall exit.
+
+	Apparently, the motivation is to make it slightly more obvious
+	to user that signal mask is restored only when this syscall returns.
+	IMO, this hardly justifies the necessary hacks. It is much easier
+	to display the mask at the point when we fetch it - on syscall entry.
+
+	While at it, I made it so that we do display returned value/errno.
+	I see no point in hiding it and showing uninformative "= ?" instead.
+
+	Example of pause() being interrupted by ALRM which has installed handler
+	which re-arms ALRM:
+
+	Before the patch:
+
+	rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
+	--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
+	alarm(1)                                = 0
+	sigreturn()                             = ? (mask now [INT])
+
+	After:
+
+	rt_sigsuspend([INT])                    = ? ERESTARTNOHAND (To be restarted)
+	--- {si_signo=SIGALRM, si_code=SI_KERNEL} (Alarm clock) ---
+	alarm(1)                                = 0
+	sigreturn() (mask [INT])                = -1 EINTR (Interrupted system call)
+
+	* defs.h: Declare struct pt_regs i386_regs and struct pt_regs x86_64_regs.
+	* syscall.c: Remove "static" keywork from these structures' definitions.
+	* signal.c (sys_sigreturn): Display mask on enter, not on exit.
+
+2012-01-04  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Do not detach from tracee which experienced ptrace error.
+	Before this patch, if a thread got nuked by exit in another thread
+	and we happened to poke it at the same time, we print "????(" thingy
+	and detach the thread. Since we removed "detach before death" logic,
+	this no longer matches the behavior of other threads.
+	Before patch:
+	[pid  1780] exit_group(1)               = ?
+	[pid  1778] ????( <unfinished ...>
+	Process 1778 detached
+	[pid  5860] +++ exited with 1 +++
+	After:
+	[pid 17765] exit_group(1)               = ?
+	[pid 21680] ????( <unfinished ...>
+	[pid 17791] +++ exited with 1 +++
+	[pid 21680] +++ exited with 1 +++
+
+	* strace (trace): Do not detach from tracee which experienced ptrace error.
+
+	Remove sig parameter from detach()
+	* strace.c (detach): Drop sig parameter - it is zero in all calls.
+	(cleanup): Don't pass sig = 0 to detach() call.
+	(detach): Ditto.
+
+2011-12-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Enhance decoding for personalities with small wordsize.
+	* util.c (umoven, umovestr) [SUPPORTED_PERSONALITIES > 1]: If current
+	personality's wordsize is less than sizeof(long), use only significant
+	bits of the given address.
+
+2011-12-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Enhance personality switching.
+	On syscall entry, save current personality in the tcb structure
+	along with scno.
+	On syscall exit, restore current personality from the tcb structure.
+	* defs.h (struct tcb) [SUPPORTED_PERSONALITIES > 1]: Add currpers
+	field.
+	* strace.c (alloc_tcb) [SUPPORTED_PERSONALITIES > 1]: Initialize
+	tcp->currpers.
+	* syscall.c (update_personality) [SUPPORTED_PERSONALITIES > 1]: New
+	function.
+	(get_scno, trace_syscall_exiting): Use it.
+
+	Reported-by: Michael A Fetterman <mafetter@nvidia.com>
+
+2011-12-01  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* net.c (socktcpoptions): Add more TCP_* constants from linux/tcp.h.
+	Reported-by: Rick Jones <rick.jones2@hp.com>
+
+2011-12-01  Heiko Carstens  <heiko.carstens@de.ibm.com>
+
+	Fix sys_ipc/sys_semtimedop decoding on s390.
+	The s390 kernel sys_ipc system call only takes five arguments instead of
+	six arguments which the common code sys_ipc implementation takes.
+	One of the arguments of the sys_semtimedop subcall is therefore passed in
+	a different register than in the common code implementation.
+	This leads to broken decoding of the timespec argument:
+
+	semtimedop(0, 0x3ffffb43832, 1, {...})  = -1 EAGAIN
+
+	Fixed it looks like this:
+
+	semtimedop(0, 0x3ffffc2c842, 1, {0, 10000000}) = -1 EINTR
+
+	* linux/ipc.c (sys_semtimedop): Fix timespec decoding on s390.
+
+2011-11-29  Dmitry V. Levin  <ldv@altlinux.org>
+
+	strace.c (trace): Fix compilation warning.
+
+2011-11-28  Dmitry V. Levin  <ldv@altlinux.org>
+
+	linux/syscall.h: Remove redundant function declarations.
+	Remove 51 function declarations aliased to other declarations in
+	linux/dummy.h file.
+
+	linux/syscall.h: Sort function declarations.
+
+	linux/syscall.h: Place one function declaration per line.
+
+	Remove redundant parsers.
+	* desc.c (sys_dup): Remove.
+	* file.c (sys_pivotroot, sys_rmdir, sys_fchdir, sys_chroot, sys_fchroot,
+	sys_unlink, sys_symlink, sys_rename): Remove.
+	* linux/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_pivotroot,
+	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
+	* linux/dummy.h: Add aliases for sys_chroot, sys_dup, sys_pivotroot,
+	sys_rename, sys_rmdir, sys_symlink, sys_unlink.
+	* pathtrace.c (pathtrace_match): Update.
+	* sunos4/dummy.h: Add aliases for sys_chroot, sys_dup, sys_fchdir,
+	sys_fchroot, sys_rename, sys_rmdir, sys_symlink, sys_unlink.
+	* svr4/dummy.h: Likewise.
+	* sunos4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
+	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
+	* svr4/syscall.h (sys_chroot, sys_dup, sys_fchdir, sys_fchroot,
+	sys_rename, sys_rmdir, sys_symlink, sys_unlink): Remove.
+
+	Reflect the fact that nfsservctl syscall was removed from linux kernels.
+	linux/dummy.h: Move nfsservctl to "unimplemented" section.
+
+2011-11-27  Dmitry V. Levin  <ldv@altlinux.org>
+
+	x86_64: add getcpu syscall entry.
+	* linux/x86_64/syscallent.h: Add syscall entry for getcpu.
+
+2011-11-26  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Add syscall entries for new linux syscalls.
+	* linux/dummy.h: Add printargs parsers for new syscalls.
+	* linux/arm/syscallent.h: Add entries for sys_clock_adjtime,
+	sys_name_to_handle_at, sys_open_by_handle_at, sys_sendmmsg, sys_setns
+	and sys_syncfs.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+	* linux/alpha/syscallent.h: Add entries for sys_clock_adjtime,
+	sys_name_to_handle_at, sys_open_by_handle_at, sys_setns and sys_syncfs.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/avr32/syscallent.h: Add entry for sys_setns.
+	* linux/bfin/syscallent.h: Add entries for sys_sendmmsg and sys_setns.
+	* linux/hppa/syscallent.h: Add entries for sys_clock_adjtime,
+	fanotify_init, fanotify_mark, sys_name_to_handle_at,
+	sys_open_by_handle_at, sys_sendmmsg, sys_setns and sys_syncfs.
+
+	Fix prctl syscall entries.
+	* linux/mips/syscallent.h: Fix prctl handler.
+	* linux/tile/syscallent.h: Likewise.
+
+	arm: fix io_* syscall entries.
+	* linux/arm/syscallent.h: Fix handlers for io_setup, io_destroy,
+	io_getevents, io_submit and io_cancel.
+
+	Fix mincore syscall entries.
+	* linux/arm/syscallent.h: Fix mincore handler.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+
+2011-11-25  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix sendmsg syscall entries.
+	* linux/arm/syscallent.h: Fix number of sendmsg arguments.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/hppa/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+
+	Fix epoll_wait syscall entries.
+	* linux/arm/syscallent.h: Fix epoll_wait flags and handler.
+	* linux/m68k/syscallent.h: Fix epoll_wait flags.
+	* linux/microblaze/syscallent.h: Fix number of epoll_wait arguments.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+
+	Fix epoll_ctl syscall entries.
+	* linux/arm/syscallent.h: Fix epoll_ctl flags and handler.
+	* linux/m68k/syscallent.h: Fix epoll_ctl flags.
+	* linux/x86_64/syscallent.h: Fix number of epoll_ctl arguments.
+
+	arm: fix epoll_create syscall entry.
+	* linux/arm/syscallent.h: Fix epoll_create handler.
+
+	Fix mlockall syscall entries.
+	* linux/arm/syscallent.h: Fix number of mlockall arguments.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+
+	Fix epoll_pwait syscall entries.
+	* linux/alpha/syscallent.h: Fix number of epoll_pwait arguments.
+	* linux/arm/syscallent.h: Likewise.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+
+	Fix reboot syscall entries.
+	* linux/alpha/syscallent.h: Fix number of reboot arguments.
+	* linux/arm/syscallent.h: Likewise.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/hppa/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+
+	Fix swapon syscall entries.
+	* linux/arm/syscallent.h: Fix number of swapon arguments.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+	* linux/x86_64/syscallent.h: Likewise.
+	* linux/alpha/syscallent.h: Fix number of swapon arguments, add TF flag.
+	* linux/hppa/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Likewise.
+
+	Fix sgetmask and ssetmask syscall entries.
+	* linux/hppa/syscallent.h: Fix sgetmask and ssetmask entries.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+	* linux/tile/syscallent.h: Likewise.
+
+	Rename siggetmask to sgetmask and sigsetmask to ssetmask.
+	* linux/arm/syscallent.h: Rename siggetmask to sgetmask and
+	sigsetmask to ssetmask.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/ia64/syscallent.h: Rename sys_sgetmask to sys_siggetmask,
+	sys_ssetmask to sys_sigsetmask.
+
+	Add TRACE_IPC flag to sys_ipc syscall entries.
+	* linux/arm/syscallent.h: Add TI flag to sys_ipc entry.
+	* linux/avr32/syscallent.h: Likewise.
+	* linux/bfin/syscallent.h: Likewise.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/microblaze/syscallent.h: Likewise.
+	* linux/mips/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+
+2011-11-05  Dmitry V. Levin  <ldv@altlinux.org>
+
+	gitlog-to-changelog: update from gnulib.
+	* gitlog-to-changelog: Update from gnulib.
+	* Makefile.am: Add --append-dot to gitlog-to-changelog invocation.
+
+2011-10-22  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Decode TIOCSCTTY's third parameter.
+	* term.c (term_ioctl): Decode TIOCSCTTY's third parameter.
+
+2011-10-14  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Remove useless and obsolete "#if DONE" sections.  No code changes.
+	* linux/dummy.h: Remove "#if DONE" section.
+	* linux/sparc/dummy2.h: Likewise.
+	* linux/sparc64/dummy2.h: Likewise.
+	* sunos4/dummy.h: Likewise.
+	* svr4/dummy.h: Likewise.
+
+	Add names for dummy parsers.  No code changes.
+	* linux/dummy.h: Add aliases to printargs() for those of dummy parsers
+	that had no own names before.
+	* linux/*/syscallent.h: Use these new names instead of printargs.
+
+	Sort definitions of dummy parsers.  No code changes.
+	* linux/dummy.h: Sort definitions of parsers implemented as aliases
+	to printargs().
+
+2011-10-14  Mike Frysinger  <vapier@gentoo.org>
+
+	sys_epoll_create1: decode flag arguments correctly.
+	* desc.c (epollflags): Define.
+	(sys_epoll_create1): Use epollflags to printflags. Change "O" to "EPOLL".
+
+	Reported-by: Марк Коренберг <socketpair@gmail.com>
+
+2011-10-11  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Implement decoding of splice, tee and vmsplice(2) syscalls.
+	* io.c (print_loff_t): New function.
+	(sys_sendfile64): Use it.
+	(splice_flags): New xlat structure.
+	(sys_tee, sys_splice, sys_vmsplice): New functions.
+	* linux/syscall.h (sys_tee, sys_splice, sys_vmsplice): Declare them.
+	* linux/*/syscallent.h: Use them.
+
+	Fix epoll_wait and epoll_pwait decoding.
+	* desc.c (epoll_wait_common): Print "maxevents" and "timeout" arguments
+	as integers.
+
+	Reported-by: Марк Коренберг <socketpair@gmail.com>
+
+	Decode EPOLLRDHUP.
+	* desc.c (epollevents): Add EPOLLRDHUP.
+
+	Reported-by: Марк Коренберг <socketpair@gmail.com>
+
+	Remove unreachable code in umoven() and umovestr().
+	* util.c (umoven, umovestr): Remove unreachable code.
+
+	Reported-by: Weichuan Yan <wchyan@marvell.com>
+
+2011-09-05  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Do post-attach initialization earlier; fix "we ignore SIGSTOP on NOMMU" bug
+	We set ptrace options when we see post-attach SIGSTOP.
+	This is wrong: it's better to set them right away on the very first
+	stop (whichever it will be). It also will make adding SEIZE support easier,
+	since SEIZE has no post-attach SIGSTOP.
+
+	We do it by adding a new bit, TCB_IGNORE_ONE_SIGSTOP, and treating
+	TCB_STARTUP and TCB_IGNORE_ONE_SIGSTOP as two slightly different things.
+
+	* defs.h: Add a new flag bit, TCB_IGNORE_ONE_SIGSTOP.
+	* process.c (internal_fork): Set TCB_IGNORE_ONE_SIGSTOP on a newly added child.
+	* strace.c (startup_attach): Set TCB_IGNORE_ONE_SIGSTOP after attach.
+	Fix a case when "strace -p PID" found PID dead but sone other of its threads
+	still alive.
+	(startup_child): Set TCB_IGNORE_ONE_SIGSTOP after attach, _if needed_.
+	This fixes a bogus case where we can ignore a _real_ SIGSTOP on NOMMU.
+	(detach): Perform anti-SIGSTOP dance only if TCB_IGNORE_ONE_SIGSTOP is set,
+	not if TCB_STARTUP is set.
+	(trace): Set TCB_IGNORE_ONE_SIGSTOP after attach.
+	Clear TCB_STARTUP and initialize tracee on the very first tracee stop.
+	Clear TCB_IGNORE_ONE_SIGSTOP when SIGSTOP is seen.
+
+	Get rid of TCB_ATTACH_DONE.
+	* defs.h: Remove TCB_ATTACH_DONE constant.
+	* strace.c (startup_attach): Use TCB_STARTUP instead of TCB_ATTACH_DONE
+	to distinquish attached from not-yet-attached threads.
+
+	Set TCB_STARTUP only _after_ we attached.
+	This fixes logic in detach() which thinks that TCB_STARTUP
+	means that we are already attached, but did not see SIGSTOP yet.
+	This also allows to get rid of TCB_ATTACH_DONE flag.
+
+	* process.c (internal_fork): Set TCB_STARTUP after attach.
+	* strace.c (startup_attach): Likewise.
+	(startup_child): Likewise.
+	(alloc_tcb): Do not set TCB_STARTUP on tcb allocation - we are
+	not attached yet.
+	(trace): Set TCB_STARTUP when we detech an auto-attached child.
+
+2011-09-02  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Simple optimizations in trace()
+	* strace.c (trace): Calculate WSTOPSIG(status) once,
+	unify code paths to ptrace(PTRACE_SYSCALL).
+
+	Trivial fixes on error paths.
+	* strace.c (startup_attach): Emit message on fork() failure.
+	(startup_child): Remove non-informative comment.
+	* util.c (ptrace_restart): use perror_msg() on error instead of fprintf().
+
+2011-09-01  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Fix compile failure introduced by last commit.
+	* desc.c (decode_select): Fix double definition of nfds.
+
+	Roll back "die on malloc failure" behaviour a bit.
+	After recent change, select(2^31-1, NULL, NULL, NULL)
+	would make strace exit. This change caps fdsize so that
+	it is always in [0, 1025*1024], IOW: we will try to allocate at most
+	1 megabyte, which in practice will almost always work,
+	unlike malloc(2Gig).
+
+	* desc.c (decode_select): Cap fdsize to 1024*1024.
+	* pathtrace.c (pathtrace_match): Cap fdsize to 1024*1024.
+	* file.c (sys_getdents): Cap len to 1024*1024.
+	(sys_getdents64): Cap len to 1024*1024.
+	* util.c (dumpiov): Refuse to process iov with more than 1024*1024
+	elements. Don't die on malloc failure.
+	(dumpstr): Don't die on malloc failure.
+
+	Add stpcpy to autoconf machinery.
+	* configure.ac: Add stpcpy to AC_CHECK_FUNCS.
+	* defs.h: Frame stpcpy with "if !defined HAVE_STPCPY".
+	* util.c: Likewise.
+
+	Simplify sprinttv()
+	* time.c (sprinttv): Trivial simplifications.
+
+	* desc.c (decode_select): Set tcp->auxstr as late as possible.
+
+	Reformat setuid-ing code in startup_child()
+	New code does the same as old one, but is more readable (I hope).
+
+	* strace.c (startup_child): Reformat setuid-ing code.
+
+	Minor tweaks in startup_child(). Logic isn't changed (but code is)
+	* strace.c (startup_attach): Tweak comment.
+	(startup_child): Move common code out of ifdef.
+	Indent nested ifdefs. Tweak comments. Remove two
+	unnecessary calls to getpid().
+
+	Use tprints with literal strings, it may be faster than tprintf.
+	* bjm.c: Replace tprintf("str") with tprints("str").
+	* block.c: Likewise.
+	* desc.c: Likewise.
+	* file.c: Likewise.
+	* io.c: Likewise.
+	* ipc.c: Likewise.
+	* mem.c: Likewise.
+	* net.c: Likewise.
+	* proc.c: Likewise.
+	* process.c: Likewise.
+	* quota.c: Likewise.
+	* resource.c: Likewise.
+	* scsi.c: Likewise.
+	* signal.c: Likewise.
+	* sock.c: Likewise.
+	* strace.c: Likewise.
+	* stream.c: Likewise.
+	* syscall.c: Likewise.
+	* system.c: Likewise.
+	* term.c: Likewise.
+	* time.c: Likewise.
+	* util.c: Likewise.
+
+	Fix "format not a string literal" warning caused by tprintf(str)
+	* defs.h: Declare tprints().
+	* strace.c: Define tprints().
+	(tabto): Use tprints(str), since tprintf(str) was throwing a warning.
+	* desc.c: Use tprints(str) instead of tprintf("%s", str).
+	* file.c: Likewise.
+	* io.c: Likewise.
+	* net.c: Likewise.
+	* process.c: Likewise.
+	* signal.c: Likewise.
+	* syscall.c: Likewise.
+	* util.c: Likewise.
+
+2011-08-31  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Add README-linux-ptrace file.
+	I tried to push this doc to Michael Kerrisk <mtk.manpages@gmail.com>,
+	but got no reply. To avoid losing the document, let it live
+	in strace tree for now.
+
+	Make out-of-memory handling more uniform.
+	This fixes one real bug in dumpstr().
+
+	* defs.h: Declare die_out_of_memory().
+	* strace.c (die_out_of_memory): New function.
+	(strace_popen): If allocation fails, call die_out_of_memory().
+	(main): Likewise.
+	(expand_tcbtab): Likewise.
+	(rebuild_pollv): Likewise.
+	* count.c (count_syscall): Likewise.
+	(call_summary_pers): Likewise.
+	* desc.c (decode_select): Likewise.
+	* file.c (sys_getdents): Likewise.
+	(sys_getdents64): Likewise.
+	(sys_getdirentries): Likewise.
+	* pathtrace.c (pathtrace_match): Likewise.
+	* syscall.c (qualify): Likewise.
+	* util.c (printstr): Likewise.
+	(dumpiov): Likewise.
+	(dumpstr): Likewise.
+	(fixvfork): Likewise.
+	* mem.c (sys_mincore): Don't check free() parameter for NULL.
+
+	Optimization: eliminate all remaining usages of strcat()
+	After this change, we don't use strcat() anywhere.
+
+	* defs.h: Change sprinttv() return type to char *.
+	* time.c (sprinttv): Return pointer past last stored char.
+	* desc.c (decode_select): Change printing logic in order to eliminate
+	usage of strcat() - use stpcpy(), *outptr++ = ch, sprintf() instead.
+	Also reduce usage of strlen().
+	* stream.c (decode_poll): Likewise.
+
+	Optimize string_quote() for speed.
+	* util.c (string_quote): Speed up check for terminating NUL.
+	Replace strintf() with open-coded binary to hex/oct conversions -
+	we potentially do them for every single byte, need to be fast.
+
+	Optimization: eliminate some usages of strcat()
+	* defs.h: Declare stpcpy().
+	* util.c: Define stpcpy().
+	* file.c: Remove static str_append().
+	(sprint_open_modes): Use stpcpy() instead of str_append().
+	(sprintflags): Use stpcpy() instead of strcat().
+	(printpathn): Eliminate usage of strcat().
+	(printstr): Eliminate usage of strcat().
+
+2011-08-30  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Small optimization on AVR32.
+	* syscall.c (syscall_enter): Optimize tcp->u_arg[i] setting
+	from regs.FOO for AVR32.
+
+	On X86_64 and I386, use PTRACE_GETREGS to fetch all registers.
+	Before this change, registers were read with PTRACE_PEEKUSER
+	ptrace operation, one per register. This is slower than
+	fetching them all in one ptrace operation.
+
+	* defs.h: include asm/ptrace.h on X86_64 and I386.
+	* syscall.c: New static variables i386_regs and x86_64_regs.
+	Remove static eax/rax variables.
+	(get_scno): Fetch all registers with single PTRACE_GETREGS operation.
+	(get_syscall_result): Likewise.
+	(syscall_fixup_on_sysenter): Use PTRACE_GETREGS results in i386/x86_64_regs.
+	(syscall_enter): Set tcp->u_arg[i] from PTRACE_GETREGS results.
+	(get_error): Set tcp->u_rval, tcp->u_error from PTRACE_GETREGS results.
+
+2011-08-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Do not include <limits.h>
+	* strace.c: Do not include <limits.h> explicitly, it is already included
+	implicitly by <sys/param.h>.
+
+	Include <sys/param.h> to get PATH_MAX definition.
+	* pathtrace.c: Include <sys/param.h> instead of <limits.h> to get
+	PATH_MAX definition.
+
+	Reported-by: Steve Bennett <steveb@workware.net.au>
+
+2011-08-26  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Indent a large set of nested ifdefs/endifs. No code changes.
+	* defs.h: Indent a large set of nested ifdefs/endifs
+
+	Rename syscall_fixup to syscall_fixup_on_sysenter.
+	* defs.h: Tweak comment.
+	* syscall.c: Rename syscall_fixup to syscall_fixup_on_sysenter.
+	(trace_syscall_entering): Use new finction name.
+
+	Make syscall result reading more consistent among different arches.
+	* syscall.c: Eliminate static flags variable for POWERPC.
+	(syscall_fixup): Don't fetch syscall results. Affected arches:
+	POWERPC, BFIN, HPPA.
+	(syscall_fixup_on_sysexit): Move syscall results fetching code
+	for this function to get_syscall_result. Affected arches:
+	S390X, POWERPC, BFIN, M68K, HPPA, CRIS, MICROBLAZE.
+	(get_syscall_result): Add syscall results fetching.
+
+2011-08-25  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Simplify syscall_fixup[_on_sysexit]
+	* syscall.c (syscall_fixup): Remove checks for entering(tcp).
+	Remove code which executes if exiting(tcp).
+	(syscall_fixup_on_sysexit): Remove code which executes
+	if entering(tcp). Remove checks for exiting(tcp).
+
+	Split syscall_fixup into enter/exit pair of functions.
+	* syscall.c: Create syscall_fixup_on_sysexit() which is a copy of
+	syscall_fixup().
+	(trace_syscall_exiting): Call syscall_fixup_on_sysexit() instead of
+	syscall_fixup().
+
+	Remove stray commas in struct initializers. No code changes.
+	* process.c: Remove stray commas in struct initializers.
+
+2011-08-24  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Optimize tabto()
+	tabto is used in many lines of strace output.
+	On glibc, tprintf("%*s", col - curcol, "") is noticeably slow
+	compared to tprintf("                 "). Use the latter.
+	Observed ~15% reduction of time spent in userspace.
+
+	* defs.h: Drop extern declaration of acolumn. Make tabto()
+	take no parameters.
+	* process.c (sys_exit): Call tabto() with no parameters.
+	* syscall.c (trace_syscall_exiting): Call tabto() with no parameters.
+	* strace.c: Make acolumn static, add static char *acolumn_spaces.
+	(main): Allocate acolumn_spaces as a string of spaces.
+	(printleader): Call tabto() with no parameters.
+	(tabto): Use simpler method to print lots of spaces.
+
+	* syscall.c (sys_indir): Use %ld for printing long, not %u.
+
+	Opotimize "scno >= 0 && scno < nsyscalls" check.
+	gcc can't figure out on its own that this check can be done with
+	single compare, and does two compares. We can help it by casting
+	scno to unsigned long: ((unsigned long)(scno) < nsyscalls)
+
+	* defs.h: New macro SCNO_IN_RANGE(long_var).
+	* count.c (count_syscall): Use SCNO_IN_RANGE() instead of open-coded check.
+	* syscall.c (getrval2): Use SCNO_IN_RANGE() instead of open-coded check.
+	This fixes a bug: missing check for scno < 0 and scno > nsyscalls
+	instead of scno >= nsyscalls.
+	(get_scno): Use SCNO_IN_RANGE() instead of open-coded check.
+	This fixes a bug: scno > nsyscalls instead of scno >= nsyscalls.
+	(known_scno): Use SCNO_IN_RANGE() instead of open-coded check.
+	(internal_syscall): Likewise.
+	(syscall_enter): Likewise.
+	(trace_syscall_entering): Likewise.
+	(get_error): Likewise.
+	(trace_syscall_exiting): Likewise.
+
+	Remove scno_good logic in syscall exit.
+	* syscall.c (trace_syscall_exiting): Remove scno_good logic,
+	it can't trigger in syscall exit.
+
+	Remove redundant assignments.
+	* syscall.c (get_error): Remove redundant "u_error = 0" and redundant
+	and unclear comments.
+
+	Group int-sized fields together in struct tcb.
+	* defs.h: Group int-sized fields together in struct tcb.
+
+	Reorder functions in syscall.c. No code changes.
+	Old order (basically "in no particular order"):
+	    dumpio
+	    decode_subcall
+	    internal_syscall
+	    get_scno
+	    get_syscall_result
+	    known_scno
+	    syscall_fixup
+	    is_negated_errno
+	    get_error
+	    syscall_enter
+	    trace_syscall_entering
+	    trace_syscall_exiting
+	    trace_syscall
+	    printargs
+	    getrval2
+	    sys_indir
+	    is_restart_error
+
+	New order:
+	various utility functions:
+	    decode_subcall
+	    printargs
+	    getrval2
+	    sys_indir
+	    is_restart_error
+	syscall enter handling functions:
+	    get_scno
+	    known_scno
+	    syscall_fixup (also used in syscall exit code)
+	    internal_syscall (also used in syscall exit code)
+	    syscall_enter
+	    trace_syscall_entering
+	syscall exit handling functions:
+	    get_syscall_result
+	    is_negated_errno
+	    get_error
+	    dumpio
+	    trace_syscall_exiting
+	main syscall enter/exit function:
+	    trace_syscall
+
+	* syscall.c: Reorder functions so that related ones are closer
+	in the source.
+
+	Rename some functions, delete unused one. No code changes.
+	* defs.h: Rename get_scno_on_sysenter() to get_scno();
+	delete force_result() declaration.
+	* strace.c (proc_open): Rename get_scno_on_sysenter() to get_scno().
+	* syscall.c: Rename get_scno_on_sysenter() to get_scno().
+	Rename get_scno_on_sysexit() to get_syscall_result().
+	Delete unused force_result().
+
+	Unify per-architecture post-execve SIGTRAP check.
+	Move post-execve SIGTRAP check from get_scno_on_sysenter
+	(multitude of places on many architectures) to a single location
+	in trace_syscall_entering. This loosens the logic for some arches,
+	since many of them had additional checks such as scno == 0.
+	However, on non-ancient Linux kernels we should never have post-execve
+	SIGTRAP in the first place, by virtue of using PTRACE_O_TRACEEXEC.
+
+	* syscall.c (get_scno_on_sysenter): Remove tcp->flags & TCB_WAITEXECVE checks.
+	(trace_syscall_entering): Do tcp->flags & TCB_WAITEXECVE check here.
+	(get_scno_on_sysexit): Tweak comment.
+	(syscall_fixup): Likewise.
+	(trace_syscall_exiting): Likewise.
+
+	Speed up x86 by avoiding EAX read on syscall entry.
+	on x86, EAX read on syscall entry is not necessary if we know
+	that post-execve SIGTRAP is disabled by PTRACE_O_TRACEEXEC ptrace option.
+	This patch (a) moves EAX retrieval from syscall_fixup
+	to get_scno_on_sysexit, and (b) perform EAX retrieval in syscall_fixup
+	only if we are in syscall entry and PTRACE_O_TRACEEXEC option is not on.
+
+	* syscall.c (get_scno_on_sysexit): On I386 and X86_64, read eax/rax
+	which contain syscall return value.
+	(syscall_fixup): On I386 and X86_64, read eax/rax only on syscall enter
+	and only if PTRACE_O_TRACEEXEC is not in effect.
+
+	Do not read syscall no in get_scno_on_sysexit.
+	* syscall.c (get_scno_on_sysexit): Remove scno retrieval code, since
+	we don't save it anyway. This is the first real logic change
+	which should make strace faster: for example, on x64 ORIG_EAX
+	is no longer read in each syscall exit.
+
+	Simplify get_scno_on_sysenter/sysexit.
+	* syscall.c (get_scno_on_sysenter): Remove "if (exiting(tcp))" code,
+	make "if (entering(tcp))" code unconditional.
+	(get_scno_on_sysexit): Remove "if (entering(tcp))" code,
+	make "if (exiting(tcp))" code unconditional.
+
+	get_scno is an unholy mess, make it less horrible.
+	Currently, get_scno does *much* more than "get syscall no".
+	It checks for post-execve SIGTRAP. It checks for changes
+	in personality. It retrieves params on entry and registers on exit.
+	Worse still, it is different in different architectures: for example,
+	for AVR32 regs are fetched in get_scno(), while for e.g. I386
+	it is done in syscall_enter().
+
+	Another problem is that get_scno() is called on both syscall entry and
+	syscall exit, which is stupid: we don't need to know scno on syscall
+	exit, it is already known from last syscall entry and stored in
+	tcp->scno! In essence, get_scno() does two completely different things
+	on syscall entry and on exit, they are just mixed into one bottle, like
+	shampoo and conditioner.
+
+	The following patches will try to improve this situation.
+
+	This change duplicates get_scno into identical get_scno_on_sysenter,
+	get_scno_on_sysexit functions. Call them in syscall enter and syscall
+	exit, correspondingly.
+
+	* defs.h: Rename get_scno to get_scno_on_sysenter; declare it only
+	if USE_PROCFS.
+	* strace.c (proc_open): Call get_scno_on_sysenter instead of get_scno.
+	* syscall.c (get_scno): Split into two (so far identical) functions
+	get_scno_on_sysenter and get_scno_on_sysexit.
+	(trace_syscall_entering): Call get_scno_on_sysenter instead of get_scno.
+	(trace_syscall_exiting): Call get_scno_on_sysexit instead of get_scno.
+
+2011-08-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Reduce code redundancy in syscall_enter()
+	* syscall.c [LINUX] (syscall_enter): Move tcp->u_nargs initialization
+	from arch-specific ifdefs to common code.  Always cache tcp->u_nargs in
+	a local variable and use it in for() loops.
+	[IA64, AVR32] Rewrite tcp->u_arg[] initialization using a loop.
+
+2011-08-23  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Define MAX_ARGS to 6 for all Linux arches.
+	* defs.h: Define MAX_ARGS to 6 for all Linux arches.
+	* linux/ia64/syscallent.h: Change all 8-argument printargs
+	to MA (MAX_ARGS).
+	linux/mips/syscallent.h: Change all two 7-argument printargs
+	to MA (MAX_ARGS).
+
+	Fix argument printing in sys_mmap64.
+	* mem.c (sys_mmap64): Fix a bug where we used tcp->u_args[i]
+	instead of argument values copied from memory.
+
+	Cache tcp->u_nargs in a local variable for for() loops.
+	Loops of the form "for (i = 0; i < tcp->u_nargs; i++) ..."
+	need to fetch tcp->u_nargs from memory on every iteration
+	if "..." part has a function call (gcc doesn't know that
+	tcp->u_nargs won't change). This can be sped up
+	by putting tcp->u_nargs in a local variable, which might
+	go into a CPU register.
+
+	* syscall.c (decode_subcall): Cache tcp->u_nargs in a local variable
+	as for() loop limit value.
+	(syscall_enter): Likewise.
+
+	Drop checks for sysent[i].nargs == -1.
+	* defs.h: Declare nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
+	* syscall.c: Define nsyscalls, nerrnos, nioctlents, nsignals as unsigned.
+	(decode_subcall): Drop checks for sysent[i].nargs == -1.
+	(syscall_enter): Likewise.
+
+	Stop using nargs == -1 in syscallent tables.
+	Usage -1 as argument count in syscallent tables
+	necessitates the check for it, a-la:
+	if (sysent[tcp->scno].nargs != -1)
+	    tcp->u_nargs = sysent[tcp->scno].nargs;
+	else
+	    tcp->u_nargs = MAX_ARGS;
+	which is stupid: we waste cycles checking something which
+	is constant and known at compile time.
+
+	* defs.h: Make struct sysent::nargs unsigned.
+	* freebsd/i386/syscallent.h: Replace nargs of -1 with MA.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* svr4/syscallent.h: Likewise.
+	* freebsd/syscalls.pl: Likewise in generator script.
+	* syscallent.sh: Likewise in generator script.
+	* syscall.c: Add define MA MAX_ARGS / undef MA around includes
+	of syscallent[N].h.
+
+	Move trace_syscall_exiting below trace_syscall_entering. No code changes.
+	Syscall enter happens before syscall exit. Having functions
+	in opposite order in the source is confusing.
+
+	* syscall.c: Move trace_syscall_exiting below trace_syscall_entering.
+
+	Fix -z display.
+	Before this patch, the following:
+	    open("qwerty", O_RDONLY)    = -1 ENOENT
+	    write(2, "wc: qwerty: No such file or dire"..., 38) = 38
+	was shown totally wrongly with -z:
+	    open("qwerty", O_RDONLY)    = 38
+	(yes, that's right, write syscall is lost!)
+	Now it is shown "less wrongly" as:
+	    open("qwerty", O_RDONLY <unfinished ...>
+	    write(2, "wc: qwerty: No such file or dire"..., 38) = 38
+
+	* syscall.c (trace_syscall_exiting): Use common TCB_INSYSCALL clearing
+	via "goto ret". This fixes totally broken display of -z, but even now
+	it is not working as intended. Add a comment about that.
+	(trace_syscall_entering): Use common TCB_INSYSCALL setting
+	via "goto ret".
+
+	Straighten up confused comments/messages about post-execve SIGTRAP handling
+	* defs.h: Explain TCB_INSYSCALL and TCB_WAITEXECVE bits in detail.
+	* strace.c (choose_pfd): Use entering/exiting macros instead of direct check
+	for TCB_INSYSCALL.
+	* syscall.c (get_scno): Use entering/exiting macros instead of direct check
+	for TCB_INSYSCALL. Fix comments about post-execve SIGTRAP.
+	(syscall_fixup): Use entering/exiting instead of direct check
+	for TCB_INSYSCALL. Add a comment what "not a syscall entry" message
+	usually means. Change wrong "stray syscall exit" messages into
+	"not a syscall entry" ones.
+
+	count_syscall() always returns 0, optimize it.
+	* defs.h (count_syscall): Change return type from int to void.
+	* count.c (count_syscall): Change return type from int to void.
+	* syscall.c (trace_syscall_exiting): Change code around call
+	to count_syscall accordingly.
+
+	Optimize out dummy PC printing on signal delivery.
+	* strace.c (trace): Optimize out dummy PC printing on signal delivery.
+	While at it, tweak comments.
+
+	Conditionally optimize out unused code.
+	* syscall.c (internal_syscall): Call internal_exec only if
+	SUNOS4 || (LINUX && TCB_WAITEXECVE).
+	* process.c (internal_exec): Define this function only if
+	SUNOS4 || (LINUX && TCB_WAITEXECVE).
+	(printwaitn): Don't check wordsize if SUPPORTED_PERSONALITIES == 1.
+	* signal.c (sys_kill): Likewise.
+	* syscall.c (is_negated_errno): Likewise.
+	(trace_syscall_exiting): Fold a tprintf into tprintfs which follow it.
+
+	Cosmetic improvement in ifdefs. No code changes.
+	* strace.c (proc_open): Change ifdefs so that braces are properly paired.
+
+	Exclude tcp->pfd from non-procfs systems.
+	* defs.h: Make struct tcb::pfd fields conditional on USE_PROCFS.
+	* strace.c (alloc_tcb): Use tcp->pfd only if USE_PROCFS.
+	(droptcb): Likewise.
+
+	Small optimizations related to memory allocation.
+	* strace (expand_tcbtab): Shorten "out of memory" message.
+	(rebuild_pollv): Remove unnecessary NULL check before free().
+	* util.c (dumpstr): Add a comment about likely bug.
+
+	Improve code readability by avoiding assignments inside if()
+	* desc.c (decode_select): Move assignment out of if() condition.
+	* file.c (sprinttime): Likewise.
+	(sys_getdirentries): Likewise.
+	* io.c (sys_ioctl): Likewise.
+	* strace.c (test_ptrace_setoptions_followfork): Likewise.
+	(main): Likewise.
+	(proc_open): Likewise.
+	(detach): Likewise.
+	(proc_poll): Likewise.
+	(trace): Likewise.
+	* syscall.c (qualify): Likewise.
+	(sys_indir): Likewise.
+	* test/procpollable.c (main): Likewise.
+	* test/sfd.c (main): Likewise.
+	* time.c (printtv_bitness): Likewise.
+	(sprinttv): Likewise.
+	(print_timespec): Likewise.
+	(void sprint_timespec): Likewise.
+	(printitv_bitness): Likewise.
+	* util.c (dumpstr): Likewise.
+	(umovestr): Likewise.
+	(fixvfork): Likewise.
+
+	Convert ioctl_next_match() to new-style C function definition.
+	* ioctl.c (ioctl_next_match): Convert to new-style C function definition.
+
+	Small optimization in signal and ioctl tables.
+	Trivial shuffling of data tables puts them all in one file,
+	allowing gcc to see their sizes and eliminate variables
+	which store these sizes.
+
+	Surprisingly, in C mode gcc does not optimize out static const int
+	variables. Help it by using enums instead.
+
+	* defs.h: Stop exporting ioctlent{0,1,2}, nioctlents{0,1,2},
+	signalent{0,1,2}, nsignals{0,1,2}.
+	* ioctl.c: Remove definitions of ioctlent{,0,1,2} and nioctlents{,0,1,2}.
+	* signal.c: Remove definitions of signalent{,0,1,2} and nsignals{,0,1,2}.
+	* syscall.c: Move above definitions to this file. Make them static const
+	or enums if suitable.
+
+	Don't return int from set_personality(), no one checks it.
+	* defs.h (set_personality): Change return type to void.
+	* syscall.c (set_personality): Change return type to void.
+
+	Remove unused declaration.
+	* defs.h: Remove unused declaration of handle_new_child().
+
+	Use natural-sized integer field for tcb::flags.
+	* defs: Change struct tcb::flags type from short to int.
+	This results in smaller code at least on x86.
+
+	Make needlessly static data local.
+	* syscall.c (get_scno): For POWERPC64 and X86-64, variable currpers
+	is declared static. But its old data is never used. Convert it
+	to ordinary local variable.
+
+	Optimize get_scno function.
+	* syscall.c (get_scno): Make gpr_offset[] array static const.
+
+	Optimize iocb_cmd_lookup.
+	* desc.c (iocb_cmd_lookup): Make command table constant.
+	Reduce size of static char buffer.
+
+	Correct sys_sendfile[64] type and nargs.
+	* freebsd/i386/syscallent.h: Correct sys_sendfile nargs 7->8
+	* linux/mips/syscallent.h: Correct sys_sendfile64 nargs 5->4
+	* linux/sh/syscallent.h: Correct sys_sendfile64 nargs 5->4
+	* linux/sh64/syscallent.h: Correct sys_sendfile64 nargs 5->4
+	* linux/m68k/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
+	* linux/microblaze/syscallent.h: Correct sys_sendfile64 type TF->TD|TN
+	* linux/tile/syscallent.h: Correct sys_sendfile and sys_sendfile64 type TD->TD|TN
+
+	Make addflags return void.
+	* defs.h (addflags): Change return type from int to void.
+	* util.c (addflags): Change return type from int to void.
+
+	Set saner MAX_ARGS (6 or 8) for X86_64 and I386.
+	I noticed that tcp->u_args[MAX_ARGS] array is way larger than
+	I'd expect: for all arches except HPPA it has 32 (!) elements.
+
+	I looked at the code and so far I spotted only one abuser of
+	this fact: sys_sigreturn. On several arches, it saves sigset_t
+	into tcp->u_args[1...N] on entry and prints it on exit, a-la
+
+	memcpy(&tcp->u_arg[1], &sc.oldmask[0], sizeof(sigset_t))
+
+	The problem here is that in glibc sigset_t is insanely large:
+	128 bytes, and using sizeof(sigset_t) in memcpy will overrun
+	&tcp->u_args[1] even with MAX_ARGS == 32:
+	On 32 bits, sizeof(tcp->u_args) == 32*4 == 128 bytes!
+	We may already have a bug there!
+
+	This commit changes the code to save NSIG / 8 bytes only.
+	NSIG can't ever be > 256, and in practice is <= 129,
+	thus NSIG / 8 is <= 16 bytes == 4 32-bit words,
+	and even MAX_ARGS == 5 should be enough for saving signal masks.
+
+	* defs.h: Reduce MAX_ARGS for X86_64 and I386 from 32 to 8
+	for FreeBSD and to 6 for everyone else. Add comment about current
+	state of needed MAX_ARGS.
+	* signal.c: Add comment about size of sigset_t.
+	(sprintsigmask): Reduce static string buffer from 8k to 2k.
+	(sys_sigreturn): Fix sigset saving to save only NSIG / 8 bytes,
+	not sizeof(sigset_t) bytes.
+	* linux/mips/syscallent.h: Reduce nargs of printargs-type syscall to 7.
+	* linux/arm/syscallent.h: Reduce nargs of printargs-type syscall to 6.
+	* linux/i386/syscallent.h: Likewise.
+	* linux/m68k/syscallent.h: Likewise.
+	* linux/powerpc/syscallent.h: Likewise.
+	* linux/s390/syscallent.h: Likewise.
+	* linux/s390x/syscallent.h: Likewise.
+	* linux/sh/syscallent.h: Likewise.
+	* linux/sh64/syscallent.h: Likewise.
+	* linux/sparc/syscallent.h: Likewise.
+
+	Optimize sys_old_mmap.
+	* mem.c (sys_old_mmap): For Ia64 and 32-bit personality of x86-64,
+	copy narrow parameters from userspace by single umove, not by six
+	separate ones; then assign them to long u_arg[i]. For SH[64],
+	avoid copying of tcp->u_arg.
+	(sys_mmap): Add FIXME comment - SH64 and i386 seem to be handled
+	differently for no apparent reason.
+	* test/mmap_offset_decode.c: New test program, illustrates FIXME.
+
+	Untangle ifdef forest in sys_mmap64. No code changes.
+	After careful analysis, it looks like !LINUX and ALPHA
+	pass all seven parameters in registers; and in all other cases
+	parameters are on stack (pointed to by tcp->u_arg[0]).
+	In light of this, reorganize ifdefs, making them simpler,
+	without changing any logic.
+	After this, it's apparent we use tcp->u_arg[4,5,6] and possibly
+	[7] without checking that it's valid to do so.
+	So far, just add a comment about this.
+
+	* mem.c (sys_mmap64): Rewrite ifdefs in a much simpler way.
+	Add comments about apparent bugs.
+
+	Style and comment fixes, no code changes.
+	* mem.c: Indent includes to show nesting better.
+	  (addtileflags): Fix style of this function definition;
+	  correct wrong endif comment, add another endif comment.
+
+	Use simpler rounding up to next multiple of 2.
+	* util.c (printllval): simpler rounding up to next multiple of 2.
+
+	Cosmetic fixes, no code changes.
+	* defs.h: Add/reformat comments.
+	* signal.c: Remove wrong comment. Add warning directive
+	when we detect that NSIG is undefined. Add comment about
+	NSIG on ARM. Fix typo in comment.
+	(signame): Reformat code a bit without changes to logic.
+	Shorten static buffer.
+	(sys_rt_sigprocmask): Remove stray empty line.
+	* syscall.c: Add warning directive when we detect that
+	NSIG is undefined. Add comment about NSIG on ARM.
+
+2011-08-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix PTRACE_SETOPTIONS tests.
+	* strace.c [LINUX] (kill_save_errno): New function.
+	(test_ptrace_setoptions_followfork): Change return type to void.
+	Fix and harden error handling.  Use kill_save_errno() to avoid errno
+	clobbering.  Treat EIO from ptrace() the same way as EINVAL.
+	(test_ptrace_setoptions_for_all): Use kill_save_errno() to avoid errno
+	clobbering.  Treat EIO from ptrace() the same way as EINVAL.
+	(main): Update use of test_ptrace_setoptions_followfork().
+
+	Fix compilation on linux 2.4.x.
+	* configure.ac: Check for BLKGETSIZE64.
+	* block.c (block_ioctl): Check for HAVE_BLKGETSIZE64.
+
+2011-08-17  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Remove tcp->parent and TCB_CLONE_THREAD.
+	tcp->parent is used for only two things:
+	(1) to send signal on detach via tgkill (need to know tgid).
+	Solution: use tkill, it needs only tid.
+	(2) to optimize out ptrace options setting for new tracees.
+	Not a big deal if we drop this optimization: "set options" op is fast,
+	doing it just one extra time once per each tracee is hardly measurable.
+
+	TCB_CLONE_THREAD is a misnomer. It used only to flag sibling we attached to
+	in startup_attach. This is used to prevent infinite recursive rescanning
+	of /proc/PID/task.
+	Despite the name, there is no guarantee it is set only on non-leader:
+	if one would run "strace -f -p THREAD_ID" and THREAD_ID is *not*
+	a thread leader, strace will happily attach to it and all siblings
+	and will think that THREAD_ID is the leader! Which is a bug, but
+	since we no longer detach when we think tracee is going to die,
+	this bug no longer matters, because we do not use the knowledge
+	about thread group leaders for anything. (We used it to delay
+	leader's exit).
+
+	IOW: after this patch strace has no need to know about threads, parents
+	and children, and so on. Therefore it does not track that information.
+	It treats all tracees as independent entities. Overall,
+	this simplifies code a lot.
+
+	* defs.h: Add TCB_ATTACH_DONE flag, remove TCB_CLONE_THREAD flag
+	and struct tcb::parent field.
+	* process.c (internal_fork): Don't set tcpchild->parent.
+	* strace.c (startup_attach): Use TCB_ATTACH_DONE flag instead of
+	TCB_CLONE_THREAD to avoid attach attempts on already-attached threads.
+	Unlike TCB_CLONE_THREAD, TCB_ATTACH_DONE bit is used only temporarily,
+	and only in this function. We clear it on every tcb before we return.
+	(detach): Use tkill instead of tgkill.
+	(trace): Set ptrace options on new tracees unconditionally,
+	not only when tcp->parent == NULL.
+
+	Remove TCB_SUSPENDED constant and related code.
+	Since we no longer suspend waitpid'ing tracees, we have only one case when
+	we suspend tracee: when we pick up a new tracee created by clone/fork/vfork.
+
+	Background: on some other OSes, attach to child is done this way:
+	get fork's result (pid), loop ptrace(PTRACE_ATTACH) until you hook up
+	new process/thread. This is ugly and not safe, but what matters for us
+	is that it doesn't require suspending. Suspending is required
+	on Linux only, because on Linux attach to child is done differently.
+
+	On Linux, we use two methods of catching new tracee:
+	adding CLONE_THREAD bit to syscall (if needed, we change
+	[v]fork into clone before that), or using ptrace options.
+	In both cases, it may be so that new tracee appears before one which
+	created it returns from syscall. In this case, current code
+	suspends new tracee until its creator returns. Only then
+	strace can determine who is its parent (it needs child's pid for this,
+	which is visible in parent's [v]fork/clone result).
+	This is inherently racy. For example, what if SIGKILL kills
+	creator after it succeeded creating child, but before it returns?
+	Looks like we will have child suspended forever.
+
+	But after previous commit, we DO NOT NEED parent<->child link for anything.
+	Therefore we do not need suspending too. Bingo!
+
+	This patch removes suspending code. Now new tracees will be continued
+	right away. Next patch will remove tcp->parent member.
+
+	* defs.h: Remove TCB_SUSPENDED constant
+	* process.c (handle_new_child): Delete this function.
+	  (internal_fork): Do not call handle_new_child on syscall exit.
+	* strace.c (handle_ptrace_event): Delete this function.
+	  (trace): Do not suspend new child; remove all handling
+	  of now impossible TCB_SUSPENDED condition.
+
+	Do not detach when we think tracee is going to die.
+	Current code plays some ungodly tricks, trying to not detach
+	thread group leader until all threads exit.
+
+	Also, it detaches from a tracee when signal delivery is detected
+	which will cause tracee to exit.
+	This operation is racy (not to mention the determination
+	whether signal is set to SIG_DFL is a horrible hack):
+	after we determined that this signal is indeed fatal
+	but before we detach and let process die,
+	*other thread* may set a handler to this signal, and
+	we will leak the process, falsely displaying it as killed!
+
+	I need to look in the past to figure out why we even do it.
+	First guess is that it's a workaround for old kernel bugs:
+	kernel used to deliver exit notifications to the tracer,
+	not to real parent. These workarounds are ancient
+	(internal_exit is from 1995).
+
+	The patch deletes the hacks. We no longer need tcp->nclone_threads,
+	TCB_EXITING and TCB_GROUP_EXITING. We also lose a few rather
+	ugly functions.
+
+	I also added a new message: "+++ exited with EXITCODE +++"
+	which shows exact moment strace got exit notification.
+	It is analogous to existing "+++ killed by SIG +++" message.
+
+	* defs.h: Delete struct tcb::nclone_threads field,
+	  TCB_EXITING and TCB_GROUP_EXITING constants,
+	  declarations of sigishandled() and internal_exit().
+	* process.c (internal_exit): Delete this function.
+	  (handle_new_child): Don't ++tcp->nclone_threads.
+	* signal.c (parse_sigset_t): Delete this function.
+	  (sigishandled): Delete this function.
+	* strace.c (startup_attach): Don't tcbtab[tcbi]->nclone_threads++.
+	  (droptcb): Don't delay dropping if tcp->nclone_threads > 0,
+	  don't drop parent if its nclone_threads reached 0:
+	  just drop (only) this tcb unconditionally.
+	  (detach): don't drop parent.
+	  (handle_group_exit): Delete this function.
+	  (handle_ptrace_event): Instead of handle_group_exit, just drop tcb;
+	  do not panic if we see WIFEXITED from an attached pid;
+	  print "+++ exited with EXITCODE +++" for every WIFEXITED pid.
+	* syscall.c (internal_syscall):	Do not treat sys_exit specially -
+	  don't call internal_exit on it.
+
+2011-08-16  Sergei Trofimovich  <slyfox@gentoo.org>
+
+	Declare printrusage32() on Alpha.
+	* defs.h [ALPHA] (printrusage32): New declaration.
+
+2011-08-15  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Slight optimization and cleanup in trace()
+	* strace.c (trace): Do not recalculate "cflag ? &ru : NULL"
+	again and again. Do not clear errno unnecessarily.
+	Consistently check wait errors as pid < 0, not pid == -1.
+	Indent ifdefs for better readability.
+	Remove comments after endif if ifdef/endif block is really tiny.
+
+	Fix compilation on 2.4.20 kernel based system.
+	* block.c (block_ioctl): add ifdef/endif around BLKGETSIZE64 usage
+	* strace.c (trace): add ifdef/endif around WIFCONTINUED usage
+
+2011-07-19  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Check for additional PTRACE_* constants.
+	* configure.ac (AC_CHECK_DECLS): Add PTRACE_O_TRACESYSGOOD,
+	PTRACE_O_TRACEEXEC, PTRACE_O_TRACEEXIT, PTRACE_EVENT_EXEC,
+	PTRACE_EVENT_VFORK_DONE and PTRACE_EVENT_EXIT.
+	* defs.h [LINUX]: Define these PTRACE_* constants when they are not
+	provided by <sys/ptrace.h>.
+
+	Reported-by: Douglas Mencken <dougmencken@gmail.com>
+	Reported-by: Steve Bennett <steveb@workware.net.au>
+
+2011-07-19  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Remove superfluous backslash-continuation in configure.ac.
+	* configure.ac: remove superfluous backslash continuation
+	in AC_CHECK_DECLS
+
+2011-06-24  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Make IOCTL_WSTOP more readable.
+	* defs.h: Make IOCTL_WSTOP more readable
+
+	Trivial cleanups.
+	* strace.c (trace): Change ifdef LINUX to make a bit more sense,
+	  remove wrong comment at its endif. Slightly optimize
+	  "+++ killed by SIG +++" message for systems without WCOREDUMP macro.
+
+	Remove redundant include <stdarg.h>
+	* strace.c: Remove redundant include <stdarg.h>
+
+	Clean up two old comments.
+	* strace.c (startup_attach): Remove misplaced comment.
+	  (trace) Remove incomplete part of a comment.
+
+	Make a few variables static.
+	* defs.h: Remove tcbtab declaration.
+	* strace.c: Make run_uid, run_gid, outf, tcbtab, progname
+	  global variables static
+
+	Add debug output in initial attachment code.
+	* strace.c (startup_attach): If -d, report pid and success/failure
+	  of every attach attempt.
+
+	Better debug logging of allocations and waitpit results.
+	* strace.c (alloc_tcb): Print number of allocated tcb's if -d.
+	  (droptcb): Likewise.
+	  (handle_ptrace_event): Remove PTRACE_EVENT_EXEC debug message.
+	  (trace): Improve logging of waitpid: show WIFxxx, exitcode/signal,
+	  ptrace event name, WCOREDUMP - all on one line.
+
+2011-06-23  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Optimize arrays of register indexes in syscall_enter.
+	* syscall.c (syscall_enter) [BFIN]: Make register no array "static const".
+	  [SH]: Make register no array "const", pre-multiply it by 4.
+	  [SH64]: Make register no array "const".
+	  [X86_64]: Make register no array "const", pre-multiply it by 8.
+
+	Deindent syscall_enter by removing unnecessary braces. No code changes.
+	syscall_enter has many long (>80 columns) lines.
+	It is aggravated by the fact that it has a lot of {} blocks
+	which are not necessary (the code is the same without them).
+	This patch removes {}s and deindents affected lines.
+	While at it, it indents ifdefs so that nesting is easier to track,
+	and adds a few spaces in the expressions, such as
+	"tcp->u_nargs*sizeof..." -> "tcp->u_nargs * sizeof...".
+	There is no actual changes to the code here.
+
+	* syscall.c (syscall_enter): Remove unnecessary {} blocks.
+
+	Remove dead "ifndef CLONE_PTRACE" branch.
+	process.c defines CLONE_PTRACE for Linux, so it can't be undefined.
+	Therefore ifndef CLONE_PTRACE code is dead (since at least 2004).
+	This patch removes it.
+
+	* process.c (handle_new_child): Remove ifdef CLONE_PTRACE/endif (but not
+	  the code inside) and entire ifndef CLONE_PTRACE/endif block.
+
+	Add a comment about setbpt. No code changes.
+	* defs.h: Add a comment about setbpt().
+
+	Untangle a particularly badly obfuscated bit of code. No logic changes.
+	* util.c (setbpt): Calculate new arg0 in more readable way.
+
+	Remove TCB_FOLLOWFORK.
+	TCB_FOLLOWFORK flag seems to be unnecessary, because we either follow
+	all [v]forks/clones or don't follow any, therefore global variable
+	followfork is an already existing indicator of what we want to do.
+	This patch drops all setting/clearing of TCB_FOLLOWFORK bit,
+	and replaces checks for this bit by checks of followfork value.
+	In internal_fork, check is moved to in front of if(), since
+	the check is needed on both "entering" and "exiting" branch.
+
+	* defs.h: Remove TCB_FOLLOWFORK define.
+	* process.c (internal_fork): Do not set/clear TCB_FOLLOWFORK,
+	  test followfork instead of tcp->flags & TCB_FOLLOWFORK.
+	  (handle_new_child): Likewise.
+	* strace.c (startup_attach): Likewise.
+
+2011-06-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* system.c (sys_capget, sys_capset): Fix pointer arithmetics.
+
+2011-06-23  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Make initial tcb allocation more readable. No logic changes.
+	* strace.c (main): Make initial tcb allocation more readable.
+
+	Do not allocate tiny cap_user_header/data structures, place them on stack.
+	This allows us to avoid having code to malloc them, and code to check
+	for malloc failure. Resulting code decrease:
+	   text	   data	    bss	    dec	    hex	filename
+	  10175	      0	     16	  10191	   27cf	system.o.old
+	   9797	      0	      0	   9797	   2645	system.o
+
+	* system.c (sys_capget): Put cap_user_header_t and cap_user_data_t
+	  on stack, rather than allocating them in heap. These structures
+	  are very small (a few integer fields), stack is a better place
+	  for them.
+	  (sys_capset): Likewise.
+
+	Use [p]error_msg[_and_die] where appropriate. No logic changes.
+	Resulting size changes:
+	   text    data     bss     dec     hex filename
+	  17445      16    8572   26033    65b1 strace.o.old
+	  16850      16    8572   25438    635e strace.o
+
+	* strace.c: Replace fprintf[+cleanup]+exit with [p]error_msg_and_die,
+	  fprintf("progname: ...") with [p]error_msg where appropriate.
+
+2011-06-22  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Whitespace cleanups. No code changes.
+	* count.c: Place opening curly brace after if (),
+	  not on the next line. Almost all strace code alredy
+	  uses this style.
+	* desc.c: Likewise.
+	* file.c: Likewise.
+	* net.c: Likewise.
+	* pathtrace.c: Likewise.
+	* process.c: Likewise.
+	* quota.c: Likewise.
+	* signal.c: Likewise.
+	* strace.c: Likewise.
+	* syscall.c: Likewise.
+	* time.c: Likewise.
+
+	Make strace_fopen abort on error.
+	Error from strace_fopen in main results in call to exit(1).
+	Error from strace_fopen in newoutf is propagated to newoutf
+	callers: startup_attach (where it results in exit(1))
+	and alloc_tcb (where error is ignored). In second case,
+	the behavior doesn't seem to be right: it means with -ff
+	on open error for new LOGFILE.PID the output will continue
+	to go into *the same file as the previous process* - which
+	would be confusing. Moreover, on droptcb outf may be closed
+	and the output of other, still running process outputting
+	to the same outf will be lost. I don't think this is sane.
+	IOW: in all cases, error in strace_fopen should be fatal.
+
+	* strace.c (strace_fopen): Abort on error instead of returning NULL.
+	  (newoutf): Change return type to void.
+	  (startup_attach): Remove error check on newoutf return value.
+	  (main): Remove error check on strace_fopen return value.
+
+	Make set_cloexec_flag abort on error.
+	set_cloexec_flag() may fail only if we pass it a bad fd,
+	such as -1 or non-opened one. If we do, we have a bug
+	in the caller. It makes no sense to try to continue
+	running when we detect such a blatant bug in our own code.
+
+	* strace (set_cloexec_flag): Abort instead of returning error
+	  indicator. Change function to return void.
+	  (strace_fopen): Remove error check on set_cloexec_flag return value.
+	  (proc_open): Likewise.
+	  (proc_poll_open): Likewise.
+
+	Make strace_popen abort on error.
+	It makes no sense to postpone abort on strace_popen error
+	unti it returns. Moreover, out-of-memory error was exiting
+	without any message.
+	While at it, use 0 as "none" for popen_pid, as optimization.
+
+	* strace: Initialize popen_pid to 0 - this puts it in bss.
+	  (trace): Reset popen_pid to 0 instead of -1.
+	  (strace_popen): Never return NULL as error indicator,
+	  abort with good error message instead.
+	  (main): Remove NULL check of strace_popen result.
+
+	Delete fork_tcb()
+	Get rid of fork_tcb() function. It used to do what the comment
+	above it says, but now it doesn't do much:
+	it only sets tcp->flags |= TCB_FOLLOWFORK and maybe calls
+	expand_tcbtab(). The second operation is not necessary, since
+	alloc_tcp() will do it itself when needed.
+	This patch deletes fork_tcb(), open-coding tcp->flags |= TCB_FOLLOWFORK
+	where it was formerly called. It also makes nprocs, tcbtabsize and
+	expand_tcbtab() static. (While at it, I nuked redundant
+	extern char **environ declaration: strace.c had *two* of them...)
+
+	* defs.h: Remove declarations of nprocs, tcbtabsize and
+	  expand_tcbtab.
+	* process.c (fork_tcb): Remove this function.
+	  (internal_fork): Open-code fork_tcb.
+	  (handle_new_child): Likewise.
+	* strace.c: Remove redundant "extern char **environ". Declare
+	  nprocs and tcbtabsize static.
+	  (expand_tcbtab): Make it static.
+
+	Simplify expand_tcbtab and alloc_tcb.
+	Get rid of a few intermediate variables, simplifies a few expressions,
+	and uses error_msg_and_die instead of more verbose
+	fprintf+cleanup+exit sequence.
+	In alloc_tcp, I use memset to clear entire new tcp.
+	This not only saves a few bytes of code, but lowers the chances
+	of future bugs where some data "leaks out" into new tcb's
+	from old ones because we forgot to re-initialize it.
+
+	* strace.c (expand_tcbtab): Simplify this function. No logic changes.
+	  (alloc_tcb): Likewise.
+
+2011-06-21  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Trivial fixes.
+	* process.c (internal_fork): Remove conditionals which make no difference
+	  (we return 0 on both branches of these ifs).
+	* util.c: Fix indentation of an ifdef.
+
+2011-06-21  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix build when libaio-devel is not available.
+	* desc.c: Do not compile code that uses struct iocb unless
+	HAVE_LIBAIO_H is set.
+
+	Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
+
+	tests: finish ptrace_setoptions_* merge.
+	* tests/Makefile.am (TESTS): Merge ptrace_setoptions_*.
+	* tests/ptrace_setoptions: Check for Linux kernel > 2.6.
+
+2011-06-21  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Remove write-only nchildren member from struct tcb.
+	* defs.h: Remove nchildren member from struct tcb.
+	* process.c (handle_new_child): Remove inc/decrements of tcp->nchildren.
+	  (internal_fork): Likewise.
+	* strace.c (startup_attach): Likewise.
+	  (droptcb): Likewise.
+	  (alloc_tcb): Remove initialization of tcp->nchildren.
+
+	Fix tests/ptrace_setoptions_* to match last fix in ptrace options code.
+
+	Remove write-only nzombies member from struct tcb.
+	* defs.h: Remove nzombies member from struct tcb.
+	* strace.c (droptcb): Remove "tcp->parent->nzombies++".
+	  (alloc_tcb): Remove "tcp->nzombies = 0".
+
+	Fix regression introduced by "Properly handle real SIGTRAPs" change.
+	Commit 3454e4b463e6c22c7ea8c5461ef5a077f4650a54
+	introduced a bug: sometimes, TRACECLONE/TRACE[V]FORK opts were not set.
+	The check (tcp->parent == NULL) in old code was meant to check
+	"if we are not a child created by auto-attach" - in this case,
+	options need to be set on the child; otherwise they are inherited
+	and do not need to be set.
+	I misunderstood the check and if tcp->parent is not NULL, I was
+	setting only ptrace_setoptions_for_all bits.
+	This change fixes the problem. Since the fixed logic makes it
+	unnecessary to keep two sets of options in separate variables,
+	I merge them back into one variable, ptrace_setoptions.
+
+	* defs.h: Merge ptrace_setoptions_followfork and ptrace_setoptions_for_all
+	  into one variable, ptrace_setoptions.
+	* strace.c: Likewise.
+	  (test_ptrace_setoptions_followfork): Use ptrace_setoptions variable.
+	  (test_ptrace_setoptions_for_all): Likewise.
+	  (main): Likewise.
+	* process.c (internal_fork): Likewise.
+	  (internal_exec): Likewise.
+	* strace.c (trace): Fix the bug where different options were set
+	  depending on "tcp->parent == NULL" condition. Add a comment
+	  which makes it more clear why this condition is checked.
+
+2011-06-18  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Do not suspend waitpid.
+	strace used to suspend waitpid until there is a child
+	for waitpid'ing process to collect status from.
+	Apparently, it was done because in some very old kernels
+	(circa 2002 or even earlier) there were ptrace bugs which
+	were making waitpid in real parent to not see children.
+	This kernel bug is fixed long ago. This change removes the workaround.
+	test/wait_must_be_interruptible.c is a test program which
+	illustrates why without this change strace changes
+	programs's behavior.
+
+	* defs.h: Delete waitpid and nclone_waiting members from from struct tcb.
+	  Remove declaration of internal_wait().
+	* process.c (internal_wait): Remove this function.
+	* strace.c (alloc_tcb): Do not set tcp->nclone_waiting.
+	  (resume): Remove this function.
+	  (resume_from_tcp): Remove this function.
+	  (detach): Do not call resume_from_tcp().
+	  (handle_group_exit): Do not call resume_from_tcp().
+	* syscall.c (internal_syscall): Do not call internal_wait().
+
+2011-06-13  Andi Kleen  <ak@linux.intel.com>
+
+	Enhance io_submit() decoding.
+	strace didn't decode important fields in the iocb passed to io_submit.
+	This patch changes the code to dump them all.  Also it prefixes the fields
+	with names to make it easier to read.
+
+	* desc.c (iocb_cmd_lookup, print_common_flags): New functions.
+	(sys_io_submit): New iocb decoder.
+
+2011-06-13  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Add argument to tprint_iov() specifying whether to decode each iovec.
+	* defs.h (tprint_iov): Add decode_iov argument.
+	* io.c (tprint_iov): Implement new decode_iov argument.
+	(sys_readv, sys_writev, sys_sendfile, sys_preadv, sys_pwritev): Update
+	tprint_iov calls.
+	* net.c (do_msghdr): Likewise.
+
+	Introduce ARRAY_SIZE() macro.
+	* defs.h (ARRAY_SIZE): New macro.
+	* ioctl.c: Use it.
+	* pathtrace.c (pathmatch, storepath): Likewise.
+	* process.c (printpriv): Likewise.
+	* signal.c: Likewise.
+	* syscall.c: Likewise.
+
+2011-06-13  Andi Kleen  <ak@linux.intel.com>
+
+	Fix decoding of timer id returned by timer_create.
+	* time.c (sys_timer_create): The kernel returns a integer, not a
+	pointer for the timer id in the memory pointed to by timer_id.
+
+2011-06-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Add test for PTRACE_O_TRACESYSGOOD.
+	* tests/ptrace_setoptions_for_all: New file.
+	* tests/Makefile.am (TESTS): Add ptrace_setoptions_for_all.
+
+	tests: update test for linux kernel version.
+	* tests/ptrace_setoptions_followfork: Check for Linux kernel > 2.6.
+
+	Update ptrace_setoptions test.
+	The test have to be adjusted after commit v4.6-5-g3454e4b.
+
+	* ptrace_setoptions: Update grep pattern, rename to
+	ptrace_setoptions_followfork.
+	* tests/Makefile.am (TESTS): Rename ptrace_setoptions to
+	ptrace_setoptions_followfork.
+
+	* strace.c (verror_msg): Rewrite without use of heap memory allocation.
+
+	Fix MIPS syscall entries.
+	* linux/mips/syscallent.h: Remove duplicate entries for 4336, 4337,
+	and 4338 syscall numbers.
+
+	Reported-by: Denys Vlasenko <dvlasenk@redhat.com>
+
+2011-06-08  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Don't display bogus parameter for sigreturn syscall.
+	* linux/*/syscallent.h: For those arches which use sys_sigreturn,
+	not printargs, to show [rt_]sigreturn syscall, change number of arguments
+	from 1 to 0: sys_sigreturn function doesn't use syscall parameters.
+	(I guess kernel doesn't actually _have_ any parameters for this syscall,
+	at least on these architectures). Do the same change for I386 and x86-64
+	even though they use printargs: I looked at kernel code and syscall
+	definitely doesn't have any parameters on these arches.
+	(I hesitate to change 1 to 0 params for arches I don't know -
+	it is remotely possible some of them do have a parameter for this syscall).
+
+	Optimize sigreturn handling.
+	* signal.c (sys_sigreturn): move stack pointer variables,
+	and for SPARC and MIPS, stack pointer and sigmask reading code
+	into "if (entering) ..." block, because it is only needed
+	in this branch; load tcp->u_arg[1] into sigmask for display
+	_after_ we know for sure u_arg[1] does contain valid sigmask
+	(IOW: perform operation only when we know we will need the result)
+
+	Do not call umoven to fetch parameters if we have zero params.
+	* syscall.c [I386] (syscall_enter): Do not call umoven
+	to fetch zero bytes. This is just an optimization.
+
+	"Modernize" four old-style function parameter declarations.
+	* signal.c (signame, long_to_sigset, printsigmask, printsignal):
+	Convert old-style C function definitions to a "modern" form.
+	This does not change any actual code.
+
+	Fix sigreturn decoding on MIPS.
+	The "return 0" line was accidentally deleted circa 2007,
+	which made sigreturn on MIPS always display "= 0" return
+	instead of more informative " = ? (mask now [MASK])".
+
+	* strace.c (sys_sigreturn): Add wrongly deleted "return 0" line
+
+	Print at least one space between SYSCALL(ARGS) and = RESULT if tracee is killed
+	We already do it in the normal case, but in rare code path where
+	tracee is gone (SIGKILLed?) sometimes we were printing this:
+	"SYSCALL(ARGS <unavailable>)= ? <unavailable>" - note jammed together ")=".
+	test/sigkill_rain.c can be used to verify the fix.
+
+	* strace.c (printleader): add a space after ")" in " <unavailable>)"
+
+	Add fflush after printf in test/sigkill_rain.c.
+
+	Update test/* directory, it seem to be a bit bit-rotted.
+	Added README; modified sigkill_rain.c to be more understandable,
+	made clone.c compile; added wait_must_be_interruptible.c test;
+	updated Makefile and .gitignore.
+
+2011-06-07  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Whitespace cleanups. no code changes.
+	* bjm.c: Fix tabulation (such as extra spaces before tabs),
+	convert punctuation where it deviates from prevalent form
+	elsewhere in strace code, convert sizeof and offsetof where
+	it deviates from from prevalent form, remove space between
+	function/macro/array names and (parameters) or [index],
+	add space between "if" and (condition), correct non-standard
+	or wrong indentaion.
+	* defs.h: Likewise
+	* desc.c: Likewise
+	* file.c: Likewise
+	* ipc.c: Likewise
+	* linux/arm/syscallent.h: Likewise
+	* linux/avr32/syscallent.h: Likewise
+	* linux/hppa/syscallent.h: Likewise
+	* linux/i386/syscallent.h: Likewise
+	* linux/ioctlsort.c: Likewise
+	* linux/m68k/syscallent.h: Likewise
+	* linux/microblaze/syscallent.h: Likewise
+	* linux/powerpc/syscallent.h: Likewise
+	* linux/s390/syscallent.h: Likewise
+	* linux/s390x/syscallent.h: Likewise
+	* linux/sh/syscallent.h: Likewise
+	* linux/sh64/syscallent.h: Likewise
+	* linux/tile/syscallent.h: Likewise
+	* linux/x86_64/syscallent.h: Likewise
+	* mem.c: Likewise
+	* net.c: Likewise
+	* pathtrace.c: Likewise
+	* process.c: Likewise
+	* signal.c: Likewise
+	* sock.c: Likewise
+	* strace.c: Likewise
+	* stream.c: Likewise
+	* sunos4/syscall.h: Likewise
+	* sunos4/syscallent.h: Likewise
+	* svr4/syscall.h: Likewise
+	* svr4/syscallent.h: Likewise
+	* syscall.c: Likewise
+	* system.c: Likewise
+	* test/childthread.c: Likewise
+	* test/leaderkill.c: Likewise
+	* test/skodic.c: Likewise
+	* time.c: Likewise
+	* util.c: Likewise
+
+2011-05-30  Dmitry V. Levin  <ldv@altlinux.org>
+
+	ARM EABI: fix 64-bit syscall's arguments decoding.
+	ARM OABI and ARM EABI have different function parameters passing rules.
+	With EABI, 64-bit function parameters passed in registers are aligned to
+	an even-numbered register instead of using the next available pair, see
+	http://lkml.org/lkml/2006/1/12/175
+	This rule also applies to syscall's arguments.
+
+	* linux/arm/syscallent.h (pread, pwrite, truncate64, ftruncate64,
+	readahead, preadv, pwritev): Fix number of arguments.
+	* util.c (printllval): Align 64bit argument to 64bit boundary on
+	__ARM_EABI__.
+
+	Reported-by: Damir Shayhutdinov <damir@altlinux.org>
+
+2011-05-30  Damir Shayhutdinov  <damir@altlinux.ru>
+
+	Linux: implement decoding of preadv and pwritev syscalls.
+	* io.c [LINUX && HAVE_SYS_UIO_H] (sys_preadv, sys_pwritev): New functions.
+	* linux/syscall.h (sys_preadv, sys_pwritev): Declare them.
+	* linux/*/syscallent.h: Use them.
+
+2011-05-30  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	"Modernize" all old-style function parameter declarations.
+	* bjm.c: Convert all remaining old-style C function definitions
+	to a "modern" form. This does not change any actual code.
+	* io.c: Likewise
+	* ioctl.c: Likewise
+	* net.c: Likewise
+	* proc.c: Likewise
+	* process.c: Likewise
+	* signal.c: Likewise
+	* sock.c: Likewise
+	* strace.c: Likewise
+	* stream.c: Likewise
+	* syscall.c: Likewise
+	* system.c: Likewise
+	* time.c: Likewise
+	* util.c: Likewise
+
+2011-05-27  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Cleanups on top of "handle SIGTRAP properly" change, based on Dmitry's comments.
+	* defs.h ([p]error_msg[_and_die]): Declare new functions.
+	* strace.c (SYSCALLTRAP): Rename to syscall_trap_sig.
+	([p]error_msg[_and_die]): Define new functions.
+	(strace_tracer_pid): New variable, it controls which pid will
+	do cleanup on exit via [p]error_msg_and_die.
+	(main): Set strace_tracer_pid to our initial pid.
+	(startup_attach): Change strace_tracer_pid if we are in -D mode.
+	(test_ptrace_setoptions_for_all): Minor changes to logic,
+	such as better diagnostic messages.
+
+2011-05-25  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Identifier "errno" may be a macro, it's unsafe to use it.
+	* strace.c (strerror): Rename parameter errno to err_no
+
+2011-05-24  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Don't perform TCB_WAITEXECVE wait if not needed.
+	* defs.h (ptrace_setoptions_for_all): Expose this variable.
+	* strace.c (ptrace_setoptions_for_all): Remove "static".
+	* process.c (internal_exec): Don't set TCB_WAITEXECVE bit
+	if we know that post-execve SIGTRAP is not going to happen.
+
+2011-05-23  Denys Vlasenko  <dvlasenk@redhat.com>
+
+	Properly handle real SIGTRAPs.
+	* defs.h (ptrace_setoptions): Variable renamed to ptrace_setoptions_followfork.
+	* process.c (internal_fork): Ditto.
+	* strace.c (ptrace_setoptions_for_all): New variable.
+	(SYSCALLTRAP): New variable.
+	(error_msg_and_die): New function.
+	(test_ptrace_setoptions_for_all): New function.
+	(main): Call test_ptrace_setoptions_for_all() at init.
+	(handle_ptrace_event): Handle PTRACE_EVENT_EXEC (by ignoring it).
+	(trace): Check events and set ptrace options without -f too.
+	Check WSTOPSIG(status) not for SIGTRAP, but for SYSCALLTRAP.
+
+2011-04-24  Mike Frysinger  <vapier@gentoo.org>
+
+	Blackfin: update syscall list.
+
+	* linux/bfin/syscallent.h: Add name_to_handle_at, open_by_handle_at,
+	clock_adjtime, and syncfs syscalls.
+
+	linux: add new EHWPOISON errno.
+
+	* linux/errnoent.h: Change ERRNO_133 to EHWPOISON.
+
+2011-04-08  Grant Edwards  <grant.b.edwards@gmail.com>
+
+	Add ability to print file descriptor paths and filter by those paths.
+	* pathtrace.c: New file, implements matching syscall arguments to
+	user-specified file paths.
+	* Makefile.am (strace_SOURCES): Add pathtrace.c.
+	* defs.h (TCB_FILTERED, filtered): New defines.
+	(getfdpath, pathtrace_select, pathtrace_match, show_fd_path,
+	tracing_paths): New declarations.
+	* strace.c (show_fd_path, tracing_paths): New global variables.
+	(usage, main): Implement handling of -y and -P options.
+	* strace.1: Add descriptions of -y and -P options.
+	* syscall.c (trace_syscall_entering): Add path matching logic to the
+	print/noprint decision and set the TCB_FILTERED bit appropriately.
+	(trace_syscall_exiting): Use filtered() macro that checks the
+	TCB_FILTERED bit to determine print/noprint status.
+	* util.c (printfd): Use getfdpath().
+
+2011-04-07  Dmitry V. Levin  <ldv@altlinux.org>
+
+	Fix BLKTRACESTOP definition.
+	* block.c: Fix typo in the check for BLKTRACESTOP.
+	Reported by Gabor Z. Papp.
+
 2011-03-15  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Ensure that PTRACE_GETSIGINFO et al are always defined on Linux
+	Ensure that PTRACE_GETSIGINFO et al are always defined on Linux.
 	* configure.ac (AC_CHECK_DECLS): Add PTRACE_* constants.
 	* defs.h [LINUX]: Define those PTRACE_* constants that are not provided
 	by <sys/ptrace.h>.
@@ -9,10 +3774,10 @@
 
 2011-03-14  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Update PTRACE_* constants
+	Update PTRACE_* constants.
 	* process.c (ptrace_cmds): Add PTRACE_GETREGSET and PTRACE_SETREGSET.
 
-	Prepare for 4.6 release
+	Prepare for 4.6 release.
 	* NEWS: Update for 4.6 release.
 	* configure.ac: Version 4.6.
 	* debian/changelog: 4.6-1.
@@ -20,7 +3785,7 @@
 
 2011-03-14  Mike Frysinger  <vapier@gentoo.org>
 
-	linux/ioctlent: unify them all
+	linux/ioctlent: unify them all.
 	This unifies all the ioctlent.h's in the linux subdir while still
 	allowing each arch to maintain its own minor list.
 
@@ -79,37 +3844,37 @@
 
 2011-03-10  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Show more details about signals received by traced processess
+	Show more details about signals received by traced processess.
 	* strace.c [!USE_PROCFS] (trace): Differentiate output format depending
 	on PTRACE_GETSIGINFO success or failure.  In the former case, use
 	printsiginfo() to show more details about received signal.
 
-	Get rid of PT_GETSIGINFO
+	Get rid of PT_GETSIGINFO.
 	* strace.c [!USE_PROCFS] (trace): Assume that PTRACE_GETSIGINFO is
 	available.  Replace PT_GETSIGINFO with PTRACE_GETSIGINFO.  Use
 	PTRACE_GETSIGINFO for all signals.
 
-	Enhance decoding of kernel-generated signals
+	Enhance decoding of kernel-generated signals.
 	* signal.c (printsiginfo) [LINUX]: Do not print uninteresting
 	zero-initialized fields.
 
-	Fix decoding of user-generated signals
+	Fix decoding of user-generated signals.
 	* signal.c [LINUX] (SI_FROMUSER): Define.
 	[LINUX || SVR4] (printsiginfo) [SI_FROMUSER]: Enhance decoding.
 
-	Recognize SI_KERNEL and SI_ASYNCNL
+	Recognize SI_KERNEL and SI_ASYNCNL.
 	* signal.c [LINUX] (SI_KERNEL, SI_ASYNCNL): Define.
 	[LINUX || SVR4] (siginfo_codes): Add entries for SI_KERNEL and
 	SI_ASYNCNL, reorder entries.
 
 2011-03-05  Sebastian Pipping  <sebastian@pipping.org>
 
-	Take all git branches into account for generation of CREDITS file
+	Take all git branches into account for generation of CREDITS file.
 	* Makefile.am: Make CREDITS target depend on all git branches.
 
 2011-03-04  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix decoding of file descriptors
+	Fix decoding of file descriptors.
 	* defs.h (printfd): New function prototype.
 	* util.c (printfd): New function.
 	* file.c (print_dirfd): Update prototype to use printfd().
@@ -137,23 +3902,23 @@
 
 2011-03-03  Sebastian Pipping  <sebastian@pipping.org>
 
-	Print shutdown(2) modes as SHUT_* constants
+	Print shutdown(2) modes as SHUT_* constants.
 	* net.c (shutdown_modes): New xlat structure.
 	(sys_shutdown): Use shutdown_modes to decode 2nd syscall argument.
 
-	Fix decoding of inotify_init1() flags
+	Fix decoding of inotify_init1() flags.
 	* file.c (inotify_init_flags): New xlat structure.
 	(sys_inotify_init1): Use it instead of open_mode_flags.
 
 2011-03-03  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix struct xlat initialization bugs
+	Fix struct xlat initialization bugs.
 	* file.c (inotify_modes): Terminate with NULL entry.
 	* net.c (sock_type_flags): Make this array static.
 	(socketlayers): Add a comment that this array should remain not
 	NULL-terminated.
 
-	tests: avoid SIGPIPE
+	tests: avoid SIGPIPE.
 	* tests/ptrace_setoptions: Replace "grep -q" with "grep > /dev/null".
 	The former may result to strace being killed by SIGPIPE, which in
 	certain configuratons may lead to generation of a core file.
@@ -161,13 +3926,13 @@
 
 2011-03-01  Mike Frysinger  <vapier@gentoo.org>
 
-	tests: do not make missing /usr/bin/time a failure
+	tests: do not make missing /usr/bin/time a failure.
 	* tests/init.sh (framework_skip_): New function.
 	(check_prog): Use it instead of framework_failure_.
 
 2011-02-27  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Generate an xz tar archive of the distribution
+	Generate an xz tar archive of the distribution.
 	* configure.ac (AM_INIT_AUTOMAKE): Replace dist-bzip2 with dist-xz.
 	* Makefile.am: Update srpm target.
 	* make-dist: Update for dist-xz.
@@ -175,12 +3940,12 @@
 	* debian/watch: Update regexp.
 	* .gitignore: Add strace-*.tar.xz.
 
-	Use "make check" in debian/rules and strace.spec
+	Use "make check" in debian/rules and strace.spec.
 	* debian/control: Update Build-Depends.
 	* debian/rules: Run "make check".
 	* strace.spec: Update BuildRequires. Run "make check" in %check section.
 
-	Implement two basic "strace -f" tests
+	Implement two basic "strace -f" tests.
 	* Makefile.am (SUBDIRS): Add tests.
 	* configure.ac (AC_CONFIG_FILES): Add tests/Makefile.
 	* tests/.gitignore: New file.
@@ -191,12 +3956,12 @@
 
 2011-02-26  Dmitry V. Levin  <ldv@altlinux.org>
 
-	ppc, s390, sparc: regenerate ioctlent.h files
+	ppc, s390, sparc: regenerate ioctlent.h files.
 	* linux/powerpc/ioctlent.h: Regenerated using Fedora 15 kernel headers.
 	* linux/s390/ioctlent.h: Likewise.
 	* linux/sparc/ioctlent.h: Likewise.
 
-	Remove redundant ioctlent.h files
+	Remove redundant ioctlent.h files.
 	* linux/s390x/ioctlent.h: Replace old contents with include of
 	s390/ioctlent.h file.
 	* linux/sparc64/ioctlent.h: Replace old contents with include of
@@ -208,16 +3973,16 @@
 	* linux/ioctlsort.c (main): Use NR and TYPE bits only, to sync with
 	ioctl_lookup() which looks at these bits only.
 
-	Remove obsolete .cvsignore files
+	Remove obsolete .cvsignore files.
 	* test/.cvsignore: Rename to test/.gitignore.
 	* */.cvsignore, */*/.cvsignore: Removed.
 
-	Ignore generated intermediate header files
+	Ignore generated intermediate header files.
 	* .gitignore: Add ioctls.h and ioctldefs.h.
 
 2011-02-24  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Generate much of the CREDITS file from git log
+	Generate much of the CREDITS file from git log.
 	* CREDITS.in: New file, derived from CREDITS, without names of
 	those who are listed as git log 'Author:'s.
 	* CREDITS: Remove file.
@@ -228,28 +3993,28 @@
 
 2011-02-23  Dmitry V. Levin  <ldv@altlinux.org>
 
-	sparc: fix compilation warning
+	sparc: fix compilation warning.
 	* file.c [!HAVE_LONG_LONG_OFF_T] (realprintstat): Cast st_size
 	to unsigned long.
 
-	Update the list of files that must be distributed
+	Update the list of files that must be distributed.
 	* Makefile.am (EXTRA_DIST): Add debian/source/format, debian/watch,
 	linux/ia64/signalent.h, linux/powerpc/ioctlent1.h,
 	linux/powerpc/syscallent1.h, linux/powerpc/errnoent1.h,
 	linux/powerpc/signalent1.h.
 
-	Fix compilation warning reported by gcc -Wunused-but-set-variable
+	Fix compilation warning reported by gcc -Wunused-but-set-variable.
 	* process.c (printwaitn) [!SUNOS4]: Do not define "exited" variable.
 
 2011-02-22  Mike Frysinger  <vapier@gentoo.org>
 
-	ioctlsort: zero pad ioctl codes to 4 places
+	ioctlsort: zero pad ioctl codes to 4 places.
 	Zero padding the ioctl number will allow simple sorting via shell scripts.
 
 	* linux/ioctlsort.c (main): Output ioctl codes zero padded.
 	* linux/ioctlent.h: Regenerated.
 
-	Update mount flags to latest linux
+	Update mount flags to latest linux.
 	* system.c (MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
 	MS_STRICTATIME, MS_BORN): Define.
 	(mount_flags): Add MS_RELATIME, MS_KERNMOUNT, MS_I_VERSION,
@@ -257,20 +4022,20 @@
 
 2011-02-22  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Sync debian/changelog and strace.spec with packages
+	Sync debian/changelog and strace.spec with packages.
 	* debian/changelog: Sync with 4.5.20-2.
 	* strace.spec: Likewise.
 
 2011-02-20  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries
+	Add TRACE_DESC|TRACE_FILE flags to fanotify_* sysentries.
 	* linux/*/syscallent.h: Add TD flag to fanotify_init.  Add TD|TF flags
 	to fanotify_mark.
 
-	Fix flags of fallocate sysentries
+	Fix flags of fallocate sysentries.
 	* linux/*/syscallent.h: Fix sys_fallocate flags.
 
-	Add TRACE_DESC flag to epoll_create* sysentries
+	Add TRACE_DESC flag to epoll_create* sysentries.
 	* linux/*/syscallent.h: Add TD flag to sys_epoll_create and
 	sys_epoll_create1.
 
@@ -278,22 +4043,22 @@
 	* linux/*/syscallent.h: Add TD flag to sys_fgetxattr, sys_flistxattr,
 	and fremovexattr.
 
-	Add TRACE_FILE flag to swapoff sysentries
+	Add TRACE_FILE flag to swapoff sysentries.
 	* linux/*/syscallent.h: Add TF flag to sys_swapoff.
 
-	Add TRACE_DESC flag to fadvise64* sysentries
+	Add TRACE_DESC flag to fadvise64* sysentries.
 	* linux/*/syscallent.h: Add TD flag to sys_fadvise64 and
 	sys_fadvise64_64.
 
-	Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries
+	Add TRACE_DESC flag to mmap, mmap2, and old_mmap sysentries.
 	* linux/*/syscallent.h: Add TD flag to sys_mmap and sys_old_mmap.
 
-	Do not initialize native_scno on platforms with only one personality
+	Do not initialize native_scno on platforms with only one personality.
 	* linux/bfin/syscallent.h: Remove redundant native_scno initialization.
 	* linux/m68k/syscallent.h: Likewise.
 	* linux/microblaze/syscallent.h: Likewise.
 
-	Add LOOP_* ioctls defined in linux/loop.h
+	Add LOOP_* ioctls defined in linux/loop.h.
 	* linux/ioctlent.sh: Add LOOP_* ioctls (0x4C..) defined in linux/loop.h
 	header file.
 	* linux/ioctlent.h: Regenerated.
@@ -307,7 +4072,7 @@
 
 2011-02-19  Mike Frysinger  <vapier@gentoo.org>
 
-	linux/sparc: move to common syscall.h
+	linux/sparc: move to common syscall.h.
 	Rather than constantly deal with the sparc/syscall.h going stale, merge
 	the few sparc-specific pieces into the linux/syscall.h header.
 
@@ -316,13 +4081,13 @@
 	linux/sparc64/syscall.h.
 	* linux/sparc/syscall.h, linux/sparc64/syscall.h: Deleted.
 
-	sparc: add new funcs to syscall.h
+	sparc: add new funcs to syscall.h.
 	Sync missing defs from the common syscall.h here.
 
 	* linux/sparc/syscall.h: Add sys_setfsuid, sys_pread64, and
 	sys_pwrite64 prototypes.
 
-	sparc: punt unused syscall.h.2
+	sparc: punt unused syscall.h.2.
 	I can't find any mention of this header actually being used.
 	Seems to be a really old copy of the common syscall.h.
 
@@ -331,7 +4096,7 @@
 
 2011-02-19  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix raw exit_group(2) decoding
+	Fix raw exit_group(2) decoding.
 	* syscall.c (trace_syscall_entering): Check for sys_exit instead of
 	SYS_exit to handle exit_group(2) as well as _exit(2).
 
@@ -345,11 +4110,11 @@
 
 2011-02-09  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix biarch support in IO dumping
+	Fix biarch support in IO dumping.
 	* syscall.c (dumpio): Switch on tcp->sys_func instead of tcp->scno
 	for more reliable results.
 
-	Simplify tprintf() declaration
+	Simplify tprintf() declaration.
 	* defs.h (tprintf): Simplify declaration.
 
 2011-02-05  Dmitry V. Levin  <ldv@altlinux.org>
@@ -358,7 +4123,7 @@
 
 2011-01-19  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values
+	Fix decoding of get[ug]id, gete[ug]id and setfs[ug]id return values.
 	* defs.h (SYSCALL_NEVER_FAILS): New syscall flag.
 	* linux/dummy.h: Change redirection for sys_get[ug]id, sys_gete[ug]id
 	and setfs[ug]id.
@@ -373,16 +4138,16 @@
 
 2011-01-18  Mike Frysinger  <vapier@gentoo.org>
 
-	Blackfin: update ioctl list
+	Blackfin: update ioctl list.
 	* linux/bfin/ioctlent.h: Sync with latest kernel sources.
 
 2011-01-17  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix stat64 decoding on mips
+	Fix stat64 decoding on mips.
 	* linux/mips/syscallent.h: Use sys_stat64() to decode stat64 syscall.
 	This fixes Debian bug #599028.
 
-	Update linux/*/syscallent.h files to match Linux kernel v2.6.37
+	Update linux/*/syscallent.h files to match Linux kernel v2.6.37.
 	* linux/alpha/syscallent.h: Add hooks for fanotify_init, fanotify_mark,
 	and prlimit64.
 	* linux/i386/syscallent.h: Likewise.
@@ -403,7 +4168,7 @@
 
 2011-01-16  Dmitry V. Levin  <ldv@altlinux.org>
 
-	block.c: cleanup
+	block.c: cleanup.
 	* block.c: Include <inttypes.h>.
 	(print_blkpg_req): Always decode struct blkpg_ioctl_arg.
 	Robustify decoding of strings.
@@ -413,7 +4178,7 @@
 
 2011-01-15  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Add block ioctl support
+	Add block ioctl support.
 	* block.c: New file.
 	* Makefile.am (strace_SOURCES): Add it.
 	* defs.h [LINUX] (block_ioctl): New function.
@@ -423,24 +4188,24 @@
 
 2011-01-14  Holger Hans Peter Freyther  <zecke@selfish.org>
 
-	Parse SOL_SCTP socket options
+	Parse SOL_SCTP socket options.
 	* configure.ac (AC_CHECK_HEADERS): Add netinet/sctp.h.
 	* net.c [HAVE_NETINET_SCTP_H]: Include <netinet/sctp.h>.
 	[SOL_SCTP] (socksctpoptions): New xlat structure.
 	(sys_getsockopt, printsockopt): Parse SOL_SCTP options.
 
-	* net.c (socketlayers): Add more SOL_* constants from linux/socket.h
+	* net.c (socketlayers): Add more SOL_* constants from linux/socket.h.
 
 2011-01-14  Dmitry V. Levin  <ldv@altlinux.org>
 
-	strace.1: fix misleading italics
+	strace.1: fix misleading italics.
 	* strace.1: Use bold instead of italics for "-e trace=" keywords.
 	This fixes Debian bug #589323.
 
-	Update linux/ioctlent.h
+	Update linux/ioctlent.h.
 	* linux/ioctlent.h: Regenerate using linux v2.6.37 headers.
 
-	Add HDIO_* ioctls defined in linux/hdreg.h
+	Add HDIO_* ioctls defined in linux/hdreg.h.
 	* linux/ioctlent.sh: Add HDIO_* ioctls (0x03..) defined in
 	linux/hdreg.h header file.
 	This fixes Debian bug #450953.
@@ -462,18 +4227,18 @@
 
 2011-01-10  Carmelo AMOROSO  <carmelo.amoroso@st.com>
 
-	sh: Add entry for not-multiplexed accept4
+	sh: Add entry for not-multiplexed accept4.
 	* linux/sh/syscallent.h: Add specific entry for not-multiplexed accept4
 	available in kernel mainline since v2.6.37-rc6, see
 	http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21b6e4c7106b2d68a6710506d8706608272fd78b
 
 2010-12-14  Carmelo AMOROSO  <carmelo.amoroso@st.com>
 
-	sh: Add entries for not-multiplexed socket calls
+	sh: Add entries for not-multiplexed socket calls.
 	* linux/sh/syscallent.h: Add specific entries for not-multiplexed
 	socket calls (available in kernel mainline since v2.6.37-rc1)
 
-	sh: Fix compilation warning in do_pipe due to missing prototype
+	sh: Fix compilation warning in do_pipe due to missing prototype.
 	* defs.h [SH]: Make getrval2 prototype visible to do_pipe
 	and fix the following compiler warning:
 	.../net.c: In function 'do_pipe':
@@ -483,35 +4248,35 @@
 
 2010-12-14  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix build on uClibc
+	Fix build on uClibc.
 	* defs.h [LINUX]: Define PTRACE_GETEVENTMSG macro.
 	Patch by Douglas Mencken <dougmencken@gmail.com>.
 
 2010-12-07  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix strace -f -o '|command' hangup
+	Fix strace -f -o '|command' hangup.
 	* strace.c (main): Call test_ptrace_setoptions() before parsing
 	-o option, otherwise a forked command will cause a hangup inside
 	test_ptrace_setoptions().
 
 2010-12-03  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Output diagnostics to stderr
+	Output diagnostics to stderr.
 	* syscall.c (get_scno): Output information about changes in
 	personality mode to stderr.  Reported by Pádraig Brady.
 
-	Recognize more clone flags
+	Recognize more clone flags.
 	* process.c (CLONE_*): Define more flags from linux v2.6.25.
 	(clone_flags): Add entries for them.
 	Proposed by <zhangyanfei@cn.fujitsu.com>.
 
-	Decode struct ucred for getsockopt SO_PEERCRED
+	Decode struct ucred for getsockopt SO_PEERCRED.
 	* net.c (sys_getsockopt): Decode SO_PEERCRED.
 	Proposed by Arkadiusz Miśkiewicz <arekm@maven.pl>.
 
 2010-12-03  Carmelo AMOROSO  <carmelo.amoroso@st.com>
 
-	sh: Add support for tracing sys_cacheflush system call
+	sh: Add support for tracing sys_cacheflush system call.
 	* linux/sh/syscallent.h: Update sys_cacheflush entry.
 	* linux/syscall.h [SH] (sys_cacheflush): New function declaration.
 	* system.c [SH] (cacheflush_flags): New xlat structure.
@@ -528,7 +4293,7 @@
 
 2010-11-30  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Handle followfork using ptrace_setoptions if available
+	Handle followfork using ptrace_setoptions if available.
 	If PTRACE_O_TRACECLONE et al options are supported by kernel,
 	use them to do followfork rather than the original setbpt
 	method that changes registers ourselves.
@@ -544,7 +4309,7 @@
 	call the new function to handle PTRACE_EVENT_* status, and
 	set PTRACE_SETOPTIONS when we see the initial stop of tracee.
 
-	Test how PTRACE_SETOPTIONS support works
+	Test how PTRACE_SETOPTIONS support works.
 	Currently test fork related options only.  Fork a child that uses
 	PTRACE_TRACEME at startup and then does a fork so strace can test
 	how the PTRACE_SETOPTIONS support works before it handles any real
@@ -560,12 +4325,12 @@
 
 2010-09-17  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Enable support for less verbose build rules
+	Enable support for less verbose build rules.
 	* configure.ac (AM_INIT_AUTOMAKE): Add silent-rules.
 
 2010-09-17  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Do not trace children cloned with CLONE_UNTRACED flag
+	Do not trace children cloned with CLONE_UNTRACED flag.
 	If clone is called with flag CLONE_UNTRACED, to be consistent with
 	option PTRACE_O_TRACECLONE, we should not set CLONE_PTRACE flag on
 	its arguments.
@@ -580,7 +4345,7 @@
 
 2010-09-16  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Update linux/hppa/syscallent.h to match Linux kernel v2.6.35
+	Update linux/hppa/syscallent.h to match Linux kernel v2.6.35.
 	* linux/hppa/syscallent.h: Add hooks for recvmmsg and accept4.
 
 2010-09-15  Dmitry V. Levin  <ldv@altlinux.org>
@@ -594,7 +4359,7 @@
 
 2010-09-15  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Fix -e option with only one value in qualifier statement
+	Fix -e option with only one value in qualifier statement.
 	Fix regression introduced by commit v4.5.20-19-g30145dd:
 	if -e option is used with only one value in qualifier statement,
 	e.g. 'strace -e trace=open ls', syscall information would not be
@@ -604,7 +4369,7 @@
 
 2010-09-15  Mike Frysinger  <vapier@gentoo.org>
 
-	Fix off_t/rlim_t size checks when cross-compiling
+	Fix off_t/rlim_t size checks when cross-compiling.
 	The current off_t/rlim_t size checks (wrt size of long long) use AC_RUN
 	which obviously doesn't work when cross-compiling.  While we don't hit
 	any configure errors, the fall back code is pretty dumb (which is to say
@@ -615,7 +4380,7 @@
 	* m4/long_long.m4 (AC_OFF_T_IS_LONG_LONG, AC_RLIM_T_IS_LONG_LONG):
 	Convert from AC_RUN_IFELSE to AC_COMPILE_IFELSE.
 
-	Fix long long little endian detection when cross-compiling
+	Fix long long little endian detection when cross-compiling.
 	The long long endian detection code does an AC_TRY_RUN() and since that
 	doesn't work when cross-compiling, it sets a fallback value.  However,
 	rather than do any sort of default endian detection, the code simply
@@ -628,7 +4393,7 @@
 	* m4/long_long.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Set cross-compiling
 	logic based on ac_cv_c_bigendian.
 
-	Blackfin: decode new syscalls
+	Blackfin: decode new syscalls.
 	* linux/bfin/syscallent.h: Add fanotify/prlimit/cacheflush syscalls.
 	* linux/syscall.h: Add sys_cacheflush() decl.
 	* system.c: Decode Blackfin's cacheflush syscall.
@@ -637,22 +4402,22 @@
 
 2010-09-15  Roland McGrath  <roland@redhat.com>
 
-	Clean up pid2tcb usage
+	Clean up pid2tcb usage.
 	* strace.c (pid2tcb): Always match pid.  Fail for argument <= 0.
 	[USE_PROCFS] (first_used_tcb): New function.
 	[USE_PROCFS] (trace): Use that instead of pid2tcb(0).
 
 2010-09-09  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Turn on more compiler warnings
+	Turn on more compiler warnings.
 	* configure.ac: Enable gcc -Wwrite-strings.
 
-	Import warnings.m4 from gnulib
+	Import warnings.m4 from gnulib.
 	* m4/warnings.m4: Replace with warnings.m4 from gnulib.
 	* configure.ac: Use gl_WARN_ADD from new warnings.m4.
 	* Makefile.am (AM_CFLAGS): Update for new warnings.m4.
 
-	Split acinclude.m4
+	Split acinclude.m4.
 	* Makefile.am (ACLOCAL_AMFLAGS): Add "-I m4".
 	* acinclude.m4: Remove.
 	* m4/includedir.m4: New file, with definition of AC_INCLUDEDIR from
@@ -671,7 +4436,7 @@
 
 2010-09-07  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix const-correctness issues uncovered by gcc -Wwrite-strings
+	Fix const-correctness issues uncovered by gcc -Wwrite-strings.
 	* defs.h (struct xlat): Add const qualifier to the field of
 	type "char *".
 	(set_sortby, qualify, printnum, printnum_int): Add const qualifier to
@@ -706,7 +4471,7 @@
 
 2010-09-04  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Fix printing clone flags
+	Fix printing clone flags.
 	When we trace clone() syscall with only exit signal as clone
 	flags, strace would print an unnecessary OR operator.
 
@@ -714,7 +4479,7 @@
 
 2010-08-28  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Drop nclone_detached and related flags
+	Drop nclone_detached and related flags.
 	Remove nclone_detached since CLONE_DETACHED flag was no-op for a very
 	long time in kernel.
 
@@ -729,20 +4494,20 @@
 
 2010-08-09  Neil Campbell  <lists@thebatcave.org.uk>
 
-	Correct get/set_robust_list syscall numbers for powerpc
+	Correct get/set_robust_list syscall numbers for powerpc.
 	* linux/powerpc/syscallent.h: Swap positions of get_ and set_robust_list.
 
 2010-08-09  Wang Chao  <wang.chao@cn.fujitsu.com>
 
-	Handle CLONE_PARENT flag
+	Handle CLONE_PARENT flag.
 	* process.c (internal_fork): The parent of new cloned process is the
 	same of the calling process when CLONE_PARENT is set.
 
-	Fix error when judging if process has children
+	Fix error when judging if process has children.
 	* process.c (internal_wait): Processes counted in tcp->nclone_threads
 	are tcp's threads, rather than tcp's children.
 
-	Forbid using mutually exclusive options -D and -p together
+	Forbid using mutually exclusive options -D and -p together.
 	If we use -D and -p option together to trace a multi-thread program, in
 	addition to the main thread, other threads could not be traced even if we
 	present -f option. Moreover, when executing 'strace -D -p <non-exist pid>',
@@ -757,7 +4522,7 @@
 
 2010-08-05  Edgar E. Iglesias  <edgar.iglesias@gmail.com>
 
-	Add support for the MicroBlaze architecture
+	Add support for the MicroBlaze architecture.
 	* configure.ac: Recognize MicroBlaze.
 	* linux/microblaze/syscallent.h: New file.
 	* Makefile.am (EXTRA_DIST): Add linux/microblaze/syscallent.h
@@ -769,18 +4534,18 @@
 
 2010-08-05  Frederik Schüler  <fs@debian.org>
 
-	linux/sparc: add missing syscall declarations
+	linux/sparc: add missing syscall declarations.
 	* linux/sparc/syscall.h: Sync with linux/syscall.h
 
 2010-07-17  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Handle biarch get/setrlimit
+	Handle biarch get/setrlimit.
 	* resource.c (print_rlimit32) [POWERPC64 || X86_64]: Define.
 	(sys_getrlimit, sys_setrlimit) [POWERPC64 || X86_64]: Use it.
 
 2010-07-13  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Add biarch support for powerpc64
+	Add biarch support for powerpc64.
 	* acinclude.m4 (AC_LITTLE_ENDIAN_LONG_LONG): Use int instead of
 	long.
 	* configure.ac [$host_cpu = powerpc*]: Also define POWERPC64 if
@@ -803,19 +4568,19 @@
 
 2010-07-09  Andreas Schwab  <schwab@redhat.com>
 
-	Balance braces
+	Balance braces.
 	* strace.c (proc_open): Avoid unbalanced braces.
 	(trace): Likewise.
 
 2010-07-06  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Remove extern declaration at file scope
+	Remove extern declaration at file scope.
 	* defs.h (force_result): Declare.
 	* process.c (internal_wait): Don't declare force_result.
 
 2010-06-24  Andreas Schwab  <schwab@redhat.com>
 
-	Document -C/-D
+	Document -C/-D.
 	* strace.c (usage): Document -C.
 	* strace.1: Document -D.
 
@@ -825,25 +4590,25 @@
 
 2010-06-05  Andreas Schwab  <schwab@linux-m68k.org>
 
-	M68K: Fix fetching syscall arguments
+	M68K: Fix fetching syscall arguments.
 	* syscall.c (syscall_enter) [M68K]: Properly handle more than five
 	syscall arguments.
 
 2010-05-28  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Decode TLS syscalls on m68k
+	Decode TLS syscalls on m68k.
 	* linux/m68k/syscallent.h: Add entries for get_thread_area,
 	set_thread_area, atomic_comxchg_32, atomic_barrier.
 	* linux/dummy.h (sys_get_thread_area, sys_set_thread_area) [M68K]:
 	Don't redefine.
 	* mem.c (sys_get_thread_area, sys_set_thread_area) [LINUX && M68K]: New.
 
-	Fix warning when compiling for m68k
+	Fix warning when compiling for m68k.
 	* syscall.c (d0): Define as long.
 
 2010-04-13  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Prepare for 4.5.20 release
+	Prepare for 4.5.20 release.
 	* NEWS: Update for 4.5.20 release.
 	* configure.ac: Version 4.5.20.
 	* debian/changelog: 4.5.20-1.
@@ -851,7 +4616,7 @@
 
 2010-04-13  Frederik Schüler  <fs@debian.org>
 
-	Update debian/* files for the upcoming release
+	Update debian/* files for the upcoming release.
 	* debian/control: update standards-version to 3.8.4.
 	* debian/rules: allow parallel building.
 	* debian/rules: comment out verbose build, only needed for debugging.
@@ -862,18 +4627,18 @@
 
 2010-04-13  Heiko Carstens  <heiko.carstens@de.ibm.com>
 
-	Fix s390 system call table list
+	Fix s390 system call table list.
 	* linux/s390/syscallent.h: Add the missing entries for preadv and
 	pwritev to the system call table list.
 	* linux/s390x/syscallent.h: Likewise.
 
 2010-04-07  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Update linux/ioctlent.h
+	Update linux/ioctlent.h.
 	* linux/ioctlent.sh: Search in asm-generic directory as well.
 	* linux/ioctlent.h: Regenerated.
 
-	Update linux/*/syscallent.h files to match Linux kernel v2.6.33
+	Update linux/*/syscallent.h files to match Linux kernel v2.6.33.
 	* linux/alpha/syscallent.h: Add 47 hooks.
 	* linux/arm/syscallent.h: Update hooks for pselect6, ppoll,
 	epoll_pwait.  Add 11 hooks.
@@ -898,13 +4663,13 @@
 	* linux/sparc/syscallent.h: Add 22 hooks.
 	* linux/x86_64/syscallent.h: Add 5 hooks.
 
-	Enhance recvmmsg parser
+	Enhance recvmmsg parser.
 	* net.c (sys_recvmmsg): Decode mmsghdr structure on exit from the
 	syscall.  Decode timespec structure both on entrance and on exit.
 
 2010-04-07  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Decode recvmmsg syscall
+	Decode recvmmsg syscall.
 	* net.c (do_msghr): New function to print struct msghdr.
 	(printmsghdr): Use it.
 	(printmmsghdr, sys_recvmmsg): New.
@@ -928,11 +4693,11 @@
 
 	* strace.1: Fix quoting of hyphens and formatting of strace options.
 
-	Split trace_syscall() for better readability
+	Split trace_syscall() for better readability.
 	* syscall.c (trace_syscall): Split into trace_syscall_exiting() and
 	trace_syscall_entering().
 
-	Implement -C option to combine regular and -c output
+	Implement -C option to combine regular and -c output.
 	* defs.h (cflag_t): New enum.
 	* strace.1: Document -C option.
 	* strace.c (cflag): Update type.
@@ -942,7 +4707,7 @@
 	* syscall.c (trace_syscall): ... here.  Update use of cflag.
 	Based on patch by Adrien Kunysz.
 
-	Fix "make dist" regression introduced by commit v4.5.19-12-g5078770
+	Fix "make dist" regression introduced by commit v4.5.19-12-g5078770.
 	* Makefile.am (EXTRA_DIST): Rename linux/syscallent.h to linux/i386/syscallent.h
 
 	* desc.c (sys_epoll_pwait): Fix output formatting bug.
@@ -951,7 +4716,7 @@
 
 2010-03-31  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix msgsnd indirect ipccall decoding
+	Fix msgsnd indirect ipccall decoding.
 	This regression was introduced by commit v4.5.18-136-g783f5bc.
 	* ipc.c (tprint_msgsnd): Add and use "flags" argument.
 	(sys_msgsnd): Pass "flags" argument to tprint_msgsnd().
@@ -959,7 +4724,7 @@
 
 2010-03-23  Mark Wielaard  <mjw@redhat.com>
 
-	Hook up inotify_init1 open mode flags printer
+	Hook up inotify_init1 open mode flags printer.
 	* file.c [LINUX] (sys_inotify_init1): New function.
 	* linux/syscall.h: Declare new sys_inotify_init1 handler.
 	* linux/bfin/syscallent.h: Hook up new handler.
@@ -969,25 +4734,25 @@
 
 2010-03-09  Andreas Schwab  <schwab@redhat.com>
 
-	Avoid spurious error when checking for linux/netlink.h
+	Avoid spurious error when checking for linux/netlink.h.
 	* configure.ac: Include <asm/types.h> when checking for
 	linux/netlink.h.
 
 2010-02-23  Andreas Schwab  <schwab@linux-m68k.org>
 
-	Fix reporting signal mask by sigreturn on powerpc
+	Fix reporting signal mask by sigreturn on powerpc.
 	* signal.c (sys_sigreturn) [POWERPC]: Skip dummy stack frame when
 	locating signal context.
 
 2010-02-09  David Daney  <ddaney@caviumnetworks.com>
 
-	Fix MIPS N32/N64 compile error
+	Fix MIPS N32/N64 compile error.
 	* syscall.c [LINUX_MIPSN32 || LINUX_MIPSN64] (syscall_enter): Pass
 	tcp->pid to ptrace().
 
 2010-02-05  Chris Metcalf  <cmetcalf@tilera.com>
 
-	Add support for the TILE architecture
+	Add support for the TILE architecture.
 	* configure.ac: Add TILE to the list of supported architectures.
 	* defs.h: Define TCB_WAITEXECVE for TILE.
 	* linux/tile/syscallent.h: New file.
@@ -1001,7 +4766,7 @@
 
 2010-02-04  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Remove dead code
+	Remove dead code.
 	* defs.h (tv_tv): Remove.
 	* net.c (sys_xsetsockaddr): Remove commented out dead code.
 	* process.c (setarg, sys_execv, sys_execve, struct_user_offsets):
@@ -1025,7 +4790,7 @@
 
 2010-02-04  Frederik Schüler  <fs@debian.org>
 
-	Update debian/* files
+	Update debian/* files.
 	* debian/control: add sparc64 to the architectures list.
 	This closes Debian bug #560062
 	* Backport commit f0df31e71a58c6e79ba77c1a9d84b2f38d44bec7 to fix FTBFS.
@@ -1043,29 +4808,29 @@
 
 2010-01-25  Andreas Schwab  <schwab@redhat.com>
 
-	Fix spurious failure of AC_STAT64 test
+	Fix spurious failure of AC_STAT64 test.
 	* acinclude.m4 (AC_STAT64): Include <sys/types.h> first.
 
 2010-01-12  Andreas Schwab  <schwab@redhat.com>
 
-	Don't kill the process when detaching
+	Don't kill the process when detaching.
 	* strace.c (detach): Call clearbpt when TCB_BPTSET is set.
 
 2009-12-25  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Decode fifth argument of mremap syscall
+	Decode fifth argument of mremap syscall.
 	* mem.c (sys_mremap): Decode fifth argument.
 	* linux/*/syscallent.h: Update the number of mremap syscall arguments.
 
 2009-12-24  Chris Metcalf  <cmetcalf@tilera.com>
 
-	* mem.c (sys_mbind): Display first argument in hex
+	* mem.c (sys_mbind): Display first argument in hex.
 
-	* mem.c (mremap_flags): Add MREMAP_FIXED
+	* mem.c (mremap_flags): Add MREMAP_FIXED.
 
 2009-11-16  Mike Frysinger  <vapier@gentoo.org>
 
-	Move i386-specific files out of common linux dir
+	Move i386-specific files out of common linux dir.
 	* linux/syscallent.h: Moved to ...
 	* linux/i386/syscallent.h: ... here.
 	* linux/ia64/syscallent.h: Update i386 syscallent.h include.
@@ -1074,13 +4839,13 @@
 
 2009-11-16  Andreas Schwab  <schwab@redhat.com>
 
-	Remove support for pre-C89
+	Remove support for pre-C89.
 	* defs.h: Remove references to __STDC__ and P macros.
 	* strace.c: Likewise.
 
 2009-11-13  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Decode more SOL_PACKET socket options
+	Decode more SOL_PACKET socket options.
 	* net.c (sockpacketoptions): Add more PACKET_* entries.
 	(sys_getsockopt): Decode PACKET_STATISTICS.
 	(printsockopt): Decode PACKET_RX_RING and PACKET_TX_RING.
@@ -1088,12 +4853,12 @@
 
 2009-11-11  Andreas Schwab  <schwab@redhat.com>
 
-	Ignore errors if a thread is killed
+	Ignore errors if a thread is killed.
 	* util.c (clearbpt): Ignore ESRCH error.
 
 2009-11-06  Bernhard Reutner-Fischer  <rep.dot.nop@gmail.com>
 
-	Fix handling of Linux systems without struct statfs64
+	Fix handling of Linux systems without struct statfs64.
 	* acinclude.m4 (AC_STATFS64): New macro to check for struct statfs64.
 	* configure.ac: Call AC_STATFS64.
 	* file.c (printstatfs64, sys_statfs64, sys_fstatfs64): Compile only
@@ -1105,7 +4870,7 @@
 	* net.c (sys_getsockopt): Optimize output a bit.
 	Decode integer argument using printnum_int(), patch by Gabor Gombas.
 
-	Check umove() return code
+	Check umove() return code.
 	* bjm.c (sys_query_module): Print input parameters when entering
 	syscall.  Fix handling of syscall error.  Handle unlikely umove()
 	failures.
@@ -1123,10 +4888,10 @@
 
 2009-11-04  Andreas Schwab  <schwab@redhat.com>
 
-	Decode fallocate on PowerPC
+	Decode fallocate on PowerPC.
 	* linux/powerpc/syscallent.h: Decode fallocate.
 
-	Factor out printing of 64bit syscall argument
+	Factor out printing of 64bit syscall argument.
 	* defs.h (ALIGN64): Remove.
 	(printllval): Declare.
 	* util.c (printllval): Define.
@@ -1145,7 +4910,7 @@
 
 2009-11-03  Andreas Schwab  <schwab@redhat.com>
 
-	Correct decoding of readahead and fadvice64(_64) on PowerPC
+	Correct decoding of readahead and fadvice64(_64) on PowerPC.
 	* file.c (sys_readahead): Align 64bit argument.  Handle PowerPC64
 	like other 64bit architectures.
 	(sys_fadvise64): Likewise.
@@ -1155,7 +4920,7 @@
 
 2009-10-27  Andreas Schwab  <schwab@redhat.com>
 
-	Maintain separate print column for each process
+	Maintain separate print column for each process.
 	* defs.h (struct tcp): Add curcol.
 	* strace.c: (alloc_tcb): Initialize it.
 	(trace): Use curcol from current process and save it before
@@ -1172,7 +4937,7 @@
 
 2009-10-16  Andreas Schwab  <schwab@redhat.com>
 
-	Fix decoding of newfstatat syscall on x86-64
+	Fix decoding of newfstatat syscall on x86-64.
 	* file.c (printstat64) [LINUX && X68_64]: If tracing a 64-bit
 	process redirect to printstat.
 	Fixes RH#529316 "Field values shown for "newfstatat" system
@@ -1184,7 +4949,7 @@
 
 2009-10-12  Mike Frysinger  <vapier@gentoo.org>
 
-	sparc/linux: Rewrite to use asm/ptrace.h
+	sparc/linux: Rewrite to use asm/ptrace.h.
 	The current sparc/linux code uses asm/reg.h, but recent Linux kernels
 	dropped that header completely.  So switch over to the ptrace headers
 	as those should stick around indefinitely as part of the ABI.
@@ -1219,14 +4984,14 @@
 
 2009-10-08  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Enhance msgsnd() parser
+	Enhance msgsnd() parser.
 	* ipc.c (tprint_msgsnd): New function.  Move msgsnd parser code here,
 	add check for umove() return code.
 	(sys_msgsnd): Use tprint_msgsnd().
 
 	* NEWS: Update for 4.5.19 release.
 
-	Enhance semop()/semtimedop() sembuf parser
+	Enhance semop()/semtimedop() sembuf parser.
 	* ipc.c (tprint_sembuf): New function. Move sembuf parser code here,
 	add abbrev() support.
 	(sys_semop, sys_semtimedop): Use tprint_sembuf().
@@ -1239,14 +5004,14 @@
 
 2009-10-08  Mike Frysinger  <vapier@gentoo.org>
 
-	Add support for Linux/no-mmu with vfork
+	Add support for Linux/no-mmu with vfork.
 	* configure.ac (AC_CHECK_FUNCS): Add fork.
 	* strace.c (strace_vforked): Define.
 	(startup_child): Do not raise SIGSTOP if vforked.
 	(trace): Skip first exec when starting up after vforked.
 	* syscall.c [BFIN] (get_scno): Drop waitexec checks.
 
-	Avoid malloc(0) in getdents parsers
+	Avoid malloc(0) in getdents parsers.
 	On end of directory, getdents returns 0.  This return value is used to
 	then try and do malloc(0), but on some systems this will always return
 	NULL.  Since the code won't read the pointer in question if len is 0,
@@ -1255,29 +5020,29 @@
 
 2009-10-07  Mike Frysinger  <vapier@gentoo.org>
 
-	Add sys_nanosleep() prototype for sparc
+	Add sys_nanosleep() prototype for sparc.
 	* linux/sparc/syscall.h (sys_nanosleep): New prototype.
 	Reported by Frederik Schüler.
 
-	Silence compiler warnings about implicit cast from pointer to integer
+	Silence compiler warnings about implicit cast from pointer to integer.
 	* util.c (do_ptrace): Cast ptrace() 4th arg to long.
 	(ptrace_restart): Drop void* cast on ptrace() 4th arg.
 
-	Ignore .gdb files from FLAT toolchains
+	Ignore .gdb files from FLAT toolchains.
 	* .gitignore: Add /*.gdb.
 
 	* configure.ac (AC_CHECK_FUNCS): Sort and expand.
 
-	Blackfin: Update ioctl/syscall lists
+	Blackfin: Update ioctl/syscall lists.
 	* linux/bfin/ioctlent.h: Sync list with latest kernel sources.
 	* linux/bfin/syscallent.h: Likewise.
 
-	ioctlsort: Check ppc hosts too
+	ioctlsort: Check ppc hosts too.
 	* linux/ioctlsort.c: Check for __powerpc__.
 
 2009-10-07  Andreas Schwab  <schwab@redhat.com>
 
-	Fix build on ia64
+	Fix build on ia64.
 	* linux/ia64/syscallent.h: Update for addition of accept4 syscall
 	in ../syscallent.h.
 
@@ -1297,7 +5062,7 @@
 
 2009-10-05  Frederik Schüler  <fs@debian.org>
 
-	Prepare debian/* files for release
+	Prepare debian/* files for release.
 	* debian/rules: Do not ship ChangeLog anymore.
 	* debian/control: Update to Debian standards version 3.8.1, and remove
 	Roland from the Maintainers list.  This closes Debian bug #521458.
@@ -1315,7 +5080,7 @@
 	* linux/hppa/syscallent.h: Update syscalls.
 	Based on work by Kyle McMartin and Helge Deller.
 
-	Fix SA_HANDLER function pointer comparisons for hppa
+	Fix SA_HANDLER function pointer comparisons for hppa.
 	* signal.c (sys_sigaction): Cast SA_HANDLER function pointers to long.
 	(sys_rt_sigaction): Likewise.
 
@@ -1337,13 +5102,13 @@
 
 2009-09-19  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Prepare for 4.5.19 release
+	Prepare for 4.5.19 release.
 	* NEWS: Update for 4.5.19 release.
 	* configure.ac: Version 4.5.19.
 	* debian/changelog: 4.5.19-1.
 	* strace.spec: 4.5.19-1.
 
-	Update debian/* to 4.5.18-1
+	Update debian/* to 4.5.18-1.
 	* debian/changelog: Update to 4.5.18-1.
 	* debian/compat: Set compatibility level to 7.
 	* debian/control (Build-Depends): Update debhelper requirement.
@@ -1351,12 +5116,12 @@
 
 2009-09-19  Kirill A. Shutemov  <kirill@shutemov.name>
 
-	Fix fadvise64 decoding on ARM
+	Fix fadvise64 decoding on ARM.
 	* file.c (sys_fadvise64_64) [ARM]: Fix argument ordering.
 
 2009-09-18  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Fix follow fork/vfork on Linux ARM OABI
+	Fix follow fork/vfork on Linux ARM OABI.
 	__NR_SYSCALL_BASE eis 0 for EABI and is 0x900000 for OABI.
 	* process (change_syscall) [LINUX && ARM]: Mask off the high order bits
 	when changing syscall.
@@ -1365,18 +5130,18 @@
 
 2009-09-18  Mike Frysinger  <vapier@gentoo.org>
 
-	Mark shell scripts as executable
+	Mark shell scripts as executable.
 
-	Ignore ioctlsort helper program
+	Ignore ioctlsort helper program.
 	* .gitignore: Add ioctlsort.
 
-	linux/errno: Add ERFKILL
+	linux/errno: Add ERFKILL.
 	* linux/errnoent.h: Change ERRNO_132 to ERFKILL according to errno 132
 	definition introduced in Linux 2.6.31.
 
 2009-09-01  Paolo Bonzini  <pbonzini@redhat.com>
 
-	Add accept4 socketcall
+	Add accept4 socketcall.
 	This second patch in the series adds support for accept4 as a socketcall
 	sub-call.  Besides the need to renumber all system calls, this poses
 	no problem.
@@ -1396,7 +5161,7 @@
 	(SYS_socket_nsubcalls): Update.
 	* linux/syscall.h: Likewise.
 
-	Replace x86-64 paccept with accept4
+	Replace x86-64 paccept with accept4.
 	This patch changes the paccept syscall to accept4 for x86-64, since
 	the former was dropped in Linux kernel commit v2.6.27-rc7-14-g2d4c826.
 	At the same time, it adds support for pretty printing its arguments.
@@ -1425,7 +5190,7 @@
 
 2009-07-08  Dmitry V. Levin  <ldv@altlinux.org>
 
-	Generate ChangeLog from git log
+	Generate ChangeLog from git log.
 	* .gitignore: Add ChangeLog
 	* ChangeLog: Rename to ChangeLog-CVS.
 	* Makefile.am (gen-changelog): New rule.
diff --git a/INSTALL b/INSTALL
index 7a11ed0..0fad641 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,48 +1,80 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation,
+Inc.
+
+Copying and distribution of this file, with or without modification, are
+permitted in any medium without royalty provided the copyright notice
+and this notice are preserved.  This file is offered as-is, without
+warranty of any kind.
+
 Basic Installation
 ==================
 
-   These are generic installation instructions.
+Briefly, the shell commands `./configure; make; make install' should
+configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
 
    The `configure' shell script attempts to guess correct values for
 various system-dependent variables used during compilation.  It uses
 those values to create a `Makefile' in each directory of the package.
 It may also create one or more `.h' files containing system-dependent
 definitions.  Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, a file
-`config.cache' that saves the results of its tests to speed up
-reconfiguring, and a file `config.log' containing compiler output
-(useful mainly for debugging `configure').
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
 
    If you need to do unusual things to compile the package, please try
 to figure out how `configure' could check whether to do them, and mail
 diffs or instructions to the address given in the `README' so they can
-be considered for the next release.  If at some point `config.cache'
-contains results you don't want to keep, you may remove or edit it.
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
 
-   The file `configure.in' is used to create `configure' by a program
-called `autoconf'.  You only need `configure.in' if you want to change
-it or regenerate `configure' using a newer version of `autoconf'.
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
 
 The simplest way to compile this package is:
 
   1. `cd' to the directory containing the package's source code and type
-     `./configure' to configure the package for your system.  If you're
-     using `csh' on an old version of System V, you might need to type
-     `sh ./configure' instead to prevent `csh' from trying to execute
-     `configure' itself.
+     `./configure' to configure the package for your system.
 
-     Running `configure' takes awhile.  While running, it prints some
-     messages telling which features it is checking for.
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
 
   2. Type `make' to compile the package.
 
   3. Optionally, type `make check' to run any self-tests that come with
-     the package.
+     the package, generally using the just-built uninstalled binaries.
 
   4. Type `make install' to install the programs and any data files and
-     documentation.
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
 
-  5. You can remove the program binaries and object files from the
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
      source code directory by typing `make clean'.  To also remove the
      files that `configure' created (so you can compile the package for
      a different kind of computer), type `make distclean'.  There is
@@ -51,62 +83,89 @@
      all sorts of other programs in order to regenerate files that came
      with the distribution.
 
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
 Compilers and Options
 =====================
 
-   Some systems require unusual options for compilation or linking that
-the `configure' script does not know about.  You can give `configure'
-initial values for variables by setting them in the environment.  Using
-a Bourne-compatible shell, you can do that on the command line like
-this:
-     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about.  Run `./configure --help' for
+details on some of the pertinent environment variables.
 
-Or on systems that have the `env' program, you can do it like this:
-     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
 
-Compiling For Multiple Architectures
-====================================
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
 
-   You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory.  To do this, you must use a version of `make' that
-supports the `VPATH' variable, such as GNU `make'.  `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script.  `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'.
-
-   If you have to use a `make' that does not supports the `VPATH'
-variable, you have to compile the package for one architecture at a time
-in the source code directory.  After you have installed the package for
-one architecture, use `make distclean' before reconfiguring for another
-architecture.
+   *Note Defining Variables::, for more details.
 
 Installation Names
 ==================
 
-   By default, `make install' will install the package's files in
-`/usr/local/bin', `/usr/local/man', etc.  You can specify an
-installation prefix other than `/usr/local' by giving `configure' the
-option `--prefix=PATH'.
+By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
 
    You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files.  If you
-give `configure' the option `--exec-prefix=PATH', the package will use
-PATH as the prefix for installing programs and libraries.
-Documentation and other data files will still use the regular prefix.
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
 
    In addition, if you use an unusual directory layout you can give
-options like `--bindir=PATH' to specify different values for particular
+options like `--bindir=DIR' to specify different values for particular
 kinds of files.  Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them.
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
 
-   If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
 
 Optional Features
 =================
 
+If the package supports it, you can cause programs to be installed with
+an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
    Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
@@ -119,62 +178,125 @@
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
 Specifying the System Type
 ==========================
 
-   There may be some features `configure' can not figure out
-automatically, but needs to determine by the type of host the package
-will run on.  Usually `configure' can figure that out, but if it prints
-a message saying it can not guess the host type, give it the
-`--host=TYPE' option.  TYPE can either be a short name for the system
-type, such as `sun4', or a canonical name with three fields:
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
      CPU-COMPANY-SYSTEM
 
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
 See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
-need to know the host type.
+need to know the machine type.
 
-   If you are building compiler tools for cross-compiling, you can also
-use the `--target=TYPE' option to select the type of system they will
-produce code for and the `--build=TYPE' option to select the type of
-system on which you are compiling the package.
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
 
 Sharing Defaults
 ================
 
-   If you want to set default values for `configure' scripts to share,
-you can create a site shell script called `config.site' that gives
-default values for variables like `CC', `cache_file', and `prefix'.
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
 A warning: not all `configure' scripts look for a site script.
 
-Operation Controls
+Defining Variables
 ==================
 
-   `configure' recognizes the following options to control how it
-operates.
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
 
-`--cache-file=FILE'
-     Use and save the results of the tests in FILE instead of
-     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
-     debugging `configure'.
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
 
 `--help'
-     Print a summary of the options to `configure', and exit.
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
 
 `--quiet'
 `--silent'
 `-q'
-     Do not print messages saying which checks are being made.
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
 
 `--srcdir=DIR'
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
-`--version'
-     Print the version of Autoconf used to generate the `configure'
-     script, and exit.
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
 
-`configure' also accepts some other, not widely useful, options.
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/NEWS b/NEWS
index b1891a9..1f3de08 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,79 @@
+Noteworthy changes in release 4.7
+=================================
+
+* Changes in behavior
+  * strace no longer suspends waitpid until there is a child
+    for waitpid'ing process to collect status from.
+  * strace no longer detaches from a tracee which is supposed
+    to be going to die.
+  * strace now issues a new message: "+++ exited with EXITCODE +++"
+    which shows exact moment strace got exit notification,
+    analogous to existing "+++ killed by SIG +++" message.
+
+* Improvements
+  * Added x32 personality support (x86_64 architecture).
+  * Added -y and -P options to print file descriptor paths and
+    filter by those paths.
+  * Added -I option to control strace interactivity.
+  * Allowed -p option to take comma or whitespace-separated list of PIDs.
+  * Added strace_log_merge script helper to merge timestamped "strace -ff"
+    log files.
+  * Implemented decoding of clock_adjtime, get_robust_list, migrate_pages,
+    preadv, prlimit64, process_vm_readv, process_vm_writev, pwritev,
+    recvmmsg, recvmsg, rt_tgsigqueueinfo, sendmmsg, setns, set_robust_list,
+    sched_rr_get_interval, splice, syslog, tee and vmsplice syscalls.
+  * Enhanced decoding of capget, capset, getrlimit, flistxattr, io_submit,
+    listxattr, setrlimit and swapon syscalls.
+  * Implemented decoding of loop and mtd ioctls.
+  * Added syscall entries for new linux syscalls.
+  * Added syscall entries for direct socket system calls on powerpc.
+  * Updated the list of errno constants.
+  * Updated lists of MSG_*, STA_*, and TCP_* constants.
+  * Regenerated the list of ioctl names from Linux 3.3.
+  * Enhanced switching between processes with different personalities.
+  * Enhanced signals reporting by using short signal names.
+  * Made ERESTART* messages more descriptive.
+  * Made parsing of numbers from strings more robust.
+  * Added support for compat_statfs64 and statfs64.f_flags.
+  * Changed read of data blocks to use single process_vm_readv syscall
+    (when available) instead of several PTRACE_PEEKDATA operations.
+  * Changed read of registers on x86 and x86-64 to use single PTRACE_GETREGS
+    operation instead of several PTRACE_PEEKUSER operations.
+  * Applied various optimizations to make strace work faster.
+
+* Bug fixes
+  * Implemented proper handling of real SIGTRAPs on kernels supporting
+    PTRACE_O_TRACESYSGOOD.
+    (Addresses Fedora bug #162774).
+  * Fixed sockaddr_un.sun_path name in decoded output.
+    (Addresses Debian bug #554946).
+  * Fixed to avoid potential core file clobbering on exit.
+    (Addresses Debian bug #656398).
+  * Fixed a typo in documentation.
+    (Addresses Debian bug #653309).
+  * Fixed decoding of timer id returned by timer_create.
+  * Fixed epoll_create1, epoll_wait and epoll_pwait decoding.
+  * Fixed *at syscalls flags decoding.
+  * Fixed ARM EABI 64-bit syscall's arguments decoding.
+  * Fixed semtimedop decoding on s390.
+  * Fixed osf_sigprocmask decoding on alpha.
+  * Fixed ipc and socket subcall decoding on several architectures.
+  * Corrected syscall entries for epoll_pwait, epoll_create, epoll_ctl,
+    epoll_wait, mincore, mlockall, prctl, reboot, sendfile, sendfile64,
+    sendmsg, sgetmask, ssetmask, swapon, tgkill and tkill syscalls.
+  * Corrected io_* syscall entries on ARM.
+  * Fixed PID prefix printing in "strace -oLOG -ff -p1 -p2 -p3" case.
+  * Fixed logging of unfinished lines in "strace -oLOG -ff" case.
+  * Fixed build when libaio-devel is not available.
+  * Fixed configure checks for PTRACE_* constants.
+  * Fixed compilation warnings remained on several architectures.
+
+* Portability
+  * Removed all non-Linux code.  After years of neglect, that dead code
+    just hampered further strace development.
+  * Linux kernel >= 2.6.18 is recommended.  Older versions might still
+    work but they haven't been thoroughly tested with this release.
+
 Noteworthy changes in release 4.6
 =================================
 
diff --git a/README b/README
index 51490cb..244a5c3 100644
--- a/README
+++ b/README
@@ -1,31 +1,17 @@
-This is strace 4.0, a system call tracer for SunOS 4.x, Linux, System
-V release 4, Solaris 2.x and Irix 5.x.  strace is released under a
-Berkeley-style license at the request of Paul Kranenburg; see the file
-COPYRIGHT for details.
+This is strace, a system call tracer for Linux.
 
-Read the INSTALL file for generic instructions on how to install
-strace.  If configure cannot guess your system configuration, you can
-specify it on the command line after the other options like this:
+strace is released under a Berkeley-style license at the request
+of Paul Kranenburg; see the file COPYRIGHT for details.
 
-	./configure --prefix=/usr i486-linux
+See the file CREDITS for a list of authors and other contributors.
 
-A single sunos4.1 binary should work on all the sun4, sun4c and sun4m
-kernel architectures.  Let me know if sun4d doesn't work.  Other
-i486-*-sysv4 systems may work with little or no tweaking.
+See the file INSTALL for compilation and installation instructions.
 
 See the file NEWS for information on what has changed in recent
 versions.
 
-See the file PORTING if you like strace but it doesn't work on an
-operating system you use frequently.
-
-See the file CREDITS to see who has contributed to strace.
-
-See the file TODO if you feel like helping out.
-
 You can get the latest version of strace from its homepage at
 http://sourceforge.net/projects/strace/ .
 
 Please send bug reports and enhancements to the strace
-mailinglist at strace-devel@lists.sourceforge.net, or directly to
-Wichert Akkerman <wakkerma@debian.org>
+mailinglist at strace-devel@lists.sourceforge.net.
diff --git a/README-linux-ptrace b/README-linux-ptrace
new file mode 100644
index 0000000..97e2c01
--- /dev/null
+++ b/README-linux-ptrace
@@ -0,0 +1,542 @@
+This document describes Linux ptrace implementation in Linux kernels
+version 3.0.0. (Update this notice if you update the document
+to reflect newer kernels).
+
+
+		Ptrace userspace API.
+
+Ptrace API (ab)uses standard Unix parent/child signaling over waitpid.
+An unfortunate effect of it is that resulting API is complex and has
+subtle quirks. This document aims to describe these quirks.
+
+Debugged processes (tracees) first need to be attached to the debugging
+process (tracer). Attachment and subsequent commands are per-thread: in
+multi-threaded process, every thread can be individually attached to a
+(potentially different) tracer, or left not attached and thus not
+debugged. Therefore, "tracee" always means "(one) thread", never "a
+(possibly multi-threaded) process". Ptrace commands are always sent to
+a specific tracee using ptrace(PTRACE_foo, pid, ...), where pid is a
+TID of the corresponding Linux thread.
+
+After attachment, each tracee can be in two states: running or stopped.
+
+There are many kinds of states when tracee is stopped, and in ptrace
+discussions they are often conflated. Therefore, it is important to use
+precise terms.
+
+In this document, any stopped state in which tracee is ready to accept
+ptrace commands from the tracer is called ptrace-stop. Ptrace-stops can
+be further subdivided into signal-delivery-stop, group-stop,
+syscall-stop and so on. They are described in detail later.
+
+
+	1.x Death under ptrace.
+
+When a (possibly multi-threaded) process receives a killing signal (a
+signal set to SIG_DFL and whose default action is to kill the process),
+all threads exit. Tracees report their death to the tracer(s). This is
+not a ptrace-stop (because tracer can't query tracee status such as
+register contents, cannot restart tracee etc) but the notification
+about this event is delivered through waitpid API similarly to
+ptrace-stop.
+
+Note that killing signal will first cause signal-delivery-stop (on one
+tracee only), and only after it is injected by tracer (or after it was
+dispatched to a thread which isn't traced), death from signal will
+happen on ALL tracees within multi-threaded process.
+
+SIGKILL operates similarly, with exceptions. No signal-delivery-stop is
+generated for SIGKILL and therefore tracer can't suppress it. SIGKILL
+kills even within syscalls (syscall-exit-stop is not generated prior to
+death by SIGKILL). The net effect is that SIGKILL always kills the
+process (all its threads), even if some threads of the process are
+ptraced.
+
+Tracer can kill a tracee with ptrace(PTRACE_KILL, pid, 0, 0). This
+operation is deprecated, use kill/tgkill(SIGKILL) instead.
+
+^^^ Oleg prefers to deprecate it instead of describing (and needing to
+support) PTRACE_KILL's quirks.
+
+When tracee executes exit syscall, it reports its death to its tracer.
+Other threads are not affected.
+
+When any thread executes exit_group syscall, every tracee in its thread
+group reports its death to its tracer.
+
+If PTRACE_O_TRACEEXIT option is on, PTRACE_EVENT_EXIT will happen
+before actual death. This applies to exits on exit syscall, group_exit
+syscall, signal deaths (except SIGKILL), and when threads are torn down
+on execve in multi-threaded process.
+
+Tracer cannot assume that ptrace-stopped tracee exists. There are many
+scenarios when tracee may die while stopped (such as SIGKILL).
+Therefore, tracer must always be prepared to handle ESRCH error on any
+ptrace operation. Unfortunately, the same error is returned if tracee
+exists but is not ptrace-stopped (for commands which require stopped
+tracee), or if it is not traced by process which issued ptrace call.
+Tracer needs to keep track of stopped/running state, and interpret
+ESRCH as "tracee died unexpectedly" only if it knows that tracee has
+been observed to enter ptrace-stop. Note that there is no guarantee
+that waitpid(WNOHANG) will reliably report tracee's death status if
+ptrace operation returned ESRCH. waitpid(WNOHANG) may return 0 instead.
+IOW: tracee may be "not yet fully dead" but already refusing ptrace ops.
+
+Tracer can not assume that tracee ALWAYS ends its life by reporting
+WIFEXITED(status) or WIFSIGNALED(status).
+
+??? or can it? Do we include such a promise into ptrace API?
+
+
+	1.x Stopped states.
+
+When running tracee enters ptrace-stop, it notifies its tracer using
+waitpid API. Tracer should use waitpid family of syscalls to wait for
+tracee to stop. Most of this document assumes that tracer waits with:
+
+	pid = waitpid(pid_or_minus_1, &status, __WALL);
+
+Ptrace-stopped tracees are reported as returns with pid > 0 and
+WIFSTOPPED(status) == true.
+
+??? Do we require __WALL usage, or will just using 0 be ok? Are the
+rules different if user wants to use waitid? Will waitid require
+WEXITED?
+
+__WALL value does not include WSTOPPED and WEXITED bits, but implies
+their functionality.
+
+Setting of WCONTINUED bit in waitpid flags is not recommended: the
+continued state is per-process and consuming it can confuse real parent
+of the tracee.
+
+Use of WNOHANG bit in waitpid flags may cause waitpid return 0 ("no
+wait results available yet") even if tracer knows there should be a
+notification. Example: kill(tracee, SIGKILL); waitpid(tracee, &status,
+__WALL | WNOHANG);
+
+??? waitid usage? WNOWAIT?
+
+??? describe how wait notifications queue (or not queue)
+
+The following kinds of ptrace-stops exist: signal-delivery-stops,
+group-stop, PTRACE_EVENT stops, syscall-stops [, SINGLESTEP, SYSEMU,
+SYSEMU_SINGLESTEP]. They all are reported as waitpid result with
+WIFSTOPPED(status) == true. They may be differentiated by checking
+(status >> 8) value, and if looking at (status >> 8) value doesn't
+resolve ambiguity, by querying PTRACE_GETSIGINFO. (Note:
+WSTOPSIG(status) macro returns ((status >> 8) & 0xff) value).
+
+
+	1.x.x Signal-delivery-stop
+
+When (possibly multi-threaded) process receives any signal except
+SIGKILL, kernel selects a thread which handles the signal (if signal is
+generated with t[g]kill, thread selection is done by user). If selected
+thread is traced, it enters signal-delivery-stop. By this point, signal
+is not yet delivered to the process, and can be suppressed by tracer.
+If tracer doesn't suppress the signal, it passes signal to tracee in
+the next ptrace request. This second step of signal delivery is called
+"signal injection" in this document. Note that if signal is blocked,
+signal-delivery-stop doesn't happen until signal is unblocked, with the
+usual exception that SIGSTOP can't be blocked.
+
+Signal-delivery-stop is observed by tracer as waitpid returning with
+WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. If
+WSTOPSIG(status) == SIGTRAP, this may be a different kind of
+ptrace-stop - see "Syscall-stops" and "execve" sections below for
+details. If WSTOPSIG(status) == stopping signal, this may be a
+group-stop - see below.
+
+
+	1.x.x Signal injection and suppression.
+
+After signal-delivery-stop is observed by tracer, tracer should restart
+tracee with
+
+	ptrace(PTRACE_rest, pid, 0, sig)
+
+call, where PTRACE_rest is one of the restarting ptrace ops. If sig is
+0, then signal is not delivered. Otherwise, signal sig is delivered.
+This operation is called "signal injection" in this document, to
+distinguish it from signal-delivery-stop.
+
+Note that sig value may be different from WSTOPSIG(status) value -
+tracer can cause a different signal to be injected.
+
+Note that suppressed signal still causes syscalls to return
+prematurely. Kernel should always restart the syscall in this case:
+tracer would observe a new syscall-enter-stop for the same syscall,
+or, in case of syscalls returning ERESTART_RESTARTBLOCK,
+tracer would observe a syscall-enter-stop for restart_syscall(2)
+syscall. There may still be bugs in this area which cause some syscalls
+to instead return with -EINTR even though no observable signal
+was injected to the tracee.
+
+This is a cause of confusion among ptrace users. One typical scenario
+is that tracer observes group-stop, mistakes it for
+signal-delivery-stop, restarts tracee with ptrace(PTRACE_rest, pid, 0,
+stopsig) with the intention of injecting stopsig, but stopsig gets
+ignored and tracee continues to run.
+
+SIGCONT signal has a side effect of waking up (all threads of)
+group-stopped process. This side effect happens before
+signal-delivery-stop. Tracer can't suppress this side-effect (it can
+only suppress signal injection, which only causes SIGCONT handler to
+not be executed in the tracee, if such handler is installed). In fact,
+waking up from group-stop may be followed by signal-delivery-stop for
+signal(s) *other than* SIGCONT, if they were pending when SIGCONT was
+delivered. IOW: SIGCONT may be not the first signal observed by the
+tracee after it was sent.
+
+Stopping signals cause (all threads of) process to enter group-stop.
+This side effect happens after signal injection, and therefore can be
+suppressed by tracer.
+
+PTRACE_GETSIGINFO can be used to retrieve siginfo_t structure which
+corresponds to delivered signal. PTRACE_SETSIGINFO may be used to
+modify it. If PTRACE_SETSIGINFO has been used to alter siginfo_t,
+si_signo field and sig parameter in restarting command must match,
+otherwise the result is undefined.
+
+
+	1.x.x Group-stop
+
+When a (possibly multi-threaded) process receives a stopping signal,
+all threads stop. If some threads are traced, they enter a group-stop.
+Note that stopping signal will first cause signal-delivery-stop (on one
+tracee only), and only after it is injected by tracer (or after it was
+dispatched to a thread which isn't traced), group-stop will be
+initiated on ALL tracees within multi-threaded process. As usual, every
+tracee reports its group-stop separately to corresponding tracer.
+
+Group-stop is observed by tracer as waitpid returning with
+WIFSTOPPED(status) == true, WSTOPSIG(status) == signal. The same result
+is returned by some other classes of ptrace-stops, therefore the
+recommended practice is to perform
+
+	ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo)
+
+call. The call can be avoided if signal number is not SIGSTOP, SIGTSTP,
+SIGTTIN or SIGTTOU - only these four signals are stopping signals. If
+tracer sees something else, it can't be group-stop. Otherwise, tracer
+needs to call PTRACE_GETSIGINFO. If PTRACE_GETSIGINFO fails with
+EINVAL, then it is definitely a group-stop. (Other failure codes are
+possible, such as ESRCH "no such process" if SIGKILL killed the tracee).
+
+As of kernel 2.6.38, after tracer sees tracee ptrace-stop and until it
+restarts or kills it, tracee will not run, and will not send
+notifications (except SIGKILL death) to tracer, even if tracer enters
+into another waitpid call.
+
+Currently, it causes a problem with transparent handling of stopping
+signals: if tracer restarts tracee after group-stop, SIGSTOP is
+effectively ignored: tracee doesn't remain stopped, it runs. If tracer
+doesn't restart tracee before entering into next waitpid, future
+SIGCONT will not be reported to the tracer. Which would make SIGCONT to
+have no effect.
+
+
+	1.x.x PTRACE_EVENT stops
+
+If tracer sets TRACE_O_TRACEfoo options, tracee will enter ptrace-stops
+called PTRACE_EVENT stops.
+
+PTRACE_EVENT stops are observed by tracer as waitpid returning with
+WIFSTOPPED(status) == true, WSTOPSIG(status) == SIGTRAP. Additional bit
+is set in a higher byte of status word: value ((status >> 8) & 0xffff)
+will be (SIGTRAP | PTRACE_EVENT_foo << 8). The following events exist:
+
+PTRACE_EVENT_VFORK - stop before return from vfork/clone+CLONE_VFORK.
+When tracee is continued after this, it will wait for child to
+exit/exec before continuing its execution (IOW: usual behavior on
+vfork).
+
+PTRACE_EVENT_FORK - stop before return from fork/clone+SIGCHLD
+
+PTRACE_EVENT_CLONE - stop before return from clone
+
+PTRACE_EVENT_VFORK_DONE - stop before return from
+vfork/clone+CLONE_VFORK, but after vfork child unblocked this tracee by
+exiting or exec'ing.
+
+For all four stops described above: stop occurs in parent, not in newly
+created thread. PTRACE_GETEVENTMSG can be used to retrieve new thread's
+tid.
+
+PTRACE_EVENT_EXEC - stop before return from exec.
+
+PTRACE_EVENT_EXIT - stop before exit (including death from exit_group),
+signal death, or exit caused by execve in multi-threaded process.
+PTRACE_GETEVENTMSG returns exit status. Registers can be examined
+(unlike when "real" exit happens). The tracee is still alive, it needs
+to be PTRACE_CONTed or PTRACE_DETACHed to finish exit.
+
+PTRACE_GETSIGINFO on PTRACE_EVENT stops returns si_signo = SIGTRAP,
+si_code = (event << 8) | SIGTRAP.
+
+
+	1.x.x Syscall-stops
+
+If tracee was restarted by PTRACE_SYSCALL, tracee enters
+syscall-enter-stop just prior to entering any syscall. If tracer
+restarts it with PTRACE_SYSCALL, tracee enters syscall-exit-stop when
+syscall is finished, or if it is interrupted by a signal. (That is,
+signal-delivery-stop never happens between syscall-enter-stop and
+syscall-exit-stop, it happens *after* syscall-exit-stop).
+
+Other possibilities are that tracee may stop in a PTRACE_EVENT stop,
+exit (if it entered exit or exit_group syscall), be killed by SIGKILL,
+or die silently (if execve syscall happened in another thread).
+
+Syscall-enter-stop and syscall-exit-stop are observed by tracer as
+waitpid returning with WIFSTOPPED(status) == true, WSTOPSIG(status) ==
+SIGTRAP. If PTRACE_O_TRACESYSGOOD option was set by tracer, then
+WSTOPSIG(status) == (SIGTRAP | 0x80).
+
+Syscall-stops can be distinguished from signal-delivery-stop with
+SIGTRAP by querying PTRACE_GETSIGINFO: si_code <= 0 if sent by usual
+suspects like [tg]kill/sigqueue/etc; or = SI_KERNEL (0x80) if sent by
+kernel, whereas syscall-stops have si_code = SIGTRAP or (SIGTRAP |
+0x80). However, syscall-stops happen very often (twice per syscall),
+and performing PTRACE_GETSIGINFO for every syscall-stop may be somewhat
+expensive.
+
+Some architectures allow to distinguish them by examining registers.
+For example, on x86 rax = -ENOSYS in syscall-enter-stop. Since SIGTRAP
+(like any other signal) always happens *after* syscall-exit-stop, and
+at this point rax almost never contains -ENOSYS, SIGTRAP looks like
+"syscall-stop which is not syscall-enter-stop", IOW: it looks like a
+"stray syscall-exit-stop" and can be detected this way. But such
+detection is fragile and is best avoided.
+
+Using PTRACE_O_TRACESYSGOOD option is a recommended method, since it is
+reliable and does not incur performance penalty.
+
+Syscall-enter-stop and syscall-exit-stop are indistinguishable from
+each other by tracer. Tracer needs to keep track of the sequence of
+ptrace-stops in order to not misinterpret syscall-enter-stop as
+syscall-exit-stop or vice versa. The rule is that syscall-enter-stop is
+always followed by syscall-exit-stop, PTRACE_EVENT stop or tracee's
+death - no other kinds of ptrace-stop can occur in between.
+
+If after syscall-enter-stop tracer uses restarting command other than
+PTRACE_SYSCALL, syscall-exit-stop is not generated.
+
+PTRACE_GETSIGINFO on syscall-stops returns si_signo = SIGTRAP, si_code
+= SIGTRAP or (SIGTRAP | 0x80).
+
+
+	1.x.x SINGLESTEP, SYSEMU, SYSEMU_SINGLESTEP
+
+??? document PTRACE_SINGLESTEP, PTRACE_SYSEMU, PTRACE_SYSEMU_SINGLESTEP
+
+
+	1.x Informational and restarting ptrace commands.
+
+Most ptrace commands (all except ATTACH, TRACEME, KILL) require tracee
+to be in ptrace-stop, otherwise they fail with ESRCH.
+
+When tracee is in ptrace-stop, tracer can read and write data to tracee
+using informational commands. They leave tracee in ptrace-stopped state:
+
+longv = ptrace(PTRACE_PEEKTEXT/PEEKDATA/PEEKUSER, pid, addr, 0);
+	ptrace(PTRACE_POKETEXT/POKEDATA/POKEUSER, pid, addr, long_val);
+	ptrace(PTRACE_GETREGS/GETFPREGS, pid, 0, &struct);
+	ptrace(PTRACE_SETREGS/SETFPREGS, pid, 0, &struct);
+	ptrace(PTRACE_GETSIGINFO, pid, 0, &siginfo);
+	ptrace(PTRACE_SETSIGINFO, pid, 0, &siginfo);
+	ptrace(PTRACE_GETEVENTMSG, pid, 0, &long_var);
+	ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags);
+
+Note that some errors are not reported. For example, setting siginfo
+may have no effect in some ptrace-stops, yet the call may succeed
+(return 0 and don't set errno).
+
+ptrace(PTRACE_SETOPTIONS, pid, 0, PTRACE_O_flags) affects one tracee.
+Current flags are replaced. Flags are inherited by new tracees created
+and "auto-attached" via active PTRACE_O_TRACE[V]FORK or
+PTRACE_O_TRACECLONE options.
+
+Another group of commands makes ptrace-stopped tracee run. They have
+the form:
+
+	ptrace(PTRACE_cmd, pid, 0, sig);
+
+where cmd is CONT, DETACH, SYSCALL, SINGLESTEP, SYSEMU, or
+SYSEMU_SINGLESTEP. If tracee is in signal-delivery-stop, sig is the
+signal to be injected. Otherwise, sig may be ignored.
+
+
+	1.x Attaching and detaching
+
+A thread can be attached to tracer using ptrace(PTRACE_ATTACH, pid, 0,
+0) call. This also sends SIGSTOP to this thread. If tracer wants this
+SIGSTOP to have no effect, it needs to suppress it. Note that if other
+signals are concurrently sent to this thread during attach, tracer may
+see tracee enter signal-delivery-stop with other signal(s) first! The
+usual practice is to reinject these signals until SIGSTOP is seen, then
+suppress SIGSTOP injection. The design bug here is that attach and
+concurrent SIGSTOP are racing and SIGSTOP may be lost.
+
+??? Describe how to attach to a thread which is already group-stopped.
+
+Since attaching sends SIGSTOP and tracer usually suppresses it, this
+may cause stray EINTR return from the currently executing syscall in
+the tracee, as described in "signal injection and suppression" section.
+
+ptrace(PTRACE_TRACEME, 0, 0, 0) request turns current thread into a
+tracee. It continues to run (doesn't enter ptrace-stop). A common
+practice is to follow ptrace(PTRACE_TRACEME) with raise(SIGSTOP) and
+allow parent (which is our tracer now) to observe our
+signal-delivery-stop.
+
+If PTRACE_O_TRACE[V]FORK or PTRACE_O_TRACECLONE options are in effect,
+then children created by (vfork or clone(CLONE_VFORK)), (fork or
+clone(SIGCHLD)) and (other kinds of clone) respectively are
+automatically attached to the same tracer which traced their parent.
+SIGSTOP is delivered to them, causing them to enter
+signal-delivery-stop after they exit syscall which created them.
+
+Detaching of tracee is performed by ptrace(PTRACE_DETACH, pid, 0, sig).
+PTRACE_DETACH is a restarting operation, therefore it requires tracee
+to be in ptrace-stop. If tracee is in signal-delivery-stop, signal can
+be injected. Othervice, sig parameter may be silently ignored.
+
+If tracee is running when tracer wants to detach it, the usual solution
+is to send SIGSTOP (using tgkill, to make sure it goes to the correct
+thread), wait for tracee to stop in signal-delivery-stop for SIGSTOP
+and then detach it (suppressing SIGSTOP injection). Design bug is that
+this can race with concurrent SIGSTOPs. Another complication is that
+tracee may enter other ptrace-stops and needs to be restarted and
+waited for again, until SIGSTOP is seen. Yet another complication is to
+be sure that tracee is not already ptrace-stopped, because no signal
+delivery happens while it is - not even SIGSTOP.
+
+??? Describe how to detach from a group-stopped tracee so that it
+    doesn't run, but continues to wait for SIGCONT.
+
+If tracer dies, all tracees are automatically detached and restarted,
+unless they were in group-stop. Handling of restart from group-stop is
+currently buggy, but "as planned" behavior is to leave tracee stopped
+and waiting for SIGCONT. If tracee is restarted from
+signal-delivery-stop, pending signal is injected.
+
+
+	1.x execve under ptrace.
+
+During execve, kernel destroys all other threads in the process, and
+resets execve'ing thread tid to tgid (process id). This looks very
+confusing to tracers:
+
+All other threads stop in PTRACE_EXIT stop, if requested by active
+ptrace option. Then all other threads except thread group leader report
+death as if they exited via exit syscall with exit code 0. Then
+PTRACE_EVENT_EXEC stop happens, if requested by active ptrace option
+(on which tracee - leader? execve-ing one?).
+
+The execve-ing tracee changes its pid while it is in execve syscall.
+(Remember, under ptrace 'pid' returned from waitpid, or fed into ptrace
+calls, is tracee's tid). That is, pid is reset to process id, which
+coincides with thread group leader tid.
+
+If thread group leader has reported its death by this time, for tracer
+this looks like dead thread leader "reappears from nowhere". If thread
+group leader was still alive, for tracer this may look as if thread
+group leader returns from a different syscall than it entered, or even
+"returned from syscall even though it was not in any syscall". If
+thread group leader was not traced (or was traced by a different
+tracer), during execve it will appear as if it has become a tracee of
+the tracer of execve'ing tracee. All these effects are the artifacts of
+pid change.
+
+PTRACE_O_TRACEEXEC option is the recommended tool for dealing with this
+case. It enables PTRACE_EVENT_EXEC stop which occurs before execve
+syscall return.
+
+Pid change happens before PTRACE_EVENT_EXEC stop, not after.
+
+When tracer receives PTRACE_EVENT_EXEC stop notification, it is
+guaranteed that except this tracee and thread group leader, no other
+threads from the process are alive.
+
+On receiving this notification, tracer should clean up all its internal
+data structures about all threads of this process, and retain only one
+data structure, one which describes single still running tracee, with
+pid = tgid = process id.
+
+Currently, there is no way to retrieve former pid of execve-ing tracee.
+If tracer doesn't keep track of its tracees' thread group relations, it
+may be unable to know which tracee  execve-ed and therefore no longer
+exists under old pid due to pid change.
+
+Example: two threads execve at the same time:
+
+  ** we get syscall-entry-stop in thread 1: **
+ PID1 execve("/bin/foo", "foo" <unfinished ...>
+  ** we issue PTRACE_SYSCALL for thread 1 **
+  ** we get syscall-entry-stop in thread 2: **
+ PID2 execve("/bin/bar", "bar" <unfinished ...>
+  ** we issue PTRACE_SYSCALL for thread 2 **
+  ** we get PTRACE_EVENT_EXEC for PID0, we issue PTRACE_SYSCALL **
+  ** we get syscall-exit-stop for PID0: **
+ PID0 <... execve resumed> )             = 0
+
+In this situation there is no way to know which execve succeeded.
+
+If PTRACE_O_TRACEEXEC option is NOT in effect for the execve'ing
+tracee, kernel delivers an extra SIGTRAP to tracee after execve syscall
+returns. This is an ordinary signal (similar to one which can be
+generated by "kill -TRAP"), not a special kind of ptrace-stop.
+GETSIGINFO on it has si_code = 0 (SI_USER). It can be blocked by signal
+mask, and thus can happen (much) later.
+
+Usually, tracer (for example, strace) would not want to show this extra
+post-execve SIGTRAP signal to the user, and would suppress its delivery
+to the tracee (if SIGTRAP is set to SIG_DFL, it is a killing signal).
+However, determining *which* SIGTRAP to suppress is not easy. Setting
+PTRACE_O_TRACEEXEC option and thus suppressing this extra SIGTRAP is
+the recommended approach.
+
+
+	1.x Real parent
+
+Ptrace API (ab)uses standard Unix parent/child signaling over waitpid.
+This used to cause real parent of the process to stop receiving several
+kinds of waitpid notifications when child process is traced by some
+other process.
+
+Many of these bugs have been fixed, but as of 2.6.38 several still
+exist.
+
+As of 2.6.38, the following is believed to work correctly:
+
+- exit/death by signal is reported first to tracer, then, when tracer
+consumes waitpid result, to real parent (to real parent only when the
+whole multi-threaded process exits). If they are the same process, the
+report is sent only once.
+
+
+	1.x Known bugs
+
+Following bugs still exist:
+
+Group-stop notifications are sent to tracer, but not to real parent.
+Last confirmed on 2.6.38.6.
+
+If thread group leader is traced and exits by calling exit syscall,
+PTRACE_EVENT_EXIT stop will happen for it (if requested), but subsequent
+WIFEXITED notification will not be delivered until all other threads
+exit. As explained above, if one of other threads execve's, thread
+group leader death will *never* be reported. If execve-ed thread is not
+traced by this tracer, tracer will never know that execve happened.
+
+??? need to test this scenario
+
+One possible workaround is to detach thread group leader instead of
+restarting it in this case. Last confirmed on 2.6.38.6.
+
+SIGKILL signal may still cause PTRACE_EVENT_EXIT stop before actual
+signal death. This may be changed in the future - SIGKILL is meant to
+always immediately kill tasks even under ptrace. Last confirmed on
+2.6.38.6.
diff --git a/bjm.c b/bjm.c
index 6c948d5..6ae3758 100644
--- a/bjm.c
+++ b/bjm.c
@@ -26,22 +26,15 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
+
 #include "defs.h"
-
-#if defined(LINUX)
-
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/time.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/utsname.h>
 #include <sys/user.h>
-#include <sys/syscall.h>
-#include <signal.h>
 
 /* Bits of module.flags.  */
 
@@ -49,7 +42,7 @@
 #define MOD_RUNNING		1
 #define MOD_DELETED		2
 #define MOD_AUTOCLEAN		4
-#define MOD_VISITED  		8
+#define MOD_VISITED		8
 #define MOD_USED_ONCE		16
 #define MOD_JUST_FREED		32
 #define MOD_INITIALIZING	64
@@ -102,9 +95,9 @@
 {
 	if (entering(tcp)) {
 		printstr(tcp, tcp->u_arg[0], -1);
-		tprintf(", ");
+		tprints(", ");
 		printxval(which, tcp->u_arg[1], "QM_???");
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		size_t ret;
 
@@ -126,7 +119,7 @@
 		} else if ((tcp->u_arg[1]==QM_MODULES) ||
 			   (tcp->u_arg[1]==QM_DEPS) ||
 			   (tcp->u_arg[1]==QM_REFS)) {
-			tprintf("{");
+			tprints("{");
 			if (!abbrev(tcp)) {
 				char*	data	= malloc(tcp->u_arg[3]);
 				char*	mod	= data;
@@ -140,7 +133,7 @@
 						tcp->u_arg[3], data) < 0) {
 						tprintf(" /* %Zu entries */ ", ret);
 					} else {
-						for (idx=0; idx<ret; idx++) {
+						for (idx = 0; idx < ret; idx++) {
 							tprintf("%s%s",
 								(idx ? ", " : ""),
 								mod);
@@ -153,7 +146,7 @@
 				tprintf(" /* %Zu entries */ ", ret);
 			tprintf("}, %Zu", ret);
 		} else if (tcp->u_arg[1]==QM_SYMBOLS) {
-			tprintf("{");
+			tprints("{");
 			if (!abbrev(tcp)) {
 				char*			data	= malloc(tcp->u_arg[3]);
 				struct module_symbol*	sym	= (struct module_symbol*)data;
@@ -167,7 +160,7 @@
 						tcp->u_arg[3], data) < 0) {
 						tprintf(" /* %Zu entries */ ", ret);
 					} else {
-						for (idx=0; idx<ret; idx++) {
+						for (idx = 0; idx < ret; idx++) {
 							tprintf("%s{name=%s, value=%lu}",
 								(idx ? " " : ""),
 								data+(long)sym->name,
@@ -189,8 +182,7 @@
 }
 
 int
-sys_create_module(tcp)
-struct tcb *tcp;
+sys_create_module(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
@@ -200,8 +192,7 @@
 }
 
 int
-sys_init_module(tcp)
-struct tcb *tcp;
+sys_init_module(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, ", tcp->u_arg[0]);
@@ -210,4 +201,3 @@
 	}
 	return 0;
 }
-#endif /* LINUX */
diff --git a/block.c b/block.c
index 807c849..ea571b6 100644
--- a/block.c
+++ b/block.c
@@ -26,9 +26,6 @@
  */
 
 #include "defs.h"
-#ifdef LINUX
-#include <stdint.h>
-#include <inttypes.h>
 #include <linux/blkpg.h>
 #include <linux/fs.h>
 #include <linux/hdreg.h>
@@ -54,7 +51,7 @@
 #ifndef BLKTRACESTART
 #define BLKTRACESTART _IO(0x12,116)
 #endif
-#ifndef BLKTRACESTART
+#ifndef BLKTRACESTOP
 #define BLKTRACESTOP _IO(0x12,117)
 #endif
 #ifndef BLKTRACETEARDOWN
@@ -93,7 +90,7 @@
 {
 	struct blkpg_partition p;
 
-	tprintf("{");
+	tprints("{");
 	printxval(blkpg_ops, blkpg->op, "BLKPG_???");
 
 	tprintf(", flags=%d, datalen=%d, ",
@@ -139,7 +136,7 @@
 			if (syserror(tcp) || umove(tcp, arg, &val) < 0)
 				tprintf(", %#lx", arg);
 			else
-				tprintf(", %hu", val);
+				tprintf(", %u", (unsigned)val);
 		}
 		break;
 
@@ -194,6 +191,7 @@
 			}
 		break;
 
+#ifdef HAVE_BLKGETSIZE64
 	/* return an uint64_t */
 	case BLKGETSIZE64:
 		if (exiting(tcp)) {
@@ -204,6 +202,7 @@
 				tprintf(", %" PRIu64, val);
 		}
 		break;
+#endif
 
 	/* More complex types */
 	case BLKDISCARD:
@@ -224,10 +223,12 @@
 			if (syserror(tcp) || umove(tcp, arg, &geo) < 0)
 				tprintf(", %#lx", arg);
 			else
-				tprintf(", {heads=%hhu, sectors=%hhu, "
-					"cylinders=%hu, start=%lu}",
-					geo.heads, geo.sectors,
-					geo.cylinders, geo.start);
+				tprintf(", {heads=%u, sectors=%u, "
+					"cylinders=%u, start=%lu}",
+					(unsigned)geo.heads,
+					(unsigned)geo.sectors,
+					(unsigned)geo.cylinders,
+					geo.start);
 		}
 		break;
 
@@ -237,7 +238,7 @@
 			if (umove(tcp, arg, &blkpg) < 0)
 				tprintf(", %#lx", arg);
 			else {
-				tprintf(", ");
+				tprints(", ");
 				print_blkpg_req(tcp, &blkpg);
 			}
 		}
@@ -249,10 +250,10 @@
 			if (umove(tcp, arg, &buts) < 0)
 				tprintf(", %#lx", arg);
 			else
-				tprintf(", {act_mask=%hu, buf_size=%u, "
+				tprintf(", {act_mask=%u, buf_size=%u, "
 					"buf_nr=%u, start_lba=%" PRIu64 ", "
 					"end_lba=%" PRIu64 ", pid=%u}",
-					buts.act_mask, buts.buf_size,
+					(unsigned)buts.act_mask, buts.buf_size,
 					buts.buf_nr, buts.start_lba,
 					buts.end_lba, buts.pid);
 		}
@@ -280,4 +281,3 @@
 	};
 	return 1;
 }
-#endif /* LINUX */
diff --git a/count.c b/count.c
index 92f7849..9496b04 100644
--- a/count.c
+++ b/count.c
@@ -31,8 +31,6 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
@@ -47,21 +45,16 @@
 
 static struct timeval shortest = { 1000000, 0 };
 
-int
+void
 count_syscall(struct tcb *tcp, struct timeval *tv)
 {
-	if (tcp->scno < 0 || tcp->scno >= nsyscalls)
-		return 0;
+	if (!SCNO_IN_RANGE(tcp->scno))
+		return;
 
-	if (!counts)
-	{
+	if (!counts) {
 		counts = calloc(nsyscalls, sizeof(*counts));
 		if (!counts)
-		{
-			fprintf(stderr,
-				"strace: out of memory for call counts\n");
-			exit(1);
-		}
+			die_out_of_memory();
 	}
 
 	counts[tcp->scno].calls++;
@@ -69,13 +62,10 @@
 		counts[tcp->scno].errors++;
 
 	tv_sub(tv, tv, &tcp->etime);
-#ifdef LINUX
-	if (tv_cmp(tv, &tcp->dtime) > 0)
-	{
+	if (tv_cmp(tv, &tcp->dtime) > 0) {
 		static struct timeval one_tick;
 
-		if (one_tick.tv_usec == 0)
-		{
+		if (one_tick.tv_usec == 0) {
 			/* Initialize it.  */
 			struct itimerval it;
 
@@ -88,20 +78,16 @@
 
 		if (tv_nz(&tcp->dtime))
 			*tv = tcp->dtime;
-		else if (tv_cmp(tv, &one_tick) > 0)
-		{
+		else if (tv_cmp(tv, &one_tick) > 0) {
 			if (tv_cmp(&shortest, &one_tick) < 0)
 				*tv = shortest;
 			else
 				*tv = one_tick;
 		}
 	}
-#endif /* LINUX */
 	if (tv_cmp(tv, &shortest) < 0)
 		shortest = *tv;
 	tv_add(&counts[tcp->scno].time, &counts[tcp->scno].time, tv);
-
-	return 0;
 }
 
 static int
@@ -141,10 +127,8 @@
 		sortfun = syscall_cmp;
 	else if (strcmp(sortby, "nothing") == 0)
 		sortfun = NULL;
-	else
-	{
-		fprintf(stderr, "invalid sortby: `%s'\n", sortby);
-		exit(1);
+	else {
+		error_msg_and_die("invalid sortby: '%s'", sortby);
 	}
 }
 
@@ -166,19 +150,14 @@
 	int    *sorted_count = calloc(sizeof(int), nsyscalls);
 
 	if (!sorted_count)
-	{
-		fprintf(stderr, "strace: out of memory for call summary\n");
-		return;
-	}
+		die_out_of_memory();
 
 	call_cum = error_cum = tv_cum.tv_sec = tv_cum.tv_usec = 0;
-	if (overhead.tv_sec == -1)
-	{
+	if (overhead.tv_sec == -1) {
 		tv_mul(&overhead, &shortest, 8);
 		tv_div(&overhead, &overhead, 10);
 	}
-	for (i = 0; i < nsyscalls; i++)
-	{
+	for (i = 0; i < nsyscalls; i++) {
 		sorted_count[i] = i;
 		if (counts == NULL || counts[i].calls == 0)
 			continue;
@@ -195,10 +174,8 @@
 		"calls", "errors", "syscall");
 	fprintf(outf, "%6.6s %11.11s %11.11s %9.9s %9.9s %-16.16s\n",
 		dashes, dashes, dashes, dashes, dashes, dashes);
-	if (counts)
-	{
-		for (i = 0; i < nsyscalls; i++)
-		{
+	if (counts) {
+		for (i = 0; i < nsyscalls; i++) {
 			j = sorted_count[i];
 			if (counts[j].calls == 0)
 				continue;
@@ -211,7 +188,7 @@
 				   / tv_float(&tv_cum));
 			fprintf(outf, "%6.2f %11.6f %11ld %9d %9.9s %s\n",
 				percent, tv_float(&counts[j].time),
-				(long) 1000000 * dtv.tv_sec + dtv.tv_usec,
+				(long) (1000000 * dtv.tv_sec + dtv.tv_usec),
 				counts[j].calls,
 				error_str, sysent[j].sys_name);
 		}
@@ -232,10 +209,9 @@
 void
 call_summary(FILE *outf)
 {
-	int     i, old_pers = current_personality;
+	int i, old_pers = current_personality;
 
-	for (i = 0; i < SUPPORTED_PERSONALITIES; ++i)
-	{
+	for (i = 0; i < SUPPORTED_PERSONALITIES; ++i) {
 		if (!countv[i])
 			continue;
 
@@ -243,8 +219,8 @@
 			set_personality(i);
 		if (i)
 			fprintf(outf,
-				"System call usage summary for %u bit mode:\n",
-				personality_wordsize[current_personality] * 8);
+				"System call usage summary for %d bit mode:\n",
+				(int) (current_wordsize * 8));
 		call_summary_pers(outf);
 	}
 
diff --git a/defs.h b/defs.h
index 7251f68..0ab4a30 100644
--- a/defs.h
+++ b/defs.h
@@ -25,168 +25,157 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #ifdef HAVE_CONFIG_H
-#include "config.h"
+# include "config.h"
 #endif
-
-#ifdef linux
-#include <features.h>
-#endif
-
 #ifdef _LARGEFILE64_SOURCE
 /* This is the macro everything checks before using foo64 names.  */
 # ifndef _LFS64_LARGEFILE
 #  define _LFS64_LARGEFILE 1
 # endif
 #endif
-
-/* configuration section */
-#ifndef MAX_QUALS
-#if defined(LINUX) && defined(MIPS)
-#define MAX_QUALS	7000	/* maximum number of syscalls, signals, etc. */
-#else
-#define MAX_QUALS	2048	/* maximum number of syscalls, signals, etc. */
+#include <features.h>
+#ifdef HAVE_STDBOOL_H
+# include <stdbool.h>
 #endif
-#endif
-#ifndef DEFAULT_STRLEN
-#define DEFAULT_STRLEN	32	/* default maximum # of bytes printed in
-				  `printstr', change with `-s' switch */
-#endif
-#ifndef DEFAULT_ACOLUMN
-#define DEFAULT_ACOLUMN	40	/* default alignment column for results */
-#endif
-#ifndef MAX_ARGS
-# ifdef HPPA
-#  define MAX_ARGS	6	/* maximum number of args to a syscall */
-# else
-#  define MAX_ARGS	32	/* maximum number of args to a syscall */
-# endif
-#endif
-#ifndef DEFAULT_SORTBY
-#define DEFAULT_SORTBY "time"	/* default sorting method for call profiling */
-#endif
-
+#include <stdint.h>
+#include <inttypes.h>
 #include <sys/types.h>
+#ifdef STDC_HEADERS
+# include <stddef.h>
+#endif
 #include <unistd.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <ctype.h>
 #include <string.h>
+#include <errno.h>
+#include <signal.h>
 #include <time.h>
 #include <sys/time.h>
-#include <errno.h>
-
-#ifdef HAVE_STDBOOL_H
-#include <stdbool.h>
-#endif
-
-#ifdef STDC_HEADERS
-#include <stddef.h>
-#endif /* STDC_HEADERS */
-
-#ifdef HAVE_SIGINFO_T
-#include <signal.h>
-#endif
-
-#if defined(LINUX)
-#  if defined(SPARC) || defined(SPARC64)
-#     define LINUXSPARC
-#  endif
-#  if defined(X86_64)
-#     define LINUX_X86_64
-#  endif
-#  if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI32
-#     define LINUX_MIPSO32
-#  endif
-#  if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_NABI32
-#     define LINUX_MIPSN32
-#     define LINUX_MIPS64
-#  endif
-#  if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI64
-#     define LINUX_MIPSN64
-#     define LINUX_MIPS64
-#  endif
-#  if defined(ARM)
-#     define LINUX_ARM
-#  endif
-#  if defined(AVR32)
-#     define LINUX_AVR32
-#  endif
-#endif
-
-#if defined(SVR4) || defined(FREEBSD)
-#define USE_PROCFS
-#else
-#undef USE_PROCFS
-#endif
-
-#ifdef FREEBSD
-#ifndef I386
-#error "FreeBSD support is only for i386 arch right now."
-#endif
-#include <machine/psl.h>
-#include <machine/reg.h>
 #include <sys/syscall.h>
+
+#ifndef HAVE_STRERROR
+const char *strerror(int);
+#endif
+#ifndef HAVE_STPCPY
+/* Some libc have stpcpy, some don't. Sigh...
+ * Roll our private implementation...
+ */
+#undef stpcpy
+#define stpcpy strace_stpcpy
+extern char *stpcpy(char *dst, const char *src);
 #endif
 
-#ifdef USE_PROCFS
-#include <sys/procfs.h>
-#ifdef HAVE_MP_PROCFS
-#include <sys/uio.h>
+#if !defined __GNUC__
+# define __attribute__(x) /*nothing*/
 #endif
-#ifdef FREEBSD
-#include <sys/pioctl.h>
-#endif /* FREEBSD */
-#else /* !USE_PROCFS */
-#if (defined(LINUXSPARC) || defined(LINUX_X86_64) || defined(LINUX_ARM) || defined(LINUX_AVR32)) && defined(__GLIBC__)
-#include <sys/ptrace.h>
+
+#ifndef offsetof
+# define offsetof(type, member)	\
+	(((char *) &(((type *) NULL)->member)) - ((char *) (type *) NULL))
+#endif
+
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
+
+/* Glibc has an efficient macro for sigemptyset
+ * (it just does one or two assignments of 0 to internal vector of longs).
+ */
+#if defined(__GLIBC__) && defined(__sigemptyset) && !defined(sigemptyset)
+# define sigemptyset __sigemptyset
+#endif
+
+/* Configuration section */
+#ifndef MAX_QUALS
+# if defined(MIPS)
+#  define MAX_QUALS	7000	/* maximum number of syscalls, signals, etc. */
+# else
+#  define MAX_QUALS	2048	/* maximum number of syscalls, signals, etc. */
+# endif
+#endif
+#ifndef DEFAULT_STRLEN
+/* default maximum # of bytes printed in `printstr', change with -s switch */
+# define DEFAULT_STRLEN	32
+#endif
+#ifndef DEFAULT_ACOLUMN
+# define DEFAULT_ACOLUMN	40	/* default alignment column for results */
+#endif
+/*
+ * Maximum number of args to a syscall.
+ *
+ * Make sure that all entries in all syscallent.h files have nargs <= MAX_ARGS!
+ * linux/<ARCH>/syscallent.h: all have nargs <= 6.
+ */
+#ifndef MAX_ARGS
+# define MAX_ARGS	6
+#endif
+/* default sorting method for call profiling */
+#ifndef DEFAULT_SORTBY
+# define DEFAULT_SORTBY "time"
+#endif
+
+#if defined(SPARC) || defined(SPARC64)
+# define LINUXSPARC
+#endif
+#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI32
+# define LINUX_MIPSO32
+#endif
+#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_NABI32
+# define LINUX_MIPSN32
+# define LINUX_MIPS64
+#endif
+#if defined(MIPS) && _MIPS_SIM == _MIPS_SIM_ABI64
+# define LINUX_MIPSN64
+# define LINUX_MIPS64
+#endif
+
+#if (defined(LINUXSPARC) || defined(X86_64) || defined(ARM) || defined(AVR32)) && defined(__GLIBC__)
+# include <sys/ptrace.h>
 #else
 /* Work around awkward prototype in ptrace.h. */
-#define ptrace xptrace
-#include <sys/ptrace.h>
-#undef ptrace
-#ifdef POWERPC
-#define __KERNEL__
-#include <asm/ptrace.h>
-#undef __KERNEL__
-#endif
-#ifdef LINUX
+# define ptrace xptrace
+# include <sys/ptrace.h>
+# undef ptrace
+# ifdef POWERPC
+#  define __KERNEL__
+#  include <asm/ptrace.h>
+#  undef __KERNEL__
+# endif
 extern long ptrace(int, int, char *, long);
-#else /* !LINUX */
-extern int ptrace(int, int, char *, int, ...);
-#endif /* !LINUX */
-#endif /* !LINUXSPARC */
-#endif /* !SVR4 */
+#endif
 
-#ifdef LINUX
 #if !defined(__GLIBC__)
-#define	PTRACE_PEEKUSER	PTRACE_PEEKUSR
-#define	PTRACE_POKEUSER	PTRACE_POKEUSR
+# define PTRACE_PEEKUSER PTRACE_PEEKUSR
+# define PTRACE_POKEUSER PTRACE_POKEUSR
+#endif
+#if defined(X86_64) || defined(X32) || defined(I386)
+/* For struct pt_regs. x86 strace uses PTRACE_GETREGS.
+ * PTRACE_GETREGS returns registers in the layout of this struct.
+ */
+# include <asm/ptrace.h>
 #endif
 #ifdef ALPHA
-#  define REG_R0 0
-#  define REG_A0 16
-#  define REG_A3 19
-#  define REG_FP 30
-#  define REG_PC 64
+# define REG_R0 0
+# define REG_A0 16
+# define REG_A3 19
+# define REG_FP 30
+# define REG_PC 64
 #endif /* ALPHA */
 #ifdef MIPS
-#  define REG_V0 2
-#  define REG_A0 4
-#  define REG_A3 7
-#  define REG_SP 29
-#  define REG_EPC 64
+# define REG_V0 2
+# define REG_A0 4
+# define REG_A3 7
+# define REG_SP 29
+# define REG_EPC 64
 #endif /* MIPS */
 #ifdef HPPA
-#  define PT_GR20 (20*4)
-#  define PT_GR26 (26*4)
-#  define PT_GR28 (28*4)
-#  define PT_IAOQ0 (106*4)
-#  define PT_IAOQ1 (107*4)
+# define PT_GR20 (20*4)
+# define PT_GR26 (26*4)
+# define PT_GR28 (28*4)
+# define PT_IAOQ0 (106*4)
+# define PT_IAOQ1 (107*4)
 #endif /* HPPA */
 #ifdef SH64
    /* SH64 Linux - this code assumes the following kernel API for system calls:
@@ -199,12 +188,11 @@
           On return:   R9   = result. */
 
    /* Offset for peeks of registers */
-#  define REG_OFFSET         (24)
-#  define REG_GENERAL(x)     (8*(x)+REG_OFFSET)
-#  define REG_PC             (0*8)
-#  define REG_SYSCALL        (2*8)
+# define REG_OFFSET         (24)
+# define REG_GENERAL(x)     (8*(x)+REG_OFFSET)
+# define REG_PC             (0*8)
+# define REG_SYSCALL        (2*8)
 #endif /* SH64 */
-#endif /* LINUX */
 
 #define SUPPORTED_PERSONALITIES 1
 #define DEFAULT_PERSONALITY 0
@@ -212,232 +200,199 @@
 #ifdef LINUXSPARC
 /* Indexes into the pt_regs.u_reg[] array -- UREG_XX from kernel are all off
  * by 1 and use Ix instead of Ox.  These work for both 32 and 64 bit Linux. */
-#define U_REG_G1 0
-#define U_REG_O0 7
-#define U_REG_O1 8
-#define PERSONALITY0_WORDSIZE 4
-#define PERSONALITY1_WORDSIZE 4
-#undef  SUPPORTED_PERSONALITIES
-#if defined(SPARC64)
-#include <asm/psrcompat.h>
-#define SUPPORTED_PERSONALITIES 3
-#define PERSONALITY2_WORDSIZE 8
-#else
-#include <asm/psr.h>
-#define SUPPORTED_PERSONALITIES 2
-#endif /* SPARC64 */
+# define U_REG_G1 0
+# define U_REG_O0 7
+# define U_REG_O1 8
+# define PERSONALITY0_WORDSIZE 4
+# define PERSONALITY1_WORDSIZE 4
+# undef  SUPPORTED_PERSONALITIES
+# if defined(SPARC64)
+#  include <asm/psrcompat.h>
+#  define SUPPORTED_PERSONALITIES 3
+#  define PERSONALITY2_WORDSIZE 8
+# else
+#  include <asm/psr.h>
+#  define SUPPORTED_PERSONALITIES 2
+# endif /* SPARC64 */
 #endif /* LINUXSPARC */
 
 #ifdef X86_64
-#undef SUPPORTED_PERSONALITIES
-#define SUPPORTED_PERSONALITIES 2
-#define PERSONALITY0_WORDSIZE 8
-#define PERSONALITY1_WORDSIZE 4
+# undef SUPPORTED_PERSONALITIES
+# define SUPPORTED_PERSONALITIES 3
+# define PERSONALITY0_WORDSIZE 8
+# define PERSONALITY1_WORDSIZE 4
+# define PERSONALITY2_WORDSIZE 4
+#endif
+
+#ifdef X32
+# undef SUPPORTED_PERSONALITIES
+# define SUPPORTED_PERSONALITIES 2
+# define PERSONALITY0_WORDSIZE 4
+# define PERSONALITY1_WORDSIZE 4
 #endif
 
 #ifdef ARM
-#undef SUPPORTED_PERSONALITIES
-#define SUPPORTED_PERSONALITIES 2
-#define PERSONALITY0_WORDSIZE 4
-#define PERSONALITY1_WORDSIZE 4
+# undef SUPPORTED_PERSONALITIES
+# define SUPPORTED_PERSONALITIES 2
+# define PERSONALITY0_WORDSIZE 4
+# define PERSONALITY1_WORDSIZE 4
 #endif
 
 #ifdef POWERPC64
-#undef SUPPORTED_PERSONALITIES
-#define SUPPORTED_PERSONALITIES 2
-#define PERSONALITY0_WORDSIZE 8
-#define PERSONALITY1_WORDSIZE 4
+# undef SUPPORTED_PERSONALITIES
+# define SUPPORTED_PERSONALITIES 2
+# define PERSONALITY0_WORDSIZE 8
+# define PERSONALITY1_WORDSIZE 4
 #endif
 
-#ifdef SVR4
-#ifdef HAVE_MP_PROCFS
-extern int mp_ioctl (int f, int c, void *a, int s);
-#define IOCTL(f,c,a)	mp_ioctl (f, c, a, sizeof *a)
-#define IOCTL_STATUS(t) \
-	 pread (t->pfd_stat, &t->status, sizeof t->status, 0)
-#define IOCTL_WSTOP(t)						\
-	(IOCTL (t->pfd, PCWSTOP, (char *)NULL) < 0 ? -1 :		\
-	 IOCTL_STATUS (t))
-#define PR_WHY		pr_lwp.pr_why
-#define PR_WHAT		pr_lwp.pr_what
-#define PR_REG		pr_lwp.pr_context.uc_mcontext.gregs
-#define PR_FLAGS	pr_lwp.pr_flags
-#define PR_SYSCALL	pr_lwp.pr_syscall
-#define PR_INFO		pr_lwp.pr_info
-#define PIOCSTIP	PCSTOP
-#define PIOCSET		PCSET
-#define PIOCRESET	PCRESET
-#define PIOCSTRACE	PCSTRACE
-#define PIOCSFAULT	PCSFAULT
-#define PIOCWSTOP	PCWSTOP
-#define PIOCSTOP	PCSTOP
-#define PIOCSENTRY	PCSENTRY
-#define PIOCSEXIT	PCSEXIT
-#define PIOCRUN		PCRUN
-#else
-#define IOCTL		ioctl
-#define IOCTL_STATUS(t)	ioctl (t->pfd, PIOCSTATUS, &t->status)
-#define IOCTL_WSTOP(t)	ioctl (t->pfd, PIOCWSTOP, &t->status)
-#define PR_WHY		pr_why
-#define PR_WHAT		pr_what
-#define PR_REG		pr_reg
-#define PR_FLAGS	pr_flags
-#define PR_SYSCALL	pr_syscall
-#define PR_INFO		pr_info
-#endif
-#endif
-#ifdef FREEBSD
-#define IOCTL		ioctl
-#define IOCTL_STATUS(t)	ioctl (t->pfd, PIOCSTATUS, &t->status)
-#define IOCTL_WSTOP(t)	ioctl (t->pfd, PIOCWAIT, &t->status)
-#define PIOCRUN         PIOCCONT
-#define PIOCWSTOP       PIOCWAIT
-#define PR_WHY		why
-#define PR_WHAT		val
-#define PR_FLAGS	state
-/* from /usr/src/sys/miscfs/procfs/procfs_vnops.c,
-   status.state = 0 for running, 1 for stopped */
-#define PR_ASLEEP	1
-#define PR_SYSENTRY     S_SCE
-#define PR_SYSEXIT      S_SCX
-#define PR_SIGNALLED    S_SIG
-#define PR_FAULTED      S_CORE
+#ifndef PERSONALITY0_WORDSIZE
+# define PERSONALITY0_WORDSIZE sizeof(long)
 #endif
 
-#ifdef LINUX
-# if !HAVE_DECL_PTRACE_SETOPTIONS
-#  define PTRACE_SETOPTIONS	0x4200
-# endif
-# if !HAVE_DECL_PTRACE_GETEVENTMSG
-#  define PTRACE_GETEVENTMSG	0x4201
-# endif
-# if !HAVE_DECL_PTRACE_GETSIGINFO
-#  define PTRACE_GETSIGINFO	0x4202
-# endif
-# if !HAVE_DECL_PTRACE_O_TRACEFORK
-#  ifndef PTRACE_O_TRACEFORK
-#  define PTRACE_O_TRACEFORK	0x00000002
-#  endif
-# endif
-# if !HAVE_DECL_PTRACE_O_TRACEVFORK
-#  ifndef PTRACE_O_TRACEVFORK
-#  define PTRACE_O_TRACEVFORK	0x00000004
-#  endif
-# endif
-# if !HAVE_DECL_PTRACE_O_TRACECLONE
-#  ifndef PTRACE_O_TRACECLONE
-#  define PTRACE_O_TRACECLONE	0x00000008
-#  endif
-# endif
+#if !HAVE_DECL_PTRACE_SETOPTIONS
+# define PTRACE_SETOPTIONS	0x4200
+#endif
+#if !HAVE_DECL_PTRACE_GETEVENTMSG
+# define PTRACE_GETEVENTMSG	0x4201
+#endif
+#if !HAVE_DECL_PTRACE_GETSIGINFO
+# define PTRACE_GETSIGINFO	0x4202
+#endif
 
-# if !HAVE_DECL_PTRACE_EVENT_FORK
-#  define PTRACE_EVENT_FORK	1
-# endif
-# if !HAVE_DECL_PTRACE_EVENT_VFORK
-#  define PTRACE_EVENT_VFORK	2
-# endif
-# if !HAVE_DECL_PTRACE_EVENT_CLONE
-#  define PTRACE_EVENT_CLONE	3
-# endif
-#endif /* LINUX */
+#if !HAVE_DECL_PTRACE_O_TRACESYSGOOD
+# define PTRACE_O_TRACESYSGOOD	0x00000001
+#endif
+#if !HAVE_DECL_PTRACE_O_TRACEFORK
+# define PTRACE_O_TRACEFORK	0x00000002
+#endif
+#if !HAVE_DECL_PTRACE_O_TRACEVFORK
+# define PTRACE_O_TRACEVFORK	0x00000004
+#endif
+#if !HAVE_DECL_PTRACE_O_TRACECLONE
+# define PTRACE_O_TRACECLONE	0x00000008
+#endif
+#if !HAVE_DECL_PTRACE_O_TRACEEXEC
+# define PTRACE_O_TRACEEXEC	0x00000010
+#endif
+#if !HAVE_DECL_PTRACE_O_TRACEEXIT
+# define PTRACE_O_TRACEEXIT	0x00000040
+#endif
+
+#if !HAVE_DECL_PTRACE_EVENT_FORK
+# define PTRACE_EVENT_FORK	1
+#endif
+#if !HAVE_DECL_PTRACE_EVENT_VFORK
+# define PTRACE_EVENT_VFORK	2
+#endif
+#if !HAVE_DECL_PTRACE_EVENT_CLONE
+# define PTRACE_EVENT_CLONE	3
+#endif
+#if !HAVE_DECL_PTRACE_EVENT_EXEC
+# define PTRACE_EVENT_EXEC	4
+#endif
+#if !HAVE_DECL_PTRACE_EVENT_VFORK_DONE
+# define PTRACE_EVENT_VFORK_DONE	5
+#endif
+#if !HAVE_DECL_PTRACE_EVENT_EXIT
+# define PTRACE_EVENT_EXIT	6
+#endif
+
+/* Experimental code using PTRACE_SEIZE can be enabled here: */
+//# define USE_SEIZE 1
+
+#ifdef USE_SEIZE
+# undef PTRACE_SEIZE
+# define PTRACE_SEIZE		0x4206
+# undef PTRACE_INTERRUPT
+# define PTRACE_INTERRUPT	0x4207
+# undef PTRACE_LISTEN
+# define PTRACE_LISTEN		0x4208
+# undef PTRACE_SEIZE_DEVEL
+# define PTRACE_SEIZE_DEVEL	0x80000000
+# undef PTRACE_EVENT_STOP
+# define PTRACE_EVENT_STOP	7
+# define PTRACE_EVENT_STOP1	128
+#endif
+
+#if defined(I386)
+extern struct pt_regs i386_regs;
+#endif
+#if defined(IA64)
+extern long ia32;
+#endif
 
 /* Trace Control Block */
 struct tcb {
-	short flags;		/* See below for TCB_ values */
+	int flags;		/* See below for TCB_ values */
 	int pid;		/* Process Id of this entry */
+	int u_nargs;		/* System call argument count */
+	int u_error;		/* Error code */
 	long scno;		/* System call number */
-	int u_nargs;		/* System call arguments */
 	long u_arg[MAX_ARGS];	/* System call arguments */
-#if defined (LINUX_MIPSN32)
+#if defined(LINUX_MIPSN32) || defined(X32)
 	long long ext_arg[MAX_ARGS];	/* System call arguments */
 #endif
-	int u_error;		/* Error code */
-	long u_rval;		/* (first) return value */
-#ifdef HAVE_LONG_LONG
+	long u_rval;		/* return value */
+#if defined(LINUX_MIPSN32) || defined(X32)
 	long long u_lrval;	/* long long return value */
 #endif
-	FILE *outf;		/* Output file for this process */
+#if SUPPORTED_PERSONALITIES > 1
+	int currpers;		/* Personality at the time of scno update */
+#endif
 	int curcol;		/* Output column for this process */
+	FILE *outf;		/* Output file for this process */
 	const char *auxstr;	/* Auxiliary info from syscall (see RVAL_STR) */
 	struct timeval stime;	/* System time usage as of last process wait */
 	struct timeval dtime;	/* Delta for system time usage */
 	struct timeval etime;	/* Syscall entry time */
-				/* Support for tracing forked processes */
-	struct tcb *parent;	/* Parent of this process */
-	int nchildren;		/* # of traced children */
-	int waitpid;		/* pid(s) this process is waiting for */
-	int nzombies;		/* # of formerly traced children now dead */
-#ifdef LINUX
-	int nclone_threads;	/* # of nchildren with CLONE_THREAD */
-	int nclone_waiting;	/* clone threads in wait4 (TCB_SUSPENDED) */
-#endif
-				/* (1st arg of wait4()) */
-	long baddr;		/* `Breakpoint' address */
-	long inst[2];		/* Instructions on above */
-	int pfd;		/* proc file descriptor */
-#ifdef SVR4
-#ifdef HAVE_MP_PROCFS
-	int pfd_stat;
-	int pfd_as;
-	pstatus_t status;
-#else
-	prstatus_t status;	/* procfs status structure */
-#endif
-#endif
-	int ptrace_errno;
-#ifdef FREEBSD
-	struct procfs_status status;
-	int pfd_reg;
-	int pfd_status;
-#endif
+				/* Support for tracing forked processes: */
+	long inst[2];		/* Saved clone args (badly named) */
 };
 
 /* TCB flags */
-#define TCB_STARTUP	00001	/* We have just begun ptracing this process */
-#define TCB_INUSE	00002	/* This table entry is in use */
-#define TCB_INSYSCALL	00004	/* A system call is in progress */
-#define TCB_ATTACHED	00010	/* Process is not our own child */
-#define TCB_EXITING	00020	/* As far as we know, this process is exiting */
-#define TCB_SUSPENDED	00040	/* Process can not be allowed to resume just now */
-#define TCB_BPTSET	00100	/* "Breakpoint" set after fork(2) */
-#define TCB_SIGTRAPPED	00200	/* Process wanted to block SIGTRAP */
-#define TCB_FOLLOWFORK	00400	/* Process should have forks followed */
-#define TCB_REPRINT	01000	/* We should reprint this syscall on exit */
-#ifdef LINUX
-/* x86 does not need TCB_WAITEXECVE.
- * It can detect execve's SIGTRAP by looking at eax/rax.
- * See "stray syscall exit: eax = " message in syscall_fixup().
+#define TCB_INUSE		00001	/* This table entry is in use */
+/* We have attached to this process, but did not see it stopping yet */
+#define TCB_STARTUP		00002
+#define TCB_IGNORE_ONE_SIGSTOP	00004	/* Next SIGSTOP is to be ignored */
+/*
+ * Are we in system call entry or in syscall exit?
+ *
+ * This bit is set after all syscall entry processing is done.
+ * Therefore, this bit will be set when next ptrace stop occurs,
+ * which should be syscall exit stop. Other stops which are possible
+ * directly after syscall entry (death, ptrace event stop)
+ * are simpler and handled without calling trace_syscall(), therefore
+ * the places where TCB_INSYSCALL can be set but we aren't in syscall stop
+ * are limited to trace(), this condition is never observed in trace_syscall()
+ * and below.
+ * The bit is cleared after all syscall exit processing is done.
+ * User-generated SIGTRAPs and post-execve SIGTRAP make it necessary
+ * to be very careful and NOT set TCB_INSYSCALL bit when they are encountered.
+ * TCB_WAITEXECVE bit is used for this purpose (see below).
+ *
+ * Use entering(tcp) / exiting(tcp) to check this bit to make code more readable.
  */
-# if defined(ALPHA) || defined(AVR32) || defined(SPARC) || defined(SPARC64) \
+#define TCB_INSYSCALL	00010
+#define TCB_ATTACHED	00020   /* It is attached already */
+/* Are we PROG from "strace PROG [ARGS]" invocation? */
+#define TCB_STRACE_CHILD 0040
+#define TCB_BPTSET	00100	/* "Breakpoint" set after fork(2) */
+#define TCB_REPRINT	00200	/* We should reprint this syscall on exit */
+#define TCB_FILTERED	00400	/* This system call has been filtered out */
+/* x86 does not need TCB_WAITEXECVE.
+ * It can detect SIGTRAP by looking at eax/rax.
+ * See "not a syscall entry (eax = %ld)\n" message
+ * in syscall_fixup_on_sysenter().
+ */
+#if defined(ALPHA) || defined(AVR32) || defined(SPARC) || defined(SPARC64) \
   || defined(POWERPC) || defined(IA64) || defined(HPPA) \
   || defined(SH) || defined(SH64) || defined(S390) || defined(S390X) \
   || defined(ARM) || defined(MIPS) || defined(BFIN) || defined(TILE)
-#  define TCB_WAITEXECVE 02000	/* ignore SIGTRAP after exceve */
-# endif
-# define TCB_CLONE_THREAD  010000 /* CLONE_THREAD set in creating syscall */
-# define TCB_GROUP_EXITING 020000 /* TCB_EXITING was exit_group, not _exit */
-# include <sys/syscall.h>
-# ifndef __NR_exit_group
-# /* Hack: Most headers around are too old to have __NR_exit_group.  */
-#  ifdef ALPHA
-#   define __NR_exit_group 405
-#  elif defined I386
-#   define __NR_exit_group 252
-#  elif defined X86_64
-#   define __NR_exit_group 231
-#  elif defined IA64
-#   define __NR_exit_group 1236
-#  elif defined POWERPC
-#   define __NR_exit_group 234
-#  elif defined S390 || defined S390X
-#   define __NR_exit_group 248
-#  elif defined SPARC || defined SPARC64
-#   define __NR_exit_group 188
-#  elif defined M68K
-#   define __NR_exit_group 247
-#  endif /* ALPHA et al */
-# endif	/* !__NR_exit_group */
-#endif /* LINUX */
+/* This tracee has entered into execve syscall. Expect post-execve SIGTRAP
+ * to happen. (When it is detected, tracee is continued and this bit is cleared.)
+ */
+# define TCB_WAITEXECVE	01000
+#endif
 
 /* qualifier flags */
 #define QUAL_TRACE	0001	/* this system call should be traced */
@@ -454,6 +409,7 @@
 #define syserror(tcp)	((tcp)->u_error != 0)
 #define verbose(tcp)	(qual_flags[(tcp)->scno] & QUAL_VERBOSE)
 #define abbrev(tcp)	(qual_flags[(tcp)->scno] & QUAL_ABBREV)
+#define filtered(tcp)	((tcp)->flags & TCB_FILTERED)
 
 struct xlat {
 	int val;
@@ -470,23 +426,19 @@
 #define RVAL_HEX	001	/* hex format */
 #define RVAL_OCTAL	002	/* octal format */
 #define RVAL_UDECIMAL	003	/* unsigned decimal format */
-#define RVAL_LDECIMAL	004	/* long decimal format */
-#define RVAL_LHEX	005	/* long hex format */
-#define RVAL_LOCTAL	006	/* long octal format */
-#define RVAL_LUDECIMAL	007	/* long unsigned decimal format */
+#if defined(LINUX_MIPSN32) || defined(X32)
+# if 0 /* unused so far */
+#  define RVAL_LDECIMAL	004	/* long decimal format */
+#  define RVAL_LHEX	005	/* long hex format */
+#  define RVAL_LOCTAL	006	/* long octal format */
+# endif
+# define RVAL_LUDECIMAL	007	/* long unsigned decimal format */
+#endif
 #define RVAL_MASK	007	/* mask for these values */
 
 #define RVAL_STR	010	/* Print `auxstr' field after return val */
 #define RVAL_NONE	020	/* Print nothing */
 
-#ifndef offsetof
-#define offsetof(type, member)	(((char *) &(((type *) NULL)->member)) - \
-				 ((char *) (type *) NULL))
-#endif /* !offsetof */
-
-/* get offset of member within a user struct */
-#define uoff(member)	offsetof(struct user, member)
-
 #define TRACE_FILE	001	/* Trace file-related syscalls. */
 #define TRACE_IPC	002	/* Trace IPC-related syscalls. */
 #define TRACE_NETWORK	004	/* Trace network-related syscalls. */
@@ -500,56 +452,114 @@
 	CFLAG_ONLY_STATS,
 	CFLAG_BOTH
 } cflag_t;
-
-extern struct tcb **tcbtab;
-extern int *qual_flags;
-extern int debug, followfork;
-extern unsigned int ptrace_setoptions;
-extern int dtime, xflag, qflag;
 extern cflag_t cflag;
-extern int acolumn;
-extern unsigned int nprocs, tcbtabsize;
-extern int max_strlen;
-extern struct tcb *tcp_last;
+extern int *qual_flags;
+extern bool debug_flag;
+extern bool Tflag;
+extern bool qflag;
+extern bool not_failing_only;
+extern bool show_fd_path;
+extern bool tracing_paths;
+extern unsigned int xflag;
+extern unsigned int followfork;
+extern unsigned int ptrace_setoptions;
+extern unsigned int max_strlen;
 
 enum bitness_t { BITNESS_CURRENT = 0, BITNESS_32 };
 
-extern int set_personality(int personality);
-extern const char *xlookup(const struct xlat *, int);
-extern struct tcb *alloc_tcb(int, int);
-extern struct tcb *pid2tcb(int);
-extern void droptcb(struct tcb *);
-extern void expand_tcbtab(void);
+void error_msg(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
+void perror_msg(const char *fmt, ...) __attribute__ ((format(printf, 1, 2)));
+void error_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2)));
+void perror_msg_and_die(const char *fmt, ...) __attribute__ ((noreturn, format(printf, 1, 2)));
+void die_out_of_memory(void) __attribute__ ((noreturn));
 
-#define alloctcb(pid)	alloc_tcb((pid), 1)
+#ifdef USE_CUSTOM_PRINTF
+/*
+ * Speed-optimized vfprintf implementation.
+ * See comment in vsprintf.c for allowed formats.
+ * Short version: %h[h]u, %zu, %tu are not allowed, use %[l[l]]u.
+ *
+ * It results in strace using about 5% less CPU in user space
+ * (compared to glibc version).
+ * But strace spends a lot of time in kernel space,
+ * so overall it does not appear to be a significant win.
+ * Thus disabled by default.
+ */
+int strace_vfprintf(FILE *fp, const char *fmt, va_list args);
+#else
+# define strace_vfprintf vfprintf
+#endif
 
 extern void set_sortby(const char *);
 extern void set_overhead(int);
 extern void qualify(const char *);
-extern int get_scno(struct tcb *);
-extern long known_scno(struct tcb *);
-extern long do_ptrace(int request, struct tcb *tcp, void *addr, void *data);
-extern int ptrace_restart(int request, struct tcb *tcp, int sig);
-extern int force_result(struct tcb *, int, long);
 extern int trace_syscall(struct tcb *);
-extern int count_syscall(struct tcb *, struct timeval *);
-extern void printxval(const struct xlat *, int, const char *);
-extern int printargs(struct tcb *);
-extern int addflags(const struct xlat *, int);
-extern int printflags(const struct xlat *, int, const char *);
-extern const char *sprintflags(const char *, const struct xlat *, int);
+extern void count_syscall(struct tcb *, struct timeval *);
+extern void call_summary(FILE *);
+
 extern int umoven(struct tcb *, long, int, char *);
+#define umove(pid, addr, objp)	\
+	umoven((pid), (addr), sizeof(*(objp)), (char *) (objp))
 extern int umovestr(struct tcb *, long, int, char *);
 extern int upeek(struct tcb *, long, long *);
+#if defined(SPARC) || defined(SPARC64) || defined(IA64) || defined(SH)
+extern long getrval2(struct tcb *);
+#endif
+/*
+ * On Linux, "setbpt" is a misnomer: we don't set a breakpoint
+ * (IOW: no poking in user's text segment),
+ * instead we change fork/vfork/clone into clone(CLONE_PTRACE).
+ * On newer kernels, we use PTRACE_O_TRACECLONE/TRACE[V]FORK instead.
+ */
+extern int setbpt(struct tcb *);
+extern int clearbpt(struct tcb *);
+
+extern const char *signame(int);
+extern int is_restart_error(struct tcb *);
+extern int pathtrace_select(const char *);
+extern int pathtrace_match(struct tcb *);
+extern const char *getfdpath(struct tcb *, int);
+
+extern const char *xlookup(const struct xlat *, int);
+
+extern int string_to_uint(const char *str);
+extern int string_quote(const char *, char *, long, int);
+
+#if HAVE_LONG_LONG
+/* _l refers to the lower numbered u_arg,
+ * _h refers to the higher numbered u_arg
+ */
+# if HAVE_LITTLE_ENDIAN_LONG_LONG
+#  define LONG_LONG(_l,_h) \
+	((long long)((unsigned long long)(unsigned)(_l) | ((unsigned long long)(_h)<<32)))
+# else
+#  define LONG_LONG(_l,_h) \
+	((long long)((unsigned long long)(unsigned)(_h) | ((unsigned long long)(_l)<<32)))
+# endif
+extern int printllval(struct tcb *, const char *, int);
+#endif
+extern void printxval(const struct xlat *, int, const char *);
+extern int printargs(struct tcb *);
+extern int printargs_lu(struct tcb *);
+extern int printargs_ld(struct tcb *);
+extern void addflags(const struct xlat *, int);
+extern int printflags(const struct xlat *, int, const char *);
+extern const char *sprintflags(const char *, const struct xlat *, int);
 extern void dumpiov(struct tcb *, int, long);
 extern void dumpstr(struct tcb *, long, int);
-extern void printstr(struct tcb *, long, int);
+extern void printstr(struct tcb *, long, long);
 extern void printnum(struct tcb *, long, const char *);
 extern void printnum_int(struct tcb *, long, const char *);
 extern void printpath(struct tcb *, long);
 extern void printpathn(struct tcb *, long, int);
+#define TIMESPEC_TEXT_BUFSIZE (sizeof(long)*3 * 2 + sizeof("{%u, %u}"))
+#define TIMEVAL_TEXT_BUFSIZE  TIMESPEC_TEXT_BUFSIZE
 extern void printtv_bitness(struct tcb *, long, enum bitness_t, int);
-extern void sprinttv(struct tcb *, long, enum bitness_t, char *);
+#define printtv(tcp, addr)	\
+	printtv_bitness((tcp), (addr), BITNESS_CURRENT, 0)
+#define printtv_special(tcp, addr)	\
+	printtv_bitness((tcp), (addr), BITNESS_CURRENT, 1)
+extern char *sprinttv(char *, struct tcb *, long, enum bitness_t, int special);
 extern void print_timespec(struct tcb *, long);
 extern void sprint_timespec(char *, struct tcb *, long);
 #ifdef HAVE_SIGINFO_T
@@ -559,31 +569,18 @@
 extern void printsock(struct tcb *, long, int);
 extern void print_sock_optmgmt(struct tcb *, long, int);
 extern void printrusage(struct tcb *, long);
+#ifdef ALPHA
+extern void printrusage32(struct tcb *, long);
+#endif
 extern void printuid(const char *, unsigned long);
-extern int clearbpt(struct tcb *);
-extern int setbpt(struct tcb *);
-extern int sigishandled(struct tcb *, int);
 extern void printcall(struct tcb *);
-extern const char *signame(int);
 extern void print_sigset(struct tcb *, long, int);
 extern void printsignal(int);
-extern void printleader(struct tcb *);
-extern void printtrailer(void);
-extern void tabto(int);
-extern void call_summary(FILE *);
-extern void tprint_iov(struct tcb *, unsigned long, unsigned long);
+extern void tprint_iov(struct tcb *, unsigned long, unsigned long, int decode_iov);
+extern void tprint_iov_upto(struct tcb *, unsigned long, unsigned long, int decode_iov, unsigned long);
 extern void tprint_open_modes(mode_t);
 extern const char *sprint_open_modes(mode_t);
-extern int is_restart_error(struct tcb *);
-
-extern int change_syscall(struct tcb *, int);
-extern int internal_fork(struct tcb *);
-extern int internal_exec(struct tcb *);
-extern int internal_wait(struct tcb *, int);
-extern int internal_exit(struct tcb *);
-#ifdef LINUX
-extern int handle_new_child(struct tcb *, int, int);
-#endif
+extern void print_loff_t(struct tcb *, long);
 
 extern const struct ioctlent *ioctl_lookup(long);
 extern const struct ioctlent *ioctl_next_match(const struct ioctlent *);
@@ -591,12 +588,11 @@
 extern int term_ioctl(struct tcb *, long, long);
 extern int sock_ioctl(struct tcb *, long, long);
 extern int proc_ioctl(struct tcb *, int, int);
-extern int stream_ioctl(struct tcb *, int, int);
-#ifdef LINUX
 extern int rtc_ioctl(struct tcb *, long, long);
 extern int scsi_ioctl(struct tcb *, long, long);
 extern int block_ioctl(struct tcb *, long, long);
-#endif
+extern int mtd_ioctl(struct tcb *, long, long);
+extern int loop_ioctl(struct tcb *, long, long);
 
 extern int tv_nz(struct timeval *);
 extern int tv_cmp(struct timeval *, struct timeval *);
@@ -606,105 +602,62 @@
 extern void tv_mul(struct timeval *, struct timeval *, int);
 extern void tv_div(struct timeval *, struct timeval *, int);
 
-#ifdef SUNOS4
-extern int fixvfork(struct tcb *);
-#endif
-#if !(defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(IA64) \
-	&& !defined(SH))
-extern long getrval2(struct tcb *);
-#endif
-#ifdef USE_PROCFS
-extern int proc_open(struct tcb *tcp, int attaching);
-#endif
+/* Strace log generation machinery.
+ *
+ * printing_tcp: tcb which has incomplete line being printed right now.
+ * NULL if last line has been completed ('\n'-terminated).
+ * printleader(tcp) examines it, finishes incomplete line if needed,
+ * the sets it to tcp.
+ * line_ended() clears printing_tcp and resets ->curcol = 0.
+ * tcp->curcol == 0 check is also used to detect completeness
+ * of last line, since in -ff mode just checking printing_tcp for NULL
+ * is not enough.
+ *
+ * If you change this code, test log generation in both -f and -ff modes
+ * using:
+ * strace -oLOG -f[f] test/threaded_execve
+ * strace -oLOG -f[f] test/sigkill_rain
+ * strace -oLOG -f[f] -p "`pidof web_browser`"
+ */
+extern struct tcb *printing_tcp;
+extern void printleader(struct tcb *);
+extern void line_ended(void);
+extern void tabto(void);
+extern void tprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
+extern void tprints(const char *str);
 
-#define umove(pid, addr, objp)	\
-	umoven((pid), (addr), sizeof *(objp), (char *) (objp))
-
-#define printtv(tcp, addr)	\
-	printtv_bitness((tcp), (addr), BITNESS_CURRENT, 0)
-#define printtv_special(tcp, addr)	\
-	printtv_bitness((tcp), (addr), BITNESS_CURRENT, 1)
-
-extern void tprintf(const char *fmt, ...)
-#ifdef __GNUC__
-	__attribute__ ((format (printf, 1, 2)))
-#endif
-	;
-
-#ifndef HAVE_STRERROR
-const char *strerror(int);
-#endif
-#ifndef HAVE_STRSIGNAL
-const char *strsignal(int);
-#endif
-
+#if SUPPORTED_PERSONALITIES > 1
+extern void set_personality(int personality);
 extern int current_personality;
 extern const int personality_wordsize[];
+# define current_wordsize (personality_wordsize[current_personality])
+#else
+# define set_personality(personality) ((void)0)
+# define current_personality 0
+# define current_wordsize    PERSONALITY0_WORDSIZE
+#endif
 
 struct sysent {
-	int	nargs;
+	unsigned nargs;
 	int	sys_flags;
 	int	(*sys_func)();
 	const char *sys_name;
-	long	native_scno;	/* Match against SYS_* constants.  */
 };
 
-extern const struct sysent *sysent;
-extern int nsyscalls;
-
-extern const char *const *errnoent;
-extern int nerrnos;
-
 struct ioctlent {
 	const char *doth;
 	const char *symbol;
 	unsigned long code;
 };
 
+extern const struct sysent *sysent;
+extern unsigned nsyscalls;
+extern const char *const *errnoent;
+extern unsigned nerrnos;
 extern const struct ioctlent *ioctlent;
-extern int nioctlents;
-
+extern unsigned nioctlents;
 extern const char *const *signalent;
-extern int nsignals;
+extern unsigned nsignals;
 
-extern const struct ioctlent ioctlent0[];
-extern const int nioctlents0;
-extern const char *const signalent0[];
-extern const int nsignals0;
-
-#if SUPPORTED_PERSONALITIES >= 2
-extern const struct ioctlent ioctlent1[];
-extern const int nioctlents1;
-extern const char *const signalent1[];
-extern const int nsignals1;
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
-
-#if SUPPORTED_PERSONALITIES >= 3
-extern const struct ioctlent ioctlent2[];
-extern const int nioctlents2;
-extern const char *const signalent2[];
-extern const int nsignals2;
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
-
-#if HAVE_LONG_LONG
-
-/* _l refers to the lower numbered u_arg,
- * _h refers to the higher numbered u_arg
- */
-
-#if HAVE_LITTLE_ENDIAN_LONG_LONG
-#define LONG_LONG(_l,_h) \
-    ((long long)((unsigned long long)(unsigned)(_l) | ((unsigned long long)(_h)<<32)))
-#else
-#define LONG_LONG(_l,_h) \
-    ((long long)((unsigned long long)(unsigned)(_h) | ((unsigned long long)(_l)<<32)))
-#endif
-
-extern int printllval(struct tcb *, const char *, int);
-#endif
-
-#ifdef IA64
-extern long ia32;
-#endif
-
-extern int not_failing_only;
+#define SCNO_IN_RANGE(scno) \
+  ((unsigned long)(scno) < nsyscalls && sysent[scno].sys_func)
diff --git a/desc.c b/desc.c
index 790b10b..f0c1890 100644
--- a/desc.c
+++ b/desc.c
@@ -26,33 +26,26 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <fcntl.h>
 #include <sys/file.h>
-#ifdef LINUX
-#include <inttypes.h>
-#endif
 #ifdef HAVE_SYS_EPOLL_H
-#include <sys/epoll.h>
+# include <sys/epoll.h>
 #endif
 #ifdef HAVE_LIBAIO_H
-#include <libaio.h>
+# include <libaio.h>
 #endif
 
 #if HAVE_LONG_LONG_OFF_T
 /*
  * Hacks for systems that have a long long off_t
  */
-#define flock64	flock		/* Horrid hack */
-#define printflock printflock64	/* Horrider hack */
+# define flock64	flock		/* Horrid hack */
+# define printflock printflock64	/* Horrider hack */
 #endif
 
-
 static const struct xlat fcntlcmds[] = {
 	{ F_DUPFD,	"F_DUPFD"	},
 	{ F_GETFD,	"F_GETFD"	},
@@ -237,8 +230,8 @@
 	struct flock fl;
 
 #if SUPPORTED_PERSONALITIES > 1
-	if (personality_wordsize[current_personality] != sizeof(fl.l_start)) {
-		if (personality_wordsize[current_personality] == 4) {
+	if (current_wordsize != sizeof(fl.l_start)) {
+		if (current_wordsize == 4) {
 			/* 32-bit x86 app on x86_64 and similar cases */
 			struct {
 				short int l_type;
@@ -248,7 +241,7 @@
 				int32_t l_pid; /* pid_t */
 			} fl32;
 			if (umove(tcp, addr, &fl32) < 0) {
-				tprintf("{...}");
+				tprints("{...}");
 				return;
 			}
 			fl.l_type = fl32.l_type;
@@ -259,26 +252,26 @@
 		} else {
 			/* let people know we have a problem here */
 			tprintf("{ <decode error: unsupported wordsize %d> }",
-				personality_wordsize[current_personality]);
+				current_wordsize);
 			return;
 		}
 	} else
 #endif
 	{
 		if (umove(tcp, addr, &fl) < 0) {
-			tprintf("{...}");
+			tprints("{...}");
 			return;
 		}
 	}
-	tprintf("{type=");
+	tprints("{type=");
 	printxval(lockfcmds, fl.l_type, "F_???");
-	tprintf(", whence=");
+	tprints(", whence=");
 	printxval(whence, fl.l_whence, "SEEK_???");
 	tprintf(", start=%ld, len=%ld", fl.l_start, fl.l_len);
 	if (getlk)
 		tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
 	else
-		tprintf("}");
+		tprints("}");
 }
 #endif
 
@@ -290,18 +283,18 @@
 	struct flock64 fl;
 
 	if (umove(tcp, addr, &fl) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
-	tprintf("{type=");
+	tprints("{type=");
 	printxval(lockfcmds, fl.l_type, "F_???");
-	tprintf(", whence=");
+	tprints(", whence=");
 	printxval(whence, fl.l_whence, "SEEK_???");
 	tprintf(", start=%lld, len=%lld", (long long) fl.l_start, (long long) fl.l_len);
 	if (getlk)
 		tprintf(", pid=%lu}", (unsigned long) fl.l_pid);
 	else
-		tprintf("}");
+		tprints("}");
 }
 #endif
 
@@ -310,11 +303,11 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printxval(fcntlcmds, tcp->u_arg[1], "F_???");
 		switch (tcp->u_arg[1]) {
 		case F_SETFD:
-			tprintf(", ");
+			tprints(", ");
 			printflags(fdflags, tcp->u_arg[2], "FD_???");
 			break;
 		case F_SETOWN: case F_DUPFD:
@@ -324,14 +317,14 @@
 			tprintf(", %ld", tcp->u_arg[2]);
 			break;
 		case F_SETFL:
-			tprintf(", ");
+			tprints(", ");
 			tprint_open_modes(tcp->u_arg[2]);
 			break;
 		case F_SETLK: case F_SETLKW:
 #ifdef F_FREESP
 		case F_FREESP:
 #endif
-			tprintf(", ");
+			tprints(", ");
 			printflock(tcp, tcp->u_arg[2], 0);
 			break;
 #if _LFS64_LARGEFILE
@@ -346,19 +339,19 @@
 #if defined(F_SETLKW64) && F_SETLKW64 + 0 != F_SETLKW
 		case F_SETLKW64:
 #endif
-			tprintf(", ");
+			tprints(", ");
 			printflock64(tcp, tcp->u_arg[2], 0);
 			break;
 #endif
 #ifdef F_NOTIFY
 		case F_NOTIFY:
-			tprintf(", ");
+			tprints(", ");
 			printflags(notifyflags, tcp->u_arg[2], "DN_???");
 			break;
 #endif
 #ifdef F_SETLEASE
 		case F_SETLEASE:
-			tprintf(", ");
+			tprints(", ");
 			printxval(lockfcmds, tcp->u_arg[2], "F_???");
 			break;
 #endif
@@ -391,14 +384,14 @@
 			tcp->auxstr = sprint_open_modes(tcp->u_rval);
 			return RVAL_HEX|RVAL_STR;
 		case F_GETLK:
-			tprintf(", ");
+			tprints(", ");
 			printflock(tcp, tcp->u_arg[2], 1);
 			break;
 #if _LFS64_LARGEFILE
-#if defined(F_GETLK64) && F_GETLK64+0!=F_GETLK
+#if defined(F_GETLK64) && F_GETLK64+0 != F_GETLK
 		case F_GETLK64:
 #endif
-			tprintf(", ");
+			tprints(", ");
 			printflock64(tcp, tcp->u_arg[2], 1);
 			break;
 #endif
@@ -424,7 +417,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(flockcmds, tcp->u_arg[1], "LOCK_???");
 	}
 	return 0;
@@ -440,24 +433,15 @@
 	return 0;
 }
 
-int
-sys_dup(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
 static int
 do_dup2(struct tcb *tcp, int flags_arg)
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printfd(tcp, tcp->u_arg[1]);
 		if (flags_arg >= 0) {
-			tprintf(", ");
+			tprints(", ");
 			printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
 		}
 	}
@@ -470,144 +454,146 @@
 	return do_dup2(tcp, -1);
 }
 
-#ifdef LINUX
 int
 sys_dup3(struct tcb *tcp)
 {
 	return do_dup2(tcp, 2);
 }
-#endif
 
-#if defined(ALPHA) || defined(FREEBSD) || defined(SUNOS4)
+#if defined(ALPHA)
 int
 sys_getdtablesize(struct tcb *tcp)
 {
 	return 0;
 }
-#endif /* ALPHA || FREEBSD || SUNOS4 */
+#endif
 
 static int
 decode_select(struct tcb *tcp, long *args, enum bitness_t bitness)
 {
-	int i, j, nfds;
-	unsigned int fdsize = ((((args[0] + 7) / 8) + sizeof(long) - 1)
-			       & -sizeof(long));
+	int i, j;
+	unsigned nfds, fdsize;
 	fd_set *fds;
-	static char outstr[1024];
 	const char *sep;
 	long arg;
 
+	fdsize = args[0];
+	/* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */
+	if (args[0] > 1024*1024)
+		fdsize = 1024*1024;
+	if (args[0] < 0)
+		fdsize = 0;
+	fdsize = (((fdsize + 7) / 8) + sizeof(long)-1) & -sizeof(long);
+
 	if (entering(tcp)) {
-		fds = (fd_set *) malloc(fdsize);
-		if (fds == NULL)
-			fprintf(stderr, "out of memory\n");
+		fds = malloc(fdsize);
+		if (!fds)
+			die_out_of_memory();
 		nfds = args[0];
 		tprintf("%d", nfds);
 		for (i = 0; i < 3; i++) {
 			arg = args[i+1];
 			if (arg == 0) {
-				tprintf(", NULL");
+				tprints(", NULL");
 				continue;
 			}
-			if (fds == NULL || !verbose(tcp)) {
+			if (!verbose(tcp)) {
 				tprintf(", %#lx", arg);
 				continue;
 			}
 			if (umoven(tcp, arg, fdsize, (char *) fds) < 0) {
-				tprintf(", [?]");
+				tprints(", [?]");
 				continue;
 			}
-			tprintf(", [");
+			tprints(", [");
 			for (j = 0, sep = ""; j < nfds; j++) {
 				if (FD_ISSET(j, fds)) {
-					tprintf("%s", sep);
+					tprints(sep);
 					printfd(tcp, j);
 					sep = " ";
 				}
 			}
-			tprintf("]");
+			tprints("]");
 		}
 		free(fds);
-		tprintf(", ");
+		tprints(", ");
 		printtv_bitness(tcp, args[4], bitness, 0);
 	}
-	else
-	{
-		unsigned int cumlen = 0;
-		const char *sep = "";
+	else {
+		static char outstr[1024];
+		char *outptr;
+#define end_outstr (outstr + sizeof(outstr))
+		const char *sep;
 
 		if (syserror(tcp))
 			return 0;
 
-		if ((nfds = tcp->u_rval) == 0) {
+		nfds = tcp->u_rval;
+		if (nfds == 0) {
 			tcp->auxstr = "Timeout";
 			return RVAL_STR;
 		}
 
-		fds = (fd_set *) malloc(fdsize);
-		if (fds == NULL)
-			fprintf(stderr, "out of memory\n");
+		fds = malloc(fdsize);
+		if (!fds)
+			die_out_of_memory();
 
-		outstr[0] = '\0';
+		outptr = outstr;
+		sep = "";
 		for (i = 0; i < 3; i++) {
 			int first = 1;
 
-			tcp->auxstr = outstr;
 			arg = args[i+1];
-			if (fds == NULL || !arg ||
-			    umoven(tcp, arg, fdsize, (char *) fds) < 0)
+			if (!arg || umoven(tcp, arg, fdsize, (char *) fds) < 0)
 				continue;
 			for (j = 0; j < args[0]; j++) {
 				if (FD_ISSET(j, fds)) {
-					char str[11 + 3 * sizeof(int)];
-
-					if (first) {
-						sprintf(str, "%s%s [%u", sep,
-							i == 0 ? "in" :
-							i == 1 ? "out" :
-							"except", j);
-						first = 0;
-						sep = ", ";
+					/* +2 chars needed at the end: ']',NUL */
+					if (outptr < end_outstr - (sizeof(", except [") + sizeof(int)*3 + 2)) {
+						if (first) {
+							outptr += sprintf(outptr, "%s%s [%u",
+								sep,
+								i == 0 ? "in" : i == 1 ? "out" : "except",
+								j
+							);
+							first = 0;
+							sep = ", ";
+						}
+						else {
+							outptr += sprintf(outptr, " %u", j);
+						}
 					}
-					else
-						sprintf(str, " %u", j);
-					cumlen += strlen(str);
-					if (cumlen < sizeof(outstr))
-						strcat(outstr, str);
 					nfds--;
 				}
 			}
-			if (cumlen)
-				strcat(outstr, "]");
+			if (outptr != outstr)
+				*outptr++ = ']';
 			if (nfds == 0)
 				break;
 		}
 		free(fds);
-#ifdef LINUX
 		/* This contains no useful information on SunOS.  */
 		if (args[4]) {
-			char str[128];
-
-			sprintf(str, "%sleft ", sep);
-			sprinttv(tcp, args[4], bitness, str + strlen(str));
-			if ((cumlen += strlen(str)) < sizeof(outstr))
-				strcat(outstr, str);
+			if (outptr < end_outstr - (10 + TIMEVAL_TEXT_BUFSIZE)) {
+				outptr += sprintf(outptr, "%sleft ", sep);
+				outptr = sprinttv(outptr, tcp, args[4], bitness, /*special:*/ 0);
+			}
 		}
-#endif /* LINUX */
+		*outptr = '\0';
+		tcp->auxstr = outstr;
 		return RVAL_STR;
+#undef end_outstr
 	}
 	return 0;
 }
 
-#ifdef LINUX
-
 int
 sys_oldselect(struct tcb *tcp)
 {
 	long args[5];
 
 	if (umoven(tcp, tcp->u_arg[0], sizeof args, (char *) args) < 0) {
-		tprintf("[...]");
+		tprints("[...]");
 		return 0;
 	}
 	return decode_select(tcp, args, BITNESS_CURRENT);
@@ -666,6 +652,9 @@
 #ifdef EPOLLHUP
 	{ EPOLLHUP,	"EPOLLHUP"	},
 #endif
+#ifdef EPOLLRDHUP
+	{ EPOLLRDHUP,	"EPOLLRDHUP"	},
+#endif
 #ifdef EPOLLONESHOT
 	{ EPOLLONESHOT,	"EPOLLONESHOT"	},
 #endif
@@ -675,19 +664,28 @@
 	{ 0,		NULL		}
 };
 
+/* Not aliased to printargs_ld: we want it to have a distinct address */
 int
 sys_epoll_create(struct tcb *tcp)
 {
-	if (entering(tcp))
-		tprintf("%ld", tcp->u_arg[0]);
-	return 0;
+	return printargs_ld(tcp);
 }
 
+static const struct xlat epollflags[] = {
+#ifdef EPOLL_CLOEXEC
+	{ EPOLL_CLOEXEC,	"EPOLL_CLOEXEC"	},
+#endif
+#ifdef EPOLL_NONBLOCK
+	{ EPOLL_NONBLOCK,	"EPOLL_NONBLOCK"	},
+#endif
+	{ 0,		NULL		}
+};
+
 int
 sys_epoll_create1(struct tcb *tcp)
 {
 	if (entering(tcp))
-		printflags(open_mode_flags, tcp->u_arg[0], "O_???");
+		printflags(epollflags, tcp->u_arg[0], "EPOLL_???");
 	return 0;
 }
 
@@ -695,7 +693,7 @@
 static void
 print_epoll_event(struct epoll_event *ev)
 {
-	tprintf("{");
+	tprints("{");
 	printflags(epollevents, ev->events, "EPOLL???");
 	/* We cannot know what format the program uses, so print u32 and u64
 	   which will cover every value.  */
@@ -709,13 +707,13 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???");
-		tprintf(", ");
+		tprints(", ");
 		printfd(tcp, tcp->u_arg[2]);
-		tprintf(", ");
+		tprints(", ");
 		if (tcp->u_arg[3] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else {
 #ifdef HAVE_SYS_EPOLL_H
 			struct epoll_event ev;
@@ -723,7 +721,7 @@
 				print_epoll_event(&ev);
 			else
 #endif
-				tprintf("{...}");
+				tprints("{...}");
 		}
 	}
 	return 0;
@@ -734,39 +732,39 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%lx", tcp->u_arg[1]);
 		else if (tcp->u_rval == 0)
-			tprintf("{}");
+			tprints("{}");
 		else {
 #ifdef HAVE_SYS_EPOLL_H
 			struct epoll_event ev, *start, *cur, *end;
 			int failed = 0;
 
-			tprintf("{");
+			tprints("{");
 			start = (struct epoll_event *) tcp->u_arg[1];
 			end = start + tcp->u_rval;
 			for (cur = start; cur < end; ++cur) {
 				if (cur > start)
-					tprintf(", ");
+					tprints(", ");
 				if (umove(tcp, (long) cur, &ev) == 0)
 					print_epoll_event(&ev);
 				else {
-					tprintf("?");
+					tprints("?");
 					failed = 1;
 					break;
 				}
 			}
-			tprintf("}");
+			tprints("}");
 			if (failed)
 				tprintf(" %#lx", (long) start);
 #else
-			tprintf("{...}");
+			tprints("{...}");
 #endif
 		}
-		tprintf(", %ld, %ld", tcp->u_arg[2], tcp->u_arg[3]);
+		tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]);
 	}
 }
 
@@ -782,7 +780,7 @@
 {
 	epoll_wait_common(tcp);
 	if (exiting(tcp)) {
-		tprintf(", ");
+		tprints(", ");
 		print_sigset(tcp, tcp->u_arg[4], 0);
 	}
 	return 0;
@@ -801,7 +799,7 @@
 			if (umove(tcp, tcp->u_arg[1], &user_id) == 0)
 				tprintf("{%lu}", user_id);
 			else
-				tprintf("{...}");
+				tprints("{...}");
 		}
 	}
 	return 0;
@@ -815,6 +813,56 @@
 	return 0;
 }
 
+#ifdef HAVE_LIBAIO_H
+
+enum iocb_sub {
+	SUB_NONE, SUB_COMMON, SUB_POLL, SUB_VECTOR
+};
+
+static const char *
+iocb_cmd_lookup(unsigned cmd, enum iocb_sub *sub)
+{
+	static char buf[sizeof("%u /* SUB_??? */") + sizeof(int)*3];
+	static const struct {
+		const char *name;
+		enum iocb_sub sub;
+	} cmds[] = {
+		{ "pread", SUB_COMMON },
+		{ "pwrite", SUB_COMMON },
+		{ "fsync", SUB_NONE },
+		{ "fdsync", SUB_NONE },
+		{ "op4", SUB_NONE },
+		{ "poll", SUB_POLL },
+		{ "noop", SUB_NONE },
+		{ "preadv", SUB_VECTOR },
+		{ "pwritev", SUB_VECTOR },
+	};
+
+	if (cmd < ARRAY_SIZE(cmds)) {
+		*sub = cmds[cmd].sub;
+		return cmds[cmd].name;
+	}
+	*sub = SUB_NONE;
+	sprintf(buf, "%u /* SUB_??? */", cmd);
+	return buf;
+}
+
+/* Not defined in libaio.h */
+#ifndef IOCB_RESFD
+# define IOCB_RESFD (1 << 0)
+#endif
+
+static void
+print_common_flags(struct iocb *iocb)
+{
+	if (iocb->u.c.flags & IOCB_RESFD)
+		tprintf("resfd=%d, ", iocb->u.c.resfd);
+	if (iocb->u.c.flags & ~IOCB_RESFD)
+		tprintf("flags=%x, ", iocb->u.c.flags);
+}
+
+#endif /* HAVE_LIBAIO_H */
+
 int
 sys_io_submit(struct tcb *tcp)
 {
@@ -824,33 +872,68 @@
 		nr = tcp->u_arg[1];
 		/* and if nr is negative? */
 		if (nr == 0)
-			tprintf("{}");
+			tprints("{}");
 		else {
 #ifdef HAVE_LIBAIO_H
 			long i;
 			struct iocb *iocbp, **iocbs = (void *)tcp->u_arg[2];
 
 			for (i = 0; i < nr; i++, iocbs++) {
+				enum iocb_sub sub;
 				struct iocb iocb;
 				if (i == 0)
-					tprintf("{");
+					tprints("{");
 				else
-					tprintf(", ");
+					tprints(", ");
 
 				if (umove(tcp, (unsigned long)iocbs, &iocbp) ||
 				    umove(tcp, (unsigned long)iocbp, &iocb)) {
-					tprintf("{...}");
+					tprints("{...}");
 					continue;
 				}
-				tprintf("{%p, %u, %hu, %hu, %d}",
-					iocb.data, iocb.key,
-					iocb.aio_lio_opcode,
-					iocb.aio_reqprio, iocb.aio_fildes);
+				tprints("{");
+				if (iocb.data)
+					tprintf("data:%p, ", iocb.data);
+				if (iocb.key)
+					tprintf("key:%u, ", iocb.key);
+				tprintf("%s, ", iocb_cmd_lookup(iocb.aio_lio_opcode, &sub));
+				if (iocb.aio_reqprio)
+					tprintf("reqprio:%d, ", iocb.aio_reqprio);
+				tprintf("filedes:%d", iocb.aio_fildes);
+				switch (sub) {
+				case SUB_COMMON:
+					if (iocb.aio_lio_opcode == IO_CMD_PWRITE) {
+						tprints(", str:");
+						printstr(tcp, (unsigned long)iocb.u.c.buf,
+							 iocb.u.c.nbytes);
+					} else {
+						tprintf(", buf:%p", iocb.u.c.buf);
+					}
+					tprintf(", nbytes:%lu, offset:%llx",
+						iocb.u.c.nbytes,
+						iocb.u.c.offset);
+					print_common_flags(&iocb);
+					break;
+				case SUB_VECTOR:
+					tprintf(", %llx, ", iocb.u.v.offset);
+					print_common_flags(&iocb);
+					tprint_iov(tcp, iocb.u.v.nr,
+						   (unsigned long)iocb.u.v.vec,
+						   iocb.aio_lio_opcode == IO_CMD_PWRITEV);
+					break;
+				case SUB_POLL:
+					tprintf(", %x", iocb.u.poll.events);
+					break;
+				case SUB_NONE:
+				        break;
+				}
+				tprints("}");
 			}
 			if (i)
-				tprintf("}");
+				tprints("}");
 #else
-			tprintf("{...}");
+#warning "libaio-devel is not available => no io_submit decoding"
+			tprintf("%#lx", tcp->u_arg[2]);
 #endif
 		}
 	}
@@ -867,16 +950,16 @@
 		tprintf("%lu, ", tcp->u_arg[0]);
 #ifdef HAVE_LIBAIO_H
 		if (umove(tcp, tcp->u_arg[1], &iocb) == 0) {
-			tprintf("{%p, %u, %hu, %hu, %d}, ",
+			tprintf("{%p, %u, %u, %u, %d}, ",
 				iocb.data, iocb.key,
-				iocb.aio_lio_opcode,
-				iocb.aio_reqprio, iocb.aio_fildes);
+				(unsigned)iocb.aio_lio_opcode,
+				(unsigned)iocb.aio_reqprio, iocb.aio_fildes);
 		} else
 #endif
-			tprintf("{...}, ");
+			tprints("{...}, ");
 	} else {
 		if (tcp->u_rval < 0)
-			tprintf("{...}");
+			tprints("{...}");
 		else {
 #ifdef HAVE_LIBAIO_H
 			struct io_event event;
@@ -886,7 +969,7 @@
 					event.res, event.res2);
 			else
 #endif
-				tprintf("{...}");
+				tprints("{...}");
 		}
 	}
 	return 0;
@@ -900,8 +983,8 @@
 			tcp->u_arg[2]);
 	} else {
 		if (tcp->u_rval == 0) {
-			tprintf("{}");
-		} else  {
+			tprints("{}");
+		} else {
 #ifdef HAVE_LIBAIO_H
 			struct io_event *events = (void *)tcp->u_arg[3];
 			long i, nr = tcp->u_rval;
@@ -910,20 +993,20 @@
 				struct io_event event;
 
 				if (i == 0)
-					tprintf("{");
+					tprints("{");
 				else
-					tprintf(", ");
+					tprints(", ");
 
 				if (umove(tcp, (unsigned long)events, &event) != 0) {
-					tprintf("{...}");
+					tprints("{...}");
 					continue;
 				}
 				tprintf("{%p, %p, %ld, %ld}", event.data,
 					event.obj, event.res, event.res2);
 			}
-			tprintf("}, ");
+			tprints("}, ");
 #else
-				tprintf("{...}");
+			tprints("{...}");
 #endif
 		}
 
@@ -931,7 +1014,6 @@
 	}
 	return 0;
 }
-#endif /* LINUX */
 
 int
 sys_select(struct tcb *tcp)
@@ -939,7 +1021,6 @@
 	return decode_select(tcp, tcp->u_arg, BITNESS_CURRENT);
 }
 
-#ifdef LINUX
 int
 sys_pselect6(struct tcb *tcp)
 {
@@ -952,7 +1033,7 @@
 		if (umove(tcp, tcp->u_arg[5], &data) < 0)
 			tprintf(", %#lx", tcp->u_arg[5]);
 		else {
-			tprintf(", {");
+			tprints(", {");
 			if (data.len < sizeof(long))
 				tprintf("%#lx", (long)data.ss);
 			else
@@ -969,7 +1050,7 @@
 	if (entering(tcp)) {
 		tprintf("%lu", tcp->u_arg[0]);
 		if (flags_arg >= 0) {
-			tprintf(", ");
+			tprints(", ");
 			printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
 		}
 	}
@@ -987,4 +1068,3 @@
 {
 	return do_eventfd(tcp, 1);
 }
-#endif
diff --git a/file.c b/file.c
index 80838d5..6ef9ac6 100644
--- a/file.c
+++ b/file.c
@@ -26,30 +26,13 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <dirent.h>
-
-#ifdef LINUX
-struct kernel_dirent {
-	unsigned long   d_ino;
-	unsigned long   d_off;
-	unsigned short  d_reclen;
-	char            d_name[1];
-};
-#else
-# define kernel_dirent dirent
-#endif
+#include <sys/swap.h>
 
 #ifdef HAVE_ANDROID_OS
-#include <linux/fadvise.h>
-
-// ANDROID: From linux/dirent.h
-
 struct dirent64 {
  __u64 d_ino;
  __s64 d_off;
@@ -57,11 +40,9 @@
  unsigned char d_type;
  char d_name[256];
 };
-
 #endif /* HAVE_ANDROID_OS */
 
-#ifdef LINUX
-#  ifdef LINUXSPARC
+#ifdef LINUXSPARC
 struct stat {
 	unsigned short	st_dev;
 	unsigned int	st_ino;
@@ -81,7 +62,7 @@
 	int		st_blocks;
 	unsigned int	__unused4[2];
 };
-#if defined(SPARC64)
+# if defined(SPARC64)
 struct stat_sparc64 {
 	unsigned int	st_dev;
 	unsigned long	st_ino;
@@ -98,131 +79,151 @@
 	long		st_blocks;
 	unsigned long	__unused4[2];
 };
-#endif /* SPARC64 */
-#    define stat kernel_stat
-#    include <asm/stat.h>
-#    undef stat
-#  else
-#    undef dev_t
-#    undef ino_t
-#    undef mode_t
-#    undef nlink_t
-#    undef uid_t
-#    undef gid_t
-#    undef off_t
-#    undef loff_t
+# endif /* SPARC64 */
+# define stat kernel_stat
+# include <asm/stat.h>
+# undef stat
+#elif defined(X32)
+struct stat {
+	unsigned long long	st_dev;
+	unsigned long long	st_ino;
+	unsigned long long	st_nlink;
 
-#    define dev_t __kernel_dev_t
-#    define ino_t __kernel_ino_t
-#    define mode_t __kernel_mode_t
-#    define nlink_t __kernel_nlink_t
-#    define uid_t __kernel_uid_t
-#    define gid_t __kernel_gid_t
-#    define off_t __kernel_off_t
-#    define loff_t __kernel_loff_t
+	unsigned int		st_mode;
+	unsigned int		st_uid;
+	unsigned int		st_gid;
+	unsigned int		__pad0;
+	unsigned long long	st_rdev;
+	long long		st_size;
+	long long		st_blksize;
+	long long		st_blocks;
 
-#    include <asm/stat.h>
+	unsigned long long	st_atime;
+	unsigned long long	st_atime_nsec;
+	unsigned long long	st_mtime;
+	unsigned long long	st_mtime_nsec;
+	unsigned long long	st_ctime;
+	unsigned long long	st_ctime_nsec;
+	long long		__unused[3];
+};
 
-#    undef dev_t
-#    undef ino_t
-#    undef mode_t
-#    undef nlink_t
-#    undef uid_t
-#    undef gid_t
-#    undef off_t
-#    undef loff_t
-
-#    define dev_t dev_t
-#    define ino_t ino_t
-#    define mode_t mode_t
-#    define nlink_t nlink_t
-#    define uid_t uid_t
-#    define gid_t gid_t
-#    define off_t off_t
-#    define loff_t loff_t
-#  endif
-#  ifdef HPPA	/* asm-parisc/stat.h defines stat64 */
-#    undef stat64
-#  endif
-#  define stat libc_stat
-#  define stat64 libc_stat64
-#  include <sys/stat.h>
-#  undef stat
-#  undef stat64
-   /* These might be macros. */
-#  undef st_atime
-#  undef st_mtime
-#  undef st_ctime
-#  ifdef HPPA
-#    define stat64 hpux_stat64
-#  endif
+struct stat64 {
+	unsigned long long	st_dev;
+	unsigned char		__pad0[4];
+	unsigned long		__st_ino;
+	unsigned int		st_mode;
+	unsigned int		st_nlink;
+	unsigned long		st_uid;
+	unsigned long		st_gid;
+	unsigned long long	st_rdev;
+	unsigned char		__pad3[4];
+	long long		st_size;
+	unsigned long		st_blksize;
+	unsigned long long	st_blocks;
+	unsigned long		st_atime;
+	unsigned long		st_atime_nsec;
+	unsigned long		st_mtime;
+	unsigned int		st_mtime_nsec;
+	unsigned long		st_ctime;
+	unsigned long		st_ctime_nsec;
+	unsigned long long	st_ino;
+};
 #else
-#  include <sys/stat.h>
+# undef dev_t
+# undef ino_t
+# undef mode_t
+# undef nlink_t
+# undef uid_t
+# undef gid_t
+# undef off_t
+# undef loff_t
+# define dev_t __kernel_dev_t
+# define ino_t __kernel_ino_t
+# define mode_t __kernel_mode_t
+# define nlink_t __kernel_nlink_t
+# define uid_t __kernel_uid_t
+# define gid_t __kernel_gid_t
+# define off_t __kernel_off_t
+# define loff_t __kernel_loff_t
+
+# include <asm/stat.h>
+
+# undef dev_t
+# undef ino_t
+# undef mode_t
+# undef nlink_t
+# undef uid_t
+# undef gid_t
+# undef off_t
+# undef loff_t
+# define dev_t dev_t
+# define ino_t ino_t
+# define mode_t mode_t
+# define nlink_t nlink_t
+# define uid_t uid_t
+# define gid_t gid_t
+# define off_t off_t
+# define loff_t loff_t
+#endif
+
+#ifdef HPPA	/* asm-parisc/stat.h defines stat64 */
+# undef stat64
+#endif
+#define stat libc_stat
+#define stat64 libc_stat64
+#include <sys/stat.h>
+#undef stat
+#undef stat64
+/* These might be macros. */
+#undef st_atime
+#undef st_mtime
+#undef st_ctime
+#ifdef HPPA
+# define stat64 hpux_stat64
 #endif
 
 #include <fcntl.h>
-
-#ifdef SVR4
-#  include <sys/cred.h>
-#endif /* SVR4 */
-
 #ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
+# 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>
-#include <sys/stat.h>
-#endif
-
-#if _LFS64_LARGEFILE && (defined(LINUX) || defined(SVR4))
-# ifdef HAVE_INTTYPES_H
-#  include <inttypes.h>
-# else
-#  define PRId64 "lld"
-#  define PRIu64 "llu"
-# endif
+# include <linux/xattr.h>
+#else
+# define XATTR_CREATE 1
+# define XATTR_REPLACE 2
 #endif
 
 #if HAVE_LONG_LONG_OFF_T
 /*
  * Ugly hacks for systems that have typedef long long off_t
  */
-
-#define stat64 stat
-#define HAVE_STAT64 1	/* Ugly hack */
-
-#define	sys_stat64	sys_stat
-#define sys_fstat64	sys_fstat
-#define sys_lstat64	sys_lstat
-#define sys_lseek64	sys_lseek
-#define sys_truncate64	sys_truncate
-#define sys_ftruncate64	sys_ftruncate
+# define stat64 stat
+# define HAVE_STAT64 1	/* Ugly hack */
+# define sys_stat64	sys_stat
+# define sys_fstat64	sys_fstat
+# define sys_lstat64	sys_lstat
+# define sys_truncate64	sys_truncate
+# define sys_ftruncate64	sys_ftruncate
 #endif
 
 #ifdef MAJOR_IN_SYSMACROS
-#include <sys/sysmacros.h>
+# include <sys/sysmacros.h>
 #endif
 
 #ifdef MAJOR_IN_MKDEV
-#include <sys/mkdev.h>
+# include <sys/mkdev.h>
 #endif
 
 #ifdef HAVE_SYS_ASYNCH_H
-#include <sys/asynch.h>
+# include <sys/asynch.h>
 #endif
 
-#ifdef SUNOS4
-#include <ustat.h>
-#endif
+struct kernel_dirent {
+	unsigned long   d_ino;
+	unsigned long   d_off;
+	unsigned short  d_reclen;
+	char            d_name[1];
+};
 
 const struct xlat open_access_modes[] = {
 	{ O_RDONLY,	"O_RDONLY"	},
@@ -272,22 +273,21 @@
 #  endif
 # endif
 # ifdef O_LARGEFILE
-	{ O_LARGEFILE,	"O_LARGEFILE"   },
+	{ O_LARGEFILE,	"O_LARGEFILE"	},
 # endif
 #endif
 #ifdef O_DIRECTORY
-	{ O_DIRECTORY,	"O_DIRECTORY"   },
+	{ O_DIRECTORY,	"O_DIRECTORY"	},
 #endif
 #ifdef O_NOFOLLOW
-	{ O_NOFOLLOW, 	"O_NOFOLLOW"	},
+	{ O_NOFOLLOW,	"O_NOFOLLOW"	},
 #endif
 #ifdef O_NOATIME
-	{ O_NOATIME, 	"O_NOATIME"	},
+	{ O_NOATIME,	"O_NOATIME"	},
 #endif
 #ifdef O_CLOEXEC
 	{ O_CLOEXEC,	"O_CLOEXEC"	},
 #endif
-
 #ifdef FNDELAY
 	{ FNDELAY,	"FNDELAY"	},
 #endif
@@ -336,8 +336,6 @@
 	{ 0,		NULL		},
 };
 
-#ifdef LINUX
-
 #ifndef AT_FDCWD
 # define AT_FDCWD                -100
 #endif
@@ -349,25 +347,12 @@
 print_dirfd(struct tcb *tcp, int fd)
 {
 	if (fd == AT_FDCWD)
-		tprintf("AT_FDCWD, ");
-	else
-	{
+		tprints("AT_FDCWD, ");
+	else {
 		printfd(tcp, fd);
-		tprintf(", ");
+		tprints(", ");
 	}
 }
-#endif
-
-/*
- * Pity stpcpy() is not standardized...
- */
-static char *
-str_append(char *dst, const char *src)
-{
-	while ((*dst = *src++) != '\0')
-		dst++;
-	return dst;
-}
 
 /*
  * low bits of the open(2) flags define access mode,
@@ -376,16 +361,18 @@
 const char *
 sprint_open_modes(mode_t flags)
 {
-	static char outstr[1024];
+	static char outstr[(1 + ARRAY_SIZE(open_mode_flags)) * sizeof("O_LARGEFILE")];
 	char *p;
-	char sep = 0;
+	char sep;
 	const char *str;
 	const struct xlat *x;
 
-	p = str_append(outstr, "flags ");
+	sep = ' ';
+	p = stpcpy(outstr, "flags");
 	str = xlookup(open_access_modes, flags & 3);
 	if (str) {
-		p = str_append(p, str);
+		*p++ = sep;
+		p = stpcpy(p, str);
 		flags &= ~3;
 		if (!flags)
 			return outstr;
@@ -394,9 +381,8 @@
 
 	for (x = open_mode_flags; x->str; x++) {
 		if ((flags & x->val) == x->val) {
-			if (sep)
-				*p++ = sep;
-			p = str_append(p, x->str);
+			*p++ = sep;
+			p = stpcpy(p, x->str);
 			flags &= ~x->val;
 			if (!flags)
 				return outstr;
@@ -404,8 +390,7 @@
 		}
 	}
 	/* flags is still nonzero */
-	if (sep)
-		*p++ = sep;
+	*p++ = sep;
 	sprintf(p, "%#x", flags);
 	return outstr;
 }
@@ -413,7 +398,7 @@
 void
 tprint_open_modes(mode_t flags)
 {
-	tprintf("%s", sprint_open_modes(flags) + sizeof("flags"));
+	tprints(sprint_open_modes(flags) + sizeof("flags"));
 }
 
 static int
@@ -421,7 +406,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[offset]);
-		tprintf(", ");
+		tprints(", ");
 		/* flags */
 		tprint_open_modes(tcp->u_arg[offset + 1]);
 		if (tcp->u_arg[offset + 1] & O_CREAT) {
@@ -438,7 +423,6 @@
 	return decode_open(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_openat(struct tcb *tcp)
 {
@@ -446,7 +430,6 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_open(tcp, 1);
 }
-#endif
 
 #ifdef LINUXSPARC
 static const struct xlat openmodessol[] = {
@@ -472,7 +455,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		/* flags */
 		printflags(openmodessol, tcp->u_arg[1] + 1, "O_???");
 		if (tcp->u_arg[1] & 0x100) {
@@ -514,7 +497,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[offset]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(access_flags, tcp->u_arg[offset + 1], "?_OK");
 	}
 	return 0;
@@ -526,7 +509,6 @@
 	return decode_access(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_faccessat(struct tcb *tcp)
 {
@@ -534,7 +516,6 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_access(tcp, 1);
 }
-#endif
 
 int
 sys_umask(struct tcb *tcp)
@@ -552,8 +533,7 @@
 	{ 0,		NULL		},
 };
 
-#ifndef HAVE_LONG_LONG_OFF_T
-#if defined (LINUX_MIPSN32)
+#if defined(LINUX_MIPSN32) || defined(X32)
 int
 sys_lseek(struct tcb *tcp)
 {
@@ -562,7 +542,7 @@
 
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		offset = tcp->ext_arg[1];
 		_whence = tcp->u_arg[2];
 		if (_whence == SEEK_SET)
@@ -571,18 +551,19 @@
 			tprintf("%lld, ", offset);
 		printxval(whence, _whence, "SEEK_???");
 	}
-	return RVAL_UDECIMAL;
+	return RVAL_LUDECIMAL;
 }
-#else /* !LINUX_MIPSN32 */
+
+# if defined(X32)
 int
-sys_lseek(struct tcb *tcp)
+sys_lseek32(struct tcb *tcp)
 {
-	off_t offset;
+	long offset;
 	int _whence;
 
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		offset = tcp->u_arg[1];
 		_whence = tcp->u_arg[2];
 		if (_whence == SEEK_SET)
@@ -593,10 +574,29 @@
 	}
 	return RVAL_UDECIMAL;
 }
-#endif /* LINUX_MIPSN32 */
+# endif
+#else
+int
+sys_lseek(struct tcb *tcp)
+{
+	off_t offset;
+	int _whence;
+
+	if (entering(tcp)) {
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		offset = tcp->u_arg[1];
+		_whence = tcp->u_arg[2];
+		if (_whence == SEEK_SET)
+			tprintf("%lu, ", offset);
+		else
+			tprintf("%ld, ", offset);
+		printxval(whence, _whence, "SEEK_???");
+	}
+	return RVAL_UDECIMAL;
+}
 #endif
 
-#ifdef LINUX
 int
 sys_llseek(struct tcb *tcp)
 {
@@ -633,31 +633,12 @@
 	if (entering(tcp)) {
 		int argn;
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		argn = printllval(tcp, "%lld", 1);
 		tprintf(", %ld", tcp->u_arg[argn]);
 	}
 	return 0;
 }
-#endif
-
-#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
-int
-sys_lseek64(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		int argn;
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		if (tcp->u_arg[3] == SEEK_SET)
-			argn = printllval(tcp, "%llu, ", 1);
-		else
-			argn = printllval(tcp, "%lld, ", 1);
-		printxval(whence, tcp->u_arg[argn], "SEEK_???");
-	}
-	return RVAL_LUDECIMAL;
-}
-#endif
 
 #ifndef HAVE_LONG_LONG_OFF_T
 int
@@ -701,7 +682,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printllval(tcp, "%llu", 1);
 	}
 	return 0;
@@ -724,7 +705,9 @@
 static const char *
 sprintmode(int mode)
 {
-	static char buf[64];
+	static char buf[sizeof("S_IFSOCK|S_ISUID|S_ISGID|S_ISVTX|%o")
+			+ sizeof(int)*3
+			+ /*paranoia:*/ 8];
 	const char *s;
 
 	if ((mode & S_IFMT) == 0)
@@ -733,13 +716,13 @@
 		sprintf(buf, "%#o", mode);
 		return buf;
 	}
-	sprintf(buf, "%s%s%s%s", s,
+	s = buf + sprintf(buf, "%s%s%s%s", s,
 		(mode & S_ISUID) ? "|S_ISUID" : "",
 		(mode & S_ISGID) ? "|S_ISGID" : "",
 		(mode & S_ISVTX) ? "|S_ISVTX" : "");
 	mode &= ~(S_IFMT|S_ISUID|S_ISGID|S_ISVTX);
 	if (mode)
-		sprintf(buf + strlen(buf), "|%#o", mode);
+		sprintf((char*)s, "|%#o", mode);
 	s = (*buf == '|') ? buf + 1 : buf;
 	return *s ? s : "0";
 }
@@ -748,13 +731,14 @@
 sprinttime(time_t t)
 {
 	struct tm *tmp;
-	static char buf[32];
+	static char buf[sizeof("yyyy/mm/dd-hh:mm:ss")];
 
 	if (t == 0) {
 		strcpy(buf, "0");
 		return buf;
 	}
-	if ((tmp = localtime(&t)))
+	tmp = localtime(&t);
+	if (tmp)
 		snprintf(buf, sizeof buf, "%02d/%02d/%02d-%02d:%02d:%02d",
 			tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday,
 			tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
@@ -797,7 +781,7 @@
 	struct solstat statbuf;
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 	if (!abbrev(tcp)) {
@@ -831,17 +815,17 @@
 		tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime.tv_sec));
 	}
 	else
-		tprintf("...}");
+		tprints("...}");
 }
 
-#if defined (SPARC64)
+#if defined(SPARC64)
 static void
 printstat_sparc64(struct tcb *tcp, long addr)
 {
 	struct stat_sparc64 statbuf;
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
@@ -875,16 +859,15 @@
 	if (!abbrev(tcp)) {
 		tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
 		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
-		tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
-		tprintf("}");
+		tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
 	}
 	else
-		tprintf("...}");
+		tprints("...}");
 }
 #endif /* SPARC64 */
 #endif /* LINUXSPARC */
 
-#if defined LINUX && defined POWERPC64
+#if defined POWERPC64
 struct stat_powerpc32 {
 	unsigned int	st_dev;
 	unsigned int	st_ino;
@@ -912,7 +895,7 @@
 	struct stat_powerpc32 statbuf;
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
@@ -941,59 +924,17 @@
 	if (!abbrev(tcp)) {
 		tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
 		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
-		tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
-		tprintf("}");
+		tprintf("st_ctime=%s}", sprinttime(statbuf.st_ctime));
 	}
 	else
-		tprintf("...}");
+		tprints("...}");
 }
-#endif /* LINUX && POWERPC64 */
+#endif /* POWERPC64 */
 
 static const struct xlat fileflags[] = {
-#ifdef FREEBSD
-	{ UF_NODUMP,	"UF_NODUMP"	},
-	{ UF_IMMUTABLE,	"UF_IMMUTABLE"	},
-	{ UF_APPEND,	"UF_APPEND"	},
-	{ UF_OPAQUE,	"UF_OPAQUE"	},
-	{ UF_NOUNLINK,	"UF_NOUNLINK"	},
-	{ SF_ARCHIVED,	"SF_ARCHIVED"	},
-	{ SF_IMMUTABLE,	"SF_IMMUTABLE"	},
-	{ SF_APPEND,	"SF_APPEND"	},
-	{ SF_NOUNLINK,	"SF_NOUNLINK"	},
-#elif UNIXWARE >= 2
-#ifdef 	_S_ISMLD
-	{ _S_ISMLD, 	"_S_ISMLD"	},
-#endif
-#ifdef 	_S_ISMOUNTED
-	{ _S_ISMOUNTED, "_S_ISMOUNTED"	},
-#endif
-#endif
 	{ 0,		NULL		},
 };
 
-#ifdef FREEBSD
-int
-sys_chflags(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printflags(fileflags, tcp->u_arg[1], "UF_???");
-	}
-	return 0;
-}
-
-int
-sys_fchflags(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		tprintf("%ld, ", tcp->u_arg[0]);
-		printflags(fileflags, tcp->u_arg[1], "UF_???");
-	}
-	return 0;
-}
-#endif
-
 #ifndef HAVE_LONG_LONG_OFF_T
 static void
 realprintstat(struct tcb *tcp, struct stat *statbuf)
@@ -1038,7 +979,7 @@
 		tprintf("st_mtime=%s, ", sprinttime(statbuf->st_mtime));
 		tprintf("st_ctime=%s", sprinttime(statbuf->st_ctime));
 #if HAVE_STRUCT_STAT_ST_FLAGS
-		tprintf(", st_flags=");
+		tprints(", st_flags=");
 		printflags(fileflags, statbuf->st_flags, "UF_???");
 #endif
 #if HAVE_STRUCT_STAT_ST_ACLCNT
@@ -1054,20 +995,19 @@
 #if HAVE_STRUCT_STAT_ST_GEN
 		tprintf(", st_gen=%u", statbuf->st_gen);
 #endif
-		tprintf("}");
+		tprints("}");
 	}
 	else
-		tprintf("...}");
+		tprints("...}");
 }
 
-
 static void
 printstat(struct tcb *tcp, long addr)
 {
 	struct stat statbuf;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
@@ -1088,7 +1028,7 @@
 #endif
 #endif /* LINUXSPARC */
 
-#if defined LINUX && defined POWERPC64
+#if defined POWERPC64
 	if (current_personality == 1) {
 		printstat_powerpc32(tcp, addr);
 		return;
@@ -1096,7 +1036,7 @@
 #endif
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
@@ -1104,7 +1044,7 @@
 }
 #endif	/* !HAVE_LONG_LONG_OFF_T */
 
-#if !defined HAVE_STAT64 && defined LINUX && defined X86_64
+#if !defined HAVE_STAT64 && defined X86_64
 /*
  * Linux x86_64 has unified `struct stat' but its i386 biarch needs
  * `struct stat64'.  Its <asm-i386/stat.h> definition expects 32-bit `long'.
@@ -1147,7 +1087,7 @@
 #endif
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
@@ -1168,15 +1108,15 @@
 # endif
 #endif /* LINUXSPARC */
 
-#if defined LINUX && defined X86_64
-	if (current_personality == 0) {
+#if defined X86_64
+	if (current_personality != 1) {
 		printstat(tcp, addr);
 		return;
 	}
 #endif
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
@@ -1233,7 +1173,7 @@
 		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
 		tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
 #if HAVE_STRUCT_STAT_ST_FLAGS
-		tprintf(", st_flags=");
+		tprints(", st_flags=");
 		printflags(fileflags, statbuf.st_flags, "UF_???");
 #endif
 #if HAVE_STRUCT_STAT_ST_ACLCNT
@@ -1249,14 +1189,14 @@
 #if HAVE_STRUCT_STAT_ST_GEN
 		tprintf(", st_gen=%u", statbuf.st_gen);
 #endif
-		tprintf("}");
+		tprints("}");
 	}
 	else
-		tprintf("...}");
+		tprints("...}");
 }
 #endif /* HAVE_STAT64 */
 
-#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
+#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) && !defined(HAVE_LONG_LONG_OFF_T)
 static void
 convertoldstat(const struct __old_kernel_stat *oldbuf, struct stat *newbuf)
 {
@@ -1275,7 +1215,6 @@
 	newbuf->st_blocks = 0; /* not supported in old_stat */
 }
 
-
 static void
 printoldstat(struct tcb *tcp, long addr)
 {
@@ -1283,7 +1222,7 @@
 	struct stat newstatbuf;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
@@ -1291,22 +1230,22 @@
 		return;
 	}
 
-#ifdef LINUXSPARC
+# ifdef LINUXSPARC
 	if (current_personality == 1) {
 		printstatsol(tcp, addr);
 		return;
 	}
-#endif /* LINUXSPARC */
+# endif
 
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
 	convertoldstat(&statbuf, &newstatbuf);
 	realprintstat(tcp, &newstatbuf);
 }
-#endif /* LINUX && !IA64 && !HPPA && !X86_64 && !S390 && !S390X */
+#endif
 
 #ifndef HAVE_LONG_LONG_OFF_T
 int
@@ -1314,7 +1253,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat(tcp, tcp->u_arg[1]);
 	}
@@ -1328,7 +1267,7 @@
 #ifdef HAVE_STAT64
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat64(tcp, tcp->u_arg[1]);
 	}
@@ -1338,15 +1277,30 @@
 #endif
 }
 
-#ifdef LINUX
-static const struct xlat fstatatflags[] = {
 #ifndef AT_SYMLINK_NOFOLLOW
-# define AT_SYMLINK_NOFOLLOW     0x100
+# define AT_SYMLINK_NOFOLLOW	0x100
 #endif
+#ifndef AT_REMOVEDIR
+# define AT_REMOVEDIR		0x200
+#endif
+#ifndef AT_SYMLINK_FOLLOW
+# define AT_SYMLINK_FOLLOW	0x400
+#endif
+#ifndef AT_NO_AUTOMOUNT
+# define AT_NO_AUTOMOUNT	0x800
+#endif
+#ifndef AT_EMPTY_PATH
+# define AT_EMPTY_PATH		0x1000
+#endif
+
+static const struct xlat at_flags[] = {
 	{ AT_SYMLINK_NOFOLLOW,	"AT_SYMLINK_NOFOLLOW"	},
-	{ 0,			NULL			},
+	{ AT_REMOVEDIR,		"AT_REMOVEDIR"		},
+	{ AT_SYMLINK_FOLLOW,	"AT_SYMLINK_FOLLOW"	},
+	{ AT_NO_AUTOMOUNT,	"AT_NO_AUTOMOUNT"	},
+	{ AT_EMPTY_PATH,	"AT_EMPTY_PATH"		},
+	{ 0,			NULL			}
 };
-#define utimensatflags fstatatflags
 
 int
 sys_newfstatat(struct tcb *tcp)
@@ -1354,7 +1308,7 @@
 	if (entering(tcp)) {
 		print_dirfd(tcp, tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 #ifdef POWERPC64
 		if (current_personality == 0)
@@ -1366,26 +1320,25 @@
 #else
 		printstat(tcp, tcp->u_arg[2]);
 #endif
-		tprintf(", ");
-		printflags(fstatatflags, tcp->u_arg[3], "AT_???");
+		tprints(", ");
+		printflags(at_flags, tcp->u_arg[3], "AT_???");
 	}
 	return 0;
 }
-#endif
 
-#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
+#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) && !defined(HAVE_LONG_LONG_OFF_T)
 int
 sys_oldstat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printoldstat(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
-#endif /* LINUX && HAVE_STRUCT___OLD_KERNEL_STAT */
+#endif
 
 #ifndef HAVE_LONG_LONG_OFF_T
 int
@@ -1393,7 +1346,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat(tcp, tcp->u_arg[1]);
 	}
@@ -1407,7 +1360,7 @@
 #ifdef HAVE_STAT64
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat64(tcp, tcp->u_arg[1]);
 	}
@@ -1417,19 +1370,19 @@
 #endif
 }
 
-#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
+#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) && !defined(HAVE_LONG_LONG_OFF_T)
 int
 sys_oldfstat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printoldstat(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
-#endif /* LINUX && HAVE_STRUCT___OLD_KERNEL_STAT */
+#endif
 
 #ifndef HAVE_LONG_LONG_OFF_T
 int
@@ -1437,7 +1390,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat(tcp, tcp->u_arg[1]);
 	}
@@ -1451,7 +1404,7 @@
 #ifdef HAVE_STAT64
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstat64(tcp, tcp->u_arg[1]);
 	}
@@ -1461,22 +1414,21 @@
 #endif
 }
 
-#if defined(LINUX) && defined(HAVE_STRUCT___OLD_KERNEL_STAT)
+#if defined(HAVE_STRUCT___OLD_KERNEL_STAT) && !defined(HAVE_LONG_LONG_OFF_T)
 int
 sys_oldlstat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printoldstat(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
-#endif /* LINUX && HAVE_STRUCT___OLD_KERNEL_STAT */
+#endif
 
-
-#if defined(SVR4) || defined(LINUXSPARC)
+#if defined(LINUXSPARC)
 
 int
 sys_xstat(struct tcb *tcp)
@@ -1484,13 +1436,13 @@
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
-#ifdef _STAT64_VER
+# ifdef _STAT64_VER
 		if (tcp->u_arg[0] == _STAT64_VER)
-			printstat64 (tcp, tcp->u_arg[2]);
+			printstat64(tcp, tcp->u_arg[2]);
 		else
-#endif
+# endif
 		printstat(tcp, tcp->u_arg[2]);
 	}
 	return 0;
@@ -1502,11 +1454,11 @@
 	if (entering(tcp))
 		tprintf("%ld, %ld, ", tcp->u_arg[0], tcp->u_arg[1]);
 	else {
-#ifdef _STAT64_VER
+# ifdef _STAT64_VER
 		if (tcp->u_arg[0] == _STAT64_VER)
-			printstat64 (tcp, tcp->u_arg[2]);
+			printstat64(tcp, tcp->u_arg[2]);
 		else
-#endif
+# endif
 		printstat(tcp, tcp->u_arg[2]);
 	}
 	return 0;
@@ -1518,13 +1470,13 @@
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
-#ifdef _STAT64_VER
+# ifdef _STAT64_VER
 		if (tcp->u_arg[0] == _STAT64_VER)
-			printstat64 (tcp, tcp->u_arg[2]);
+			printstat64(tcp, tcp->u_arg[2]);
 		else
-#endif
+# endif
 		printstat(tcp, tcp->u_arg[2]);
 	}
 	return 0;
@@ -1541,15 +1493,9 @@
 		tprintf(", %s", sprintmode(mode));
 		switch (mode & S_IFMT) {
 		case S_IFCHR: case S_IFBLK:
-#ifdef LINUXSPARC
 			tprintf(", makedev(%lu, %lu)",
 				(unsigned long) ((tcp->u_arg[3] >> 18) & 0x3fff),
 				(unsigned long) (tcp->u_arg[3] & 0x3ffff));
-#else
-			tprintf(", makedev(%lu, %lu)",
-				(unsigned long) major(tcp->u_arg[3]),
-				(unsigned long) minor(tcp->u_arg[3]));
-#endif
 			break;
 		default:
 			break;
@@ -1558,29 +1504,29 @@
 	return 0;
 }
 
-#ifdef HAVE_SYS_ACL_H
+# ifdef HAVE_SYS_ACL_H
 
-#include <sys/acl.h>
+#  include <sys/acl.h>
 
 static const struct xlat aclcmds[] = {
-#ifdef SETACL
+#  ifdef SETACL
 	{ SETACL,	"SETACL"	},
-#endif
-#ifdef GETACL
+#  endif
+#  ifdef GETACL
 	{ GETACL,	"GETACL"	},
-#endif
-#ifdef GETACLCNT
+#  endif
+#  ifdef GETACLCNT
 	{ GETACLCNT,	"GETACLCNT"	},
-#endif
-#ifdef ACL_GET
+#  endif
+#  ifdef ACL_GET
 	{ ACL_GET,	"ACL_GET"	},
-#endif
-#ifdef ACL_SET
+#  endif
+#  ifdef ACL_SET
 	{ ACL_SET,	"ACL_SET"	},
-#endif
-#ifdef ACL_CNT
+#  endif
+#  ifdef ACL_CNT
 	{ ACL_CNT,	"ACL_CNT"	},
-#endif
+#  endif
 	{ 0,		NULL		},
 };
 
@@ -1589,7 +1535,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printxval(aclcmds, tcp->u_arg[1], "???ACL???");
 		tprintf(", %ld", tcp->u_arg[2]);
 		/*
@@ -1599,12 +1545,11 @@
 		if (tcp->u_arg[3])
 			tprintf(", %#lx", tcp->u_arg[3]);
 		else
-			tprintf(", NULL");
+			tprints(", NULL");
 	}
 	return 0;
 }
 
-
 int
 sys_facl(struct tcb *tcp)
 {
@@ -1619,26 +1564,24 @@
 		if (tcp->u_arg[3])
 			tprintf(", %#lx", tcp->u_arg[3]);
 		else
-			tprintf(", NULL");
+			tprints(", NULL");
 	}
 	return 0;
 }
 
-
 static const struct xlat aclipc[] = {
-#ifdef IPC_SHM
+#  ifdef IPC_SHM
 	{ IPC_SHM,	"IPC_SHM"	},
-#endif
-#ifdef IPC_SEM
+#  endif
+#  ifdef IPC_SEM
 	{ IPC_SEM,	"IPC_SEM"	},
-#endif
-#ifdef IPC_MSG
+#  endif
+#  ifdef IPC_MSG
 	{ IPC_MSG,	"IPC_MSG"	},
-#endif
+#  endif
 	{ 0,		NULL		},
 };
 
-
 int
 sys_aclipc(struct tcb *tcp)
 {
@@ -1654,16 +1597,14 @@
 		if (tcp->u_arg[4])
 			tprintf(", %#lx", tcp->u_arg[4]);
 		else
-			tprintf(", NULL");
+			tprints(", NULL");
 	}
 	return 0;
 }
 
-#endif /* HAVE_SYS_ACL_H */
+# endif /* HAVE_SYS_ACL_H */
 
-#endif /* SVR4 || LINUXSPARC */
-
-#ifdef LINUX
+#endif /* LINUXSPARC */
 
 static const struct xlat fsmagic[] = {
 	{ 0x73757245,	"CODA_SUPER_MAGIC"	},
@@ -1698,15 +1639,10 @@
 	{ 0,		NULL			},
 };
 
-#endif /* LINUX */
-
-#ifndef SVR4
-
 static const char *
 sprintfstype(int magic)
 {
 	static char buf[32];
-#ifdef LINUX
 	const char *s;
 
 	s = xlookup(fsmagic, magic);
@@ -1714,7 +1650,6 @@
 		sprintf(buf, "\"%s\"", s);
 		return buf;
 	}
-#endif /* LINUX */
 	sprintf(buf, "%#x", magic);
 	return buf;
 }
@@ -1729,7 +1664,7 @@
 		return;
 	}
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 #ifdef ALPHA
@@ -1738,7 +1673,7 @@
 		sprintfstype(statbuf.f_type),
 		statbuf.f_bsize, statbuf.f_blocks, statbuf.f_bfree);
 	tprintf("f_bavail=%u, f_files=%u, f_ffree=%u, f_fsid={%d, %d}, f_namelen=%u",
-		statbuf.f_bavail,statbuf.f_files, statbuf.f_ffree,
+		statbuf.f_bavail, statbuf.f_files, statbuf.f_ffree,
 		statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1],
 		statbuf.f_namelen);
 #else /* !ALPHA */
@@ -1752,14 +1687,12 @@
 		(unsigned long)statbuf.f_files,
 		(unsigned long)statbuf.f_ffree,
 		statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]);
-#ifdef LINUX
 	tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen);
-#endif /* LINUX */
 #endif /* !ALPHA */
 #ifdef _STATFS_F_FRSIZE
 	tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize);
 #endif
-	tprintf("}");
+	tprints("}");
 }
 
 int
@@ -1767,7 +1700,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstatfs(tcp, tcp->u_arg[1]);
 	}
@@ -1779,14 +1712,14 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstatfs(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
-#if defined LINUX && defined HAVE_STATFS64
+#if defined HAVE_STATFS64
 static void
 printstatfs64(struct tcb *tcp, long addr)
 {
@@ -1797,7 +1730,7 @@
 		return;
 	}
 	if (umove(tcp, addr, &statbuf) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 	tprintf("{f_type=%s, f_bsize=%llu, f_blocks=%llu, f_bfree=%llu, ",
@@ -1814,7 +1747,57 @@
 #ifdef _STATFS_F_FRSIZE
 	tprintf(", f_frsize=%llu", (unsigned long long)statbuf.f_frsize);
 #endif
-	tprintf("}");
+#ifdef _STATFS_F_FLAGS
+	tprintf(", f_flags=%llu", (unsigned long long)statbuf.f_flags);
+#endif
+	tprints("}");
+}
+
+struct compat_statfs64 {
+	uint32_t f_type;
+	uint32_t f_bsize;
+	uint64_t f_blocks;
+	uint64_t f_bfree;
+	uint64_t f_bavail;
+	uint64_t f_files;
+	uint64_t f_ffree;
+	fsid_t f_fsid;
+	uint32_t f_namelen;
+	uint32_t f_frsize;
+	uint32_t f_flags;
+	uint32_t f_spare[4];
+}
+#if defined(X86_64) || defined(IA64)
+  __attribute__ ((packed, aligned(4)))
+#endif
+;
+
+static void
+printcompat_statfs64(struct tcb *tcp, long addr)
+{
+	struct compat_statfs64 statbuf;
+
+	if (syserror(tcp) || !verbose(tcp)) {
+		tprintf("%#lx", addr);
+		return;
+	}
+	if (umove(tcp, addr, &statbuf) < 0) {
+		tprints("{...}");
+		return;
+	}
+	tprintf("{f_type=%s, f_bsize=%lu, f_blocks=%llu, f_bfree=%llu, ",
+		sprintfstype(statbuf.f_type),
+		(unsigned long)statbuf.f_bsize,
+		(unsigned long long)statbuf.f_blocks,
+		(unsigned long long)statbuf.f_bfree);
+	tprintf("f_bavail=%llu, f_files=%llu, f_ffree=%llu, f_fsid={%d, %d}",
+		(unsigned long long)statbuf.f_bavail,
+		(unsigned long long)statbuf.f_files,
+		(unsigned long long)statbuf.f_ffree,
+		statbuf.f_fsid.__val[0], statbuf.f_fsid.__val[1]);
+	tprintf(", f_namelen=%lu", (unsigned long)statbuf.f_namelen);
+	tprintf(", f_frsize=%lu", (unsigned long)statbuf.f_frsize);
+	tprintf(", f_flags=%lu}", (unsigned long)statbuf.f_frsize);
 }
 
 int
@@ -1824,10 +1807,12 @@
 		printpath(tcp, tcp->u_arg[0]);
 		tprintf(", %lu, ", tcp->u_arg[1]);
 	} else {
-		if (tcp->u_arg[1] == sizeof (struct statfs64))
+		if (tcp->u_arg[1] == sizeof(struct statfs64))
 			printstatfs64(tcp, tcp->u_arg[2]);
+		else if (tcp->u_arg[1] == sizeof(struct compat_statfs64))
+			printcompat_statfs64(tcp, tcp->u_arg[2]);
 		else
-			tprintf("{???}");
+			tprints("{???}");
 	}
 	return 0;
 }
@@ -1839,23 +1824,24 @@
 		printfd(tcp, tcp->u_arg[0]);
 		tprintf(", %lu, ", tcp->u_arg[1]);
 	} else {
-		if (tcp->u_arg[1] == sizeof (struct statfs64))
+		if (tcp->u_arg[1] == sizeof(struct statfs64))
 			printstatfs64(tcp, tcp->u_arg[2]);
+		else if (tcp->u_arg[1] == sizeof(struct compat_statfs64))
+			printcompat_statfs64(tcp, tcp->u_arg[2]);
 		else
-			tprintf("{???}");
+			tprints("{???}");
 	}
 	return 0;
 }
 #endif
 
-#if defined(LINUX) && defined(__alpha)
-
+#if defined(ALPHA)
 int
 osf_statfs(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		printstatfs(tcp, tcp->u_arg[1]);
 		tprintf(", %lu", tcp->u_arg[2]);
@@ -1874,52 +1860,7 @@
 	}
 	return 0;
 }
-#endif /* LINUX && __alpha */
-
-#endif /* !SVR4 */
-
-#ifdef SUNOS4
-int
-sys_ustat(struct tcb *tcp)
-{
-	struct ustat statbuf;
-
-	if (entering(tcp)) {
-		tprintf("makedev(%lu, %lu), ",
-				(long) major(tcp->u_arg[0]),
-				(long) minor(tcp->u_arg[0]));
-	}
-	else {
-		if (syserror(tcp) || !verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umove(tcp, tcp->u_arg[1], &statbuf) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{f_tfree=%lu, f_tinode=%lu, ",
-				statbuf.f_tfree, statbuf.f_tinode);
-			tprintf("f_fname=\"%.*s\", ",
-				(int) sizeof(statbuf.f_fname),
-				statbuf.f_fname);
-			tprintf("f_fpack=\"%.*s\"}",
-				(int) sizeof(statbuf.f_fpack),
-				statbuf.f_fpack);
-		}
-	}
-	return 0;
-}
-#endif /* SUNOS4 */
-
-int
-sys_pivotroot(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
-	}
-	return 0;
-}
-
+#endif
 
 /* directory */
 int
@@ -1947,7 +1888,6 @@
 	return decode_mkdir(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_mkdirat(struct tcb *tcp)
 {
@@ -1955,91 +1895,32 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_mkdir(tcp, 1);
 }
-#endif
-
-int
-sys_rmdir(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-int
-sys_fchdir(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-int
-sys_chroot(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-#if defined(SUNOS4) || defined(SVR4)
-int
-sys_fchroot(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-#endif /* SUNOS4 || SVR4 */
 
 int
 sys_link(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printpath(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
-#ifdef LINUX
 int
 sys_linkat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		print_dirfd(tcp, tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		print_dirfd(tcp, tcp->u_arg[2]);
 		printpath(tcp, tcp->u_arg[3]);
-		tprintf(", ");
-		printfd(tcp, tcp->u_arg[4]);
+		tprints(", ");
+		printflags(at_flags, tcp->u_arg[4], "AT_???");
 	}
 	return 0;
 }
-#endif
-
-int
-sys_unlink(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-#ifdef LINUX
-static const struct xlat unlinkatflags[] = {
-#ifndef AT_REMOVEDIR
-# define AT_REMOVEDIR            0x200
-#endif
-	{ AT_REMOVEDIR,	"AT_REMOVEDIR"	},
-	{ 0,		NULL		},
-};
 
 int
 sys_unlinkat(struct tcb *tcp)
@@ -2047,49 +1928,42 @@
 	if (entering(tcp)) {
 		print_dirfd(tcp, tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
-		printflags(unlinkatflags, tcp->u_arg[2], "AT_???");
-	}
-	return 0;
-}
-#endif
-
-int
-sys_symlink(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
+		tprints(", ");
+		printflags(at_flags, tcp->u_arg[2], "AT_???");
 	}
 	return 0;
 }
 
-#ifdef LINUX
 int
 sys_symlinkat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		print_dirfd(tcp, tcp->u_arg[1]);
 		printpath(tcp, tcp->u_arg[2]);
 	}
 	return 0;
 }
-#endif
 
 static int
 decode_readlink(struct tcb *tcp, int offset)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[offset]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[offset + 1]);
 		else
-			printpathn(tcp, tcp->u_arg[offset + 1], tcp->u_rval);
+			/* Used to use printpathn(), but readlink
+			 * neither includes NUL in the returned count,
+			 * nor actually writes it into memory.
+			 * printpathn() would decide on printing
+			 * "..." continuation based on garbage
+			 * past return buffer's end.
+			 */
+			printstr(tcp, tcp->u_arg[offset + 1], tcp->u_rval);
 		tprintf(", %lu", tcp->u_arg[offset + 2]);
 	}
 	return 0;
@@ -2101,7 +1975,6 @@
 	return decode_readlink(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_readlinkat(struct tcb *tcp)
 {
@@ -2109,33 +1982,19 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_readlink(tcp, 1);
 }
-#endif
 
 int
-sys_rename(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
-	}
-	return 0;
-}
-
-#ifdef LINUX
-int
 sys_renameat(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		print_dirfd(tcp, tcp->u_arg[0]);
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		print_dirfd(tcp, tcp->u_arg[2]);
 		printpath(tcp, tcp->u_arg[3]);
 	}
 	return 0;
 }
-#endif
 
 int
 sys_chown(struct tcb *tcp)
@@ -2148,7 +2007,6 @@
 	return 0;
 }
 
-#ifdef LINUX
 int
 sys_fchownat(struct tcb *tcp)
 {
@@ -2157,12 +2015,11 @@
 		printpath(tcp, tcp->u_arg[1]);
 		printuid(", ", tcp->u_arg[2]);
 		printuid(", ", tcp->u_arg[3]);
-		tprintf(", ");
-		printflags(fstatatflags, tcp->u_arg[4], "AT_???");
+		tprints(", ");
+		printflags(at_flags, tcp->u_arg[4], "AT_???");
 	}
 	return 0;
 }
-#endif
 
 int
 sys_fchown(struct tcb *tcp)
@@ -2191,7 +2048,6 @@
 	return decode_chmod(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_fchmodat(struct tcb *tcp)
 {
@@ -2199,7 +2055,6 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_chmod(tcp, 1);
 }
-#endif
 
 int
 sys_fchmod(struct tcb *tcp)
@@ -2217,7 +2072,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32,  0);
 	}
 	return 0;
@@ -2229,18 +2084,18 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[offset]);
-		tprintf(", ");
+		tprints(", ");
 		if (tcp->u_arg[offset + 1] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else {
-			tprintf("{");
+			tprints("{");
 			printtv_bitness(tcp, tcp->u_arg[offset + 1],
 					BITNESS_CURRENT, special);
-			tprintf(", ");
+			tprints(", ");
 			printtv_bitness(tcp, tcp->u_arg[offset + 1]
-					+ sizeof (struct timeval),
+					+ sizeof(struct timeval),
 					BITNESS_CURRENT, special);
-			tprintf("}");
+			tprints("}");
 		}
 	}
 	return 0;
@@ -2252,7 +2107,6 @@
 	return decode_utimes(tcp, 0, 0);
 }
 
-#ifdef LINUX
 int
 sys_futimesat(struct tcb *tcp)
 {
@@ -2267,12 +2121,11 @@
 	if (entering(tcp)) {
 		print_dirfd(tcp, tcp->u_arg[0]);
 		decode_utimes(tcp, 1, 1);
-		tprintf(", ");
-		printflags(utimensatflags, tcp->u_arg[3], "AT_???");
+		tprints(", ");
+		printflags(at_flags, tcp->u_arg[3], "AT_???");
 	}
 	return 0;
 }
-#endif
 
 int
 sys_utime(struct tcb *tcp)
@@ -2281,25 +2134,22 @@
 		long utl[2];
 		int uti[2];
 	} u;
+	unsigned wordsize = current_wordsize;
 
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		if (!tcp->u_arg[1])
-			tprintf("NULL");
+			tprints("NULL");
 		else if (!verbose(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umoven(tcp, tcp->u_arg[1],
-				2 * personality_wordsize[current_personality],
-				(char *) &u) < 0)
-			tprintf("[?, ?]");
-		else if (personality_wordsize[current_personality]
-			 == sizeof u.utl[0]) {
+		else if (umoven(tcp, tcp->u_arg[1], 2 * wordsize, (char *) &u) < 0)
+			tprints("[?, ?]");
+		else if (wordsize == sizeof u.utl[0]) {
 			tprintf("[%s,", sprinttime(u.utl[0]));
 			tprintf(" %s]", sprinttime(u.utl[1]));
 		}
-		else if (personality_wordsize[current_personality]
-			 == sizeof u.uti[0]) {
+		else if (wordsize == sizeof u.uti[0]) {
 			tprintf("[%s,", sprinttime(u.uti[0]));
 			tprintf(" %s]", sprinttime(u.uti[1]));
 		}
@@ -2318,15 +2168,16 @@
 		printpath(tcp, tcp->u_arg[offset]);
 		tprintf(", %s", sprintmode(mode));
 		switch (mode & S_IFMT) {
-		case S_IFCHR: case S_IFBLK:
+		case S_IFCHR:
+		case S_IFBLK:
 #ifdef LINUXSPARC
 			if (current_personality == 1)
-			tprintf(", makedev(%lu, %lu)",
+				tprintf(", makedev(%lu, %lu)",
 				(unsigned long) ((tcp->u_arg[offset + 2] >> 18) & 0x3fff),
 				(unsigned long) (tcp->u_arg[offset + 2] & 0x3ffff));
 			else
 #endif
-			tprintf(", makedev(%lu, %lu)",
+				tprintf(", makedev(%lu, %lu)",
 				(unsigned long) major(tcp->u_arg[offset + 2]),
 				(unsigned long) minor(tcp->u_arg[offset + 2]));
 			break;
@@ -2343,7 +2194,6 @@
 	return decode_mknod(tcp, 0);
 }
 
-#ifdef LINUX
 int
 sys_mknodat(struct tcb *tcp)
 {
@@ -2351,30 +2201,6 @@
 		print_dirfd(tcp, tcp->u_arg[0]);
 	return decode_mknod(tcp, 1);
 }
-#endif
-
-#ifdef FREEBSD
-int
-sys_mkfifo(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", %#lo", tcp->u_arg[1]);
-	}
-	return 0;
-}
-#endif /* FREEBSD */
-
-int
-sys_fsync(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-#ifdef LINUX
 
 static void
 printdir(struct tcb *tcp, long addr)
@@ -2386,13 +2212,13 @@
 		return;
 	}
 	if (umove(tcp, addr, &d) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 	tprintf("{d_ino=%ld, ", (unsigned long) d.d_ino);
-	tprintf("d_name=");
+	tprints("d_name=");
 	printpathn(tcp, (long) ((struct dirent *) addr)->d_name, d.d_reclen);
-	tprintf("}");
+	tprints("}");
 }
 
 int
@@ -2400,7 +2226,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp) || tcp->u_rval == 0 || !verbose(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -2413,24 +2239,19 @@
 	return 0;
 }
 
-#endif /* LINUX */
-
-#if defined FREEBSD || defined LINUX
 static const struct xlat direnttypes[] = {
-	{ DT_UNKNOWN,	"DT_UNKNOWN" 	},
-	{ DT_FIFO,	"DT_FIFO" 	},
-	{ DT_CHR,	"DT_CHR" 	},
-	{ DT_DIR,	"DT_DIR" 	},
-	{ DT_BLK,	"DT_BLK" 	},
-	{ DT_REG,	"DT_REG" 	},
-	{ DT_LNK,	"DT_LNK" 	},
-	{ DT_SOCK,	"DT_SOCK" 	},
-	{ DT_WHT,	"DT_WHT" 	},
+	{ DT_UNKNOWN,	"DT_UNKNOWN"	},
+	{ DT_FIFO,	"DT_FIFO"	},
+	{ DT_CHR,	"DT_CHR"	},
+	{ DT_DIR,	"DT_DIR"	},
+	{ DT_BLK,	"DT_BLK"	},
+	{ DT_REG,	"DT_REG"	},
+	{ DT_LNK,	"DT_LNK"	},
+	{ DT_SOCK,	"DT_SOCK"	},
+	{ DT_WHT,	"DT_WHT"	},
 	{ 0,		NULL		},
 };
 
-#endif
-
 int
 sys_getdents(struct tcb *tcp)
 {
@@ -2439,7 +2260,7 @@
 
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		return 0;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
@@ -2447,66 +2268,38 @@
 		return 0;
 	}
 	len = tcp->u_rval;
+	/* Beware of insanely large or negative values in tcp->u_rval */
+	if (tcp->u_rval > 1024*1024)
+		len = 1024*1024;
+	if (tcp->u_rval < 0)
+		len = 0;
 	buf = len ? malloc(len) : NULL;
-	if (len && !buf) {
-		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
-		fprintf(stderr, "out of memory\n");
-		return 0;
-	}
+	if (len && !buf)
+		die_out_of_memory();
 	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
 		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		free(buf);
 		return 0;
 	}
 	if (!abbrev(tcp))
-		tprintf("{");
+		tprints("{");
 	for (i = 0; i < len;) {
 		struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
-#ifdef LINUX
 		if (!abbrev(tcp)) {
 			tprintf("%s{d_ino=%lu, d_off=%lu, ",
 				i ? " " : "", d->d_ino, d->d_off);
 			tprintf("d_reclen=%u, d_name=\"%s\"}",
 				d->d_reclen, d->d_name);
 		}
-#endif /* LINUX */
-#ifdef SVR4
-		if (!abbrev(tcp)) {
-			tprintf("%s{d_ino=%lu, d_off=%lu, ",
-				i ? " " : "",
-				(unsigned long) d->d_ino,
-				(unsigned long) d->d_off);
-			tprintf("d_reclen=%u, d_name=\"%s\"}",
-				d->d_reclen, d->d_name);
-		}
-#endif /* SVR4 */
-#ifdef SUNOS4
-		if (!abbrev(tcp)) {
-			tprintf("%s{d_off=%lu, d_fileno=%lu, d_reclen=%u, ",
-				i ? " " : "", d->d_off, d->d_fileno,
-				d->d_reclen);
-			tprintf("d_namlen=%u, d_name=\"%.*s\"}",
-				d->d_namlen, d->d_namlen, d->d_name);
-		}
-#endif /* SUNOS4 */
-#ifdef FREEBSD
-		if (!abbrev(tcp)) {
-			tprintf("%s{d_fileno=%u, d_reclen=%u, d_type=",
-				i ? " " : "", d->d_fileno, d->d_reclen);
-			printxval(direnttypes, d->d_type, "DT_???");
-			tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
-				d->d_namlen, d->d_namlen, d->d_name);
-		}
-#endif /* FREEBSD */
 		if (!d->d_reclen) {
-			tprintf("/* d_reclen == 0, problem here */");
+			tprints("/* d_reclen == 0, problem here */");
 			break;
 		}
 		i += d->d_reclen;
 		dents++;
 	}
 	if (!abbrev(tcp))
-		tprintf("}");
+		tprints("}");
 	else
 		tprintf("/* %u entries */", dents);
 	tprintf(", %lu", tcp->u_arg[2]);
@@ -2514,7 +2307,6 @@
 	return 0;
 }
 
-
 #if _LFS64_LARGEFILE
 int
 sys_getdents64(struct tcb *tcp)
@@ -2524,62 +2316,53 @@
 
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		return 0;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
 		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		return 0;
 	}
+
 	len = tcp->u_rval;
+	/* Beware of insanely large or negative tcp->u_rval */
+	if (tcp->u_rval > 1024*1024)
+		len = 1024*1024;
+	if (tcp->u_rval < 0)
+		len = 0;
 	buf = len ? malloc(len) : NULL;
-	if (len && !buf) {
-		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
-		fprintf(stderr, "out of memory\n");
-		return 0;
-	}
+	if (len && !buf)
+		die_out_of_memory();
+
 	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
 		tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
 		free(buf);
 		return 0;
 	}
 	if (!abbrev(tcp))
-		tprintf("{");
+		tprints("{");
 	for (i = 0; i < len;) {
 		struct dirent64 *d = (struct dirent64 *) &buf[i];
-#if defined(LINUX) || defined(SVR4)
 		if (!abbrev(tcp)) {
 			tprintf("%s{d_ino=%" PRIu64 ", d_off=%" PRId64 ", ",
 				i ? " " : "",
 				d->d_ino,
 				d->d_off);
-#ifdef LINUX
-			tprintf("d_type=");
+			tprints("d_type=");
 			printxval(direnttypes, d->d_type, "DT_???");
-			tprintf(", ");
-#endif
+			tprints(", ");
 			tprintf("d_reclen=%u, d_name=\"%s\"}",
 				d->d_reclen, d->d_name);
 		}
-#endif /* LINUX || SVR4 */
-#ifdef SUNOS4
-		if (!abbrev(tcp)) {
-			tprintf("%s{d_off=%lu, d_fileno=%lu, d_reclen=%u, ",
-				i ? " " : "", d->d_off, d->d_fileno,
-				d->d_reclen);
-			tprintf("d_namlen=%u, d_name=\"%.*s\"}",
-				d->d_namlen, d->d_namlen, d->d_name);
-		}
-#endif /* SUNOS4 */
 		if (!d->d_reclen) {
-			tprintf("/* d_reclen == 0, problem here */");
+			tprints("/* d_reclen == 0, problem here */");
 			break;
 		}
 		i += d->d_reclen;
 		dents++;
 	}
 	if (!abbrev(tcp))
-		tprintf("}");
+		tprints("}");
 	else
 		tprintf("/* %u entries */", dents);
 	tprintf(", %lu", tcp->u_arg[2]);
@@ -2588,67 +2371,6 @@
 }
 #endif
 
-#ifdef FREEBSD
-int
-sys_getdirentries(struct tcb *tcp)
-{
-	int i, len, dents = 0;
-	long basep;
-	char *buf;
-
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		return 0;
-	}
-	if (syserror(tcp) || !verbose(tcp)) {
-		tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
-		return 0;
-	}
-	len = tcp->u_rval;
-	if ((buf = malloc(len)) == NULL) {
-		tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
-		fprintf(stderr, "out of memory\n");
-		return 0;
-	}
-	if (umoven(tcp, tcp->u_arg[1], len, buf) < 0) {
-		tprintf("%#lx, %lu, %#lx", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
-		free(buf);
-		return 0;
-	}
-	if (!abbrev(tcp))
-		tprintf("{");
-	for (i = 0; i < len;) {
-		struct kernel_dirent *d = (struct kernel_dirent *) &buf[i];
-		if (!abbrev(tcp)) {
-			tprintf("%s{d_fileno=%u, d_reclen=%u, d_type=",
-				i ? " " : "", d->d_fileno, d->d_reclen);
-			printxval(direnttypes, d->d_type, "DT_???");
-			tprintf(", d_namlen=%u, d_name=\"%.*s\"}",
-				d->d_namlen, d->d_namlen, d->d_name);
-		}
-		if (!d->d_reclen) {
-			tprintf("/* d_reclen == 0, problem here */");
-			break;
-		}
-		i += d->d_reclen;
-		dents++;
-	}
-	if (!abbrev(tcp))
-		tprintf("}");
-	else
-		tprintf("/* %u entries */", dents);
-	free(buf);
-	tprintf(", %lu", tcp->u_arg[2]);
-	if (umove(tcp, tcp->u_arg[3], &basep) < 0)
-		tprintf(", %#lx", tcp->u_arg[3]);
-	else
-		tprintf(", [%lu]", basep);
-	return 0;
-}
-#endif
-
-#ifdef LINUX
 int
 sys_getcwd(struct tcb *tcp)
 {
@@ -2661,22 +2383,6 @@
 	}
 	return 0;
 }
-#endif /* LINUX */
-
-#ifdef FREEBSD
-int
-sys___getcwd(struct tcb *tcp)
-{
-	if (exiting(tcp)) {
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else
-			printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
-		tprintf(", %lu", tcp->u_arg[1]);
-	}
-	return 0;
-}
-#endif
 
 #ifdef HAVE_SYS_ASYNCH_H
 
@@ -2717,7 +2423,7 @@
 	}
 	else {
 		if (tcp->u_arg[5] == 0)
-			tprintf(", NULL");
+			tprints(", NULL");
 		else if (syserror(tcp)
 		    || umove(tcp, tcp->u_arg[5], &res) < 0)
 			tprintf(", %#lx", tcp->u_arg[5]);
@@ -2743,7 +2449,7 @@
 
 	if (exiting(tcp)) {
 		if (tcp->u_arg[0] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp)
 		    || umove(tcp, tcp->u_arg[0], &res) < 0)
 			tprintf("%#lx", tcp->u_arg[0]);
@@ -2809,10 +2515,10 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 		print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
 	}
 	return 0;
@@ -2823,10 +2529,10 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 		print_xattr_val(tcp, 0, tcp->u_arg[2], tcp->u_arg[3], tcp->u_arg[3]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(xattrflags, tcp->u_arg[4], "XATTR_???");
 	}
 	return 0;
@@ -2837,7 +2543,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 	} else {
 		print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
@@ -2851,7 +2557,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 	} else {
 		print_xattr_val(tcp, syserror(tcp), tcp->u_arg[2], tcp->u_arg[3],
@@ -2860,14 +2566,31 @@
 	return 0;
 }
 
+static void
+print_xattr_list(struct tcb *tcp, unsigned long addr, unsigned long size)
+{
+	if (syserror(tcp)) {
+		tprintf("%#lx", addr);
+	} else {
+		if (!addr) {
+			tprints("NULL");
+		} else {
+			unsigned long len =
+				(size < tcp->u_rval) ? size : tcp->u_rval;
+			printstr(tcp, addr, len);
+		}
+	}
+	tprintf(", %lu", size);
+}
+
 int
 sys_listxattr(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
+		tprints(", ");
 	} else {
-		/* XXX Print value in format */
-		tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+		print_xattr_list(tcp, tcp->u_arg[1], tcp->u_arg[2]);
 	}
 	return 0;
 }
@@ -2877,9 +2600,9 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
 	} else {
-		/* XXX Print value in format */
-		tprintf(", %p, %lu", (void *) tcp->u_arg[1], tcp->u_arg[2]);
+		print_xattr_list(tcp, tcp->u_arg[1], tcp->u_arg[2]);
 	}
 	return 0;
 }
@@ -2889,7 +2612,7 @@
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 	}
 	return 0;
@@ -2900,40 +2623,35 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
 	}
 	return 0;
 }
 
-
 static const struct xlat advise[] = {
-  { POSIX_FADV_NORMAL,		"POSIX_FADV_NORMAL"	},
-  { POSIX_FADV_RANDOM,		"POSIX_FADV_RANDOM"	},
-  { POSIX_FADV_SEQUENTIAL,	"POSIX_FADV_SEQUENTIAL"	},
-  { POSIX_FADV_WILLNEED,	"POSIX_FADV_WILLNEED"	},
-  { POSIX_FADV_DONTNEED,	"POSIX_FADV_DONTNEED"	},
-  { POSIX_FADV_NOREUSE,		"POSIX_FADV_NOREUSE"	},
-  { 0,				NULL			}
+	{ POSIX_FADV_NORMAL,		"POSIX_FADV_NORMAL"	},
+	{ POSIX_FADV_RANDOM,		"POSIX_FADV_RANDOM"	},
+	{ POSIX_FADV_SEQUENTIAL,	"POSIX_FADV_SEQUENTIAL"	},
+	{ POSIX_FADV_WILLNEED,		"POSIX_FADV_WILLNEED"	},
+	{ POSIX_FADV_DONTNEED,		"POSIX_FADV_DONTNEED"	},
+	{ POSIX_FADV_NOREUSE,		"POSIX_FADV_NOREUSE"	},
+	{ 0,				NULL			}
 };
 
-
-#ifdef LINUX
 int
 sys_fadvise64(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		int argn;
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		argn = printllval(tcp, "%lld", 1);
 		tprintf(", %ld, ", tcp->u_arg[argn++]);
 		printxval(advise, tcp->u_arg[argn], "POSIX_FADV_???");
 	}
 	return 0;
 }
-#endif
-
 
 int
 sys_fadvise64_64(struct tcb *tcp)
@@ -2941,7 +2659,7 @@
 	if (entering(tcp)) {
 		int argn;
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 #if defined ARM || defined POWERPC
 		argn = printllval(tcp, "%lld, ", 2);
 #else
@@ -2957,7 +2675,6 @@
 	return 0;
 }
 
-#ifdef LINUX
 static const struct xlat inotify_modes[] = {
 	{ 0x00000001,	"IN_ACCESS"	},
 	{ 0x00000002,	"IN_MODIFY"	},
@@ -2984,8 +2701,8 @@
 
 static const struct xlat inotify_init_flags[] = {
 	{ 0x00000800,	"IN_NONBLOCK"	},
-	{ 0x00080000,	"IN_CLOEXEC" 	},
-	{ 0,		NULL 		}
+	{ 0x00080000,	"IN_CLOEXEC"	},
+	{ 0,		NULL		}
 };
 
 int
@@ -2993,9 +2710,9 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(inotify_modes, tcp->u_arg[2], "IN_???");
 	}
 	return 0;
@@ -3006,7 +2723,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", %ld", tcp->u_arg[1]);
+		tprintf(", %d", (int) tcp->u_arg[1]);
 	}
 	return 0;
 }
@@ -3025,11 +2742,122 @@
 	if (entering(tcp)) {
 		int argn;
 		printfd(tcp, tcp->u_arg[0]);		/* fd */
-		tprintf(", ");
+		tprints(", ");
 		tprintf("%#lo, ", tcp->u_arg[1]);	/* mode */
 		argn = printllval(tcp, "%llu, ", 2);	/* offset */
 		printllval(tcp, "%llu", argn);		/* len */
 	}
 	return 0;
 }
+
+#ifndef SWAP_FLAG_PREFER
+# define SWAP_FLAG_PREFER 0x8000
+#endif
+#ifndef SWAP_FLAG_DISCARD
+# define SWAP_FLAG_DISCARD 0x10000
+#endif
+static const struct xlat swap_flags[] = {
+	{ SWAP_FLAG_PREFER,	"SWAP_FLAG_PREFER"	},
+	{ SWAP_FLAG_DISCARD,	"SWAP_FLAG_DISCARD"	},
+	{ 0,			NULL			}
+};
+
+int
+sys_swapon(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		int flags = tcp->u_arg[1];
+		printpath(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		printflags(swap_flags, flags & ~SWAP_FLAG_PRIO_MASK,
+			"SWAP_FLAG_???");
+		if (flags & SWAP_FLAG_PREFER)
+			tprintf("|%d", flags & SWAP_FLAG_PRIO_MASK);
+	}
+	return 0;
+}
+
+#ifdef X32
+# undef stat64
+# undef sys_fstat64
+# undef sys_stat64
+
+static void
+realprintstat64(struct tcb *tcp, long addr)
+{
+	struct stat64 statbuf;
+
+	if (!addr) {
+		tprints("NULL");
+		return;
+	}
+	if (syserror(tcp) || !verbose(tcp)) {
+		tprintf("%#lx", addr);
+		return;
+	}
+
+	if (umove(tcp, addr, &statbuf) < 0) {
+		tprints("{...}");
+		return;
+	}
+
+	if (!abbrev(tcp)) {
+		tprintf("{st_dev=makedev(%lu, %lu), st_ino=%llu, st_mode=%s, ",
+			(unsigned long) major(statbuf.st_dev),
+			(unsigned long) minor(statbuf.st_dev),
+			(unsigned long long) statbuf.st_ino,
+			sprintmode(statbuf.st_mode));
+		tprintf("st_nlink=%lu, st_uid=%lu, st_gid=%lu, ",
+			(unsigned long) statbuf.st_nlink,
+			(unsigned long) statbuf.st_uid,
+			(unsigned long) statbuf.st_gid);
+		tprintf("st_blksize=%lu, ",
+			(unsigned long) statbuf.st_blksize);
+		tprintf("st_blocks=%lu, ", (unsigned long) statbuf.st_blocks);
+	}
+	else
+		tprintf("{st_mode=%s, ", sprintmode(statbuf.st_mode));
+	switch (statbuf.st_mode & S_IFMT) {
+	case S_IFCHR: case S_IFBLK:
+		tprintf("st_rdev=makedev(%lu, %lu), ",
+			(unsigned long) major(statbuf.st_rdev),
+			(unsigned long) minor(statbuf.st_rdev));
+		break;
+	default:
+		tprintf("st_size=%llu, ", (unsigned long long) statbuf.st_size);
+		break;
+	}
+	if (!abbrev(tcp)) {
+		tprintf("st_atime=%s, ", sprinttime(statbuf.st_atime));
+		tprintf("st_mtime=%s, ", sprinttime(statbuf.st_mtime));
+		tprintf("st_ctime=%s", sprinttime(statbuf.st_ctime));
+		tprints("}");
+	}
+	else
+		tprints("...}");
+}
+
+int
+sys_fstat64(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+	} else {
+		realprintstat64(tcp, tcp->u_arg[1]);
+	}
+	return 0;
+}
+
+int
+sys_stat64(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		printpath(tcp, tcp->u_arg[0]);
+		tprints(", ");
+	} else {
+		realprintstat64(tcp, tcp->u_arg[1]);
+	}
+	return 0;
+}
 #endif
diff --git a/import-Android.sh b/import-Android.sh
index eb501dc..6ca0c9c 100755
--- a/import-Android.sh
+++ b/import-Android.sh
@@ -28,25 +28,21 @@
   freebsd \
   install-sh \
   linux/alpha \
-  linux/arm/ioctlent.h.in \
   linux/avr32 \
   linux/bfin \
   linux/hppa \
-  linux/i386/ioctlent.h.in \
   linux/ia64 \
-  linux/ioctlent.h.in \
   linux/m68k \
   linux/microblaze \
-  linux/mips/ioctlent.h.in \
   linux/powerpc \
   linux/s390 \
   linux/s390x \
-  linux/sh/ioctlent.h.in \
+  linux/sh \
   linux/sh64 \
   linux/sparc \
   linux/sparc64 \
   linux/tile \
-  linux/x86_64 \
+  linux/x32 \
   m4 \
   missing \
   mkinstalldirs \
@@ -59,5 +55,5 @@
   xlate.el \
 "
 
-rm -rvf $UNNEEDED_SOURCES
-
+rm -rf $UNNEEDED_SOURCES
+find . -name ioctlent.h.in -print0 | xargs -0 rm -f
diff --git a/io.c b/io.c
index 3f8757c..6b3f4b7 100644
--- a/io.c
+++ b/io.c
@@ -26,24 +26,12 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <fcntl.h>
 #if HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-
-#ifdef HAVE_LONG_LONG_OFF_T
-/*
- * Hacks for systems that have a long long off_t
- */
-
-#define sys_pread64	sys_pread
-#define sys_pwrite64	sys_pwrite
+# include <sys/uio.h>
 #endif
 
 int
@@ -51,7 +39,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -67,7 +55,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
 		tprintf(", %lu", tcp->u_arg[2]);
 	}
@@ -75,26 +63,24 @@
 }
 
 #if HAVE_SYS_UIO_H
+/*
+ * data_size limits the cumulative size of printed data.
+ * Example: recvmsg returing a short read.
+ */
 void
-tprint_iov(tcp, len, addr)
-struct tcb * tcp;
-unsigned long len;
-unsigned long addr;
+tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov, unsigned long data_size)
 {
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
+#if SUPPORTED_PERSONALITIES > 1
 	union {
 		struct { u_int32_t base; u_int32_t len; } iov32;
 		struct { u_int64_t base; u_int64_t len; } iov64;
 	} iov;
 #define sizeof_iov \
-  (personality_wordsize[current_personality] == 4 \
-   ? sizeof(iov.iov32) : sizeof(iov.iov64))
+	(current_wordsize == 4 ? sizeof(iov.iov32) : sizeof(iov.iov64))
 #define iov_iov_base \
-  (personality_wordsize[current_personality] == 4 \
-   ? (u_int64_t) iov.iov32.base : iov.iov64.base)
+	(current_wordsize == 4 ? (uint64_t) iov.iov32.base : iov.iov64.base)
 #define iov_iov_len \
-  (personality_wordsize[current_personality] == 4 \
-   ? (u_int64_t) iov.iov32.len : iov.iov64.len)
+	(current_wordsize == 4 ? (uint64_t) iov.iov32.len : iov.iov64.len)
 #else
 	struct iovec iov;
 #define sizeof_iov sizeof(iov)
@@ -105,7 +91,7 @@
 	int failed = 0;
 
 	if (!len) {
-		tprintf("[]");
+		tprints("[]");
 		return;
 	}
 	size = len * sizeof_iov;
@@ -121,24 +107,31 @@
 	} else {
 		abbrev_end = end;
 	}
-	tprintf("[");
+	tprints("[");
 	for (cur = addr; cur < end; cur += sizeof_iov) {
 		if (cur > addr)
-			tprintf(", ");
+			tprints(", ");
 		if (cur >= abbrev_end) {
-			tprintf("...");
+			tprints("...");
 			break;
 		}
 		if (umoven(tcp, cur, sizeof_iov, (char *) &iov) < 0) {
-			tprintf("?");
+			tprints("?");
 			failed = 1;
 			break;
 		}
-		tprintf("{");
-		printstr(tcp, (long) iov_iov_base, iov_iov_len);
+		tprints("{");
+		if (decode_iov) {
+			unsigned long len = iov_iov_len;
+			if (len > data_size)
+				len = data_size;
+			data_size -= len;
+			printstr(tcp, (long) iov_iov_base, len);
+		} else
+			tprintf("%#lx", (long) iov_iov_base);
 		tprintf(", %lu}", (unsigned long)iov_iov_len);
 	}
-	tprintf("]");
+	tprints("]");
 	if (failed)
 		tprintf(" %#lx", addr);
 #undef sizeof_iov
@@ -146,19 +139,25 @@
 #undef iov_iov_len
 }
 
+void
+tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov)
+{
+	tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L);
+}
+
 int
 sys_readv(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp)) {
 			tprintf("%#lx, %lu",
 					tcp->u_arg[1], tcp->u_arg[2]);
 			return 0;
 		}
-		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
 		tprintf(", %lu", tcp->u_arg[2]);
 	}
 	return 0;
@@ -169,103 +168,14 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
+		tprints(", ");
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
 		tprintf(", %lu", tcp->u_arg[2]);
 	}
 	return 0;
 }
 #endif
 
-#if defined(SVR4)
-
-int
-sys_pread(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-	} else {
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else
-			printstr(tcp, tcp->u_arg[1], tcp->u_rval);
-#if UNIXWARE
-		/* off_t is signed int */
-		tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
-#else
-		tprintf(", %lu, %llu", tcp->u_arg[2],
-			LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
-#endif
-	}
-	return 0;
-}
-
-int
-sys_pwrite(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-#if UNIXWARE
-		/* off_t is signed int */
-		tprintf(", %lu, %ld", tcp->u_arg[2], tcp->u_arg[3]);
-#else
-		tprintf(", %lu, %llu", tcp->u_arg[2],
-			LONG_LONG(tcp->u_arg[3], tcp->u_arg[4]));
-#endif
-	}
-	return 0;
-}
-#endif /* SVR4 */
-
-#ifdef FREEBSD
-#include <sys/types.h>
-#include <sys/socket.h>
-
-int
-sys_sendfile(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printfd(tcp, tcp->u_arg[1]);
-		tprintf(", %llu, %lu",
-			LONG_LONG(tcp->u_arg[2], tcp->u_arg[3]),
-			tcp->u_arg[4]);
-	} else {
-		off_t offset;
-
-		if (!tcp->u_arg[5])
-			tprintf(", NULL");
-		else {
-			struct sf_hdtr hdtr;
-
-			if (umove(tcp, tcp->u_arg[5], &hdtr) < 0)
-				tprintf(", %#lx", tcp->u_arg[5]);
-			else {
-				tprintf(", { ");
-				tprint_iov(tcp, hdtr.hdr_cnt, hdtr.headers);
-				tprintf(", %u, ", hdtr.hdr_cnt);
-				tprint_iov(tcp, hdtr.trl_cnt, hdtr.trailers);
-				tprintf(", %u }", hdtr.hdr_cnt);
-			}
-		}
-		if (!tcp->u_arg[6])
-			tprintf(", NULL");
-		else if (umove(tcp, tcp->u_arg[6], &offset) < 0)
-			tprintf(", %#lx", tcp->u_arg[6]);
-		else
-			tprintf(", [%llu]", offset);
-		tprintf(", %lu", tcp->u_arg[7]);
-	}
-	return 0;
-}
-#endif /* FREEBSD */
-
-#ifdef LINUX
-
 /* The SH4 ABI does allow long longs in odd-numbered registers, but
    does not allow them to be split between registers and memory - and
    there are only four argument registers for normal functions.  As a
@@ -282,7 +192,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -299,7 +209,7 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
 		tprintf(", %lu, ", tcp->u_arg[2]);
 		printllval(tcp, "%llu", PREAD_OFFSET_ARG);
@@ -307,6 +217,39 @@
 	return 0;
 }
 
+#if HAVE_SYS_UIO_H
+int
+sys_preadv(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+	} else {
+		if (syserror(tcp)) {
+			tprintf("%#lx, %lu", tcp->u_arg[1], tcp->u_arg[2]);
+			return 0;
+		}
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		tprintf(", %lu, ", tcp->u_arg[2]);
+		printllval(tcp, "%llu", PREAD_OFFSET_ARG);
+	}
+	return 0;
+}
+
+int
+sys_pwritev(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		tprintf(", %lu, ", tcp->u_arg[2]);
+		printllval(tcp, "%llu", PREAD_OFFSET_ARG);
+	}
+	return 0;
+}
+#endif /* HAVE_SYS_UIO_H */
+
 int
 sys_sendfile(struct tcb *tcp)
 {
@@ -314,74 +257,124 @@
 		off_t offset;
 
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printfd(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		if (!tcp->u_arg[2])
-			tprintf("NULL");
+			tprints("NULL");
 		else if (umove(tcp, tcp->u_arg[2], &offset) < 0)
 			tprintf("%#lx", tcp->u_arg[2]);
 		else
+#ifdef HAVE_LONG_LONG_OFF_T
+			tprintf("[%llu]", offset);
+#else
 			tprintf("[%lu]", offset);
+#endif
 		tprintf(", %lu", tcp->u_arg[3]);
 	}
 	return 0;
 }
 
+void
+print_loff_t(struct tcb *tcp, long addr)
+{
+	loff_t offset;
+
+	if (!addr)
+		tprints("NULL");
+	else if (umove(tcp, addr, &offset) < 0)
+		tprintf("%#lx", addr);
+	else
+		tprintf("[%llu]", (unsigned long long int) offset);
+}
+
 int
 sys_sendfile64(struct tcb *tcp)
 {
 	if (entering(tcp)) {
-		loff_t offset;
-
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printfd(tcp, tcp->u_arg[1]);
-		tprintf(", ");
-		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);
+		tprints(", ");
+		print_loff_t(tcp, tcp->u_arg[2]);
 		tprintf(", %lu", tcp->u_arg[3]);
 	}
 	return 0;
 }
 
-#endif /* LINUX */
-
-#if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
-int
-sys_pread64(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-	} else {
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else
-			printstr(tcp, tcp->u_arg[1], tcp->u_rval);
-		tprintf(", %lu, ", tcp->u_arg[2]);
-		printllval(tcp, "%#llx", 3);
-	}
-	return 0;
-}
-
-int
-sys_pwrite64(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-		tprintf(", %lu, ", tcp->u_arg[2]);
-		printllval(tcp, "%#llx", 3);
-	}
-	return 0;
-}
+static const struct xlat splice_flags[] = {
+#ifdef SPLICE_F_MOVE
+	{ SPLICE_F_MOVE,     "SPLICE_F_MOVE"     },
 #endif
+#ifdef SPLICE_F_NONBLOCK
+	{ SPLICE_F_NONBLOCK, "SPLICE_F_NONBLOCK" },
+#endif
+#ifdef SPLICE_F_MORE
+	{ SPLICE_F_MORE,     "SPLICE_F_MORE"     },
+#endif
+#ifdef SPLICE_F_GIFT
+	{ SPLICE_F_GIFT,     "SPLICE_F_GIFT"     },
+#endif
+	{ 0,                 NULL                },
+};
+
+int
+sys_tee(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd_in */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* int fd_out */
+		printfd(tcp, tcp->u_arg[1]);
+		tprints(", ");
+		/* size_t len */
+		tprintf("%lu, ", tcp->u_arg[2]);
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
+	}
+	return 0;
+}
+
+int
+sys_splice(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd_in */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* loff_t *off_in */
+		print_loff_t(tcp, tcp->u_arg[1]);
+		tprints(", ");
+		/* int fd_out */
+		printfd(tcp, tcp->u_arg[2]);
+		tprints(", ");
+		/* loff_t *off_out */
+		print_loff_t(tcp, tcp->u_arg[3]);
+		tprints(", ");
+		/* size_t len */
+		tprintf("%lu, ", tcp->u_arg[4]);
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[5], "SPLICE_F_???");
+	}
+	return 0;
+}
+
+int
+sys_vmsplice(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* int fd */
+		printfd(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		/* const struct iovec *iov, unsigned long nr_segs */
+		tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		tprintf(", %lu, ", tcp->u_arg[2]);
+		/* unsigned int flags */
+		printflags(splice_flags, tcp->u_arg[3], "SPLICE_F_???");
+	}
+	return 0;
+}
 
 int
 sys_ioctl(struct tcb *tcp)
@@ -390,10 +383,10 @@
 
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		iop = ioctl_lookup(tcp->u_arg[1]);
 		if (iop) {
-			tprintf("%s", iop->symbol);
+			tprints(iop->symbol);
 			while ((iop = ioctl_next_match(iop)))
 				tprintf(" or %s", iop->symbol);
 		} else
@@ -401,8 +394,8 @@
 		ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
 	}
 	else {
-		int ret;
-		if (!(ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2])))
+		int ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+		if (!ret)
 			tprintf(", %#lx", tcp->u_arg[2]);
 		else
 			return ret - 1;
diff --git a/ioctl.c b/ioctl.c
index 3344fb7..69ba56c 100644
--- a/ioctl.c
+++ b/ioctl.c
@@ -26,130 +26,61 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-const struct ioctlent ioctlent0[] = {
-/*
- * `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
- * program `ioctlsort', such that the list is sorted by the `code' field.
- * This has the side-effect of resolving the _IO.. macros into
- * plain integers, eliminating the need to include here everything
- * in "/usr/include" .
- */
-#include "ioctlent.h"
-};
-
-#ifdef LINUX
 #include <asm/ioctl.h>
-#endif
-
-const int nioctlents0 = sizeof ioctlent0 / sizeof ioctlent0[0];
-
-#if SUPPORTED_PERSONALITIES >= 2
-const struct ioctlent ioctlent1[] = {
-#include "ioctlent1.h"
-};
-
-const int nioctlents1 = sizeof ioctlent1 / sizeof ioctlent1[0];
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
-
-#if SUPPORTED_PERSONALITIES >= 3
-const struct ioctlent ioctlent2[] = {
-#include "ioctlent2.h"
-};
-
-const int nioctlents2 = sizeof ioctlent2 / sizeof ioctlent2[0];
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
-
-const struct ioctlent *ioctlent;
-int nioctlents;
 
 static int
-compare(a, b)
-const void *a;
-const void *b;
+compare(const void *a, const void *b)
 {
-	unsigned long code1 = ((struct ioctlent *) a)->code;
+	unsigned long code1 = (long) a;
 	unsigned long code2 = ((struct ioctlent *) b)->code;
 	return (code1 > code2) ? 1 : (code1 < code2) ? -1 : 0;
 }
 
 const struct ioctlent *
-ioctl_lookup(code)
-long code;
+ioctl_lookup(long code)
 {
-	struct ioctlent *iop, ioent;
+	struct ioctlent *iop;
 
-	ioent.code = code;
-#ifdef LINUX
-	ioent.code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT);
-#endif
-	iop = (struct ioctlent *) bsearch((char *) &ioent, (char *) ioctlent,
-			nioctlents, sizeof(struct ioctlent), compare);
-	while (iop > ioctlent)
-		if ((--iop)->code != ioent.code) {
+	code &= (_IOC_NRMASK<<_IOC_NRSHIFT) | (_IOC_TYPEMASK<<_IOC_TYPESHIFT);
+	iop = bsearch((void*)code, ioctlent,
+			nioctlents, sizeof(ioctlent[0]), compare);
+	while (iop > ioctlent) {
+		iop--;
+		if (iop->code != code) {
 			iop++;
 			break;
 		}
+	}
 	return iop;
 }
 
 const struct ioctlent *
-ioctl_next_match(iop)
-const struct ioctlent *iop;
+ioctl_next_match(const struct ioctlent *iop)
 {
 	long code;
 
-	code = (iop++)->code;
+	code = iop->code;
+	iop++;
 	if (iop < ioctlent + nioctlents && iop->code == code)
 		return iop;
 	return NULL;
 }
 
 int
-ioctl_decode(tcp, code, arg)
-struct tcb *tcp;
-long code, arg;
+ioctl_decode(struct tcb *tcp, long code, long arg)
 {
 	switch ((code >> 8) & 0xff) {
-#ifdef LINUX
 #if defined(ALPHA) || defined(POWERPC)
 	case 'f': case 't': case 'T':
 #else /* !ALPHA */
 	case 0x54:
 #endif /* !ALPHA */
-#else /* !LINUX */
-	case 'f': case 't': case 'T':
-#endif /* !LINUX */
 		return term_ioctl(tcp, code, arg);
-#ifdef LINUX
 	case 0x89:
-#else /* !LINUX */
-	case 'r': case 's': case 'i':
-#ifndef FREEBSD
-	case 'p':
-#endif
-#endif /* !LINUX */
 		return sock_ioctl(tcp, code, arg);
-#ifdef USE_PROCFS
-#ifndef HAVE_MP_PROCFS
-#ifndef FREEBSD
-	case 'q':
-#else
-	case 'p':
-#endif
-		return proc_ioctl(tcp, code, arg);
-#endif
-#endif /* USE_PROCFS */
-#ifdef HAVE_SYS_STREAM_H
-	case 'S':
-		return stream_ioctl(tcp, code, arg);
-#endif /* HAVE_SYS_STREAM_H */
-#ifdef LINUX
 	case 'p':
 		return rtc_ioctl(tcp, code, arg);
 	case 0x03:
@@ -159,7 +90,10 @@
 	case 0x22:
 		return scsi_ioctl(tcp, code, arg);
 #endif
-#endif
+	case 'L':
+		return loop_ioctl(tcp, code, arg);
+	case 'M':
+		return mtd_ioctl(tcp, code, arg);
 	default:
 		break;
 	}
diff --git a/ioctlsort.c b/ioctlsort.c
index 7881a91..0e6608e 100644
--- a/ioctlsort.c
+++ b/ioctlsort.c
@@ -24,15 +24,11 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
-
 #include <stdio.h>
-
 #ifdef STDC_HEADERS
-#include <stdlib.h>
+# include <stdlib.h>
 #endif
 
 struct ioctlent {
@@ -46,9 +42,7 @@
 int nioctlents = sizeof ioctlent / sizeof ioctlent[0];
 
 int
-compare(a, b)
-const void *a;
-const void *b;
+compare(const void *a, const void *b)
 {
 	unsigned long code1 = ((struct ioctlent *) a)->code;
 	unsigned long code2 = ((struct ioctlent *) b)->code;
diff --git a/ipc.c b/ipc.c
index 4995946..2a27c9b 100644
--- a/ipc.c
+++ b/ipc.c
@@ -26,18 +26,12 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#if defined(LINUX) || defined(SUNOS4) || defined(FREEBSD)
-
-# ifdef HAVE_MQUEUE_H
-#  include <mqueue.h>
-# endif
-
+#ifdef HAVE_MQUEUE_H
+# include <mqueue.h>
+#endif
 #include <fcntl.h>
 #include <sys/ipc.h>
 #ifdef HAVE_ANDROID_OS
@@ -69,7 +63,7 @@
 #define SEM_INFO 19
 #endif
 
-#if defined LINUX && !defined IPC_64
+#if !defined IPC_64
 # define IPC_64 0x100
 #endif
 
@@ -79,11 +73,9 @@
 	{ IPC_RMID,	"IPC_RMID"	},
 	{ IPC_SET,	"IPC_SET"	},
 	{ IPC_STAT,	"IPC_STAT"	},
-#ifdef LINUX
 	{ IPC_INFO,	"IPC_INFO"	},
 	{ MSG_STAT,	"MSG_STAT"	},
 	{ MSG_INFO,	"MSG_INFO"	},
-#endif /* LINUX */
 	{ 0,		NULL		},
 };
 
@@ -91,11 +83,9 @@
 	{ IPC_RMID,	"IPC_RMID"	},
 	{ IPC_SET,	"IPC_SET"	},
 	{ IPC_STAT,	"IPC_STAT"	},
-#ifdef LINUX
 	{ IPC_INFO,	"IPC_INFO"	},
 	{ SEM_STAT,	"SEM_STAT"	},
 	{ SEM_INFO,	"SEM_INFO"	},
-#endif /* LINUX */
 	{ GETPID,	"GETPID"	},
 	{ GETVAL,	"GETVAL"	},
 	{ GETALL,	"GETALL"	},
@@ -110,11 +100,9 @@
 	{ IPC_RMID,	"IPC_RMID"	},
 	{ IPC_SET,	"IPC_SET"	},
 	{ IPC_STAT,	"IPC_STAT"	},
-#ifdef LINUX
 	{ IPC_INFO,	"IPC_INFO"	},
 	{ SHM_STAT,	"SHM_STAT"	},
 	{ SHM_INFO,	"SHM_INFO"	},
-#endif /* LINUX */
 #ifdef SHM_LOCK
 	{ SHM_LOCK,	"SHM_LOCK"	},
 #endif
@@ -141,9 +129,7 @@
 };
 
 static const struct xlat shm_flags[] = {
-#ifdef LINUX
 	{ SHM_REMAP,	"SHM_REMAP"	},
-#endif /* LINUX */
 	{ SHM_RDONLY,	"SHM_RDONLY"	},
 	{ SHM_RND,	"SHM_RND"	},
 	{ 0,		NULL		},
@@ -151,9 +137,7 @@
 
 static const struct xlat msg_flags[] = {
 	{ MSG_NOERROR,	"MSG_NOERROR"	},
-#ifdef LINUX
 	{ MSG_EXCEPT,	"MSG_EXCEPT"	},
-#endif /* LINUX */
 	{ IPC_NOWAIT,	"IPC_NOWAIT"	},
 	{ 0,		NULL		},
 };
@@ -164,17 +148,16 @@
 	{ 0,		NULL		},
 };
 
-int sys_msgget(tcp)
-struct tcb *tcp;
+int sys_msgget(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		if (tcp->u_arg[0])
 			tprintf("%#lx", tcp->u_arg[0]);
 		else
-			tprintf("IPC_PRIVATE");
-		tprintf(", ");
+			tprints("IPC_PRIVATE");
+		tprints(", ");
 		if (printflags(resource_flags, tcp->u_arg[1] & ~0777, NULL) != 0)
-			tprintf("|");
+			tprints("|");
 		tprintf("%#lo", tcp->u_arg[1] & 0777);
 	}
 	return 0;
@@ -182,32 +165,28 @@
 
 #ifdef IPC_64
 # define PRINTCTL(flagset, arg, dflt) \
-	if ((arg) & IPC_64) tprintf("IPC_64|"); \
+	if ((arg) & IPC_64) tprints("IPC_64|"); \
 	printxval((flagset), (arg) &~ IPC_64, dflt)
 #else
 # define PRINTCTL printxval
 #endif
 
 static int
-indirect_ipccall(tcp)
-struct tcb *tcp;
+indirect_ipccall(struct tcb *tcp)
 {
-#ifdef LINUX
 #ifdef X86_64
-	return current_personality > 0;
+	return current_personality == 1;
 #endif
 #if defined IA64
 	return tcp->scno < 1024; /* ia32 emulation syscalls are low */
 #endif
-#if !defined MIPS && !defined HPPA
-	return 1;
-#endif
-#endif	/* LINUX */
+#if defined(ALPHA) || defined(MIPS) || defined(HPPA) || defined(__ARM_EABI__)
 	return 0;
+#endif
+	return 1;
 }
 
-int sys_msgctl(tcp)
-struct tcb *tcp;
+int sys_msgctl(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%lu, ", tcp->u_arg[0]);
@@ -228,7 +207,7 @@
 	} else {
 		tprintf("{%lu, ", mtype);
 		printstr(tcp, addr + sizeof(mtype), count);
-		tprintf("}");
+		tprints("}");
 	}
 	tprintf(", %lu, ", count);
 	printflags(msg_flags, flags, "MSG_???");
@@ -259,7 +238,7 @@
 	} else {
 		tprintf("{%lu, ", mtype);
 		printstr(tcp, addr + sizeof(mtype), count);
-		tprintf("}");
+		tprints("}");
 	}
 	tprintf(", %lu, %ld, ", count, msgtyp);
 }
@@ -307,13 +286,13 @@
 		return;
 	}
 
-	for(i = 0; i < max_count; ++i) {
+	for (i = 0; i < max_count; ++i) {
 		struct sembuf sb;
 		if (i)
-			tprintf(", ");
+			tprints(", ");
 		if (umove(tcp, addr + i * sizeof(struct sembuf), &sb) < 0) {
 			if (i) {
-				tprintf("{???}");
+				tprints("{???}");
 				break;
 			} else {
 				tprintf("%#lx, %lu", addr, count);
@@ -321,15 +300,15 @@
 			}
 		} else {
 			if (!i)
-				tprintf("{");
+				tprints("{");
 			tprintf("{%u, %d, ", sb.sem_num, sb.sem_op);
 			printflags(semop_flags, sb.sem_flg, "SEM_???");
-			tprintf("}");
+			tprints("}");
 		}
 	}
 
 	if (i < max_count || max_count < count)
-		tprintf(", ...");
+		tprints(", ...");
 
 	tprintf("}, %lu", count);
 }
@@ -347,44 +326,44 @@
 	return 0;
 }
 
-#ifdef LINUX
 int sys_semtimedop(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%lu, ", tcp->u_arg[0]);
 		if (indirect_ipccall(tcp)) {
 			tprint_sembuf(tcp, tcp->u_arg[3], tcp->u_arg[1]);
-			tprintf(", ");
+			tprints(", ");
+#if defined(S390)
+			printtv(tcp, tcp->u_arg[2]);
+#else
 			printtv(tcp, tcp->u_arg[5]);
+#endif
 		} else {
 			tprint_sembuf(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-			tprintf(", ");
+			tprints(", ");
 			printtv(tcp, tcp->u_arg[3]);
 		}
 	}
 	return 0;
 }
-#endif
 
-int sys_semget(tcp)
-struct tcb *tcp;
+int sys_semget(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		if (tcp->u_arg[0])
 			tprintf("%#lx", tcp->u_arg[0]);
 		else
-			tprintf("IPC_PRIVATE");
+			tprints("IPC_PRIVATE");
 		tprintf(", %lu", tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		if (printflags(resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
-			tprintf("|");
+			tprints("|");
 		tprintf("%#lo", tcp->u_arg[2] & 0777);
 	}
 	return 0;
 }
 
-int sys_semctl(tcp)
-struct tcb *tcp;
+int sys_semctl(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%lu", tcp->u_arg[0]);
@@ -395,25 +374,23 @@
 	return 0;
 }
 
-int sys_shmget(tcp)
-struct tcb *tcp;
+int sys_shmget(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		if (tcp->u_arg[0])
 			tprintf("%#lx", tcp->u_arg[0]);
 		else
-			tprintf("IPC_PRIVATE");
+			tprints("IPC_PRIVATE");
 		tprintf(", %lu", tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		if (printflags(shm_resource_flags, tcp->u_arg[2] & ~0777, NULL) != 0)
-			tprintf("|");
+			tprints("|");
 		tprintf("%#lo", tcp->u_arg[2] & 0777);
 	}
 	return 0;
 }
 
-int sys_shmctl(tcp)
-struct tcb *tcp;
+int sys_shmctl(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%lu, ", tcp->u_arg[0]);
@@ -427,39 +404,33 @@
 	return 0;
 }
 
-int sys_shmat(tcp)
-struct tcb *tcp;
+int sys_shmat(struct tcb *tcp)
 {
-#ifdef LINUX
-	unsigned long raddr;
-#endif /* LINUX */
-
 	if (exiting(tcp)) {
 		tprintf("%lu", tcp->u_arg[0]);
 		if (indirect_ipccall(tcp)) {
 			tprintf(", %#lx", tcp->u_arg[3]);
-			tprintf(", ");
+			tprints(", ");
 			printflags(shm_flags, tcp->u_arg[1], "SHM_???");
 		} else {
 			tprintf(", %#lx", tcp->u_arg[1]);
-			tprintf(", ");
+			tprints(", ");
 			printflags(shm_flags, tcp->u_arg[2], "SHM_???");
 		}
 		if (syserror(tcp))
 			return 0;
-/* HPPA does not use an IPC multiplexer on Linux.  */
-#if defined(LINUX) && !defined(HPPA)
-		if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
-			return RVAL_NONE;
-		tcp->u_rval = raddr;
-#endif /* LINUX */
+		if (indirect_ipccall(tcp)) {
+			unsigned long raddr;
+			if (umove(tcp, tcp->u_arg[2], &raddr) < 0)
+				return RVAL_NONE;
+			tcp->u_rval = raddr;
+		}
 		return RVAL_HEX;
 	}
 	return 0;
 }
 
-int sys_shmdt(tcp)
-struct tcb *tcp;
+int sys_shmdt(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		if (indirect_ipccall(tcp)) {
@@ -471,15 +442,12 @@
 	return 0;
 }
 
-#endif /* defined(LINUX) || defined(SUNOS4) || defined(FREEBSD) */
-
-#ifdef LINUX
 int
 sys_mq_open(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		/* flags */
 		tprint_open_modes(tcp->u_arg[1]);
 		if (tcp->u_arg[1] & O_CREAT) {
@@ -490,10 +458,11 @@
 			/* mode */
 			tprintf(", %#lo, ", tcp->u_arg[2]);
 			if (umove(tcp, tcp->u_arg[3], &attr) < 0)
-				tprintf("{ ??? }");
+				tprints("{ ??? }");
 			else
 				tprintf("{mq_maxmsg=%ld, mq_msgsize=%ld}",
-					attr.mq_maxmsg, attr.mq_msgsize);
+					(long) attr.mq_maxmsg,
+					(long) attr.mq_msgsize);
 # endif
 		}
 	}
@@ -539,20 +508,21 @@
 printmqattr(struct tcb *tcp, long addr)
 {
 	if (addr == 0)
-		tprintf("NULL");
+		tprints("NULL");
 	else {
 # ifndef HAVE_MQUEUE_H
 		tprintf("%#lx", addr);
 # else
 		struct mq_attr attr;
 		if (umove(tcp, addr, &attr) < 0) {
-			tprintf("{...}");
+			tprints("{...}");
 			return;
 		}
-		tprintf("{mq_flags=");
+		tprints("{mq_flags=");
 		tprint_open_modes(attr.mq_flags);
 		tprintf(", mq_maxmsg=%ld, mq_msgsize=%ld, mq_curmsg=%ld}",
-			attr.mq_maxmsg, attr.mq_msgsize, attr.mq_curmsgs);
+			(long) attr.mq_maxmsg, (long) attr.mq_msgsize,
+			(long) attr.mq_curmsgs);
 # endif
 	}
 }
@@ -563,9 +533,14 @@
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
 		printmqattr(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else
 		printmqattr(tcp, tcp->u_arg[2]);
 	return 0;
 }
-#endif
+
+int
+sys_ipc(struct tcb *tcp)
+{
+	return printargs(tcp);
+}
diff --git a/linux/arm/syscallent.h b/linux/arm/syscallent.h
index b914ca0..550335e 100644
--- a/linux/arm/syscallent.h
+++ b/linux/arm/syscallent.h
@@ -24,8 +24,6 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall"}, /* 0 */
@@ -96,8 +94,8 @@
 	{ 0,	0,	sys_getpgrp,		"getpgrp"	}, /* 65 */
 	{ 0,	0,	sys_setsid,		"setsid"	}, /* 66 */
 	{ 3,	TS,	sys_sigaction,		"sigaction"	}, /* 67 */
-	{ 0,	TS,	sys_siggetmask,		"siggetmask"	}, /* 68 */
-	{ 1,	TS,	sys_sigsetmask,		"sigsetmask"	}, /* 69 */
+	{ 0,	TS,	sys_siggetmask,		"sgetmask"	}, /* 68 */
+	{ 1,	TS,	sys_sigsetmask,		"ssetmask"	}, /* 69 */
 	{ 2,	0,	sys_setreuid,		"setreuid"	}, /* 70 */
 	{ 2,	0,	sys_setregid,		"setregid"	}, /* 71 */
 	{ 3,	TS,	sys_sigsuspend,		"sigsuspend"	}, /* 72 */
@@ -115,8 +113,8 @@
 	{ 2,	TF,	sys_oldlstat,		"oldlstat"	}, /* 84 */
 	{ 3,	TF,	sys_readlink,		"readlink"	}, /* 85 */
 	{ 1,	TF,	sys_uselib,		"uselib"	}, /* 86 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 87 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 88 */
+	{ 2,	TF,	sys_swapon,		"swapon"	}, /* 87 */
+	{ 4,	0,	sys_reboot,		"reboot"	}, /* 88 */
 	{ 3,	0,	sys_readdir,		"readdir"	}, /* 89 */
 	{ 6,	TD,	sys_old_mmap,		"old_mmap"	}, /* 90 */
 	{ 2,	0,	sys_munmap,		"munmap"	}, /* 91 */
@@ -145,9 +143,9 @@
 	{ 4,	TP,	sys_wait4,		"wait4"		}, /* 114 */
 	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 115 */
 	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 116 */
-	{ 6,	0,	sys_ipc,		"ipc"		}, /* 117 */
+	{ 6,	TI,	sys_ipc,		"ipc"		}, /* 117 */
 	{ 1,	0,	sys_fsync,		"fsync"		}, /* 118 */
-	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
+	{ 0,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
 	{ 5,	TP,	sys_clone,		"clone"		}, /* 120 */
 	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 121 */
 	{ 1,	0,	sys_uname,		"uname"		}, /* 122 */
@@ -180,7 +178,7 @@
 	{ 1,	0,	sys_sysctl,		"_sysctl"	}, /* 149 */
 	{ 2,	0,	sys_mlock,		"mlock"		}, /* 150 */
 	{ 2,	0,	sys_munlock,		"munlock"	}, /* 151 */
-	{ 2,	0,	sys_mlockall,		"mlockall"	}, /* 152 */
+	{ 1,	0,	sys_mlockall,		"mlockall"	}, /* 152 */
 	{ 0,	0,	sys_munlockall,		"munlockall"	}, /* 153 */
 	{ 0,	0,	sys_sched_setparam,	"sched_setparam"}, /* 154 */
 	{ 2,	0,	sys_sched_getparam,	"sched_getparam"}, /* 155 */
@@ -194,23 +192,23 @@
 	{ 5,	0,	sys_mremap,		"mremap"	}, /* 163 */
 	{ 3,	0,	sys_setresuid,		"setresuid"	}, /* 164 */
 	{ 3,	0,	sys_getresuid,		"getresuid"	}, /* 165 */
-	{ 5,	0,	printargs,		"vm86"		}, /* 166 */
+	{ 5,	0,	sys_vm86,		"vm86"		}, /* 166 */
 	{ 5,	0,	sys_query_module,	"query_module"	}, /* 167 */
 	{ 3,	0,	sys_poll,		"poll"		}, /* 168 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 169 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	}, /* 169 */
 	{ 3,	0,	sys_setresgid,		"setresgid"	}, /* 170 */
 	{ 3,	0,	sys_getresgid,		"getresgid"	}, /* 171 */
 	{ 5,	0,	sys_prctl,		"prctl"		}, /* 172 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 173 */
-	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"  }, /* 174 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	}, /* 173 */
+	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	}, /* 174 */
 	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 175 */
 	{ 2,	TS,	sys_rt_sigpending,	"rt_sigpending"	}, /* 176 */
 	{ 4,	TS,	sys_rt_sigtimedwait,	"rt_sigtimedwait"}, /* 177 */
 	{ 3,	TS,	sys_rt_sigqueueinfo,    "rt_sigqueueinfo"}, /* 178 */
 	{ 2,	TS,	sys_rt_sigsuspend,	"rt_sigsuspend"	}, /* 179 */
 
-	{ 5,	TF,	sys_pread,		"pread"		}, /* 180 */
-	{ 5,	TF,	sys_pwrite,		"pwrite"	}, /* 181 */
+	{ 6,	TF,	sys_pread,		"pread"		}, /* 180 */
+	{ 6,	TF,	sys_pwrite,		"pwrite"	}, /* 181 */
 	{ 3,	TF,	sys_chown,		"chown"		}, /* 182 */
 	{ 2,	TF,	sys_getcwd,		"getcwd"	}, /* 183 */
 	{ 2,	0,	sys_capget,		"capget"	}, /* 184 */
@@ -222,8 +220,8 @@
 	{ 0,	TP,	sys_vfork,		"vfork"		}, /* 190 */
 	{ 2,	0,	sys_getrlimit,		"getrlimit"	}, /* 191 */
 	{ 6,	TD,	sys_mmap,		"mmap2"		}, /* 192 */
-	{ 3,	TF,	sys_truncate64,		"truncate64"	}, /* 193 */
-	{ 3,	TF,	sys_ftruncate64,	"ftruncate64"	}, /* 194 */
+	{ 4,	TF,	sys_truncate64,		"truncate64"	}, /* 193 */
+	{ 4,	TF,	sys_ftruncate64,	"ftruncate64"	}, /* 194 */
 	{ 2,	TF,	sys_stat64,		"stat64"	}, /* 195 */
 	{ 2,	TF,	sys_lstat64,		"lstat64"	}, /* 196 */
 	{ 2,	TF,	sys_fstat64,		"fstat64"	}, /* 197 */
@@ -247,15 +245,15 @@
 	{ 1,	0,	sys_setgid,		"setgid32"	}, /* 214 */
 	{ 1,	NF,	sys_setfsuid,		"setfsuid32"	}, /* 215 */
 	{ 1,	NF,	sys_setfsgid,		"setfsgid32"	}, /* 216 */
-	{ 3,    0,      sys_getdents64,         "getdents64"    }, /* 217 */
+	{ 3,	0,	sys_getdents64,		"getdents64"	}, /* 217 */
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 218 */
-	{ 3,	0,	printargs,		"mincore"	}, /* 219 */
+	{ 3,	0,	sys_mincore,		"mincore"	}, /* 219 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 220 */
 	{ 3,	0,	sys_fcntl,		"fcntl64"	}, /* 221 */
-	{ 5,	0,	printargs,		"SYS_222"	}, /* 222 */
-	{ 5,	0,	printargs,		"SYS_223"	}, /* 223 */
-	{ 0,	0,	printargs,		"gettid"	}, /* 224 */
-	{ 4,	0,	sys_readahead,		"readahead"	}, /* 225 */
+	{ 5,	0,	NULL,			NULL		}, /* 222 */
+	{ 5,	0,	NULL,			NULL		}, /* 223 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 224 */
+	{ 5,	0,	sys_readahead,		"readahead"	}, /* 225 */
 	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 226 */
 	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 227 */
 	{ 5,	0,	sys_fsetxattr,		"fsetxattr"	}, /* 228 */
@@ -273,20 +271,20 @@
 	{ 6,	0,	sys_futex,		"futex"		}, /* 240 */
 	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity" },/* 241 */
 	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity" },/* 242 */
-	{ 2,	0,	printargs,		"io_setup"	}, /* 243 */
-	{ 1,	0,	printargs,		"io_destroy"	}, /* 244 */
-	{ 5,	0,	printargs,		"io_getevents"	}, /* 245 */
-	{ 3,	0,	printargs,		"io_submit"	}, /* 246 */
-	{ 3,	0,	printargs,		"io_cancel"	}, /* 247 */
+	{ 2,	0,	sys_io_setup,		"io_setup"	}, /* 243 */
+	{ 1,	0,	sys_io_destroy,		"io_destroy"	}, /* 244 */
+	{ 5,	0,	sys_io_getevents,	"io_getevents"	}, /* 245 */
+	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 246 */
+	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 247 */
 	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 248 */
-	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 249 */
-	{ 1,	TD,	printargs,		"epoll_create"	}, /* 250 */
-	{ 4,	0,	printargs,		"epoll_ctl"	}, /* 251 */
-	{ 4,	0,	printargs,		"epoll_wait"	}, /* 252 */
+	{ 4,	0,	sys_lookup_dcookie,	"lookup_dcookie"}, /* 249 */
+	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 250 */
+	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 251 */
+	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 252 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 253 */
-	{ 5,	0,	printargs,		"SYS_254"	}, /* 254 */
-	{ 5,	0,	printargs,		"SYS_255"	}, /* 255 */
-	{ 1,	0,	printargs,		"set_tid_address"}, /* 256 */
+	{ 5,	0,	NULL,			NULL		}, /* 254 */
+	{ 5,	0,	NULL,			NULL		}, /* 255 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address"}, /* 256 */
 	{ 3,	0,	sys_timer_create,	"timer_create"	}, /* 257 */
 	{ 4,	0,	sys_timer_settime,	"timer_settime"	}, /* 258 */
 	{ 2,	0,	sys_timer_gettime,	"timer_gettime"	}, /* 259 */
@@ -339,14 +337,14 @@
 	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 306 */
 	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 307 */
 	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 308 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 309 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 310 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 311 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 309 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 310 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 311 */
 	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 312 */
-	{ 5,	0,	printargs,		"vserver"	}, /* 313 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 314 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 315 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 316 */
+	{ 5,	0,	sys_vserver,		"vserver"	}, /* 313 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 314 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 315 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 316 */
 	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 317 */
 	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 318 */
 	{ 6,	0,	sys_mbind,		"mbind"		}, /* 319 */
@@ -368,16 +366,16 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 335 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 336 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 337 */
-	{ 2,	0,	printargs,		"set_robust_list" }, /* 338 */
-	{ 3,	0,	printargs,		"get_robust_list" }, /* 339 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 340 */
-	{ 5,	0,	printargs,		"SYS_341"	}, /* 341 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 342 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 343 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 338 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 339 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 340 */
+	{ 5,	0,	NULL,			NULL		}, /* 341 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 342 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 343 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 344 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 345 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 346 */
-	{ 5,	0,	printargs,		"kexec_load"	}, /* 347 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 346 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 347 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 348 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 349 */
 	{ 4,	TD,	sys_timerfd,		"timerfd"	}, /* 350 */
@@ -391,51 +389,51 @@
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 358 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 359 */
 	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 360 */
-	{ 5,	TD,	printargs,		"preadv"	}, /* 361 */
-	{ 5,	TD,	printargs,		"pwritev"	}, /* 362 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"}, /* 363 */
-	{ 5,	TD,	printargs,		"perf_event_open"}, /* 364 */
+	{ 6,	TD,	sys_preadv,		"preadv"	}, /* 361 */
+	{ 6,	TD,	sys_pwritev,		"pwritev"	}, /* 362 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo"}, /* 363 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open"}, /* 364 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 365 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 366 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 367 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 368 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 369 */
-	{ 5,	0,	printargs,		"SYS_370"	}, /* 370 */
-	{ 5,	0,	printargs,		"SYS_371"	}, /* 371 */
-	{ 5,	0,	printargs,		"SYS_372"	}, /* 372 */
-	{ 5,	0,	printargs,		"SYS_373"	}, /* 373 */
-	{ 5,	0,	printargs,		"SYS_374"	}, /* 374 */
-	{ 5,	0,	printargs,		"SYS_375"	}, /* 375 */
-	{ 5,	0,	printargs,		"SYS_376"	}, /* 376 */
-	{ 5,	0,	printargs,		"SYS_377"	}, /* 377 */
-	{ 5,	0,	printargs,		"SYS_378"	}, /* 378 */
-	{ 5,	0,	printargs,		"SYS_379"	}, /* 379 */
-	{ 5,	0,	printargs,		"SYS_380"	}, /* 380 */
-	{ 5,	0,	printargs,		"SYS_381"	}, /* 381 */
-	{ 5,	0,	printargs,		"SYS_382"	}, /* 382 */
-	{ 5,	0,	printargs,		"SYS_383"	}, /* 383 */
-	{ 5,	0,	printargs,		"SYS_384"	}, /* 384 */
-	{ 5,	0,	printargs,		"SYS_385"	}, /* 385 */
-	{ 5,	0,	printargs,		"SYS_386"	}, /* 386 */
-	{ 5,	0,	printargs,		"SYS_387"	}, /* 387 */
-	{ 5,	0,	printargs,		"SYS_388"	}, /* 388 */
-	{ 5,	0,	printargs,		"SYS_389"	}, /* 389 */
-	{ 5,	0,	printargs,		"SYS_390"	}, /* 390 */
-	{ 5,	0,	printargs,		"SYS_391"	}, /* 391 */
-	{ 5,	0,	printargs,		"SYS_392"	}, /* 392 */
-	{ 5,	0,	printargs,		"SYS_393"	}, /* 393 */
-	{ 5,	0,	printargs,		"SYS_394"	}, /* 394 */
-	{ 5,	0,	printargs,		"SYS_395"	}, /* 395 */
-	{ 5,	0,	printargs,		"SYS_396"	}, /* 396 */
-	{ 5,	0,	printargs,		"SYS_397"	}, /* 397 */
-	{ 5,	0,	printargs,		"SYS_398"	}, /* 398 */
-	{ 5,	0,	printargs,		"SYS_399"	}, /* 399 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 367 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 368 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 369 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 370 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 371 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 372 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 373 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 374 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 375 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 376 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 377 */
+	{ 5,	0,	NULL,			NULL		}, /* 378 */
+	{ 5,	0,	NULL,			NULL		}, /* 379 */
+	{ 5,	0,	NULL,			NULL		}, /* 380 */
+	{ 5,	0,	NULL,			NULL		}, /* 381 */
+	{ 5,	0,	NULL,			NULL		}, /* 382 */
+	{ 5,	0,	NULL,			NULL		}, /* 383 */
+	{ 5,	0,	NULL,			NULL		}, /* 384 */
+	{ 5,	0,	NULL,			NULL		}, /* 385 */
+	{ 5,	0,	NULL,			NULL		}, /* 386 */
+	{ 5,	0,	NULL,			NULL		}, /* 387 */
+	{ 5,	0,	NULL,			NULL		}, /* 388 */
+	{ 5,	0,	NULL,			NULL		}, /* 389 */
+	{ 5,	0,	NULL,			NULL		}, /* 390 */
+	{ 5,	0,	NULL,			NULL		}, /* 391 */
+	{ 5,	0,	NULL,			NULL		}, /* 392 */
+	{ 5,	0,	NULL,			NULL		}, /* 393 */
+	{ 5,	0,	NULL,			NULL		}, /* 394 */
+	{ 5,	0,	NULL,			NULL		}, /* 395 */
+	{ 5,	0,	NULL,			NULL		}, /* 396 */
+	{ 5,	0,	NULL,			NULL		}, /* 397 */
+	{ 5,	0,	NULL,			NULL		}, /* 398 */
+	{ 5,	0,	NULL,			NULL		}, /* 399 */
 
 #ifndef __ARM_EABI__
 #if SYS_socket_subcall != 400
  #error fix me
 #endif
-	{ 8,	0,	printargs,		"socket_subcall"}, /* 400 */
+	{ 6,	0,	printargs,		"socket_subcall"}, /* 400 */
 	{ 3,	TN,	sys_socket,		"socket"	}, /* 401 */
 	{ 3,	TN,	sys_bind,		"bind"		}, /* 402 */
 	{ 3,	TN,	sys_connect,		"connect"	}, /* 403 */
@@ -451,7 +449,7 @@
 	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 413 */
 	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 414 */
 	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 415 */
-	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
+	{ 3,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
diff --git a/linux/arm/syscallent1.h b/linux/arm/syscallent1.h
index 0978e9f..3b5397d 100644
--- a/linux/arm/syscallent1.h
+++ b/linux/arm/syscallent1.h
@@ -1,5 +1,5 @@
 /* ARM specific syscalls */
-	{ 5,	0,	printargs,		"SYS_0"			}, /* 0 */
+	{ 5,	0,	NULL,			NULL				}, /* 0 */
 	{ 5,	0,	printargs,		"breakpoint"		}, /* 1 */
 	{ 5,	0,	printargs,		"cacheflush"		}, /* 2 */
 	{ 5,	0,	printargs,		"usr26"			}, /* 3 */
diff --git a/linux/dummy.h b/linux/dummy.h
index 3b8bff0..ce340b9 100644
--- a/linux/dummy.h
+++ b/linux/dummy.h
@@ -24,202 +24,136 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 /* still unfinished */
+#define	sys_add_key		printargs
+#define	sys_fanotify_init	printargs
+#define	sys_fanotify_mark	printargs
 #define	sys_ioperm		printargs
-#define	sys_syslog		printargs
 #define	sys_iopl		printargs
-#define	sys_vm86old		printargs
-#define	sys_get_kernel_syms	printargs
-#define	sys_bdflush		printargs
+#define	sys_ioprio_get		printargs
+#define	sys_ioprio_set		printargs
+#define	sys_kexec_load		printargs
+#define	sys_keyctl		printargs
+#define	sys_lookup_dcookie	printargs
+#define	sys_name_to_handle_at	printargs
+#define	sys_open_by_handle_at	printargs
+#define	sys_perf_event_open	printargs
+#define	sys_request_key		printargs
+#define	sys_sync_file_range	printargs
 #define	sys_sysfs		printargs
-#define	sys_afs_syscall		printargs
+#define	sys_vm86old		printargs
+#define	sys_vm86		printargs
 
 /* machine-specific */
 #ifndef I386
 #define	sys_modify_ldt		printargs
 #ifndef M68K
-#define sys_get_thread_area	printargs
-#define sys_set_thread_area	printargs
+#define	sys_get_thread_area	printargs
+#define	sys_set_thread_area	printargs
 #endif
 #endif
 
-#define sys_sched_yield		printargs
-#define sys_sched_get_priority_max sys_sched_get_priority_min
-#define sys_sched_rr_get_interval printargs
-
 /* like another call */
-#define	sys_uselib		sys_chdir
-#define	sys_umount		sys_chdir
-#define	sys_swapon		sys_chdir
-#define	sys_swapoff		sys_chdir
+#define	sys_acct		sys_chdir
+#define	sys_chroot		sys_chdir
+#define	sys_clock_getres	sys_clock_gettime
 #define	sys_delete_module	sys_open
+#define	sys_dup			sys_close
 #define	sys_fchdir		sys_close
-#define	sys_getgid		sys_getuid
+#define	sys_fdatasync		sys_close
+#define	sys_fsync		sys_close
 #define	sys_getegid		sys_getuid
 #define	sys_geteuid		sys_getuid
+#define	sys_getgid		sys_getuid
+#define	sys_getresgid		sys_getresuid
+#define	sys_mlock		sys_munmap
+#define	sys_mq_unlink		sys_chdir
+#define	sys_munlock		sys_munmap
+#define	sys_pivotroot		sys_link
+#define	sys_rename		sys_link
+#define	sys_rmdir		sys_chdir
+#define	sys_sched_get_priority_max	sys_sched_get_priority_min
+#define	sys_set_robust_list	sys_munmap
 #define	sys_setfsgid		sys_setfsuid
-#define	sys_acct		sys_chdir
-#define sys_fdatasync		sys_close
-#define sys_mlock		sys_munmap
-#define sys_munlock		sys_munmap
-#define sys_clock_getres	sys_clock_gettime
-#define sys_mq_unlink		sys_unlink
+#define	sys_setgid		sys_setuid
+#define	sys_setns		sys_inotify_rm_watch
+#define	sys_setregid		sys_setreuid
+#define	sys_setresgid		sys_setresuid
+#define	sys_swapoff		sys_chdir
+#define	sys_symlink		sys_link
+#define	sys_syncfs		sys_close
+#define	sys_umount		sys_chdir
+#define	sys_unlink		sys_chdir
+#define	sys_uselib		sys_chdir
 
 /* printargs does the right thing */
-#define	sys_setup		printargs
-#define	sys_getpid		printargs
-#define	sys_pause		printargs
-#define	sys_sync		printargs
-#define	sys_getppid		printargs
-#define	sys_getpgrp		printargs
-#define	sys_setsid		printargs
-#define	sys_vhangup		printargs
-#define	sys_idle		printargs
 #define	sys_getpgid		printargs
-#define sys_munlockall		printargs
-#define sys_timer_getoverrun	printargs
-#define sys_timer_delete	printargs
+#define	sys_getpid		printargs
+#define	sys_getppid		printargs
+#define	sys_gettid		printargs
+#define	sys_idle		printargs
+#define	sys_inotify_init	printargs
+#define	sys_munlockall		printargs
+#define	sys_pause		printargs
+#define	sys_rt_sigreturn	printargs
+#define	sys_sched_yield		printargs
+#define	sys_setsid		printargs
+#define	sys_set_tid_address	printargs
+#define	sys_setup		printargs
+#define	sys_sync		printargs
+#define	sys_timer_delete	printargs
+#define	sys_timer_getoverrun	printargs
+#define	sys_vhangup		printargs
 
-/* subcall entry points */
-#define	sys_socketcall		printargs
-#define	sys_ipc			printargs
+/* printargs_lu/ld does the right thing */
+#define	sys_alarm		printargs_lu
+#define	sys_getpgrp		printargs_lu
+#define	sys_getsid		printargs_lu
+#define	sys_nice		printargs_ld
+#define	sys_setpgid		printargs_lu
+#define	sys_setpgrp		printargs_lu
 
 /* unimplemented */
-#define	sys_stty		printargs
-#define	sys_gtty		printargs
+#define	sys_afs_syscall		printargs
+#define	sys_break		printargs
 #define	sys_ftime		printargs
-#define	sys_prof		printargs
-#define	sys_phys		printargs
+#define	sys_get_kernel_syms	printargs
+#define	sys_gtty		printargs
 #define	sys_lock		printargs
 #define	sys_mpx			printargs
-#define	sys_ulimit		printargs
+#define	sys_nfsservctl		printargs
+#define	sys_phys		printargs
 #define	sys_profil		printargs
+#define	sys_prof		printargs
+#define	sys_security		printargs
+#define	sys_stty		printargs
+#define	sys_tuxcall		printargs
+#define	sys_ulimit		printargs
 #define	sys_ustat		printargs
-#define	sys_break		printargs
+#define	sys_vserver		printargs
 
 /* deprecated */
-#define	sys_olduname		printargs
+#define	sys_bdflush		printargs
 #define	sys_oldolduname		printargs
+#define	sys_olduname		printargs
 
 /* no library support */
 #ifndef HAVE_SENDMSG
-#define sys_sendmsg		printargs
-#define sys_recvmsg		printargs
+#define	sys_recvmsg		printargs
+#define	sys_sendmsg		printargs
 #endif
 
 #ifndef SYS_getpmsg
-#define sys_getpmsg		printargs
+#define	sys_getpmsg		printargs
 #endif
 #ifndef SYS_putpmsg
-#define sys_putpmsg		printargs
+#define	sys_putpmsg		printargs
 #endif
 
 #ifndef HAVE_STRUCT___OLD_KERNEL_STAT
-#define sys_oldstat		printargs
-#define sys_oldfstat		printargs
-#define sys_oldlstat		printargs
-#endif
-
-#if DONE
-#define sys_oldselect		printargs
-#define	sys_msync		printargs
-#define	sys_flock		printargs
-#define	sys_getdents		printargs
-#define	sys_stime		printargs
-#define	sys_time		printargs
-#define	sys_times		printargs
-#define	sys_mount		printargs
-#define	sys_nice		printargs
-#define	sys_mprotect		printargs
-#define	sys_sigprocmask		printargs
-#define	sys_adjtimex		printargs
-#define	sys_sysinfo		printargs
-#define	sys_ipc			printargs
-#define	sys_setdomainname	printargs
-#define	sys_statfs		printargs
-#define	sys_fstatfs		printargs
-#define	sys_ptrace		printargs
-#define	sys_sigreturn		printargs
-#define	sys_fsync		printargs
-#define	sys_alarm		printargs
-#define	sys_socketcall		printargs
-#define	sys_sigsuspend		printargs
-#define	sys_utime		printargs
-#define	sys_brk			printargs
-#define	sys_mmap		printargs
-#define	sys_munmap		printargs
-#define	sys_select		printargs
-#define	sys_setuid		printargs
-#define	sys_setgid		printargs
-#define	sys_setreuid		printargs
-#define	sys_setregid		printargs
-#define	sys_getgroups		printargs
-#define	sys_setgroups		printargs
-#define	sys_setrlimit		printargs
-#define	sys_getrlimit		printargs
-#define	sys_getrusage		printargs
-#define	sys_getpriority		printargs
-#define	sys_setpriority		printargs
-#define	sys_setpgid		printargs
-#define	sys_access		printargs
-#define	sys_sethostname		printargs
-#define	sys_readdir		printargs
-#define	sys_waitpid		printargs
-#define	sys_wait4		printargs
-#define	sys_execve		printargs
-#define	sys_fork		printargs
-#define	sys_uname		printargs
-#define	sys_pipe		printargs
-#define	sys_siggetmask		printargs
-#define	sys_sigsetmask		printargs
-#define	sys_exit		printargs
-#define	sys_kill		printargs
-#define	sys_signal		printargs
-#define	sys_sigaction		printargs
-#define	sys_sigpending		printargs
-#define	sys_fcntl		printargs
-#define	sys_dup			printargs
-#define	sys_dup2		printargs
-#define	sys_close		printargs
-#define	sys_ioctl		printargs
-#define	sys_read		printargs
-#define	sys_write		printargs
-#define	sys_open		printargs
-#define	sys_creat		printargs
-#define	sys_link		printargs
-#define	sys_unlink		printargs
-#define	sys_chdir		printargs
-#define	sys_mknod		printargs
-#define	sys_chmod		printargs
-#define	sys_chown		printargs
-#define	sys_lseek		printargs
-#define	sys_rename		printargs
-#define	sys_mkdir		printargs
-#define	sys_rmdir		printargs
-#define	sys_umask		printargs
-#define	sys_chroot		printargs
-#define	sys_gettimeofday	printargs
-#define	sys_settimeofday	printargs
-#define	sys_symlink		printargs
-#define	sys_readlink		printargs
-#define	sys_truncate		printargs
-#define	sys_ftruncate		printargs
-#define	sys_fchmod		printargs
-#define	sys_fchown		printargs
-#define	sys_setitimer		printargs
-#define	sys_getitimer		printargs
-#define	sys_stat		printargs
-#define	sys_lstat		printargs
-#define	sys_fstat		printargs
-#define	sys_personality		printargs
-#define sys_poll		printargs
-#define	sys_create_module	printargs
-#define	sys_init_module		printargs
-#define	sys_quotactl		printargs
-#define sys_mlockall		printargs
-#define	sys_reboot		printargs
+#define	sys_oldfstat		printargs
+#define	sys_oldlstat		printargs
+#define	sys_oldstat		printargs
 #endif
diff --git a/linux/errnoent.h b/linux/errnoent.h
index c52d1d0..e43bff5 100644
--- a/linux/errnoent.h
+++ b/linux/errnoent.h
@@ -135,7 +135,7 @@
 	"EOWNERDEAD", /* 130 */
 	"ENOTRECOVERABLE", /* 131 */
 	"ERFKILL", /* 132 */
-	"ERRNO_133", /* 133 */
+	"EHWPOISON", /* 133 */
 	"ERRNO_134", /* 134 */
 	"ERRNO_135", /* 135 */
 	"ERRNO_136", /* 136 */
diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h
index 6e2d466..4092f2e 100644
--- a/linux/i386/syscallent.h
+++ b/linux/i386/syscallent.h
@@ -24,22 +24,20 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall" }, /* 0 */
-	{ 1,	TP,	sys_exit,		"_exit", SYS_exit }, /* 1 */
-	{ 0,	TP,	sys_fork,		"fork", SYS_fork }, /* 2 */
-	{ 3,	TD,	sys_read,		"read", SYS_read }, /* 3 */
-	{ 3,	TD,	sys_write,		"write", SYS_write }, /* 4 */
+	{ 1,	TP,	sys_exit,		"_exit",	}, /* 1 */
+	{ 0,	TP,	sys_fork,		"fork",		}, /* 2 */
+	{ 3,	TD,	sys_read,		"read",		}, /* 3 */
+	{ 3,	TD,	sys_write,		"write",	}, /* 4 */
 	{ 3,	TD|TF,	sys_open,		"open"		}, /* 5 */
 	{ 1,	TD,	sys_close,		"close"		}, /* 6 */
-	{ 3,	TP,	sys_waitpid,		"waitpid", SYS_wait4 }, /* 7 */
+	{ 3,	TP,	sys_waitpid,		"waitpid",	}, /* 7 */
 	{ 2,	TD|TF,	sys_creat,		"creat"		}, /* 8 */
 	{ 2,	TF,	sys_link,		"link"		}, /* 9 */
 	{ 1,	TF,	sys_unlink,		"unlink"	}, /* 10 */
-	{ 3,	TF|TP,	sys_execve,		"execve", SYS_execve }, /* 11 */
+	{ 3,	TF|TP,	sys_execve,		"execve"	}, /* 11 */
 	{ 1,	TF,	sys_chdir,		"chdir"		}, /* 12 */
 	{ 1,	0,	sys_time,		"time"		}, /* 13 */
 	{ 3,	TF,	sys_mknod,		"mknod"		}, /* 14 */
@@ -96,8 +94,8 @@
 	{ 0,	0,	sys_getpgrp,		"getpgrp"	}, /* 65 */
 	{ 0,	0,	sys_setsid,		"setsid"	}, /* 66 */
 	{ 3,	TS,	sys_sigaction,		"sigaction"	}, /* 67 */
-	{ 0,	TS,	sys_siggetmask,		"siggetmask"	}, /* 68 */
-	{ 1,	TS,	sys_sigsetmask,		"sigsetmask"	}, /* 69 */
+	{ 0,	TS,	sys_siggetmask,		"sgetmask"	}, /* 68 */
+	{ 1,	TS,	sys_sigsetmask,		"ssetmask"	}, /* 69 */
 	{ 2,	0,	sys_setreuid,		"setreuid"	}, /* 70 */
 	{ 2,	0,	sys_setregid,		"setregid"	}, /* 71 */
 	{ 3,	TS,	sys_sigsuspend,		"sigsuspend"	}, /* 72 */
@@ -115,8 +113,8 @@
 	{ 2,	TF,	sys_oldlstat,		"oldlstat"	}, /* 84 */
 	{ 3,	TF,	sys_readlink,		"readlink"	}, /* 85 */
 	{ 1,	TF,	sys_uselib,		"uselib"	}, /* 86 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 87 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 88 */
+	{ 2,	TF,	sys_swapon,		"swapon"	}, /* 87 */
+	{ 4,	0,	sys_reboot,		"reboot"	}, /* 88 */
 	{ 3,	TD,	sys_readdir,		"readdir"	}, /* 89 */
 	{ 6,	TD,	sys_old_mmap,		"old_mmap"	}, /* 90 */
 	{ 2,	0,	sys_munmap,		"munmap"	}, /* 91 */
@@ -130,7 +128,7 @@
 	{ 2,	TF,	sys_statfs,		"statfs"	}, /* 99 */
 	{ 2,	TD,	sys_fstatfs,		"fstatfs"	}, /* 100 */
 	{ 3,	0,	sys_ioperm,		"ioperm"	}, /* 101 */
-	{ 2,	TD,	sys_socketcall,		"socketcall", SYS_socketcall }, /* 102 */
+	{ 2,	TD,	sys_socketcall,		"socketcall"	}, /* 102 */
 	{ 3,	0,	sys_syslog,		"syslog"	}, /* 103 */
 	{ 3,	0,	sys_setitimer,		"setitimer"	}, /* 104 */
 	{ 2,	0,	sys_getitimer,		"getitimer"	}, /* 105 */
@@ -142,13 +140,13 @@
 	{ 0,	0,	sys_vhangup,		"vhangup"	}, /* 111 */
 	{ 0,	0,	sys_idle,		"idle"		}, /* 112 */
 	{ 1,	0,	sys_vm86old,		"vm86old"	}, /* 113 */
-	{ 4,	TP,	sys_wait4,		"wait4", SYS_wait4 }, /* 114 */
+	{ 4,	TP,	sys_wait4,		"wait4",	}, /* 114 */
 	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 115 */
 	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 116 */
-	{ 6,	0,	sys_ipc,		"ipc", SYS_ipc }, /* 117 */
+	{ 6,	TI,	sys_ipc,		"ipc",		}, /* 117 */
 	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 118 */
-	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
-	{ 5,	TP,	sys_clone,		"clone", SYS_clone }, /* 120 */
+	{ 0,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
+	{ 5,	TP,	sys_clone,		"clone"		}, /* 120 */
 	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 121 */
 	{ 1,	0,	sys_uname,		"uname"		}, /* 122 */
 	{ 3,	0,	sys_modify_ldt,		"modify_ldt"	}, /* 123 */
@@ -163,7 +161,7 @@
 	{ 1,	0,	sys_getpgid,		"getpgid"	}, /* 132 */
 	{ 1,	TD,	sys_fchdir,		"fchdir"	}, /* 133 */
 	{ 0,	0,	sys_bdflush,		"bdflush"	}, /* 134 */
-	{ 3,	0,	sys_sysfs,		"sysfs", SYS_sysfs }, /* 135 */
+	{ 3,	0,	sys_sysfs,		"sysfs",	}, /* 135 */
 	{ 1,	0,	sys_personality,	"personality"	}, /* 136 */
 	{ 5,	0,	sys_afs_syscall,	"afs_syscall"	}, /* 137 */
 	{ 1,	NF,	sys_setfsuid,		"setfsuid"	}, /* 138 */
@@ -173,14 +171,14 @@
 	{ 5,	TD,	sys_select,		"select"	}, /* 142 */
 	{ 2,	TD,	sys_flock,		"flock"		}, /* 143 */
 	{ 3,	0,	sys_msync,		"msync"		}, /* 144 */
-	{ 3,	TD,	sys_readv,		"readv", SYS_readv }, /* 145 */
-	{ 3,	TD,	sys_writev,		"writev", SYS_writev }, /* 146 */
+	{ 3,	TD,	sys_readv,		"readv",	}, /* 145 */
+	{ 3,	TD,	sys_writev,		"writev",	}, /* 146 */
 	{ 1,	0,	sys_getsid,		"getsid"	}, /* 147 */
 	{ 1,	TD,	sys_fdatasync,		"fdatasync"	}, /* 148 */
 	{ 1,	0,	sys_sysctl,		"_sysctl"	}, /* 149 */
 	{ 2,	0,	sys_mlock,		"mlock"		}, /* 150 */
 	{ 2,	0,	sys_munlock,		"munlock"	}, /* 151 */
-	{ 2,	0,	sys_mlockall,		"mlockall"	}, /* 152 */
+	{ 1,	0,	sys_mlockall,		"mlockall"	}, /* 152 */
 	{ 0,	0,	sys_munlockall,		"munlockall"	}, /* 153 */
 	{ 0,	0,	sys_sched_setparam,	"sched_setparam"}, /* 154 */
 	{ 2,	0,	sys_sched_getparam,	"sched_getparam"}, /* 155 */
@@ -194,23 +192,23 @@
 	{ 5,	0,	sys_mremap,		"mremap"	}, /* 163 */
 	{ 3,	0,	sys_setresuid,		"setresuid"	}, /* 164 */
 	{ 3,	0,	sys_getresuid,		"getresuid"	}, /* 165 */
-	{ 5,	0,	printargs,		"vm86"		}, /* 166 */
+	{ 5,	0,	sys_vm86,		"vm86"		}, /* 166 */
 	{ 5,	0,	sys_query_module,	"query_module"	}, /* 167 */
 	{ 3,	TD,	sys_poll,		"poll"		}, /* 168 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 169 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	}, /* 169 */
 	{ 3,	0,	sys_setresgid,		"setresgid"	}, /* 170 */
 	{ 3,	0,	sys_getresgid,		"getresgid"	}, /* 171 */
 	{ 5,	0,	sys_prctl,		"prctl"		}, /* 172 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 173 */
-	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"  }, /* 174 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	}, /* 173 */
+	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	}, /* 174 */
 	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 175 */
 	{ 2,	TS,	sys_rt_sigpending,	"rt_sigpending"	}, /* 176 */
 	{ 4,	TS,	sys_rt_sigtimedwait,	"rt_sigtimedwait"}, /* 177 */
 	{ 3,	TS,	sys_rt_sigqueueinfo,    "rt_sigqueueinfo"}, /* 178 */
 	{ 2,	TS,	sys_rt_sigsuspend,	"rt_sigsuspend"	}, /* 179 */
 
-	{ 5,	TD,	sys_pread,		"pread64", SYS_read }, /* 180 */
-	{ 5,	TD,	sys_pwrite,		"pwrite64", SYS_write }, /* 181 */
+	{ 5,	TD,	sys_pread,		"pread64",	}, /* 180 */
+	{ 5,	TD,	sys_pwrite,		"pwrite64",	}, /* 181 */
 	{ 3,	TF,	sys_chown,		"chown"		}, /* 182 */
 	{ 2,	TF,	sys_getcwd,		"getcwd"	}, /* 183 */
 	{ 2,	0,	sys_capget,		"capget"	}, /* 184 */
@@ -219,7 +217,7 @@
 	{ 4,	TD|TN,	sys_sendfile,		"sendfile"	}, /* 187 */
 	{ 5,	0,	sys_getpmsg,		"getpmsg"	}, /* 188 */
 	{ 5,	0,	sys_putpmsg,		"putpmsg"	}, /* 189 */
-	{ 0,	TP,	sys_vfork,		"vfork", SYS_vfork }, /* 190 */
+	{ 0,	TP,	sys_vfork,		"vfork"		}, /* 190 */
 	{ 2,	0,	sys_getrlimit,		"getrlimit"	}, /* 191 */
 	{ 6,	TD,	sys_mmap,		"mmap2"		}, /* 192 */
 	{ 3,	TF,	sys_truncate64,		"truncate64"	}, /* 193 */
@@ -252,9 +250,9 @@
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 219 */
 	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
 	{ 3,	TD,	sys_fcntl,		"fcntl64"	}, /* 221 */
-	{ 4,	0,	printargs,		"SYS_222"	}, /* 222 */
-/*TODO*/{ 5,	0,	printargs,		"security"	}, /* 223 */
-	{ 0,	0,	printargs,		"gettid"	}, /* 224 */
+	{ 6,	0,	NULL,			NULL		}, /* 222 */
+	{ 5,	0,	sys_security,		"security"	}, /* 223 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 224 */
 	{ 4,	TD,	sys_readahead,		"readahead"	}, /* 225 */
 	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 226 */
 	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 227 */
@@ -281,14 +279,14 @@
 	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 248 */
 	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 249 */
 	{ 5,	TD,	sys_fadvise64,		"fadvise64"	}, /* 250 */
-	{ 5,	0,	printargs,		"SYS_251"	}, /* 251 */
-	{ 1,	TP,	sys_exit,		"exit_group", __NR_exit_group }, /* 252 */
-	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 253 */
+	{ 6,	0,	NULL,			NULL		}, /* 251 */
+	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 252 */
+	{ 4,	0,	sys_lookup_dcookie,	"lookup_dcookie"}, /* 253 */
 	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 254 */
 	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 255 */
 	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 256 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 257 */
-	{ 1,	0,	printargs,		"set_tid_address"}, /* 258 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address"}, /* 258 */
 	{ 3,	0,	sys_timer_create,	"timer_create"	}, /* 259 */
 	{ 4,	0,	sys_timer_settime,	"timer_settime"	}, /* 260 */
 	{ 2,	0,	sys_timer_gettime,	"timer_gettime"	}, /* 261 */
@@ -303,7 +301,7 @@
 	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 270 */
 	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 271 */
 	{ 6,	TD,	sys_fadvise64_64,	"fadvise64_64"	}, /* 272 */
-	{ 5,	0,	printargs,		"vserver"	}, /* 273 */
+	{ 5,	0,	sys_vserver,		"vserver"	}, /* 273 */
 	{ 6,	0,	sys_mbind,		"mbind"		}, /* 274 */
 	{ 5,	0,	sys_get_mempolicy,	"get_mempolicy"	}, /* 275 */
 	{ 3,	0,	sys_set_mempolicy,	"set_mempolicy"	}, /* 276 */
@@ -313,18 +311,18 @@
 	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive" }, /* 280 */
 	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 281 */
 	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 282 */
-	{ 5,	0,	printargs,		"kexec_load"	}, /* 283 */
-	{ 5,	TP,	sys_waitid,		"waitid", SYS_waitid }, /* 284 */
-	{ 5,	0,	printargs,		"SYS_285"	}, /* 285 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 286 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 287 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 288 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 289 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 290 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 291 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 283 */
+	{ 5,	TP,	sys_waitid,		"waitid",	}, /* 284 */
+	{ 6,	0,	NULL,			NULL		}, /* 285 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 286 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 287 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 288 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 289 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 290 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 291 */
 	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 292 */
 	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 293 */
-	{ 4,	0,	printargs,		"migrate_pages"	}, /* 294 */
+	{ 4,	0,	sys_migrate_pages,	"migrate_pages"	}, /* 294 */
 	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 295 */
 	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 296 */
 	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 297 */
@@ -341,15 +339,15 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 308 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 309 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 310 */
-	{ 2,	0,	printargs,		"set_robust_list" }, /* 311 */
-	{ 3,	0,	printargs,		"get_robust_list" }, /* 312 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 313 */
-	{ 4,	TD,	printargs,		"sync_file_range" }, /* 314 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 316 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 311 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 312 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 313 */
+	{ 4,	TD,	sys_sync_file_range,	"sync_file_range" }, /* 314 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 315 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 316 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 318 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 320 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 321 */
 	{ 2,	TD,	sys_timerfd_create,	"timerfd_create"}, /* 322 */
@@ -363,78 +361,78 @@
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 330 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 331 */
 	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 332 */
-	{ 5,	TD,	printargs,		"preadv"	}, /* 333 */
-	{ 5,	TD,	printargs,		"pwritev"	}, /* 334 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"}, /* 335 */
-	{ 5,	TD,	printargs,		"perf_event_open"}, /* 336 */
+	{ 5,	TD,	sys_preadv,		"preadv"	}, /* 333 */
+	{ 5,	TD,	sys_pwritev,		"pwritev"	}, /* 334 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo"}, /* 335 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open"}, /* 336 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 337 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 338 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 339 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 340 */
-	{ 5,	0,	printargs,		"SYS_341"	}, /* 341 */
-	{ 5,	0,	printargs,		"SYS_342"	}, /* 342 */
-	{ 5,	0,	printargs,		"SYS_343"	}, /* 343 */
-	{ 5,	0,	printargs,		"SYS_344"	}, /* 344 */
-	{ 5,	0,	printargs,		"SYS_345"	}, /* 345 */
-	{ 5,	0,	printargs,		"SYS_346"	}, /* 346 */
-	{ 5,	0,	printargs,		"SYS_347"	}, /* 347 */
-	{ 5,	0,	printargs,		"SYS_348"	}, /* 348 */
-	{ 5,	0,	printargs,		"SYS_349"	}, /* 349 */
-	{ 5,	0,	printargs,		"SYS_350"	}, /* 350 */
-	{ 5,	0,	printargs,		"SYS_351"	}, /* 351 */
-	{ 5,	0,	printargs,		"SYS_352"	}, /* 352 */
-	{ 5,	0,	printargs,		"SYS_353"	}, /* 353 */
-	{ 5,	0,	printargs,		"SYS_354"	}, /* 354 */
-	{ 5,	0,	printargs,		"SYS_355"	}, /* 355 */
-	{ 5,	0,	printargs,		"SYS_356"	}, /* 356 */
-	{ 5,	0,	printargs,		"SYS_357"	}, /* 357 */
-	{ 5,	0,	printargs,		"SYS_358"	}, /* 358 */
-	{ 5,	0,	printargs,		"SYS_359"	}, /* 359 */
-	{ 5,	0,	printargs,		"SYS_360"	}, /* 360 */
-	{ 5,	0,	printargs,		"SYS_361"	}, /* 361 */
-	{ 5,	0,	printargs,		"SYS_362"	}, /* 362 */
-	{ 5,	0,	printargs,		"SYS_363"	}, /* 363 */
-	{ 5,	0,	printargs,		"SYS_364"	}, /* 364 */
-	{ 5,	0,	printargs,		"SYS_365"	}, /* 365 */
-	{ 5,	0,	printargs,		"SYS_366"	}, /* 366 */
-	{ 5,	0,	printargs,		"SYS_367"	}, /* 367 */
-	{ 5,	0,	printargs,		"SYS_368"	}, /* 368 */
-	{ 5,	0,	printargs,		"SYS_369"	}, /* 369 */
-	{ 5,	0,	printargs,		"SYS_370"	}, /* 370 */
-	{ 5,	0,	printargs,		"SYS_371"	}, /* 371 */
-	{ 5,	0,	printargs,		"SYS_372"	}, /* 372 */
-	{ 5,	0,	printargs,		"SYS_373"	}, /* 373 */
-	{ 5,	0,	printargs,		"SYS_374"	}, /* 374 */
-	{ 5,	0,	printargs,		"SYS_375"	}, /* 375 */
-	{ 5,	0,	printargs,		"SYS_376"	}, /* 376 */
-	{ 5,	0,	printargs,		"SYS_377"	}, /* 377 */
-	{ 5,	0,	printargs,		"SYS_378"	}, /* 378 */
-	{ 5,	0,	printargs,		"SYS_379"	}, /* 379 */
-	{ 5,	0,	printargs,		"SYS_380"	}, /* 380 */
-	{ 5,	0,	printargs,		"SYS_381"	}, /* 381 */
-	{ 5,	0,	printargs,		"SYS_382"	}, /* 382 */
-	{ 5,	0,	printargs,		"SYS_383"	}, /* 383 */
-	{ 5,	0,	printargs,		"SYS_384"	}, /* 384 */
-	{ 5,	0,	printargs,		"SYS_385"	}, /* 385 */
-	{ 5,	0,	printargs,		"SYS_386"	}, /* 386 */
-	{ 5,	0,	printargs,		"SYS_387"	}, /* 387 */
-	{ 5,	0,	printargs,		"SYS_388"	}, /* 388 */
-	{ 5,	0,	printargs,		"SYS_389"	}, /* 389 */
-	{ 5,	0,	printargs,		"SYS_390"	}, /* 390 */
-	{ 5,	0,	printargs,		"SYS_391"	}, /* 391 */
-	{ 5,	0,	printargs,		"SYS_392"	}, /* 392 */
-	{ 5,	0,	printargs,		"SYS_393"	}, /* 393 */
-	{ 5,	0,	printargs,		"SYS_394"	}, /* 394 */
-	{ 5,	0,	printargs,		"SYS_395"	}, /* 395 */
-	{ 5,	0,	printargs,		"SYS_396"	}, /* 396 */
-	{ 5,	0,	printargs,		"SYS_397"	}, /* 397 */
-	{ 5,	0,	printargs,		"SYS_398"	}, /* 398 */
-	{ 5,	0,	printargs,		"SYS_399"	}, /* 399 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 338 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 339 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 340 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 341 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 342 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 343 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 344 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 345 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 346 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 347 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 348 */
+	{ 5,	0,	NULL,			NULL		}, /* 349 */
+	{ 5,	0,	NULL,			NULL		}, /* 350 */
+	{ 5,	0,	NULL,			NULL		}, /* 351 */
+	{ 5,	0,	NULL,			NULL		}, /* 352 */
+	{ 5,	0,	NULL,			NULL		}, /* 353 */
+	{ 5,	0,	NULL,			NULL		}, /* 354 */
+	{ 5,	0,	NULL,			NULL		}, /* 355 */
+	{ 5,	0,	NULL,			NULL		}, /* 356 */
+	{ 5,	0,	NULL,			NULL		}, /* 357 */
+	{ 5,	0,	NULL,			NULL		}, /* 358 */
+	{ 5,	0,	NULL,			NULL		}, /* 359 */
+	{ 5,	0,	NULL,			NULL		}, /* 360 */
+	{ 5,	0,	NULL,			NULL		}, /* 361 */
+	{ 5,	0,	NULL,			NULL		}, /* 362 */
+	{ 5,	0,	NULL,			NULL		}, /* 363 */
+	{ 5,	0,	NULL,			NULL		}, /* 364 */
+	{ 5,	0,	NULL,			NULL		}, /* 365 */
+	{ 5,	0,	NULL,			NULL		}, /* 366 */
+	{ 5,	0,	NULL,			NULL		}, /* 367 */
+	{ 5,	0,	NULL,			NULL		}, /* 368 */
+	{ 5,	0,	NULL,			NULL		}, /* 369 */
+	{ 5,	0,	NULL,			NULL		}, /* 370 */
+	{ 5,	0,	NULL,			NULL		}, /* 371 */
+	{ 5,	0,	NULL,			NULL		}, /* 372 */
+	{ 5,	0,	NULL,			NULL		}, /* 373 */
+	{ 5,	0,	NULL,			NULL		}, /* 374 */
+	{ 5,	0,	NULL,			NULL		}, /* 375 */
+	{ 5,	0,	NULL,			NULL		}, /* 376 */
+	{ 5,	0,	NULL,			NULL		}, /* 377 */
+	{ 5,	0,	NULL,			NULL		}, /* 378 */
+	{ 5,	0,	NULL,			NULL		}, /* 379 */
+	{ 5,	0,	NULL,			NULL		}, /* 380 */
+	{ 5,	0,	NULL,			NULL		}, /* 381 */
+	{ 5,	0,	NULL,			NULL		}, /* 382 */
+	{ 5,	0,	NULL,			NULL		}, /* 383 */
+	{ 5,	0,	NULL,			NULL		}, /* 384 */
+	{ 5,	0,	NULL,			NULL		}, /* 385 */
+	{ 5,	0,	NULL,			NULL		}, /* 386 */
+	{ 5,	0,	NULL,			NULL		}, /* 387 */
+	{ 5,	0,	NULL,			NULL		}, /* 388 */
+	{ 5,	0,	NULL,			NULL		}, /* 389 */
+	{ 5,	0,	NULL,			NULL		}, /* 390 */
+	{ 5,	0,	NULL,			NULL		}, /* 391 */
+	{ 5,	0,	NULL,			NULL		}, /* 392 */
+	{ 5,	0,	NULL,			NULL		}, /* 393 */
+	{ 5,	0,	NULL,			NULL		}, /* 394 */
+	{ 5,	0,	NULL,			NULL		}, /* 395 */
+	{ 5,	0,	NULL,			NULL		}, /* 396 */
+	{ 5,	0,	NULL,			NULL		}, /* 397 */
+	{ 5,	0,	NULL,			NULL		}, /* 398 */
+	{ 5,	0,	NULL,			NULL		}, /* 399 */
 
 #if SYS_socket_subcall != 400
  #error fix me
 #endif
-	{ 8,	0,	printargs,		"socket_subcall"}, /* 400 */
+	{ 6,	0,	printargs,		"socket_subcall"}, /* 400 */
 	{ 3,	TN,	sys_socket,		"socket"	}, /* 401 */
 	{ 3,	TN,	sys_bind,		"bind"		}, /* 402 */
 	{ 3,	TN,	sys_connect,		"connect"	}, /* 403 */
@@ -443,14 +441,14 @@
 	{ 3,	TN,	sys_getsockname,	"getsockname"	}, /* 406 */
 	{ 3,	TN,	sys_getpeername,	"getpeername"	}, /* 407 */
 	{ 4,	TN,	sys_socketpair,		"socketpair"	}, /* 408 */
-	{ 4,	TN,	sys_send,		"send", SYS_sub_send }, /* 409 */
-	{ 4,	TN,	sys_recv,		"recv", SYS_sub_recv }, /* 410 */
-	{ 6,	TN,	sys_sendto,		"sendto", SYS_sub_sendto }, /* 411 */
-	{ 6,	TN,	sys_recvfrom,		"recvfrom", SYS_sub_recvfrom }, /* 412 */
+	{ 4,	TN,	sys_send,		"send",		}, /* 409 */
+	{ 4,	TN,	sys_recv,		"recv",		}, /* 410 */
+	{ 6,	TN,	sys_sendto,		"sendto",	}, /* 411 */
+	{ 6,	TN,	sys_recvfrom,		"recvfrom",	}, /* 412 */
 	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 413 */
 	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 414 */
 	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 415 */
-	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
+	{ 3,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
 	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
diff --git a/linux/ioctlent.sh b/linux/ioctlent.sh
old mode 100644
new mode 100755
index 65b005d..9bcff5f
--- a/linux/ioctlent.sh
+++ b/linux/ioctlent.sh
@@ -1,5 +1,4 @@
 #! /bin/sh
-#
 # Copyright (c) 2001 Wichert Akkerman <wichert@cistron.nl>
 # All rights reserved.
 #
@@ -24,9 +23,6 @@
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#	$Id$
-#
 
 # Validate arg count.
 case $# in
@@ -57,7 +53,6 @@
 		>> ioctls.h
 }
 
-
 > ioctls.h
 
 lookup_ioctls 03 linux/hdreg.h
@@ -102,7 +97,6 @@
 # Sort and drop dups?
 # sort -u <ioctls.h >ioctls1.h && mv ioctls1.h ioctls.h
 
-
 > ioctldefs.h
 
 # Collect potential ioctl names. ('bases' is a bad name. Sigh)
diff --git a/linux/ioctlsort.c b/linux/ioctlsort.c
index 6ee6c07..dab30f1 100644
--- a/linux/ioctlsort.c
+++ b/linux/ioctlsort.c
@@ -22,16 +22,14 @@
 
 int nioctls = sizeof(ioctls) / sizeof(ioctls[0]);
 
-
 int compare(const void* a, const void* b) {
 	unsigned long code1 = ((struct ioctlent *) a)->code;
 	unsigned long code2 = ((struct ioctlent *) b)->code;
 	const char *name1 = ((struct ioctlent *) a)->name;
 	const char *name2 = ((struct ioctlent *) b)->name;
-	return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp (name1, name2);
+	return (code1 > code2) ? 1 : (code1 < code2) ? -1 : strcmp(name1, name2);
 }
 
-
 int main(int argc, char** argv) {
 	int i;
 
@@ -41,10 +39,10 @@
 				  (_IOC_TYPEMASK << _IOC_TYPESHIFT);
 
 	qsort(ioctls, nioctls, sizeof(ioctls[0]), compare);
-	puts ("\t/* Generated by ioctlsort */");
+	puts("\t/* Generated by ioctlsort */");
 	for (i = 0; i < nioctls; i++)
 		if (i == 0 || ioctls[i].code != ioctls[i-1].code ||
-		    strcmp (ioctls[i].name, ioctls[i-1].name))
+		    strcmp(ioctls[i].name, ioctls[i-1].name))
 			printf("\t{\"%s\",\t\"%s\",\t%#06lx},\n",
 				ioctls[i].header, ioctls[i].name, ioctls[i].code);
 
diff --git a/linux/mips/ioctlent.sh b/linux/mips/ioctlent.sh
index dd5fd9d..52d8df5 100755
--- a/linux/mips/ioctlent.sh
+++ b/linux/mips/ioctlent.sh
@@ -26,8 +26,6 @@
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#	$Id$
 
 # Files to find.
 file_find='asm/*.h linux/*.h scsi/*.h'
diff --git a/linux/mips/syscallent.h b/linux/mips/syscallent.h
index 913d3d9..ebb93f9 100644
--- a/linux/mips/syscallent.h
+++ b/linux/mips/syscallent.h
@@ -1,4 +1,4 @@
-#include "dummy.h"
+#include "../dummy.h"
 
 	{ 0,	0,	printargs,		"svr4_syscall"	}, /*  000 */
 	{ 0,	0,	printargs,		"svr4_exit"	}, /*  001 */
@@ -64,18 +64,18 @@
 	{ 0,	0,	printargs,		"svr4_chroot"	}, /*  061 */
 	{ 0,	0,	printargs,		"svr4_fcntl"	}, /*  062 */
 	{ 0,	0,	printargs,		"svr4_ulimit"	}, /*  063 */
-	{ 0,	0,	printargs,		"SYS_64",	}, /*  064 */
-	{ 0,	0,	printargs,		"SYS_65",	}, /*  065 */
-	{ 0,	0,	printargs,		"SYS_66",	}, /*  066 */
-	{ 0,	0,	printargs,		"SYS_67",	}, /*  067 */
-	{ 0,	0,	printargs,		"SYS_68",	}, /*  068 */
-	{ 0,	0,	printargs,		"SYS_69",	}, /*  069 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  064 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  065 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  066 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  067 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  068 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  069 */
 	{ 0,	0,	printargs,		"svr4_advfs"	}, /*  070 */
 	{ 0,	0,	printargs,		"svr4_unadvfs"	}, /*  071 */
-	{ 0,	0,	printargs,		"SYS_72",	}, /*  072 */
-	{ 0,	0,	printargs,		"SYS_73",	}, /*  073 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  072 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  073 */
 	{ 0,	0,	printargs,		"svr4_rfstart"	}, /*  074 */
-	{ 0,	0,	printargs,		"SYS_75",	}, /*  075 */
+	{ 0,	0,	NULL,			NULL	,	}, /*  075 */
 	{ 0,	0,	printargs,		"svr4_rdebug"	}, /*  076 */
 	{ 0,	0,	printargs,		"svr4_rfstop"	}, /*  077 */
 	{ 0,	0,	printargs,		"svr4_rfsys"	}, /*  078 */
@@ -105,7 +105,7 @@
 	{ 0,	0,	printargs,		"svr4_evtrapret"	}, /*  0102 */
 	{ 0,	0,	printargs,		"svr4_statvfs"	}, /*  0103 */
 	{ 0,	0,	printargs,		"svr4_fstatvfs"	}, /*  0104 */
-	{ 0,	0,	printargs,		"SYS_105",	}, /* 105 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 105 */
 	{ 0,	0,	printargs,		"svr4_nfssys"	}, /*  0106 */
 	{ 0,	0,	printargs,		"svr4_waitid"	}, /*  0107 */
 	{ 0,	0,	printargs,		"svr4_sigsendset"	}, /*  0108 */
@@ -140,67 +140,67 @@
 	{ 0,	0,	printargs,		"svr4_sysconf"	}, /*  0137 */
 	{ 0,	0,	printargs,		"svr4_adjtime"	}, /*  0138 */
 	{ 0,	0,	printargs,		"svr4_sysinfo"	}, /*  0139 */
-	{ 0,	0,	printargs,		"SYS_140",	}, /* 140 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 140 */
 	{ 0,	0,	printargs,		"svr4_seteuid"	}, /*  0141 */
 	{ 0,	0,	printargs,		"svr4_PYRAMID_statis"	}, /*  0142 */
 	{ 0,	0,	printargs,		"svr4_PYRAMID_tuning"	}, /*  0143 */
 	{ 0,	0,	printargs,		"svr4_PYRAMID_forcerr"	}, /*  0144 */
 	{ 0,	0,	printargs,		"svr4_PYRAMID_mpcntl"	}, /*  0145 */
-	{ 0,	0,	printargs,		"SYS_146",	}, /* 146 */
-	{ 0,	0,	printargs,		"SYS_147",	}, /* 147 */
-	{ 0,	0,	printargs,		"SYS_148",	}, /* 148 */
-	{ 0,	0,	printargs,		"SYS_149",	}, /* 149 */
-	{ 0,	0,	printargs,		"SYS_150",	}, /* 150 */
-	{ 0,	0,	printargs,		"SYS_151",	}, /* 151 */
-	{ 0,	0,	printargs,		"SYS_152",	}, /* 152 */
-	{ 0,	0,	printargs,		"SYS_153",	}, /* 153 */
-	{ 0,	0,	printargs,		"SYS_154",	}, /* 154 */
-	{ 0,	0,	printargs,		"SYS_155",	}, /* 155 */
-	{ 0,	0,	printargs,		"SYS_156",	}, /* 156 */
-	{ 0,	0,	printargs,		"SYS_157",	}, /* 157 */
-	{ 0,	0,	printargs,		"SYS_158",	}, /* 158 */
-	{ 0,	0,	printargs,		"SYS_159",	}, /* 159 */
-	{ 0,	0,	printargs,		"SYS_160",	}, /* 160 */
-	{ 0,	0,	printargs,		"SYS_161",	}, /* 161 */
-	{ 0,	0,	printargs,		"SYS_162",	}, /* 162 */
-	{ 0,	0,	printargs,		"SYS_163",	}, /* 163 */
-	{ 0,	0,	printargs,		"SYS_164",	}, /* 164 */
-	{ 0,	0,	printargs,		"SYS_165",	}, /* 165 */
-	{ 0,	0,	printargs,		"SYS_166",	}, /* 166 */
-	{ 0,	0,	printargs,		"SYS_167",	}, /* 167 */
-	{ 0,	0,	printargs,		"SYS_168",	}, /* 168 */
-	{ 0,	0,	printargs,		"SYS_169",	}, /* 169 */
-	{ 0,	0,	printargs,		"SYS_170",	}, /* 170 */
-	{ 0,	0,	printargs,		"SYS_171",	}, /* 171 */
-	{ 0,	0,	printargs,		"SYS_172",	}, /* 172 */
-	{ 0,	0,	printargs,		"SYS_173",	}, /* 173 */
-	{ 0,	0,	printargs,		"SYS_174",	}, /* 174 */
-	{ 0,	0,	printargs,		"SYS_175",	}, /* 175 */
-	{ 0,	0,	printargs,		"SYS_176",	}, /* 176 */
-	{ 0,	0,	printargs,		"SYS_177",	}, /* 177 */
-	{ 0,	0,	printargs,		"SYS_178",	}, /* 178 */
-	{ 0,	0,	printargs,		"SYS_179",	}, /* 179 */
-	{ 0,	0,	printargs,		"SYS_180",	}, /* 180 */
-	{ 0,	0,	printargs,		"SYS_181",	}, /* 181 */
-	{ 0,	0,	printargs,		"SYS_182",	}, /* 182 */
-	{ 0,	0,	printargs,		"SYS_183",	}, /* 183 */
-	{ 0,	0,	printargs,		"SYS_184",	}, /* 184 */
-	{ 0,	0,	printargs,		"SYS_185",	}, /* 185 */
-	{ 0,	0,	printargs,		"SYS_186",	}, /* 186 */
-	{ 0,	0,	printargs,		"SYS_187",	}, /* 187 */
-	{ 0,	0,	printargs,		"SYS_188",	}, /* 188 */
-	{ 0,	0,	printargs,		"SYS_189",	}, /* 189 */
-	{ 0,	0,	printargs,		"SYS_190",	}, /* 190 */
-	{ 0,	0,	printargs,		"SYS_191",	}, /* 191 */
-	{ 0,	0,	printargs,		"SYS_192",	}, /* 192 */
-	{ 0,	0,	printargs,		"SYS_193",	}, /* 193 */
-	{ 0,	0,	printargs,		"SYS_194",	}, /* 194 */
-	{ 0,	0,	printargs,		"SYS_195",	}, /* 195 */
-	{ 0,	0,	printargs,		"SYS_196",	}, /* 196 */
-	{ 0,	0,	printargs,		"SYS_197",	}, /* 197 */
-	{ 0,	0,	printargs,		"SYS_198",	}, /* 198 */
-	{ 0,	0,	printargs,		"SYS_199",	}, /* 199 */
-	{ 0,	0,	printargs,		"SYS_200",	}, /* 200 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 146 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 147 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 148 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 149 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 150 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 151 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 152 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 153 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 154 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 155 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 156 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 157 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 158 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 159 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 160 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 161 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 162 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 163 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 164 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 165 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 166 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 167 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 168 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 169 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 170 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 171 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 172 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 173 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 174 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 175 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 176 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 177 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 178 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 179 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 180 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 181 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 182 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 183 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 184 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 185 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 186 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 187 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 188 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 189 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 190 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 191 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 192 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 193 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 194 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 195 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 196 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 197 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 198 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 199 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 200 */
 	{ 0,	0,	printargs,		"svr4_aread"	}, /*  0201 */
 	{ 0,	0,	printargs,		"svr4_awrite"	}, /*  0202 */
 	{ 0,	0,	printargs,		"svr4_listio"	}, /*  0203 */
@@ -209,797 +209,797 @@
 	{ 0,	0,	printargs,		"svr4_await"	}, /*  0206 */
 	{ 0,	0,	printargs,		"svr4_areadv"	}, /*  0207 */
 	{ 0,	0,	printargs,		"svr4_awritev"	}, /*  0208 */
-	{ 0,	0,	printargs,		"SYS_209",	}, /* 209 */
-	{ 0,	0,	printargs,		"SYS_210",	}, /* 210 */
-	{ 0,	0,	printargs,		"SYS_211",	}, /* 211 */
-	{ 0,	0,	printargs,		"SYS_212",	}, /* 212 */
-	{ 0,	0,	printargs,		"SYS_213",	}, /* 213 */
-	{ 0,	0,	printargs,		"SYS_214",	}, /* 214 */
-	{ 0,	0,	printargs,		"SYS_215",	}, /* 215 */
-	{ 0,	0,	printargs,		"SYS_216",	}, /* 216 */
-	{ 0,	0,	printargs,		"SYS_217",	}, /* 217 */
-	{ 0,	0,	printargs,		"SYS_218",	}, /* 218 */
-	{ 0,	0,	printargs,		"SYS_219",	}, /* 219 */
-	{ 0,	0,	printargs,		"SYS_220",	}, /* 220 */
-	{ 0,	0,	printargs,		"SYS_221",	}, /* 221 */
-	{ 0,	0,	printargs,		"SYS_222",	}, /* 222 */
-	{ 0,	0,	printargs,		"SYS_223",	}, /* 223 */
-	{ 0,	0,	printargs,		"SYS_224",	}, /* 224 */
-	{ 0,	0,	printargs,		"SYS_225",	}, /* 225 */
-	{ 0,	0,	printargs,		"SYS_226",	}, /* 226 */
-	{ 0,	0,	printargs,		"SYS_227",	}, /* 227 */
-	{ 0,	0,	printargs,		"SYS_228",	}, /* 228 */
-	{ 0,	0,	printargs,		"SYS_229",	}, /* 229 */
-	{ 0,	0,	printargs,		"SYS_230",	}, /* 230 */
-	{ 0,	0,	printargs,		"SYS_231",	}, /* 231 */
-	{ 0,	0,	printargs,		"SYS_232",	}, /* 232 */
-	{ 0,	0,	printargs,		"SYS_233",	}, /* 233 */
-	{ 0,	0,	printargs,		"SYS_234",	}, /* 234 */
-	{ 0,	0,	printargs,		"SYS_235",	}, /* 235 */
-	{ 0,	0,	printargs,		"SYS_236",	}, /* 236 */
-	{ 0,	0,	printargs,		"SYS_237",	}, /* 237 */
-	{ 0,	0,	printargs,		"SYS_238",	}, /* 238 */
-	{ 0,	0,	printargs,		"SYS_239",	}, /* 239 */
-	{ 0,	0,	printargs,		"SYS_240",	}, /* 240 */
-	{ 0,	0,	printargs,		"SYS_241"	}, /*  241 */
-	{ 0,	0,	printargs,		"SYS_242"	}, /*  242 */
-	{ 0,	0,	printargs,		"SYS_243"	}, /*  243 */
-	{ 0,	0,	printargs,		"SYS_244"	}, /*  244 */
-	{ 0,	0,	printargs,		"SYS_245"	}, /*  245 */
-	{ 0,	0,	printargs,		"SYS_246"	}, /*  246 */
-	{ 0,	0,	printargs,		"SYS_247"	}, /*  247 */
-	{ 0,	0,	printargs,		"SYS_248"	}, /*  248 */
-	{ 0,	0,	printargs,		"SYS_249"	}, /*  249 */
-	{ 0,	0,	printargs,		"SYS_250"	}, /*  250 */
-	{ 0,	0,	printargs,		"SYS_251"	}, /*  251 */
-	{ 0,	0,	printargs,		"SYS_252"	}, /*  252 */
-	{ 0,	0,	printargs,		"SYS_253"	}, /*  253 */
-	{ 0,	0,	printargs,		"SYS_254"	}, /*  254 */
-	{ 0,	0,	printargs,		"SYS_255"	}, /*  255 */
-	{ 0,	0,	printargs,		"SYS_256"	}, /*  256 */
-	{ 0,	0,	printargs,		"SYS_257"	}, /*  257 */
-	{ 0,	0,	printargs,		"SYS_258"	}, /*  258 */
-	{ 0,	0,	printargs,		"SYS_259"	}, /*  259 */
-	{ 0,	0,	printargs,		"SYS_260"	}, /*  260 */
-	{ 0,	0,	printargs,		"SYS_261"	}, /*  261 */
-	{ 0,	0,	printargs,		"SYS_262"	}, /*  262 */
-	{ 0,	0,	printargs,		"SYS_263"	}, /*  263 */
-	{ 0,	0,	printargs,		"SYS_264"	}, /*  264 */
-	{ 0,	0,	printargs,		"SYS_265"	}, /*  265 */
-	{ 0,	0,	printargs,		"SYS_266"	}, /*  266 */
-	{ 0,	0,	printargs,		"SYS_267"	}, /*  267 */
-	{ 0,	0,	printargs,		"SYS_268"	}, /*  268 */
-	{ 0,	0,	printargs,		"SYS_269"	}, /*  269 */
-	{ 0,	0,	printargs,		"SYS_270"	}, /*  270 */
-	{ 0,	0,	printargs,		"SYS_271"	}, /*  271 */
-	{ 0,	0,	printargs,		"SYS_272"	}, /*  272 */
-	{ 0,	0,	printargs,		"SYS_273"	}, /*  273 */
-	{ 0,	0,	printargs,		"SYS_274"	}, /*  274 */
-	{ 0,	0,	printargs,		"SYS_275"	}, /*  275 */
-	{ 0,	0,	printargs,		"SYS_276"	}, /*  276 */
-	{ 0,	0,	printargs,		"SYS_277"	}, /*  277 */
-	{ 0,	0,	printargs,		"SYS_278"	}, /*  278 */
-	{ 0,	0,	printargs,		"SYS_279"	}, /*  279 */
-	{ 0,	0,	printargs,		"SYS_280"	}, /*  280 */
-	{ 0,	0,	printargs,		"SYS_281"	}, /*  281 */
-	{ 0,	0,	printargs,		"SYS_282"	}, /*  282 */
-	{ 0,	0,	printargs,		"SYS_283"	}, /*  283 */
-	{ 0,	0,	printargs,		"SYS_284"	}, /*  284 */
-	{ 0,	0,	printargs,		"SYS_285"	}, /*  285 */
-	{ 0,	0,	printargs,		"SYS_286"	}, /*  286 */
-	{ 0,	0,	printargs,		"SYS_287"	}, /*  287 */
-	{ 0,	0,	printargs,		"SYS_288"	}, /*  288 */
-	{ 0,	0,	printargs,		"SYS_289"	}, /*  289 */
-	{ 0,	0,	printargs,		"SYS_290"	}, /*  290 */
-	{ 0,	0,	printargs,		"SYS_291"	}, /*  291 */
-	{ 0,	0,	printargs,		"SYS_292"	}, /*  292 */
-	{ 0,	0,	printargs,		"SYS_293"	}, /*  293 */
-	{ 0,	0,	printargs,		"SYS_294"	}, /*  294 */
-	{ 0,	0,	printargs,		"SYS_295"	}, /*  295 */
-	{ 0,	0,	printargs,		"SYS_296"	}, /*  296 */
-	{ 0,	0,	printargs,		"SYS_297"	}, /*  297 */
-	{ 0,	0,	printargs,		"SYS_298"	}, /*  298 */
-	{ 0,	0,	printargs,		"SYS_299"	}, /*  299 */
-	{ 0,	0,	printargs,		"SYS_300"	}, /*  300 */
-	{ 0,	0,	printargs,		"SYS_301"	}, /*  301 */
-	{ 0,	0,	printargs,		"SYS_302"	}, /*  302 */
-	{ 0,	0,	printargs,		"SYS_303"	}, /*  303 */
-	{ 0,	0,	printargs,		"SYS_304"	}, /*  304 */
-	{ 0,	0,	printargs,		"SYS_305"	}, /*  305 */
-	{ 0,	0,	printargs,		"SYS_306"	}, /*  306 */
-	{ 0,	0,	printargs,		"SYS_307"	}, /*  307 */
-	{ 0,	0,	printargs,		"SYS_308"	}, /*  308 */
-	{ 0,	0,	printargs,		"SYS_309"	}, /*  309 */
-	{ 0,	0,	printargs,		"SYS_310"	}, /*  310 */
-	{ 0,	0,	printargs,		"SYS_311"	}, /*  311 */
-	{ 0,	0,	printargs,		"SYS_312"	}, /*  312 */
-	{ 0,	0,	printargs,		"SYS_313"	}, /*  313 */
-	{ 0,	0,	printargs,		"SYS_314"	}, /*  314 */
-	{ 0,	0,	printargs,		"SYS_315"	}, /*  315 */
-	{ 0,	0,	printargs,		"SYS_316"	}, /*  316 */
-	{ 0,	0,	printargs,		"SYS_317"	}, /*  317 */
-	{ 0,	0,	printargs,		"SYS_318"	}, /*  318 */
-	{ 0,	0,	printargs,		"SYS_319"	}, /*  319 */
-	{ 0,	0,	printargs,		"SYS_320"	}, /*  320 */
-	{ 0,	0,	printargs,		"SYS_321"	}, /*  321 */
-	{ 0,	0,	printargs,		"SYS_322"	}, /*  322 */
-	{ 0,	0,	printargs,		"SYS_323"	}, /*  323 */
-	{ 0,	0,	printargs,		"SYS_324"	}, /*  324 */
-	{ 0,	0,	printargs,		"SYS_325"	}, /*  325 */
-	{ 0,	0,	printargs,		"SYS_326"	}, /*  326 */
-	{ 0,	0,	printargs,		"SYS_327"	}, /*  327 */
-	{ 0,	0,	printargs,		"SYS_328"	}, /*  328 */
-	{ 0,	0,	printargs,		"SYS_329"	}, /*  329 */
-	{ 0,	0,	printargs,		"SYS_330"	}, /*  330 */
-	{ 0,	0,	printargs,		"SYS_331"	}, /*  331 */
-	{ 0,	0,	printargs,		"SYS_332"	}, /*  332 */
-	{ 0,	0,	printargs,		"SYS_333"	}, /*  333 */
-	{ 0,	0,	printargs,		"SYS_334"	}, /*  334 */
-	{ 0,	0,	printargs,		"SYS_335"	}, /*  335 */
-	{ 0,	0,	printargs,		"SYS_336"	}, /*  336 */
-	{ 0,	0,	printargs,		"SYS_337"	}, /*  337 */
-	{ 0,	0,	printargs,		"SYS_338"	}, /*  338 */
-	{ 0,	0,	printargs,		"SYS_339"	}, /*  339 */
-	{ 0,	0,	printargs,		"SYS_340"	}, /*  340 */
-	{ 0,	0,	printargs,		"SYS_341"	}, /*  341 */
-	{ 0,	0,	printargs,		"SYS_342"	}, /*  342 */
-	{ 0,	0,	printargs,		"SYS_343"	}, /*  343 */
-	{ 0,	0,	printargs,		"SYS_344"	}, /*  344 */
-	{ 0,	0,	printargs,		"SYS_345"	}, /*  345 */
-	{ 0,	0,	printargs,		"SYS_346"	}, /*  346 */
-	{ 0,	0,	printargs,		"SYS_347"	}, /*  347 */
-	{ 0,	0,	printargs,		"SYS_348"	}, /*  348 */
-	{ 0,	0,	printargs,		"SYS_349"	}, /*  349 */
-	{ 0,	0,	printargs,		"SYS_350"	}, /*  350 */
-	{ 0,	0,	printargs,		"SYS_351"	}, /*  351 */
-	{ 0,	0,	printargs,		"SYS_352"	}, /*  352 */
-	{ 0,	0,	printargs,		"SYS_353"	}, /*  353 */
-	{ 0,	0,	printargs,		"SYS_354"	}, /*  354 */
-	{ 0,	0,	printargs,		"SYS_355"	}, /*  355 */
-	{ 0,	0,	printargs,		"SYS_356"	}, /*  356 */
-	{ 0,	0,	printargs,		"SYS_357"	}, /*  357 */
-	{ 0,	0,	printargs,		"SYS_358"	}, /*  358 */
-	{ 0,	0,	printargs,		"SYS_359"	}, /*  359 */
-	{ 0,	0,	printargs,		"SYS_360"	}, /*  360 */
-	{ 0,	0,	printargs,		"SYS_361"	}, /*  361 */
-	{ 0,	0,	printargs,		"SYS_362"	}, /*  362 */
-	{ 0,	0,	printargs,		"SYS_363"	}, /*  363 */
-	{ 0,	0,	printargs,		"SYS_364"	}, /*  364 */
-	{ 0,	0,	printargs,		"SYS_365"	}, /*  365 */
-	{ 0,	0,	printargs,		"SYS_366"	}, /*  366 */
-	{ 0,	0,	printargs,		"SYS_367"	}, /*  367 */
-	{ 0,	0,	printargs,		"SYS_368"	}, /*  368 */
-	{ 0,	0,	printargs,		"SYS_369"	}, /*  369 */
-	{ 0,	0,	printargs,		"SYS_370"	}, /*  370 */
-	{ 0,	0,	printargs,		"SYS_371"	}, /*  371 */
-	{ 0,	0,	printargs,		"SYS_372"	}, /*  372 */
-	{ 0,	0,	printargs,		"SYS_373"	}, /*  373 */
-	{ 0,	0,	printargs,		"SYS_374"	}, /*  374 */
-	{ 0,	0,	printargs,		"SYS_375"	}, /*  375 */
-	{ 0,	0,	printargs,		"SYS_376"	}, /*  376 */
-	{ 0,	0,	printargs,		"SYS_377"	}, /*  377 */
-	{ 0,	0,	printargs,		"SYS_378"	}, /*  378 */
-	{ 0,	0,	printargs,		"SYS_379"	}, /*  379 */
-	{ 0,	0,	printargs,		"SYS_380"	}, /*  380 */
-	{ 0,	0,	printargs,		"SYS_381"	}, /*  381 */
-	{ 0,	0,	printargs,		"SYS_382"	}, /*  382 */
-	{ 0,	0,	printargs,		"SYS_383"	}, /*  383 */
-	{ 0,	0,	printargs,		"SYS_384"	}, /*  384 */
-	{ 0,	0,	printargs,		"SYS_385"	}, /*  385 */
-	{ 0,	0,	printargs,		"SYS_386"	}, /*  386 */
-	{ 0,	0,	printargs,		"SYS_387"	}, /*  387 */
-	{ 0,	0,	printargs,		"SYS_388"	}, /*  388 */
-	{ 0,	0,	printargs,		"SYS_389"	}, /*  389 */
-	{ 0,	0,	printargs,		"SYS_390"	}, /*  390 */
-	{ 0,	0,	printargs,		"SYS_391"	}, /*  391 */
-	{ 0,	0,	printargs,		"SYS_392"	}, /*  392 */
-	{ 0,	0,	printargs,		"SYS_393"	}, /*  393 */
-	{ 0,	0,	printargs,		"SYS_394"	}, /*  394 */
-	{ 0,	0,	printargs,		"SYS_395"	}, /*  395 */
-	{ 0,	0,	printargs,		"SYS_396"	}, /*  396 */
-	{ 0,	0,	printargs,		"SYS_397"	}, /*  397 */
-	{ 0,	0,	printargs,		"SYS_398"	}, /*  398 */
-	{ 0,	0,	printargs,		"SYS_399"	}, /*  399 */
-	{ 0,	0,	printargs,		"SYS_400"	}, /*  400 */
-	{ 0,	0,	printargs,		"SYS_401"	}, /*  401 */
-	{ 0,	0,	printargs,		"SYS_402"	}, /*  402 */
-	{ 0,	0,	printargs,		"SYS_403"	}, /*  403 */
-	{ 0,	0,	printargs,		"SYS_404"	}, /*  404 */
-	{ 0,	0,	printargs,		"SYS_405"	}, /*  405 */
-	{ 0,	0,	printargs,		"SYS_406"	}, /*  406 */
-	{ 0,	0,	printargs,		"SYS_407"	}, /*  407 */
-	{ 0,	0,	printargs,		"SYS_408"	}, /*  408 */
-	{ 0,	0,	printargs,		"SYS_409"	}, /*  409 */
-	{ 0,	0,	printargs,		"SYS_410"	}, /*  410 */
-	{ 0,	0,	printargs,		"SYS_411"	}, /*  411 */
-	{ 0,	0,	printargs,		"SYS_412"	}, /*  412 */
-	{ 0,	0,	printargs,		"SYS_413"	}, /*  413 */
-	{ 0,	0,	printargs,		"SYS_414"	}, /*  414 */
-	{ 0,	0,	printargs,		"SYS_415"	}, /*  415 */
-	{ 0,	0,	printargs,		"SYS_416"	}, /*  416 */
-	{ 0,	0,	printargs,		"SYS_417"	}, /*  417 */
-	{ 0,	0,	printargs,		"SYS_418"	}, /*  418 */
-	{ 0,	0,	printargs,		"SYS_419"	}, /*  419 */
-	{ 0,	0,	printargs,		"SYS_420"	}, /*  420 */
-	{ 0,	0,	printargs,		"SYS_421"	}, /*  421 */
-	{ 0,	0,	printargs,		"SYS_422"	}, /*  422 */
-	{ 0,	0,	printargs,		"SYS_423"	}, /*  423 */
-	{ 0,	0,	printargs,		"SYS_424"	}, /*  424 */
-	{ 0,	0,	printargs,		"SYS_425"	}, /*  425 */
-	{ 0,	0,	printargs,		"SYS_426"	}, /*  426 */
-	{ 0,	0,	printargs,		"SYS_427"	}, /*  427 */
-	{ 0,	0,	printargs,		"SYS_428"	}, /*  428 */
-	{ 0,	0,	printargs,		"SYS_429"	}, /*  429 */
-	{ 0,	0,	printargs,		"SYS_430"	}, /*  430 */
-	{ 0,	0,	printargs,		"SYS_431"	}, /*  431 */
-	{ 0,	0,	printargs,		"SYS_432"	}, /*  432 */
-	{ 0,	0,	printargs,		"SYS_433"	}, /*  433 */
-	{ 0,	0,	printargs,		"SYS_434"	}, /*  434 */
-	{ 0,	0,	printargs,		"SYS_435"	}, /*  435 */
-	{ 0,	0,	printargs,		"SYS_436"	}, /*  436 */
-	{ 0,	0,	printargs,		"SYS_437"	}, /*  437 */
-	{ 0,	0,	printargs,		"SYS_438"	}, /*  438 */
-	{ 0,	0,	printargs,		"SYS_439"	}, /*  439 */
-	{ 0,	0,	printargs,		"SYS_440"	}, /*  440 */
-	{ 0,	0,	printargs,		"SYS_441"	}, /*  441 */
-	{ 0,	0,	printargs,		"SYS_442"	}, /*  442 */
-	{ 0,	0,	printargs,		"SYS_443"	}, /*  443 */
-	{ 0,	0,	printargs,		"SYS_444"	}, /*  444 */
-	{ 0,	0,	printargs,		"SYS_445"	}, /*  445 */
-	{ 0,	0,	printargs,		"SYS_446"	}, /*  446 */
-	{ 0,	0,	printargs,		"SYS_447"	}, /*  447 */
-	{ 0,	0,	printargs,		"SYS_448"	}, /*  448 */
-	{ 0,	0,	printargs,		"SYS_449"	}, /*  449 */
-	{ 0,	0,	printargs,		"SYS_450"	}, /*  450 */
-	{ 0,	0,	printargs,		"SYS_451"	}, /*  451 */
-	{ 0,	0,	printargs,		"SYS_452"	}, /*  452 */
-	{ 0,	0,	printargs,		"SYS_453"	}, /*  453 */
-	{ 0,	0,	printargs,		"SYS_454"	}, /*  454 */
-	{ 0,	0,	printargs,		"SYS_455"	}, /*  455 */
-	{ 0,	0,	printargs,		"SYS_456"	}, /*  456 */
-	{ 0,	0,	printargs,		"SYS_457"	}, /*  457 */
-	{ 0,	0,	printargs,		"SYS_458"	}, /*  458 */
-	{ 0,	0,	printargs,		"SYS_459"	}, /*  459 */
-	{ 0,	0,	printargs,		"SYS_460"	}, /*  460 */
-	{ 0,	0,	printargs,		"SYS_461"	}, /*  461 */
-	{ 0,	0,	printargs,		"SYS_462"	}, /*  462 */
-	{ 0,	0,	printargs,		"SYS_463"	}, /*  463 */
-	{ 0,	0,	printargs,		"SYS_464"	}, /*  464 */
-	{ 0,	0,	printargs,		"SYS_465"	}, /*  465 */
-	{ 0,	0,	printargs,		"SYS_466"	}, /*  466 */
-	{ 0,	0,	printargs,		"SYS_467"	}, /*  467 */
-	{ 0,	0,	printargs,		"SYS_468"	}, /*  468 */
-	{ 0,	0,	printargs,		"SYS_469"	}, /*  469 */
-	{ 0,	0,	printargs,		"SYS_470"	}, /*  470 */
-	{ 0,	0,	printargs,		"SYS_471"	}, /*  471 */
-	{ 0,	0,	printargs,		"SYS_472"	}, /*  472 */
-	{ 0,	0,	printargs,		"SYS_473"	}, /*  473 */
-	{ 0,	0,	printargs,		"SYS_474"	}, /*  474 */
-	{ 0,	0,	printargs,		"SYS_475"	}, /*  475 */
-	{ 0,	0,	printargs,		"SYS_476"	}, /*  476 */
-	{ 0,	0,	printargs,		"SYS_477"	}, /*  477 */
-	{ 0,	0,	printargs,		"SYS_478"	}, /*  478 */
-	{ 0,	0,	printargs,		"SYS_479"	}, /*  479 */
-	{ 0,	0,	printargs,		"SYS_480"	}, /*  480 */
-	{ 0,	0,	printargs,		"SYS_481"	}, /*  481 */
-	{ 0,	0,	printargs,		"SYS_482"	}, /*  482 */
-	{ 0,	0,	printargs,		"SYS_483"	}, /*  483 */
-	{ 0,	0,	printargs,		"SYS_484"	}, /*  484 */
-	{ 0,	0,	printargs,		"SYS_485"	}, /*  485 */
-	{ 0,	0,	printargs,		"SYS_486"	}, /*  486 */
-	{ 0,	0,	printargs,		"SYS_487"	}, /*  487 */
-	{ 0,	0,	printargs,		"SYS_488"	}, /*  488 */
-	{ 0,	0,	printargs,		"SYS_489"	}, /*  489 */
-	{ 0,	0,	printargs,		"SYS_490"	}, /*  490 */
-	{ 0,	0,	printargs,		"SYS_491"	}, /*  491 */
-	{ 0,	0,	printargs,		"SYS_492"	}, /*  492 */
-	{ 0,	0,	printargs,		"SYS_493"	}, /*  493 */
-	{ 0,	0,	printargs,		"SYS_494"	}, /*  494 */
-	{ 0,	0,	printargs,		"SYS_495"	}, /*  495 */
-	{ 0,	0,	printargs,		"SYS_496"	}, /*  496 */
-	{ 0,	0,	printargs,		"SYS_497"	}, /*  497 */
-	{ 0,	0,	printargs,		"SYS_498"	}, /*  498 */
-	{ 0,	0,	printargs,		"SYS_499"	}, /*  499 */
-	{ 0,	0,	printargs,		"SYS_500"	}, /*  500 */
-	{ 0,	0,	printargs,		"SYS_501"	}, /*  501 */
-	{ 0,	0,	printargs,		"SYS_502"	}, /*  502 */
-	{ 0,	0,	printargs,		"SYS_503"	}, /*  503 */
-	{ 0,	0,	printargs,		"SYS_504"	}, /*  504 */
-	{ 0,	0,	printargs,		"SYS_505"	}, /*  505 */
-	{ 0,	0,	printargs,		"SYS_506"	}, /*  506 */
-	{ 0,	0,	printargs,		"SYS_507"	}, /*  507 */
-	{ 0,	0,	printargs,		"SYS_508"	}, /*  508 */
-	{ 0,	0,	printargs,		"SYS_509"	}, /*  509 */
-	{ 0,	0,	printargs,		"SYS_510"	}, /*  510 */
-	{ 0,	0,	printargs,		"SYS_511"	}, /*  511 */
-	{ 0,	0,	printargs,		"SYS_512"	}, /*  512 */
-	{ 0,	0,	printargs,		"SYS_513"	}, /*  513 */
-	{ 0,	0,	printargs,		"SYS_514"	}, /*  514 */
-	{ 0,	0,	printargs,		"SYS_515"	}, /*  515 */
-	{ 0,	0,	printargs,		"SYS_516"	}, /*  516 */
-	{ 0,	0,	printargs,		"SYS_517"	}, /*  517 */
-	{ 0,	0,	printargs,		"SYS_518"	}, /*  518 */
-	{ 0,	0,	printargs,		"SYS_519"	}, /*  519 */
-	{ 0,	0,	printargs,		"SYS_520"	}, /*  520 */
-	{ 0,	0,	printargs,		"SYS_521"	}, /*  521 */
-	{ 0,	0,	printargs,		"SYS_522"	}, /*  522 */
-	{ 0,	0,	printargs,		"SYS_523"	}, /*  523 */
-	{ 0,	0,	printargs,		"SYS_524"	}, /*  524 */
-	{ 0,	0,	printargs,		"SYS_525"	}, /*  525 */
-	{ 0,	0,	printargs,		"SYS_526"	}, /*  526 */
-	{ 0,	0,	printargs,		"SYS_527"	}, /*  527 */
-	{ 0,	0,	printargs,		"SYS_528"	}, /*  528 */
-	{ 0,	0,	printargs,		"SYS_529"	}, /*  529 */
-	{ 0,	0,	printargs,		"SYS_530"	}, /*  530 */
-	{ 0,	0,	printargs,		"SYS_531"	}, /*  531 */
-	{ 0,	0,	printargs,		"SYS_532"	}, /*  532 */
-	{ 0,	0,	printargs,		"SYS_533"	}, /*  533 */
-	{ 0,	0,	printargs,		"SYS_534"	}, /*  534 */
-	{ 0,	0,	printargs,		"SYS_535"	}, /*  535 */
-	{ 0,	0,	printargs,		"SYS_536"	}, /*  536 */
-	{ 0,	0,	printargs,		"SYS_537"	}, /*  537 */
-	{ 0,	0,	printargs,		"SYS_538"	}, /*  538 */
-	{ 0,	0,	printargs,		"SYS_539"	}, /*  539 */
-	{ 0,	0,	printargs,		"SYS_540"	}, /*  540 */
-	{ 0,	0,	printargs,		"SYS_541"	}, /*  541 */
-	{ 0,	0,	printargs,		"SYS_542"	}, /*  542 */
-	{ 0,	0,	printargs,		"SYS_543"	}, /*  543 */
-	{ 0,	0,	printargs,		"SYS_544"	}, /*  544 */
-	{ 0,	0,	printargs,		"SYS_545"	}, /*  545 */
-	{ 0,	0,	printargs,		"SYS_546"	}, /*  546 */
-	{ 0,	0,	printargs,		"SYS_547"	}, /*  547 */
-	{ 0,	0,	printargs,		"SYS_548"	}, /*  548 */
-	{ 0,	0,	printargs,		"SYS_549"	}, /*  549 */
-	{ 0,	0,	printargs,		"SYS_550"	}, /*  550 */
-	{ 0,	0,	printargs,		"SYS_551"	}, /*  551 */
-	{ 0,	0,	printargs,		"SYS_552"	}, /*  552 */
-	{ 0,	0,	printargs,		"SYS_553"	}, /*  553 */
-	{ 0,	0,	printargs,		"SYS_554"	}, /*  554 */
-	{ 0,	0,	printargs,		"SYS_555"	}, /*  555 */
-	{ 0,	0,	printargs,		"SYS_556"	}, /*  556 */
-	{ 0,	0,	printargs,		"SYS_557"	}, /*  557 */
-	{ 0,	0,	printargs,		"SYS_558"	}, /*  558 */
-	{ 0,	0,	printargs,		"SYS_559"	}, /*  559 */
-	{ 0,	0,	printargs,		"SYS_560"	}, /*  560 */
-	{ 0,	0,	printargs,		"SYS_561"	}, /*  561 */
-	{ 0,	0,	printargs,		"SYS_562"	}, /*  562 */
-	{ 0,	0,	printargs,		"SYS_563"	}, /*  563 */
-	{ 0,	0,	printargs,		"SYS_564"	}, /*  564 */
-	{ 0,	0,	printargs,		"SYS_565"	}, /*  565 */
-	{ 0,	0,	printargs,		"SYS_566"	}, /*  566 */
-	{ 0,	0,	printargs,		"SYS_567"	}, /*  567 */
-	{ 0,	0,	printargs,		"SYS_568"	}, /*  568 */
-	{ 0,	0,	printargs,		"SYS_569"	}, /*  569 */
-	{ 0,	0,	printargs,		"SYS_570"	}, /*  570 */
-	{ 0,	0,	printargs,		"SYS_571"	}, /*  571 */
-	{ 0,	0,	printargs,		"SYS_572"	}, /*  572 */
-	{ 0,	0,	printargs,		"SYS_573"	}, /*  573 */
-	{ 0,	0,	printargs,		"SYS_574"	}, /*  574 */
-	{ 0,	0,	printargs,		"SYS_575"	}, /*  575 */
-	{ 0,	0,	printargs,		"SYS_576"	}, /*  576 */
-	{ 0,	0,	printargs,		"SYS_577"	}, /*  577 */
-	{ 0,	0,	printargs,		"SYS_578"	}, /*  578 */
-	{ 0,	0,	printargs,		"SYS_579"	}, /*  579 */
-	{ 0,	0,	printargs,		"SYS_580"	}, /*  580 */
-	{ 0,	0,	printargs,		"SYS_581"	}, /*  581 */
-	{ 0,	0,	printargs,		"SYS_582"	}, /*  582 */
-	{ 0,	0,	printargs,		"SYS_583"	}, /*  583 */
-	{ 0,	0,	printargs,		"SYS_584"	}, /*  584 */
-	{ 0,	0,	printargs,		"SYS_585"	}, /*  585 */
-	{ 0,	0,	printargs,		"SYS_586"	}, /*  586 */
-	{ 0,	0,	printargs,		"SYS_587"	}, /*  587 */
-	{ 0,	0,	printargs,		"SYS_588"	}, /*  588 */
-	{ 0,	0,	printargs,		"SYS_589"	}, /*  589 */
-	{ 0,	0,	printargs,		"SYS_590"	}, /*  590 */
-	{ 0,	0,	printargs,		"SYS_591"	}, /*  591 */
-	{ 0,	0,	printargs,		"SYS_592"	}, /*  592 */
-	{ 0,	0,	printargs,		"SYS_593"	}, /*  593 */
-	{ 0,	0,	printargs,		"SYS_594"	}, /*  594 */
-	{ 0,	0,	printargs,		"SYS_595"	}, /*  595 */
-	{ 0,	0,	printargs,		"SYS_596"	}, /*  596 */
-	{ 0,	0,	printargs,		"SYS_597"	}, /*  597 */
-	{ 0,	0,	printargs,		"SYS_598"	}, /*  598 */
-	{ 0,	0,	printargs,		"SYS_599"	}, /*  599 */
-	{ 0,	0,	printargs,		"SYS_600"	}, /*  600 */
-	{ 0,	0,	printargs,		"SYS_601"	}, /*  601 */
-	{ 0,	0,	printargs,		"SYS_602"	}, /*  602 */
-	{ 0,	0,	printargs,		"SYS_603"	}, /*  603 */
-	{ 0,	0,	printargs,		"SYS_604"	}, /*  604 */
-	{ 0,	0,	printargs,		"SYS_605"	}, /*  605 */
-	{ 0,	0,	printargs,		"SYS_606"	}, /*  606 */
-	{ 0,	0,	printargs,		"SYS_607"	}, /*  607 */
-	{ 0,	0,	printargs,		"SYS_608"	}, /*  608 */
-	{ 0,	0,	printargs,		"SYS_609"	}, /*  609 */
-	{ 0,	0,	printargs,		"SYS_610"	}, /*  610 */
-	{ 0,	0,	printargs,		"SYS_611"	}, /*  611 */
-	{ 0,	0,	printargs,		"SYS_612"	}, /*  612 */
-	{ 0,	0,	printargs,		"SYS_613"	}, /*  613 */
-	{ 0,	0,	printargs,		"SYS_614"	}, /*  614 */
-	{ 0,	0,	printargs,		"SYS_615"	}, /*  615 */
-	{ 0,	0,	printargs,		"SYS_616"	}, /*  616 */
-	{ 0,	0,	printargs,		"SYS_617"	}, /*  617 */
-	{ 0,	0,	printargs,		"SYS_618"	}, /*  618 */
-	{ 0,	0,	printargs,		"SYS_619"	}, /*  619 */
-	{ 0,	0,	printargs,		"SYS_620"	}, /*  620 */
-	{ 0,	0,	printargs,		"SYS_621"	}, /*  621 */
-	{ 0,	0,	printargs,		"SYS_622"	}, /*  622 */
-	{ 0,	0,	printargs,		"SYS_623"	}, /*  623 */
-	{ 0,	0,	printargs,		"SYS_624"	}, /*  624 */
-	{ 0,	0,	printargs,		"SYS_625"	}, /*  625 */
-	{ 0,	0,	printargs,		"SYS_626"	}, /*  626 */
-	{ 0,	0,	printargs,		"SYS_627"	}, /*  627 */
-	{ 0,	0,	printargs,		"SYS_628"	}, /*  628 */
-	{ 0,	0,	printargs,		"SYS_629"	}, /*  629 */
-	{ 0,	0,	printargs,		"SYS_630"	}, /*  630 */
-	{ 0,	0,	printargs,		"SYS_631"	}, /*  631 */
-	{ 0,	0,	printargs,		"SYS_632"	}, /*  632 */
-	{ 0,	0,	printargs,		"SYS_633"	}, /*  633 */
-	{ 0,	0,	printargs,		"SYS_634"	}, /*  634 */
-	{ 0,	0,	printargs,		"SYS_635"	}, /*  635 */
-	{ 0,	0,	printargs,		"SYS_636"	}, /*  636 */
-	{ 0,	0,	printargs,		"SYS_637"	}, /*  637 */
-	{ 0,	0,	printargs,		"SYS_638"	}, /*  638 */
-	{ 0,	0,	printargs,		"SYS_639"	}, /*  639 */
-	{ 0,	0,	printargs,		"SYS_640"	}, /*  640 */
-	{ 0,	0,	printargs,		"SYS_641"	}, /*  641 */
-	{ 0,	0,	printargs,		"SYS_642"	}, /*  642 */
-	{ 0,	0,	printargs,		"SYS_643"	}, /*  643 */
-	{ 0,	0,	printargs,		"SYS_644"	}, /*  644 */
-	{ 0,	0,	printargs,		"SYS_645"	}, /*  645 */
-	{ 0,	0,	printargs,		"SYS_646"	}, /*  646 */
-	{ 0,	0,	printargs,		"SYS_647"	}, /*  647 */
-	{ 0,	0,	printargs,		"SYS_648"	}, /*  648 */
-	{ 0,	0,	printargs,		"SYS_649"	}, /*  649 */
-	{ 0,	0,	printargs,		"SYS_650"	}, /*  650 */
-	{ 0,	0,	printargs,		"SYS_651"	}, /*  651 */
-	{ 0,	0,	printargs,		"SYS_652"	}, /*  652 */
-	{ 0,	0,	printargs,		"SYS_653"	}, /*  653 */
-	{ 0,	0,	printargs,		"SYS_654"	}, /*  654 */
-	{ 0,	0,	printargs,		"SYS_655"	}, /*  655 */
-	{ 0,	0,	printargs,		"SYS_656"	}, /*  656 */
-	{ 0,	0,	printargs,		"SYS_657"	}, /*  657 */
-	{ 0,	0,	printargs,		"SYS_658"	}, /*  658 */
-	{ 0,	0,	printargs,		"SYS_659"	}, /*  659 */
-	{ 0,	0,	printargs,		"SYS_660"	}, /*  660 */
-	{ 0,	0,	printargs,		"SYS_661"	}, /*  661 */
-	{ 0,	0,	printargs,		"SYS_662"	}, /*  662 */
-	{ 0,	0,	printargs,		"SYS_663"	}, /*  663 */
-	{ 0,	0,	printargs,		"SYS_664"	}, /*  664 */
-	{ 0,	0,	printargs,		"SYS_665"	}, /*  665 */
-	{ 0,	0,	printargs,		"SYS_666"	}, /*  666 */
-	{ 0,	0,	printargs,		"SYS_667"	}, /*  667 */
-	{ 0,	0,	printargs,		"SYS_668"	}, /*  668 */
-	{ 0,	0,	printargs,		"SYS_669"	}, /*  669 */
-	{ 0,	0,	printargs,		"SYS_670"	}, /*  670 */
-	{ 0,	0,	printargs,		"SYS_671"	}, /*  671 */
-	{ 0,	0,	printargs,		"SYS_672"	}, /*  672 */
-	{ 0,	0,	printargs,		"SYS_673"	}, /*  673 */
-	{ 0,	0,	printargs,		"SYS_674"	}, /*  674 */
-	{ 0,	0,	printargs,		"SYS_675"	}, /*  675 */
-	{ 0,	0,	printargs,		"SYS_676"	}, /*  676 */
-	{ 0,	0,	printargs,		"SYS_677"	}, /*  677 */
-	{ 0,	0,	printargs,		"SYS_678"	}, /*  678 */
-	{ 0,	0,	printargs,		"SYS_679"	}, /*  679 */
-	{ 0,	0,	printargs,		"SYS_680"	}, /*  680 */
-	{ 0,	0,	printargs,		"SYS_681"	}, /*  681 */
-	{ 0,	0,	printargs,		"SYS_682"	}, /*  682 */
-	{ 0,	0,	printargs,		"SYS_683"	}, /*  683 */
-	{ 0,	0,	printargs,		"SYS_684"	}, /*  684 */
-	{ 0,	0,	printargs,		"SYS_685"	}, /*  685 */
-	{ 0,	0,	printargs,		"SYS_686"	}, /*  686 */
-	{ 0,	0,	printargs,		"SYS_687"	}, /*  687 */
-	{ 0,	0,	printargs,		"SYS_688"	}, /*  688 */
-	{ 0,	0,	printargs,		"SYS_689"	}, /*  689 */
-	{ 0,	0,	printargs,		"SYS_690"	}, /*  690 */
-	{ 0,	0,	printargs,		"SYS_691"	}, /*  691 */
-	{ 0,	0,	printargs,		"SYS_692"	}, /*  692 */
-	{ 0,	0,	printargs,		"SYS_693"	}, /*  693 */
-	{ 0,	0,	printargs,		"SYS_694"	}, /*  694 */
-	{ 0,	0,	printargs,		"SYS_695"	}, /*  695 */
-	{ 0,	0,	printargs,		"SYS_696"	}, /*  696 */
-	{ 0,	0,	printargs,		"SYS_697"	}, /*  697 */
-	{ 0,	0,	printargs,		"SYS_698"	}, /*  698 */
-	{ 0,	0,	printargs,		"SYS_699"	}, /*  699 */
-	{ 0,	0,	printargs,		"SYS_700"	}, /*  700 */
-	{ 0,	0,	printargs,		"SYS_701"	}, /*  701 */
-	{ 0,	0,	printargs,		"SYS_702"	}, /*  702 */
-	{ 0,	0,	printargs,		"SYS_703"	}, /*  703 */
-	{ 0,	0,	printargs,		"SYS_704"	}, /*  704 */
-	{ 0,	0,	printargs,		"SYS_705"	}, /*  705 */
-	{ 0,	0,	printargs,		"SYS_706"	}, /*  706 */
-	{ 0,	0,	printargs,		"SYS_707"	}, /*  707 */
-	{ 0,	0,	printargs,		"SYS_708"	}, /*  708 */
-	{ 0,	0,	printargs,		"SYS_709"	}, /*  709 */
-	{ 0,	0,	printargs,		"SYS_710"	}, /*  710 */
-	{ 0,	0,	printargs,		"SYS_711"	}, /*  711 */
-	{ 0,	0,	printargs,		"SYS_712"	}, /*  712 */
-	{ 0,	0,	printargs,		"SYS_713"	}, /*  713 */
-	{ 0,	0,	printargs,		"SYS_714"	}, /*  714 */
-	{ 0,	0,	printargs,		"SYS_715"	}, /*  715 */
-	{ 0,	0,	printargs,		"SYS_716"	}, /*  716 */
-	{ 0,	0,	printargs,		"SYS_717"	}, /*  717 */
-	{ 0,	0,	printargs,		"SYS_718"	}, /*  718 */
-	{ 0,	0,	printargs,		"SYS_719"	}, /*  719 */
-	{ 0,	0,	printargs,		"SYS_720"	}, /*  720 */
-	{ 0,	0,	printargs,		"SYS_721"	}, /*  721 */
-	{ 0,	0,	printargs,		"SYS_722"	}, /*  722 */
-	{ 0,	0,	printargs,		"SYS_723"	}, /*  723 */
-	{ 0,	0,	printargs,		"SYS_724"	}, /*  724 */
-	{ 0,	0,	printargs,		"SYS_725"	}, /*  725 */
-	{ 0,	0,	printargs,		"SYS_726"	}, /*  726 */
-	{ 0,	0,	printargs,		"SYS_727"	}, /*  727 */
-	{ 0,	0,	printargs,		"SYS_728"	}, /*  728 */
-	{ 0,	0,	printargs,		"SYS_729"	}, /*  729 */
-	{ 0,	0,	printargs,		"SYS_730"	}, /*  730 */
-	{ 0,	0,	printargs,		"SYS_731"	}, /*  731 */
-	{ 0,	0,	printargs,		"SYS_732"	}, /*  732 */
-	{ 0,	0,	printargs,		"SYS_733"	}, /*  733 */
-	{ 0,	0,	printargs,		"SYS_734"	}, /*  734 */
-	{ 0,	0,	printargs,		"SYS_735"	}, /*  735 */
-	{ 0,	0,	printargs,		"SYS_736"	}, /*  736 */
-	{ 0,	0,	printargs,		"SYS_737"	}, /*  737 */
-	{ 0,	0,	printargs,		"SYS_738"	}, /*  738 */
-	{ 0,	0,	printargs,		"SYS_739"	}, /*  739 */
-	{ 0,	0,	printargs,		"SYS_740"	}, /*  740 */
-	{ 0,	0,	printargs,		"SYS_741"	}, /*  741 */
-	{ 0,	0,	printargs,		"SYS_742"	}, /*  742 */
-	{ 0,	0,	printargs,		"SYS_743"	}, /*  743 */
-	{ 0,	0,	printargs,		"SYS_744"	}, /*  744 */
-	{ 0,	0,	printargs,		"SYS_745"	}, /*  745 */
-	{ 0,	0,	printargs,		"SYS_746"	}, /*  746 */
-	{ 0,	0,	printargs,		"SYS_747"	}, /*  747 */
-	{ 0,	0,	printargs,		"SYS_748"	}, /*  748 */
-	{ 0,	0,	printargs,		"SYS_749"	}, /*  749 */
-	{ 0,	0,	printargs,		"SYS_750"	}, /*  750 */
-	{ 0,	0,	printargs,		"SYS_751"	}, /*  751 */
-	{ 0,	0,	printargs,		"SYS_752"	}, /*  752 */
-	{ 0,	0,	printargs,		"SYS_753"	}, /*  753 */
-	{ 0,	0,	printargs,		"SYS_754"	}, /*  754 */
-	{ 0,	0,	printargs,		"SYS_755"	}, /*  755 */
-	{ 0,	0,	printargs,		"SYS_756"	}, /*  756 */
-	{ 0,	0,	printargs,		"SYS_757"	}, /*  757 */
-	{ 0,	0,	printargs,		"SYS_758"	}, /*  758 */
-	{ 0,	0,	printargs,		"SYS_759"	}, /*  759 */
-	{ 0,	0,	printargs,		"SYS_760"	}, /*  760 */
-	{ 0,	0,	printargs,		"SYS_761"	}, /*  761 */
-	{ 0,	0,	printargs,		"SYS_762"	}, /*  762 */
-	{ 0,	0,	printargs,		"SYS_763"	}, /*  763 */
-	{ 0,	0,	printargs,		"SYS_764"	}, /*  764 */
-	{ 0,	0,	printargs,		"SYS_765"	}, /*  765 */
-	{ 0,	0,	printargs,		"SYS_766"	}, /*  766 */
-	{ 0,	0,	printargs,		"SYS_767"	}, /*  767 */
-	{ 0,	0,	printargs,		"SYS_768"	}, /*  768 */
-	{ 0,	0,	printargs,		"SYS_769"	}, /*  769 */
-	{ 0,	0,	printargs,		"SYS_770"	}, /*  770 */
-	{ 0,	0,	printargs,		"SYS_771"	}, /*  771 */
-	{ 0,	0,	printargs,		"SYS_772"	}, /*  772 */
-	{ 0,	0,	printargs,		"SYS_773"	}, /*  773 */
-	{ 0,	0,	printargs,		"SYS_774"	}, /*  774 */
-	{ 0,	0,	printargs,		"SYS_775"	}, /*  775 */
-	{ 0,	0,	printargs,		"SYS_776"	}, /*  776 */
-	{ 0,	0,	printargs,		"SYS_777"	}, /*  777 */
-	{ 0,	0,	printargs,		"SYS_778"	}, /*  778 */
-	{ 0,	0,	printargs,		"SYS_779"	}, /*  779 */
-	{ 0,	0,	printargs,		"SYS_780"	}, /*  780 */
-	{ 0,	0,	printargs,		"SYS_781"	}, /*  781 */
-	{ 0,	0,	printargs,		"SYS_782"	}, /*  782 */
-	{ 0,	0,	printargs,		"SYS_783"	}, /*  783 */
-	{ 0,	0,	printargs,		"SYS_784"	}, /*  784 */
-	{ 0,	0,	printargs,		"SYS_785"	}, /*  785 */
-	{ 0,	0,	printargs,		"SYS_786"	}, /*  786 */
-	{ 0,	0,	printargs,		"SYS_787"	}, /*  787 */
-	{ 0,	0,	printargs,		"SYS_788"	}, /*  788 */
-	{ 0,	0,	printargs,		"SYS_789"	}, /*  789 */
-	{ 0,	0,	printargs,		"SYS_790"	}, /*  790 */
-	{ 0,	0,	printargs,		"SYS_791"	}, /*  791 */
-	{ 0,	0,	printargs,		"SYS_792"	}, /*  792 */
-	{ 0,	0,	printargs,		"SYS_793"	}, /*  793 */
-	{ 0,	0,	printargs,		"SYS_794"	}, /*  794 */
-	{ 0,	0,	printargs,		"SYS_795"	}, /*  795 */
-	{ 0,	0,	printargs,		"SYS_796"	}, /*  796 */
-	{ 0,	0,	printargs,		"SYS_797"	}, /*  797 */
-	{ 0,	0,	printargs,		"SYS_798"	}, /*  798 */
-	{ 0,	0,	printargs,		"SYS_799"	}, /*  799 */
-	{ 0,	0,	printargs,		"SYS_800"	}, /*  800 */
-	{ 0,	0,	printargs,		"SYS_801"	}, /*  801 */
-	{ 0,	0,	printargs,		"SYS_802"	}, /*  802 */
-	{ 0,	0,	printargs,		"SYS_803"	}, /*  803 */
-	{ 0,	0,	printargs,		"SYS_804"	}, /*  804 */
-	{ 0,	0,	printargs,		"SYS_805"	}, /*  805 */
-	{ 0,	0,	printargs,		"SYS_806"	}, /*  806 */
-	{ 0,	0,	printargs,		"SYS_807"	}, /*  807 */
-	{ 0,	0,	printargs,		"SYS_808"	}, /*  808 */
-	{ 0,	0,	printargs,		"SYS_809"	}, /*  809 */
-	{ 0,	0,	printargs,		"SYS_810"	}, /*  810 */
-	{ 0,	0,	printargs,		"SYS_811"	}, /*  811 */
-	{ 0,	0,	printargs,		"SYS_812"	}, /*  812 */
-	{ 0,	0,	printargs,		"SYS_813"	}, /*  813 */
-	{ 0,	0,	printargs,		"SYS_814"	}, /*  814 */
-	{ 0,	0,	printargs,		"SYS_815"	}, /*  815 */
-	{ 0,	0,	printargs,		"SYS_816"	}, /*  816 */
-	{ 0,	0,	printargs,		"SYS_817"	}, /*  817 */
-	{ 0,	0,	printargs,		"SYS_818"	}, /*  818 */
-	{ 0,	0,	printargs,		"SYS_819"	}, /*  819 */
-	{ 0,	0,	printargs,		"SYS_820"	}, /*  820 */
-	{ 0,	0,	printargs,		"SYS_821"	}, /*  821 */
-	{ 0,	0,	printargs,		"SYS_822"	}, /*  822 */
-	{ 0,	0,	printargs,		"SYS_823"	}, /*  823 */
-	{ 0,	0,	printargs,		"SYS_824"	}, /*  824 */
-	{ 0,	0,	printargs,		"SYS_825"	}, /*  825 */
-	{ 0,	0,	printargs,		"SYS_826"	}, /*  826 */
-	{ 0,	0,	printargs,		"SYS_827"	}, /*  827 */
-	{ 0,	0,	printargs,		"SYS_828"	}, /*  828 */
-	{ 0,	0,	printargs,		"SYS_829"	}, /*  829 */
-	{ 0,	0,	printargs,		"SYS_830"	}, /*  830 */
-	{ 0,	0,	printargs,		"SYS_831"	}, /*  831 */
-	{ 0,	0,	printargs,		"SYS_832"	}, /*  832 */
-	{ 0,	0,	printargs,		"SYS_833"	}, /*  833 */
-	{ 0,	0,	printargs,		"SYS_834"	}, /*  834 */
-	{ 0,	0,	printargs,		"SYS_835"	}, /*  835 */
-	{ 0,	0,	printargs,		"SYS_836"	}, /*  836 */
-	{ 0,	0,	printargs,		"SYS_837"	}, /*  837 */
-	{ 0,	0,	printargs,		"SYS_838"	}, /*  838 */
-	{ 0,	0,	printargs,		"SYS_839"	}, /*  839 */
-	{ 0,	0,	printargs,		"SYS_840"	}, /*  840 */
-	{ 0,	0,	printargs,		"SYS_841"	}, /*  841 */
-	{ 0,	0,	printargs,		"SYS_842"	}, /*  842 */
-	{ 0,	0,	printargs,		"SYS_843"	}, /*  843 */
-	{ 0,	0,	printargs,		"SYS_844"	}, /*  844 */
-	{ 0,	0,	printargs,		"SYS_845"	}, /*  845 */
-	{ 0,	0,	printargs,		"SYS_846"	}, /*  846 */
-	{ 0,	0,	printargs,		"SYS_847"	}, /*  847 */
-	{ 0,	0,	printargs,		"SYS_848"	}, /*  848 */
-	{ 0,	0,	printargs,		"SYS_849"	}, /*  849 */
-	{ 0,	0,	printargs,		"SYS_850"	}, /*  850 */
-	{ 0,	0,	printargs,		"SYS_851"	}, /*  851 */
-	{ 0,	0,	printargs,		"SYS_852"	}, /*  852 */
-	{ 0,	0,	printargs,		"SYS_853"	}, /*  853 */
-	{ 0,	0,	printargs,		"SYS_854"	}, /*  854 */
-	{ 0,	0,	printargs,		"SYS_855"	}, /*  855 */
-	{ 0,	0,	printargs,		"SYS_856"	}, /*  856 */
-	{ 0,	0,	printargs,		"SYS_857"	}, /*  857 */
-	{ 0,	0,	printargs,		"SYS_858"	}, /*  858 */
-	{ 0,	0,	printargs,		"SYS_859"	}, /*  859 */
-	{ 0,	0,	printargs,		"SYS_860"	}, /*  860 */
-	{ 0,	0,	printargs,		"SYS_861"	}, /*  861 */
-	{ 0,	0,	printargs,		"SYS_862"	}, /*  862 */
-	{ 0,	0,	printargs,		"SYS_863"	}, /*  863 */
-	{ 0,	0,	printargs,		"SYS_864"	}, /*  864 */
-	{ 0,	0,	printargs,		"SYS_865"	}, /*  865 */
-	{ 0,	0,	printargs,		"SYS_866"	}, /*  866 */
-	{ 0,	0,	printargs,		"SYS_867"	}, /*  867 */
-	{ 0,	0,	printargs,		"SYS_868"	}, /*  868 */
-	{ 0,	0,	printargs,		"SYS_869"	}, /*  869 */
-	{ 0,	0,	printargs,		"SYS_870"	}, /*  870 */
-	{ 0,	0,	printargs,		"SYS_871"	}, /*  871 */
-	{ 0,	0,	printargs,		"SYS_872"	}, /*  872 */
-	{ 0,	0,	printargs,		"SYS_873"	}, /*  873 */
-	{ 0,	0,	printargs,		"SYS_874"	}, /*  874 */
-	{ 0,	0,	printargs,		"SYS_875"	}, /*  875 */
-	{ 0,	0,	printargs,		"SYS_876"	}, /*  876 */
-	{ 0,	0,	printargs,		"SYS_877"	}, /*  877 */
-	{ 0,	0,	printargs,		"SYS_878"	}, /*  878 */
-	{ 0,	0,	printargs,		"SYS_879"	}, /*  879 */
-	{ 0,	0,	printargs,		"SYS_880"	}, /*  880 */
-	{ 0,	0,	printargs,		"SYS_881"	}, /*  881 */
-	{ 0,	0,	printargs,		"SYS_882"	}, /*  882 */
-	{ 0,	0,	printargs,		"SYS_883"	}, /*  883 */
-	{ 0,	0,	printargs,		"SYS_884"	}, /*  884 */
-	{ 0,	0,	printargs,		"SYS_885"	}, /*  885 */
-	{ 0,	0,	printargs,		"SYS_886"	}, /*  886 */
-	{ 0,	0,	printargs,		"SYS_887"	}, /*  887 */
-	{ 0,	0,	printargs,		"SYS_888"	}, /*  888 */
-	{ 0,	0,	printargs,		"SYS_889"	}, /*  889 */
-	{ 0,	0,	printargs,		"SYS_890"	}, /*  890 */
-	{ 0,	0,	printargs,		"SYS_891"	}, /*  891 */
-	{ 0,	0,	printargs,		"SYS_892"	}, /*  892 */
-	{ 0,	0,	printargs,		"SYS_893"	}, /*  893 */
-	{ 0,	0,	printargs,		"SYS_894"	}, /*  894 */
-	{ 0,	0,	printargs,		"SYS_895"	}, /*  895 */
-	{ 0,	0,	printargs,		"SYS_896"	}, /*  896 */
-	{ 0,	0,	printargs,		"SYS_897"	}, /*  897 */
-	{ 0,	0,	printargs,		"SYS_898"	}, /*  898 */
-	{ 0,	0,	printargs,		"SYS_899"	}, /*  899 */
-	{ 0,	0,	printargs,		"SYS_900"	}, /*  900 */
-	{ 0,	0,	printargs,		"SYS_901"	}, /*  901 */
-	{ 0,	0,	printargs,		"SYS_902"	}, /*  902 */
-	{ 0,	0,	printargs,		"SYS_903"	}, /*  903 */
-	{ 0,	0,	printargs,		"SYS_904"	}, /*  904 */
-	{ 0,	0,	printargs,		"SYS_905"	}, /*  905 */
-	{ 0,	0,	printargs,		"SYS_906"	}, /*  906 */
-	{ 0,	0,	printargs,		"SYS_907"	}, /*  907 */
-	{ 0,	0,	printargs,		"SYS_908"	}, /*  908 */
-	{ 0,	0,	printargs,		"SYS_909"	}, /*  909 */
-	{ 0,	0,	printargs,		"SYS_910"	}, /*  910 */
-	{ 0,	0,	printargs,		"SYS_911"	}, /*  911 */
-	{ 0,	0,	printargs,		"SYS_912"	}, /*  912 */
-	{ 0,	0,	printargs,		"SYS_913"	}, /*  913 */
-	{ 0,	0,	printargs,		"SYS_914"	}, /*  914 */
-	{ 0,	0,	printargs,		"SYS_915"	}, /*  915 */
-	{ 0,	0,	printargs,		"SYS_916"	}, /*  916 */
-	{ 0,	0,	printargs,		"SYS_917"	}, /*  917 */
-	{ 0,	0,	printargs,		"SYS_918"	}, /*  918 */
-	{ 0,	0,	printargs,		"SYS_919"	}, /*  919 */
-	{ 0,	0,	printargs,		"SYS_920"	}, /*  920 */
-	{ 0,	0,	printargs,		"SYS_921"	}, /*  921 */
-	{ 0,	0,	printargs,		"SYS_922"	}, /*  922 */
-	{ 0,	0,	printargs,		"SYS_923"	}, /*  923 */
-	{ 0,	0,	printargs,		"SYS_924"	}, /*  924 */
-	{ 0,	0,	printargs,		"SYS_925"	}, /*  925 */
-	{ 0,	0,	printargs,		"SYS_926"	}, /*  926 */
-	{ 0,	0,	printargs,		"SYS_927"	}, /*  927 */
-	{ 0,	0,	printargs,		"SYS_928"	}, /*  928 */
-	{ 0,	0,	printargs,		"SYS_929"	}, /*  929 */
-	{ 0,	0,	printargs,		"SYS_930"	}, /*  930 */
-	{ 0,	0,	printargs,		"SYS_931"	}, /*  931 */
-	{ 0,	0,	printargs,		"SYS_932"	}, /*  932 */
-	{ 0,	0,	printargs,		"SYS_933"	}, /*  933 */
-	{ 0,	0,	printargs,		"SYS_934"	}, /*  934 */
-	{ 0,	0,	printargs,		"SYS_935"	}, /*  935 */
-	{ 0,	0,	printargs,		"SYS_936"	}, /*  936 */
-	{ 0,	0,	printargs,		"SYS_937"	}, /*  937 */
-	{ 0,	0,	printargs,		"SYS_938"	}, /*  938 */
-	{ 0,	0,	printargs,		"SYS_939"	}, /*  939 */
-	{ 0,	0,	printargs,		"SYS_940"	}, /*  940 */
-	{ 0,	0,	printargs,		"SYS_941"	}, /*  941 */
-	{ 0,	0,	printargs,		"SYS_942"	}, /*  942 */
-	{ 0,	0,	printargs,		"SYS_943"	}, /*  943 */
-	{ 0,	0,	printargs,		"SYS_944"	}, /*  944 */
-	{ 0,	0,	printargs,		"SYS_945"	}, /*  945 */
-	{ 0,	0,	printargs,		"SYS_946"	}, /*  946 */
-	{ 0,	0,	printargs,		"SYS_947"	}, /*  947 */
-	{ 0,	0,	printargs,		"SYS_948"	}, /*  948 */
-	{ 0,	0,	printargs,		"SYS_949"	}, /*  949 */
-	{ 0,	0,	printargs,		"SYS_950"	}, /*  950 */
-	{ 0,	0,	printargs,		"SYS_951"	}, /*  951 */
-	{ 0,	0,	printargs,		"SYS_952"	}, /*  952 */
-	{ 0,	0,	printargs,		"SYS_953"	}, /*  953 */
-	{ 0,	0,	printargs,		"SYS_954"	}, /*  954 */
-	{ 0,	0,	printargs,		"SYS_955"	}, /*  955 */
-	{ 0,	0,	printargs,		"SYS_956"	}, /*  956 */
-	{ 0,	0,	printargs,		"SYS_957"	}, /*  957 */
-	{ 0,	0,	printargs,		"SYS_958"	}, /*  958 */
-	{ 0,	0,	printargs,		"SYS_959"	}, /*  959 */
-	{ 0,	0,	printargs,		"SYS_960"	}, /*  960 */
-	{ 0,	0,	printargs,		"SYS_961"	}, /*  961 */
-	{ 0,	0,	printargs,		"SYS_962"	}, /*  962 */
-	{ 0,	0,	printargs,		"SYS_963"	}, /*  963 */
-	{ 0,	0,	printargs,		"SYS_964"	}, /*  964 */
-	{ 0,	0,	printargs,		"SYS_965"	}, /*  965 */
-	{ 0,	0,	printargs,		"SYS_966"	}, /*  966 */
-	{ 0,	0,	printargs,		"SYS_967"	}, /*  967 */
-	{ 0,	0,	printargs,		"SYS_968"	}, /*  968 */
-	{ 0,	0,	printargs,		"SYS_969"	}, /*  969 */
-	{ 0,	0,	printargs,		"SYS_970"	}, /*  970 */
-	{ 0,	0,	printargs,		"SYS_971"	}, /*  971 */
-	{ 0,	0,	printargs,		"SYS_972"	}, /*  972 */
-	{ 0,	0,	printargs,		"SYS_973"	}, /*  973 */
-	{ 0,	0,	printargs,		"SYS_974"	}, /*  974 */
-	{ 0,	0,	printargs,		"SYS_975"	}, /*  975 */
-	{ 0,	0,	printargs,		"SYS_976"	}, /*  976 */
-	{ 0,	0,	printargs,		"SYS_977"	}, /*  977 */
-	{ 0,	0,	printargs,		"SYS_978"	}, /*  978 */
-	{ 0,	0,	printargs,		"SYS_979"	}, /*  979 */
-	{ 0,	0,	printargs,		"SYS_980"	}, /*  980 */
-	{ 0,	0,	printargs,		"SYS_981"	}, /*  981 */
-	{ 0,	0,	printargs,		"SYS_982"	}, /*  982 */
-	{ 0,	0,	printargs,		"SYS_983"	}, /*  983 */
-	{ 0,	0,	printargs,		"SYS_984"	}, /*  984 */
-	{ 0,	0,	printargs,		"SYS_985"	}, /*  985 */
-	{ 0,	0,	printargs,		"SYS_986"	}, /*  986 */
-	{ 0,	0,	printargs,		"SYS_987"	}, /*  987 */
-	{ 0,	0,	printargs,		"SYS_988"	}, /*  988 */
-	{ 0,	0,	printargs,		"SYS_989"	}, /*  989 */
-	{ 0,	0,	printargs,		"SYS_990"	}, /*  990 */
-	{ 0,	0,	printargs,		"SYS_991"	}, /*  991 */
-	{ 0,	0,	printargs,		"SYS_992"	}, /*  992 */
-	{ 0,	0,	printargs,		"SYS_993"	}, /*  993 */
-	{ 0,	0,	printargs,		"SYS_994"	}, /*  994 */
-	{ 0,	0,	printargs,		"SYS_995"	}, /*  995 */
-	{ 0,	0,	printargs,		"SYS_996"	}, /*  996 */
-	{ 0,	0,	printargs,		"SYS_997"	}, /*  997 */
-	{ 0,	0,	printargs,		"SYS_998"	}, /*  998 */
-	{ 0,	0,	printargs,		"SYS_999"	}, /*  999 */ /* end of SVR4 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 209 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 210 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 211 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 212 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 213 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 214 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 215 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 216 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 217 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 218 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 219 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 220 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 221 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 222 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 223 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 224 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 225 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 226 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 227 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 228 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 229 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 230 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 231 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 232 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 233 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 234 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 235 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 236 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 237 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 238 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 239 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 240 */
+	{ 0,	0,	NULL,			NULL		}, /*  241 */
+	{ 0,	0,	NULL,			NULL		}, /*  242 */
+	{ 0,	0,	NULL,			NULL		}, /*  243 */
+	{ 0,	0,	NULL,			NULL		}, /*  244 */
+	{ 0,	0,	NULL,			NULL		}, /*  245 */
+	{ 0,	0,	NULL,			NULL		}, /*  246 */
+	{ 0,	0,	NULL,			NULL		}, /*  247 */
+	{ 0,	0,	NULL,			NULL		}, /*  248 */
+	{ 0,	0,	NULL,			NULL		}, /*  249 */
+	{ 0,	0,	NULL,			NULL		}, /*  250 */
+	{ 0,	0,	NULL,			NULL		}, /*  251 */
+	{ 0,	0,	NULL,			NULL		}, /*  252 */
+	{ 0,	0,	NULL,			NULL		}, /*  253 */
+	{ 0,	0,	NULL,			NULL		}, /*  254 */
+	{ 0,	0,	NULL,			NULL		}, /*  255 */
+	{ 0,	0,	NULL,			NULL		}, /*  256 */
+	{ 0,	0,	NULL,			NULL		}, /*  257 */
+	{ 0,	0,	NULL,			NULL		}, /*  258 */
+	{ 0,	0,	NULL,			NULL		}, /*  259 */
+	{ 0,	0,	NULL,			NULL		}, /*  260 */
+	{ 0,	0,	NULL,			NULL		}, /*  261 */
+	{ 0,	0,	NULL,			NULL		}, /*  262 */
+	{ 0,	0,	NULL,			NULL		}, /*  263 */
+	{ 0,	0,	NULL,			NULL		}, /*  264 */
+	{ 0,	0,	NULL,			NULL		}, /*  265 */
+	{ 0,	0,	NULL,			NULL		}, /*  266 */
+	{ 0,	0,	NULL,			NULL		}, /*  267 */
+	{ 0,	0,	NULL,			NULL		}, /*  268 */
+	{ 0,	0,	NULL,			NULL		}, /*  269 */
+	{ 0,	0,	NULL,			NULL		}, /*  270 */
+	{ 0,	0,	NULL,			NULL		}, /*  271 */
+	{ 0,	0,	NULL,			NULL		}, /*  272 */
+	{ 0,	0,	NULL,			NULL		}, /*  273 */
+	{ 0,	0,	NULL,			NULL		}, /*  274 */
+	{ 0,	0,	NULL,			NULL		}, /*  275 */
+	{ 0,	0,	NULL,			NULL		}, /*  276 */
+	{ 0,	0,	NULL,			NULL		}, /*  277 */
+	{ 0,	0,	NULL,			NULL		}, /*  278 */
+	{ 0,	0,	NULL,			NULL		}, /*  279 */
+	{ 0,	0,	NULL,			NULL		}, /*  280 */
+	{ 0,	0,	NULL,			NULL		}, /*  281 */
+	{ 0,	0,	NULL,			NULL		}, /*  282 */
+	{ 0,	0,	NULL,			NULL		}, /*  283 */
+	{ 0,	0,	NULL,			NULL		}, /*  284 */
+	{ 0,	0,	NULL,			NULL		}, /*  285 */
+	{ 0,	0,	NULL,			NULL		}, /*  286 */
+	{ 0,	0,	NULL,			NULL		}, /*  287 */
+	{ 0,	0,	NULL,			NULL		}, /*  288 */
+	{ 0,	0,	NULL,			NULL		}, /*  289 */
+	{ 0,	0,	NULL,			NULL		}, /*  290 */
+	{ 0,	0,	NULL,			NULL		}, /*  291 */
+	{ 0,	0,	NULL,			NULL		}, /*  292 */
+	{ 0,	0,	NULL,			NULL		}, /*  293 */
+	{ 0,	0,	NULL,			NULL		}, /*  294 */
+	{ 0,	0,	NULL,			NULL		}, /*  295 */
+	{ 0,	0,	NULL,			NULL		}, /*  296 */
+	{ 0,	0,	NULL,			NULL		}, /*  297 */
+	{ 0,	0,	NULL,			NULL		}, /*  298 */
+	{ 0,	0,	NULL,			NULL		}, /*  299 */
+	{ 0,	0,	NULL,			NULL		}, /*  300 */
+	{ 0,	0,	NULL,			NULL		}, /*  301 */
+	{ 0,	0,	NULL,			NULL		}, /*  302 */
+	{ 0,	0,	NULL,			NULL		}, /*  303 */
+	{ 0,	0,	NULL,			NULL		}, /*  304 */
+	{ 0,	0,	NULL,			NULL		}, /*  305 */
+	{ 0,	0,	NULL,			NULL		}, /*  306 */
+	{ 0,	0,	NULL,			NULL		}, /*  307 */
+	{ 0,	0,	NULL,			NULL		}, /*  308 */
+	{ 0,	0,	NULL,			NULL		}, /*  309 */
+	{ 0,	0,	NULL,			NULL		}, /*  310 */
+	{ 0,	0,	NULL,			NULL		}, /*  311 */
+	{ 0,	0,	NULL,			NULL		}, /*  312 */
+	{ 0,	0,	NULL,			NULL		}, /*  313 */
+	{ 0,	0,	NULL,			NULL		}, /*  314 */
+	{ 0,	0,	NULL,			NULL		}, /*  315 */
+	{ 0,	0,	NULL,			NULL		}, /*  316 */
+	{ 0,	0,	NULL,			NULL		}, /*  317 */
+	{ 0,	0,	NULL,			NULL		}, /*  318 */
+	{ 0,	0,	NULL,			NULL		}, /*  319 */
+	{ 0,	0,	NULL,			NULL		}, /*  320 */
+	{ 0,	0,	NULL,			NULL		}, /*  321 */
+	{ 0,	0,	NULL,			NULL		}, /*  322 */
+	{ 0,	0,	NULL,			NULL		}, /*  323 */
+	{ 0,	0,	NULL,			NULL		}, /*  324 */
+	{ 0,	0,	NULL,			NULL		}, /*  325 */
+	{ 0,	0,	NULL,			NULL		}, /*  326 */
+	{ 0,	0,	NULL,			NULL		}, /*  327 */
+	{ 0,	0,	NULL,			NULL		}, /*  328 */
+	{ 0,	0,	NULL,			NULL		}, /*  329 */
+	{ 0,	0,	NULL,			NULL		}, /*  330 */
+	{ 0,	0,	NULL,			NULL		}, /*  331 */
+	{ 0,	0,	NULL,			NULL		}, /*  332 */
+	{ 0,	0,	NULL,			NULL		}, /*  333 */
+	{ 0,	0,	NULL,			NULL		}, /*  334 */
+	{ 0,	0,	NULL,			NULL		}, /*  335 */
+	{ 0,	0,	NULL,			NULL		}, /*  336 */
+	{ 0,	0,	NULL,			NULL		}, /*  337 */
+	{ 0,	0,	NULL,			NULL		}, /*  338 */
+	{ 0,	0,	NULL,			NULL		}, /*  339 */
+	{ 0,	0,	NULL,			NULL		}, /*  340 */
+	{ 0,	0,	NULL,			NULL		}, /*  341 */
+	{ 0,	0,	NULL,			NULL		}, /*  342 */
+	{ 0,	0,	NULL,			NULL		}, /*  343 */
+	{ 0,	0,	NULL,			NULL		}, /*  344 */
+	{ 0,	0,	NULL,			NULL		}, /*  345 */
+	{ 0,	0,	NULL,			NULL		}, /*  346 */
+	{ 0,	0,	NULL,			NULL		}, /*  347 */
+	{ 0,	0,	NULL,			NULL		}, /*  348 */
+	{ 0,	0,	NULL,			NULL		}, /*  349 */
+	{ 0,	0,	NULL,			NULL		}, /*  350 */
+	{ 0,	0,	NULL,			NULL		}, /*  351 */
+	{ 0,	0,	NULL,			NULL		}, /*  352 */
+	{ 0,	0,	NULL,			NULL		}, /*  353 */
+	{ 0,	0,	NULL,			NULL		}, /*  354 */
+	{ 0,	0,	NULL,			NULL		}, /*  355 */
+	{ 0,	0,	NULL,			NULL		}, /*  356 */
+	{ 0,	0,	NULL,			NULL		}, /*  357 */
+	{ 0,	0,	NULL,			NULL		}, /*  358 */
+	{ 0,	0,	NULL,			NULL		}, /*  359 */
+	{ 0,	0,	NULL,			NULL		}, /*  360 */
+	{ 0,	0,	NULL,			NULL		}, /*  361 */
+	{ 0,	0,	NULL,			NULL		}, /*  362 */
+	{ 0,	0,	NULL,			NULL		}, /*  363 */
+	{ 0,	0,	NULL,			NULL		}, /*  364 */
+	{ 0,	0,	NULL,			NULL		}, /*  365 */
+	{ 0,	0,	NULL,			NULL		}, /*  366 */
+	{ 0,	0,	NULL,			NULL		}, /*  367 */
+	{ 0,	0,	NULL,			NULL		}, /*  368 */
+	{ 0,	0,	NULL,			NULL		}, /*  369 */
+	{ 0,	0,	NULL,			NULL		}, /*  370 */
+	{ 0,	0,	NULL,			NULL		}, /*  371 */
+	{ 0,	0,	NULL,			NULL		}, /*  372 */
+	{ 0,	0,	NULL,			NULL		}, /*  373 */
+	{ 0,	0,	NULL,			NULL		}, /*  374 */
+	{ 0,	0,	NULL,			NULL		}, /*  375 */
+	{ 0,	0,	NULL,			NULL		}, /*  376 */
+	{ 0,	0,	NULL,			NULL		}, /*  377 */
+	{ 0,	0,	NULL,			NULL		}, /*  378 */
+	{ 0,	0,	NULL,			NULL		}, /*  379 */
+	{ 0,	0,	NULL,			NULL		}, /*  380 */
+	{ 0,	0,	NULL,			NULL		}, /*  381 */
+	{ 0,	0,	NULL,			NULL		}, /*  382 */
+	{ 0,	0,	NULL,			NULL		}, /*  383 */
+	{ 0,	0,	NULL,			NULL		}, /*  384 */
+	{ 0,	0,	NULL,			NULL		}, /*  385 */
+	{ 0,	0,	NULL,			NULL		}, /*  386 */
+	{ 0,	0,	NULL,			NULL		}, /*  387 */
+	{ 0,	0,	NULL,			NULL		}, /*  388 */
+	{ 0,	0,	NULL,			NULL		}, /*  389 */
+	{ 0,	0,	NULL,			NULL		}, /*  390 */
+	{ 0,	0,	NULL,			NULL		}, /*  391 */
+	{ 0,	0,	NULL,			NULL		}, /*  392 */
+	{ 0,	0,	NULL,			NULL		}, /*  393 */
+	{ 0,	0,	NULL,			NULL		}, /*  394 */
+	{ 0,	0,	NULL,			NULL		}, /*  395 */
+	{ 0,	0,	NULL,			NULL		}, /*  396 */
+	{ 0,	0,	NULL,			NULL		}, /*  397 */
+	{ 0,	0,	NULL,			NULL		}, /*  398 */
+	{ 0,	0,	NULL,			NULL		}, /*  399 */
+	{ 0,	0,	NULL,			NULL		}, /*  400 */
+	{ 0,	0,	NULL,			NULL		}, /*  401 */
+	{ 0,	0,	NULL,			NULL		}, /*  402 */
+	{ 0,	0,	NULL,			NULL		}, /*  403 */
+	{ 0,	0,	NULL,			NULL		}, /*  404 */
+	{ 0,	0,	NULL,			NULL		}, /*  405 */
+	{ 0,	0,	NULL,			NULL		}, /*  406 */
+	{ 0,	0,	NULL,			NULL		}, /*  407 */
+	{ 0,	0,	NULL,			NULL		}, /*  408 */
+	{ 0,	0,	NULL,			NULL		}, /*  409 */
+	{ 0,	0,	NULL,			NULL		}, /*  410 */
+	{ 0,	0,	NULL,			NULL		}, /*  411 */
+	{ 0,	0,	NULL,			NULL		}, /*  412 */
+	{ 0,	0,	NULL,			NULL		}, /*  413 */
+	{ 0,	0,	NULL,			NULL		}, /*  414 */
+	{ 0,	0,	NULL,			NULL		}, /*  415 */
+	{ 0,	0,	NULL,			NULL		}, /*  416 */
+	{ 0,	0,	NULL,			NULL		}, /*  417 */
+	{ 0,	0,	NULL,			NULL		}, /*  418 */
+	{ 0,	0,	NULL,			NULL		}, /*  419 */
+	{ 0,	0,	NULL,			NULL		}, /*  420 */
+	{ 0,	0,	NULL,			NULL		}, /*  421 */
+	{ 0,	0,	NULL,			NULL		}, /*  422 */
+	{ 0,	0,	NULL,			NULL		}, /*  423 */
+	{ 0,	0,	NULL,			NULL		}, /*  424 */
+	{ 0,	0,	NULL,			NULL		}, /*  425 */
+	{ 0,	0,	NULL,			NULL		}, /*  426 */
+	{ 0,	0,	NULL,			NULL		}, /*  427 */
+	{ 0,	0,	NULL,			NULL		}, /*  428 */
+	{ 0,	0,	NULL,			NULL		}, /*  429 */
+	{ 0,	0,	NULL,			NULL		}, /*  430 */
+	{ 0,	0,	NULL,			NULL		}, /*  431 */
+	{ 0,	0,	NULL,			NULL		}, /*  432 */
+	{ 0,	0,	NULL,			NULL		}, /*  433 */
+	{ 0,	0,	NULL,			NULL		}, /*  434 */
+	{ 0,	0,	NULL,			NULL		}, /*  435 */
+	{ 0,	0,	NULL,			NULL		}, /*  436 */
+	{ 0,	0,	NULL,			NULL		}, /*  437 */
+	{ 0,	0,	NULL,			NULL		}, /*  438 */
+	{ 0,	0,	NULL,			NULL		}, /*  439 */
+	{ 0,	0,	NULL,			NULL		}, /*  440 */
+	{ 0,	0,	NULL,			NULL		}, /*  441 */
+	{ 0,	0,	NULL,			NULL		}, /*  442 */
+	{ 0,	0,	NULL,			NULL		}, /*  443 */
+	{ 0,	0,	NULL,			NULL		}, /*  444 */
+	{ 0,	0,	NULL,			NULL		}, /*  445 */
+	{ 0,	0,	NULL,			NULL		}, /*  446 */
+	{ 0,	0,	NULL,			NULL		}, /*  447 */
+	{ 0,	0,	NULL,			NULL		}, /*  448 */
+	{ 0,	0,	NULL,			NULL		}, /*  449 */
+	{ 0,	0,	NULL,			NULL		}, /*  450 */
+	{ 0,	0,	NULL,			NULL		}, /*  451 */
+	{ 0,	0,	NULL,			NULL		}, /*  452 */
+	{ 0,	0,	NULL,			NULL		}, /*  453 */
+	{ 0,	0,	NULL,			NULL		}, /*  454 */
+	{ 0,	0,	NULL,			NULL		}, /*  455 */
+	{ 0,	0,	NULL,			NULL		}, /*  456 */
+	{ 0,	0,	NULL,			NULL		}, /*  457 */
+	{ 0,	0,	NULL,			NULL		}, /*  458 */
+	{ 0,	0,	NULL,			NULL		}, /*  459 */
+	{ 0,	0,	NULL,			NULL		}, /*  460 */
+	{ 0,	0,	NULL,			NULL		}, /*  461 */
+	{ 0,	0,	NULL,			NULL		}, /*  462 */
+	{ 0,	0,	NULL,			NULL		}, /*  463 */
+	{ 0,	0,	NULL,			NULL		}, /*  464 */
+	{ 0,	0,	NULL,			NULL		}, /*  465 */
+	{ 0,	0,	NULL,			NULL		}, /*  466 */
+	{ 0,	0,	NULL,			NULL		}, /*  467 */
+	{ 0,	0,	NULL,			NULL		}, /*  468 */
+	{ 0,	0,	NULL,			NULL		}, /*  469 */
+	{ 0,	0,	NULL,			NULL		}, /*  470 */
+	{ 0,	0,	NULL,			NULL		}, /*  471 */
+	{ 0,	0,	NULL,			NULL		}, /*  472 */
+	{ 0,	0,	NULL,			NULL		}, /*  473 */
+	{ 0,	0,	NULL,			NULL		}, /*  474 */
+	{ 0,	0,	NULL,			NULL		}, /*  475 */
+	{ 0,	0,	NULL,			NULL		}, /*  476 */
+	{ 0,	0,	NULL,			NULL		}, /*  477 */
+	{ 0,	0,	NULL,			NULL		}, /*  478 */
+	{ 0,	0,	NULL,			NULL		}, /*  479 */
+	{ 0,	0,	NULL,			NULL		}, /*  480 */
+	{ 0,	0,	NULL,			NULL		}, /*  481 */
+	{ 0,	0,	NULL,			NULL		}, /*  482 */
+	{ 0,	0,	NULL,			NULL		}, /*  483 */
+	{ 0,	0,	NULL,			NULL		}, /*  484 */
+	{ 0,	0,	NULL,			NULL		}, /*  485 */
+	{ 0,	0,	NULL,			NULL		}, /*  486 */
+	{ 0,	0,	NULL,			NULL		}, /*  487 */
+	{ 0,	0,	NULL,			NULL		}, /*  488 */
+	{ 0,	0,	NULL,			NULL		}, /*  489 */
+	{ 0,	0,	NULL,			NULL		}, /*  490 */
+	{ 0,	0,	NULL,			NULL		}, /*  491 */
+	{ 0,	0,	NULL,			NULL		}, /*  492 */
+	{ 0,	0,	NULL,			NULL		}, /*  493 */
+	{ 0,	0,	NULL,			NULL		}, /*  494 */
+	{ 0,	0,	NULL,			NULL		}, /*  495 */
+	{ 0,	0,	NULL,			NULL		}, /*  496 */
+	{ 0,	0,	NULL,			NULL		}, /*  497 */
+	{ 0,	0,	NULL,			NULL		}, /*  498 */
+	{ 0,	0,	NULL,			NULL		}, /*  499 */
+	{ 0,	0,	NULL,			NULL		}, /*  500 */
+	{ 0,	0,	NULL,			NULL		}, /*  501 */
+	{ 0,	0,	NULL,			NULL		}, /*  502 */
+	{ 0,	0,	NULL,			NULL		}, /*  503 */
+	{ 0,	0,	NULL,			NULL		}, /*  504 */
+	{ 0,	0,	NULL,			NULL		}, /*  505 */
+	{ 0,	0,	NULL,			NULL		}, /*  506 */
+	{ 0,	0,	NULL,			NULL		}, /*  507 */
+	{ 0,	0,	NULL,			NULL		}, /*  508 */
+	{ 0,	0,	NULL,			NULL		}, /*  509 */
+	{ 0,	0,	NULL,			NULL		}, /*  510 */
+	{ 0,	0,	NULL,			NULL		}, /*  511 */
+	{ 0,	0,	NULL,			NULL		}, /*  512 */
+	{ 0,	0,	NULL,			NULL		}, /*  513 */
+	{ 0,	0,	NULL,			NULL		}, /*  514 */
+	{ 0,	0,	NULL,			NULL		}, /*  515 */
+	{ 0,	0,	NULL,			NULL		}, /*  516 */
+	{ 0,	0,	NULL,			NULL		}, /*  517 */
+	{ 0,	0,	NULL,			NULL		}, /*  518 */
+	{ 0,	0,	NULL,			NULL		}, /*  519 */
+	{ 0,	0,	NULL,			NULL		}, /*  520 */
+	{ 0,	0,	NULL,			NULL		}, /*  521 */
+	{ 0,	0,	NULL,			NULL		}, /*  522 */
+	{ 0,	0,	NULL,			NULL		}, /*  523 */
+	{ 0,	0,	NULL,			NULL		}, /*  524 */
+	{ 0,	0,	NULL,			NULL		}, /*  525 */
+	{ 0,	0,	NULL,			NULL		}, /*  526 */
+	{ 0,	0,	NULL,			NULL		}, /*  527 */
+	{ 0,	0,	NULL,			NULL		}, /*  528 */
+	{ 0,	0,	NULL,			NULL		}, /*  529 */
+	{ 0,	0,	NULL,			NULL		}, /*  530 */
+	{ 0,	0,	NULL,			NULL		}, /*  531 */
+	{ 0,	0,	NULL,			NULL		}, /*  532 */
+	{ 0,	0,	NULL,			NULL		}, /*  533 */
+	{ 0,	0,	NULL,			NULL		}, /*  534 */
+	{ 0,	0,	NULL,			NULL		}, /*  535 */
+	{ 0,	0,	NULL,			NULL		}, /*  536 */
+	{ 0,	0,	NULL,			NULL		}, /*  537 */
+	{ 0,	0,	NULL,			NULL		}, /*  538 */
+	{ 0,	0,	NULL,			NULL		}, /*  539 */
+	{ 0,	0,	NULL,			NULL		}, /*  540 */
+	{ 0,	0,	NULL,			NULL		}, /*  541 */
+	{ 0,	0,	NULL,			NULL		}, /*  542 */
+	{ 0,	0,	NULL,			NULL		}, /*  543 */
+	{ 0,	0,	NULL,			NULL		}, /*  544 */
+	{ 0,	0,	NULL,			NULL		}, /*  545 */
+	{ 0,	0,	NULL,			NULL		}, /*  546 */
+	{ 0,	0,	NULL,			NULL		}, /*  547 */
+	{ 0,	0,	NULL,			NULL		}, /*  548 */
+	{ 0,	0,	NULL,			NULL		}, /*  549 */
+	{ 0,	0,	NULL,			NULL		}, /*  550 */
+	{ 0,	0,	NULL,			NULL		}, /*  551 */
+	{ 0,	0,	NULL,			NULL		}, /*  552 */
+	{ 0,	0,	NULL,			NULL		}, /*  553 */
+	{ 0,	0,	NULL,			NULL		}, /*  554 */
+	{ 0,	0,	NULL,			NULL		}, /*  555 */
+	{ 0,	0,	NULL,			NULL		}, /*  556 */
+	{ 0,	0,	NULL,			NULL		}, /*  557 */
+	{ 0,	0,	NULL,			NULL		}, /*  558 */
+	{ 0,	0,	NULL,			NULL		}, /*  559 */
+	{ 0,	0,	NULL,			NULL		}, /*  560 */
+	{ 0,	0,	NULL,			NULL		}, /*  561 */
+	{ 0,	0,	NULL,			NULL		}, /*  562 */
+	{ 0,	0,	NULL,			NULL		}, /*  563 */
+	{ 0,	0,	NULL,			NULL		}, /*  564 */
+	{ 0,	0,	NULL,			NULL		}, /*  565 */
+	{ 0,	0,	NULL,			NULL		}, /*  566 */
+	{ 0,	0,	NULL,			NULL		}, /*  567 */
+	{ 0,	0,	NULL,			NULL		}, /*  568 */
+	{ 0,	0,	NULL,			NULL		}, /*  569 */
+	{ 0,	0,	NULL,			NULL		}, /*  570 */
+	{ 0,	0,	NULL,			NULL		}, /*  571 */
+	{ 0,	0,	NULL,			NULL		}, /*  572 */
+	{ 0,	0,	NULL,			NULL		}, /*  573 */
+	{ 0,	0,	NULL,			NULL		}, /*  574 */
+	{ 0,	0,	NULL,			NULL		}, /*  575 */
+	{ 0,	0,	NULL,			NULL		}, /*  576 */
+	{ 0,	0,	NULL,			NULL		}, /*  577 */
+	{ 0,	0,	NULL,			NULL		}, /*  578 */
+	{ 0,	0,	NULL,			NULL		}, /*  579 */
+	{ 0,	0,	NULL,			NULL		}, /*  580 */
+	{ 0,	0,	NULL,			NULL		}, /*  581 */
+	{ 0,	0,	NULL,			NULL		}, /*  582 */
+	{ 0,	0,	NULL,			NULL		}, /*  583 */
+	{ 0,	0,	NULL,			NULL		}, /*  584 */
+	{ 0,	0,	NULL,			NULL		}, /*  585 */
+	{ 0,	0,	NULL,			NULL		}, /*  586 */
+	{ 0,	0,	NULL,			NULL		}, /*  587 */
+	{ 0,	0,	NULL,			NULL		}, /*  588 */
+	{ 0,	0,	NULL,			NULL		}, /*  589 */
+	{ 0,	0,	NULL,			NULL		}, /*  590 */
+	{ 0,	0,	NULL,			NULL		}, /*  591 */
+	{ 0,	0,	NULL,			NULL		}, /*  592 */
+	{ 0,	0,	NULL,			NULL		}, /*  593 */
+	{ 0,	0,	NULL,			NULL		}, /*  594 */
+	{ 0,	0,	NULL,			NULL		}, /*  595 */
+	{ 0,	0,	NULL,			NULL		}, /*  596 */
+	{ 0,	0,	NULL,			NULL		}, /*  597 */
+	{ 0,	0,	NULL,			NULL		}, /*  598 */
+	{ 0,	0,	NULL,			NULL		}, /*  599 */
+	{ 0,	0,	NULL,			NULL		}, /*  600 */
+	{ 0,	0,	NULL,			NULL		}, /*  601 */
+	{ 0,	0,	NULL,			NULL		}, /*  602 */
+	{ 0,	0,	NULL,			NULL		}, /*  603 */
+	{ 0,	0,	NULL,			NULL		}, /*  604 */
+	{ 0,	0,	NULL,			NULL		}, /*  605 */
+	{ 0,	0,	NULL,			NULL		}, /*  606 */
+	{ 0,	0,	NULL,			NULL		}, /*  607 */
+	{ 0,	0,	NULL,			NULL		}, /*  608 */
+	{ 0,	0,	NULL,			NULL		}, /*  609 */
+	{ 0,	0,	NULL,			NULL		}, /*  610 */
+	{ 0,	0,	NULL,			NULL		}, /*  611 */
+	{ 0,	0,	NULL,			NULL		}, /*  612 */
+	{ 0,	0,	NULL,			NULL		}, /*  613 */
+	{ 0,	0,	NULL,			NULL		}, /*  614 */
+	{ 0,	0,	NULL,			NULL		}, /*  615 */
+	{ 0,	0,	NULL,			NULL		}, /*  616 */
+	{ 0,	0,	NULL,			NULL		}, /*  617 */
+	{ 0,	0,	NULL,			NULL		}, /*  618 */
+	{ 0,	0,	NULL,			NULL		}, /*  619 */
+	{ 0,	0,	NULL,			NULL		}, /*  620 */
+	{ 0,	0,	NULL,			NULL		}, /*  621 */
+	{ 0,	0,	NULL,			NULL		}, /*  622 */
+	{ 0,	0,	NULL,			NULL		}, /*  623 */
+	{ 0,	0,	NULL,			NULL		}, /*  624 */
+	{ 0,	0,	NULL,			NULL		}, /*  625 */
+	{ 0,	0,	NULL,			NULL		}, /*  626 */
+	{ 0,	0,	NULL,			NULL		}, /*  627 */
+	{ 0,	0,	NULL,			NULL		}, /*  628 */
+	{ 0,	0,	NULL,			NULL		}, /*  629 */
+	{ 0,	0,	NULL,			NULL		}, /*  630 */
+	{ 0,	0,	NULL,			NULL		}, /*  631 */
+	{ 0,	0,	NULL,			NULL		}, /*  632 */
+	{ 0,	0,	NULL,			NULL		}, /*  633 */
+	{ 0,	0,	NULL,			NULL		}, /*  634 */
+	{ 0,	0,	NULL,			NULL		}, /*  635 */
+	{ 0,	0,	NULL,			NULL		}, /*  636 */
+	{ 0,	0,	NULL,			NULL		}, /*  637 */
+	{ 0,	0,	NULL,			NULL		}, /*  638 */
+	{ 0,	0,	NULL,			NULL		}, /*  639 */
+	{ 0,	0,	NULL,			NULL		}, /*  640 */
+	{ 0,	0,	NULL,			NULL		}, /*  641 */
+	{ 0,	0,	NULL,			NULL		}, /*  642 */
+	{ 0,	0,	NULL,			NULL		}, /*  643 */
+	{ 0,	0,	NULL,			NULL		}, /*  644 */
+	{ 0,	0,	NULL,			NULL		}, /*  645 */
+	{ 0,	0,	NULL,			NULL		}, /*  646 */
+	{ 0,	0,	NULL,			NULL		}, /*  647 */
+	{ 0,	0,	NULL,			NULL		}, /*  648 */
+	{ 0,	0,	NULL,			NULL		}, /*  649 */
+	{ 0,	0,	NULL,			NULL		}, /*  650 */
+	{ 0,	0,	NULL,			NULL		}, /*  651 */
+	{ 0,	0,	NULL,			NULL		}, /*  652 */
+	{ 0,	0,	NULL,			NULL		}, /*  653 */
+	{ 0,	0,	NULL,			NULL		}, /*  654 */
+	{ 0,	0,	NULL,			NULL		}, /*  655 */
+	{ 0,	0,	NULL,			NULL		}, /*  656 */
+	{ 0,	0,	NULL,			NULL		}, /*  657 */
+	{ 0,	0,	NULL,			NULL		}, /*  658 */
+	{ 0,	0,	NULL,			NULL		}, /*  659 */
+	{ 0,	0,	NULL,			NULL		}, /*  660 */
+	{ 0,	0,	NULL,			NULL		}, /*  661 */
+	{ 0,	0,	NULL,			NULL		}, /*  662 */
+	{ 0,	0,	NULL,			NULL		}, /*  663 */
+	{ 0,	0,	NULL,			NULL		}, /*  664 */
+	{ 0,	0,	NULL,			NULL		}, /*  665 */
+	{ 0,	0,	NULL,			NULL		}, /*  666 */
+	{ 0,	0,	NULL,			NULL		}, /*  667 */
+	{ 0,	0,	NULL,			NULL		}, /*  668 */
+	{ 0,	0,	NULL,			NULL		}, /*  669 */
+	{ 0,	0,	NULL,			NULL		}, /*  670 */
+	{ 0,	0,	NULL,			NULL		}, /*  671 */
+	{ 0,	0,	NULL,			NULL		}, /*  672 */
+	{ 0,	0,	NULL,			NULL		}, /*  673 */
+	{ 0,	0,	NULL,			NULL		}, /*  674 */
+	{ 0,	0,	NULL,			NULL		}, /*  675 */
+	{ 0,	0,	NULL,			NULL		}, /*  676 */
+	{ 0,	0,	NULL,			NULL		}, /*  677 */
+	{ 0,	0,	NULL,			NULL		}, /*  678 */
+	{ 0,	0,	NULL,			NULL		}, /*  679 */
+	{ 0,	0,	NULL,			NULL		}, /*  680 */
+	{ 0,	0,	NULL,			NULL		}, /*  681 */
+	{ 0,	0,	NULL,			NULL		}, /*  682 */
+	{ 0,	0,	NULL,			NULL		}, /*  683 */
+	{ 0,	0,	NULL,			NULL		}, /*  684 */
+	{ 0,	0,	NULL,			NULL		}, /*  685 */
+	{ 0,	0,	NULL,			NULL		}, /*  686 */
+	{ 0,	0,	NULL,			NULL		}, /*  687 */
+	{ 0,	0,	NULL,			NULL		}, /*  688 */
+	{ 0,	0,	NULL,			NULL		}, /*  689 */
+	{ 0,	0,	NULL,			NULL		}, /*  690 */
+	{ 0,	0,	NULL,			NULL		}, /*  691 */
+	{ 0,	0,	NULL,			NULL		}, /*  692 */
+	{ 0,	0,	NULL,			NULL		}, /*  693 */
+	{ 0,	0,	NULL,			NULL		}, /*  694 */
+	{ 0,	0,	NULL,			NULL		}, /*  695 */
+	{ 0,	0,	NULL,			NULL		}, /*  696 */
+	{ 0,	0,	NULL,			NULL		}, /*  697 */
+	{ 0,	0,	NULL,			NULL		}, /*  698 */
+	{ 0,	0,	NULL,			NULL		}, /*  699 */
+	{ 0,	0,	NULL,			NULL		}, /*  700 */
+	{ 0,	0,	NULL,			NULL		}, /*  701 */
+	{ 0,	0,	NULL,			NULL		}, /*  702 */
+	{ 0,	0,	NULL,			NULL		}, /*  703 */
+	{ 0,	0,	NULL,			NULL		}, /*  704 */
+	{ 0,	0,	NULL,			NULL		}, /*  705 */
+	{ 0,	0,	NULL,			NULL		}, /*  706 */
+	{ 0,	0,	NULL,			NULL		}, /*  707 */
+	{ 0,	0,	NULL,			NULL		}, /*  708 */
+	{ 0,	0,	NULL,			NULL		}, /*  709 */
+	{ 0,	0,	NULL,			NULL		}, /*  710 */
+	{ 0,	0,	NULL,			NULL		}, /*  711 */
+	{ 0,	0,	NULL,			NULL		}, /*  712 */
+	{ 0,	0,	NULL,			NULL		}, /*  713 */
+	{ 0,	0,	NULL,			NULL		}, /*  714 */
+	{ 0,	0,	NULL,			NULL		}, /*  715 */
+	{ 0,	0,	NULL,			NULL		}, /*  716 */
+	{ 0,	0,	NULL,			NULL		}, /*  717 */
+	{ 0,	0,	NULL,			NULL		}, /*  718 */
+	{ 0,	0,	NULL,			NULL		}, /*  719 */
+	{ 0,	0,	NULL,			NULL		}, /*  720 */
+	{ 0,	0,	NULL,			NULL		}, /*  721 */
+	{ 0,	0,	NULL,			NULL		}, /*  722 */
+	{ 0,	0,	NULL,			NULL		}, /*  723 */
+	{ 0,	0,	NULL,			NULL		}, /*  724 */
+	{ 0,	0,	NULL,			NULL		}, /*  725 */
+	{ 0,	0,	NULL,			NULL		}, /*  726 */
+	{ 0,	0,	NULL,			NULL		}, /*  727 */
+	{ 0,	0,	NULL,			NULL		}, /*  728 */
+	{ 0,	0,	NULL,			NULL		}, /*  729 */
+	{ 0,	0,	NULL,			NULL		}, /*  730 */
+	{ 0,	0,	NULL,			NULL		}, /*  731 */
+	{ 0,	0,	NULL,			NULL		}, /*  732 */
+	{ 0,	0,	NULL,			NULL		}, /*  733 */
+	{ 0,	0,	NULL,			NULL		}, /*  734 */
+	{ 0,	0,	NULL,			NULL		}, /*  735 */
+	{ 0,	0,	NULL,			NULL		}, /*  736 */
+	{ 0,	0,	NULL,			NULL		}, /*  737 */
+	{ 0,	0,	NULL,			NULL		}, /*  738 */
+	{ 0,	0,	NULL,			NULL		}, /*  739 */
+	{ 0,	0,	NULL,			NULL		}, /*  740 */
+	{ 0,	0,	NULL,			NULL		}, /*  741 */
+	{ 0,	0,	NULL,			NULL		}, /*  742 */
+	{ 0,	0,	NULL,			NULL		}, /*  743 */
+	{ 0,	0,	NULL,			NULL		}, /*  744 */
+	{ 0,	0,	NULL,			NULL		}, /*  745 */
+	{ 0,	0,	NULL,			NULL		}, /*  746 */
+	{ 0,	0,	NULL,			NULL		}, /*  747 */
+	{ 0,	0,	NULL,			NULL		}, /*  748 */
+	{ 0,	0,	NULL,			NULL		}, /*  749 */
+	{ 0,	0,	NULL,			NULL		}, /*  750 */
+	{ 0,	0,	NULL,			NULL		}, /*  751 */
+	{ 0,	0,	NULL,			NULL		}, /*  752 */
+	{ 0,	0,	NULL,			NULL		}, /*  753 */
+	{ 0,	0,	NULL,			NULL		}, /*  754 */
+	{ 0,	0,	NULL,			NULL		}, /*  755 */
+	{ 0,	0,	NULL,			NULL		}, /*  756 */
+	{ 0,	0,	NULL,			NULL		}, /*  757 */
+	{ 0,	0,	NULL,			NULL		}, /*  758 */
+	{ 0,	0,	NULL,			NULL		}, /*  759 */
+	{ 0,	0,	NULL,			NULL		}, /*  760 */
+	{ 0,	0,	NULL,			NULL		}, /*  761 */
+	{ 0,	0,	NULL,			NULL		}, /*  762 */
+	{ 0,	0,	NULL,			NULL		}, /*  763 */
+	{ 0,	0,	NULL,			NULL		}, /*  764 */
+	{ 0,	0,	NULL,			NULL		}, /*  765 */
+	{ 0,	0,	NULL,			NULL		}, /*  766 */
+	{ 0,	0,	NULL,			NULL		}, /*  767 */
+	{ 0,	0,	NULL,			NULL		}, /*  768 */
+	{ 0,	0,	NULL,			NULL		}, /*  769 */
+	{ 0,	0,	NULL,			NULL		}, /*  770 */
+	{ 0,	0,	NULL,			NULL		}, /*  771 */
+	{ 0,	0,	NULL,			NULL		}, /*  772 */
+	{ 0,	0,	NULL,			NULL		}, /*  773 */
+	{ 0,	0,	NULL,			NULL		}, /*  774 */
+	{ 0,	0,	NULL,			NULL		}, /*  775 */
+	{ 0,	0,	NULL,			NULL		}, /*  776 */
+	{ 0,	0,	NULL,			NULL		}, /*  777 */
+	{ 0,	0,	NULL,			NULL		}, /*  778 */
+	{ 0,	0,	NULL,			NULL		}, /*  779 */
+	{ 0,	0,	NULL,			NULL		}, /*  780 */
+	{ 0,	0,	NULL,			NULL		}, /*  781 */
+	{ 0,	0,	NULL,			NULL		}, /*  782 */
+	{ 0,	0,	NULL,			NULL		}, /*  783 */
+	{ 0,	0,	NULL,			NULL		}, /*  784 */
+	{ 0,	0,	NULL,			NULL		}, /*  785 */
+	{ 0,	0,	NULL,			NULL		}, /*  786 */
+	{ 0,	0,	NULL,			NULL		}, /*  787 */
+	{ 0,	0,	NULL,			NULL		}, /*  788 */
+	{ 0,	0,	NULL,			NULL		}, /*  789 */
+	{ 0,	0,	NULL,			NULL		}, /*  790 */
+	{ 0,	0,	NULL,			NULL		}, /*  791 */
+	{ 0,	0,	NULL,			NULL		}, /*  792 */
+	{ 0,	0,	NULL,			NULL		}, /*  793 */
+	{ 0,	0,	NULL,			NULL		}, /*  794 */
+	{ 0,	0,	NULL,			NULL		}, /*  795 */
+	{ 0,	0,	NULL,			NULL		}, /*  796 */
+	{ 0,	0,	NULL,			NULL		}, /*  797 */
+	{ 0,	0,	NULL,			NULL		}, /*  798 */
+	{ 0,	0,	NULL,			NULL		}, /*  799 */
+	{ 0,	0,	NULL,			NULL		}, /*  800 */
+	{ 0,	0,	NULL,			NULL		}, /*  801 */
+	{ 0,	0,	NULL,			NULL		}, /*  802 */
+	{ 0,	0,	NULL,			NULL		}, /*  803 */
+	{ 0,	0,	NULL,			NULL		}, /*  804 */
+	{ 0,	0,	NULL,			NULL		}, /*  805 */
+	{ 0,	0,	NULL,			NULL		}, /*  806 */
+	{ 0,	0,	NULL,			NULL		}, /*  807 */
+	{ 0,	0,	NULL,			NULL		}, /*  808 */
+	{ 0,	0,	NULL,			NULL		}, /*  809 */
+	{ 0,	0,	NULL,			NULL		}, /*  810 */
+	{ 0,	0,	NULL,			NULL		}, /*  811 */
+	{ 0,	0,	NULL,			NULL		}, /*  812 */
+	{ 0,	0,	NULL,			NULL		}, /*  813 */
+	{ 0,	0,	NULL,			NULL		}, /*  814 */
+	{ 0,	0,	NULL,			NULL		}, /*  815 */
+	{ 0,	0,	NULL,			NULL		}, /*  816 */
+	{ 0,	0,	NULL,			NULL		}, /*  817 */
+	{ 0,	0,	NULL,			NULL		}, /*  818 */
+	{ 0,	0,	NULL,			NULL		}, /*  819 */
+	{ 0,	0,	NULL,			NULL		}, /*  820 */
+	{ 0,	0,	NULL,			NULL		}, /*  821 */
+	{ 0,	0,	NULL,			NULL		}, /*  822 */
+	{ 0,	0,	NULL,			NULL		}, /*  823 */
+	{ 0,	0,	NULL,			NULL		}, /*  824 */
+	{ 0,	0,	NULL,			NULL		}, /*  825 */
+	{ 0,	0,	NULL,			NULL		}, /*  826 */
+	{ 0,	0,	NULL,			NULL		}, /*  827 */
+	{ 0,	0,	NULL,			NULL		}, /*  828 */
+	{ 0,	0,	NULL,			NULL		}, /*  829 */
+	{ 0,	0,	NULL,			NULL		}, /*  830 */
+	{ 0,	0,	NULL,			NULL		}, /*  831 */
+	{ 0,	0,	NULL,			NULL		}, /*  832 */
+	{ 0,	0,	NULL,			NULL		}, /*  833 */
+	{ 0,	0,	NULL,			NULL		}, /*  834 */
+	{ 0,	0,	NULL,			NULL		}, /*  835 */
+	{ 0,	0,	NULL,			NULL		}, /*  836 */
+	{ 0,	0,	NULL,			NULL		}, /*  837 */
+	{ 0,	0,	NULL,			NULL		}, /*  838 */
+	{ 0,	0,	NULL,			NULL		}, /*  839 */
+	{ 0,	0,	NULL,			NULL		}, /*  840 */
+	{ 0,	0,	NULL,			NULL		}, /*  841 */
+	{ 0,	0,	NULL,			NULL		}, /*  842 */
+	{ 0,	0,	NULL,			NULL		}, /*  843 */
+	{ 0,	0,	NULL,			NULL		}, /*  844 */
+	{ 0,	0,	NULL,			NULL		}, /*  845 */
+	{ 0,	0,	NULL,			NULL		}, /*  846 */
+	{ 0,	0,	NULL,			NULL		}, /*  847 */
+	{ 0,	0,	NULL,			NULL		}, /*  848 */
+	{ 0,	0,	NULL,			NULL		}, /*  849 */
+	{ 0,	0,	NULL,			NULL		}, /*  850 */
+	{ 0,	0,	NULL,			NULL		}, /*  851 */
+	{ 0,	0,	NULL,			NULL		}, /*  852 */
+	{ 0,	0,	NULL,			NULL		}, /*  853 */
+	{ 0,	0,	NULL,			NULL		}, /*  854 */
+	{ 0,	0,	NULL,			NULL		}, /*  855 */
+	{ 0,	0,	NULL,			NULL		}, /*  856 */
+	{ 0,	0,	NULL,			NULL		}, /*  857 */
+	{ 0,	0,	NULL,			NULL		}, /*  858 */
+	{ 0,	0,	NULL,			NULL		}, /*  859 */
+	{ 0,	0,	NULL,			NULL		}, /*  860 */
+	{ 0,	0,	NULL,			NULL		}, /*  861 */
+	{ 0,	0,	NULL,			NULL		}, /*  862 */
+	{ 0,	0,	NULL,			NULL		}, /*  863 */
+	{ 0,	0,	NULL,			NULL		}, /*  864 */
+	{ 0,	0,	NULL,			NULL		}, /*  865 */
+	{ 0,	0,	NULL,			NULL		}, /*  866 */
+	{ 0,	0,	NULL,			NULL		}, /*  867 */
+	{ 0,	0,	NULL,			NULL		}, /*  868 */
+	{ 0,	0,	NULL,			NULL		}, /*  869 */
+	{ 0,	0,	NULL,			NULL		}, /*  870 */
+	{ 0,	0,	NULL,			NULL		}, /*  871 */
+	{ 0,	0,	NULL,			NULL		}, /*  872 */
+	{ 0,	0,	NULL,			NULL		}, /*  873 */
+	{ 0,	0,	NULL,			NULL		}, /*  874 */
+	{ 0,	0,	NULL,			NULL		}, /*  875 */
+	{ 0,	0,	NULL,			NULL		}, /*  876 */
+	{ 0,	0,	NULL,			NULL		}, /*  877 */
+	{ 0,	0,	NULL,			NULL		}, /*  878 */
+	{ 0,	0,	NULL,			NULL		}, /*  879 */
+	{ 0,	0,	NULL,			NULL		}, /*  880 */
+	{ 0,	0,	NULL,			NULL		}, /*  881 */
+	{ 0,	0,	NULL,			NULL		}, /*  882 */
+	{ 0,	0,	NULL,			NULL		}, /*  883 */
+	{ 0,	0,	NULL,			NULL		}, /*  884 */
+	{ 0,	0,	NULL,			NULL		}, /*  885 */
+	{ 0,	0,	NULL,			NULL		}, /*  886 */
+	{ 0,	0,	NULL,			NULL		}, /*  887 */
+	{ 0,	0,	NULL,			NULL		}, /*  888 */
+	{ 0,	0,	NULL,			NULL		}, /*  889 */
+	{ 0,	0,	NULL,			NULL		}, /*  890 */
+	{ 0,	0,	NULL,			NULL		}, /*  891 */
+	{ 0,	0,	NULL,			NULL		}, /*  892 */
+	{ 0,	0,	NULL,			NULL		}, /*  893 */
+	{ 0,	0,	NULL,			NULL		}, /*  894 */
+	{ 0,	0,	NULL,			NULL		}, /*  895 */
+	{ 0,	0,	NULL,			NULL		}, /*  896 */
+	{ 0,	0,	NULL,			NULL		}, /*  897 */
+	{ 0,	0,	NULL,			NULL		}, /*  898 */
+	{ 0,	0,	NULL,			NULL		}, /*  899 */
+	{ 0,	0,	NULL,			NULL		}, /*  900 */
+	{ 0,	0,	NULL,			NULL		}, /*  901 */
+	{ 0,	0,	NULL,			NULL		}, /*  902 */
+	{ 0,	0,	NULL,			NULL		}, /*  903 */
+	{ 0,	0,	NULL,			NULL		}, /*  904 */
+	{ 0,	0,	NULL,			NULL		}, /*  905 */
+	{ 0,	0,	NULL,			NULL		}, /*  906 */
+	{ 0,	0,	NULL,			NULL		}, /*  907 */
+	{ 0,	0,	NULL,			NULL		}, /*  908 */
+	{ 0,	0,	NULL,			NULL		}, /*  909 */
+	{ 0,	0,	NULL,			NULL		}, /*  910 */
+	{ 0,	0,	NULL,			NULL		}, /*  911 */
+	{ 0,	0,	NULL,			NULL		}, /*  912 */
+	{ 0,	0,	NULL,			NULL		}, /*  913 */
+	{ 0,	0,	NULL,			NULL		}, /*  914 */
+	{ 0,	0,	NULL,			NULL		}, /*  915 */
+	{ 0,	0,	NULL,			NULL		}, /*  916 */
+	{ 0,	0,	NULL,			NULL		}, /*  917 */
+	{ 0,	0,	NULL,			NULL		}, /*  918 */
+	{ 0,	0,	NULL,			NULL		}, /*  919 */
+	{ 0,	0,	NULL,			NULL		}, /*  920 */
+	{ 0,	0,	NULL,			NULL		}, /*  921 */
+	{ 0,	0,	NULL,			NULL		}, /*  922 */
+	{ 0,	0,	NULL,			NULL		}, /*  923 */
+	{ 0,	0,	NULL,			NULL		}, /*  924 */
+	{ 0,	0,	NULL,			NULL		}, /*  925 */
+	{ 0,	0,	NULL,			NULL		}, /*  926 */
+	{ 0,	0,	NULL,			NULL		}, /*  927 */
+	{ 0,	0,	NULL,			NULL		}, /*  928 */
+	{ 0,	0,	NULL,			NULL		}, /*  929 */
+	{ 0,	0,	NULL,			NULL		}, /*  930 */
+	{ 0,	0,	NULL,			NULL		}, /*  931 */
+	{ 0,	0,	NULL,			NULL		}, /*  932 */
+	{ 0,	0,	NULL,			NULL		}, /*  933 */
+	{ 0,	0,	NULL,			NULL		}, /*  934 */
+	{ 0,	0,	NULL,			NULL		}, /*  935 */
+	{ 0,	0,	NULL,			NULL		}, /*  936 */
+	{ 0,	0,	NULL,			NULL		}, /*  937 */
+	{ 0,	0,	NULL,			NULL		}, /*  938 */
+	{ 0,	0,	NULL,			NULL		}, /*  939 */
+	{ 0,	0,	NULL,			NULL		}, /*  940 */
+	{ 0,	0,	NULL,			NULL		}, /*  941 */
+	{ 0,	0,	NULL,			NULL		}, /*  942 */
+	{ 0,	0,	NULL,			NULL		}, /*  943 */
+	{ 0,	0,	NULL,			NULL		}, /*  944 */
+	{ 0,	0,	NULL,			NULL		}, /*  945 */
+	{ 0,	0,	NULL,			NULL		}, /*  946 */
+	{ 0,	0,	NULL,			NULL		}, /*  947 */
+	{ 0,	0,	NULL,			NULL		}, /*  948 */
+	{ 0,	0,	NULL,			NULL		}, /*  949 */
+	{ 0,	0,	NULL,			NULL		}, /*  950 */
+	{ 0,	0,	NULL,			NULL		}, /*  951 */
+	{ 0,	0,	NULL,			NULL		}, /*  952 */
+	{ 0,	0,	NULL,			NULL		}, /*  953 */
+	{ 0,	0,	NULL,			NULL		}, /*  954 */
+	{ 0,	0,	NULL,			NULL		}, /*  955 */
+	{ 0,	0,	NULL,			NULL		}, /*  956 */
+	{ 0,	0,	NULL,			NULL		}, /*  957 */
+	{ 0,	0,	NULL,			NULL		}, /*  958 */
+	{ 0,	0,	NULL,			NULL		}, /*  959 */
+	{ 0,	0,	NULL,			NULL		}, /*  960 */
+	{ 0,	0,	NULL,			NULL		}, /*  961 */
+	{ 0,	0,	NULL,			NULL		}, /*  962 */
+	{ 0,	0,	NULL,			NULL		}, /*  963 */
+	{ 0,	0,	NULL,			NULL		}, /*  964 */
+	{ 0,	0,	NULL,			NULL		}, /*  965 */
+	{ 0,	0,	NULL,			NULL		}, /*  966 */
+	{ 0,	0,	NULL,			NULL		}, /*  967 */
+	{ 0,	0,	NULL,			NULL		}, /*  968 */
+	{ 0,	0,	NULL,			NULL		}, /*  969 */
+	{ 0,	0,	NULL,			NULL		}, /*  970 */
+	{ 0,	0,	NULL,			NULL		}, /*  971 */
+	{ 0,	0,	NULL,			NULL		}, /*  972 */
+	{ 0,	0,	NULL,			NULL		}, /*  973 */
+	{ 0,	0,	NULL,			NULL		}, /*  974 */
+	{ 0,	0,	NULL,			NULL		}, /*  975 */
+	{ 0,	0,	NULL,			NULL		}, /*  976 */
+	{ 0,	0,	NULL,			NULL		}, /*  977 */
+	{ 0,	0,	NULL,			NULL		}, /*  978 */
+	{ 0,	0,	NULL,			NULL		}, /*  979 */
+	{ 0,	0,	NULL,			NULL		}, /*  980 */
+	{ 0,	0,	NULL,			NULL		}, /*  981 */
+	{ 0,	0,	NULL,			NULL		}, /*  982 */
+	{ 0,	0,	NULL,			NULL		}, /*  983 */
+	{ 0,	0,	NULL,			NULL		}, /*  984 */
+	{ 0,	0,	NULL,			NULL		}, /*  985 */
+	{ 0,	0,	NULL,			NULL		}, /*  986 */
+	{ 0,	0,	NULL,			NULL		}, /*  987 */
+	{ 0,	0,	NULL,			NULL		}, /*  988 */
+	{ 0,	0,	NULL,			NULL		}, /*  989 */
+	{ 0,	0,	NULL,			NULL		}, /*  990 */
+	{ 0,	0,	NULL,			NULL		}, /*  991 */
+	{ 0,	0,	NULL,			NULL		}, /*  992 */
+	{ 0,	0,	NULL,			NULL		}, /*  993 */
+	{ 0,	0,	NULL,			NULL		}, /*  994 */
+	{ 0,	0,	NULL,			NULL		}, /*  995 */
+	{ 0,	0,	NULL,			NULL		}, /*  996 */
+	{ 0,	0,	NULL,			NULL		}, /*  997 */
+	{ 0,	0,	NULL,			NULL		}, /*  998 */
+	{ 0,	0,	NULL,			NULL		}, /*  999 */ /* end of SVR4 */
 	{ 0,	0,	printargs,		"sysv_syscall"	}, /* 1000 */ /* start of SYSV */
 	{ 0,	0,	printargs,		"sysv_exit"	}, /* 1001 */
 	{ 0,	0,	printargs,		"sysv_fork"	}, /* 1002 */
@@ -1058,18 +1058,18 @@
 	{ 0,	0,	printargs,		"sysv_uadmin"	}, /* 1055 */
 	{ 0,	0,	printargs,		"sysv_sysmp"	}, /* 1056 */
 	{ 0,	0,	printargs,		"sysv_utssys"	}, /* 1057 */
-	{ 0,	0,	printargs,		"SYS_1058",	}, /* 1058 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1058 */
 	{ 0,	0,	printargs,		"sysv_execve"	}, /* 1059 */
 	{ 0,	0,	printargs,		"sysv_umask"	}, /* 1060 */
 	{ 0,	0,	printargs,		"sysv_chroot"	}, /* 1061 */
 	{ 0,	0,	printargs,		"sysv_fcntl"	}, /* 1062 */
 	{ 0,	0,	printargs,		"sysv_ulimit"	}, /* 1063 */
-	{ 0,	0,	printargs,		"SYS_1064",	}, /* 1064 */
-	{ 0,	0,	printargs,		"SYS_1065",	}, /* 1065 */
-	{ 0,	0,	printargs,		"SYS_1066",	}, /* 1066 */
-	{ 0,	0,	printargs,		"SYS_1067",	}, /* 1067 */
-	{ 0,	0,	printargs,		"SYS_1068",	}, /* 1068 */
-	{ 0,	0,	printargs,		"SYS_1069",	}, /* 1069 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1064 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1065 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1066 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1067 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1068 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 1069 */
 	{ 0,	0,	printargs,		"sysv_advfs"	}, /* 1070 */
 	{ 0,	0,	printargs,		"sysv_unadvfs"	}, /* 1071 */
 	{ 0,	0,	printargs,		"sysv_rmount"	}, /* 1072 */
@@ -1189,817 +1189,817 @@
 	{ 0,	0,	printargs,		"sysv_dmi"	}, /* 1186 */
 	{ 0,	0,	printargs,		"sysv_pread"	}, /* 1187 */
 	{ 0,	0,	printargs,		"sysv_pwrite"	}, /* 1188 */
-	{ 0,	0,	printargs,		"SYS_1189"	}, /* 1189 */
-	{ 0,	0,	printargs,		"SYS_1190"	}, /* 1190 */
-	{ 0,	0,	printargs,		"SYS_1191"	}, /* 1191 */
-	{ 0,	0,	printargs,		"SYS_1192"	}, /* 1192 */
-	{ 0,	0,	printargs,		"SYS_1193"	}, /* 1193 */
-	{ 0,	0,	printargs,		"SYS_1194"	}, /* 1194 */
-	{ 0,	0,	printargs,		"SYS_1195"	}, /* 1195 */
-	{ 0,	0,	printargs,		"SYS_1196"	}, /* 1196 */
-	{ 0,	0,	printargs,		"SYS_1197"	}, /* 1197 */
-	{ 0,	0,	printargs,		"SYS_1198"	}, /* 1198 */
-	{ 0,	0,	printargs,		"SYS_1199"	}, /* 1199 */
-	{ 0,	0,	printargs,		"SYS_1200"	}, /* 1200 */
-	{ 0,	0,	printargs,		"SYS_1201"	}, /* 1201 */
-	{ 0,	0,	printargs,		"SYS_1202"	}, /* 1202 */
-	{ 0,	0,	printargs,		"SYS_1203"	}, /* 1203 */
-	{ 0,	0,	printargs,		"SYS_1204"	}, /* 1204 */
-	{ 0,	0,	printargs,		"SYS_1205"	}, /* 1205 */
-	{ 0,	0,	printargs,		"SYS_1206"	}, /* 1206 */
-	{ 0,	0,	printargs,		"SYS_1207"	}, /* 1207 */
-	{ 0,	0,	printargs,		"SYS_1208"	}, /* 1208 */
-	{ 0,	0,	printargs,		"SYS_1209"	}, /* 1209 */
-	{ 0,	0,	printargs,		"SYS_1210"	}, /* 1210 */
-	{ 0,	0,	printargs,		"SYS_1211"	}, /* 1211 */
-	{ 0,	0,	printargs,		"SYS_1212"	}, /* 1212 */
-	{ 0,	0,	printargs,		"SYS_1213"	}, /* 1213 */
-	{ 0,	0,	printargs,		"SYS_1214"	}, /* 1214 */
-	{ 0,	0,	printargs,		"SYS_1215"	}, /* 1215 */
-	{ 0,	0,	printargs,		"SYS_1216"	}, /* 1216 */
-	{ 0,	0,	printargs,		"SYS_1217"	}, /* 1217 */
-	{ 0,	0,	printargs,		"SYS_1218"	}, /* 1218 */
-	{ 0,	0,	printargs,		"SYS_1219"	}, /* 1219 */
-	{ 0,	0,	printargs,		"SYS_1220"	}, /* 1220 */
-	{ 0,	0,	printargs,		"SYS_1221"	}, /* 1221 */
-	{ 0,	0,	printargs,		"SYS_1222"	}, /* 1222 */
-	{ 0,	0,	printargs,		"SYS_1223"	}, /* 1223 */
-	{ 0,	0,	printargs,		"SYS_1224"	}, /* 1224 */
-	{ 0,	0,	printargs,		"SYS_1225"	}, /* 1225 */
-	{ 0,	0,	printargs,		"SYS_1226"	}, /* 1226 */
-	{ 0,	0,	printargs,		"SYS_1227"	}, /* 1227 */
-	{ 0,	0,	printargs,		"SYS_1228"	}, /* 1228 */
-	{ 0,	0,	printargs,		"SYS_1229"	}, /* 1229 */
-	{ 0,	0,	printargs,		"SYS_1230"	}, /* 1230 */
-	{ 0,	0,	printargs,		"SYS_1231"	}, /* 1231 */
-	{ 0,	0,	printargs,		"SYS_1232"	}, /* 1232 */
-	{ 0,	0,	printargs,		"SYS_1233"	}, /* 1233 */
-	{ 0,	0,	printargs,		"SYS_1234"	}, /* 1234 */
-	{ 0,	0,	printargs,		"SYS_1235"	}, /* 1235 */
-	{ 0,	0,	printargs,		"SYS_1236"	}, /* 1236 */
-	{ 0,	0,	printargs,		"SYS_1237"	}, /* 1237 */
-	{ 0,	0,	printargs,		"SYS_1238"	}, /* 1238 */
-	{ 0,	0,	printargs,		"SYS_1239"	}, /* 1239 */
-	{ 0,	0,	printargs,		"SYS_1240"	}, /* 1240 */
-	{ 0,	0,	printargs,		"SYS_1241"	}, /* 1241 */
-	{ 0,	0,	printargs,		"SYS_1242"	}, /* 1242 */
-	{ 0,	0,	printargs,		"SYS_1243"	}, /* 1243 */
-	{ 0,	0,	printargs,		"SYS_1244"	}, /* 1244 */
-	{ 0,	0,	printargs,		"SYS_1245"	}, /* 1245 */
-	{ 0,	0,	printargs,		"SYS_1246"	}, /* 1246 */
-	{ 0,	0,	printargs,		"SYS_1247"	}, /* 1247 */
-	{ 0,	0,	printargs,		"SYS_1248"	}, /* 1248 */
-	{ 0,	0,	printargs,		"SYS_1249"	}, /* 1249 */
-	{ 0,	0,	printargs,		"SYS_1250"	}, /* 1250 */
-	{ 0,	0,	printargs,		"SYS_1251"	}, /* 1251 */
-	{ 0,	0,	printargs,		"SYS_1252"	}, /* 1252 */
-	{ 0,	0,	printargs,		"SYS_1253"	}, /* 1253 */
-	{ 0,	0,	printargs,		"SYS_1254"	}, /* 1254 */
-	{ 0,	0,	printargs,		"SYS_1255"	}, /* 1255 */
-	{ 0,	0,	printargs,		"SYS_1256"	}, /* 1256 */
-	{ 0,	0,	printargs,		"SYS_1257"	}, /* 1257 */
-	{ 0,	0,	printargs,		"SYS_1258"	}, /* 1258 */
-	{ 0,	0,	printargs,		"SYS_1259"	}, /* 1259 */
-	{ 0,	0,	printargs,		"SYS_1260"	}, /* 1260 */
-	{ 0,	0,	printargs,		"SYS_1261"	}, /* 1261 */
-	{ 0,	0,	printargs,		"SYS_1262"	}, /* 1262 */
-	{ 0,	0,	printargs,		"SYS_1263"	}, /* 1263 */
-	{ 0,	0,	printargs,		"SYS_1264"	}, /* 1264 */
-	{ 0,	0,	printargs,		"SYS_1265"	}, /* 1265 */
-	{ 0,	0,	printargs,		"SYS_1266"	}, /* 1266 */
-	{ 0,	0,	printargs,		"SYS_1267"	}, /* 1267 */
-	{ 0,	0,	printargs,		"SYS_1268"	}, /* 1268 */
-	{ 0,	0,	printargs,		"SYS_1269"	}, /* 1269 */
-	{ 0,	0,	printargs,		"SYS_1270"	}, /* 1270 */
-	{ 0,	0,	printargs,		"SYS_1271"	}, /* 1271 */
-	{ 0,	0,	printargs,		"SYS_1272"	}, /* 1272 */
-	{ 0,	0,	printargs,		"SYS_1273"	}, /* 1273 */
-	{ 0,	0,	printargs,		"SYS_1274"	}, /* 1274 */
-	{ 0,	0,	printargs,		"SYS_1275"	}, /* 1275 */
-	{ 0,	0,	printargs,		"SYS_1276"	}, /* 1276 */
-	{ 0,	0,	printargs,		"SYS_1277"	}, /* 1277 */
-	{ 0,	0,	printargs,		"SYS_1278"	}, /* 1278 */
-	{ 0,	0,	printargs,		"SYS_1279"	}, /* 1279 */
-	{ 0,	0,	printargs,		"SYS_1280"	}, /* 1280 */
-	{ 0,	0,	printargs,		"SYS_1281"	}, /* 1281 */
-	{ 0,	0,	printargs,		"SYS_1282"	}, /* 1282 */
-	{ 0,	0,	printargs,		"SYS_1283"	}, /* 1283 */
-	{ 0,	0,	printargs,		"SYS_1284"	}, /* 1284 */
-	{ 0,	0,	printargs,		"SYS_1285"	}, /* 1285 */
-	{ 0,	0,	printargs,		"SYS_1286"	}, /* 1286 */
-	{ 0,	0,	printargs,		"SYS_1287"	}, /* 1287 */
-	{ 0,	0,	printargs,		"SYS_1288"	}, /* 1288 */
-	{ 0,	0,	printargs,		"SYS_1289"	}, /* 1289 */
-	{ 0,	0,	printargs,		"SYS_1290"	}, /* 1290 */
-	{ 0,	0,	printargs,		"SYS_1291"	}, /* 1291 */
-	{ 0,	0,	printargs,		"SYS_1292"	}, /* 1292 */
-	{ 0,	0,	printargs,		"SYS_1293"	}, /* 1293 */
-	{ 0,	0,	printargs,		"SYS_1294"	}, /* 1294 */
-	{ 0,	0,	printargs,		"SYS_1295"	}, /* 1295 */
-	{ 0,	0,	printargs,		"SYS_1296"	}, /* 1296 */
-	{ 0,	0,	printargs,		"SYS_1297"	}, /* 1297 */
-	{ 0,	0,	printargs,		"SYS_1298"	}, /* 1298 */
-	{ 0,	0,	printargs,		"SYS_1299"	}, /* 1299 */
-	{ 0,	0,	printargs,		"SYS_1300"	}, /* 1300 */
-	{ 0,	0,	printargs,		"SYS_1301"	}, /* 1301 */
-	{ 0,	0,	printargs,		"SYS_1302"	}, /* 1302 */
-	{ 0,	0,	printargs,		"SYS_1303"	}, /* 1303 */
-	{ 0,	0,	printargs,		"SYS_1304"	}, /* 1304 */
-	{ 0,	0,	printargs,		"SYS_1305"	}, /* 1305 */
-	{ 0,	0,	printargs,		"SYS_1306"	}, /* 1306 */
-	{ 0,	0,	printargs,		"SYS_1307"	}, /* 1307 */
-	{ 0,	0,	printargs,		"SYS_1308"	}, /* 1308 */
-	{ 0,	0,	printargs,		"SYS_1309"	}, /* 1309 */
-	{ 0,	0,	printargs,		"SYS_1310"	}, /* 1310 */
-	{ 0,	0,	printargs,		"SYS_1311"	}, /* 1311 */
-	{ 0,	0,	printargs,		"SYS_1312"	}, /* 1312 */
-	{ 0,	0,	printargs,		"SYS_1313"	}, /* 1313 */
-	{ 0,	0,	printargs,		"SYS_1314"	}, /* 1314 */
-	{ 0,	0,	printargs,		"SYS_1315"	}, /* 1315 */
-	{ 0,	0,	printargs,		"SYS_1316"	}, /* 1316 */
-	{ 0,	0,	printargs,		"SYS_1317"	}, /* 1317 */
-	{ 0,	0,	printargs,		"SYS_1318"	}, /* 1318 */
-	{ 0,	0,	printargs,		"SYS_1319"	}, /* 1319 */
-	{ 0,	0,	printargs,		"SYS_1320"	}, /* 1320 */
-	{ 0,	0,	printargs,		"SYS_1321"	}, /* 1321 */
-	{ 0,	0,	printargs,		"SYS_1322"	}, /* 1322 */
-	{ 0,	0,	printargs,		"SYS_1323"	}, /* 1323 */
-	{ 0,	0,	printargs,		"SYS_1324"	}, /* 1324 */
-	{ 0,	0,	printargs,		"SYS_1325"	}, /* 1325 */
-	{ 0,	0,	printargs,		"SYS_1326"	}, /* 1326 */
-	{ 0,	0,	printargs,		"SYS_1327"	}, /* 1327 */
-	{ 0,	0,	printargs,		"SYS_1328"	}, /* 1328 */
-	{ 0,	0,	printargs,		"SYS_1329"	}, /* 1329 */
-	{ 0,	0,	printargs,		"SYS_1330"	}, /* 1330 */
-	{ 0,	0,	printargs,		"SYS_1331"	}, /* 1331 */
-	{ 0,	0,	printargs,		"SYS_1332"	}, /* 1332 */
-	{ 0,	0,	printargs,		"SYS_1333"	}, /* 1333 */
-	{ 0,	0,	printargs,		"SYS_1334"	}, /* 1334 */
-	{ 0,	0,	printargs,		"SYS_1335"	}, /* 1335 */
-	{ 0,	0,	printargs,		"SYS_1336"	}, /* 1336 */
-	{ 0,	0,	printargs,		"SYS_1337"	}, /* 1337 */
-	{ 0,	0,	printargs,		"SYS_1338"	}, /* 1338 */
-	{ 0,	0,	printargs,		"SYS_1339"	}, /* 1339 */
-	{ 0,	0,	printargs,		"SYS_1340"	}, /* 1340 */
-	{ 0,	0,	printargs,		"SYS_1341"	}, /* 1341 */
-	{ 0,	0,	printargs,		"SYS_1342"	}, /* 1342 */
-	{ 0,	0,	printargs,		"SYS_1343"	}, /* 1343 */
-	{ 0,	0,	printargs,		"SYS_1344"	}, /* 1344 */
-	{ 0,	0,	printargs,		"SYS_1345"	}, /* 1345 */
-	{ 0,	0,	printargs,		"SYS_1346"	}, /* 1346 */
-	{ 0,	0,	printargs,		"SYS_1347"	}, /* 1347 */
-	{ 0,	0,	printargs,		"SYS_1348"	}, /* 1348 */
-	{ 0,	0,	printargs,		"SYS_1349"	}, /* 1349 */
-	{ 0,	0,	printargs,		"SYS_1350"	}, /* 1350 */
-	{ 0,	0,	printargs,		"SYS_1351"	}, /* 1351 */
-	{ 0,	0,	printargs,		"SYS_1352"	}, /* 1352 */
-	{ 0,	0,	printargs,		"SYS_1353"	}, /* 1353 */
-	{ 0,	0,	printargs,		"SYS_1354"	}, /* 1354 */
-	{ 0,	0,	printargs,		"SYS_1355"	}, /* 1355 */
-	{ 0,	0,	printargs,		"SYS_1356"	}, /* 1356 */
-	{ 0,	0,	printargs,		"SYS_1357"	}, /* 1357 */
-	{ 0,	0,	printargs,		"SYS_1358"	}, /* 1358 */
-	{ 0,	0,	printargs,		"SYS_1359"	}, /* 1359 */
-	{ 0,	0,	printargs,		"SYS_1360"	}, /* 1360 */
-	{ 0,	0,	printargs,		"SYS_1361"	}, /* 1361 */
-	{ 0,	0,	printargs,		"SYS_1362"	}, /* 1362 */
-	{ 0,	0,	printargs,		"SYS_1363"	}, /* 1363 */
-	{ 0,	0,	printargs,		"SYS_1364"	}, /* 1364 */
-	{ 0,	0,	printargs,		"SYS_1365"	}, /* 1365 */
-	{ 0,	0,	printargs,		"SYS_1366"	}, /* 1366 */
-	{ 0,	0,	printargs,		"SYS_1367"	}, /* 1367 */
-	{ 0,	0,	printargs,		"SYS_1368"	}, /* 1368 */
-	{ 0,	0,	printargs,		"SYS_1369"	}, /* 1369 */
-	{ 0,	0,	printargs,		"SYS_1370"	}, /* 1370 */
-	{ 0,	0,	printargs,		"SYS_1371"	}, /* 1371 */
-	{ 0,	0,	printargs,		"SYS_1372"	}, /* 1372 */
-	{ 0,	0,	printargs,		"SYS_1373"	}, /* 1373 */
-	{ 0,	0,	printargs,		"SYS_1374"	}, /* 1374 */
-	{ 0,	0,	printargs,		"SYS_1375"	}, /* 1375 */
-	{ 0,	0,	printargs,		"SYS_1376"	}, /* 1376 */
-	{ 0,	0,	printargs,		"SYS_1377"	}, /* 1377 */
-	{ 0,	0,	printargs,		"SYS_1378"	}, /* 1378 */
-	{ 0,	0,	printargs,		"SYS_1379"	}, /* 1379 */
-	{ 0,	0,	printargs,		"SYS_1380"	}, /* 1380 */
-	{ 0,	0,	printargs,		"SYS_1381"	}, /* 1381 */
-	{ 0,	0,	printargs,		"SYS_1382"	}, /* 1382 */
-	{ 0,	0,	printargs,		"SYS_1383"	}, /* 1383 */
-	{ 0,	0,	printargs,		"SYS_1384"	}, /* 1384 */
-	{ 0,	0,	printargs,		"SYS_1385"	}, /* 1385 */
-	{ 0,	0,	printargs,		"SYS_1386"	}, /* 1386 */
-	{ 0,	0,	printargs,		"SYS_1387"	}, /* 1387 */
-	{ 0,	0,	printargs,		"SYS_1388"	}, /* 1388 */
-	{ 0,	0,	printargs,		"SYS_1389"	}, /* 1389 */
-	{ 0,	0,	printargs,		"SYS_1390"	}, /* 1390 */
-	{ 0,	0,	printargs,		"SYS_1391"	}, /* 1391 */
-	{ 0,	0,	printargs,		"SYS_1392"	}, /* 1392 */
-	{ 0,	0,	printargs,		"SYS_1393"	}, /* 1393 */
-	{ 0,	0,	printargs,		"SYS_1394"	}, /* 1394 */
-	{ 0,	0,	printargs,		"SYS_1395"	}, /* 1395 */
-	{ 0,	0,	printargs,		"SYS_1396"	}, /* 1396 */
-	{ 0,	0,	printargs,		"SYS_1397"	}, /* 1397 */
-	{ 0,	0,	printargs,		"SYS_1398"	}, /* 1398 */
-	{ 0,	0,	printargs,		"SYS_1399"	}, /* 1399 */
-	{ 0,	0,	printargs,		"SYS_1400"	}, /* 1400 */
-	{ 0,	0,	printargs,		"SYS_1401"	}, /* 1401 */
-	{ 0,	0,	printargs,		"SYS_1402"	}, /* 1402 */
-	{ 0,	0,	printargs,		"SYS_1403"	}, /* 1403 */
-	{ 0,	0,	printargs,		"SYS_1404"	}, /* 1404 */
-	{ 0,	0,	printargs,		"SYS_1405"	}, /* 1405 */
-	{ 0,	0,	printargs,		"SYS_1406"	}, /* 1406 */
-	{ 0,	0,	printargs,		"SYS_1407"	}, /* 1407 */
-	{ 0,	0,	printargs,		"SYS_1408"	}, /* 1408 */
-	{ 0,	0,	printargs,		"SYS_1409"	}, /* 1409 */
-	{ 0,	0,	printargs,		"SYS_1410"	}, /* 1410 */
-	{ 0,	0,	printargs,		"SYS_1411"	}, /* 1411 */
-	{ 0,	0,	printargs,		"SYS_1412"	}, /* 1412 */
-	{ 0,	0,	printargs,		"SYS_1413"	}, /* 1413 */
-	{ 0,	0,	printargs,		"SYS_1414"	}, /* 1414 */
-	{ 0,	0,	printargs,		"SYS_1415"	}, /* 1415 */
-	{ 0,	0,	printargs,		"SYS_1416"	}, /* 1416 */
-	{ 0,	0,	printargs,		"SYS_1417"	}, /* 1417 */
-	{ 0,	0,	printargs,		"SYS_1418"	}, /* 1418 */
-	{ 0,	0,	printargs,		"SYS_1419"	}, /* 1419 */
-	{ 0,	0,	printargs,		"SYS_1420"	}, /* 1420 */
-	{ 0,	0,	printargs,		"SYS_1421"	}, /* 1421 */
-	{ 0,	0,	printargs,		"SYS_1422"	}, /* 1422 */
-	{ 0,	0,	printargs,		"SYS_1423"	}, /* 1423 */
-	{ 0,	0,	printargs,		"SYS_1424"	}, /* 1424 */
-	{ 0,	0,	printargs,		"SYS_1425"	}, /* 1425 */
-	{ 0,	0,	printargs,		"SYS_1426"	}, /* 1426 */
-	{ 0,	0,	printargs,		"SYS_1427"	}, /* 1427 */
-	{ 0,	0,	printargs,		"SYS_1428"	}, /* 1428 */
-	{ 0,	0,	printargs,		"SYS_1429"	}, /* 1429 */
-	{ 0,	0,	printargs,		"SYS_1430"	}, /* 1430 */
-	{ 0,	0,	printargs,		"SYS_1431"	}, /* 1431 */
-	{ 0,	0,	printargs,		"SYS_1432"	}, /* 1432 */
-	{ 0,	0,	printargs,		"SYS_1433"	}, /* 1433 */
-	{ 0,	0,	printargs,		"SYS_1434"	}, /* 1434 */
-	{ 0,	0,	printargs,		"SYS_1435"	}, /* 1435 */
-	{ 0,	0,	printargs,		"SYS_1436"	}, /* 1436 */
-	{ 0,	0,	printargs,		"SYS_1437"	}, /* 1437 */
-	{ 0,	0,	printargs,		"SYS_1438"	}, /* 1438 */
-	{ 0,	0,	printargs,		"SYS_1439"	}, /* 1439 */
-	{ 0,	0,	printargs,		"SYS_1440"	}, /* 1440 */
-	{ 0,	0,	printargs,		"SYS_1441"	}, /* 1441 */
-	{ 0,	0,	printargs,		"SYS_1442"	}, /* 1442 */
-	{ 0,	0,	printargs,		"SYS_1443"	}, /* 1443 */
-	{ 0,	0,	printargs,		"SYS_1444"	}, /* 1444 */
-	{ 0,	0,	printargs,		"SYS_1445"	}, /* 1445 */
-	{ 0,	0,	printargs,		"SYS_1446"	}, /* 1446 */
-	{ 0,	0,	printargs,		"SYS_1447"	}, /* 1447 */
-	{ 0,	0,	printargs,		"SYS_1448"	}, /* 1448 */
-	{ 0,	0,	printargs,		"SYS_1449"	}, /* 1449 */
-	{ 0,	0,	printargs,		"SYS_1450"	}, /* 1450 */
-	{ 0,	0,	printargs,		"SYS_1451"	}, /* 1451 */
-	{ 0,	0,	printargs,		"SYS_1452"	}, /* 1452 */
-	{ 0,	0,	printargs,		"SYS_1453"	}, /* 1453 */
-	{ 0,	0,	printargs,		"SYS_1454"	}, /* 1454 */
-	{ 0,	0,	printargs,		"SYS_1455"	}, /* 1455 */
-	{ 0,	0,	printargs,		"SYS_1456"	}, /* 1456 */
-	{ 0,	0,	printargs,		"SYS_1457"	}, /* 1457 */
-	{ 0,	0,	printargs,		"SYS_1458"	}, /* 1458 */
-	{ 0,	0,	printargs,		"SYS_1459"	}, /* 1459 */
-	{ 0,	0,	printargs,		"SYS_1460"	}, /* 1460 */
-	{ 0,	0,	printargs,		"SYS_1461"	}, /* 1461 */
-	{ 0,	0,	printargs,		"SYS_1462"	}, /* 1462 */
-	{ 0,	0,	printargs,		"SYS_1463"	}, /* 1463 */
-	{ 0,	0,	printargs,		"SYS_1464"	}, /* 1464 */
-	{ 0,	0,	printargs,		"SYS_1465"	}, /* 1465 */
-	{ 0,	0,	printargs,		"SYS_1466"	}, /* 1466 */
-	{ 0,	0,	printargs,		"SYS_1467"	}, /* 1467 */
-	{ 0,	0,	printargs,		"SYS_1468"	}, /* 1468 */
-	{ 0,	0,	printargs,		"SYS_1469"	}, /* 1469 */
-	{ 0,	0,	printargs,		"SYS_1470"	}, /* 1470 */
-	{ 0,	0,	printargs,		"SYS_1471"	}, /* 1471 */
-	{ 0,	0,	printargs,		"SYS_1472"	}, /* 1472 */
-	{ 0,	0,	printargs,		"SYS_1473"	}, /* 1473 */
-	{ 0,	0,	printargs,		"SYS_1474"	}, /* 1474 */
-	{ 0,	0,	printargs,		"SYS_1475"	}, /* 1475 */
-	{ 0,	0,	printargs,		"SYS_1476"	}, /* 1476 */
-	{ 0,	0,	printargs,		"SYS_1477"	}, /* 1477 */
-	{ 0,	0,	printargs,		"SYS_1478"	}, /* 1478 */
-	{ 0,	0,	printargs,		"SYS_1479"	}, /* 1479 */
-	{ 0,	0,	printargs,		"SYS_1480"	}, /* 1480 */
-	{ 0,	0,	printargs,		"SYS_1481"	}, /* 1481 */
-	{ 0,	0,	printargs,		"SYS_1482"	}, /* 1482 */
-	{ 0,	0,	printargs,		"SYS_1483"	}, /* 1483 */
-	{ 0,	0,	printargs,		"SYS_1484"	}, /* 1484 */
-	{ 0,	0,	printargs,		"SYS_1485"	}, /* 1485 */
-	{ 0,	0,	printargs,		"SYS_1486"	}, /* 1486 */
-	{ 0,	0,	printargs,		"SYS_1487"	}, /* 1487 */
-	{ 0,	0,	printargs,		"SYS_1488"	}, /* 1488 */
-	{ 0,	0,	printargs,		"SYS_1489"	}, /* 1489 */
-	{ 0,	0,	printargs,		"SYS_1490"	}, /* 1490 */
-	{ 0,	0,	printargs,		"SYS_1491"	}, /* 1491 */
-	{ 0,	0,	printargs,		"SYS_1492"	}, /* 1492 */
-	{ 0,	0,	printargs,		"SYS_1493"	}, /* 1493 */
-	{ 0,	0,	printargs,		"SYS_1494"	}, /* 1494 */
-	{ 0,	0,	printargs,		"SYS_1495"	}, /* 1495 */
-	{ 0,	0,	printargs,		"SYS_1496"	}, /* 1496 */
-	{ 0,	0,	printargs,		"SYS_1497"	}, /* 1497 */
-	{ 0,	0,	printargs,		"SYS_1498"	}, /* 1498 */
-	{ 0,	0,	printargs,		"SYS_1499"	}, /* 1499 */
-	{ 0,	0,	printargs,		"SYS_1500"	}, /* 1500 */
-	{ 0,	0,	printargs,		"SYS_1501"	}, /* 1501 */
-	{ 0,	0,	printargs,		"SYS_1502"	}, /* 1502 */
-	{ 0,	0,	printargs,		"SYS_1503"	}, /* 1503 */
-	{ 0,	0,	printargs,		"SYS_1504"	}, /* 1504 */
-	{ 0,	0,	printargs,		"SYS_1505"	}, /* 1505 */
-	{ 0,	0,	printargs,		"SYS_1506"	}, /* 1506 */
-	{ 0,	0,	printargs,		"SYS_1507"	}, /* 1507 */
-	{ 0,	0,	printargs,		"SYS_1508"	}, /* 1508 */
-	{ 0,	0,	printargs,		"SYS_1509"	}, /* 1509 */
-	{ 0,	0,	printargs,		"SYS_1510"	}, /* 1510 */
-	{ 0,	0,	printargs,		"SYS_1511"	}, /* 1511 */
-	{ 0,	0,	printargs,		"SYS_1512"	}, /* 1512 */
-	{ 0,	0,	printargs,		"SYS_1513"	}, /* 1513 */
-	{ 0,	0,	printargs,		"SYS_1514"	}, /* 1514 */
-	{ 0,	0,	printargs,		"SYS_1515"	}, /* 1515 */
-	{ 0,	0,	printargs,		"SYS_1516"	}, /* 1516 */
-	{ 0,	0,	printargs,		"SYS_1517"	}, /* 1517 */
-	{ 0,	0,	printargs,		"SYS_1518"	}, /* 1518 */
-	{ 0,	0,	printargs,		"SYS_1519"	}, /* 1519 */
-	{ 0,	0,	printargs,		"SYS_1520"	}, /* 1520 */
-	{ 0,	0,	printargs,		"SYS_1521"	}, /* 1521 */
-	{ 0,	0,	printargs,		"SYS_1522"	}, /* 1522 */
-	{ 0,	0,	printargs,		"SYS_1523"	}, /* 1523 */
-	{ 0,	0,	printargs,		"SYS_1524"	}, /* 1524 */
-	{ 0,	0,	printargs,		"SYS_1525"	}, /* 1525 */
-	{ 0,	0,	printargs,		"SYS_1526"	}, /* 1526 */
-	{ 0,	0,	printargs,		"SYS_1527"	}, /* 1527 */
-	{ 0,	0,	printargs,		"SYS_1528"	}, /* 1528 */
-	{ 0,	0,	printargs,		"SYS_1529"	}, /* 1529 */
-	{ 0,	0,	printargs,		"SYS_1530"	}, /* 1530 */
-	{ 0,	0,	printargs,		"SYS_1531"	}, /* 1531 */
-	{ 0,	0,	printargs,		"SYS_1532"	}, /* 1532 */
-	{ 0,	0,	printargs,		"SYS_1533"	}, /* 1533 */
-	{ 0,	0,	printargs,		"SYS_1534"	}, /* 1534 */
-	{ 0,	0,	printargs,		"SYS_1535"	}, /* 1535 */
-	{ 0,	0,	printargs,		"SYS_1536"	}, /* 1536 */
-	{ 0,	0,	printargs,		"SYS_1537"	}, /* 1537 */
-	{ 0,	0,	printargs,		"SYS_1538"	}, /* 1538 */
-	{ 0,	0,	printargs,		"SYS_1539"	}, /* 1539 */
-	{ 0,	0,	printargs,		"SYS_1540"	}, /* 1540 */
-	{ 0,	0,	printargs,		"SYS_1541"	}, /* 1541 */
-	{ 0,	0,	printargs,		"SYS_1542"	}, /* 1542 */
-	{ 0,	0,	printargs,		"SYS_1543"	}, /* 1543 */
-	{ 0,	0,	printargs,		"SYS_1544"	}, /* 1544 */
-	{ 0,	0,	printargs,		"SYS_1545"	}, /* 1545 */
-	{ 0,	0,	printargs,		"SYS_1546"	}, /* 1546 */
-	{ 0,	0,	printargs,		"SYS_1547"	}, /* 1547 */
-	{ 0,	0,	printargs,		"SYS_1548"	}, /* 1548 */
-	{ 0,	0,	printargs,		"SYS_1549"	}, /* 1549 */
-	{ 0,	0,	printargs,		"SYS_1550"	}, /* 1550 */
-	{ 0,	0,	printargs,		"SYS_1551"	}, /* 1551 */
-	{ 0,	0,	printargs,		"SYS_1552"	}, /* 1552 */
-	{ 0,	0,	printargs,		"SYS_1553"	}, /* 1553 */
-	{ 0,	0,	printargs,		"SYS_1554"	}, /* 1554 */
-	{ 0,	0,	printargs,		"SYS_1555"	}, /* 1555 */
-	{ 0,	0,	printargs,		"SYS_1556"	}, /* 1556 */
-	{ 0,	0,	printargs,		"SYS_1557"	}, /* 1557 */
-	{ 0,	0,	printargs,		"SYS_1558"	}, /* 1558 */
-	{ 0,	0,	printargs,		"SYS_1559"	}, /* 1559 */
-	{ 0,	0,	printargs,		"SYS_1560"	}, /* 1560 */
-	{ 0,	0,	printargs,		"SYS_1561"	}, /* 1561 */
-	{ 0,	0,	printargs,		"SYS_1562"	}, /* 1562 */
-	{ 0,	0,	printargs,		"SYS_1563"	}, /* 1563 */
-	{ 0,	0,	printargs,		"SYS_1564"	}, /* 1564 */
-	{ 0,	0,	printargs,		"SYS_1565"	}, /* 1565 */
-	{ 0,	0,	printargs,		"SYS_1566"	}, /* 1566 */
-	{ 0,	0,	printargs,		"SYS_1567"	}, /* 1567 */
-	{ 0,	0,	printargs,		"SYS_1568"	}, /* 1568 */
-	{ 0,	0,	printargs,		"SYS_1569"	}, /* 1569 */
-	{ 0,	0,	printargs,		"SYS_1570"	}, /* 1570 */
-	{ 0,	0,	printargs,		"SYS_1571"	}, /* 1571 */
-	{ 0,	0,	printargs,		"SYS_1572"	}, /* 1572 */
-	{ 0,	0,	printargs,		"SYS_1573"	}, /* 1573 */
-	{ 0,	0,	printargs,		"SYS_1574"	}, /* 1574 */
-	{ 0,	0,	printargs,		"SYS_1575"	}, /* 1575 */
-	{ 0,	0,	printargs,		"SYS_1576"	}, /* 1576 */
-	{ 0,	0,	printargs,		"SYS_1577"	}, /* 1577 */
-	{ 0,	0,	printargs,		"SYS_1578"	}, /* 1578 */
-	{ 0,	0,	printargs,		"SYS_1579"	}, /* 1579 */
-	{ 0,	0,	printargs,		"SYS_1580"	}, /* 1580 */
-	{ 0,	0,	printargs,		"SYS_1581"	}, /* 1581 */
-	{ 0,	0,	printargs,		"SYS_1582"	}, /* 1582 */
-	{ 0,	0,	printargs,		"SYS_1583"	}, /* 1583 */
-	{ 0,	0,	printargs,		"SYS_1584"	}, /* 1584 */
-	{ 0,	0,	printargs,		"SYS_1585"	}, /* 1585 */
-	{ 0,	0,	printargs,		"SYS_1586"	}, /* 1586 */
-	{ 0,	0,	printargs,		"SYS_1587"	}, /* 1587 */
-	{ 0,	0,	printargs,		"SYS_1588"	}, /* 1588 */
-	{ 0,	0,	printargs,		"SYS_1589"	}, /* 1589 */
-	{ 0,	0,	printargs,		"SYS_1590"	}, /* 1590 */
-	{ 0,	0,	printargs,		"SYS_1591"	}, /* 1591 */
-	{ 0,	0,	printargs,		"SYS_1592"	}, /* 1592 */
-	{ 0,	0,	printargs,		"SYS_1593"	}, /* 1593 */
-	{ 0,	0,	printargs,		"SYS_1594"	}, /* 1594 */
-	{ 0,	0,	printargs,		"SYS_1595"	}, /* 1595 */
-	{ 0,	0,	printargs,		"SYS_1596"	}, /* 1596 */
-	{ 0,	0,	printargs,		"SYS_1597"	}, /* 1597 */
-	{ 0,	0,	printargs,		"SYS_1598"	}, /* 1598 */
-	{ 0,	0,	printargs,		"SYS_1599"	}, /* 1599 */
-	{ 0,	0,	printargs,		"SYS_1600"	}, /* 1600 */
-	{ 0,	0,	printargs,		"SYS_1601"	}, /* 1601 */
-	{ 0,	0,	printargs,		"SYS_1602"	}, /* 1602 */
-	{ 0,	0,	printargs,		"SYS_1603"	}, /* 1603 */
-	{ 0,	0,	printargs,		"SYS_1604"	}, /* 1604 */
-	{ 0,	0,	printargs,		"SYS_1605"	}, /* 1605 */
-	{ 0,	0,	printargs,		"SYS_1606"	}, /* 1606 */
-	{ 0,	0,	printargs,		"SYS_1607"	}, /* 1607 */
-	{ 0,	0,	printargs,		"SYS_1608"	}, /* 1608 */
-	{ 0,	0,	printargs,		"SYS_1609"	}, /* 1609 */
-	{ 0,	0,	printargs,		"SYS_1610"	}, /* 1610 */
-	{ 0,	0,	printargs,		"SYS_1611"	}, /* 1611 */
-	{ 0,	0,	printargs,		"SYS_1612"	}, /* 1612 */
-	{ 0,	0,	printargs,		"SYS_1613"	}, /* 1613 */
-	{ 0,	0,	printargs,		"SYS_1614"	}, /* 1614 */
-	{ 0,	0,	printargs,		"SYS_1615"	}, /* 1615 */
-	{ 0,	0,	printargs,		"SYS_1616"	}, /* 1616 */
-	{ 0,	0,	printargs,		"SYS_1617"	}, /* 1617 */
-	{ 0,	0,	printargs,		"SYS_1618"	}, /* 1618 */
-	{ 0,	0,	printargs,		"SYS_1619"	}, /* 1619 */
-	{ 0,	0,	printargs,		"SYS_1620"	}, /* 1620 */
-	{ 0,	0,	printargs,		"SYS_1621"	}, /* 1621 */
-	{ 0,	0,	printargs,		"SYS_1622"	}, /* 1622 */
-	{ 0,	0,	printargs,		"SYS_1623"	}, /* 1623 */
-	{ 0,	0,	printargs,		"SYS_1624"	}, /* 1624 */
-	{ 0,	0,	printargs,		"SYS_1625"	}, /* 1625 */
-	{ 0,	0,	printargs,		"SYS_1626"	}, /* 1626 */
-	{ 0,	0,	printargs,		"SYS_1627"	}, /* 1627 */
-	{ 0,	0,	printargs,		"SYS_1628"	}, /* 1628 */
-	{ 0,	0,	printargs,		"SYS_1629"	}, /* 1629 */
-	{ 0,	0,	printargs,		"SYS_1630"	}, /* 1630 */
-	{ 0,	0,	printargs,		"SYS_1631"	}, /* 1631 */
-	{ 0,	0,	printargs,		"SYS_1632"	}, /* 1632 */
-	{ 0,	0,	printargs,		"SYS_1633"	}, /* 1633 */
-	{ 0,	0,	printargs,		"SYS_1634"	}, /* 1634 */
-	{ 0,	0,	printargs,		"SYS_1635"	}, /* 1635 */
-	{ 0,	0,	printargs,		"SYS_1636"	}, /* 1636 */
-	{ 0,	0,	printargs,		"SYS_1637"	}, /* 1637 */
-	{ 0,	0,	printargs,		"SYS_1638"	}, /* 1638 */
-	{ 0,	0,	printargs,		"SYS_1639"	}, /* 1639 */
-	{ 0,	0,	printargs,		"SYS_1640"	}, /* 1640 */
-	{ 0,	0,	printargs,		"SYS_1641"	}, /* 1641 */
-	{ 0,	0,	printargs,		"SYS_1642"	}, /* 1642 */
-	{ 0,	0,	printargs,		"SYS_1643"	}, /* 1643 */
-	{ 0,	0,	printargs,		"SYS_1644"	}, /* 1644 */
-	{ 0,	0,	printargs,		"SYS_1645"	}, /* 1645 */
-	{ 0,	0,	printargs,		"SYS_1646"	}, /* 1646 */
-	{ 0,	0,	printargs,		"SYS_1647"	}, /* 1647 */
-	{ 0,	0,	printargs,		"SYS_1648"	}, /* 1648 */
-	{ 0,	0,	printargs,		"SYS_1649"	}, /* 1649 */
-	{ 0,	0,	printargs,		"SYS_1650"	}, /* 1650 */
-	{ 0,	0,	printargs,		"SYS_1651"	}, /* 1651 */
-	{ 0,	0,	printargs,		"SYS_1652"	}, /* 1652 */
-	{ 0,	0,	printargs,		"SYS_1653"	}, /* 1653 */
-	{ 0,	0,	printargs,		"SYS_1654"	}, /* 1654 */
-	{ 0,	0,	printargs,		"SYS_1655"	}, /* 1655 */
-	{ 0,	0,	printargs,		"SYS_1656"	}, /* 1656 */
-	{ 0,	0,	printargs,		"SYS_1657"	}, /* 1657 */
-	{ 0,	0,	printargs,		"SYS_1658"	}, /* 1658 */
-	{ 0,	0,	printargs,		"SYS_1659"	}, /* 1659 */
-	{ 0,	0,	printargs,		"SYS_1660"	}, /* 1660 */
-	{ 0,	0,	printargs,		"SYS_1661"	}, /* 1661 */
-	{ 0,	0,	printargs,		"SYS_1662"	}, /* 1662 */
-	{ 0,	0,	printargs,		"SYS_1663"	}, /* 1663 */
-	{ 0,	0,	printargs,		"SYS_1664"	}, /* 1664 */
-	{ 0,	0,	printargs,		"SYS_1665"	}, /* 1665 */
-	{ 0,	0,	printargs,		"SYS_1666"	}, /* 1666 */
-	{ 0,	0,	printargs,		"SYS_1667"	}, /* 1667 */
-	{ 0,	0,	printargs,		"SYS_1668"	}, /* 1668 */
-	{ 0,	0,	printargs,		"SYS_1669"	}, /* 1669 */
-	{ 0,	0,	printargs,		"SYS_1670"	}, /* 1670 */
-	{ 0,	0,	printargs,		"SYS_1671"	}, /* 1671 */
-	{ 0,	0,	printargs,		"SYS_1672"	}, /* 1672 */
-	{ 0,	0,	printargs,		"SYS_1673"	}, /* 1673 */
-	{ 0,	0,	printargs,		"SYS_1674"	}, /* 1674 */
-	{ 0,	0,	printargs,		"SYS_1675"	}, /* 1675 */
-	{ 0,	0,	printargs,		"SYS_1676"	}, /* 1676 */
-	{ 0,	0,	printargs,		"SYS_1677"	}, /* 1677 */
-	{ 0,	0,	printargs,		"SYS_1678"	}, /* 1678 */
-	{ 0,	0,	printargs,		"SYS_1679"	}, /* 1679 */
-	{ 0,	0,	printargs,		"SYS_1680"	}, /* 1680 */
-	{ 0,	0,	printargs,		"SYS_1681"	}, /* 1681 */
-	{ 0,	0,	printargs,		"SYS_1682"	}, /* 1682 */
-	{ 0,	0,	printargs,		"SYS_1683"	}, /* 1683 */
-	{ 0,	0,	printargs,		"SYS_1684"	}, /* 1684 */
-	{ 0,	0,	printargs,		"SYS_1685"	}, /* 1685 */
-	{ 0,	0,	printargs,		"SYS_1686"	}, /* 1686 */
-	{ 0,	0,	printargs,		"SYS_1687"	}, /* 1687 */
-	{ 0,	0,	printargs,		"SYS_1688"	}, /* 1688 */
-	{ 0,	0,	printargs,		"SYS_1689"	}, /* 1689 */
-	{ 0,	0,	printargs,		"SYS_1690"	}, /* 1690 */
-	{ 0,	0,	printargs,		"SYS_1691"	}, /* 1691 */
-	{ 0,	0,	printargs,		"SYS_1692"	}, /* 1692 */
-	{ 0,	0,	printargs,		"SYS_1693"	}, /* 1693 */
-	{ 0,	0,	printargs,		"SYS_1694"	}, /* 1694 */
-	{ 0,	0,	printargs,		"SYS_1695"	}, /* 1695 */
-	{ 0,	0,	printargs,		"SYS_1696"	}, /* 1696 */
-	{ 0,	0,	printargs,		"SYS_1697"	}, /* 1697 */
-	{ 0,	0,	printargs,		"SYS_1698"	}, /* 1698 */
-	{ 0,	0,	printargs,		"SYS_1699"	}, /* 1699 */
-	{ 0,	0,	printargs,		"SYS_1700"	}, /* 1700 */
-	{ 0,	0,	printargs,		"SYS_1701"	}, /* 1701 */
-	{ 0,	0,	printargs,		"SYS_1702"	}, /* 1702 */
-	{ 0,	0,	printargs,		"SYS_1703"	}, /* 1703 */
-	{ 0,	0,	printargs,		"SYS_1704"	}, /* 1704 */
-	{ 0,	0,	printargs,		"SYS_1705"	}, /* 1705 */
-	{ 0,	0,	printargs,		"SYS_1706"	}, /* 1706 */
-	{ 0,	0,	printargs,		"SYS_1707"	}, /* 1707 */
-	{ 0,	0,	printargs,		"SYS_1708"	}, /* 1708 */
-	{ 0,	0,	printargs,		"SYS_1709"	}, /* 1709 */
-	{ 0,	0,	printargs,		"SYS_1710"	}, /* 1710 */
-	{ 0,	0,	printargs,		"SYS_1711"	}, /* 1711 */
-	{ 0,	0,	printargs,		"SYS_1712"	}, /* 1712 */
-	{ 0,	0,	printargs,		"SYS_1713"	}, /* 1713 */
-	{ 0,	0,	printargs,		"SYS_1714"	}, /* 1714 */
-	{ 0,	0,	printargs,		"SYS_1715"	}, /* 1715 */
-	{ 0,	0,	printargs,		"SYS_1716"	}, /* 1716 */
-	{ 0,	0,	printargs,		"SYS_1717"	}, /* 1717 */
-	{ 0,	0,	printargs,		"SYS_1718"	}, /* 1718 */
-	{ 0,	0,	printargs,		"SYS_1719"	}, /* 1719 */
-	{ 0,	0,	printargs,		"SYS_1720"	}, /* 1720 */
-	{ 0,	0,	printargs,		"SYS_1721"	}, /* 1721 */
-	{ 0,	0,	printargs,		"SYS_1722"	}, /* 1722 */
-	{ 0,	0,	printargs,		"SYS_1723"	}, /* 1723 */
-	{ 0,	0,	printargs,		"SYS_1724"	}, /* 1724 */
-	{ 0,	0,	printargs,		"SYS_1725"	}, /* 1725 */
-	{ 0,	0,	printargs,		"SYS_1726"	}, /* 1726 */
-	{ 0,	0,	printargs,		"SYS_1727"	}, /* 1727 */
-	{ 0,	0,	printargs,		"SYS_1728"	}, /* 1728 */
-	{ 0,	0,	printargs,		"SYS_1729"	}, /* 1729 */
-	{ 0,	0,	printargs,		"SYS_1730"	}, /* 1730 */
-	{ 0,	0,	printargs,		"SYS_1731"	}, /* 1731 */
-	{ 0,	0,	printargs,		"SYS_1732"	}, /* 1732 */
-	{ 0,	0,	printargs,		"SYS_1733"	}, /* 1733 */
-	{ 0,	0,	printargs,		"SYS_1734"	}, /* 1734 */
-	{ 0,	0,	printargs,		"SYS_1735"	}, /* 1735 */
-	{ 0,	0,	printargs,		"SYS_1736"	}, /* 1736 */
-	{ 0,	0,	printargs,		"SYS_1737"	}, /* 1737 */
-	{ 0,	0,	printargs,		"SYS_1738"	}, /* 1738 */
-	{ 0,	0,	printargs,		"SYS_1739"	}, /* 1739 */
-	{ 0,	0,	printargs,		"SYS_1740"	}, /* 1740 */
-	{ 0,	0,	printargs,		"SYS_1741"	}, /* 1741 */
-	{ 0,	0,	printargs,		"SYS_1742"	}, /* 1742 */
-	{ 0,	0,	printargs,		"SYS_1743"	}, /* 1743 */
-	{ 0,	0,	printargs,		"SYS_1744"	}, /* 1744 */
-	{ 0,	0,	printargs,		"SYS_1745"	}, /* 1745 */
-	{ 0,	0,	printargs,		"SYS_1746"	}, /* 1746 */
-	{ 0,	0,	printargs,		"SYS_1747"	}, /* 1747 */
-	{ 0,	0,	printargs,		"SYS_1748"	}, /* 1748 */
-	{ 0,	0,	printargs,		"SYS_1749"	}, /* 1749 */
-	{ 0,	0,	printargs,		"SYS_1750"	}, /* 1750 */
-	{ 0,	0,	printargs,		"SYS_1751"	}, /* 1751 */
-	{ 0,	0,	printargs,		"SYS_1752"	}, /* 1752 */
-	{ 0,	0,	printargs,		"SYS_1753"	}, /* 1753 */
-	{ 0,	0,	printargs,		"SYS_1754"	}, /* 1754 */
-	{ 0,	0,	printargs,		"SYS_1755"	}, /* 1755 */
-	{ 0,	0,	printargs,		"SYS_1756"	}, /* 1756 */
-	{ 0,	0,	printargs,		"SYS_1757"	}, /* 1757 */
-	{ 0,	0,	printargs,		"SYS_1758"	}, /* 1758 */
-	{ 0,	0,	printargs,		"SYS_1759"	}, /* 1759 */
-	{ 0,	0,	printargs,		"SYS_1760"	}, /* 1760 */
-	{ 0,	0,	printargs,		"SYS_1761"	}, /* 1761 */
-	{ 0,	0,	printargs,		"SYS_1762"	}, /* 1762 */
-	{ 0,	0,	printargs,		"SYS_1763"	}, /* 1763 */
-	{ 0,	0,	printargs,		"SYS_1764"	}, /* 1764 */
-	{ 0,	0,	printargs,		"SYS_1765"	}, /* 1765 */
-	{ 0,	0,	printargs,		"SYS_1766"	}, /* 1766 */
-	{ 0,	0,	printargs,		"SYS_1767"	}, /* 1767 */
-	{ 0,	0,	printargs,		"SYS_1768"	}, /* 1768 */
-	{ 0,	0,	printargs,		"SYS_1769"	}, /* 1769 */
-	{ 0,	0,	printargs,		"SYS_1770"	}, /* 1770 */
-	{ 0,	0,	printargs,		"SYS_1771"	}, /* 1771 */
-	{ 0,	0,	printargs,		"SYS_1772"	}, /* 1772 */
-	{ 0,	0,	printargs,		"SYS_1773"	}, /* 1773 */
-	{ 0,	0,	printargs,		"SYS_1774"	}, /* 1774 */
-	{ 0,	0,	printargs,		"SYS_1775"	}, /* 1775 */
-	{ 0,	0,	printargs,		"SYS_1776"	}, /* 1776 */
-	{ 0,	0,	printargs,		"SYS_1777"	}, /* 1777 */
-	{ 0,	0,	printargs,		"SYS_1778"	}, /* 1778 */
-	{ 0,	0,	printargs,		"SYS_1779"	}, /* 1779 */
-	{ 0,	0,	printargs,		"SYS_1780"	}, /* 1780 */
-	{ 0,	0,	printargs,		"SYS_1781"	}, /* 1781 */
-	{ 0,	0,	printargs,		"SYS_1782"	}, /* 1782 */
-	{ 0,	0,	printargs,		"SYS_1783"	}, /* 1783 */
-	{ 0,	0,	printargs,		"SYS_1784"	}, /* 1784 */
-	{ 0,	0,	printargs,		"SYS_1785"	}, /* 1785 */
-	{ 0,	0,	printargs,		"SYS_1786"	}, /* 1786 */
-	{ 0,	0,	printargs,		"SYS_1787"	}, /* 1787 */
-	{ 0,	0,	printargs,		"SYS_1788"	}, /* 1788 */
-	{ 0,	0,	printargs,		"SYS_1789"	}, /* 1789 */
-	{ 0,	0,	printargs,		"SYS_1790"	}, /* 1790 */
-	{ 0,	0,	printargs,		"SYS_1791"	}, /* 1791 */
-	{ 0,	0,	printargs,		"SYS_1792"	}, /* 1792 */
-	{ 0,	0,	printargs,		"SYS_1793"	}, /* 1793 */
-	{ 0,	0,	printargs,		"SYS_1794"	}, /* 1794 */
-	{ 0,	0,	printargs,		"SYS_1795"	}, /* 1795 */
-	{ 0,	0,	printargs,		"SYS_1796"	}, /* 1796 */
-	{ 0,	0,	printargs,		"SYS_1797"	}, /* 1797 */
-	{ 0,	0,	printargs,		"SYS_1798"	}, /* 1798 */
-	{ 0,	0,	printargs,		"SYS_1799"	}, /* 1799 */
-	{ 0,	0,	printargs,		"SYS_1800"	}, /* 1800 */
-	{ 0,	0,	printargs,		"SYS_1801"	}, /* 1801 */
-	{ 0,	0,	printargs,		"SYS_1802"	}, /* 1802 */
-	{ 0,	0,	printargs,		"SYS_1803"	}, /* 1803 */
-	{ 0,	0,	printargs,		"SYS_1804"	}, /* 1804 */
-	{ 0,	0,	printargs,		"SYS_1805"	}, /* 1805 */
-	{ 0,	0,	printargs,		"SYS_1806"	}, /* 1806 */
-	{ 0,	0,	printargs,		"SYS_1807"	}, /* 1807 */
-	{ 0,	0,	printargs,		"SYS_1808"	}, /* 1808 */
-	{ 0,	0,	printargs,		"SYS_1809"	}, /* 1809 */
-	{ 0,	0,	printargs,		"SYS_1810"	}, /* 1810 */
-	{ 0,	0,	printargs,		"SYS_1811"	}, /* 1811 */
-	{ 0,	0,	printargs,		"SYS_1812"	}, /* 1812 */
-	{ 0,	0,	printargs,		"SYS_1813"	}, /* 1813 */
-	{ 0,	0,	printargs,		"SYS_1814"	}, /* 1814 */
-	{ 0,	0,	printargs,		"SYS_1815"	}, /* 1815 */
-	{ 0,	0,	printargs,		"SYS_1816"	}, /* 1816 */
-	{ 0,	0,	printargs,		"SYS_1817"	}, /* 1817 */
-	{ 0,	0,	printargs,		"SYS_1818"	}, /* 1818 */
-	{ 0,	0,	printargs,		"SYS_1819"	}, /* 1819 */
-	{ 0,	0,	printargs,		"SYS_1820"	}, /* 1820 */
-	{ 0,	0,	printargs,		"SYS_1821"	}, /* 1821 */
-	{ 0,	0,	printargs,		"SYS_1822"	}, /* 1822 */
-	{ 0,	0,	printargs,		"SYS_1823"	}, /* 1823 */
-	{ 0,	0,	printargs,		"SYS_1824"	}, /* 1824 */
-	{ 0,	0,	printargs,		"SYS_1825"	}, /* 1825 */
-	{ 0,	0,	printargs,		"SYS_1826"	}, /* 1826 */
-	{ 0,	0,	printargs,		"SYS_1827"	}, /* 1827 */
-	{ 0,	0,	printargs,		"SYS_1828"	}, /* 1828 */
-	{ 0,	0,	printargs,		"SYS_1829"	}, /* 1829 */
-	{ 0,	0,	printargs,		"SYS_1830"	}, /* 1830 */
-	{ 0,	0,	printargs,		"SYS_1831"	}, /* 1831 */
-	{ 0,	0,	printargs,		"SYS_1832"	}, /* 1832 */
-	{ 0,	0,	printargs,		"SYS_1833"	}, /* 1833 */
-	{ 0,	0,	printargs,		"SYS_1834"	}, /* 1834 */
-	{ 0,	0,	printargs,		"SYS_1835"	}, /* 1835 */
-	{ 0,	0,	printargs,		"SYS_1836"	}, /* 1836 */
-	{ 0,	0,	printargs,		"SYS_1837"	}, /* 1837 */
-	{ 0,	0,	printargs,		"SYS_1838"	}, /* 1838 */
-	{ 0,	0,	printargs,		"SYS_1839"	}, /* 1839 */
-	{ 0,	0,	printargs,		"SYS_1840"	}, /* 1840 */
-	{ 0,	0,	printargs,		"SYS_1841"	}, /* 1841 */
-	{ 0,	0,	printargs,		"SYS_1842"	}, /* 1842 */
-	{ 0,	0,	printargs,		"SYS_1843"	}, /* 1843 */
-	{ 0,	0,	printargs,		"SYS_1844"	}, /* 1844 */
-	{ 0,	0,	printargs,		"SYS_1845"	}, /* 1845 */
-	{ 0,	0,	printargs,		"SYS_1846"	}, /* 1846 */
-	{ 0,	0,	printargs,		"SYS_1847"	}, /* 1847 */
-	{ 0,	0,	printargs,		"SYS_1848"	}, /* 1848 */
-	{ 0,	0,	printargs,		"SYS_1849"	}, /* 1849 */
-	{ 0,	0,	printargs,		"SYS_1850"	}, /* 1850 */
-	{ 0,	0,	printargs,		"SYS_1851"	}, /* 1851 */
-	{ 0,	0,	printargs,		"SYS_1852"	}, /* 1852 */
-	{ 0,	0,	printargs,		"SYS_1853"	}, /* 1853 */
-	{ 0,	0,	printargs,		"SYS_1854"	}, /* 1854 */
-	{ 0,	0,	printargs,		"SYS_1855"	}, /* 1855 */
-	{ 0,	0,	printargs,		"SYS_1856"	}, /* 1856 */
-	{ 0,	0,	printargs,		"SYS_1857"	}, /* 1857 */
-	{ 0,	0,	printargs,		"SYS_1858"	}, /* 1858 */
-	{ 0,	0,	printargs,		"SYS_1859"	}, /* 1859 */
-	{ 0,	0,	printargs,		"SYS_1860"	}, /* 1860 */
-	{ 0,	0,	printargs,		"SYS_1861"	}, /* 1861 */
-	{ 0,	0,	printargs,		"SYS_1862"	}, /* 1862 */
-	{ 0,	0,	printargs,		"SYS_1863"	}, /* 1863 */
-	{ 0,	0,	printargs,		"SYS_1864"	}, /* 1864 */
-	{ 0,	0,	printargs,		"SYS_1865"	}, /* 1865 */
-	{ 0,	0,	printargs,		"SYS_1866"	}, /* 1866 */
-	{ 0,	0,	printargs,		"SYS_1867"	}, /* 1867 */
-	{ 0,	0,	printargs,		"SYS_1868"	}, /* 1868 */
-	{ 0,	0,	printargs,		"SYS_1869"	}, /* 1869 */
-	{ 0,	0,	printargs,		"SYS_1870"	}, /* 1870 */
-	{ 0,	0,	printargs,		"SYS_1871"	}, /* 1871 */
-	{ 0,	0,	printargs,		"SYS_1872"	}, /* 1872 */
-	{ 0,	0,	printargs,		"SYS_1873"	}, /* 1873 */
-	{ 0,	0,	printargs,		"SYS_1874"	}, /* 1874 */
-	{ 0,	0,	printargs,		"SYS_1875"	}, /* 1875 */
-	{ 0,	0,	printargs,		"SYS_1876"	}, /* 1876 */
-	{ 0,	0,	printargs,		"SYS_1877"	}, /* 1877 */
-	{ 0,	0,	printargs,		"SYS_1878"	}, /* 1878 */
-	{ 0,	0,	printargs,		"SYS_1879"	}, /* 1879 */
-	{ 0,	0,	printargs,		"SYS_1880"	}, /* 1880 */
-	{ 0,	0,	printargs,		"SYS_1881"	}, /* 1881 */
-	{ 0,	0,	printargs,		"SYS_1882"	}, /* 1882 */
-	{ 0,	0,	printargs,		"SYS_1883"	}, /* 1883 */
-	{ 0,	0,	printargs,		"SYS_1884"	}, /* 1884 */
-	{ 0,	0,	printargs,		"SYS_1885"	}, /* 1885 */
-	{ 0,	0,	printargs,		"SYS_1886"	}, /* 1886 */
-	{ 0,	0,	printargs,		"SYS_1887"	}, /* 1887 */
-	{ 0,	0,	printargs,		"SYS_1888"	}, /* 1888 */
-	{ 0,	0,	printargs,		"SYS_1889"	}, /* 1889 */
-	{ 0,	0,	printargs,		"SYS_1890"	}, /* 1890 */
-	{ 0,	0,	printargs,		"SYS_1891"	}, /* 1891 */
-	{ 0,	0,	printargs,		"SYS_1892"	}, /* 1892 */
-	{ 0,	0,	printargs,		"SYS_1893"	}, /* 1893 */
-	{ 0,	0,	printargs,		"SYS_1894"	}, /* 1894 */
-	{ 0,	0,	printargs,		"SYS_1895"	}, /* 1895 */
-	{ 0,	0,	printargs,		"SYS_1896"	}, /* 1896 */
-	{ 0,	0,	printargs,		"SYS_1897"	}, /* 1897 */
-	{ 0,	0,	printargs,		"SYS_1898"	}, /* 1898 */
-	{ 0,	0,	printargs,		"SYS_1899"	}, /* 1899 */
-	{ 0,	0,	printargs,		"SYS_1900"	}, /* 1900 */
-	{ 0,	0,	printargs,		"SYS_1901"	}, /* 1901 */
-	{ 0,	0,	printargs,		"SYS_1902"	}, /* 1902 */
-	{ 0,	0,	printargs,		"SYS_1903"	}, /* 1903 */
-	{ 0,	0,	printargs,		"SYS_1904"	}, /* 1904 */
-	{ 0,	0,	printargs,		"SYS_1905"	}, /* 1905 */
-	{ 0,	0,	printargs,		"SYS_1906"	}, /* 1906 */
-	{ 0,	0,	printargs,		"SYS_1907"	}, /* 1907 */
-	{ 0,	0,	printargs,		"SYS_1908"	}, /* 1908 */
-	{ 0,	0,	printargs,		"SYS_1909"	}, /* 1909 */
-	{ 0,	0,	printargs,		"SYS_1910"	}, /* 1910 */
-	{ 0,	0,	printargs,		"SYS_1911"	}, /* 1911 */
-	{ 0,	0,	printargs,		"SYS_1912"	}, /* 1912 */
-	{ 0,	0,	printargs,		"SYS_1913"	}, /* 1913 */
-	{ 0,	0,	printargs,		"SYS_1914"	}, /* 1914 */
-	{ 0,	0,	printargs,		"SYS_1915"	}, /* 1915 */
-	{ 0,	0,	printargs,		"SYS_1916"	}, /* 1916 */
-	{ 0,	0,	printargs,		"SYS_1917"	}, /* 1917 */
-	{ 0,	0,	printargs,		"SYS_1918"	}, /* 1918 */
-	{ 0,	0,	printargs,		"SYS_1919"	}, /* 1919 */
-	{ 0,	0,	printargs,		"SYS_1920"	}, /* 1920 */
-	{ 0,	0,	printargs,		"SYS_1921"	}, /* 1921 */
-	{ 0,	0,	printargs,		"SYS_1922"	}, /* 1922 */
-	{ 0,	0,	printargs,		"SYS_1923"	}, /* 1923 */
-	{ 0,	0,	printargs,		"SYS_1924"	}, /* 1924 */
-	{ 0,	0,	printargs,		"SYS_1925"	}, /* 1925 */
-	{ 0,	0,	printargs,		"SYS_1926"	}, /* 1926 */
-	{ 0,	0,	printargs,		"SYS_1927"	}, /* 1927 */
-	{ 0,	0,	printargs,		"SYS_1928"	}, /* 1928 */
-	{ 0,	0,	printargs,		"SYS_1929"	}, /* 1929 */
-	{ 0,	0,	printargs,		"SYS_1930"	}, /* 1930 */
-	{ 0,	0,	printargs,		"SYS_1931"	}, /* 1931 */
-	{ 0,	0,	printargs,		"SYS_1932"	}, /* 1932 */
-	{ 0,	0,	printargs,		"SYS_1933"	}, /* 1933 */
-	{ 0,	0,	printargs,		"SYS_1934"	}, /* 1934 */
-	{ 0,	0,	printargs,		"SYS_1935"	}, /* 1935 */
-	{ 0,	0,	printargs,		"SYS_1936"	}, /* 1936 */
-	{ 0,	0,	printargs,		"SYS_1937"	}, /* 1937 */
-	{ 0,	0,	printargs,		"SYS_1938"	}, /* 1938 */
-	{ 0,	0,	printargs,		"SYS_1939"	}, /* 1939 */
-	{ 0,	0,	printargs,		"SYS_1940"	}, /* 1940 */
-	{ 0,	0,	printargs,		"SYS_1941"	}, /* 1941 */
-	{ 0,	0,	printargs,		"SYS_1942"	}, /* 1942 */
-	{ 0,	0,	printargs,		"SYS_1943"	}, /* 1943 */
-	{ 0,	0,	printargs,		"SYS_1944"	}, /* 1944 */
-	{ 0,	0,	printargs,		"SYS_1945"	}, /* 1945 */
-	{ 0,	0,	printargs,		"SYS_1946"	}, /* 1946 */
-	{ 0,	0,	printargs,		"SYS_1947"	}, /* 1947 */
-	{ 0,	0,	printargs,		"SYS_1948"	}, /* 1948 */
-	{ 0,	0,	printargs,		"SYS_1949"	}, /* 1949 */
-	{ 0,	0,	printargs,		"SYS_1950"	}, /* 1950 */
-	{ 0,	0,	printargs,		"SYS_1951"	}, /* 1951 */
-	{ 0,	0,	printargs,		"SYS_1952"	}, /* 1952 */
-	{ 0,	0,	printargs,		"SYS_1953"	}, /* 1953 */
-	{ 0,	0,	printargs,		"SYS_1954"	}, /* 1954 */
-	{ 0,	0,	printargs,		"SYS_1955"	}, /* 1955 */
-	{ 0,	0,	printargs,		"SYS_1956"	}, /* 1956 */
-	{ 0,	0,	printargs,		"SYS_1957"	}, /* 1957 */
-	{ 0,	0,	printargs,		"SYS_1958"	}, /* 1958 */
-	{ 0,	0,	printargs,		"SYS_1959"	}, /* 1959 */
-	{ 0,	0,	printargs,		"SYS_1960"	}, /* 1960 */
-	{ 0,	0,	printargs,		"SYS_1961"	}, /* 1961 */
-	{ 0,	0,	printargs,		"SYS_1962"	}, /* 1962 */
-	{ 0,	0,	printargs,		"SYS_1963"	}, /* 1963 */
-	{ 0,	0,	printargs,		"SYS_1964"	}, /* 1964 */
-	{ 0,	0,	printargs,		"SYS_1965"	}, /* 1965 */
-	{ 0,	0,	printargs,		"SYS_1966"	}, /* 1966 */
-	{ 0,	0,	printargs,		"SYS_1967"	}, /* 1967 */
-	{ 0,	0,	printargs,		"SYS_1968"	}, /* 1968 */
-	{ 0,	0,	printargs,		"SYS_1969"	}, /* 1969 */
-	{ 0,	0,	printargs,		"SYS_1970"	}, /* 1970 */
-	{ 0,	0,	printargs,		"SYS_1971"	}, /* 1971 */
-	{ 0,	0,	printargs,		"SYS_1972"	}, /* 1972 */
-	{ 0,	0,	printargs,		"SYS_1973"	}, /* 1973 */
-	{ 0,	0,	printargs,		"SYS_1974"	}, /* 1974 */
-	{ 0,	0,	printargs,		"SYS_1975"	}, /* 1975 */
-	{ 0,	0,	printargs,		"SYS_1976"	}, /* 1976 */
-	{ 0,	0,	printargs,		"SYS_1977"	}, /* 1977 */
-	{ 0,	0,	printargs,		"SYS_1978"	}, /* 1978 */
-	{ 0,	0,	printargs,		"SYS_1979"	}, /* 1979 */
-	{ 0,	0,	printargs,		"SYS_1980"	}, /* 1980 */
-	{ 0,	0,	printargs,		"SYS_1981"	}, /* 1981 */
-	{ 0,	0,	printargs,		"SYS_1982"	}, /* 1982 */
-	{ 0,	0,	printargs,		"SYS_1983"	}, /* 1983 */
-	{ 0,	0,	printargs,		"SYS_1984"	}, /* 1984 */
-	{ 0,	0,	printargs,		"SYS_1985"	}, /* 1985 */
-	{ 0,	0,	printargs,		"SYS_1986"	}, /* 1986 */
-	{ 0,	0,	printargs,		"SYS_1987"	}, /* 1987 */
-	{ 0,	0,	printargs,		"SYS_1988"	}, /* 1988 */
-	{ 0,	0,	printargs,		"SYS_1989"	}, /* 1989 */
-	{ 0,	0,	printargs,		"SYS_1990"	}, /* 1990 */
-	{ 0,	0,	printargs,		"SYS_1991"	}, /* 1991 */
-	{ 0,	0,	printargs,		"SYS_1992"	}, /* 1992 */
-	{ 0,	0,	printargs,		"SYS_1993"	}, /* 1993 */
-	{ 0,	0,	printargs,		"SYS_1994"	}, /* 1994 */
-	{ 0,	0,	printargs,		"SYS_1995"	}, /* 1995 */
-	{ 0,	0,	printargs,		"SYS_1996"	}, /* 1996 */
-	{ 0,	0,	printargs,		"SYS_1997"	}, /* 1997 */
-	{ 0,	0,	printargs,		"SYS_1998"	}, /* 1998 */
-	{ 0,	0,	printargs,		"SYS_1999"	}, /* 1999 */ /* end of SYSV */
+	{ 0,	0,	NULL,			NULL		}, /* 1189 */
+	{ 0,	0,	NULL,			NULL		}, /* 1190 */
+	{ 0,	0,	NULL,			NULL		}, /* 1191 */
+	{ 0,	0,	NULL,			NULL		}, /* 1192 */
+	{ 0,	0,	NULL,			NULL		}, /* 1193 */
+	{ 0,	0,	NULL,			NULL		}, /* 1194 */
+	{ 0,	0,	NULL,			NULL		}, /* 1195 */
+	{ 0,	0,	NULL,			NULL		}, /* 1196 */
+	{ 0,	0,	NULL,			NULL		}, /* 1197 */
+	{ 0,	0,	NULL,			NULL		}, /* 1198 */
+	{ 0,	0,	NULL,			NULL		}, /* 1199 */
+	{ 0,	0,	NULL,			NULL		}, /* 1200 */
+	{ 0,	0,	NULL,			NULL		}, /* 1201 */
+	{ 0,	0,	NULL,			NULL		}, /* 1202 */
+	{ 0,	0,	NULL,			NULL		}, /* 1203 */
+	{ 0,	0,	NULL,			NULL		}, /* 1204 */
+	{ 0,	0,	NULL,			NULL		}, /* 1205 */
+	{ 0,	0,	NULL,			NULL		}, /* 1206 */
+	{ 0,	0,	NULL,			NULL		}, /* 1207 */
+	{ 0,	0,	NULL,			NULL		}, /* 1208 */
+	{ 0,	0,	NULL,			NULL		}, /* 1209 */
+	{ 0,	0,	NULL,			NULL		}, /* 1210 */
+	{ 0,	0,	NULL,			NULL		}, /* 1211 */
+	{ 0,	0,	NULL,			NULL		}, /* 1212 */
+	{ 0,	0,	NULL,			NULL		}, /* 1213 */
+	{ 0,	0,	NULL,			NULL		}, /* 1214 */
+	{ 0,	0,	NULL,			NULL		}, /* 1215 */
+	{ 0,	0,	NULL,			NULL		}, /* 1216 */
+	{ 0,	0,	NULL,			NULL		}, /* 1217 */
+	{ 0,	0,	NULL,			NULL		}, /* 1218 */
+	{ 0,	0,	NULL,			NULL		}, /* 1219 */
+	{ 0,	0,	NULL,			NULL		}, /* 1220 */
+	{ 0,	0,	NULL,			NULL		}, /* 1221 */
+	{ 0,	0,	NULL,			NULL		}, /* 1222 */
+	{ 0,	0,	NULL,			NULL		}, /* 1223 */
+	{ 0,	0,	NULL,			NULL		}, /* 1224 */
+	{ 0,	0,	NULL,			NULL		}, /* 1225 */
+	{ 0,	0,	NULL,			NULL		}, /* 1226 */
+	{ 0,	0,	NULL,			NULL		}, /* 1227 */
+	{ 0,	0,	NULL,			NULL		}, /* 1228 */
+	{ 0,	0,	NULL,			NULL		}, /* 1229 */
+	{ 0,	0,	NULL,			NULL		}, /* 1230 */
+	{ 0,	0,	NULL,			NULL		}, /* 1231 */
+	{ 0,	0,	NULL,			NULL		}, /* 1232 */
+	{ 0,	0,	NULL,			NULL		}, /* 1233 */
+	{ 0,	0,	NULL,			NULL		}, /* 1234 */
+	{ 0,	0,	NULL,			NULL		}, /* 1235 */
+	{ 0,	0,	NULL,			NULL		}, /* 1236 */
+	{ 0,	0,	NULL,			NULL		}, /* 1237 */
+	{ 0,	0,	NULL,			NULL		}, /* 1238 */
+	{ 0,	0,	NULL,			NULL		}, /* 1239 */
+	{ 0,	0,	NULL,			NULL		}, /* 1240 */
+	{ 0,	0,	NULL,			NULL		}, /* 1241 */
+	{ 0,	0,	NULL,			NULL		}, /* 1242 */
+	{ 0,	0,	NULL,			NULL		}, /* 1243 */
+	{ 0,	0,	NULL,			NULL		}, /* 1244 */
+	{ 0,	0,	NULL,			NULL		}, /* 1245 */
+	{ 0,	0,	NULL,			NULL		}, /* 1246 */
+	{ 0,	0,	NULL,			NULL		}, /* 1247 */
+	{ 0,	0,	NULL,			NULL		}, /* 1248 */
+	{ 0,	0,	NULL,			NULL		}, /* 1249 */
+	{ 0,	0,	NULL,			NULL		}, /* 1250 */
+	{ 0,	0,	NULL,			NULL		}, /* 1251 */
+	{ 0,	0,	NULL,			NULL		}, /* 1252 */
+	{ 0,	0,	NULL,			NULL		}, /* 1253 */
+	{ 0,	0,	NULL,			NULL		}, /* 1254 */
+	{ 0,	0,	NULL,			NULL		}, /* 1255 */
+	{ 0,	0,	NULL,			NULL		}, /* 1256 */
+	{ 0,	0,	NULL,			NULL		}, /* 1257 */
+	{ 0,	0,	NULL,			NULL		}, /* 1258 */
+	{ 0,	0,	NULL,			NULL		}, /* 1259 */
+	{ 0,	0,	NULL,			NULL		}, /* 1260 */
+	{ 0,	0,	NULL,			NULL		}, /* 1261 */
+	{ 0,	0,	NULL,			NULL		}, /* 1262 */
+	{ 0,	0,	NULL,			NULL		}, /* 1263 */
+	{ 0,	0,	NULL,			NULL		}, /* 1264 */
+	{ 0,	0,	NULL,			NULL		}, /* 1265 */
+	{ 0,	0,	NULL,			NULL		}, /* 1266 */
+	{ 0,	0,	NULL,			NULL		}, /* 1267 */
+	{ 0,	0,	NULL,			NULL		}, /* 1268 */
+	{ 0,	0,	NULL,			NULL		}, /* 1269 */
+	{ 0,	0,	NULL,			NULL		}, /* 1270 */
+	{ 0,	0,	NULL,			NULL		}, /* 1271 */
+	{ 0,	0,	NULL,			NULL		}, /* 1272 */
+	{ 0,	0,	NULL,			NULL		}, /* 1273 */
+	{ 0,	0,	NULL,			NULL		}, /* 1274 */
+	{ 0,	0,	NULL,			NULL		}, /* 1275 */
+	{ 0,	0,	NULL,			NULL		}, /* 1276 */
+	{ 0,	0,	NULL,			NULL		}, /* 1277 */
+	{ 0,	0,	NULL,			NULL		}, /* 1278 */
+	{ 0,	0,	NULL,			NULL		}, /* 1279 */
+	{ 0,	0,	NULL,			NULL		}, /* 1280 */
+	{ 0,	0,	NULL,			NULL		}, /* 1281 */
+	{ 0,	0,	NULL,			NULL		}, /* 1282 */
+	{ 0,	0,	NULL,			NULL		}, /* 1283 */
+	{ 0,	0,	NULL,			NULL		}, /* 1284 */
+	{ 0,	0,	NULL,			NULL		}, /* 1285 */
+	{ 0,	0,	NULL,			NULL		}, /* 1286 */
+	{ 0,	0,	NULL,			NULL		}, /* 1287 */
+	{ 0,	0,	NULL,			NULL		}, /* 1288 */
+	{ 0,	0,	NULL,			NULL		}, /* 1289 */
+	{ 0,	0,	NULL,			NULL		}, /* 1290 */
+	{ 0,	0,	NULL,			NULL		}, /* 1291 */
+	{ 0,	0,	NULL,			NULL		}, /* 1292 */
+	{ 0,	0,	NULL,			NULL		}, /* 1293 */
+	{ 0,	0,	NULL,			NULL		}, /* 1294 */
+	{ 0,	0,	NULL,			NULL		}, /* 1295 */
+	{ 0,	0,	NULL,			NULL		}, /* 1296 */
+	{ 0,	0,	NULL,			NULL		}, /* 1297 */
+	{ 0,	0,	NULL,			NULL		}, /* 1298 */
+	{ 0,	0,	NULL,			NULL		}, /* 1299 */
+	{ 0,	0,	NULL,			NULL		}, /* 1300 */
+	{ 0,	0,	NULL,			NULL		}, /* 1301 */
+	{ 0,	0,	NULL,			NULL		}, /* 1302 */
+	{ 0,	0,	NULL,			NULL		}, /* 1303 */
+	{ 0,	0,	NULL,			NULL		}, /* 1304 */
+	{ 0,	0,	NULL,			NULL		}, /* 1305 */
+	{ 0,	0,	NULL,			NULL		}, /* 1306 */
+	{ 0,	0,	NULL,			NULL		}, /* 1307 */
+	{ 0,	0,	NULL,			NULL		}, /* 1308 */
+	{ 0,	0,	NULL,			NULL		}, /* 1309 */
+	{ 0,	0,	NULL,			NULL		}, /* 1310 */
+	{ 0,	0,	NULL,			NULL		}, /* 1311 */
+	{ 0,	0,	NULL,			NULL		}, /* 1312 */
+	{ 0,	0,	NULL,			NULL		}, /* 1313 */
+	{ 0,	0,	NULL,			NULL		}, /* 1314 */
+	{ 0,	0,	NULL,			NULL		}, /* 1315 */
+	{ 0,	0,	NULL,			NULL		}, /* 1316 */
+	{ 0,	0,	NULL,			NULL		}, /* 1317 */
+	{ 0,	0,	NULL,			NULL		}, /* 1318 */
+	{ 0,	0,	NULL,			NULL		}, /* 1319 */
+	{ 0,	0,	NULL,			NULL		}, /* 1320 */
+	{ 0,	0,	NULL,			NULL		}, /* 1321 */
+	{ 0,	0,	NULL,			NULL		}, /* 1322 */
+	{ 0,	0,	NULL,			NULL		}, /* 1323 */
+	{ 0,	0,	NULL,			NULL		}, /* 1324 */
+	{ 0,	0,	NULL,			NULL		}, /* 1325 */
+	{ 0,	0,	NULL,			NULL		}, /* 1326 */
+	{ 0,	0,	NULL,			NULL		}, /* 1327 */
+	{ 0,	0,	NULL,			NULL		}, /* 1328 */
+	{ 0,	0,	NULL,			NULL		}, /* 1329 */
+	{ 0,	0,	NULL,			NULL		}, /* 1330 */
+	{ 0,	0,	NULL,			NULL		}, /* 1331 */
+	{ 0,	0,	NULL,			NULL		}, /* 1332 */
+	{ 0,	0,	NULL,			NULL		}, /* 1333 */
+	{ 0,	0,	NULL,			NULL		}, /* 1334 */
+	{ 0,	0,	NULL,			NULL		}, /* 1335 */
+	{ 0,	0,	NULL,			NULL		}, /* 1336 */
+	{ 0,	0,	NULL,			NULL		}, /* 1337 */
+	{ 0,	0,	NULL,			NULL		}, /* 1338 */
+	{ 0,	0,	NULL,			NULL		}, /* 1339 */
+	{ 0,	0,	NULL,			NULL		}, /* 1340 */
+	{ 0,	0,	NULL,			NULL		}, /* 1341 */
+	{ 0,	0,	NULL,			NULL		}, /* 1342 */
+	{ 0,	0,	NULL,			NULL		}, /* 1343 */
+	{ 0,	0,	NULL,			NULL		}, /* 1344 */
+	{ 0,	0,	NULL,			NULL		}, /* 1345 */
+	{ 0,	0,	NULL,			NULL		}, /* 1346 */
+	{ 0,	0,	NULL,			NULL		}, /* 1347 */
+	{ 0,	0,	NULL,			NULL		}, /* 1348 */
+	{ 0,	0,	NULL,			NULL		}, /* 1349 */
+	{ 0,	0,	NULL,			NULL		}, /* 1350 */
+	{ 0,	0,	NULL,			NULL		}, /* 1351 */
+	{ 0,	0,	NULL,			NULL		}, /* 1352 */
+	{ 0,	0,	NULL,			NULL		}, /* 1353 */
+	{ 0,	0,	NULL,			NULL		}, /* 1354 */
+	{ 0,	0,	NULL,			NULL		}, /* 1355 */
+	{ 0,	0,	NULL,			NULL		}, /* 1356 */
+	{ 0,	0,	NULL,			NULL		}, /* 1357 */
+	{ 0,	0,	NULL,			NULL		}, /* 1358 */
+	{ 0,	0,	NULL,			NULL		}, /* 1359 */
+	{ 0,	0,	NULL,			NULL		}, /* 1360 */
+	{ 0,	0,	NULL,			NULL		}, /* 1361 */
+	{ 0,	0,	NULL,			NULL		}, /* 1362 */
+	{ 0,	0,	NULL,			NULL		}, /* 1363 */
+	{ 0,	0,	NULL,			NULL		}, /* 1364 */
+	{ 0,	0,	NULL,			NULL		}, /* 1365 */
+	{ 0,	0,	NULL,			NULL		}, /* 1366 */
+	{ 0,	0,	NULL,			NULL		}, /* 1367 */
+	{ 0,	0,	NULL,			NULL		}, /* 1368 */
+	{ 0,	0,	NULL,			NULL		}, /* 1369 */
+	{ 0,	0,	NULL,			NULL		}, /* 1370 */
+	{ 0,	0,	NULL,			NULL		}, /* 1371 */
+	{ 0,	0,	NULL,			NULL		}, /* 1372 */
+	{ 0,	0,	NULL,			NULL		}, /* 1373 */
+	{ 0,	0,	NULL,			NULL		}, /* 1374 */
+	{ 0,	0,	NULL,			NULL		}, /* 1375 */
+	{ 0,	0,	NULL,			NULL		}, /* 1376 */
+	{ 0,	0,	NULL,			NULL		}, /* 1377 */
+	{ 0,	0,	NULL,			NULL		}, /* 1378 */
+	{ 0,	0,	NULL,			NULL		}, /* 1379 */
+	{ 0,	0,	NULL,			NULL		}, /* 1380 */
+	{ 0,	0,	NULL,			NULL		}, /* 1381 */
+	{ 0,	0,	NULL,			NULL		}, /* 1382 */
+	{ 0,	0,	NULL,			NULL		}, /* 1383 */
+	{ 0,	0,	NULL,			NULL		}, /* 1384 */
+	{ 0,	0,	NULL,			NULL		}, /* 1385 */
+	{ 0,	0,	NULL,			NULL		}, /* 1386 */
+	{ 0,	0,	NULL,			NULL		}, /* 1387 */
+	{ 0,	0,	NULL,			NULL		}, /* 1388 */
+	{ 0,	0,	NULL,			NULL		}, /* 1389 */
+	{ 0,	0,	NULL,			NULL		}, /* 1390 */
+	{ 0,	0,	NULL,			NULL		}, /* 1391 */
+	{ 0,	0,	NULL,			NULL		}, /* 1392 */
+	{ 0,	0,	NULL,			NULL		}, /* 1393 */
+	{ 0,	0,	NULL,			NULL		}, /* 1394 */
+	{ 0,	0,	NULL,			NULL		}, /* 1395 */
+	{ 0,	0,	NULL,			NULL		}, /* 1396 */
+	{ 0,	0,	NULL,			NULL		}, /* 1397 */
+	{ 0,	0,	NULL,			NULL		}, /* 1398 */
+	{ 0,	0,	NULL,			NULL		}, /* 1399 */
+	{ 0,	0,	NULL,			NULL		}, /* 1400 */
+	{ 0,	0,	NULL,			NULL		}, /* 1401 */
+	{ 0,	0,	NULL,			NULL		}, /* 1402 */
+	{ 0,	0,	NULL,			NULL		}, /* 1403 */
+	{ 0,	0,	NULL,			NULL		}, /* 1404 */
+	{ 0,	0,	NULL,			NULL		}, /* 1405 */
+	{ 0,	0,	NULL,			NULL		}, /* 1406 */
+	{ 0,	0,	NULL,			NULL		}, /* 1407 */
+	{ 0,	0,	NULL,			NULL		}, /* 1408 */
+	{ 0,	0,	NULL,			NULL		}, /* 1409 */
+	{ 0,	0,	NULL,			NULL		}, /* 1410 */
+	{ 0,	0,	NULL,			NULL		}, /* 1411 */
+	{ 0,	0,	NULL,			NULL		}, /* 1412 */
+	{ 0,	0,	NULL,			NULL		}, /* 1413 */
+	{ 0,	0,	NULL,			NULL		}, /* 1414 */
+	{ 0,	0,	NULL,			NULL		}, /* 1415 */
+	{ 0,	0,	NULL,			NULL		}, /* 1416 */
+	{ 0,	0,	NULL,			NULL		}, /* 1417 */
+	{ 0,	0,	NULL,			NULL		}, /* 1418 */
+	{ 0,	0,	NULL,			NULL		}, /* 1419 */
+	{ 0,	0,	NULL,			NULL		}, /* 1420 */
+	{ 0,	0,	NULL,			NULL		}, /* 1421 */
+	{ 0,	0,	NULL,			NULL		}, /* 1422 */
+	{ 0,	0,	NULL,			NULL		}, /* 1423 */
+	{ 0,	0,	NULL,			NULL		}, /* 1424 */
+	{ 0,	0,	NULL,			NULL		}, /* 1425 */
+	{ 0,	0,	NULL,			NULL		}, /* 1426 */
+	{ 0,	0,	NULL,			NULL		}, /* 1427 */
+	{ 0,	0,	NULL,			NULL		}, /* 1428 */
+	{ 0,	0,	NULL,			NULL		}, /* 1429 */
+	{ 0,	0,	NULL,			NULL		}, /* 1430 */
+	{ 0,	0,	NULL,			NULL		}, /* 1431 */
+	{ 0,	0,	NULL,			NULL		}, /* 1432 */
+	{ 0,	0,	NULL,			NULL		}, /* 1433 */
+	{ 0,	0,	NULL,			NULL		}, /* 1434 */
+	{ 0,	0,	NULL,			NULL		}, /* 1435 */
+	{ 0,	0,	NULL,			NULL		}, /* 1436 */
+	{ 0,	0,	NULL,			NULL		}, /* 1437 */
+	{ 0,	0,	NULL,			NULL		}, /* 1438 */
+	{ 0,	0,	NULL,			NULL		}, /* 1439 */
+	{ 0,	0,	NULL,			NULL		}, /* 1440 */
+	{ 0,	0,	NULL,			NULL		}, /* 1441 */
+	{ 0,	0,	NULL,			NULL		}, /* 1442 */
+	{ 0,	0,	NULL,			NULL		}, /* 1443 */
+	{ 0,	0,	NULL,			NULL		}, /* 1444 */
+	{ 0,	0,	NULL,			NULL		}, /* 1445 */
+	{ 0,	0,	NULL,			NULL		}, /* 1446 */
+	{ 0,	0,	NULL,			NULL		}, /* 1447 */
+	{ 0,	0,	NULL,			NULL		}, /* 1448 */
+	{ 0,	0,	NULL,			NULL		}, /* 1449 */
+	{ 0,	0,	NULL,			NULL		}, /* 1450 */
+	{ 0,	0,	NULL,			NULL		}, /* 1451 */
+	{ 0,	0,	NULL,			NULL		}, /* 1452 */
+	{ 0,	0,	NULL,			NULL		}, /* 1453 */
+	{ 0,	0,	NULL,			NULL		}, /* 1454 */
+	{ 0,	0,	NULL,			NULL		}, /* 1455 */
+	{ 0,	0,	NULL,			NULL		}, /* 1456 */
+	{ 0,	0,	NULL,			NULL		}, /* 1457 */
+	{ 0,	0,	NULL,			NULL		}, /* 1458 */
+	{ 0,	0,	NULL,			NULL		}, /* 1459 */
+	{ 0,	0,	NULL,			NULL		}, /* 1460 */
+	{ 0,	0,	NULL,			NULL		}, /* 1461 */
+	{ 0,	0,	NULL,			NULL		}, /* 1462 */
+	{ 0,	0,	NULL,			NULL		}, /* 1463 */
+	{ 0,	0,	NULL,			NULL		}, /* 1464 */
+	{ 0,	0,	NULL,			NULL		}, /* 1465 */
+	{ 0,	0,	NULL,			NULL		}, /* 1466 */
+	{ 0,	0,	NULL,			NULL		}, /* 1467 */
+	{ 0,	0,	NULL,			NULL		}, /* 1468 */
+	{ 0,	0,	NULL,			NULL		}, /* 1469 */
+	{ 0,	0,	NULL,			NULL		}, /* 1470 */
+	{ 0,	0,	NULL,			NULL		}, /* 1471 */
+	{ 0,	0,	NULL,			NULL		}, /* 1472 */
+	{ 0,	0,	NULL,			NULL		}, /* 1473 */
+	{ 0,	0,	NULL,			NULL		}, /* 1474 */
+	{ 0,	0,	NULL,			NULL		}, /* 1475 */
+	{ 0,	0,	NULL,			NULL		}, /* 1476 */
+	{ 0,	0,	NULL,			NULL		}, /* 1477 */
+	{ 0,	0,	NULL,			NULL		}, /* 1478 */
+	{ 0,	0,	NULL,			NULL		}, /* 1479 */
+	{ 0,	0,	NULL,			NULL		}, /* 1480 */
+	{ 0,	0,	NULL,			NULL		}, /* 1481 */
+	{ 0,	0,	NULL,			NULL		}, /* 1482 */
+	{ 0,	0,	NULL,			NULL		}, /* 1483 */
+	{ 0,	0,	NULL,			NULL		}, /* 1484 */
+	{ 0,	0,	NULL,			NULL		}, /* 1485 */
+	{ 0,	0,	NULL,			NULL		}, /* 1486 */
+	{ 0,	0,	NULL,			NULL		}, /* 1487 */
+	{ 0,	0,	NULL,			NULL		}, /* 1488 */
+	{ 0,	0,	NULL,			NULL		}, /* 1489 */
+	{ 0,	0,	NULL,			NULL		}, /* 1490 */
+	{ 0,	0,	NULL,			NULL		}, /* 1491 */
+	{ 0,	0,	NULL,			NULL		}, /* 1492 */
+	{ 0,	0,	NULL,			NULL		}, /* 1493 */
+	{ 0,	0,	NULL,			NULL		}, /* 1494 */
+	{ 0,	0,	NULL,			NULL		}, /* 1495 */
+	{ 0,	0,	NULL,			NULL		}, /* 1496 */
+	{ 0,	0,	NULL,			NULL		}, /* 1497 */
+	{ 0,	0,	NULL,			NULL		}, /* 1498 */
+	{ 0,	0,	NULL,			NULL		}, /* 1499 */
+	{ 0,	0,	NULL,			NULL		}, /* 1500 */
+	{ 0,	0,	NULL,			NULL		}, /* 1501 */
+	{ 0,	0,	NULL,			NULL		}, /* 1502 */
+	{ 0,	0,	NULL,			NULL		}, /* 1503 */
+	{ 0,	0,	NULL,			NULL		}, /* 1504 */
+	{ 0,	0,	NULL,			NULL		}, /* 1505 */
+	{ 0,	0,	NULL,			NULL		}, /* 1506 */
+	{ 0,	0,	NULL,			NULL		}, /* 1507 */
+	{ 0,	0,	NULL,			NULL		}, /* 1508 */
+	{ 0,	0,	NULL,			NULL		}, /* 1509 */
+	{ 0,	0,	NULL,			NULL		}, /* 1510 */
+	{ 0,	0,	NULL,			NULL		}, /* 1511 */
+	{ 0,	0,	NULL,			NULL		}, /* 1512 */
+	{ 0,	0,	NULL,			NULL		}, /* 1513 */
+	{ 0,	0,	NULL,			NULL		}, /* 1514 */
+	{ 0,	0,	NULL,			NULL		}, /* 1515 */
+	{ 0,	0,	NULL,			NULL		}, /* 1516 */
+	{ 0,	0,	NULL,			NULL		}, /* 1517 */
+	{ 0,	0,	NULL,			NULL		}, /* 1518 */
+	{ 0,	0,	NULL,			NULL		}, /* 1519 */
+	{ 0,	0,	NULL,			NULL		}, /* 1520 */
+	{ 0,	0,	NULL,			NULL		}, /* 1521 */
+	{ 0,	0,	NULL,			NULL		}, /* 1522 */
+	{ 0,	0,	NULL,			NULL		}, /* 1523 */
+	{ 0,	0,	NULL,			NULL		}, /* 1524 */
+	{ 0,	0,	NULL,			NULL		}, /* 1525 */
+	{ 0,	0,	NULL,			NULL		}, /* 1526 */
+	{ 0,	0,	NULL,			NULL		}, /* 1527 */
+	{ 0,	0,	NULL,			NULL		}, /* 1528 */
+	{ 0,	0,	NULL,			NULL		}, /* 1529 */
+	{ 0,	0,	NULL,			NULL		}, /* 1530 */
+	{ 0,	0,	NULL,			NULL		}, /* 1531 */
+	{ 0,	0,	NULL,			NULL		}, /* 1532 */
+	{ 0,	0,	NULL,			NULL		}, /* 1533 */
+	{ 0,	0,	NULL,			NULL		}, /* 1534 */
+	{ 0,	0,	NULL,			NULL		}, /* 1535 */
+	{ 0,	0,	NULL,			NULL		}, /* 1536 */
+	{ 0,	0,	NULL,			NULL		}, /* 1537 */
+	{ 0,	0,	NULL,			NULL		}, /* 1538 */
+	{ 0,	0,	NULL,			NULL		}, /* 1539 */
+	{ 0,	0,	NULL,			NULL		}, /* 1540 */
+	{ 0,	0,	NULL,			NULL		}, /* 1541 */
+	{ 0,	0,	NULL,			NULL		}, /* 1542 */
+	{ 0,	0,	NULL,			NULL		}, /* 1543 */
+	{ 0,	0,	NULL,			NULL		}, /* 1544 */
+	{ 0,	0,	NULL,			NULL		}, /* 1545 */
+	{ 0,	0,	NULL,			NULL		}, /* 1546 */
+	{ 0,	0,	NULL,			NULL		}, /* 1547 */
+	{ 0,	0,	NULL,			NULL		}, /* 1548 */
+	{ 0,	0,	NULL,			NULL		}, /* 1549 */
+	{ 0,	0,	NULL,			NULL		}, /* 1550 */
+	{ 0,	0,	NULL,			NULL		}, /* 1551 */
+	{ 0,	0,	NULL,			NULL		}, /* 1552 */
+	{ 0,	0,	NULL,			NULL		}, /* 1553 */
+	{ 0,	0,	NULL,			NULL		}, /* 1554 */
+	{ 0,	0,	NULL,			NULL		}, /* 1555 */
+	{ 0,	0,	NULL,			NULL		}, /* 1556 */
+	{ 0,	0,	NULL,			NULL		}, /* 1557 */
+	{ 0,	0,	NULL,			NULL		}, /* 1558 */
+	{ 0,	0,	NULL,			NULL		}, /* 1559 */
+	{ 0,	0,	NULL,			NULL		}, /* 1560 */
+	{ 0,	0,	NULL,			NULL		}, /* 1561 */
+	{ 0,	0,	NULL,			NULL		}, /* 1562 */
+	{ 0,	0,	NULL,			NULL		}, /* 1563 */
+	{ 0,	0,	NULL,			NULL		}, /* 1564 */
+	{ 0,	0,	NULL,			NULL		}, /* 1565 */
+	{ 0,	0,	NULL,			NULL		}, /* 1566 */
+	{ 0,	0,	NULL,			NULL		}, /* 1567 */
+	{ 0,	0,	NULL,			NULL		}, /* 1568 */
+	{ 0,	0,	NULL,			NULL		}, /* 1569 */
+	{ 0,	0,	NULL,			NULL		}, /* 1570 */
+	{ 0,	0,	NULL,			NULL		}, /* 1571 */
+	{ 0,	0,	NULL,			NULL		}, /* 1572 */
+	{ 0,	0,	NULL,			NULL		}, /* 1573 */
+	{ 0,	0,	NULL,			NULL		}, /* 1574 */
+	{ 0,	0,	NULL,			NULL		}, /* 1575 */
+	{ 0,	0,	NULL,			NULL		}, /* 1576 */
+	{ 0,	0,	NULL,			NULL		}, /* 1577 */
+	{ 0,	0,	NULL,			NULL		}, /* 1578 */
+	{ 0,	0,	NULL,			NULL		}, /* 1579 */
+	{ 0,	0,	NULL,			NULL		}, /* 1580 */
+	{ 0,	0,	NULL,			NULL		}, /* 1581 */
+	{ 0,	0,	NULL,			NULL		}, /* 1582 */
+	{ 0,	0,	NULL,			NULL		}, /* 1583 */
+	{ 0,	0,	NULL,			NULL		}, /* 1584 */
+	{ 0,	0,	NULL,			NULL		}, /* 1585 */
+	{ 0,	0,	NULL,			NULL		}, /* 1586 */
+	{ 0,	0,	NULL,			NULL		}, /* 1587 */
+	{ 0,	0,	NULL,			NULL		}, /* 1588 */
+	{ 0,	0,	NULL,			NULL		}, /* 1589 */
+	{ 0,	0,	NULL,			NULL		}, /* 1590 */
+	{ 0,	0,	NULL,			NULL		}, /* 1591 */
+	{ 0,	0,	NULL,			NULL		}, /* 1592 */
+	{ 0,	0,	NULL,			NULL		}, /* 1593 */
+	{ 0,	0,	NULL,			NULL		}, /* 1594 */
+	{ 0,	0,	NULL,			NULL		}, /* 1595 */
+	{ 0,	0,	NULL,			NULL		}, /* 1596 */
+	{ 0,	0,	NULL,			NULL		}, /* 1597 */
+	{ 0,	0,	NULL,			NULL		}, /* 1598 */
+	{ 0,	0,	NULL,			NULL		}, /* 1599 */
+	{ 0,	0,	NULL,			NULL		}, /* 1600 */
+	{ 0,	0,	NULL,			NULL		}, /* 1601 */
+	{ 0,	0,	NULL,			NULL		}, /* 1602 */
+	{ 0,	0,	NULL,			NULL		}, /* 1603 */
+	{ 0,	0,	NULL,			NULL		}, /* 1604 */
+	{ 0,	0,	NULL,			NULL		}, /* 1605 */
+	{ 0,	0,	NULL,			NULL		}, /* 1606 */
+	{ 0,	0,	NULL,			NULL		}, /* 1607 */
+	{ 0,	0,	NULL,			NULL		}, /* 1608 */
+	{ 0,	0,	NULL,			NULL		}, /* 1609 */
+	{ 0,	0,	NULL,			NULL		}, /* 1610 */
+	{ 0,	0,	NULL,			NULL		}, /* 1611 */
+	{ 0,	0,	NULL,			NULL		}, /* 1612 */
+	{ 0,	0,	NULL,			NULL		}, /* 1613 */
+	{ 0,	0,	NULL,			NULL		}, /* 1614 */
+	{ 0,	0,	NULL,			NULL		}, /* 1615 */
+	{ 0,	0,	NULL,			NULL		}, /* 1616 */
+	{ 0,	0,	NULL,			NULL		}, /* 1617 */
+	{ 0,	0,	NULL,			NULL		}, /* 1618 */
+	{ 0,	0,	NULL,			NULL		}, /* 1619 */
+	{ 0,	0,	NULL,			NULL		}, /* 1620 */
+	{ 0,	0,	NULL,			NULL		}, /* 1621 */
+	{ 0,	0,	NULL,			NULL		}, /* 1622 */
+	{ 0,	0,	NULL,			NULL		}, /* 1623 */
+	{ 0,	0,	NULL,			NULL		}, /* 1624 */
+	{ 0,	0,	NULL,			NULL		}, /* 1625 */
+	{ 0,	0,	NULL,			NULL		}, /* 1626 */
+	{ 0,	0,	NULL,			NULL		}, /* 1627 */
+	{ 0,	0,	NULL,			NULL		}, /* 1628 */
+	{ 0,	0,	NULL,			NULL		}, /* 1629 */
+	{ 0,	0,	NULL,			NULL		}, /* 1630 */
+	{ 0,	0,	NULL,			NULL		}, /* 1631 */
+	{ 0,	0,	NULL,			NULL		}, /* 1632 */
+	{ 0,	0,	NULL,			NULL		}, /* 1633 */
+	{ 0,	0,	NULL,			NULL		}, /* 1634 */
+	{ 0,	0,	NULL,			NULL		}, /* 1635 */
+	{ 0,	0,	NULL,			NULL		}, /* 1636 */
+	{ 0,	0,	NULL,			NULL		}, /* 1637 */
+	{ 0,	0,	NULL,			NULL		}, /* 1638 */
+	{ 0,	0,	NULL,			NULL		}, /* 1639 */
+	{ 0,	0,	NULL,			NULL		}, /* 1640 */
+	{ 0,	0,	NULL,			NULL		}, /* 1641 */
+	{ 0,	0,	NULL,			NULL		}, /* 1642 */
+	{ 0,	0,	NULL,			NULL		}, /* 1643 */
+	{ 0,	0,	NULL,			NULL		}, /* 1644 */
+	{ 0,	0,	NULL,			NULL		}, /* 1645 */
+	{ 0,	0,	NULL,			NULL		}, /* 1646 */
+	{ 0,	0,	NULL,			NULL		}, /* 1647 */
+	{ 0,	0,	NULL,			NULL		}, /* 1648 */
+	{ 0,	0,	NULL,			NULL		}, /* 1649 */
+	{ 0,	0,	NULL,			NULL		}, /* 1650 */
+	{ 0,	0,	NULL,			NULL		}, /* 1651 */
+	{ 0,	0,	NULL,			NULL		}, /* 1652 */
+	{ 0,	0,	NULL,			NULL		}, /* 1653 */
+	{ 0,	0,	NULL,			NULL		}, /* 1654 */
+	{ 0,	0,	NULL,			NULL		}, /* 1655 */
+	{ 0,	0,	NULL,			NULL		}, /* 1656 */
+	{ 0,	0,	NULL,			NULL		}, /* 1657 */
+	{ 0,	0,	NULL,			NULL		}, /* 1658 */
+	{ 0,	0,	NULL,			NULL		}, /* 1659 */
+	{ 0,	0,	NULL,			NULL		}, /* 1660 */
+	{ 0,	0,	NULL,			NULL		}, /* 1661 */
+	{ 0,	0,	NULL,			NULL		}, /* 1662 */
+	{ 0,	0,	NULL,			NULL		}, /* 1663 */
+	{ 0,	0,	NULL,			NULL		}, /* 1664 */
+	{ 0,	0,	NULL,			NULL		}, /* 1665 */
+	{ 0,	0,	NULL,			NULL		}, /* 1666 */
+	{ 0,	0,	NULL,			NULL		}, /* 1667 */
+	{ 0,	0,	NULL,			NULL		}, /* 1668 */
+	{ 0,	0,	NULL,			NULL		}, /* 1669 */
+	{ 0,	0,	NULL,			NULL		}, /* 1670 */
+	{ 0,	0,	NULL,			NULL		}, /* 1671 */
+	{ 0,	0,	NULL,			NULL		}, /* 1672 */
+	{ 0,	0,	NULL,			NULL		}, /* 1673 */
+	{ 0,	0,	NULL,			NULL		}, /* 1674 */
+	{ 0,	0,	NULL,			NULL		}, /* 1675 */
+	{ 0,	0,	NULL,			NULL		}, /* 1676 */
+	{ 0,	0,	NULL,			NULL		}, /* 1677 */
+	{ 0,	0,	NULL,			NULL		}, /* 1678 */
+	{ 0,	0,	NULL,			NULL		}, /* 1679 */
+	{ 0,	0,	NULL,			NULL		}, /* 1680 */
+	{ 0,	0,	NULL,			NULL		}, /* 1681 */
+	{ 0,	0,	NULL,			NULL		}, /* 1682 */
+	{ 0,	0,	NULL,			NULL		}, /* 1683 */
+	{ 0,	0,	NULL,			NULL		}, /* 1684 */
+	{ 0,	0,	NULL,			NULL		}, /* 1685 */
+	{ 0,	0,	NULL,			NULL		}, /* 1686 */
+	{ 0,	0,	NULL,			NULL		}, /* 1687 */
+	{ 0,	0,	NULL,			NULL		}, /* 1688 */
+	{ 0,	0,	NULL,			NULL		}, /* 1689 */
+	{ 0,	0,	NULL,			NULL		}, /* 1690 */
+	{ 0,	0,	NULL,			NULL		}, /* 1691 */
+	{ 0,	0,	NULL,			NULL		}, /* 1692 */
+	{ 0,	0,	NULL,			NULL		}, /* 1693 */
+	{ 0,	0,	NULL,			NULL		}, /* 1694 */
+	{ 0,	0,	NULL,			NULL		}, /* 1695 */
+	{ 0,	0,	NULL,			NULL		}, /* 1696 */
+	{ 0,	0,	NULL,			NULL		}, /* 1697 */
+	{ 0,	0,	NULL,			NULL		}, /* 1698 */
+	{ 0,	0,	NULL,			NULL		}, /* 1699 */
+	{ 0,	0,	NULL,			NULL		}, /* 1700 */
+	{ 0,	0,	NULL,			NULL		}, /* 1701 */
+	{ 0,	0,	NULL,			NULL		}, /* 1702 */
+	{ 0,	0,	NULL,			NULL		}, /* 1703 */
+	{ 0,	0,	NULL,			NULL		}, /* 1704 */
+	{ 0,	0,	NULL,			NULL		}, /* 1705 */
+	{ 0,	0,	NULL,			NULL		}, /* 1706 */
+	{ 0,	0,	NULL,			NULL		}, /* 1707 */
+	{ 0,	0,	NULL,			NULL		}, /* 1708 */
+	{ 0,	0,	NULL,			NULL		}, /* 1709 */
+	{ 0,	0,	NULL,			NULL		}, /* 1710 */
+	{ 0,	0,	NULL,			NULL		}, /* 1711 */
+	{ 0,	0,	NULL,			NULL		}, /* 1712 */
+	{ 0,	0,	NULL,			NULL		}, /* 1713 */
+	{ 0,	0,	NULL,			NULL		}, /* 1714 */
+	{ 0,	0,	NULL,			NULL		}, /* 1715 */
+	{ 0,	0,	NULL,			NULL		}, /* 1716 */
+	{ 0,	0,	NULL,			NULL		}, /* 1717 */
+	{ 0,	0,	NULL,			NULL		}, /* 1718 */
+	{ 0,	0,	NULL,			NULL		}, /* 1719 */
+	{ 0,	0,	NULL,			NULL		}, /* 1720 */
+	{ 0,	0,	NULL,			NULL		}, /* 1721 */
+	{ 0,	0,	NULL,			NULL		}, /* 1722 */
+	{ 0,	0,	NULL,			NULL		}, /* 1723 */
+	{ 0,	0,	NULL,			NULL		}, /* 1724 */
+	{ 0,	0,	NULL,			NULL		}, /* 1725 */
+	{ 0,	0,	NULL,			NULL		}, /* 1726 */
+	{ 0,	0,	NULL,			NULL		}, /* 1727 */
+	{ 0,	0,	NULL,			NULL		}, /* 1728 */
+	{ 0,	0,	NULL,			NULL		}, /* 1729 */
+	{ 0,	0,	NULL,			NULL		}, /* 1730 */
+	{ 0,	0,	NULL,			NULL		}, /* 1731 */
+	{ 0,	0,	NULL,			NULL		}, /* 1732 */
+	{ 0,	0,	NULL,			NULL		}, /* 1733 */
+	{ 0,	0,	NULL,			NULL		}, /* 1734 */
+	{ 0,	0,	NULL,			NULL		}, /* 1735 */
+	{ 0,	0,	NULL,			NULL		}, /* 1736 */
+	{ 0,	0,	NULL,			NULL		}, /* 1737 */
+	{ 0,	0,	NULL,			NULL		}, /* 1738 */
+	{ 0,	0,	NULL,			NULL		}, /* 1739 */
+	{ 0,	0,	NULL,			NULL		}, /* 1740 */
+	{ 0,	0,	NULL,			NULL		}, /* 1741 */
+	{ 0,	0,	NULL,			NULL		}, /* 1742 */
+	{ 0,	0,	NULL,			NULL		}, /* 1743 */
+	{ 0,	0,	NULL,			NULL		}, /* 1744 */
+	{ 0,	0,	NULL,			NULL		}, /* 1745 */
+	{ 0,	0,	NULL,			NULL		}, /* 1746 */
+	{ 0,	0,	NULL,			NULL		}, /* 1747 */
+	{ 0,	0,	NULL,			NULL		}, /* 1748 */
+	{ 0,	0,	NULL,			NULL		}, /* 1749 */
+	{ 0,	0,	NULL,			NULL		}, /* 1750 */
+	{ 0,	0,	NULL,			NULL		}, /* 1751 */
+	{ 0,	0,	NULL,			NULL		}, /* 1752 */
+	{ 0,	0,	NULL,			NULL		}, /* 1753 */
+	{ 0,	0,	NULL,			NULL		}, /* 1754 */
+	{ 0,	0,	NULL,			NULL		}, /* 1755 */
+	{ 0,	0,	NULL,			NULL		}, /* 1756 */
+	{ 0,	0,	NULL,			NULL		}, /* 1757 */
+	{ 0,	0,	NULL,			NULL		}, /* 1758 */
+	{ 0,	0,	NULL,			NULL		}, /* 1759 */
+	{ 0,	0,	NULL,			NULL		}, /* 1760 */
+	{ 0,	0,	NULL,			NULL		}, /* 1761 */
+	{ 0,	0,	NULL,			NULL		}, /* 1762 */
+	{ 0,	0,	NULL,			NULL		}, /* 1763 */
+	{ 0,	0,	NULL,			NULL		}, /* 1764 */
+	{ 0,	0,	NULL,			NULL		}, /* 1765 */
+	{ 0,	0,	NULL,			NULL		}, /* 1766 */
+	{ 0,	0,	NULL,			NULL		}, /* 1767 */
+	{ 0,	0,	NULL,			NULL		}, /* 1768 */
+	{ 0,	0,	NULL,			NULL		}, /* 1769 */
+	{ 0,	0,	NULL,			NULL		}, /* 1770 */
+	{ 0,	0,	NULL,			NULL		}, /* 1771 */
+	{ 0,	0,	NULL,			NULL		}, /* 1772 */
+	{ 0,	0,	NULL,			NULL		}, /* 1773 */
+	{ 0,	0,	NULL,			NULL		}, /* 1774 */
+	{ 0,	0,	NULL,			NULL		}, /* 1775 */
+	{ 0,	0,	NULL,			NULL		}, /* 1776 */
+	{ 0,	0,	NULL,			NULL		}, /* 1777 */
+	{ 0,	0,	NULL,			NULL		}, /* 1778 */
+	{ 0,	0,	NULL,			NULL		}, /* 1779 */
+	{ 0,	0,	NULL,			NULL		}, /* 1780 */
+	{ 0,	0,	NULL,			NULL		}, /* 1781 */
+	{ 0,	0,	NULL,			NULL		}, /* 1782 */
+	{ 0,	0,	NULL,			NULL		}, /* 1783 */
+	{ 0,	0,	NULL,			NULL		}, /* 1784 */
+	{ 0,	0,	NULL,			NULL		}, /* 1785 */
+	{ 0,	0,	NULL,			NULL		}, /* 1786 */
+	{ 0,	0,	NULL,			NULL		}, /* 1787 */
+	{ 0,	0,	NULL,			NULL		}, /* 1788 */
+	{ 0,	0,	NULL,			NULL		}, /* 1789 */
+	{ 0,	0,	NULL,			NULL		}, /* 1790 */
+	{ 0,	0,	NULL,			NULL		}, /* 1791 */
+	{ 0,	0,	NULL,			NULL		}, /* 1792 */
+	{ 0,	0,	NULL,			NULL		}, /* 1793 */
+	{ 0,	0,	NULL,			NULL		}, /* 1794 */
+	{ 0,	0,	NULL,			NULL		}, /* 1795 */
+	{ 0,	0,	NULL,			NULL		}, /* 1796 */
+	{ 0,	0,	NULL,			NULL		}, /* 1797 */
+	{ 0,	0,	NULL,			NULL		}, /* 1798 */
+	{ 0,	0,	NULL,			NULL		}, /* 1799 */
+	{ 0,	0,	NULL,			NULL		}, /* 1800 */
+	{ 0,	0,	NULL,			NULL		}, /* 1801 */
+	{ 0,	0,	NULL,			NULL		}, /* 1802 */
+	{ 0,	0,	NULL,			NULL		}, /* 1803 */
+	{ 0,	0,	NULL,			NULL		}, /* 1804 */
+	{ 0,	0,	NULL,			NULL		}, /* 1805 */
+	{ 0,	0,	NULL,			NULL		}, /* 1806 */
+	{ 0,	0,	NULL,			NULL		}, /* 1807 */
+	{ 0,	0,	NULL,			NULL		}, /* 1808 */
+	{ 0,	0,	NULL,			NULL		}, /* 1809 */
+	{ 0,	0,	NULL,			NULL		}, /* 1810 */
+	{ 0,	0,	NULL,			NULL		}, /* 1811 */
+	{ 0,	0,	NULL,			NULL		}, /* 1812 */
+	{ 0,	0,	NULL,			NULL		}, /* 1813 */
+	{ 0,	0,	NULL,			NULL		}, /* 1814 */
+	{ 0,	0,	NULL,			NULL		}, /* 1815 */
+	{ 0,	0,	NULL,			NULL		}, /* 1816 */
+	{ 0,	0,	NULL,			NULL		}, /* 1817 */
+	{ 0,	0,	NULL,			NULL		}, /* 1818 */
+	{ 0,	0,	NULL,			NULL		}, /* 1819 */
+	{ 0,	0,	NULL,			NULL		}, /* 1820 */
+	{ 0,	0,	NULL,			NULL		}, /* 1821 */
+	{ 0,	0,	NULL,			NULL		}, /* 1822 */
+	{ 0,	0,	NULL,			NULL		}, /* 1823 */
+	{ 0,	0,	NULL,			NULL		}, /* 1824 */
+	{ 0,	0,	NULL,			NULL		}, /* 1825 */
+	{ 0,	0,	NULL,			NULL		}, /* 1826 */
+	{ 0,	0,	NULL,			NULL		}, /* 1827 */
+	{ 0,	0,	NULL,			NULL		}, /* 1828 */
+	{ 0,	0,	NULL,			NULL		}, /* 1829 */
+	{ 0,	0,	NULL,			NULL		}, /* 1830 */
+	{ 0,	0,	NULL,			NULL		}, /* 1831 */
+	{ 0,	0,	NULL,			NULL		}, /* 1832 */
+	{ 0,	0,	NULL,			NULL		}, /* 1833 */
+	{ 0,	0,	NULL,			NULL		}, /* 1834 */
+	{ 0,	0,	NULL,			NULL		}, /* 1835 */
+	{ 0,	0,	NULL,			NULL		}, /* 1836 */
+	{ 0,	0,	NULL,			NULL		}, /* 1837 */
+	{ 0,	0,	NULL,			NULL		}, /* 1838 */
+	{ 0,	0,	NULL,			NULL		}, /* 1839 */
+	{ 0,	0,	NULL,			NULL		}, /* 1840 */
+	{ 0,	0,	NULL,			NULL		}, /* 1841 */
+	{ 0,	0,	NULL,			NULL		}, /* 1842 */
+	{ 0,	0,	NULL,			NULL		}, /* 1843 */
+	{ 0,	0,	NULL,			NULL		}, /* 1844 */
+	{ 0,	0,	NULL,			NULL		}, /* 1845 */
+	{ 0,	0,	NULL,			NULL		}, /* 1846 */
+	{ 0,	0,	NULL,			NULL		}, /* 1847 */
+	{ 0,	0,	NULL,			NULL		}, /* 1848 */
+	{ 0,	0,	NULL,			NULL		}, /* 1849 */
+	{ 0,	0,	NULL,			NULL		}, /* 1850 */
+	{ 0,	0,	NULL,			NULL		}, /* 1851 */
+	{ 0,	0,	NULL,			NULL		}, /* 1852 */
+	{ 0,	0,	NULL,			NULL		}, /* 1853 */
+	{ 0,	0,	NULL,			NULL		}, /* 1854 */
+	{ 0,	0,	NULL,			NULL		}, /* 1855 */
+	{ 0,	0,	NULL,			NULL		}, /* 1856 */
+	{ 0,	0,	NULL,			NULL		}, /* 1857 */
+	{ 0,	0,	NULL,			NULL		}, /* 1858 */
+	{ 0,	0,	NULL,			NULL		}, /* 1859 */
+	{ 0,	0,	NULL,			NULL		}, /* 1860 */
+	{ 0,	0,	NULL,			NULL		}, /* 1861 */
+	{ 0,	0,	NULL,			NULL		}, /* 1862 */
+	{ 0,	0,	NULL,			NULL		}, /* 1863 */
+	{ 0,	0,	NULL,			NULL		}, /* 1864 */
+	{ 0,	0,	NULL,			NULL		}, /* 1865 */
+	{ 0,	0,	NULL,			NULL		}, /* 1866 */
+	{ 0,	0,	NULL,			NULL		}, /* 1867 */
+	{ 0,	0,	NULL,			NULL		}, /* 1868 */
+	{ 0,	0,	NULL,			NULL		}, /* 1869 */
+	{ 0,	0,	NULL,			NULL		}, /* 1870 */
+	{ 0,	0,	NULL,			NULL		}, /* 1871 */
+	{ 0,	0,	NULL,			NULL		}, /* 1872 */
+	{ 0,	0,	NULL,			NULL		}, /* 1873 */
+	{ 0,	0,	NULL,			NULL		}, /* 1874 */
+	{ 0,	0,	NULL,			NULL		}, /* 1875 */
+	{ 0,	0,	NULL,			NULL		}, /* 1876 */
+	{ 0,	0,	NULL,			NULL		}, /* 1877 */
+	{ 0,	0,	NULL,			NULL		}, /* 1878 */
+	{ 0,	0,	NULL,			NULL		}, /* 1879 */
+	{ 0,	0,	NULL,			NULL		}, /* 1880 */
+	{ 0,	0,	NULL,			NULL		}, /* 1881 */
+	{ 0,	0,	NULL,			NULL		}, /* 1882 */
+	{ 0,	0,	NULL,			NULL		}, /* 1883 */
+	{ 0,	0,	NULL,			NULL		}, /* 1884 */
+	{ 0,	0,	NULL,			NULL		}, /* 1885 */
+	{ 0,	0,	NULL,			NULL		}, /* 1886 */
+	{ 0,	0,	NULL,			NULL		}, /* 1887 */
+	{ 0,	0,	NULL,			NULL		}, /* 1888 */
+	{ 0,	0,	NULL,			NULL		}, /* 1889 */
+	{ 0,	0,	NULL,			NULL		}, /* 1890 */
+	{ 0,	0,	NULL,			NULL		}, /* 1891 */
+	{ 0,	0,	NULL,			NULL		}, /* 1892 */
+	{ 0,	0,	NULL,			NULL		}, /* 1893 */
+	{ 0,	0,	NULL,			NULL		}, /* 1894 */
+	{ 0,	0,	NULL,			NULL		}, /* 1895 */
+	{ 0,	0,	NULL,			NULL		}, /* 1896 */
+	{ 0,	0,	NULL,			NULL		}, /* 1897 */
+	{ 0,	0,	NULL,			NULL		}, /* 1898 */
+	{ 0,	0,	NULL,			NULL		}, /* 1899 */
+	{ 0,	0,	NULL,			NULL		}, /* 1900 */
+	{ 0,	0,	NULL,			NULL		}, /* 1901 */
+	{ 0,	0,	NULL,			NULL		}, /* 1902 */
+	{ 0,	0,	NULL,			NULL		}, /* 1903 */
+	{ 0,	0,	NULL,			NULL		}, /* 1904 */
+	{ 0,	0,	NULL,			NULL		}, /* 1905 */
+	{ 0,	0,	NULL,			NULL		}, /* 1906 */
+	{ 0,	0,	NULL,			NULL		}, /* 1907 */
+	{ 0,	0,	NULL,			NULL		}, /* 1908 */
+	{ 0,	0,	NULL,			NULL		}, /* 1909 */
+	{ 0,	0,	NULL,			NULL		}, /* 1910 */
+	{ 0,	0,	NULL,			NULL		}, /* 1911 */
+	{ 0,	0,	NULL,			NULL		}, /* 1912 */
+	{ 0,	0,	NULL,			NULL		}, /* 1913 */
+	{ 0,	0,	NULL,			NULL		}, /* 1914 */
+	{ 0,	0,	NULL,			NULL		}, /* 1915 */
+	{ 0,	0,	NULL,			NULL		}, /* 1916 */
+	{ 0,	0,	NULL,			NULL		}, /* 1917 */
+	{ 0,	0,	NULL,			NULL		}, /* 1918 */
+	{ 0,	0,	NULL,			NULL		}, /* 1919 */
+	{ 0,	0,	NULL,			NULL		}, /* 1920 */
+	{ 0,	0,	NULL,			NULL		}, /* 1921 */
+	{ 0,	0,	NULL,			NULL		}, /* 1922 */
+	{ 0,	0,	NULL,			NULL		}, /* 1923 */
+	{ 0,	0,	NULL,			NULL		}, /* 1924 */
+	{ 0,	0,	NULL,			NULL		}, /* 1925 */
+	{ 0,	0,	NULL,			NULL		}, /* 1926 */
+	{ 0,	0,	NULL,			NULL		}, /* 1927 */
+	{ 0,	0,	NULL,			NULL		}, /* 1928 */
+	{ 0,	0,	NULL,			NULL		}, /* 1929 */
+	{ 0,	0,	NULL,			NULL		}, /* 1930 */
+	{ 0,	0,	NULL,			NULL		}, /* 1931 */
+	{ 0,	0,	NULL,			NULL		}, /* 1932 */
+	{ 0,	0,	NULL,			NULL		}, /* 1933 */
+	{ 0,	0,	NULL,			NULL		}, /* 1934 */
+	{ 0,	0,	NULL,			NULL		}, /* 1935 */
+	{ 0,	0,	NULL,			NULL		}, /* 1936 */
+	{ 0,	0,	NULL,			NULL		}, /* 1937 */
+	{ 0,	0,	NULL,			NULL		}, /* 1938 */
+	{ 0,	0,	NULL,			NULL		}, /* 1939 */
+	{ 0,	0,	NULL,			NULL		}, /* 1940 */
+	{ 0,	0,	NULL,			NULL		}, /* 1941 */
+	{ 0,	0,	NULL,			NULL		}, /* 1942 */
+	{ 0,	0,	NULL,			NULL		}, /* 1943 */
+	{ 0,	0,	NULL,			NULL		}, /* 1944 */
+	{ 0,	0,	NULL,			NULL		}, /* 1945 */
+	{ 0,	0,	NULL,			NULL		}, /* 1946 */
+	{ 0,	0,	NULL,			NULL		}, /* 1947 */
+	{ 0,	0,	NULL,			NULL		}, /* 1948 */
+	{ 0,	0,	NULL,			NULL		}, /* 1949 */
+	{ 0,	0,	NULL,			NULL		}, /* 1950 */
+	{ 0,	0,	NULL,			NULL		}, /* 1951 */
+	{ 0,	0,	NULL,			NULL		}, /* 1952 */
+	{ 0,	0,	NULL,			NULL		}, /* 1953 */
+	{ 0,	0,	NULL,			NULL		}, /* 1954 */
+	{ 0,	0,	NULL,			NULL		}, /* 1955 */
+	{ 0,	0,	NULL,			NULL		}, /* 1956 */
+	{ 0,	0,	NULL,			NULL		}, /* 1957 */
+	{ 0,	0,	NULL,			NULL		}, /* 1958 */
+	{ 0,	0,	NULL,			NULL		}, /* 1959 */
+	{ 0,	0,	NULL,			NULL		}, /* 1960 */
+	{ 0,	0,	NULL,			NULL		}, /* 1961 */
+	{ 0,	0,	NULL,			NULL		}, /* 1962 */
+	{ 0,	0,	NULL,			NULL		}, /* 1963 */
+	{ 0,	0,	NULL,			NULL		}, /* 1964 */
+	{ 0,	0,	NULL,			NULL		}, /* 1965 */
+	{ 0,	0,	NULL,			NULL		}, /* 1966 */
+	{ 0,	0,	NULL,			NULL		}, /* 1967 */
+	{ 0,	0,	NULL,			NULL		}, /* 1968 */
+	{ 0,	0,	NULL,			NULL		}, /* 1969 */
+	{ 0,	0,	NULL,			NULL		}, /* 1970 */
+	{ 0,	0,	NULL,			NULL		}, /* 1971 */
+	{ 0,	0,	NULL,			NULL		}, /* 1972 */
+	{ 0,	0,	NULL,			NULL		}, /* 1973 */
+	{ 0,	0,	NULL,			NULL		}, /* 1974 */
+	{ 0,	0,	NULL,			NULL		}, /* 1975 */
+	{ 0,	0,	NULL,			NULL		}, /* 1976 */
+	{ 0,	0,	NULL,			NULL		}, /* 1977 */
+	{ 0,	0,	NULL,			NULL		}, /* 1978 */
+	{ 0,	0,	NULL,			NULL		}, /* 1979 */
+	{ 0,	0,	NULL,			NULL		}, /* 1980 */
+	{ 0,	0,	NULL,			NULL		}, /* 1981 */
+	{ 0,	0,	NULL,			NULL		}, /* 1982 */
+	{ 0,	0,	NULL,			NULL		}, /* 1983 */
+	{ 0,	0,	NULL,			NULL		}, /* 1984 */
+	{ 0,	0,	NULL,			NULL		}, /* 1985 */
+	{ 0,	0,	NULL,			NULL		}, /* 1986 */
+	{ 0,	0,	NULL,			NULL		}, /* 1987 */
+	{ 0,	0,	NULL,			NULL		}, /* 1988 */
+	{ 0,	0,	NULL,			NULL		}, /* 1989 */
+	{ 0,	0,	NULL,			NULL		}, /* 1990 */
+	{ 0,	0,	NULL,			NULL		}, /* 1991 */
+	{ 0,	0,	NULL,			NULL		}, /* 1992 */
+	{ 0,	0,	NULL,			NULL		}, /* 1993 */
+	{ 0,	0,	NULL,			NULL		}, /* 1994 */
+	{ 0,	0,	NULL,			NULL		}, /* 1995 */
+	{ 0,	0,	NULL,			NULL		}, /* 1996 */
+	{ 0,	0,	NULL,			NULL		}, /* 1997 */
+	{ 0,	0,	NULL,			NULL		}, /* 1998 */
+	{ 0,	0,	NULL,			NULL		}, /* 1999 */ /* end of SYSV */
 	{ 0,	0,	printargs,		"bsd43_syscall"	}, /* 2000 */ /* start of BSD 4.3 */
 	{ 0,	0,	printargs,		"bsd43_exit"	}, /* 2001 */
 	{ 0,	0,	printargs,		"bsd43_fork"	}, /* 2002 */
@@ -2049,8 +2049,8 @@
 	{ 0,	0,	printargs,		"bsd43_setgid"	}, /* 2046 */
 	{ 0,	0,	printargs,		"bsd43_getgid"	}, /* 2047 */
 	{ 0,	0,	printargs,		"bsd43_ssig"	}, /* 2048 */
-	{ 0,	0,	printargs,		"SYS_2049"	}, /* 2049 */
-	{ 0,	0,	printargs,		"SYS_2050"	}, /* 2050 */
+	{ 0,	0,	NULL,			NULL		}, /* 2049 */
+	{ 0,	0,	NULL,			NULL		}, /* 2050 */
 	{ 0,	0,	printargs,		"bsd43_sysacct"	}, /* 2051 */
 	{ 0,	0,	printargs,		"bsd43_phys"	}, /* 2052 */
 	{ 0,	0,	printargs,		"bsd43_lock"	}, /* 2053 */
@@ -2063,7 +2063,7 @@
 	{ 0,	0,	printargs,		"bsd43_umask"	}, /* 2060 */
 	{ 0,	0,	printargs,		"bsd43_chroot"	}, /* 2061 */
 	{ 0,	0,	printargs,		"bsd43_fstat"	}, /* 2062 */
-	{ 0,	0,	printargs,		"SYS_2063"	}, /* 2063 */
+	{ 0,	0,	NULL,			NULL		}, /* 2063 */
 	{ 0,	0,	printargs,		"bsd43_getpagesize"	}, /* 2064 */
 	{ 0,	0,	printargs,		"bsd43_mremap"	}, /* 2065 */
 	{ 0,	0,	printargs,		"bsd43_vfork"	}, /* 2066 */
@@ -2119,7 +2119,7 @@
 	{ 0,	0,	printargs,		"bsd43_gettimeofday"	}, /* 2116 */
 	{ 0,	0,	printargs,		"bsd43_getrusage"	}, /* 2117 */
 	{ 0,	0,	printargs,		"bsd43_getsockopt"	}, /* 2118 */
-	{ 0,	0,	printargs,		"SYS_2119"	}, /* 2119 */
+	{ 0,	0,	NULL,			NULL		}, /* 2119 */
 	{ 0,	0,	printargs,		"bsd43_readv"	}, /* 2120 */
 	{ 0,	0,	printargs,		"bsd43_writev"	}, /* 2121 */
 	{ 0,	0,	printargs,		"bsd43_settimeofday"	}, /* 2122 */
@@ -2155,8 +2155,8 @@
 	{ 0,	0,	printargs,		"bsd43_cacheflush"	}, /* 2152 */
 	{ 0,	0,	printargs,		"bsd43_cachectl"	}, /* 2153 */
 	{ 0,	0,	printargs,		"bsd43_debug"	}, /* 2154 */
-	{ 0,	0,	printargs,		"SYS_2155"	}, /* 2155 */
-	{ 0,	0,	printargs,		"SYS_2156"	}, /* 2156 */
+	{ 0,	0,	NULL,			NULL		}, /* 2155 */
+	{ 0,	0,	NULL,			NULL		}, /* 2156 */
 	{ 0,	0,	printargs,		"bsd43_nfs_mount"	}, /* 2157 */
 	{ 0,	0,	printargs,		"bsd43_nfs_svc"	}, /* 2158 */
 	{ 0,	0,	printargs,		"bsd43_getdirentries"	}, /* 2159 */
@@ -2177,8 +2177,8 @@
 	{ 0,	0,	printargs,		"bsd43_libattach"	}, /* 2174 */
 	{ 0,	0,	printargs,		"bsd43_libdetach"	}, /* 2175 */
 	{ 0,	0,	printargs,		"bsd43_accept"	}, /* 2176 */
-	{ 0,	0,	printargs,		"SYS_2177"	}, /* 2177 */
-	{ 0,	0,	printargs,		"SYS_2178"	}, /* 2178 */
+	{ 0,	0,	NULL,			NULL		}, /* 2177 */
+	{ 0,	0,	NULL,			NULL		}, /* 2178 */
 	{ 0,	0,	printargs,		"bsd43_recvmsg"	}, /* 2179 */
 	{ 0,	0,	printargs,		"bsd43_recvfrom"	}, /* 2180 */
 	{ 0,	0,	printargs,		"bsd43_sendmsg"	}, /* 2181 */
@@ -2192,814 +2192,814 @@
 	{ 0,	0,	printargs,		"bsd43_await"	}, /* 2189 */
 	{ 0,	0,	printargs,		"bsd43_areadv"	}, /* 2190 */
 	{ 0,	0,	printargs,		"bsd43_awritev"	}, /* 2191 */
-	{ 0,	0,	printargs,		"SYS_2192"	}, /* 2192 */
-	{ 0,	0,	printargs,		"SYS_2193"	}, /* 2193 */
-	{ 0,	0,	printargs,		"SYS_2194"	}, /* 2194 */
-	{ 0,	0,	printargs,		"SYS_2195"	}, /* 2195 */
-	{ 0,	0,	printargs,		"SYS_2196"	}, /* 2196 */
-	{ 0,	0,	printargs,		"SYS_2197"	}, /* 2197 */
-	{ 0,	0,	printargs,		"SYS_2198"	}, /* 2198 */
-	{ 0,	0,	printargs,		"SYS_2199"	}, /* 2199 */
-	{ 0,	0,	printargs,		"SYS_2200"	}, /* 2200 */
-	{ 0,	0,	printargs,		"SYS_2201"	}, /* 2201 */
-	{ 0,	0,	printargs,		"SYS_2202"	}, /* 2202 */
-	{ 0,	0,	printargs,		"SYS_2203"	}, /* 2203 */
-	{ 0,	0,	printargs,		"SYS_2204"	}, /* 2204 */
-	{ 0,	0,	printargs,		"SYS_2205"	}, /* 2205 */
-	{ 0,	0,	printargs,		"SYS_2206"	}, /* 2206 */
-	{ 0,	0,	printargs,		"SYS_2207"	}, /* 2207 */
-	{ 0,	0,	printargs,		"SYS_2208"	}, /* 2208 */
-	{ 0,	0,	printargs,		"SYS_2209"	}, /* 2209 */
-	{ 0,	0,	printargs,		"SYS_2210"	}, /* 2210 */
-	{ 0,	0,	printargs,		"SYS_2211"	}, /* 2211 */
-	{ 0,	0,	printargs,		"SYS_2212"	}, /* 2212 */
-	{ 0,	0,	printargs,		"SYS_2213"	}, /* 2213 */
-	{ 0,	0,	printargs,		"SYS_2214"	}, /* 2214 */
-	{ 0,	0,	printargs,		"SYS_2215"	}, /* 2215 */
-	{ 0,	0,	printargs,		"SYS_2216"	}, /* 2216 */
-	{ 0,	0,	printargs,		"SYS_2217"	}, /* 2217 */
-	{ 0,	0,	printargs,		"SYS_2218"	}, /* 2218 */
-	{ 0,	0,	printargs,		"SYS_2219"	}, /* 2219 */
-	{ 0,	0,	printargs,		"SYS_2220"	}, /* 2220 */
-	{ 0,	0,	printargs,		"SYS_2221"	}, /* 2221 */
-	{ 0,	0,	printargs,		"SYS_2222"	}, /* 2222 */
-	{ 0,	0,	printargs,		"SYS_2223"	}, /* 2223 */
-	{ 0,	0,	printargs,		"SYS_2224"	}, /* 2224 */
-	{ 0,	0,	printargs,		"SYS_2225"	}, /* 2225 */
-	{ 0,	0,	printargs,		"SYS_2226"	}, /* 2226 */
-	{ 0,	0,	printargs,		"SYS_2227"	}, /* 2227 */
-	{ 0,	0,	printargs,		"SYS_2228"	}, /* 2228 */
-	{ 0,	0,	printargs,		"SYS_2229"	}, /* 2229 */
-	{ 0,	0,	printargs,		"SYS_2230"	}, /* 2230 */
-	{ 0,	0,	printargs,		"SYS_2231"	}, /* 2231 */
-	{ 0,	0,	printargs,		"SYS_2232"	}, /* 2232 */
-	{ 0,	0,	printargs,		"SYS_2233"	}, /* 2233 */
-	{ 0,	0,	printargs,		"SYS_2234"	}, /* 2234 */
-	{ 0,	0,	printargs,		"SYS_2235"	}, /* 2235 */
-	{ 0,	0,	printargs,		"SYS_2236"	}, /* 2236 */
-	{ 0,	0,	printargs,		"SYS_2237"	}, /* 2237 */
-	{ 0,	0,	printargs,		"SYS_2238"	}, /* 2238 */
-	{ 0,	0,	printargs,		"SYS_2239"	}, /* 2239 */
-	{ 0,	0,	printargs,		"SYS_2240"	}, /* 2240 */
-	{ 0,	0,	printargs,		"SYS_2241"	}, /* 2241 */
-	{ 0,	0,	printargs,		"SYS_2242"	}, /* 2242 */
-	{ 0,	0,	printargs,		"SYS_2243"	}, /* 2243 */
-	{ 0,	0,	printargs,		"SYS_2244"	}, /* 2244 */
-	{ 0,	0,	printargs,		"SYS_2245"	}, /* 2245 */
-	{ 0,	0,	printargs,		"SYS_2246"	}, /* 2246 */
-	{ 0,	0,	printargs,		"SYS_2247"	}, /* 2247 */
-	{ 0,	0,	printargs,		"SYS_2248"	}, /* 2248 */
-	{ 0,	0,	printargs,		"SYS_2249"	}, /* 2249 */
-	{ 0,	0,	printargs,		"SYS_2250"	}, /* 2250 */
-	{ 0,	0,	printargs,		"SYS_2251"	}, /* 2251 */
-	{ 0,	0,	printargs,		"SYS_2252"	}, /* 2252 */
-	{ 0,	0,	printargs,		"SYS_2253"	}, /* 2253 */
-	{ 0,	0,	printargs,		"SYS_2254"	}, /* 2254 */
-	{ 0,	0,	printargs,		"SYS_2255"	}, /* 2255 */
-	{ 0,	0,	printargs,		"SYS_2256"	}, /* 2256 */
-	{ 0,	0,	printargs,		"SYS_2257"	}, /* 2257 */
-	{ 0,	0,	printargs,		"SYS_2258"	}, /* 2258 */
-	{ 0,	0,	printargs,		"SYS_2259"	}, /* 2259 */
-	{ 0,	0,	printargs,		"SYS_2260"	}, /* 2260 */
-	{ 0,	0,	printargs,		"SYS_2261"	}, /* 2261 */
-	{ 0,	0,	printargs,		"SYS_2262"	}, /* 2262 */
-	{ 0,	0,	printargs,		"SYS_2263"	}, /* 2263 */
-	{ 0,	0,	printargs,		"SYS_2264"	}, /* 2264 */
-	{ 0,	0,	printargs,		"SYS_2265"	}, /* 2265 */
-	{ 0,	0,	printargs,		"SYS_2266"	}, /* 2266 */
-	{ 0,	0,	printargs,		"SYS_2267"	}, /* 2267 */
-	{ 0,	0,	printargs,		"SYS_2268"	}, /* 2268 */
-	{ 0,	0,	printargs,		"SYS_2269"	}, /* 2269 */
-	{ 0,	0,	printargs,		"SYS_2270"	}, /* 2270 */
-	{ 0,	0,	printargs,		"SYS_2271"	}, /* 2271 */
-	{ 0,	0,	printargs,		"SYS_2272"	}, /* 2272 */
-	{ 0,	0,	printargs,		"SYS_2273"	}, /* 2273 */
-	{ 0,	0,	printargs,		"SYS_2274"	}, /* 2274 */
-	{ 0,	0,	printargs,		"SYS_2275"	}, /* 2275 */
-	{ 0,	0,	printargs,		"SYS_2276"	}, /* 2276 */
-	{ 0,	0,	printargs,		"SYS_2277"	}, /* 2277 */
-	{ 0,	0,	printargs,		"SYS_2278"	}, /* 2278 */
-	{ 0,	0,	printargs,		"SYS_2279"	}, /* 2279 */
-	{ 0,	0,	printargs,		"SYS_2280"	}, /* 2280 */
-	{ 0,	0,	printargs,		"SYS_2281"	}, /* 2281 */
-	{ 0,	0,	printargs,		"SYS_2282"	}, /* 2282 */
-	{ 0,	0,	printargs,		"SYS_2283"	}, /* 2283 */
-	{ 0,	0,	printargs,		"SYS_2284"	}, /* 2284 */
-	{ 0,	0,	printargs,		"SYS_2285"	}, /* 2285 */
-	{ 0,	0,	printargs,		"SYS_2286"	}, /* 2286 */
-	{ 0,	0,	printargs,		"SYS_2287"	}, /* 2287 */
-	{ 0,	0,	printargs,		"SYS_2288"	}, /* 2288 */
-	{ 0,	0,	printargs,		"SYS_2289"	}, /* 2289 */
-	{ 0,	0,	printargs,		"SYS_2290"	}, /* 2290 */
-	{ 0,	0,	printargs,		"SYS_2291"	}, /* 2291 */
-	{ 0,	0,	printargs,		"SYS_2292"	}, /* 2292 */
-	{ 0,	0,	printargs,		"SYS_2293"	}, /* 2293 */
-	{ 0,	0,	printargs,		"SYS_2294"	}, /* 2294 */
-	{ 0,	0,	printargs,		"SYS_2295"	}, /* 2295 */
-	{ 0,	0,	printargs,		"SYS_2296"	}, /* 2296 */
-	{ 0,	0,	printargs,		"SYS_2297"	}, /* 2297 */
-	{ 0,	0,	printargs,		"SYS_2298"	}, /* 2298 */
-	{ 0,	0,	printargs,		"SYS_2299"	}, /* 2299 */
-	{ 0,	0,	printargs,		"SYS_2300"	}, /* 2300 */
-	{ 0,	0,	printargs,		"SYS_2301"	}, /* 2301 */
-	{ 0,	0,	printargs,		"SYS_2302"	}, /* 2302 */
-	{ 0,	0,	printargs,		"SYS_2303"	}, /* 2303 */
-	{ 0,	0,	printargs,		"SYS_2304"	}, /* 2304 */
-	{ 0,	0,	printargs,		"SYS_2305"	}, /* 2305 */
-	{ 0,	0,	printargs,		"SYS_2306"	}, /* 2306 */
-	{ 0,	0,	printargs,		"SYS_2307"	}, /* 2307 */
-	{ 0,	0,	printargs,		"SYS_2308"	}, /* 2308 */
-	{ 0,	0,	printargs,		"SYS_2309"	}, /* 2309 */
-	{ 0,	0,	printargs,		"SYS_2310"	}, /* 2310 */
-	{ 0,	0,	printargs,		"SYS_2311"	}, /* 2311 */
-	{ 0,	0,	printargs,		"SYS_2312"	}, /* 2312 */
-	{ 0,	0,	printargs,		"SYS_2313"	}, /* 2313 */
-	{ 0,	0,	printargs,		"SYS_2314"	}, /* 2314 */
-	{ 0,	0,	printargs,		"SYS_2315"	}, /* 2315 */
-	{ 0,	0,	printargs,		"SYS_2316"	}, /* 2316 */
-	{ 0,	0,	printargs,		"SYS_2317"	}, /* 2317 */
-	{ 0,	0,	printargs,		"SYS_2318"	}, /* 2318 */
-	{ 0,	0,	printargs,		"SYS_2319"	}, /* 2319 */
-	{ 0,	0,	printargs,		"SYS_2320"	}, /* 2320 */
-	{ 0,	0,	printargs,		"SYS_2321"	}, /* 2321 */
-	{ 0,	0,	printargs,		"SYS_2322"	}, /* 2322 */
-	{ 0,	0,	printargs,		"SYS_2323"	}, /* 2323 */
-	{ 0,	0,	printargs,		"SYS_2324"	}, /* 2324 */
-	{ 0,	0,	printargs,		"SYS_2325"	}, /* 2325 */
-	{ 0,	0,	printargs,		"SYS_2326"	}, /* 2326 */
-	{ 0,	0,	printargs,		"SYS_2327"	}, /* 2327 */
-	{ 0,	0,	printargs,		"SYS_2328"	}, /* 2328 */
-	{ 0,	0,	printargs,		"SYS_2329"	}, /* 2329 */
-	{ 0,	0,	printargs,		"SYS_2330"	}, /* 2330 */
-	{ 0,	0,	printargs,		"SYS_2331"	}, /* 2331 */
-	{ 0,	0,	printargs,		"SYS_2332"	}, /* 2332 */
-	{ 0,	0,	printargs,		"SYS_2333"	}, /* 2333 */
-	{ 0,	0,	printargs,		"SYS_2334"	}, /* 2334 */
-	{ 0,	0,	printargs,		"SYS_2335"	}, /* 2335 */
-	{ 0,	0,	printargs,		"SYS_2336"	}, /* 2336 */
-	{ 0,	0,	printargs,		"SYS_2337"	}, /* 2337 */
-	{ 0,	0,	printargs,		"SYS_2338"	}, /* 2338 */
-	{ 0,	0,	printargs,		"SYS_2339"	}, /* 2339 */
-	{ 0,	0,	printargs,		"SYS_2340"	}, /* 2340 */
-	{ 0,	0,	printargs,		"SYS_2341"	}, /* 2341 */
-	{ 0,	0,	printargs,		"SYS_2342"	}, /* 2342 */
-	{ 0,	0,	printargs,		"SYS_2343"	}, /* 2343 */
-	{ 0,	0,	printargs,		"SYS_2344"	}, /* 2344 */
-	{ 0,	0,	printargs,		"SYS_2345"	}, /* 2345 */
-	{ 0,	0,	printargs,		"SYS_2346"	}, /* 2346 */
-	{ 0,	0,	printargs,		"SYS_2347"	}, /* 2347 */
-	{ 0,	0,	printargs,		"SYS_2348"	}, /* 2348 */
-	{ 0,	0,	printargs,		"SYS_2349"	}, /* 2349 */
-	{ 0,	0,	printargs,		"SYS_2350"	}, /* 2350 */
-	{ 0,	0,	printargs,		"SYS_2351"	}, /* 2351 */
-	{ 0,	0,	printargs,		"SYS_2352"	}, /* 2352 */
-	{ 0,	0,	printargs,		"SYS_2353"	}, /* 2353 */
-	{ 0,	0,	printargs,		"SYS_2354"	}, /* 2354 */
-	{ 0,	0,	printargs,		"SYS_2355"	}, /* 2355 */
-	{ 0,	0,	printargs,		"SYS_2356"	}, /* 2356 */
-	{ 0,	0,	printargs,		"SYS_2357"	}, /* 2357 */
-	{ 0,	0,	printargs,		"SYS_2358"	}, /* 2358 */
-	{ 0,	0,	printargs,		"SYS_2359"	}, /* 2359 */
-	{ 0,	0,	printargs,		"SYS_2360"	}, /* 2360 */
-	{ 0,	0,	printargs,		"SYS_2361"	}, /* 2361 */
-	{ 0,	0,	printargs,		"SYS_2362"	}, /* 2362 */
-	{ 0,	0,	printargs,		"SYS_2363"	}, /* 2363 */
-	{ 0,	0,	printargs,		"SYS_2364"	}, /* 2364 */
-	{ 0,	0,	printargs,		"SYS_2365"	}, /* 2365 */
-	{ 0,	0,	printargs,		"SYS_2366"	}, /* 2366 */
-	{ 0,	0,	printargs,		"SYS_2367"	}, /* 2367 */
-	{ 0,	0,	printargs,		"SYS_2368"	}, /* 2368 */
-	{ 0,	0,	printargs,		"SYS_2369"	}, /* 2369 */
-	{ 0,	0,	printargs,		"SYS_2370"	}, /* 2370 */
-	{ 0,	0,	printargs,		"SYS_2371"	}, /* 2371 */
-	{ 0,	0,	printargs,		"SYS_2372"	}, /* 2372 */
-	{ 0,	0,	printargs,		"SYS_2373"	}, /* 2373 */
-	{ 0,	0,	printargs,		"SYS_2374"	}, /* 2374 */
-	{ 0,	0,	printargs,		"SYS_2375"	}, /* 2375 */
-	{ 0,	0,	printargs,		"SYS_2376"	}, /* 2376 */
-	{ 0,	0,	printargs,		"SYS_2377"	}, /* 2377 */
-	{ 0,	0,	printargs,		"SYS_2378"	}, /* 2378 */
-	{ 0,	0,	printargs,		"SYS_2379"	}, /* 2379 */
-	{ 0,	0,	printargs,		"SYS_2380"	}, /* 2380 */
-	{ 0,	0,	printargs,		"SYS_2381"	}, /* 2381 */
-	{ 0,	0,	printargs,		"SYS_2382"	}, /* 2382 */
-	{ 0,	0,	printargs,		"SYS_2383"	}, /* 2383 */
-	{ 0,	0,	printargs,		"SYS_2384"	}, /* 2384 */
-	{ 0,	0,	printargs,		"SYS_2385"	}, /* 2385 */
-	{ 0,	0,	printargs,		"SYS_2386"	}, /* 2386 */
-	{ 0,	0,	printargs,		"SYS_2387"	}, /* 2387 */
-	{ 0,	0,	printargs,		"SYS_2388"	}, /* 2388 */
-	{ 0,	0,	printargs,		"SYS_2389"	}, /* 2389 */
-	{ 0,	0,	printargs,		"SYS_2390"	}, /* 2390 */
-	{ 0,	0,	printargs,		"SYS_2391"	}, /* 2391 */
-	{ 0,	0,	printargs,		"SYS_2392"	}, /* 2392 */
-	{ 0,	0,	printargs,		"SYS_2393"	}, /* 2393 */
-	{ 0,	0,	printargs,		"SYS_2394"	}, /* 2394 */
-	{ 0,	0,	printargs,		"SYS_2395"	}, /* 2395 */
-	{ 0,	0,	printargs,		"SYS_2396"	}, /* 2396 */
-	{ 0,	0,	printargs,		"SYS_2397"	}, /* 2397 */
-	{ 0,	0,	printargs,		"SYS_2398"	}, /* 2398 */
-	{ 0,	0,	printargs,		"SYS_2399"	}, /* 2399 */
-	{ 0,	0,	printargs,		"SYS_2400"	}, /* 2400 */
-	{ 0,	0,	printargs,		"SYS_2401"	}, /* 2401 */
-	{ 0,	0,	printargs,		"SYS_2402"	}, /* 2402 */
-	{ 0,	0,	printargs,		"SYS_2403"	}, /* 2403 */
-	{ 0,	0,	printargs,		"SYS_2404"	}, /* 2404 */
-	{ 0,	0,	printargs,		"SYS_2405"	}, /* 2405 */
-	{ 0,	0,	printargs,		"SYS_2406"	}, /* 2406 */
-	{ 0,	0,	printargs,		"SYS_2407"	}, /* 2407 */
-	{ 0,	0,	printargs,		"SYS_2408"	}, /* 2408 */
-	{ 0,	0,	printargs,		"SYS_2409"	}, /* 2409 */
-	{ 0,	0,	printargs,		"SYS_2410"	}, /* 2410 */
-	{ 0,	0,	printargs,		"SYS_2411"	}, /* 2411 */
-	{ 0,	0,	printargs,		"SYS_2412"	}, /* 2412 */
-	{ 0,	0,	printargs,		"SYS_2413"	}, /* 2413 */
-	{ 0,	0,	printargs,		"SYS_2414"	}, /* 2414 */
-	{ 0,	0,	printargs,		"SYS_2415"	}, /* 2415 */
-	{ 0,	0,	printargs,		"SYS_2416"	}, /* 2416 */
-	{ 0,	0,	printargs,		"SYS_2417"	}, /* 2417 */
-	{ 0,	0,	printargs,		"SYS_2418"	}, /* 2418 */
-	{ 0,	0,	printargs,		"SYS_2419"	}, /* 2419 */
-	{ 0,	0,	printargs,		"SYS_2420"	}, /* 2420 */
-	{ 0,	0,	printargs,		"SYS_2421"	}, /* 2421 */
-	{ 0,	0,	printargs,		"SYS_2422"	}, /* 2422 */
-	{ 0,	0,	printargs,		"SYS_2423"	}, /* 2423 */
-	{ 0,	0,	printargs,		"SYS_2424"	}, /* 2424 */
-	{ 0,	0,	printargs,		"SYS_2425"	}, /* 2425 */
-	{ 0,	0,	printargs,		"SYS_2426"	}, /* 2426 */
-	{ 0,	0,	printargs,		"SYS_2427"	}, /* 2427 */
-	{ 0,	0,	printargs,		"SYS_2428"	}, /* 2428 */
-	{ 0,	0,	printargs,		"SYS_2429"	}, /* 2429 */
-	{ 0,	0,	printargs,		"SYS_2430"	}, /* 2430 */
-	{ 0,	0,	printargs,		"SYS_2431"	}, /* 2431 */
-	{ 0,	0,	printargs,		"SYS_2432"	}, /* 2432 */
-	{ 0,	0,	printargs,		"SYS_2433"	}, /* 2433 */
-	{ 0,	0,	printargs,		"SYS_2434"	}, /* 2434 */
-	{ 0,	0,	printargs,		"SYS_2435"	}, /* 2435 */
-	{ 0,	0,	printargs,		"SYS_2436"	}, /* 2436 */
-	{ 0,	0,	printargs,		"SYS_2437"	}, /* 2437 */
-	{ 0,	0,	printargs,		"SYS_2438"	}, /* 2438 */
-	{ 0,	0,	printargs,		"SYS_2439"	}, /* 2439 */
-	{ 0,	0,	printargs,		"SYS_2440"	}, /* 2440 */
-	{ 0,	0,	printargs,		"SYS_2441"	}, /* 2441 */
-	{ 0,	0,	printargs,		"SYS_2442"	}, /* 2442 */
-	{ 0,	0,	printargs,		"SYS_2443"	}, /* 2443 */
-	{ 0,	0,	printargs,		"SYS_2444"	}, /* 2444 */
-	{ 0,	0,	printargs,		"SYS_2445"	}, /* 2445 */
-	{ 0,	0,	printargs,		"SYS_2446"	}, /* 2446 */
-	{ 0,	0,	printargs,		"SYS_2447"	}, /* 2447 */
-	{ 0,	0,	printargs,		"SYS_2448"	}, /* 2448 */
-	{ 0,	0,	printargs,		"SYS_2449"	}, /* 2449 */
-	{ 0,	0,	printargs,		"SYS_2450"	}, /* 2450 */
-	{ 0,	0,	printargs,		"SYS_2451"	}, /* 2451 */
-	{ 0,	0,	printargs,		"SYS_2452"	}, /* 2452 */
-	{ 0,	0,	printargs,		"SYS_2453"	}, /* 2453 */
-	{ 0,	0,	printargs,		"SYS_2454"	}, /* 2454 */
-	{ 0,	0,	printargs,		"SYS_2455"	}, /* 2455 */
-	{ 0,	0,	printargs,		"SYS_2456"	}, /* 2456 */
-	{ 0,	0,	printargs,		"SYS_2457"	}, /* 2457 */
-	{ 0,	0,	printargs,		"SYS_2458"	}, /* 2458 */
-	{ 0,	0,	printargs,		"SYS_2459"	}, /* 2459 */
-	{ 0,	0,	printargs,		"SYS_2460"	}, /* 2460 */
-	{ 0,	0,	printargs,		"SYS_2461"	}, /* 2461 */
-	{ 0,	0,	printargs,		"SYS_2462"	}, /* 2462 */
-	{ 0,	0,	printargs,		"SYS_2463"	}, /* 2463 */
-	{ 0,	0,	printargs,		"SYS_2464"	}, /* 2464 */
-	{ 0,	0,	printargs,		"SYS_2465"	}, /* 2465 */
-	{ 0,	0,	printargs,		"SYS_2466"	}, /* 2466 */
-	{ 0,	0,	printargs,		"SYS_2467"	}, /* 2467 */
-	{ 0,	0,	printargs,		"SYS_2468"	}, /* 2468 */
-	{ 0,	0,	printargs,		"SYS_2469"	}, /* 2469 */
-	{ 0,	0,	printargs,		"SYS_2470"	}, /* 2470 */
-	{ 0,	0,	printargs,		"SYS_2471"	}, /* 2471 */
-	{ 0,	0,	printargs,		"SYS_2472"	}, /* 2472 */
-	{ 0,	0,	printargs,		"SYS_2473"	}, /* 2473 */
-	{ 0,	0,	printargs,		"SYS_2474"	}, /* 2474 */
-	{ 0,	0,	printargs,		"SYS_2475"	}, /* 2475 */
-	{ 0,	0,	printargs,		"SYS_2476"	}, /* 2476 */
-	{ 0,	0,	printargs,		"SYS_2477"	}, /* 2477 */
-	{ 0,	0,	printargs,		"SYS_2478"	}, /* 2478 */
-	{ 0,	0,	printargs,		"SYS_2479"	}, /* 2479 */
-	{ 0,	0,	printargs,		"SYS_2480"	}, /* 2480 */
-	{ 0,	0,	printargs,		"SYS_2481"	}, /* 2481 */
-	{ 0,	0,	printargs,		"SYS_2482"	}, /* 2482 */
-	{ 0,	0,	printargs,		"SYS_2483"	}, /* 2483 */
-	{ 0,	0,	printargs,		"SYS_2484"	}, /* 2484 */
-	{ 0,	0,	printargs,		"SYS_2485"	}, /* 2485 */
-	{ 0,	0,	printargs,		"SYS_2486"	}, /* 2486 */
-	{ 0,	0,	printargs,		"SYS_2487"	}, /* 2487 */
-	{ 0,	0,	printargs,		"SYS_2488"	}, /* 2488 */
-	{ 0,	0,	printargs,		"SYS_2489"	}, /* 2489 */
-	{ 0,	0,	printargs,		"SYS_2490"	}, /* 2490 */
-	{ 0,	0,	printargs,		"SYS_2491"	}, /* 2491 */
-	{ 0,	0,	printargs,		"SYS_2492"	}, /* 2492 */
-	{ 0,	0,	printargs,		"SYS_2493"	}, /* 2493 */
-	{ 0,	0,	printargs,		"SYS_2494"	}, /* 2494 */
-	{ 0,	0,	printargs,		"SYS_2495"	}, /* 2495 */
-	{ 0,	0,	printargs,		"SYS_2496"	}, /* 2496 */
-	{ 0,	0,	printargs,		"SYS_2497"	}, /* 2497 */
-	{ 0,	0,	printargs,		"SYS_2498"	}, /* 2498 */
-	{ 0,	0,	printargs,		"SYS_2499"	}, /* 2499 */
-	{ 0,	0,	printargs,		"SYS_2500"	}, /* 2500 */
-	{ 0,	0,	printargs,		"SYS_2501"	}, /* 2501 */
-	{ 0,	0,	printargs,		"SYS_2502"	}, /* 2502 */
-	{ 0,	0,	printargs,		"SYS_2503"	}, /* 2503 */
-	{ 0,	0,	printargs,		"SYS_2504"	}, /* 2504 */
-	{ 0,	0,	printargs,		"SYS_2505"	}, /* 2505 */
-	{ 0,	0,	printargs,		"SYS_2506"	}, /* 2506 */
-	{ 0,	0,	printargs,		"SYS_2507"	}, /* 2507 */
-	{ 0,	0,	printargs,		"SYS_2508"	}, /* 2508 */
-	{ 0,	0,	printargs,		"SYS_2509"	}, /* 2509 */
-	{ 0,	0,	printargs,		"SYS_2510"	}, /* 2510 */
-	{ 0,	0,	printargs,		"SYS_2511"	}, /* 2511 */
-	{ 0,	0,	printargs,		"SYS_2512"	}, /* 2512 */
-	{ 0,	0,	printargs,		"SYS_2513"	}, /* 2513 */
-	{ 0,	0,	printargs,		"SYS_2514"	}, /* 2514 */
-	{ 0,	0,	printargs,		"SYS_2515"	}, /* 2515 */
-	{ 0,	0,	printargs,		"SYS_2516"	}, /* 2516 */
-	{ 0,	0,	printargs,		"SYS_2517"	}, /* 2517 */
-	{ 0,	0,	printargs,		"SYS_2518"	}, /* 2518 */
-	{ 0,	0,	printargs,		"SYS_2519"	}, /* 2519 */
-	{ 0,	0,	printargs,		"SYS_2520"	}, /* 2520 */
-	{ 0,	0,	printargs,		"SYS_2521"	}, /* 2521 */
-	{ 0,	0,	printargs,		"SYS_2522"	}, /* 2522 */
-	{ 0,	0,	printargs,		"SYS_2523"	}, /* 2523 */
-	{ 0,	0,	printargs,		"SYS_2524"	}, /* 2524 */
-	{ 0,	0,	printargs,		"SYS_2525"	}, /* 2525 */
-	{ 0,	0,	printargs,		"SYS_2526"	}, /* 2526 */
-	{ 0,	0,	printargs,		"SYS_2527"	}, /* 2527 */
-	{ 0,	0,	printargs,		"SYS_2528"	}, /* 2528 */
-	{ 0,	0,	printargs,		"SYS_2529"	}, /* 2529 */
-	{ 0,	0,	printargs,		"SYS_2530"	}, /* 2530 */
-	{ 0,	0,	printargs,		"SYS_2531"	}, /* 2531 */
-	{ 0,	0,	printargs,		"SYS_2532"	}, /* 2532 */
-	{ 0,	0,	printargs,		"SYS_2533"	}, /* 2533 */
-	{ 0,	0,	printargs,		"SYS_2534"	}, /* 2534 */
-	{ 0,	0,	printargs,		"SYS_2535"	}, /* 2535 */
-	{ 0,	0,	printargs,		"SYS_2536"	}, /* 2536 */
-	{ 0,	0,	printargs,		"SYS_2537"	}, /* 2537 */
-	{ 0,	0,	printargs,		"SYS_2538"	}, /* 2538 */
-	{ 0,	0,	printargs,		"SYS_2539"	}, /* 2539 */
-	{ 0,	0,	printargs,		"SYS_2540"	}, /* 2540 */
-	{ 0,	0,	printargs,		"SYS_2541"	}, /* 2541 */
-	{ 0,	0,	printargs,		"SYS_2542"	}, /* 2542 */
-	{ 0,	0,	printargs,		"SYS_2543"	}, /* 2543 */
-	{ 0,	0,	printargs,		"SYS_2544"	}, /* 2544 */
-	{ 0,	0,	printargs,		"SYS_2545"	}, /* 2545 */
-	{ 0,	0,	printargs,		"SYS_2546"	}, /* 2546 */
-	{ 0,	0,	printargs,		"SYS_2547"	}, /* 2547 */
-	{ 0,	0,	printargs,		"SYS_2548"	}, /* 2548 */
-	{ 0,	0,	printargs,		"SYS_2549"	}, /* 2549 */
-	{ 0,	0,	printargs,		"SYS_2550"	}, /* 2550 */
-	{ 0,	0,	printargs,		"SYS_2551"	}, /* 2551 */
-	{ 0,	0,	printargs,		"SYS_2552"	}, /* 2552 */
-	{ 0,	0,	printargs,		"SYS_2553"	}, /* 2553 */
-	{ 0,	0,	printargs,		"SYS_2554"	}, /* 2554 */
-	{ 0,	0,	printargs,		"SYS_2555"	}, /* 2555 */
-	{ 0,	0,	printargs,		"SYS_2556"	}, /* 2556 */
-	{ 0,	0,	printargs,		"SYS_2557"	}, /* 2557 */
-	{ 0,	0,	printargs,		"SYS_2558"	}, /* 2558 */
-	{ 0,	0,	printargs,		"SYS_2559"	}, /* 2559 */
-	{ 0,	0,	printargs,		"SYS_2560"	}, /* 2560 */
-	{ 0,	0,	printargs,		"SYS_2561"	}, /* 2561 */
-	{ 0,	0,	printargs,		"SYS_2562"	}, /* 2562 */
-	{ 0,	0,	printargs,		"SYS_2563"	}, /* 2563 */
-	{ 0,	0,	printargs,		"SYS_2564"	}, /* 2564 */
-	{ 0,	0,	printargs,		"SYS_2565"	}, /* 2565 */
-	{ 0,	0,	printargs,		"SYS_2566"	}, /* 2566 */
-	{ 0,	0,	printargs,		"SYS_2567"	}, /* 2567 */
-	{ 0,	0,	printargs,		"SYS_2568"	}, /* 2568 */
-	{ 0,	0,	printargs,		"SYS_2569"	}, /* 2569 */
-	{ 0,	0,	printargs,		"SYS_2570"	}, /* 2570 */
-	{ 0,	0,	printargs,		"SYS_2571"	}, /* 2571 */
-	{ 0,	0,	printargs,		"SYS_2572"	}, /* 2572 */
-	{ 0,	0,	printargs,		"SYS_2573"	}, /* 2573 */
-	{ 0,	0,	printargs,		"SYS_2574"	}, /* 2574 */
-	{ 0,	0,	printargs,		"SYS_2575"	}, /* 2575 */
-	{ 0,	0,	printargs,		"SYS_2576"	}, /* 2576 */
-	{ 0,	0,	printargs,		"SYS_2577"	}, /* 2577 */
-	{ 0,	0,	printargs,		"SYS_2578"	}, /* 2578 */
-	{ 0,	0,	printargs,		"SYS_2579"	}, /* 2579 */
-	{ 0,	0,	printargs,		"SYS_2580"	}, /* 2580 */
-	{ 0,	0,	printargs,		"SYS_2581"	}, /* 2581 */
-	{ 0,	0,	printargs,		"SYS_2582"	}, /* 2582 */
-	{ 0,	0,	printargs,		"SYS_2583"	}, /* 2583 */
-	{ 0,	0,	printargs,		"SYS_2584"	}, /* 2584 */
-	{ 0,	0,	printargs,		"SYS_2585"	}, /* 2585 */
-	{ 0,	0,	printargs,		"SYS_2586"	}, /* 2586 */
-	{ 0,	0,	printargs,		"SYS_2587"	}, /* 2587 */
-	{ 0,	0,	printargs,		"SYS_2588"	}, /* 2588 */
-	{ 0,	0,	printargs,		"SYS_2589"	}, /* 2589 */
-	{ 0,	0,	printargs,		"SYS_2590"	}, /* 2590 */
-	{ 0,	0,	printargs,		"SYS_2591"	}, /* 2591 */
-	{ 0,	0,	printargs,		"SYS_2592"	}, /* 2592 */
-	{ 0,	0,	printargs,		"SYS_2593"	}, /* 2593 */
-	{ 0,	0,	printargs,		"SYS_2594"	}, /* 2594 */
-	{ 0,	0,	printargs,		"SYS_2595"	}, /* 2595 */
-	{ 0,	0,	printargs,		"SYS_2596"	}, /* 2596 */
-	{ 0,	0,	printargs,		"SYS_2597"	}, /* 2597 */
-	{ 0,	0,	printargs,		"SYS_2598"	}, /* 2598 */
-	{ 0,	0,	printargs,		"SYS_2599"	}, /* 2599 */
-	{ 0,	0,	printargs,		"SYS_2600"	}, /* 2600 */
-	{ 0,	0,	printargs,		"SYS_2601"	}, /* 2601 */
-	{ 0,	0,	printargs,		"SYS_2602"	}, /* 2602 */
-	{ 0,	0,	printargs,		"SYS_2603"	}, /* 2603 */
-	{ 0,	0,	printargs,		"SYS_2604"	}, /* 2604 */
-	{ 0,	0,	printargs,		"SYS_2605"	}, /* 2605 */
-	{ 0,	0,	printargs,		"SYS_2606"	}, /* 2606 */
-	{ 0,	0,	printargs,		"SYS_2607"	}, /* 2607 */
-	{ 0,	0,	printargs,		"SYS_2608"	}, /* 2608 */
-	{ 0,	0,	printargs,		"SYS_2609"	}, /* 2609 */
-	{ 0,	0,	printargs,		"SYS_2610"	}, /* 2610 */
-	{ 0,	0,	printargs,		"SYS_2611"	}, /* 2611 */
-	{ 0,	0,	printargs,		"SYS_2612"	}, /* 2612 */
-	{ 0,	0,	printargs,		"SYS_2613"	}, /* 2613 */
-	{ 0,	0,	printargs,		"SYS_2614"	}, /* 2614 */
-	{ 0,	0,	printargs,		"SYS_2615"	}, /* 2615 */
-	{ 0,	0,	printargs,		"SYS_2616"	}, /* 2616 */
-	{ 0,	0,	printargs,		"SYS_2617"	}, /* 2617 */
-	{ 0,	0,	printargs,		"SYS_2618"	}, /* 2618 */
-	{ 0,	0,	printargs,		"SYS_2619"	}, /* 2619 */
-	{ 0,	0,	printargs,		"SYS_2620"	}, /* 2620 */
-	{ 0,	0,	printargs,		"SYS_2621"	}, /* 2621 */
-	{ 0,	0,	printargs,		"SYS_2622"	}, /* 2622 */
-	{ 0,	0,	printargs,		"SYS_2623"	}, /* 2623 */
-	{ 0,	0,	printargs,		"SYS_2624"	}, /* 2624 */
-	{ 0,	0,	printargs,		"SYS_2625"	}, /* 2625 */
-	{ 0,	0,	printargs,		"SYS_2626"	}, /* 2626 */
-	{ 0,	0,	printargs,		"SYS_2627"	}, /* 2627 */
-	{ 0,	0,	printargs,		"SYS_2628"	}, /* 2628 */
-	{ 0,	0,	printargs,		"SYS_2629"	}, /* 2629 */
-	{ 0,	0,	printargs,		"SYS_2630"	}, /* 2630 */
-	{ 0,	0,	printargs,		"SYS_2631"	}, /* 2631 */
-	{ 0,	0,	printargs,		"SYS_2632"	}, /* 2632 */
-	{ 0,	0,	printargs,		"SYS_2633"	}, /* 2633 */
-	{ 0,	0,	printargs,		"SYS_2634"	}, /* 2634 */
-	{ 0,	0,	printargs,		"SYS_2635"	}, /* 2635 */
-	{ 0,	0,	printargs,		"SYS_2636"	}, /* 2636 */
-	{ 0,	0,	printargs,		"SYS_2637"	}, /* 2637 */
-	{ 0,	0,	printargs,		"SYS_2638"	}, /* 2638 */
-	{ 0,	0,	printargs,		"SYS_2639"	}, /* 2639 */
-	{ 0,	0,	printargs,		"SYS_2640"	}, /* 2640 */
-	{ 0,	0,	printargs,		"SYS_2641"	}, /* 2641 */
-	{ 0,	0,	printargs,		"SYS_2642"	}, /* 2642 */
-	{ 0,	0,	printargs,		"SYS_2643"	}, /* 2643 */
-	{ 0,	0,	printargs,		"SYS_2644"	}, /* 2644 */
-	{ 0,	0,	printargs,		"SYS_2645"	}, /* 2645 */
-	{ 0,	0,	printargs,		"SYS_2646"	}, /* 2646 */
-	{ 0,	0,	printargs,		"SYS_2647"	}, /* 2647 */
-	{ 0,	0,	printargs,		"SYS_2648"	}, /* 2648 */
-	{ 0,	0,	printargs,		"SYS_2649"	}, /* 2649 */
-	{ 0,	0,	printargs,		"SYS_2650"	}, /* 2650 */
-	{ 0,	0,	printargs,		"SYS_2651"	}, /* 2651 */
-	{ 0,	0,	printargs,		"SYS_2652"	}, /* 2652 */
-	{ 0,	0,	printargs,		"SYS_2653"	}, /* 2653 */
-	{ 0,	0,	printargs,		"SYS_2654"	}, /* 2654 */
-	{ 0,	0,	printargs,		"SYS_2655"	}, /* 2655 */
-	{ 0,	0,	printargs,		"SYS_2656"	}, /* 2656 */
-	{ 0,	0,	printargs,		"SYS_2657"	}, /* 2657 */
-	{ 0,	0,	printargs,		"SYS_2658"	}, /* 2658 */
-	{ 0,	0,	printargs,		"SYS_2659"	}, /* 2659 */
-	{ 0,	0,	printargs,		"SYS_2660"	}, /* 2660 */
-	{ 0,	0,	printargs,		"SYS_2661"	}, /* 2661 */
-	{ 0,	0,	printargs,		"SYS_2662"	}, /* 2662 */
-	{ 0,	0,	printargs,		"SYS_2663"	}, /* 2663 */
-	{ 0,	0,	printargs,		"SYS_2664"	}, /* 2664 */
-	{ 0,	0,	printargs,		"SYS_2665"	}, /* 2665 */
-	{ 0,	0,	printargs,		"SYS_2666"	}, /* 2666 */
-	{ 0,	0,	printargs,		"SYS_2667"	}, /* 2667 */
-	{ 0,	0,	printargs,		"SYS_2668"	}, /* 2668 */
-	{ 0,	0,	printargs,		"SYS_2669"	}, /* 2669 */
-	{ 0,	0,	printargs,		"SYS_2670"	}, /* 2670 */
-	{ 0,	0,	printargs,		"SYS_2671"	}, /* 2671 */
-	{ 0,	0,	printargs,		"SYS_2672"	}, /* 2672 */
-	{ 0,	0,	printargs,		"SYS_2673"	}, /* 2673 */
-	{ 0,	0,	printargs,		"SYS_2674"	}, /* 2674 */
-	{ 0,	0,	printargs,		"SYS_2675"	}, /* 2675 */
-	{ 0,	0,	printargs,		"SYS_2676"	}, /* 2676 */
-	{ 0,	0,	printargs,		"SYS_2677"	}, /* 2677 */
-	{ 0,	0,	printargs,		"SYS_2678"	}, /* 2678 */
-	{ 0,	0,	printargs,		"SYS_2679"	}, /* 2679 */
-	{ 0,	0,	printargs,		"SYS_2680"	}, /* 2680 */
-	{ 0,	0,	printargs,		"SYS_2681"	}, /* 2681 */
-	{ 0,	0,	printargs,		"SYS_2682"	}, /* 2682 */
-	{ 0,	0,	printargs,		"SYS_2683"	}, /* 2683 */
-	{ 0,	0,	printargs,		"SYS_2684"	}, /* 2684 */
-	{ 0,	0,	printargs,		"SYS_2685"	}, /* 2685 */
-	{ 0,	0,	printargs,		"SYS_2686"	}, /* 2686 */
-	{ 0,	0,	printargs,		"SYS_2687"	}, /* 2687 */
-	{ 0,	0,	printargs,		"SYS_2688"	}, /* 2688 */
-	{ 0,	0,	printargs,		"SYS_2689"	}, /* 2689 */
-	{ 0,	0,	printargs,		"SYS_2690"	}, /* 2690 */
-	{ 0,	0,	printargs,		"SYS_2691"	}, /* 2691 */
-	{ 0,	0,	printargs,		"SYS_2692"	}, /* 2692 */
-	{ 0,	0,	printargs,		"SYS_2693"	}, /* 2693 */
-	{ 0,	0,	printargs,		"SYS_2694"	}, /* 2694 */
-	{ 0,	0,	printargs,		"SYS_2695"	}, /* 2695 */
-	{ 0,	0,	printargs,		"SYS_2696"	}, /* 2696 */
-	{ 0,	0,	printargs,		"SYS_2697"	}, /* 2697 */
-	{ 0,	0,	printargs,		"SYS_2698"	}, /* 2698 */
-	{ 0,	0,	printargs,		"SYS_2699"	}, /* 2699 */
-	{ 0,	0,	printargs,		"SYS_2700"	}, /* 2700 */
-	{ 0,	0,	printargs,		"SYS_2701"	}, /* 2701 */
-	{ 0,	0,	printargs,		"SYS_2702"	}, /* 2702 */
-	{ 0,	0,	printargs,		"SYS_2703"	}, /* 2703 */
-	{ 0,	0,	printargs,		"SYS_2704"	}, /* 2704 */
-	{ 0,	0,	printargs,		"SYS_2705"	}, /* 2705 */
-	{ 0,	0,	printargs,		"SYS_2706"	}, /* 2706 */
-	{ 0,	0,	printargs,		"SYS_2707"	}, /* 2707 */
-	{ 0,	0,	printargs,		"SYS_2708"	}, /* 2708 */
-	{ 0,	0,	printargs,		"SYS_2709"	}, /* 2709 */
-	{ 0,	0,	printargs,		"SYS_2710"	}, /* 2710 */
-	{ 0,	0,	printargs,		"SYS_2711"	}, /* 2711 */
-	{ 0,	0,	printargs,		"SYS_2712"	}, /* 2712 */
-	{ 0,	0,	printargs,		"SYS_2713"	}, /* 2713 */
-	{ 0,	0,	printargs,		"SYS_2714"	}, /* 2714 */
-	{ 0,	0,	printargs,		"SYS_2715"	}, /* 2715 */
-	{ 0,	0,	printargs,		"SYS_2716"	}, /* 2716 */
-	{ 0,	0,	printargs,		"SYS_2717"	}, /* 2717 */
-	{ 0,	0,	printargs,		"SYS_2718"	}, /* 2718 */
-	{ 0,	0,	printargs,		"SYS_2719"	}, /* 2719 */
-	{ 0,	0,	printargs,		"SYS_2720"	}, /* 2720 */
-	{ 0,	0,	printargs,		"SYS_2721"	}, /* 2721 */
-	{ 0,	0,	printargs,		"SYS_2722"	}, /* 2722 */
-	{ 0,	0,	printargs,		"SYS_2723"	}, /* 2723 */
-	{ 0,	0,	printargs,		"SYS_2724"	}, /* 2724 */
-	{ 0,	0,	printargs,		"SYS_2725"	}, /* 2725 */
-	{ 0,	0,	printargs,		"SYS_2726"	}, /* 2726 */
-	{ 0,	0,	printargs,		"SYS_2727"	}, /* 2727 */
-	{ 0,	0,	printargs,		"SYS_2728"	}, /* 2728 */
-	{ 0,	0,	printargs,		"SYS_2729"	}, /* 2729 */
-	{ 0,	0,	printargs,		"SYS_2730"	}, /* 2730 */
-	{ 0,	0,	printargs,		"SYS_2731"	}, /* 2731 */
-	{ 0,	0,	printargs,		"SYS_2732"	}, /* 2732 */
-	{ 0,	0,	printargs,		"SYS_2733"	}, /* 2733 */
-	{ 0,	0,	printargs,		"SYS_2734"	}, /* 2734 */
-	{ 0,	0,	printargs,		"SYS_2735"	}, /* 2735 */
-	{ 0,	0,	printargs,		"SYS_2736"	}, /* 2736 */
-	{ 0,	0,	printargs,		"SYS_2737"	}, /* 2737 */
-	{ 0,	0,	printargs,		"SYS_2738"	}, /* 2738 */
-	{ 0,	0,	printargs,		"SYS_2739"	}, /* 2739 */
-	{ 0,	0,	printargs,		"SYS_2740"	}, /* 2740 */
-	{ 0,	0,	printargs,		"SYS_2741"	}, /* 2741 */
-	{ 0,	0,	printargs,		"SYS_2742"	}, /* 2742 */
-	{ 0,	0,	printargs,		"SYS_2743"	}, /* 2743 */
-	{ 0,	0,	printargs,		"SYS_2744"	}, /* 2744 */
-	{ 0,	0,	printargs,		"SYS_2745"	}, /* 2745 */
-	{ 0,	0,	printargs,		"SYS_2746"	}, /* 2746 */
-	{ 0,	0,	printargs,		"SYS_2747"	}, /* 2747 */
-	{ 0,	0,	printargs,		"SYS_2748"	}, /* 2748 */
-	{ 0,	0,	printargs,		"SYS_2749"	}, /* 2749 */
-	{ 0,	0,	printargs,		"SYS_2750"	}, /* 2750 */
-	{ 0,	0,	printargs,		"SYS_2751"	}, /* 2751 */
-	{ 0,	0,	printargs,		"SYS_2752"	}, /* 2752 */
-	{ 0,	0,	printargs,		"SYS_2753"	}, /* 2753 */
-	{ 0,	0,	printargs,		"SYS_2754"	}, /* 2754 */
-	{ 0,	0,	printargs,		"SYS_2755"	}, /* 2755 */
-	{ 0,	0,	printargs,		"SYS_2756"	}, /* 2756 */
-	{ 0,	0,	printargs,		"SYS_2757"	}, /* 2757 */
-	{ 0,	0,	printargs,		"SYS_2758"	}, /* 2758 */
-	{ 0,	0,	printargs,		"SYS_2759"	}, /* 2759 */
-	{ 0,	0,	printargs,		"SYS_2760"	}, /* 2760 */
-	{ 0,	0,	printargs,		"SYS_2761"	}, /* 2761 */
-	{ 0,	0,	printargs,		"SYS_2762"	}, /* 2762 */
-	{ 0,	0,	printargs,		"SYS_2763"	}, /* 2763 */
-	{ 0,	0,	printargs,		"SYS_2764"	}, /* 2764 */
-	{ 0,	0,	printargs,		"SYS_2765"	}, /* 2765 */
-	{ 0,	0,	printargs,		"SYS_2766"	}, /* 2766 */
-	{ 0,	0,	printargs,		"SYS_2767"	}, /* 2767 */
-	{ 0,	0,	printargs,		"SYS_2768"	}, /* 2768 */
-	{ 0,	0,	printargs,		"SYS_2769"	}, /* 2769 */
-	{ 0,	0,	printargs,		"SYS_2770"	}, /* 2770 */
-	{ 0,	0,	printargs,		"SYS_2771"	}, /* 2771 */
-	{ 0,	0,	printargs,		"SYS_2772"	}, /* 2772 */
-	{ 0,	0,	printargs,		"SYS_2773"	}, /* 2773 */
-	{ 0,	0,	printargs,		"SYS_2774"	}, /* 2774 */
-	{ 0,	0,	printargs,		"SYS_2775"	}, /* 2775 */
-	{ 0,	0,	printargs,		"SYS_2776"	}, /* 2776 */
-	{ 0,	0,	printargs,		"SYS_2777"	}, /* 2777 */
-	{ 0,	0,	printargs,		"SYS_2778"	}, /* 2778 */
-	{ 0,	0,	printargs,		"SYS_2779"	}, /* 2779 */
-	{ 0,	0,	printargs,		"SYS_2780"	}, /* 2780 */
-	{ 0,	0,	printargs,		"SYS_2781"	}, /* 2781 */
-	{ 0,	0,	printargs,		"SYS_2782"	}, /* 2782 */
-	{ 0,	0,	printargs,		"SYS_2783"	}, /* 2783 */
-	{ 0,	0,	printargs,		"SYS_2784"	}, /* 2784 */
-	{ 0,	0,	printargs,		"SYS_2785"	}, /* 2785 */
-	{ 0,	0,	printargs,		"SYS_2786"	}, /* 2786 */
-	{ 0,	0,	printargs,		"SYS_2787"	}, /* 2787 */
-	{ 0,	0,	printargs,		"SYS_2788"	}, /* 2788 */
-	{ 0,	0,	printargs,		"SYS_2789"	}, /* 2789 */
-	{ 0,	0,	printargs,		"SYS_2790"	}, /* 2790 */
-	{ 0,	0,	printargs,		"SYS_2791"	}, /* 2791 */
-	{ 0,	0,	printargs,		"SYS_2792"	}, /* 2792 */
-	{ 0,	0,	printargs,		"SYS_2793"	}, /* 2793 */
-	{ 0,	0,	printargs,		"SYS_2794"	}, /* 2794 */
-	{ 0,	0,	printargs,		"SYS_2795"	}, /* 2795 */
-	{ 0,	0,	printargs,		"SYS_2796"	}, /* 2796 */
-	{ 0,	0,	printargs,		"SYS_2797"	}, /* 2797 */
-	{ 0,	0,	printargs,		"SYS_2798"	}, /* 2798 */
-	{ 0,	0,	printargs,		"SYS_2799"	}, /* 2799 */
-	{ 0,	0,	printargs,		"SYS_2800"	}, /* 2800 */
-	{ 0,	0,	printargs,		"SYS_2801"	}, /* 2801 */
-	{ 0,	0,	printargs,		"SYS_2802"	}, /* 2802 */
-	{ 0,	0,	printargs,		"SYS_2803"	}, /* 2803 */
-	{ 0,	0,	printargs,		"SYS_2804"	}, /* 2804 */
-	{ 0,	0,	printargs,		"SYS_2805"	}, /* 2805 */
-	{ 0,	0,	printargs,		"SYS_2806"	}, /* 2806 */
-	{ 0,	0,	printargs,		"SYS_2807"	}, /* 2807 */
-	{ 0,	0,	printargs,		"SYS_2808"	}, /* 2808 */
-	{ 0,	0,	printargs,		"SYS_2809"	}, /* 2809 */
-	{ 0,	0,	printargs,		"SYS_2810"	}, /* 2810 */
-	{ 0,	0,	printargs,		"SYS_2811"	}, /* 2811 */
-	{ 0,	0,	printargs,		"SYS_2812"	}, /* 2812 */
-	{ 0,	0,	printargs,		"SYS_2813"	}, /* 2813 */
-	{ 0,	0,	printargs,		"SYS_2814"	}, /* 2814 */
-	{ 0,	0,	printargs,		"SYS_2815"	}, /* 2815 */
-	{ 0,	0,	printargs,		"SYS_2816"	}, /* 2816 */
-	{ 0,	0,	printargs,		"SYS_2817"	}, /* 2817 */
-	{ 0,	0,	printargs,		"SYS_2818"	}, /* 2818 */
-	{ 0,	0,	printargs,		"SYS_2819"	}, /* 2819 */
-	{ 0,	0,	printargs,		"SYS_2820"	}, /* 2820 */
-	{ 0,	0,	printargs,		"SYS_2821"	}, /* 2821 */
-	{ 0,	0,	printargs,		"SYS_2822"	}, /* 2822 */
-	{ 0,	0,	printargs,		"SYS_2823"	}, /* 2823 */
-	{ 0,	0,	printargs,		"SYS_2824"	}, /* 2824 */
-	{ 0,	0,	printargs,		"SYS_2825"	}, /* 2825 */
-	{ 0,	0,	printargs,		"SYS_2826"	}, /* 2826 */
-	{ 0,	0,	printargs,		"SYS_2827"	}, /* 2827 */
-	{ 0,	0,	printargs,		"SYS_2828"	}, /* 2828 */
-	{ 0,	0,	printargs,		"SYS_2829"	}, /* 2829 */
-	{ 0,	0,	printargs,		"SYS_2830"	}, /* 2830 */
-	{ 0,	0,	printargs,		"SYS_2831"	}, /* 2831 */
-	{ 0,	0,	printargs,		"SYS_2832"	}, /* 2832 */
-	{ 0,	0,	printargs,		"SYS_2833"	}, /* 2833 */
-	{ 0,	0,	printargs,		"SYS_2834"	}, /* 2834 */
-	{ 0,	0,	printargs,		"SYS_2835"	}, /* 2835 */
-	{ 0,	0,	printargs,		"SYS_2836"	}, /* 2836 */
-	{ 0,	0,	printargs,		"SYS_2837"	}, /* 2837 */
-	{ 0,	0,	printargs,		"SYS_2838"	}, /* 2838 */
-	{ 0,	0,	printargs,		"SYS_2839"	}, /* 2839 */
-	{ 0,	0,	printargs,		"SYS_2840"	}, /* 2840 */
-	{ 0,	0,	printargs,		"SYS_2841"	}, /* 2841 */
-	{ 0,	0,	printargs,		"SYS_2842"	}, /* 2842 */
-	{ 0,	0,	printargs,		"SYS_2843"	}, /* 2843 */
-	{ 0,	0,	printargs,		"SYS_2844"	}, /* 2844 */
-	{ 0,	0,	printargs,		"SYS_2845"	}, /* 2845 */
-	{ 0,	0,	printargs,		"SYS_2846"	}, /* 2846 */
-	{ 0,	0,	printargs,		"SYS_2847"	}, /* 2847 */
-	{ 0,	0,	printargs,		"SYS_2848"	}, /* 2848 */
-	{ 0,	0,	printargs,		"SYS_2849"	}, /* 2849 */
-	{ 0,	0,	printargs,		"SYS_2850"	}, /* 2850 */
-	{ 0,	0,	printargs,		"SYS_2851"	}, /* 2851 */
-	{ 0,	0,	printargs,		"SYS_2852"	}, /* 2852 */
-	{ 0,	0,	printargs,		"SYS_2853"	}, /* 2853 */
-	{ 0,	0,	printargs,		"SYS_2854"	}, /* 2854 */
-	{ 0,	0,	printargs,		"SYS_2855"	}, /* 2855 */
-	{ 0,	0,	printargs,		"SYS_2856"	}, /* 2856 */
-	{ 0,	0,	printargs,		"SYS_2857"	}, /* 2857 */
-	{ 0,	0,	printargs,		"SYS_2858"	}, /* 2858 */
-	{ 0,	0,	printargs,		"SYS_2859"	}, /* 2859 */
-	{ 0,	0,	printargs,		"SYS_2860"	}, /* 2860 */
-	{ 0,	0,	printargs,		"SYS_2861"	}, /* 2861 */
-	{ 0,	0,	printargs,		"SYS_2862"	}, /* 2862 */
-	{ 0,	0,	printargs,		"SYS_2863"	}, /* 2863 */
-	{ 0,	0,	printargs,		"SYS_2864"	}, /* 2864 */
-	{ 0,	0,	printargs,		"SYS_2865"	}, /* 2865 */
-	{ 0,	0,	printargs,		"SYS_2866"	}, /* 2866 */
-	{ 0,	0,	printargs,		"SYS_2867"	}, /* 2867 */
-	{ 0,	0,	printargs,		"SYS_2868"	}, /* 2868 */
-	{ 0,	0,	printargs,		"SYS_2869"	}, /* 2869 */
-	{ 0,	0,	printargs,		"SYS_2870"	}, /* 2870 */
-	{ 0,	0,	printargs,		"SYS_2871"	}, /* 2871 */
-	{ 0,	0,	printargs,		"SYS_2872"	}, /* 2872 */
-	{ 0,	0,	printargs,		"SYS_2873"	}, /* 2873 */
-	{ 0,	0,	printargs,		"SYS_2874"	}, /* 2874 */
-	{ 0,	0,	printargs,		"SYS_2875"	}, /* 2875 */
-	{ 0,	0,	printargs,		"SYS_2876"	}, /* 2876 */
-	{ 0,	0,	printargs,		"SYS_2877"	}, /* 2877 */
-	{ 0,	0,	printargs,		"SYS_2878"	}, /* 2878 */
-	{ 0,	0,	printargs,		"SYS_2879"	}, /* 2879 */
-	{ 0,	0,	printargs,		"SYS_2880"	}, /* 2880 */
-	{ 0,	0,	printargs,		"SYS_2881"	}, /* 2881 */
-	{ 0,	0,	printargs,		"SYS_2882"	}, /* 2882 */
-	{ 0,	0,	printargs,		"SYS_2883"	}, /* 2883 */
-	{ 0,	0,	printargs,		"SYS_2884"	}, /* 2884 */
-	{ 0,	0,	printargs,		"SYS_2885"	}, /* 2885 */
-	{ 0,	0,	printargs,		"SYS_2886"	}, /* 2886 */
-	{ 0,	0,	printargs,		"SYS_2887"	}, /* 2887 */
-	{ 0,	0,	printargs,		"SYS_2888"	}, /* 2888 */
-	{ 0,	0,	printargs,		"SYS_2889"	}, /* 2889 */
-	{ 0,	0,	printargs,		"SYS_2890"	}, /* 2890 */
-	{ 0,	0,	printargs,		"SYS_2891"	}, /* 2891 */
-	{ 0,	0,	printargs,		"SYS_2892"	}, /* 2892 */
-	{ 0,	0,	printargs,		"SYS_2893"	}, /* 2893 */
-	{ 0,	0,	printargs,		"SYS_2894"	}, /* 2894 */
-	{ 0,	0,	printargs,		"SYS_2895"	}, /* 2895 */
-	{ 0,	0,	printargs,		"SYS_2896"	}, /* 2896 */
-	{ 0,	0,	printargs,		"SYS_2897"	}, /* 2897 */
-	{ 0,	0,	printargs,		"SYS_2898"	}, /* 2898 */
-	{ 0,	0,	printargs,		"SYS_2899"	}, /* 2899 */
-	{ 0,	0,	printargs,		"SYS_2900"	}, /* 2900 */
-	{ 0,	0,	printargs,		"SYS_2901"	}, /* 2901 */
-	{ 0,	0,	printargs,		"SYS_2902"	}, /* 2902 */
-	{ 0,	0,	printargs,		"SYS_2903"	}, /* 2903 */
-	{ 0,	0,	printargs,		"SYS_2904"	}, /* 2904 */
-	{ 0,	0,	printargs,		"SYS_2905"	}, /* 2905 */
-	{ 0,	0,	printargs,		"SYS_2906"	}, /* 2906 */
-	{ 0,	0,	printargs,		"SYS_2907"	}, /* 2907 */
-	{ 0,	0,	printargs,		"SYS_2908"	}, /* 2908 */
-	{ 0,	0,	printargs,		"SYS_2909"	}, /* 2909 */
-	{ 0,	0,	printargs,		"SYS_2910"	}, /* 2910 */
-	{ 0,	0,	printargs,		"SYS_2911"	}, /* 2911 */
-	{ 0,	0,	printargs,		"SYS_2912"	}, /* 2912 */
-	{ 0,	0,	printargs,		"SYS_2913"	}, /* 2913 */
-	{ 0,	0,	printargs,		"SYS_2914"	}, /* 2914 */
-	{ 0,	0,	printargs,		"SYS_2915"	}, /* 2915 */
-	{ 0,	0,	printargs,		"SYS_2916"	}, /* 2916 */
-	{ 0,	0,	printargs,		"SYS_2917"	}, /* 2917 */
-	{ 0,	0,	printargs,		"SYS_2918"	}, /* 2918 */
-	{ 0,	0,	printargs,		"SYS_2919"	}, /* 2919 */
-	{ 0,	0,	printargs,		"SYS_2920"	}, /* 2920 */
-	{ 0,	0,	printargs,		"SYS_2921"	}, /* 2921 */
-	{ 0,	0,	printargs,		"SYS_2922"	}, /* 2922 */
-	{ 0,	0,	printargs,		"SYS_2923"	}, /* 2923 */
-	{ 0,	0,	printargs,		"SYS_2924"	}, /* 2924 */
-	{ 0,	0,	printargs,		"SYS_2925"	}, /* 2925 */
-	{ 0,	0,	printargs,		"SYS_2926"	}, /* 2926 */
-	{ 0,	0,	printargs,		"SYS_2927"	}, /* 2927 */
-	{ 0,	0,	printargs,		"SYS_2928"	}, /* 2928 */
-	{ 0,	0,	printargs,		"SYS_2929"	}, /* 2929 */
-	{ 0,	0,	printargs,		"SYS_2930"	}, /* 2930 */
-	{ 0,	0,	printargs,		"SYS_2931"	}, /* 2931 */
-	{ 0,	0,	printargs,		"SYS_2932"	}, /* 2932 */
-	{ 0,	0,	printargs,		"SYS_2933"	}, /* 2933 */
-	{ 0,	0,	printargs,		"SYS_2934"	}, /* 2934 */
-	{ 0,	0,	printargs,		"SYS_2935"	}, /* 2935 */
-	{ 0,	0,	printargs,		"SYS_2936"	}, /* 2936 */
-	{ 0,	0,	printargs,		"SYS_2937"	}, /* 2937 */
-	{ 0,	0,	printargs,		"SYS_2938"	}, /* 2938 */
-	{ 0,	0,	printargs,		"SYS_2939"	}, /* 2939 */
-	{ 0,	0,	printargs,		"SYS_2940"	}, /* 2940 */
-	{ 0,	0,	printargs,		"SYS_2941"	}, /* 2941 */
-	{ 0,	0,	printargs,		"SYS_2942"	}, /* 2942 */
-	{ 0,	0,	printargs,		"SYS_2943"	}, /* 2943 */
-	{ 0,	0,	printargs,		"SYS_2944"	}, /* 2944 */
-	{ 0,	0,	printargs,		"SYS_2945"	}, /* 2945 */
-	{ 0,	0,	printargs,		"SYS_2946"	}, /* 2946 */
-	{ 0,	0,	printargs,		"SYS_2947"	}, /* 2947 */
-	{ 0,	0,	printargs,		"SYS_2948"	}, /* 2948 */
-	{ 0,	0,	printargs,		"SYS_2949"	}, /* 2949 */
-	{ 0,	0,	printargs,		"SYS_2950"	}, /* 2950 */
-	{ 0,	0,	printargs,		"SYS_2951"	}, /* 2951 */
-	{ 0,	0,	printargs,		"SYS_2952"	}, /* 2952 */
-	{ 0,	0,	printargs,		"SYS_2953"	}, /* 2953 */
-	{ 0,	0,	printargs,		"SYS_2954"	}, /* 2954 */
-	{ 0,	0,	printargs,		"SYS_2955"	}, /* 2955 */
-	{ 0,	0,	printargs,		"SYS_2956"	}, /* 2956 */
-	{ 0,	0,	printargs,		"SYS_2957"	}, /* 2957 */
-	{ 0,	0,	printargs,		"SYS_2958"	}, /* 2958 */
-	{ 0,	0,	printargs,		"SYS_2959"	}, /* 2959 */
-	{ 0,	0,	printargs,		"SYS_2960"	}, /* 2960 */
-	{ 0,	0,	printargs,		"SYS_2961"	}, /* 2961 */
-	{ 0,	0,	printargs,		"SYS_2962"	}, /* 2962 */
-	{ 0,	0,	printargs,		"SYS_2963"	}, /* 2963 */
-	{ 0,	0,	printargs,		"SYS_2964"	}, /* 2964 */
-	{ 0,	0,	printargs,		"SYS_2965"	}, /* 2965 */
-	{ 0,	0,	printargs,		"SYS_2966"	}, /* 2966 */
-	{ 0,	0,	printargs,		"SYS_2967"	}, /* 2967 */
-	{ 0,	0,	printargs,		"SYS_2968"	}, /* 2968 */
-	{ 0,	0,	printargs,		"SYS_2969"	}, /* 2969 */
-	{ 0,	0,	printargs,		"SYS_2970"	}, /* 2970 */
-	{ 0,	0,	printargs,		"SYS_2971"	}, /* 2971 */
-	{ 0,	0,	printargs,		"SYS_2972"	}, /* 2972 */
-	{ 0,	0,	printargs,		"SYS_2973"	}, /* 2973 */
-	{ 0,	0,	printargs,		"SYS_2974"	}, /* 2974 */
-	{ 0,	0,	printargs,		"SYS_2975"	}, /* 2975 */
-	{ 0,	0,	printargs,		"SYS_2976"	}, /* 2976 */
-	{ 0,	0,	printargs,		"SYS_2977"	}, /* 2977 */
-	{ 0,	0,	printargs,		"SYS_2978"	}, /* 2978 */
-	{ 0,	0,	printargs,		"SYS_2979"	}, /* 2979 */
-	{ 0,	0,	printargs,		"SYS_2980"	}, /* 2980 */
-	{ 0,	0,	printargs,		"SYS_2981"	}, /* 2981 */
-	{ 0,	0,	printargs,		"SYS_2982"	}, /* 2982 */
-	{ 0,	0,	printargs,		"SYS_2983"	}, /* 2983 */
-	{ 0,	0,	printargs,		"SYS_2984"	}, /* 2984 */
-	{ 0,	0,	printargs,		"SYS_2985"	}, /* 2985 */
-	{ 0,	0,	printargs,		"SYS_2986"	}, /* 2986 */
-	{ 0,	0,	printargs,		"SYS_2987"	}, /* 2987 */
-	{ 0,	0,	printargs,		"SYS_2988"	}, /* 2988 */
-	{ 0,	0,	printargs,		"SYS_2989"	}, /* 2989 */
-	{ 0,	0,	printargs,		"SYS_2990"	}, /* 2990 */
-	{ 0,	0,	printargs,		"SYS_2991"	}, /* 2991 */
-	{ 0,	0,	printargs,		"SYS_2992"	}, /* 2992 */
-	{ 0,	0,	printargs,		"SYS_2993"	}, /* 2993 */
-	{ 0,	0,	printargs,		"SYS_2994"	}, /* 2994 */
-	{ 0,	0,	printargs,		"SYS_2995"	}, /* 2995 */
-	{ 0,	0,	printargs,		"SYS_2996"	}, /* 2996 */
-	{ 0,	0,	printargs,		"SYS_2997"	}, /* 2997 */
-	{ 0,	0,	printargs,		"SYS_2998"	}, /* 2998 */
-	{ 0,	0,	printargs,		"SYS_2999"	}, /* 2999 */ /* end of BSD 4.3 */
+	{ 0,	0,	NULL,			NULL		}, /* 2192 */
+	{ 0,	0,	NULL,			NULL		}, /* 2193 */
+	{ 0,	0,	NULL,			NULL		}, /* 2194 */
+	{ 0,	0,	NULL,			NULL		}, /* 2195 */
+	{ 0,	0,	NULL,			NULL		}, /* 2196 */
+	{ 0,	0,	NULL,			NULL		}, /* 2197 */
+	{ 0,	0,	NULL,			NULL		}, /* 2198 */
+	{ 0,	0,	NULL,			NULL		}, /* 2199 */
+	{ 0,	0,	NULL,			NULL		}, /* 2200 */
+	{ 0,	0,	NULL,			NULL		}, /* 2201 */
+	{ 0,	0,	NULL,			NULL		}, /* 2202 */
+	{ 0,	0,	NULL,			NULL		}, /* 2203 */
+	{ 0,	0,	NULL,			NULL		}, /* 2204 */
+	{ 0,	0,	NULL,			NULL		}, /* 2205 */
+	{ 0,	0,	NULL,			NULL		}, /* 2206 */
+	{ 0,	0,	NULL,			NULL		}, /* 2207 */
+	{ 0,	0,	NULL,			NULL		}, /* 2208 */
+	{ 0,	0,	NULL,			NULL		}, /* 2209 */
+	{ 0,	0,	NULL,			NULL		}, /* 2210 */
+	{ 0,	0,	NULL,			NULL		}, /* 2211 */
+	{ 0,	0,	NULL,			NULL		}, /* 2212 */
+	{ 0,	0,	NULL,			NULL		}, /* 2213 */
+	{ 0,	0,	NULL,			NULL		}, /* 2214 */
+	{ 0,	0,	NULL,			NULL		}, /* 2215 */
+	{ 0,	0,	NULL,			NULL		}, /* 2216 */
+	{ 0,	0,	NULL,			NULL		}, /* 2217 */
+	{ 0,	0,	NULL,			NULL		}, /* 2218 */
+	{ 0,	0,	NULL,			NULL		}, /* 2219 */
+	{ 0,	0,	NULL,			NULL		}, /* 2220 */
+	{ 0,	0,	NULL,			NULL		}, /* 2221 */
+	{ 0,	0,	NULL,			NULL		}, /* 2222 */
+	{ 0,	0,	NULL,			NULL		}, /* 2223 */
+	{ 0,	0,	NULL,			NULL		}, /* 2224 */
+	{ 0,	0,	NULL,			NULL		}, /* 2225 */
+	{ 0,	0,	NULL,			NULL		}, /* 2226 */
+	{ 0,	0,	NULL,			NULL		}, /* 2227 */
+	{ 0,	0,	NULL,			NULL		}, /* 2228 */
+	{ 0,	0,	NULL,			NULL		}, /* 2229 */
+	{ 0,	0,	NULL,			NULL		}, /* 2230 */
+	{ 0,	0,	NULL,			NULL		}, /* 2231 */
+	{ 0,	0,	NULL,			NULL		}, /* 2232 */
+	{ 0,	0,	NULL,			NULL		}, /* 2233 */
+	{ 0,	0,	NULL,			NULL		}, /* 2234 */
+	{ 0,	0,	NULL,			NULL		}, /* 2235 */
+	{ 0,	0,	NULL,			NULL		}, /* 2236 */
+	{ 0,	0,	NULL,			NULL		}, /* 2237 */
+	{ 0,	0,	NULL,			NULL		}, /* 2238 */
+	{ 0,	0,	NULL,			NULL		}, /* 2239 */
+	{ 0,	0,	NULL,			NULL		}, /* 2240 */
+	{ 0,	0,	NULL,			NULL		}, /* 2241 */
+	{ 0,	0,	NULL,			NULL		}, /* 2242 */
+	{ 0,	0,	NULL,			NULL		}, /* 2243 */
+	{ 0,	0,	NULL,			NULL		}, /* 2244 */
+	{ 0,	0,	NULL,			NULL		}, /* 2245 */
+	{ 0,	0,	NULL,			NULL		}, /* 2246 */
+	{ 0,	0,	NULL,			NULL		}, /* 2247 */
+	{ 0,	0,	NULL,			NULL		}, /* 2248 */
+	{ 0,	0,	NULL,			NULL		}, /* 2249 */
+	{ 0,	0,	NULL,			NULL		}, /* 2250 */
+	{ 0,	0,	NULL,			NULL		}, /* 2251 */
+	{ 0,	0,	NULL,			NULL		}, /* 2252 */
+	{ 0,	0,	NULL,			NULL		}, /* 2253 */
+	{ 0,	0,	NULL,			NULL		}, /* 2254 */
+	{ 0,	0,	NULL,			NULL		}, /* 2255 */
+	{ 0,	0,	NULL,			NULL		}, /* 2256 */
+	{ 0,	0,	NULL,			NULL		}, /* 2257 */
+	{ 0,	0,	NULL,			NULL		}, /* 2258 */
+	{ 0,	0,	NULL,			NULL		}, /* 2259 */
+	{ 0,	0,	NULL,			NULL		}, /* 2260 */
+	{ 0,	0,	NULL,			NULL		}, /* 2261 */
+	{ 0,	0,	NULL,			NULL		}, /* 2262 */
+	{ 0,	0,	NULL,			NULL		}, /* 2263 */
+	{ 0,	0,	NULL,			NULL		}, /* 2264 */
+	{ 0,	0,	NULL,			NULL		}, /* 2265 */
+	{ 0,	0,	NULL,			NULL		}, /* 2266 */
+	{ 0,	0,	NULL,			NULL		}, /* 2267 */
+	{ 0,	0,	NULL,			NULL		}, /* 2268 */
+	{ 0,	0,	NULL,			NULL		}, /* 2269 */
+	{ 0,	0,	NULL,			NULL		}, /* 2270 */
+	{ 0,	0,	NULL,			NULL		}, /* 2271 */
+	{ 0,	0,	NULL,			NULL		}, /* 2272 */
+	{ 0,	0,	NULL,			NULL		}, /* 2273 */
+	{ 0,	0,	NULL,			NULL		}, /* 2274 */
+	{ 0,	0,	NULL,			NULL		}, /* 2275 */
+	{ 0,	0,	NULL,			NULL		}, /* 2276 */
+	{ 0,	0,	NULL,			NULL		}, /* 2277 */
+	{ 0,	0,	NULL,			NULL		}, /* 2278 */
+	{ 0,	0,	NULL,			NULL		}, /* 2279 */
+	{ 0,	0,	NULL,			NULL		}, /* 2280 */
+	{ 0,	0,	NULL,			NULL		}, /* 2281 */
+	{ 0,	0,	NULL,			NULL		}, /* 2282 */
+	{ 0,	0,	NULL,			NULL		}, /* 2283 */
+	{ 0,	0,	NULL,			NULL		}, /* 2284 */
+	{ 0,	0,	NULL,			NULL		}, /* 2285 */
+	{ 0,	0,	NULL,			NULL		}, /* 2286 */
+	{ 0,	0,	NULL,			NULL		}, /* 2287 */
+	{ 0,	0,	NULL,			NULL		}, /* 2288 */
+	{ 0,	0,	NULL,			NULL		}, /* 2289 */
+	{ 0,	0,	NULL,			NULL		}, /* 2290 */
+	{ 0,	0,	NULL,			NULL		}, /* 2291 */
+	{ 0,	0,	NULL,			NULL		}, /* 2292 */
+	{ 0,	0,	NULL,			NULL		}, /* 2293 */
+	{ 0,	0,	NULL,			NULL		}, /* 2294 */
+	{ 0,	0,	NULL,			NULL		}, /* 2295 */
+	{ 0,	0,	NULL,			NULL		}, /* 2296 */
+	{ 0,	0,	NULL,			NULL		}, /* 2297 */
+	{ 0,	0,	NULL,			NULL		}, /* 2298 */
+	{ 0,	0,	NULL,			NULL		}, /* 2299 */
+	{ 0,	0,	NULL,			NULL		}, /* 2300 */
+	{ 0,	0,	NULL,			NULL		}, /* 2301 */
+	{ 0,	0,	NULL,			NULL		}, /* 2302 */
+	{ 0,	0,	NULL,			NULL		}, /* 2303 */
+	{ 0,	0,	NULL,			NULL		}, /* 2304 */
+	{ 0,	0,	NULL,			NULL		}, /* 2305 */
+	{ 0,	0,	NULL,			NULL		}, /* 2306 */
+	{ 0,	0,	NULL,			NULL		}, /* 2307 */
+	{ 0,	0,	NULL,			NULL		}, /* 2308 */
+	{ 0,	0,	NULL,			NULL		}, /* 2309 */
+	{ 0,	0,	NULL,			NULL		}, /* 2310 */
+	{ 0,	0,	NULL,			NULL		}, /* 2311 */
+	{ 0,	0,	NULL,			NULL		}, /* 2312 */
+	{ 0,	0,	NULL,			NULL		}, /* 2313 */
+	{ 0,	0,	NULL,			NULL		}, /* 2314 */
+	{ 0,	0,	NULL,			NULL		}, /* 2315 */
+	{ 0,	0,	NULL,			NULL		}, /* 2316 */
+	{ 0,	0,	NULL,			NULL		}, /* 2317 */
+	{ 0,	0,	NULL,			NULL		}, /* 2318 */
+	{ 0,	0,	NULL,			NULL		}, /* 2319 */
+	{ 0,	0,	NULL,			NULL		}, /* 2320 */
+	{ 0,	0,	NULL,			NULL		}, /* 2321 */
+	{ 0,	0,	NULL,			NULL		}, /* 2322 */
+	{ 0,	0,	NULL,			NULL		}, /* 2323 */
+	{ 0,	0,	NULL,			NULL		}, /* 2324 */
+	{ 0,	0,	NULL,			NULL		}, /* 2325 */
+	{ 0,	0,	NULL,			NULL		}, /* 2326 */
+	{ 0,	0,	NULL,			NULL		}, /* 2327 */
+	{ 0,	0,	NULL,			NULL		}, /* 2328 */
+	{ 0,	0,	NULL,			NULL		}, /* 2329 */
+	{ 0,	0,	NULL,			NULL		}, /* 2330 */
+	{ 0,	0,	NULL,			NULL		}, /* 2331 */
+	{ 0,	0,	NULL,			NULL		}, /* 2332 */
+	{ 0,	0,	NULL,			NULL		}, /* 2333 */
+	{ 0,	0,	NULL,			NULL		}, /* 2334 */
+	{ 0,	0,	NULL,			NULL		}, /* 2335 */
+	{ 0,	0,	NULL,			NULL		}, /* 2336 */
+	{ 0,	0,	NULL,			NULL		}, /* 2337 */
+	{ 0,	0,	NULL,			NULL		}, /* 2338 */
+	{ 0,	0,	NULL,			NULL		}, /* 2339 */
+	{ 0,	0,	NULL,			NULL		}, /* 2340 */
+	{ 0,	0,	NULL,			NULL		}, /* 2341 */
+	{ 0,	0,	NULL,			NULL		}, /* 2342 */
+	{ 0,	0,	NULL,			NULL		}, /* 2343 */
+	{ 0,	0,	NULL,			NULL		}, /* 2344 */
+	{ 0,	0,	NULL,			NULL		}, /* 2345 */
+	{ 0,	0,	NULL,			NULL		}, /* 2346 */
+	{ 0,	0,	NULL,			NULL		}, /* 2347 */
+	{ 0,	0,	NULL,			NULL		}, /* 2348 */
+	{ 0,	0,	NULL,			NULL		}, /* 2349 */
+	{ 0,	0,	NULL,			NULL		}, /* 2350 */
+	{ 0,	0,	NULL,			NULL		}, /* 2351 */
+	{ 0,	0,	NULL,			NULL		}, /* 2352 */
+	{ 0,	0,	NULL,			NULL		}, /* 2353 */
+	{ 0,	0,	NULL,			NULL		}, /* 2354 */
+	{ 0,	0,	NULL,			NULL		}, /* 2355 */
+	{ 0,	0,	NULL,			NULL		}, /* 2356 */
+	{ 0,	0,	NULL,			NULL		}, /* 2357 */
+	{ 0,	0,	NULL,			NULL		}, /* 2358 */
+	{ 0,	0,	NULL,			NULL		}, /* 2359 */
+	{ 0,	0,	NULL,			NULL		}, /* 2360 */
+	{ 0,	0,	NULL,			NULL		}, /* 2361 */
+	{ 0,	0,	NULL,			NULL		}, /* 2362 */
+	{ 0,	0,	NULL,			NULL		}, /* 2363 */
+	{ 0,	0,	NULL,			NULL		}, /* 2364 */
+	{ 0,	0,	NULL,			NULL		}, /* 2365 */
+	{ 0,	0,	NULL,			NULL		}, /* 2366 */
+	{ 0,	0,	NULL,			NULL		}, /* 2367 */
+	{ 0,	0,	NULL,			NULL		}, /* 2368 */
+	{ 0,	0,	NULL,			NULL		}, /* 2369 */
+	{ 0,	0,	NULL,			NULL		}, /* 2370 */
+	{ 0,	0,	NULL,			NULL		}, /* 2371 */
+	{ 0,	0,	NULL,			NULL		}, /* 2372 */
+	{ 0,	0,	NULL,			NULL		}, /* 2373 */
+	{ 0,	0,	NULL,			NULL		}, /* 2374 */
+	{ 0,	0,	NULL,			NULL		}, /* 2375 */
+	{ 0,	0,	NULL,			NULL		}, /* 2376 */
+	{ 0,	0,	NULL,			NULL		}, /* 2377 */
+	{ 0,	0,	NULL,			NULL		}, /* 2378 */
+	{ 0,	0,	NULL,			NULL		}, /* 2379 */
+	{ 0,	0,	NULL,			NULL		}, /* 2380 */
+	{ 0,	0,	NULL,			NULL		}, /* 2381 */
+	{ 0,	0,	NULL,			NULL		}, /* 2382 */
+	{ 0,	0,	NULL,			NULL		}, /* 2383 */
+	{ 0,	0,	NULL,			NULL		}, /* 2384 */
+	{ 0,	0,	NULL,			NULL		}, /* 2385 */
+	{ 0,	0,	NULL,			NULL		}, /* 2386 */
+	{ 0,	0,	NULL,			NULL		}, /* 2387 */
+	{ 0,	0,	NULL,			NULL		}, /* 2388 */
+	{ 0,	0,	NULL,			NULL		}, /* 2389 */
+	{ 0,	0,	NULL,			NULL		}, /* 2390 */
+	{ 0,	0,	NULL,			NULL		}, /* 2391 */
+	{ 0,	0,	NULL,			NULL		}, /* 2392 */
+	{ 0,	0,	NULL,			NULL		}, /* 2393 */
+	{ 0,	0,	NULL,			NULL		}, /* 2394 */
+	{ 0,	0,	NULL,			NULL		}, /* 2395 */
+	{ 0,	0,	NULL,			NULL		}, /* 2396 */
+	{ 0,	0,	NULL,			NULL		}, /* 2397 */
+	{ 0,	0,	NULL,			NULL		}, /* 2398 */
+	{ 0,	0,	NULL,			NULL		}, /* 2399 */
+	{ 0,	0,	NULL,			NULL		}, /* 2400 */
+	{ 0,	0,	NULL,			NULL		}, /* 2401 */
+	{ 0,	0,	NULL,			NULL		}, /* 2402 */
+	{ 0,	0,	NULL,			NULL		}, /* 2403 */
+	{ 0,	0,	NULL,			NULL		}, /* 2404 */
+	{ 0,	0,	NULL,			NULL		}, /* 2405 */
+	{ 0,	0,	NULL,			NULL		}, /* 2406 */
+	{ 0,	0,	NULL,			NULL		}, /* 2407 */
+	{ 0,	0,	NULL,			NULL		}, /* 2408 */
+	{ 0,	0,	NULL,			NULL		}, /* 2409 */
+	{ 0,	0,	NULL,			NULL		}, /* 2410 */
+	{ 0,	0,	NULL,			NULL		}, /* 2411 */
+	{ 0,	0,	NULL,			NULL		}, /* 2412 */
+	{ 0,	0,	NULL,			NULL		}, /* 2413 */
+	{ 0,	0,	NULL,			NULL		}, /* 2414 */
+	{ 0,	0,	NULL,			NULL		}, /* 2415 */
+	{ 0,	0,	NULL,			NULL		}, /* 2416 */
+	{ 0,	0,	NULL,			NULL		}, /* 2417 */
+	{ 0,	0,	NULL,			NULL		}, /* 2418 */
+	{ 0,	0,	NULL,			NULL		}, /* 2419 */
+	{ 0,	0,	NULL,			NULL		}, /* 2420 */
+	{ 0,	0,	NULL,			NULL		}, /* 2421 */
+	{ 0,	0,	NULL,			NULL		}, /* 2422 */
+	{ 0,	0,	NULL,			NULL		}, /* 2423 */
+	{ 0,	0,	NULL,			NULL		}, /* 2424 */
+	{ 0,	0,	NULL,			NULL		}, /* 2425 */
+	{ 0,	0,	NULL,			NULL		}, /* 2426 */
+	{ 0,	0,	NULL,			NULL		}, /* 2427 */
+	{ 0,	0,	NULL,			NULL		}, /* 2428 */
+	{ 0,	0,	NULL,			NULL		}, /* 2429 */
+	{ 0,	0,	NULL,			NULL		}, /* 2430 */
+	{ 0,	0,	NULL,			NULL		}, /* 2431 */
+	{ 0,	0,	NULL,			NULL		}, /* 2432 */
+	{ 0,	0,	NULL,			NULL		}, /* 2433 */
+	{ 0,	0,	NULL,			NULL		}, /* 2434 */
+	{ 0,	0,	NULL,			NULL		}, /* 2435 */
+	{ 0,	0,	NULL,			NULL		}, /* 2436 */
+	{ 0,	0,	NULL,			NULL		}, /* 2437 */
+	{ 0,	0,	NULL,			NULL		}, /* 2438 */
+	{ 0,	0,	NULL,			NULL		}, /* 2439 */
+	{ 0,	0,	NULL,			NULL		}, /* 2440 */
+	{ 0,	0,	NULL,			NULL		}, /* 2441 */
+	{ 0,	0,	NULL,			NULL		}, /* 2442 */
+	{ 0,	0,	NULL,			NULL		}, /* 2443 */
+	{ 0,	0,	NULL,			NULL		}, /* 2444 */
+	{ 0,	0,	NULL,			NULL		}, /* 2445 */
+	{ 0,	0,	NULL,			NULL		}, /* 2446 */
+	{ 0,	0,	NULL,			NULL		}, /* 2447 */
+	{ 0,	0,	NULL,			NULL		}, /* 2448 */
+	{ 0,	0,	NULL,			NULL		}, /* 2449 */
+	{ 0,	0,	NULL,			NULL		}, /* 2450 */
+	{ 0,	0,	NULL,			NULL		}, /* 2451 */
+	{ 0,	0,	NULL,			NULL		}, /* 2452 */
+	{ 0,	0,	NULL,			NULL		}, /* 2453 */
+	{ 0,	0,	NULL,			NULL		}, /* 2454 */
+	{ 0,	0,	NULL,			NULL		}, /* 2455 */
+	{ 0,	0,	NULL,			NULL		}, /* 2456 */
+	{ 0,	0,	NULL,			NULL		}, /* 2457 */
+	{ 0,	0,	NULL,			NULL		}, /* 2458 */
+	{ 0,	0,	NULL,			NULL		}, /* 2459 */
+	{ 0,	0,	NULL,			NULL		}, /* 2460 */
+	{ 0,	0,	NULL,			NULL		}, /* 2461 */
+	{ 0,	0,	NULL,			NULL		}, /* 2462 */
+	{ 0,	0,	NULL,			NULL		}, /* 2463 */
+	{ 0,	0,	NULL,			NULL		}, /* 2464 */
+	{ 0,	0,	NULL,			NULL		}, /* 2465 */
+	{ 0,	0,	NULL,			NULL		}, /* 2466 */
+	{ 0,	0,	NULL,			NULL		}, /* 2467 */
+	{ 0,	0,	NULL,			NULL		}, /* 2468 */
+	{ 0,	0,	NULL,			NULL		}, /* 2469 */
+	{ 0,	0,	NULL,			NULL		}, /* 2470 */
+	{ 0,	0,	NULL,			NULL		}, /* 2471 */
+	{ 0,	0,	NULL,			NULL		}, /* 2472 */
+	{ 0,	0,	NULL,			NULL		}, /* 2473 */
+	{ 0,	0,	NULL,			NULL		}, /* 2474 */
+	{ 0,	0,	NULL,			NULL		}, /* 2475 */
+	{ 0,	0,	NULL,			NULL		}, /* 2476 */
+	{ 0,	0,	NULL,			NULL		}, /* 2477 */
+	{ 0,	0,	NULL,			NULL		}, /* 2478 */
+	{ 0,	0,	NULL,			NULL		}, /* 2479 */
+	{ 0,	0,	NULL,			NULL		}, /* 2480 */
+	{ 0,	0,	NULL,			NULL		}, /* 2481 */
+	{ 0,	0,	NULL,			NULL		}, /* 2482 */
+	{ 0,	0,	NULL,			NULL		}, /* 2483 */
+	{ 0,	0,	NULL,			NULL		}, /* 2484 */
+	{ 0,	0,	NULL,			NULL		}, /* 2485 */
+	{ 0,	0,	NULL,			NULL		}, /* 2486 */
+	{ 0,	0,	NULL,			NULL		}, /* 2487 */
+	{ 0,	0,	NULL,			NULL		}, /* 2488 */
+	{ 0,	0,	NULL,			NULL		}, /* 2489 */
+	{ 0,	0,	NULL,			NULL		}, /* 2490 */
+	{ 0,	0,	NULL,			NULL		}, /* 2491 */
+	{ 0,	0,	NULL,			NULL		}, /* 2492 */
+	{ 0,	0,	NULL,			NULL		}, /* 2493 */
+	{ 0,	0,	NULL,			NULL		}, /* 2494 */
+	{ 0,	0,	NULL,			NULL		}, /* 2495 */
+	{ 0,	0,	NULL,			NULL		}, /* 2496 */
+	{ 0,	0,	NULL,			NULL		}, /* 2497 */
+	{ 0,	0,	NULL,			NULL		}, /* 2498 */
+	{ 0,	0,	NULL,			NULL		}, /* 2499 */
+	{ 0,	0,	NULL,			NULL		}, /* 2500 */
+	{ 0,	0,	NULL,			NULL		}, /* 2501 */
+	{ 0,	0,	NULL,			NULL		}, /* 2502 */
+	{ 0,	0,	NULL,			NULL		}, /* 2503 */
+	{ 0,	0,	NULL,			NULL		}, /* 2504 */
+	{ 0,	0,	NULL,			NULL		}, /* 2505 */
+	{ 0,	0,	NULL,			NULL		}, /* 2506 */
+	{ 0,	0,	NULL,			NULL		}, /* 2507 */
+	{ 0,	0,	NULL,			NULL		}, /* 2508 */
+	{ 0,	0,	NULL,			NULL		}, /* 2509 */
+	{ 0,	0,	NULL,			NULL		}, /* 2510 */
+	{ 0,	0,	NULL,			NULL		}, /* 2511 */
+	{ 0,	0,	NULL,			NULL		}, /* 2512 */
+	{ 0,	0,	NULL,			NULL		}, /* 2513 */
+	{ 0,	0,	NULL,			NULL		}, /* 2514 */
+	{ 0,	0,	NULL,			NULL		}, /* 2515 */
+	{ 0,	0,	NULL,			NULL		}, /* 2516 */
+	{ 0,	0,	NULL,			NULL		}, /* 2517 */
+	{ 0,	0,	NULL,			NULL		}, /* 2518 */
+	{ 0,	0,	NULL,			NULL		}, /* 2519 */
+	{ 0,	0,	NULL,			NULL		}, /* 2520 */
+	{ 0,	0,	NULL,			NULL		}, /* 2521 */
+	{ 0,	0,	NULL,			NULL		}, /* 2522 */
+	{ 0,	0,	NULL,			NULL		}, /* 2523 */
+	{ 0,	0,	NULL,			NULL		}, /* 2524 */
+	{ 0,	0,	NULL,			NULL		}, /* 2525 */
+	{ 0,	0,	NULL,			NULL		}, /* 2526 */
+	{ 0,	0,	NULL,			NULL		}, /* 2527 */
+	{ 0,	0,	NULL,			NULL		}, /* 2528 */
+	{ 0,	0,	NULL,			NULL		}, /* 2529 */
+	{ 0,	0,	NULL,			NULL		}, /* 2530 */
+	{ 0,	0,	NULL,			NULL		}, /* 2531 */
+	{ 0,	0,	NULL,			NULL		}, /* 2532 */
+	{ 0,	0,	NULL,			NULL		}, /* 2533 */
+	{ 0,	0,	NULL,			NULL		}, /* 2534 */
+	{ 0,	0,	NULL,			NULL		}, /* 2535 */
+	{ 0,	0,	NULL,			NULL		}, /* 2536 */
+	{ 0,	0,	NULL,			NULL		}, /* 2537 */
+	{ 0,	0,	NULL,			NULL		}, /* 2538 */
+	{ 0,	0,	NULL,			NULL		}, /* 2539 */
+	{ 0,	0,	NULL,			NULL		}, /* 2540 */
+	{ 0,	0,	NULL,			NULL		}, /* 2541 */
+	{ 0,	0,	NULL,			NULL		}, /* 2542 */
+	{ 0,	0,	NULL,			NULL		}, /* 2543 */
+	{ 0,	0,	NULL,			NULL		}, /* 2544 */
+	{ 0,	0,	NULL,			NULL		}, /* 2545 */
+	{ 0,	0,	NULL,			NULL		}, /* 2546 */
+	{ 0,	0,	NULL,			NULL		}, /* 2547 */
+	{ 0,	0,	NULL,			NULL		}, /* 2548 */
+	{ 0,	0,	NULL,			NULL		}, /* 2549 */
+	{ 0,	0,	NULL,			NULL		}, /* 2550 */
+	{ 0,	0,	NULL,			NULL		}, /* 2551 */
+	{ 0,	0,	NULL,			NULL		}, /* 2552 */
+	{ 0,	0,	NULL,			NULL		}, /* 2553 */
+	{ 0,	0,	NULL,			NULL		}, /* 2554 */
+	{ 0,	0,	NULL,			NULL		}, /* 2555 */
+	{ 0,	0,	NULL,			NULL		}, /* 2556 */
+	{ 0,	0,	NULL,			NULL		}, /* 2557 */
+	{ 0,	0,	NULL,			NULL		}, /* 2558 */
+	{ 0,	0,	NULL,			NULL		}, /* 2559 */
+	{ 0,	0,	NULL,			NULL		}, /* 2560 */
+	{ 0,	0,	NULL,			NULL		}, /* 2561 */
+	{ 0,	0,	NULL,			NULL		}, /* 2562 */
+	{ 0,	0,	NULL,			NULL		}, /* 2563 */
+	{ 0,	0,	NULL,			NULL		}, /* 2564 */
+	{ 0,	0,	NULL,			NULL		}, /* 2565 */
+	{ 0,	0,	NULL,			NULL		}, /* 2566 */
+	{ 0,	0,	NULL,			NULL		}, /* 2567 */
+	{ 0,	0,	NULL,			NULL		}, /* 2568 */
+	{ 0,	0,	NULL,			NULL		}, /* 2569 */
+	{ 0,	0,	NULL,			NULL		}, /* 2570 */
+	{ 0,	0,	NULL,			NULL		}, /* 2571 */
+	{ 0,	0,	NULL,			NULL		}, /* 2572 */
+	{ 0,	0,	NULL,			NULL		}, /* 2573 */
+	{ 0,	0,	NULL,			NULL		}, /* 2574 */
+	{ 0,	0,	NULL,			NULL		}, /* 2575 */
+	{ 0,	0,	NULL,			NULL		}, /* 2576 */
+	{ 0,	0,	NULL,			NULL		}, /* 2577 */
+	{ 0,	0,	NULL,			NULL		}, /* 2578 */
+	{ 0,	0,	NULL,			NULL		}, /* 2579 */
+	{ 0,	0,	NULL,			NULL		}, /* 2580 */
+	{ 0,	0,	NULL,			NULL		}, /* 2581 */
+	{ 0,	0,	NULL,			NULL		}, /* 2582 */
+	{ 0,	0,	NULL,			NULL		}, /* 2583 */
+	{ 0,	0,	NULL,			NULL		}, /* 2584 */
+	{ 0,	0,	NULL,			NULL		}, /* 2585 */
+	{ 0,	0,	NULL,			NULL		}, /* 2586 */
+	{ 0,	0,	NULL,			NULL		}, /* 2587 */
+	{ 0,	0,	NULL,			NULL		}, /* 2588 */
+	{ 0,	0,	NULL,			NULL		}, /* 2589 */
+	{ 0,	0,	NULL,			NULL		}, /* 2590 */
+	{ 0,	0,	NULL,			NULL		}, /* 2591 */
+	{ 0,	0,	NULL,			NULL		}, /* 2592 */
+	{ 0,	0,	NULL,			NULL		}, /* 2593 */
+	{ 0,	0,	NULL,			NULL		}, /* 2594 */
+	{ 0,	0,	NULL,			NULL		}, /* 2595 */
+	{ 0,	0,	NULL,			NULL		}, /* 2596 */
+	{ 0,	0,	NULL,			NULL		}, /* 2597 */
+	{ 0,	0,	NULL,			NULL		}, /* 2598 */
+	{ 0,	0,	NULL,			NULL		}, /* 2599 */
+	{ 0,	0,	NULL,			NULL		}, /* 2600 */
+	{ 0,	0,	NULL,			NULL		}, /* 2601 */
+	{ 0,	0,	NULL,			NULL		}, /* 2602 */
+	{ 0,	0,	NULL,			NULL		}, /* 2603 */
+	{ 0,	0,	NULL,			NULL		}, /* 2604 */
+	{ 0,	0,	NULL,			NULL		}, /* 2605 */
+	{ 0,	0,	NULL,			NULL		}, /* 2606 */
+	{ 0,	0,	NULL,			NULL		}, /* 2607 */
+	{ 0,	0,	NULL,			NULL		}, /* 2608 */
+	{ 0,	0,	NULL,			NULL		}, /* 2609 */
+	{ 0,	0,	NULL,			NULL		}, /* 2610 */
+	{ 0,	0,	NULL,			NULL		}, /* 2611 */
+	{ 0,	0,	NULL,			NULL		}, /* 2612 */
+	{ 0,	0,	NULL,			NULL		}, /* 2613 */
+	{ 0,	0,	NULL,			NULL		}, /* 2614 */
+	{ 0,	0,	NULL,			NULL		}, /* 2615 */
+	{ 0,	0,	NULL,			NULL		}, /* 2616 */
+	{ 0,	0,	NULL,			NULL		}, /* 2617 */
+	{ 0,	0,	NULL,			NULL		}, /* 2618 */
+	{ 0,	0,	NULL,			NULL		}, /* 2619 */
+	{ 0,	0,	NULL,			NULL		}, /* 2620 */
+	{ 0,	0,	NULL,			NULL		}, /* 2621 */
+	{ 0,	0,	NULL,			NULL		}, /* 2622 */
+	{ 0,	0,	NULL,			NULL		}, /* 2623 */
+	{ 0,	0,	NULL,			NULL		}, /* 2624 */
+	{ 0,	0,	NULL,			NULL		}, /* 2625 */
+	{ 0,	0,	NULL,			NULL		}, /* 2626 */
+	{ 0,	0,	NULL,			NULL		}, /* 2627 */
+	{ 0,	0,	NULL,			NULL		}, /* 2628 */
+	{ 0,	0,	NULL,			NULL		}, /* 2629 */
+	{ 0,	0,	NULL,			NULL		}, /* 2630 */
+	{ 0,	0,	NULL,			NULL		}, /* 2631 */
+	{ 0,	0,	NULL,			NULL		}, /* 2632 */
+	{ 0,	0,	NULL,			NULL		}, /* 2633 */
+	{ 0,	0,	NULL,			NULL		}, /* 2634 */
+	{ 0,	0,	NULL,			NULL		}, /* 2635 */
+	{ 0,	0,	NULL,			NULL		}, /* 2636 */
+	{ 0,	0,	NULL,			NULL		}, /* 2637 */
+	{ 0,	0,	NULL,			NULL		}, /* 2638 */
+	{ 0,	0,	NULL,			NULL		}, /* 2639 */
+	{ 0,	0,	NULL,			NULL		}, /* 2640 */
+	{ 0,	0,	NULL,			NULL		}, /* 2641 */
+	{ 0,	0,	NULL,			NULL		}, /* 2642 */
+	{ 0,	0,	NULL,			NULL		}, /* 2643 */
+	{ 0,	0,	NULL,			NULL		}, /* 2644 */
+	{ 0,	0,	NULL,			NULL		}, /* 2645 */
+	{ 0,	0,	NULL,			NULL		}, /* 2646 */
+	{ 0,	0,	NULL,			NULL		}, /* 2647 */
+	{ 0,	0,	NULL,			NULL		}, /* 2648 */
+	{ 0,	0,	NULL,			NULL		}, /* 2649 */
+	{ 0,	0,	NULL,			NULL		}, /* 2650 */
+	{ 0,	0,	NULL,			NULL		}, /* 2651 */
+	{ 0,	0,	NULL,			NULL		}, /* 2652 */
+	{ 0,	0,	NULL,			NULL		}, /* 2653 */
+	{ 0,	0,	NULL,			NULL		}, /* 2654 */
+	{ 0,	0,	NULL,			NULL		}, /* 2655 */
+	{ 0,	0,	NULL,			NULL		}, /* 2656 */
+	{ 0,	0,	NULL,			NULL		}, /* 2657 */
+	{ 0,	0,	NULL,			NULL		}, /* 2658 */
+	{ 0,	0,	NULL,			NULL		}, /* 2659 */
+	{ 0,	0,	NULL,			NULL		}, /* 2660 */
+	{ 0,	0,	NULL,			NULL		}, /* 2661 */
+	{ 0,	0,	NULL,			NULL		}, /* 2662 */
+	{ 0,	0,	NULL,			NULL		}, /* 2663 */
+	{ 0,	0,	NULL,			NULL		}, /* 2664 */
+	{ 0,	0,	NULL,			NULL		}, /* 2665 */
+	{ 0,	0,	NULL,			NULL		}, /* 2666 */
+	{ 0,	0,	NULL,			NULL		}, /* 2667 */
+	{ 0,	0,	NULL,			NULL		}, /* 2668 */
+	{ 0,	0,	NULL,			NULL		}, /* 2669 */
+	{ 0,	0,	NULL,			NULL		}, /* 2670 */
+	{ 0,	0,	NULL,			NULL		}, /* 2671 */
+	{ 0,	0,	NULL,			NULL		}, /* 2672 */
+	{ 0,	0,	NULL,			NULL		}, /* 2673 */
+	{ 0,	0,	NULL,			NULL		}, /* 2674 */
+	{ 0,	0,	NULL,			NULL		}, /* 2675 */
+	{ 0,	0,	NULL,			NULL		}, /* 2676 */
+	{ 0,	0,	NULL,			NULL		}, /* 2677 */
+	{ 0,	0,	NULL,			NULL		}, /* 2678 */
+	{ 0,	0,	NULL,			NULL		}, /* 2679 */
+	{ 0,	0,	NULL,			NULL		}, /* 2680 */
+	{ 0,	0,	NULL,			NULL		}, /* 2681 */
+	{ 0,	0,	NULL,			NULL		}, /* 2682 */
+	{ 0,	0,	NULL,			NULL		}, /* 2683 */
+	{ 0,	0,	NULL,			NULL		}, /* 2684 */
+	{ 0,	0,	NULL,			NULL		}, /* 2685 */
+	{ 0,	0,	NULL,			NULL		}, /* 2686 */
+	{ 0,	0,	NULL,			NULL		}, /* 2687 */
+	{ 0,	0,	NULL,			NULL		}, /* 2688 */
+	{ 0,	0,	NULL,			NULL		}, /* 2689 */
+	{ 0,	0,	NULL,			NULL		}, /* 2690 */
+	{ 0,	0,	NULL,			NULL		}, /* 2691 */
+	{ 0,	0,	NULL,			NULL		}, /* 2692 */
+	{ 0,	0,	NULL,			NULL		}, /* 2693 */
+	{ 0,	0,	NULL,			NULL		}, /* 2694 */
+	{ 0,	0,	NULL,			NULL		}, /* 2695 */
+	{ 0,	0,	NULL,			NULL		}, /* 2696 */
+	{ 0,	0,	NULL,			NULL		}, /* 2697 */
+	{ 0,	0,	NULL,			NULL		}, /* 2698 */
+	{ 0,	0,	NULL,			NULL		}, /* 2699 */
+	{ 0,	0,	NULL,			NULL		}, /* 2700 */
+	{ 0,	0,	NULL,			NULL		}, /* 2701 */
+	{ 0,	0,	NULL,			NULL		}, /* 2702 */
+	{ 0,	0,	NULL,			NULL		}, /* 2703 */
+	{ 0,	0,	NULL,			NULL		}, /* 2704 */
+	{ 0,	0,	NULL,			NULL		}, /* 2705 */
+	{ 0,	0,	NULL,			NULL		}, /* 2706 */
+	{ 0,	0,	NULL,			NULL		}, /* 2707 */
+	{ 0,	0,	NULL,			NULL		}, /* 2708 */
+	{ 0,	0,	NULL,			NULL		}, /* 2709 */
+	{ 0,	0,	NULL,			NULL		}, /* 2710 */
+	{ 0,	0,	NULL,			NULL		}, /* 2711 */
+	{ 0,	0,	NULL,			NULL		}, /* 2712 */
+	{ 0,	0,	NULL,			NULL		}, /* 2713 */
+	{ 0,	0,	NULL,			NULL		}, /* 2714 */
+	{ 0,	0,	NULL,			NULL		}, /* 2715 */
+	{ 0,	0,	NULL,			NULL		}, /* 2716 */
+	{ 0,	0,	NULL,			NULL		}, /* 2717 */
+	{ 0,	0,	NULL,			NULL		}, /* 2718 */
+	{ 0,	0,	NULL,			NULL		}, /* 2719 */
+	{ 0,	0,	NULL,			NULL		}, /* 2720 */
+	{ 0,	0,	NULL,			NULL		}, /* 2721 */
+	{ 0,	0,	NULL,			NULL		}, /* 2722 */
+	{ 0,	0,	NULL,			NULL		}, /* 2723 */
+	{ 0,	0,	NULL,			NULL		}, /* 2724 */
+	{ 0,	0,	NULL,			NULL		}, /* 2725 */
+	{ 0,	0,	NULL,			NULL		}, /* 2726 */
+	{ 0,	0,	NULL,			NULL		}, /* 2727 */
+	{ 0,	0,	NULL,			NULL		}, /* 2728 */
+	{ 0,	0,	NULL,			NULL		}, /* 2729 */
+	{ 0,	0,	NULL,			NULL		}, /* 2730 */
+	{ 0,	0,	NULL,			NULL		}, /* 2731 */
+	{ 0,	0,	NULL,			NULL		}, /* 2732 */
+	{ 0,	0,	NULL,			NULL		}, /* 2733 */
+	{ 0,	0,	NULL,			NULL		}, /* 2734 */
+	{ 0,	0,	NULL,			NULL		}, /* 2735 */
+	{ 0,	0,	NULL,			NULL		}, /* 2736 */
+	{ 0,	0,	NULL,			NULL		}, /* 2737 */
+	{ 0,	0,	NULL,			NULL		}, /* 2738 */
+	{ 0,	0,	NULL,			NULL		}, /* 2739 */
+	{ 0,	0,	NULL,			NULL		}, /* 2740 */
+	{ 0,	0,	NULL,			NULL		}, /* 2741 */
+	{ 0,	0,	NULL,			NULL		}, /* 2742 */
+	{ 0,	0,	NULL,			NULL		}, /* 2743 */
+	{ 0,	0,	NULL,			NULL		}, /* 2744 */
+	{ 0,	0,	NULL,			NULL		}, /* 2745 */
+	{ 0,	0,	NULL,			NULL		}, /* 2746 */
+	{ 0,	0,	NULL,			NULL		}, /* 2747 */
+	{ 0,	0,	NULL,			NULL		}, /* 2748 */
+	{ 0,	0,	NULL,			NULL		}, /* 2749 */
+	{ 0,	0,	NULL,			NULL		}, /* 2750 */
+	{ 0,	0,	NULL,			NULL		}, /* 2751 */
+	{ 0,	0,	NULL,			NULL		}, /* 2752 */
+	{ 0,	0,	NULL,			NULL		}, /* 2753 */
+	{ 0,	0,	NULL,			NULL		}, /* 2754 */
+	{ 0,	0,	NULL,			NULL		}, /* 2755 */
+	{ 0,	0,	NULL,			NULL		}, /* 2756 */
+	{ 0,	0,	NULL,			NULL		}, /* 2757 */
+	{ 0,	0,	NULL,			NULL		}, /* 2758 */
+	{ 0,	0,	NULL,			NULL		}, /* 2759 */
+	{ 0,	0,	NULL,			NULL		}, /* 2760 */
+	{ 0,	0,	NULL,			NULL		}, /* 2761 */
+	{ 0,	0,	NULL,			NULL		}, /* 2762 */
+	{ 0,	0,	NULL,			NULL		}, /* 2763 */
+	{ 0,	0,	NULL,			NULL		}, /* 2764 */
+	{ 0,	0,	NULL,			NULL		}, /* 2765 */
+	{ 0,	0,	NULL,			NULL		}, /* 2766 */
+	{ 0,	0,	NULL,			NULL		}, /* 2767 */
+	{ 0,	0,	NULL,			NULL		}, /* 2768 */
+	{ 0,	0,	NULL,			NULL		}, /* 2769 */
+	{ 0,	0,	NULL,			NULL		}, /* 2770 */
+	{ 0,	0,	NULL,			NULL		}, /* 2771 */
+	{ 0,	0,	NULL,			NULL		}, /* 2772 */
+	{ 0,	0,	NULL,			NULL		}, /* 2773 */
+	{ 0,	0,	NULL,			NULL		}, /* 2774 */
+	{ 0,	0,	NULL,			NULL		}, /* 2775 */
+	{ 0,	0,	NULL,			NULL		}, /* 2776 */
+	{ 0,	0,	NULL,			NULL		}, /* 2777 */
+	{ 0,	0,	NULL,			NULL		}, /* 2778 */
+	{ 0,	0,	NULL,			NULL		}, /* 2779 */
+	{ 0,	0,	NULL,			NULL		}, /* 2780 */
+	{ 0,	0,	NULL,			NULL		}, /* 2781 */
+	{ 0,	0,	NULL,			NULL		}, /* 2782 */
+	{ 0,	0,	NULL,			NULL		}, /* 2783 */
+	{ 0,	0,	NULL,			NULL		}, /* 2784 */
+	{ 0,	0,	NULL,			NULL		}, /* 2785 */
+	{ 0,	0,	NULL,			NULL		}, /* 2786 */
+	{ 0,	0,	NULL,			NULL		}, /* 2787 */
+	{ 0,	0,	NULL,			NULL		}, /* 2788 */
+	{ 0,	0,	NULL,			NULL		}, /* 2789 */
+	{ 0,	0,	NULL,			NULL		}, /* 2790 */
+	{ 0,	0,	NULL,			NULL		}, /* 2791 */
+	{ 0,	0,	NULL,			NULL		}, /* 2792 */
+	{ 0,	0,	NULL,			NULL		}, /* 2793 */
+	{ 0,	0,	NULL,			NULL		}, /* 2794 */
+	{ 0,	0,	NULL,			NULL		}, /* 2795 */
+	{ 0,	0,	NULL,			NULL		}, /* 2796 */
+	{ 0,	0,	NULL,			NULL		}, /* 2797 */
+	{ 0,	0,	NULL,			NULL		}, /* 2798 */
+	{ 0,	0,	NULL,			NULL		}, /* 2799 */
+	{ 0,	0,	NULL,			NULL		}, /* 2800 */
+	{ 0,	0,	NULL,			NULL		}, /* 2801 */
+	{ 0,	0,	NULL,			NULL		}, /* 2802 */
+	{ 0,	0,	NULL,			NULL		}, /* 2803 */
+	{ 0,	0,	NULL,			NULL		}, /* 2804 */
+	{ 0,	0,	NULL,			NULL		}, /* 2805 */
+	{ 0,	0,	NULL,			NULL		}, /* 2806 */
+	{ 0,	0,	NULL,			NULL		}, /* 2807 */
+	{ 0,	0,	NULL,			NULL		}, /* 2808 */
+	{ 0,	0,	NULL,			NULL		}, /* 2809 */
+	{ 0,	0,	NULL,			NULL		}, /* 2810 */
+	{ 0,	0,	NULL,			NULL		}, /* 2811 */
+	{ 0,	0,	NULL,			NULL		}, /* 2812 */
+	{ 0,	0,	NULL,			NULL		}, /* 2813 */
+	{ 0,	0,	NULL,			NULL		}, /* 2814 */
+	{ 0,	0,	NULL,			NULL		}, /* 2815 */
+	{ 0,	0,	NULL,			NULL		}, /* 2816 */
+	{ 0,	0,	NULL,			NULL		}, /* 2817 */
+	{ 0,	0,	NULL,			NULL		}, /* 2818 */
+	{ 0,	0,	NULL,			NULL		}, /* 2819 */
+	{ 0,	0,	NULL,			NULL		}, /* 2820 */
+	{ 0,	0,	NULL,			NULL		}, /* 2821 */
+	{ 0,	0,	NULL,			NULL		}, /* 2822 */
+	{ 0,	0,	NULL,			NULL		}, /* 2823 */
+	{ 0,	0,	NULL,			NULL		}, /* 2824 */
+	{ 0,	0,	NULL,			NULL		}, /* 2825 */
+	{ 0,	0,	NULL,			NULL		}, /* 2826 */
+	{ 0,	0,	NULL,			NULL		}, /* 2827 */
+	{ 0,	0,	NULL,			NULL		}, /* 2828 */
+	{ 0,	0,	NULL,			NULL		}, /* 2829 */
+	{ 0,	0,	NULL,			NULL		}, /* 2830 */
+	{ 0,	0,	NULL,			NULL		}, /* 2831 */
+	{ 0,	0,	NULL,			NULL		}, /* 2832 */
+	{ 0,	0,	NULL,			NULL		}, /* 2833 */
+	{ 0,	0,	NULL,			NULL		}, /* 2834 */
+	{ 0,	0,	NULL,			NULL		}, /* 2835 */
+	{ 0,	0,	NULL,			NULL		}, /* 2836 */
+	{ 0,	0,	NULL,			NULL		}, /* 2837 */
+	{ 0,	0,	NULL,			NULL		}, /* 2838 */
+	{ 0,	0,	NULL,			NULL		}, /* 2839 */
+	{ 0,	0,	NULL,			NULL		}, /* 2840 */
+	{ 0,	0,	NULL,			NULL		}, /* 2841 */
+	{ 0,	0,	NULL,			NULL		}, /* 2842 */
+	{ 0,	0,	NULL,			NULL		}, /* 2843 */
+	{ 0,	0,	NULL,			NULL		}, /* 2844 */
+	{ 0,	0,	NULL,			NULL		}, /* 2845 */
+	{ 0,	0,	NULL,			NULL		}, /* 2846 */
+	{ 0,	0,	NULL,			NULL		}, /* 2847 */
+	{ 0,	0,	NULL,			NULL		}, /* 2848 */
+	{ 0,	0,	NULL,			NULL		}, /* 2849 */
+	{ 0,	0,	NULL,			NULL		}, /* 2850 */
+	{ 0,	0,	NULL,			NULL		}, /* 2851 */
+	{ 0,	0,	NULL,			NULL		}, /* 2852 */
+	{ 0,	0,	NULL,			NULL		}, /* 2853 */
+	{ 0,	0,	NULL,			NULL		}, /* 2854 */
+	{ 0,	0,	NULL,			NULL		}, /* 2855 */
+	{ 0,	0,	NULL,			NULL		}, /* 2856 */
+	{ 0,	0,	NULL,			NULL		}, /* 2857 */
+	{ 0,	0,	NULL,			NULL		}, /* 2858 */
+	{ 0,	0,	NULL,			NULL		}, /* 2859 */
+	{ 0,	0,	NULL,			NULL		}, /* 2860 */
+	{ 0,	0,	NULL,			NULL		}, /* 2861 */
+	{ 0,	0,	NULL,			NULL		}, /* 2862 */
+	{ 0,	0,	NULL,			NULL		}, /* 2863 */
+	{ 0,	0,	NULL,			NULL		}, /* 2864 */
+	{ 0,	0,	NULL,			NULL		}, /* 2865 */
+	{ 0,	0,	NULL,			NULL		}, /* 2866 */
+	{ 0,	0,	NULL,			NULL		}, /* 2867 */
+	{ 0,	0,	NULL,			NULL		}, /* 2868 */
+	{ 0,	0,	NULL,			NULL		}, /* 2869 */
+	{ 0,	0,	NULL,			NULL		}, /* 2870 */
+	{ 0,	0,	NULL,			NULL		}, /* 2871 */
+	{ 0,	0,	NULL,			NULL		}, /* 2872 */
+	{ 0,	0,	NULL,			NULL		}, /* 2873 */
+	{ 0,	0,	NULL,			NULL		}, /* 2874 */
+	{ 0,	0,	NULL,			NULL		}, /* 2875 */
+	{ 0,	0,	NULL,			NULL		}, /* 2876 */
+	{ 0,	0,	NULL,			NULL		}, /* 2877 */
+	{ 0,	0,	NULL,			NULL		}, /* 2878 */
+	{ 0,	0,	NULL,			NULL		}, /* 2879 */
+	{ 0,	0,	NULL,			NULL		}, /* 2880 */
+	{ 0,	0,	NULL,			NULL		}, /* 2881 */
+	{ 0,	0,	NULL,			NULL		}, /* 2882 */
+	{ 0,	0,	NULL,			NULL		}, /* 2883 */
+	{ 0,	0,	NULL,			NULL		}, /* 2884 */
+	{ 0,	0,	NULL,			NULL		}, /* 2885 */
+	{ 0,	0,	NULL,			NULL		}, /* 2886 */
+	{ 0,	0,	NULL,			NULL		}, /* 2887 */
+	{ 0,	0,	NULL,			NULL		}, /* 2888 */
+	{ 0,	0,	NULL,			NULL		}, /* 2889 */
+	{ 0,	0,	NULL,			NULL		}, /* 2890 */
+	{ 0,	0,	NULL,			NULL		}, /* 2891 */
+	{ 0,	0,	NULL,			NULL		}, /* 2892 */
+	{ 0,	0,	NULL,			NULL		}, /* 2893 */
+	{ 0,	0,	NULL,			NULL		}, /* 2894 */
+	{ 0,	0,	NULL,			NULL		}, /* 2895 */
+	{ 0,	0,	NULL,			NULL		}, /* 2896 */
+	{ 0,	0,	NULL,			NULL		}, /* 2897 */
+	{ 0,	0,	NULL,			NULL		}, /* 2898 */
+	{ 0,	0,	NULL,			NULL		}, /* 2899 */
+	{ 0,	0,	NULL,			NULL		}, /* 2900 */
+	{ 0,	0,	NULL,			NULL		}, /* 2901 */
+	{ 0,	0,	NULL,			NULL		}, /* 2902 */
+	{ 0,	0,	NULL,			NULL		}, /* 2903 */
+	{ 0,	0,	NULL,			NULL		}, /* 2904 */
+	{ 0,	0,	NULL,			NULL		}, /* 2905 */
+	{ 0,	0,	NULL,			NULL		}, /* 2906 */
+	{ 0,	0,	NULL,			NULL		}, /* 2907 */
+	{ 0,	0,	NULL,			NULL		}, /* 2908 */
+	{ 0,	0,	NULL,			NULL		}, /* 2909 */
+	{ 0,	0,	NULL,			NULL		}, /* 2910 */
+	{ 0,	0,	NULL,			NULL		}, /* 2911 */
+	{ 0,	0,	NULL,			NULL		}, /* 2912 */
+	{ 0,	0,	NULL,			NULL		}, /* 2913 */
+	{ 0,	0,	NULL,			NULL		}, /* 2914 */
+	{ 0,	0,	NULL,			NULL		}, /* 2915 */
+	{ 0,	0,	NULL,			NULL		}, /* 2916 */
+	{ 0,	0,	NULL,			NULL		}, /* 2917 */
+	{ 0,	0,	NULL,			NULL		}, /* 2918 */
+	{ 0,	0,	NULL,			NULL		}, /* 2919 */
+	{ 0,	0,	NULL,			NULL		}, /* 2920 */
+	{ 0,	0,	NULL,			NULL		}, /* 2921 */
+	{ 0,	0,	NULL,			NULL		}, /* 2922 */
+	{ 0,	0,	NULL,			NULL		}, /* 2923 */
+	{ 0,	0,	NULL,			NULL		}, /* 2924 */
+	{ 0,	0,	NULL,			NULL		}, /* 2925 */
+	{ 0,	0,	NULL,			NULL		}, /* 2926 */
+	{ 0,	0,	NULL,			NULL		}, /* 2927 */
+	{ 0,	0,	NULL,			NULL		}, /* 2928 */
+	{ 0,	0,	NULL,			NULL		}, /* 2929 */
+	{ 0,	0,	NULL,			NULL		}, /* 2930 */
+	{ 0,	0,	NULL,			NULL		}, /* 2931 */
+	{ 0,	0,	NULL,			NULL		}, /* 2932 */
+	{ 0,	0,	NULL,			NULL		}, /* 2933 */
+	{ 0,	0,	NULL,			NULL		}, /* 2934 */
+	{ 0,	0,	NULL,			NULL		}, /* 2935 */
+	{ 0,	0,	NULL,			NULL		}, /* 2936 */
+	{ 0,	0,	NULL,			NULL		}, /* 2937 */
+	{ 0,	0,	NULL,			NULL		}, /* 2938 */
+	{ 0,	0,	NULL,			NULL		}, /* 2939 */
+	{ 0,	0,	NULL,			NULL		}, /* 2940 */
+	{ 0,	0,	NULL,			NULL		}, /* 2941 */
+	{ 0,	0,	NULL,			NULL		}, /* 2942 */
+	{ 0,	0,	NULL,			NULL		}, /* 2943 */
+	{ 0,	0,	NULL,			NULL		}, /* 2944 */
+	{ 0,	0,	NULL,			NULL		}, /* 2945 */
+	{ 0,	0,	NULL,			NULL		}, /* 2946 */
+	{ 0,	0,	NULL,			NULL		}, /* 2947 */
+	{ 0,	0,	NULL,			NULL		}, /* 2948 */
+	{ 0,	0,	NULL,			NULL		}, /* 2949 */
+	{ 0,	0,	NULL,			NULL		}, /* 2950 */
+	{ 0,	0,	NULL,			NULL		}, /* 2951 */
+	{ 0,	0,	NULL,			NULL		}, /* 2952 */
+	{ 0,	0,	NULL,			NULL		}, /* 2953 */
+	{ 0,	0,	NULL,			NULL		}, /* 2954 */
+	{ 0,	0,	NULL,			NULL		}, /* 2955 */
+	{ 0,	0,	NULL,			NULL		}, /* 2956 */
+	{ 0,	0,	NULL,			NULL		}, /* 2957 */
+	{ 0,	0,	NULL,			NULL		}, /* 2958 */
+	{ 0,	0,	NULL,			NULL		}, /* 2959 */
+	{ 0,	0,	NULL,			NULL		}, /* 2960 */
+	{ 0,	0,	NULL,			NULL		}, /* 2961 */
+	{ 0,	0,	NULL,			NULL		}, /* 2962 */
+	{ 0,	0,	NULL,			NULL		}, /* 2963 */
+	{ 0,	0,	NULL,			NULL		}, /* 2964 */
+	{ 0,	0,	NULL,			NULL		}, /* 2965 */
+	{ 0,	0,	NULL,			NULL		}, /* 2966 */
+	{ 0,	0,	NULL,			NULL		}, /* 2967 */
+	{ 0,	0,	NULL,			NULL		}, /* 2968 */
+	{ 0,	0,	NULL,			NULL		}, /* 2969 */
+	{ 0,	0,	NULL,			NULL		}, /* 2970 */
+	{ 0,	0,	NULL,			NULL		}, /* 2971 */
+	{ 0,	0,	NULL,			NULL		}, /* 2972 */
+	{ 0,	0,	NULL,			NULL		}, /* 2973 */
+	{ 0,	0,	NULL,			NULL		}, /* 2974 */
+	{ 0,	0,	NULL,			NULL		}, /* 2975 */
+	{ 0,	0,	NULL,			NULL		}, /* 2976 */
+	{ 0,	0,	NULL,			NULL		}, /* 2977 */
+	{ 0,	0,	NULL,			NULL		}, /* 2978 */
+	{ 0,	0,	NULL,			NULL		}, /* 2979 */
+	{ 0,	0,	NULL,			NULL		}, /* 2980 */
+	{ 0,	0,	NULL,			NULL		}, /* 2981 */
+	{ 0,	0,	NULL,			NULL		}, /* 2982 */
+	{ 0,	0,	NULL,			NULL		}, /* 2983 */
+	{ 0,	0,	NULL,			NULL		}, /* 2984 */
+	{ 0,	0,	NULL,			NULL		}, /* 2985 */
+	{ 0,	0,	NULL,			NULL		}, /* 2986 */
+	{ 0,	0,	NULL,			NULL		}, /* 2987 */
+	{ 0,	0,	NULL,			NULL		}, /* 2988 */
+	{ 0,	0,	NULL,			NULL		}, /* 2989 */
+	{ 0,	0,	NULL,			NULL		}, /* 2990 */
+	{ 0,	0,	NULL,			NULL		}, /* 2991 */
+	{ 0,	0,	NULL,			NULL		}, /* 2992 */
+	{ 0,	0,	NULL,			NULL		}, /* 2993 */
+	{ 0,	0,	NULL,			NULL		}, /* 2994 */
+	{ 0,	0,	NULL,			NULL		}, /* 2995 */
+	{ 0,	0,	NULL,			NULL		}, /* 2996 */
+	{ 0,	0,	NULL,			NULL		}, /* 2997 */
+	{ 0,	0,	NULL,			NULL		}, /* 2998 */
+	{ 0,	0,	NULL,			NULL		}, /* 2999 */ /* end of BSD 4.3 */
 	{ 0,	0,	printargs,		"posix_syscall"	}, /* 3000 */ /* start of POSIX */
 	{ 0,	0,	printargs,		"posix_exit"	}, /* 3001 */
 	{ 0,	0,	printargs,		"posix_fork"	}, /* 3002 */
@@ -3058,24 +3058,24 @@
 	{ 0,	0,	printargs,		"posix_uadmin"	}, /* 3055 */
 	{ 0,	0,	printargs,		"posix_exch"	}, /* 3056 */
 	{ 0,	0,	printargs,		"posix_utssys"	}, /* 3057 */
-	{ 0,	0,	printargs,		"SYS_3058",	}, /* 3058 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3058 */
 	{ 0,	0,	printargs,		"posix_exece"	}, /* 3059 */
 	{ 0,	0,	printargs,		"posix_umask"	}, /* 3060 */
 	{ 0,	0,	printargs,		"posix_chroot"	}, /* 3061 */
 	{ 0,	0,	printargs,		"posix_fcntl"	}, /* 3062 */
 	{ 0,	0,	printargs,		"posix_ulimit"	}, /* 3063 */
-	{ 0,	0,	printargs,		"SYS_3064",	}, /* 3064 */
-	{ 0,	0,	printargs,		"SYS_3065",	}, /* 3065 */
-	{ 0,	0,	printargs,		"SYS_3066",	}, /* 3066 */
-	{ 0,	0,	printargs,		"SYS_3067",	}, /* 3067 */
-	{ 0,	0,	printargs,		"SYS_3068",	}, /* 3068 */
-	{ 0,	0,	printargs,		"SYS_3069",	}, /* 3069 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3064 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3065 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3066 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3067 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3068 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3069 */
 	{ 0,	0,	printargs,		"posix_advfs"	}, /* 3070 */
 	{ 0,	0,	printargs,		"posix_unadvfs"	}, /* 3071 */
 	{ 0,	0,	printargs,		"posix_rmount"	}, /* 3072 */
 	{ 0,	0,	printargs,		"posix_rumount"	}, /* 3073 */
 	{ 0,	0,	printargs,		"posix_rfstart"	}, /* 3074 */
-	{ 0,	0,	printargs,		"SYS_3075",	}, /* 3075 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3075 */
 	{ 0,	0,	printargs,		"posix_rdebug"	}, /* 3076 */
 	{ 0,	0,	printargs,		"posix_rfstop"	}, /* 3077 */
 	{ 0,	0,	printargs,		"posix_rfsys"	}, /* 3078 */
@@ -3132,7 +3132,7 @@
 	{ 0,	0,	printargs,		"posix_SGI_sproc"	}, /* 3129 */
 	{ 0,	0,	printargs,		"posix_SGI_prctl"	}, /* 3130 */
 	{ 0,	0,	printargs,		"posix_SGI_blkproc"	}, /* 3131 */
-	{ 0,	0,	printargs,		"SYS_3132",	}, /* 3132 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3132 */
 	{ 0,	0,	printargs,		"posix_SGI_sgigsc"	}, /* 3133 */
 	{ 0,	0,	printargs,		"posix_SGI_mmap"	}, /* 3134 */
 	{ 0,	0,	printargs,		"posix_SGI_munmap"	}, /* 3135 */
@@ -3145,11 +3145,11 @@
 	{ 0,	0,	printargs,		"posix_SGI_libdetach"	}, /* 3142 */
 	{ 0,	0,	printargs,		"posix_SGI_getpgrp"	}, /* 3143 */
 	{ 0,	0,	printargs,		"posix_SGI_setpgrp"	}, /* 3144 */
-	{ 0,	0,	printargs,		"SYS_3145",	}, /* 3145 */
-	{ 0,	0,	printargs,		"SYS_3146",	}, /* 3146 */
-	{ 0,	0,	printargs,		"SYS_3147",	}, /* 3147 */
-	{ 0,	0,	printargs,		"SYS_3148",	}, /* 3148 */
-	{ 0,	0,	printargs,		"SYS_3149",	}, /* 3149 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3145 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3146 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3147 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3148 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3149 */
 	{ 0,	0,	printargs,		"posix_cacheflush"	}, /* 3150 */
 	{ 0,	0,	printargs,		"posix_cachectl"	}, /* 3151 */
 	{ 0,	0,	printargs,		"posix_fchown"	}, /* 3152 */
@@ -3170,96 +3170,96 @@
 	{ 0,	0,	printargs,		"posix_setrlimit"	}, /* 3167 */
 	{ 0,	0,	printargs,		"posix_waitpid"	}, /* 3168 */
 	{ 0,	0,	printargs,		"posix_dup2"	}, /* 3169 */
-	{ 0,	0,	printargs,		"SYS_3170",	}, /* 3170 */
-	{ 0,	0,	printargs,		"SYS_3171",	}, /* 3171 */
-	{ 0,	0,	printargs,		"SYS_3172",	}, /* 3172 */
-	{ 0,	0,	printargs,		"SYS_3173",	}, /* 3173 */
-	{ 0,	0,	printargs,		"SYS_3174",	}, /* 3174 */
-	{ 0,	0,	printargs,		"SYS_3175",	}, /* 3175 */
-	{ 0,	0,	printargs,		"SYS_3176",	}, /* 3176 */
-	{ 0,	0,	printargs,		"SYS_3177",	}, /* 3177 */
-	{ 0,	0,	printargs,		"SYS_3178",	}, /* 3178 */
-	{ 0,	0,	printargs,		"SYS_3179",	}, /* 3179 */
-	{ 0,	0,	printargs,		"SYS_3180",	}, /* 3180 */
-	{ 0,	0,	printargs,		"SYS_3181",	}, /* 3181 */
-	{ 0,	0,	printargs,		"SYS_3182",	}, /* 3182 */
-	{ 0,	0,	printargs,		"SYS_3183",	}, /* 3183 */
-	{ 0,	0,	printargs,		"SYS_3184",	}, /* 3184 */
-	{ 0,	0,	printargs,		"SYS_3185",	}, /* 3185 */
-	{ 0,	0,	printargs,		"SYS_3186",	}, /* 3186 */
-	{ 0,	0,	printargs,		"SYS_3187",	}, /* 3187 */
-	{ 0,	0,	printargs,		"SYS_3188",	}, /* 3188 */
-	{ 0,	0,	printargs,		"SYS_3189",	}, /* 3189 */
-	{ 0,	0,	printargs,		"SYS_3190",	}, /* 3190 */
-	{ 0,	0,	printargs,		"SYS_3191",	}, /* 3191 */
-	{ 0,	0,	printargs,		"SYS_3192",	}, /* 3192 */
-	{ 0,	0,	printargs,		"SYS_3193",	}, /* 3193 */
-	{ 0,	0,	printargs,		"SYS_3194",	}, /* 3194 */
-	{ 0,	0,	printargs,		"SYS_3195",	}, /* 3195 */
-	{ 0,	0,	printargs,		"SYS_3196",	}, /* 3196 */
-	{ 0,	0,	printargs,		"SYS_3197",	}, /* 3197 */
-	{ 0,	0,	printargs,		"SYS_3198",	}, /* 3198 */
-	{ 0,	0,	printargs,		"SYS_3199",	}, /* 3199 */
-	{ 0,	0,	printargs,		"SYS_3200",	}, /* 3200 */
-	{ 0,	0,	printargs,		"SYS_3201",	}, /* 3201 */
-	{ 0,	0,	printargs,		"SYS_3202",	}, /* 3202 */
-	{ 0,	0,	printargs,		"SYS_3203",	}, /* 3203 */
-	{ 0,	0,	printargs,		"SYS_3204",	}, /* 3204 */
-	{ 0,	0,	printargs,		"SYS_3205",	}, /* 3205 */
-	{ 0,	0,	printargs,		"SYS_3206",	}, /* 3206 */
-	{ 0,	0,	printargs,		"SYS_3207",	}, /* 3207 */
-	{ 0,	0,	printargs,		"SYS_3208",	}, /* 3208 */
-	{ 0,	0,	printargs,		"SYS_3209",	}, /* 3209 */
-	{ 0,	0,	printargs,		"SYS_3210",	}, /* 3210 */
-	{ 0,	0,	printargs,		"SYS_3211",	}, /* 3211 */
-	{ 0,	0,	printargs,		"SYS_3212",	}, /* 3212 */
-	{ 0,	0,	printargs,		"SYS_3213",	}, /* 3213 */
-	{ 0,	0,	printargs,		"SYS_3214",	}, /* 3214 */
-	{ 0,	0,	printargs,		"SYS_3215",	}, /* 3215 */
-	{ 0,	0,	printargs,		"SYS_3216",	}, /* 3216 */
-	{ 0,	0,	printargs,		"SYS_3217",	}, /* 3217 */
-	{ 0,	0,	printargs,		"SYS_3218",	}, /* 3218 */
-	{ 0,	0,	printargs,		"SYS_3219",	}, /* 3219 */
-	{ 0,	0,	printargs,		"SYS_3220",	}, /* 3220 */
-	{ 0,	0,	printargs,		"SYS_3221",	}, /* 3221 */
-	{ 0,	0,	printargs,		"SYS_3222",	}, /* 3222 */
-	{ 0,	0,	printargs,		"SYS_3223",	}, /* 3223 */
-	{ 0,	0,	printargs,		"SYS_3224",	}, /* 3224 */
-	{ 0,	0,	printargs,		"SYS_3225",	}, /* 3225 */
-	{ 0,	0,	printargs,		"SYS_3226",	}, /* 3226 */
-	{ 0,	0,	printargs,		"SYS_3227",	}, /* 3227 */
-	{ 0,	0,	printargs,		"SYS_3228",	}, /* 3228 */
-	{ 0,	0,	printargs,		"SYS_3229",	}, /* 3229 */
-	{ 0,	0,	printargs,		"SYS_3230",	}, /* 3230 */
-	{ 0,	0,	printargs,		"SYS_3231",	}, /* 3231 */
-	{ 0,	0,	printargs,		"SYS_3232",	}, /* 3232 */
-	{ 0,	0,	printargs,		"SYS_3233",	}, /* 3233 */
-	{ 0,	0,	printargs,		"SYS_3234",	}, /* 3234 */
-	{ 0,	0,	printargs,		"SYS_3235",	}, /* 3235 */
-	{ 0,	0,	printargs,		"SYS_3236",	}, /* 3236 */
-	{ 0,	0,	printargs,		"SYS_3237",	}, /* 3237 */
-	{ 0,	0,	printargs,		"SYS_3238",	}, /* 3238 */
-	{ 0,	0,	printargs,		"SYS_3239",	}, /* 3239 */
-	{ 0,	0,	printargs,		"SYS_3240",	}, /* 3240 */
-	{ 0,	0,	printargs,		"SYS_3241",	}, /* 3241 */
-	{ 0,	0,	printargs,		"SYS_3242",	}, /* 3242 */
-	{ 0,	0,	printargs,		"SYS_3243",	}, /* 3243 */
-	{ 0,	0,	printargs,		"SYS_3244",	}, /* 3244 */
-	{ 0,	0,	printargs,		"SYS_3245",	}, /* 3245 */
-	{ 0,	0,	printargs,		"SYS_3246",	}, /* 3246 */
-	{ 0,	0,	printargs,		"SYS_3247",	}, /* 3247 */
-	{ 0,	0,	printargs,		"SYS_3248",	}, /* 3248 */
-	{ 0,	0,	printargs,		"SYS_3249",	}, /* 3249 */
-	{ 0,	0,	printargs,		"SYS_3250",	}, /* 3250 */
-	{ 0,	0,	printargs,		"SYS_3251",	}, /* 3251 */
-	{ 0,	0,	printargs,		"SYS_3252",	}, /* 3252 */
-	{ 0,	0,	printargs,		"SYS_3253",	}, /* 3253 */
-	{ 0,	0,	printargs,		"SYS_3254",	}, /* 3254 */
-	{ 0,	0,	printargs,		"SYS_3255",	}, /* 3255 */
-	{ 0,	0,	printargs,		"SYS_3256",	}, /* 3256 */
-	{ 0,	0,	printargs,		"SYS_3257",	}, /* 3257 */
-	{ 0,	0,	printargs,		"SYS_3258",	}, /* 3258 */
-	{ 0,	0,	printargs,		"SYS_3259",	}, /* 3259 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3170 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3171 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3172 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3173 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3174 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3175 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3176 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3177 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3178 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3179 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3180 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3181 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3182 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3183 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3184 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3185 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3186 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3187 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3188 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3189 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3190 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3191 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3192 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3193 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3194 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3195 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3196 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3197 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3198 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3199 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3200 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3201 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3202 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3203 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3204 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3205 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3206 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3207 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3208 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3209 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3210 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3211 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3212 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3213 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3214 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3215 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3216 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3217 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3218 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3219 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3220 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3221 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3222 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3223 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3224 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3225 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3226 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3227 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3228 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3229 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3230 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3231 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3232 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3233 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3234 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3235 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3236 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3237 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3238 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3239 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3240 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3241 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3242 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3243 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3244 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3245 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3246 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3247 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3248 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3249 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3250 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3251 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3252 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3253 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3254 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3255 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3256 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3257 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3258 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3259 */
 	{ 0,	0,	printargs,		"posix_netboot"	}, /* 3260 */
 	{ 0,	0,	printargs,		"posix_netunboot"	}, /* 3261 */
 	{ 0,	0,	printargs,		"posix_rdump"	}, /* 3262 */
@@ -3269,740 +3269,740 @@
 	{ 0,	0,	printargs,		"posix_sigprocmask"	}, /* 3266 */
 	{ 0,	0,	printargs,		"posix_sigsuspend"	}, /* 3267 */
 	{ 0,	0,	printargs,		"posix_sigaction"	}, /* 3268 */
-	{ 0,	0,	printargs,		"SYS_3269",	}, /* 3269 */
-	{ 0,	0,	printargs,		"SYS_3270",	}, /* 3270 */
-	{ 0,	0,	printargs,		"SYS_3271",	}, /* 3271 */
-	{ 0,	0,	printargs,		"SYS_3272",	}, /* 3272 */
-	{ 0,	0,	printargs,		"SYS_3273",	}, /* 3273 */
-	{ 0,	0,	printargs,		"SYS_3274",	}, /* 3274 */
-	{ 0,	0,	printargs,		"SYS_3275",	}, /* 3275 */
-	{ 0,	0,	printargs,		"SYS_3276",	}, /* 3276 */
-	{ 0,	0,	printargs,		"SYS_3277",	}, /* 3277 */
-	{ 0,	0,	printargs,		"SYS_3278",	}, /* 3278 */
-	{ 0,	0,	printargs,		"SYS_3279",	}, /* 3279 */
-	{ 0,	0,	printargs,		"SYS_3280",	}, /* 3280 */
-	{ 0,	0,	printargs,		"SYS_3281",	}, /* 3281 */
-	{ 0,	0,	printargs,		"SYS_3282",	}, /* 3282 */
-	{ 0,	0,	printargs,		"SYS_3283",	}, /* 3283 */
-	{ 0,	0,	printargs,		"SYS_3284",	}, /* 3284 */
-	{ 0,	0,	printargs,		"SYS_3285",	}, /* 3285 */
-	{ 0,	0,	printargs,		"SYS_3286",	}, /* 3286 */
-	{ 0,	0,	printargs,		"SYS_3287",	}, /* 3287 */
-	{ 0,	0,	printargs,		"SYS_3288",	}, /* 3288 */
-	{ 0,	0,	printargs,		"SYS_3289",	}, /* 3289 */
-	{ 0,	0,	printargs,		"SYS_3290",	}, /* 3290 */
-	{ 0,	0,	printargs,		"SYS_3291",	}, /* 3291 */
-	{ 0,	0,	printargs,		"SYS_3292",	}, /* 3292 */
-	{ 0,	0,	printargs,		"SYS_3293",	}, /* 3293 */
-	{ 0,	0,	printargs,		"SYS_3294",	}, /* 3294 */
-	{ 0,	0,	printargs,		"SYS_3295",	}, /* 3295 */
-	{ 0,	0,	printargs,		"SYS_3296",	}, /* 3296 */
-	{ 0,	0,	printargs,		"SYS_3297",	}, /* 3297 */
-	{ 0,	0,	printargs,		"SYS_3298",	}, /* 3298 */
-	{ 0,	0,	printargs,		"SYS_3299",	}, /* 3299 */
-	{ 0,	0,	printargs,		"SYS_3300",	}, /* 3300 */
-	{ 0,	0,	printargs,		"SYS_3301",	}, /* 3301 */
-	{ 0,	0,	printargs,		"SYS_3302",	}, /* 3302 */
-	{ 0,	0,	printargs,		"SYS_3303",	}, /* 3303 */
-	{ 0,	0,	printargs,		"SYS_3304",	}, /* 3304 */
-	{ 0,	0,	printargs,		"SYS_3305",	}, /* 3305 */
-	{ 0,	0,	printargs,		"SYS_3306",	}, /* 3306 */
-	{ 0,	0,	printargs,		"SYS_3307",	}, /* 3307 */
-	{ 0,	0,	printargs,		"SYS_3308",	}, /* 3308 */
-	{ 0,	0,	printargs,		"SYS_3309",	}, /* 3309 */
-	{ 0,	0,	printargs,		"SYS_3310",	}, /* 3310 */
-	{ 0,	0,	printargs,		"SYS_3311",	}, /* 3311 */
-	{ 0,	0,	printargs,		"SYS_3312",	}, /* 3312 */
-	{ 0,	0,	printargs,		"SYS_3313",	}, /* 3313 */
-	{ 0,	0,	printargs,		"SYS_3314",	}, /* 3314 */
-	{ 0,	0,	printargs,		"SYS_3315",	}, /* 3315 */
-	{ 0,	0,	printargs,		"SYS_3316",	}, /* 3316 */
-	{ 0,	0,	printargs,		"SYS_3317",	}, /* 3317 */
-	{ 0,	0,	printargs,		"SYS_3318",	}, /* 3318 */
-	{ 0,	0,	printargs,		"SYS_3319",	}, /* 3319 */
-	{ 0,	0,	printargs,		"SYS_3320"	}, /* 3320 */
-	{ 0,	0,	printargs,		"SYS_3321"	}, /* 3321 */
-	{ 0,	0,	printargs,		"SYS_3322"	}, /* 3322 */
-	{ 0,	0,	printargs,		"SYS_3323"	}, /* 3323 */
-	{ 0,	0,	printargs,		"SYS_3324"	}, /* 3324 */
-	{ 0,	0,	printargs,		"SYS_3325"	}, /* 3325 */
-	{ 0,	0,	printargs,		"SYS_3326"	}, /* 3326 */
-	{ 0,	0,	printargs,		"SYS_3327"	}, /* 3327 */
-	{ 0,	0,	printargs,		"SYS_3328"	}, /* 3328 */
-	{ 0,	0,	printargs,		"SYS_3329"	}, /* 3329 */
-	{ 0,	0,	printargs,		"SYS_3330"	}, /* 3330 */
-	{ 0,	0,	printargs,		"SYS_3331"	}, /* 3331 */
-	{ 0,	0,	printargs,		"SYS_3332"	}, /* 3332 */
-	{ 0,	0,	printargs,		"SYS_3333"	}, /* 3333 */
-	{ 0,	0,	printargs,		"SYS_3334"	}, /* 3334 */
-	{ 0,	0,	printargs,		"SYS_3335"	}, /* 3335 */
-	{ 0,	0,	printargs,		"SYS_3336"	}, /* 3336 */
-	{ 0,	0,	printargs,		"SYS_3337"	}, /* 3337 */
-	{ 0,	0,	printargs,		"SYS_3338"	}, /* 3338 */
-	{ 0,	0,	printargs,		"SYS_3339"	}, /* 3339 */
-	{ 0,	0,	printargs,		"SYS_3340"	}, /* 3340 */
-	{ 0,	0,	printargs,		"SYS_3341"	}, /* 3341 */
-	{ 0,	0,	printargs,		"SYS_3342"	}, /* 3342 */
-	{ 0,	0,	printargs,		"SYS_3343"	}, /* 3343 */
-	{ 0,	0,	printargs,		"SYS_3344"	}, /* 3344 */
-	{ 0,	0,	printargs,		"SYS_3345"	}, /* 3345 */
-	{ 0,	0,	printargs,		"SYS_3346"	}, /* 3346 */
-	{ 0,	0,	printargs,		"SYS_3347"	}, /* 3347 */
-	{ 0,	0,	printargs,		"SYS_3348"	}, /* 3348 */
-	{ 0,	0,	printargs,		"SYS_3349"	}, /* 3349 */
-	{ 0,	0,	printargs,		"SYS_3350"	}, /* 3350 */
-	{ 0,	0,	printargs,		"SYS_3351"	}, /* 3351 */
-	{ 0,	0,	printargs,		"SYS_3352"	}, /* 3352 */
-	{ 0,	0,	printargs,		"SYS_3353"	}, /* 3353 */
-	{ 0,	0,	printargs,		"SYS_3354"	}, /* 3354 */
-	{ 0,	0,	printargs,		"SYS_3355"	}, /* 3355 */
-	{ 0,	0,	printargs,		"SYS_3356"	}, /* 3356 */
-	{ 0,	0,	printargs,		"SYS_3357"	}, /* 3357 */
-	{ 0,	0,	printargs,		"SYS_3358"	}, /* 3358 */
-	{ 0,	0,	printargs,		"SYS_3359"	}, /* 3359 */
-	{ 0,	0,	printargs,		"SYS_3360"	}, /* 3360 */
-	{ 0,	0,	printargs,		"SYS_3361"	}, /* 3361 */
-	{ 0,	0,	printargs,		"SYS_3362"	}, /* 3362 */
-	{ 0,	0,	printargs,		"SYS_3363"	}, /* 3363 */
-	{ 0,	0,	printargs,		"SYS_3364"	}, /* 3364 */
-	{ 0,	0,	printargs,		"SYS_3365"	}, /* 3365 */
-	{ 0,	0,	printargs,		"SYS_3366"	}, /* 3366 */
-	{ 0,	0,	printargs,		"SYS_3367"	}, /* 3367 */
-	{ 0,	0,	printargs,		"SYS_3368"	}, /* 3368 */
-	{ 0,	0,	printargs,		"SYS_3369"	}, /* 3369 */
-	{ 0,	0,	printargs,		"SYS_3370"	}, /* 3370 */
-	{ 0,	0,	printargs,		"SYS_3371"	}, /* 3371 */
-	{ 0,	0,	printargs,		"SYS_3372"	}, /* 3372 */
-	{ 0,	0,	printargs,		"SYS_3373"	}, /* 3373 */
-	{ 0,	0,	printargs,		"SYS_3374"	}, /* 3374 */
-	{ 0,	0,	printargs,		"SYS_3375"	}, /* 3375 */
-	{ 0,	0,	printargs,		"SYS_3376"	}, /* 3376 */
-	{ 0,	0,	printargs,		"SYS_3377"	}, /* 3377 */
-	{ 0,	0,	printargs,		"SYS_3378"	}, /* 3378 */
-	{ 0,	0,	printargs,		"SYS_3379"	}, /* 3379 */
-	{ 0,	0,	printargs,		"SYS_3380"	}, /* 3380 */
-	{ 0,	0,	printargs,		"SYS_3381"	}, /* 3381 */
-	{ 0,	0,	printargs,		"SYS_3382"	}, /* 3382 */
-	{ 0,	0,	printargs,		"SYS_3383"	}, /* 3383 */
-	{ 0,	0,	printargs,		"SYS_3384"	}, /* 3384 */
-	{ 0,	0,	printargs,		"SYS_3385"	}, /* 3385 */
-	{ 0,	0,	printargs,		"SYS_3386"	}, /* 3386 */
-	{ 0,	0,	printargs,		"SYS_3387"	}, /* 3387 */
-	{ 0,	0,	printargs,		"SYS_3388"	}, /* 3388 */
-	{ 0,	0,	printargs,		"SYS_3389"	}, /* 3389 */
-	{ 0,	0,	printargs,		"SYS_3390"	}, /* 3390 */
-	{ 0,	0,	printargs,		"SYS_3391"	}, /* 3391 */
-	{ 0,	0,	printargs,		"SYS_3392"	}, /* 3392 */
-	{ 0,	0,	printargs,		"SYS_3393"	}, /* 3393 */
-	{ 0,	0,	printargs,		"SYS_3394"	}, /* 3394 */
-	{ 0,	0,	printargs,		"SYS_3395"	}, /* 3395 */
-	{ 0,	0,	printargs,		"SYS_3396"	}, /* 3396 */
-	{ 0,	0,	printargs,		"SYS_3397"	}, /* 3397 */
-	{ 0,	0,	printargs,		"SYS_3398"	}, /* 3398 */
-	{ 0,	0,	printargs,		"SYS_3399"	}, /* 3399 */
-	{ 0,	0,	printargs,		"SYS_3400"	}, /* 3400 */
-	{ 0,	0,	printargs,		"SYS_3401"	}, /* 3401 */
-	{ 0,	0,	printargs,		"SYS_3402"	}, /* 3402 */
-	{ 0,	0,	printargs,		"SYS_3403"	}, /* 3403 */
-	{ 0,	0,	printargs,		"SYS_3404"	}, /* 3404 */
-	{ 0,	0,	printargs,		"SYS_3405"	}, /* 3405 */
-	{ 0,	0,	printargs,		"SYS_3406"	}, /* 3406 */
-	{ 0,	0,	printargs,		"SYS_3407"	}, /* 3407 */
-	{ 0,	0,	printargs,		"SYS_3408"	}, /* 3408 */
-	{ 0,	0,	printargs,		"SYS_3409"	}, /* 3409 */
-	{ 0,	0,	printargs,		"SYS_3410"	}, /* 3410 */
-	{ 0,	0,	printargs,		"SYS_3411"	}, /* 3411 */
-	{ 0,	0,	printargs,		"SYS_3412"	}, /* 3412 */
-	{ 0,	0,	printargs,		"SYS_3413"	}, /* 3413 */
-	{ 0,	0,	printargs,		"SYS_3414"	}, /* 3414 */
-	{ 0,	0,	printargs,		"SYS_3415"	}, /* 3415 */
-	{ 0,	0,	printargs,		"SYS_3416"	}, /* 3416 */
-	{ 0,	0,	printargs,		"SYS_3417"	}, /* 3417 */
-	{ 0,	0,	printargs,		"SYS_3418"	}, /* 3418 */
-	{ 0,	0,	printargs,		"SYS_3419"	}, /* 3419 */
-	{ 0,	0,	printargs,		"SYS_3420"	}, /* 3420 */
-	{ 0,	0,	printargs,		"SYS_3421"	}, /* 3421 */
-	{ 0,	0,	printargs,		"SYS_3422"	}, /* 3422 */
-	{ 0,	0,	printargs,		"SYS_3423"	}, /* 3423 */
-	{ 0,	0,	printargs,		"SYS_3424"	}, /* 3424 */
-	{ 0,	0,	printargs,		"SYS_3425"	}, /* 3425 */
-	{ 0,	0,	printargs,		"SYS_3426"	}, /* 3426 */
-	{ 0,	0,	printargs,		"SYS_3427"	}, /* 3427 */
-	{ 0,	0,	printargs,		"SYS_3428"	}, /* 3428 */
-	{ 0,	0,	printargs,		"SYS_3429"	}, /* 3429 */
-	{ 0,	0,	printargs,		"SYS_3430"	}, /* 3430 */
-	{ 0,	0,	printargs,		"SYS_3431"	}, /* 3431 */
-	{ 0,	0,	printargs,		"SYS_3432"	}, /* 3432 */
-	{ 0,	0,	printargs,		"SYS_3433"	}, /* 3433 */
-	{ 0,	0,	printargs,		"SYS_3434"	}, /* 3434 */
-	{ 0,	0,	printargs,		"SYS_3435"	}, /* 3435 */
-	{ 0,	0,	printargs,		"SYS_3436"	}, /* 3436 */
-	{ 0,	0,	printargs,		"SYS_3437"	}, /* 3437 */
-	{ 0,	0,	printargs,		"SYS_3438"	}, /* 3438 */
-	{ 0,	0,	printargs,		"SYS_3439"	}, /* 3439 */
-	{ 0,	0,	printargs,		"SYS_3440"	}, /* 3440 */
-	{ 0,	0,	printargs,		"SYS_3441"	}, /* 3441 */
-	{ 0,	0,	printargs,		"SYS_3442"	}, /* 3442 */
-	{ 0,	0,	printargs,		"SYS_3443"	}, /* 3443 */
-	{ 0,	0,	printargs,		"SYS_3444"	}, /* 3444 */
-	{ 0,	0,	printargs,		"SYS_3445"	}, /* 3445 */
-	{ 0,	0,	printargs,		"SYS_3446"	}, /* 3446 */
-	{ 0,	0,	printargs,		"SYS_3447"	}, /* 3447 */
-	{ 0,	0,	printargs,		"SYS_3448"	}, /* 3448 */
-	{ 0,	0,	printargs,		"SYS_3449"	}, /* 3449 */
-	{ 0,	0,	printargs,		"SYS_3450"	}, /* 3450 */
-	{ 0,	0,	printargs,		"SYS_3451"	}, /* 3451 */
-	{ 0,	0,	printargs,		"SYS_3452"	}, /* 3452 */
-	{ 0,	0,	printargs,		"SYS_3453"	}, /* 3453 */
-	{ 0,	0,	printargs,		"SYS_3454"	}, /* 3454 */
-	{ 0,	0,	printargs,		"SYS_3455"	}, /* 3455 */
-	{ 0,	0,	printargs,		"SYS_3456"	}, /* 3456 */
-	{ 0,	0,	printargs,		"SYS_3457"	}, /* 3457 */
-	{ 0,	0,	printargs,		"SYS_3458"	}, /* 3458 */
-	{ 0,	0,	printargs,		"SYS_3459"	}, /* 3459 */
-	{ 0,	0,	printargs,		"SYS_3460"	}, /* 3460 */
-	{ 0,	0,	printargs,		"SYS_3461"	}, /* 3461 */
-	{ 0,	0,	printargs,		"SYS_3462"	}, /* 3462 */
-	{ 0,	0,	printargs,		"SYS_3463"	}, /* 3463 */
-	{ 0,	0,	printargs,		"SYS_3464"	}, /* 3464 */
-	{ 0,	0,	printargs,		"SYS_3465"	}, /* 3465 */
-	{ 0,	0,	printargs,		"SYS_3466"	}, /* 3466 */
-	{ 0,	0,	printargs,		"SYS_3467"	}, /* 3467 */
-	{ 0,	0,	printargs,		"SYS_3468"	}, /* 3468 */
-	{ 0,	0,	printargs,		"SYS_3469"	}, /* 3469 */
-	{ 0,	0,	printargs,		"SYS_3470"	}, /* 3470 */
-	{ 0,	0,	printargs,		"SYS_3471"	}, /* 3471 */
-	{ 0,	0,	printargs,		"SYS_3472"	}, /* 3472 */
-	{ 0,	0,	printargs,		"SYS_3473"	}, /* 3473 */
-	{ 0,	0,	printargs,		"SYS_3474"	}, /* 3474 */
-	{ 0,	0,	printargs,		"SYS_3475"	}, /* 3475 */
-	{ 0,	0,	printargs,		"SYS_3476"	}, /* 3476 */
-	{ 0,	0,	printargs,		"SYS_3477"	}, /* 3477 */
-	{ 0,	0,	printargs,		"SYS_3478"	}, /* 3478 */
-	{ 0,	0,	printargs,		"SYS_3479"	}, /* 3479 */
-	{ 0,	0,	printargs,		"SYS_3480"	}, /* 3480 */
-	{ 0,	0,	printargs,		"SYS_3481"	}, /* 3481 */
-	{ 0,	0,	printargs,		"SYS_3482"	}, /* 3482 */
-	{ 0,	0,	printargs,		"SYS_3483"	}, /* 3483 */
-	{ 0,	0,	printargs,		"SYS_3484"	}, /* 3484 */
-	{ 0,	0,	printargs,		"SYS_3485"	}, /* 3485 */
-	{ 0,	0,	printargs,		"SYS_3486"	}, /* 3486 */
-	{ 0,	0,	printargs,		"SYS_3487"	}, /* 3487 */
-	{ 0,	0,	printargs,		"SYS_3488"	}, /* 3488 */
-	{ 0,	0,	printargs,		"SYS_3489"	}, /* 3489 */
-	{ 0,	0,	printargs,		"SYS_3490"	}, /* 3490 */
-	{ 0,	0,	printargs,		"SYS_3491"	}, /* 3491 */
-	{ 0,	0,	printargs,		"SYS_3492"	}, /* 3492 */
-	{ 0,	0,	printargs,		"SYS_3493"	}, /* 3493 */
-	{ 0,	0,	printargs,		"SYS_3494"	}, /* 3494 */
-	{ 0,	0,	printargs,		"SYS_3495"	}, /* 3495 */
-	{ 0,	0,	printargs,		"SYS_3496"	}, /* 3496 */
-	{ 0,	0,	printargs,		"SYS_3497"	}, /* 3497 */
-	{ 0,	0,	printargs,		"SYS_3498"	}, /* 3498 */
-	{ 0,	0,	printargs,		"SYS_3499"	}, /* 3499 */
-	{ 0,	0,	printargs,		"SYS_3500"	}, /* 3500 */
-	{ 0,	0,	printargs,		"SYS_3501"	}, /* 3501 */
-	{ 0,	0,	printargs,		"SYS_3502"	}, /* 3502 */
-	{ 0,	0,	printargs,		"SYS_3503"	}, /* 3503 */
-	{ 0,	0,	printargs,		"SYS_3504"	}, /* 3504 */
-	{ 0,	0,	printargs,		"SYS_3505"	}, /* 3505 */
-	{ 0,	0,	printargs,		"SYS_3506"	}, /* 3506 */
-	{ 0,	0,	printargs,		"SYS_3507"	}, /* 3507 */
-	{ 0,	0,	printargs,		"SYS_3508"	}, /* 3508 */
-	{ 0,	0,	printargs,		"SYS_3509"	}, /* 3509 */
-	{ 0,	0,	printargs,		"SYS_3510"	}, /* 3510 */
-	{ 0,	0,	printargs,		"SYS_3511"	}, /* 3511 */
-	{ 0,	0,	printargs,		"SYS_3512"	}, /* 3512 */
-	{ 0,	0,	printargs,		"SYS_3513"	}, /* 3513 */
-	{ 0,	0,	printargs,		"SYS_3514"	}, /* 3514 */
-	{ 0,	0,	printargs,		"SYS_3515"	}, /* 3515 */
-	{ 0,	0,	printargs,		"SYS_3516"	}, /* 3516 */
-	{ 0,	0,	printargs,		"SYS_3517"	}, /* 3517 */
-	{ 0,	0,	printargs,		"SYS_3518"	}, /* 3518 */
-	{ 0,	0,	printargs,		"SYS_3519"	}, /* 3519 */
-	{ 0,	0,	printargs,		"SYS_3520"	}, /* 3520 */
-	{ 0,	0,	printargs,		"SYS_3521"	}, /* 3521 */
-	{ 0,	0,	printargs,		"SYS_3522"	}, /* 3522 */
-	{ 0,	0,	printargs,		"SYS_3523"	}, /* 3523 */
-	{ 0,	0,	printargs,		"SYS_3524"	}, /* 3524 */
-	{ 0,	0,	printargs,		"SYS_3525"	}, /* 3525 */
-	{ 0,	0,	printargs,		"SYS_3526"	}, /* 3526 */
-	{ 0,	0,	printargs,		"SYS_3527"	}, /* 3527 */
-	{ 0,	0,	printargs,		"SYS_3528"	}, /* 3528 */
-	{ 0,	0,	printargs,		"SYS_3529"	}, /* 3529 */
-	{ 0,	0,	printargs,		"SYS_3530"	}, /* 3530 */
-	{ 0,	0,	printargs,		"SYS_3531"	}, /* 3531 */
-	{ 0,	0,	printargs,		"SYS_3532"	}, /* 3532 */
-	{ 0,	0,	printargs,		"SYS_3533"	}, /* 3533 */
-	{ 0,	0,	printargs,		"SYS_3534"	}, /* 3534 */
-	{ 0,	0,	printargs,		"SYS_3535"	}, /* 3535 */
-	{ 0,	0,	printargs,		"SYS_3536"	}, /* 3536 */
-	{ 0,	0,	printargs,		"SYS_3537"	}, /* 3537 */
-	{ 0,	0,	printargs,		"SYS_3538"	}, /* 3538 */
-	{ 0,	0,	printargs,		"SYS_3539"	}, /* 3539 */
-	{ 0,	0,	printargs,		"SYS_3540"	}, /* 3540 */
-	{ 0,	0,	printargs,		"SYS_3541"	}, /* 3541 */
-	{ 0,	0,	printargs,		"SYS_3542"	}, /* 3542 */
-	{ 0,	0,	printargs,		"SYS_3543"	}, /* 3543 */
-	{ 0,	0,	printargs,		"SYS_3544"	}, /* 3544 */
-	{ 0,	0,	printargs,		"SYS_3545"	}, /* 3545 */
-	{ 0,	0,	printargs,		"SYS_3546"	}, /* 3546 */
-	{ 0,	0,	printargs,		"SYS_3547"	}, /* 3547 */
-	{ 0,	0,	printargs,		"SYS_3548"	}, /* 3548 */
-	{ 0,	0,	printargs,		"SYS_3549"	}, /* 3549 */
-	{ 0,	0,	printargs,		"SYS_3550"	}, /* 3550 */
-	{ 0,	0,	printargs,		"SYS_3551"	}, /* 3551 */
-	{ 0,	0,	printargs,		"SYS_3552"	}, /* 3552 */
-	{ 0,	0,	printargs,		"SYS_3553"	}, /* 3553 */
-	{ 0,	0,	printargs,		"SYS_3554"	}, /* 3554 */
-	{ 0,	0,	printargs,		"SYS_3555"	}, /* 3555 */
-	{ 0,	0,	printargs,		"SYS_3556"	}, /* 3556 */
-	{ 0,	0,	printargs,		"SYS_3557"	}, /* 3557 */
-	{ 0,	0,	printargs,		"SYS_3558"	}, /* 3558 */
-	{ 0,	0,	printargs,		"SYS_3559"	}, /* 3559 */
-	{ 0,	0,	printargs,		"SYS_3560"	}, /* 3560 */
-	{ 0,	0,	printargs,		"SYS_3561"	}, /* 3561 */
-	{ 0,	0,	printargs,		"SYS_3562"	}, /* 3562 */
-	{ 0,	0,	printargs,		"SYS_3563"	}, /* 3563 */
-	{ 0,	0,	printargs,		"SYS_3564"	}, /* 3564 */
-	{ 0,	0,	printargs,		"SYS_3565"	}, /* 3565 */
-	{ 0,	0,	printargs,		"SYS_3566"	}, /* 3566 */
-	{ 0,	0,	printargs,		"SYS_3567"	}, /* 3567 */
-	{ 0,	0,	printargs,		"SYS_3568"	}, /* 3568 */
-	{ 0,	0,	printargs,		"SYS_3569"	}, /* 3569 */
-	{ 0,	0,	printargs,		"SYS_3570"	}, /* 3570 */
-	{ 0,	0,	printargs,		"SYS_3571"	}, /* 3571 */
-	{ 0,	0,	printargs,		"SYS_3572"	}, /* 3572 */
-	{ 0,	0,	printargs,		"SYS_3573"	}, /* 3573 */
-	{ 0,	0,	printargs,		"SYS_3574"	}, /* 3574 */
-	{ 0,	0,	printargs,		"SYS_3575"	}, /* 3575 */
-	{ 0,	0,	printargs,		"SYS_3576"	}, /* 3576 */
-	{ 0,	0,	printargs,		"SYS_3577"	}, /* 3577 */
-	{ 0,	0,	printargs,		"SYS_3578"	}, /* 3578 */
-	{ 0,	0,	printargs,		"SYS_3579"	}, /* 3579 */
-	{ 0,	0,	printargs,		"SYS_3580"	}, /* 3580 */
-	{ 0,	0,	printargs,		"SYS_3581"	}, /* 3581 */
-	{ 0,	0,	printargs,		"SYS_3582"	}, /* 3582 */
-	{ 0,	0,	printargs,		"SYS_3583"	}, /* 3583 */
-	{ 0,	0,	printargs,		"SYS_3584"	}, /* 3584 */
-	{ 0,	0,	printargs,		"SYS_3585"	}, /* 3585 */
-	{ 0,	0,	printargs,		"SYS_3586"	}, /* 3586 */
-	{ 0,	0,	printargs,		"SYS_3587"	}, /* 3587 */
-	{ 0,	0,	printargs,		"SYS_3588"	}, /* 3588 */
-	{ 0,	0,	printargs,		"SYS_3589"	}, /* 3589 */
-	{ 0,	0,	printargs,		"SYS_3590"	}, /* 3590 */
-	{ 0,	0,	printargs,		"SYS_3591"	}, /* 3591 */
-	{ 0,	0,	printargs,		"SYS_3592"	}, /* 3592 */
-	{ 0,	0,	printargs,		"SYS_3593"	}, /* 3593 */
-	{ 0,	0,	printargs,		"SYS_3594"	}, /* 3594 */
-	{ 0,	0,	printargs,		"SYS_3595"	}, /* 3595 */
-	{ 0,	0,	printargs,		"SYS_3596"	}, /* 3596 */
-	{ 0,	0,	printargs,		"SYS_3597"	}, /* 3597 */
-	{ 0,	0,	printargs,		"SYS_3598"	}, /* 3598 */
-	{ 0,	0,	printargs,		"SYS_3599"	}, /* 3599 */
-	{ 0,	0,	printargs,		"SYS_3600"	}, /* 3600 */
-	{ 0,	0,	printargs,		"SYS_3601"	}, /* 3601 */
-	{ 0,	0,	printargs,		"SYS_3602"	}, /* 3602 */
-	{ 0,	0,	printargs,		"SYS_3603"	}, /* 3603 */
-	{ 0,	0,	printargs,		"SYS_3604"	}, /* 3604 */
-	{ 0,	0,	printargs,		"SYS_3605"	}, /* 3605 */
-	{ 0,	0,	printargs,		"SYS_3606"	}, /* 3606 */
-	{ 0,	0,	printargs,		"SYS_3607"	}, /* 3607 */
-	{ 0,	0,	printargs,		"SYS_3608"	}, /* 3608 */
-	{ 0,	0,	printargs,		"SYS_3609"	}, /* 3609 */
-	{ 0,	0,	printargs,		"SYS_3610"	}, /* 3610 */
-	{ 0,	0,	printargs,		"SYS_3611"	}, /* 3611 */
-	{ 0,	0,	printargs,		"SYS_3612"	}, /* 3612 */
-	{ 0,	0,	printargs,		"SYS_3613"	}, /* 3613 */
-	{ 0,	0,	printargs,		"SYS_3614"	}, /* 3614 */
-	{ 0,	0,	printargs,		"SYS_3615"	}, /* 3615 */
-	{ 0,	0,	printargs,		"SYS_3616"	}, /* 3616 */
-	{ 0,	0,	printargs,		"SYS_3617"	}, /* 3617 */
-	{ 0,	0,	printargs,		"SYS_3618"	}, /* 3618 */
-	{ 0,	0,	printargs,		"SYS_3619"	}, /* 3619 */
-	{ 0,	0,	printargs,		"SYS_3620"	}, /* 3620 */
-	{ 0,	0,	printargs,		"SYS_3621"	}, /* 3621 */
-	{ 0,	0,	printargs,		"SYS_3622"	}, /* 3622 */
-	{ 0,	0,	printargs,		"SYS_3623"	}, /* 3623 */
-	{ 0,	0,	printargs,		"SYS_3624"	}, /* 3624 */
-	{ 0,	0,	printargs,		"SYS_3625"	}, /* 3625 */
-	{ 0,	0,	printargs,		"SYS_3626"	}, /* 3626 */
-	{ 0,	0,	printargs,		"SYS_3627"	}, /* 3627 */
-	{ 0,	0,	printargs,		"SYS_3628"	}, /* 3628 */
-	{ 0,	0,	printargs,		"SYS_3629"	}, /* 3629 */
-	{ 0,	0,	printargs,		"SYS_3630"	}, /* 3630 */
-	{ 0,	0,	printargs,		"SYS_3631"	}, /* 3631 */
-	{ 0,	0,	printargs,		"SYS_3632"	}, /* 3632 */
-	{ 0,	0,	printargs,		"SYS_3633"	}, /* 3633 */
-	{ 0,	0,	printargs,		"SYS_3634"	}, /* 3634 */
-	{ 0,	0,	printargs,		"SYS_3635"	}, /* 3635 */
-	{ 0,	0,	printargs,		"SYS_3636"	}, /* 3636 */
-	{ 0,	0,	printargs,		"SYS_3637"	}, /* 3637 */
-	{ 0,	0,	printargs,		"SYS_3638"	}, /* 3638 */
-	{ 0,	0,	printargs,		"SYS_3639"	}, /* 3639 */
-	{ 0,	0,	printargs,		"SYS_3640"	}, /* 3640 */
-	{ 0,	0,	printargs,		"SYS_3641"	}, /* 3641 */
-	{ 0,	0,	printargs,		"SYS_3642"	}, /* 3642 */
-	{ 0,	0,	printargs,		"SYS_3643"	}, /* 3643 */
-	{ 0,	0,	printargs,		"SYS_3644"	}, /* 3644 */
-	{ 0,	0,	printargs,		"SYS_3645"	}, /* 3645 */
-	{ 0,	0,	printargs,		"SYS_3646"	}, /* 3646 */
-	{ 0,	0,	printargs,		"SYS_3647"	}, /* 3647 */
-	{ 0,	0,	printargs,		"SYS_3648"	}, /* 3648 */
-	{ 0,	0,	printargs,		"SYS_3649"	}, /* 3649 */
-	{ 0,	0,	printargs,		"SYS_3650"	}, /* 3650 */
-	{ 0,	0,	printargs,		"SYS_3651"	}, /* 3651 */
-	{ 0,	0,	printargs,		"SYS_3652"	}, /* 3652 */
-	{ 0,	0,	printargs,		"SYS_3653"	}, /* 3653 */
-	{ 0,	0,	printargs,		"SYS_3654"	}, /* 3654 */
-	{ 0,	0,	printargs,		"SYS_3655"	}, /* 3655 */
-	{ 0,	0,	printargs,		"SYS_3656"	}, /* 3656 */
-	{ 0,	0,	printargs,		"SYS_3657"	}, /* 3657 */
-	{ 0,	0,	printargs,		"SYS_3658"	}, /* 3658 */
-	{ 0,	0,	printargs,		"SYS_3659"	}, /* 3659 */
-	{ 0,	0,	printargs,		"SYS_3660"	}, /* 3660 */
-	{ 0,	0,	printargs,		"SYS_3661"	}, /* 3661 */
-	{ 0,	0,	printargs,		"SYS_3662"	}, /* 3662 */
-	{ 0,	0,	printargs,		"SYS_3663"	}, /* 3663 */
-	{ 0,	0,	printargs,		"SYS_3664"	}, /* 3664 */
-	{ 0,	0,	printargs,		"SYS_3665"	}, /* 3665 */
-	{ 0,	0,	printargs,		"SYS_3666"	}, /* 3666 */
-	{ 0,	0,	printargs,		"SYS_3667"	}, /* 3667 */
-	{ 0,	0,	printargs,		"SYS_3668"	}, /* 3668 */
-	{ 0,	0,	printargs,		"SYS_3669"	}, /* 3669 */
-	{ 0,	0,	printargs,		"SYS_3670"	}, /* 3670 */
-	{ 0,	0,	printargs,		"SYS_3671"	}, /* 3671 */
-	{ 0,	0,	printargs,		"SYS_3672"	}, /* 3672 */
-	{ 0,	0,	printargs,		"SYS_3673"	}, /* 3673 */
-	{ 0,	0,	printargs,		"SYS_3674"	}, /* 3674 */
-	{ 0,	0,	printargs,		"SYS_3675"	}, /* 3675 */
-	{ 0,	0,	printargs,		"SYS_3676"	}, /* 3676 */
-	{ 0,	0,	printargs,		"SYS_3677"	}, /* 3677 */
-	{ 0,	0,	printargs,		"SYS_3678"	}, /* 3678 */
-	{ 0,	0,	printargs,		"SYS_3679"	}, /* 3679 */
-	{ 0,	0,	printargs,		"SYS_3680"	}, /* 3680 */
-	{ 0,	0,	printargs,		"SYS_3681"	}, /* 3681 */
-	{ 0,	0,	printargs,		"SYS_3682"	}, /* 3682 */
-	{ 0,	0,	printargs,		"SYS_3683"	}, /* 3683 */
-	{ 0,	0,	printargs,		"SYS_3684"	}, /* 3684 */
-	{ 0,	0,	printargs,		"SYS_3685"	}, /* 3685 */
-	{ 0,	0,	printargs,		"SYS_3686"	}, /* 3686 */
-	{ 0,	0,	printargs,		"SYS_3687"	}, /* 3687 */
-	{ 0,	0,	printargs,		"SYS_3688"	}, /* 3688 */
-	{ 0,	0,	printargs,		"SYS_3689"	}, /* 3689 */
-	{ 0,	0,	printargs,		"SYS_3690"	}, /* 3690 */
-	{ 0,	0,	printargs,		"SYS_3691"	}, /* 3691 */
-	{ 0,	0,	printargs,		"SYS_3692"	}, /* 3692 */
-	{ 0,	0,	printargs,		"SYS_3693"	}, /* 3693 */
-	{ 0,	0,	printargs,		"SYS_3694"	}, /* 3694 */
-	{ 0,	0,	printargs,		"SYS_3695"	}, /* 3695 */
-	{ 0,	0,	printargs,		"SYS_3696"	}, /* 3696 */
-	{ 0,	0,	printargs,		"SYS_3697"	}, /* 3697 */
-	{ 0,	0,	printargs,		"SYS_3698"	}, /* 3698 */
-	{ 0,	0,	printargs,		"SYS_3699"	}, /* 3699 */
-	{ 0,	0,	printargs,		"SYS_3700"	}, /* 3700 */
-	{ 0,	0,	printargs,		"SYS_3701"	}, /* 3701 */
-	{ 0,	0,	printargs,		"SYS_3702"	}, /* 3702 */
-	{ 0,	0,	printargs,		"SYS_3703"	}, /* 3703 */
-	{ 0,	0,	printargs,		"SYS_3704"	}, /* 3704 */
-	{ 0,	0,	printargs,		"SYS_3705"	}, /* 3705 */
-	{ 0,	0,	printargs,		"SYS_3706"	}, /* 3706 */
-	{ 0,	0,	printargs,		"SYS_3707"	}, /* 3707 */
-	{ 0,	0,	printargs,		"SYS_3708"	}, /* 3708 */
-	{ 0,	0,	printargs,		"SYS_3709"	}, /* 3709 */
-	{ 0,	0,	printargs,		"SYS_3710"	}, /* 3710 */
-	{ 0,	0,	printargs,		"SYS_3711"	}, /* 3711 */
-	{ 0,	0,	printargs,		"SYS_3712"	}, /* 3712 */
-	{ 0,	0,	printargs,		"SYS_3713"	}, /* 3713 */
-	{ 0,	0,	printargs,		"SYS_3714"	}, /* 3714 */
-	{ 0,	0,	printargs,		"SYS_3715"	}, /* 3715 */
-	{ 0,	0,	printargs,		"SYS_3716"	}, /* 3716 */
-	{ 0,	0,	printargs,		"SYS_3717"	}, /* 3717 */
-	{ 0,	0,	printargs,		"SYS_3718"	}, /* 3718 */
-	{ 0,	0,	printargs,		"SYS_3719"	}, /* 3719 */
-	{ 0,	0,	printargs,		"SYS_3720"	}, /* 3720 */
-	{ 0,	0,	printargs,		"SYS_3721"	}, /* 3721 */
-	{ 0,	0,	printargs,		"SYS_3722"	}, /* 3722 */
-	{ 0,	0,	printargs,		"SYS_3723"	}, /* 3723 */
-	{ 0,	0,	printargs,		"SYS_3724"	}, /* 3724 */
-	{ 0,	0,	printargs,		"SYS_3725"	}, /* 3725 */
-	{ 0,	0,	printargs,		"SYS_3726"	}, /* 3726 */
-	{ 0,	0,	printargs,		"SYS_3727"	}, /* 3727 */
-	{ 0,	0,	printargs,		"SYS_3728"	}, /* 3728 */
-	{ 0,	0,	printargs,		"SYS_3729"	}, /* 3729 */
-	{ 0,	0,	printargs,		"SYS_3730"	}, /* 3730 */
-	{ 0,	0,	printargs,		"SYS_3731"	}, /* 3731 */
-	{ 0,	0,	printargs,		"SYS_3732"	}, /* 3732 */
-	{ 0,	0,	printargs,		"SYS_3733"	}, /* 3733 */
-	{ 0,	0,	printargs,		"SYS_3734"	}, /* 3734 */
-	{ 0,	0,	printargs,		"SYS_3735"	}, /* 3735 */
-	{ 0,	0,	printargs,		"SYS_3736"	}, /* 3736 */
-	{ 0,	0,	printargs,		"SYS_3737"	}, /* 3737 */
-	{ 0,	0,	printargs,		"SYS_3738"	}, /* 3738 */
-	{ 0,	0,	printargs,		"SYS_3739"	}, /* 3739 */
-	{ 0,	0,	printargs,		"SYS_3740"	}, /* 3740 */
-	{ 0,	0,	printargs,		"SYS_3741"	}, /* 3741 */
-	{ 0,	0,	printargs,		"SYS_3742"	}, /* 3742 */
-	{ 0,	0,	printargs,		"SYS_3743"	}, /* 3743 */
-	{ 0,	0,	printargs,		"SYS_3744"	}, /* 3744 */
-	{ 0,	0,	printargs,		"SYS_3745"	}, /* 3745 */
-	{ 0,	0,	printargs,		"SYS_3746"	}, /* 3746 */
-	{ 0,	0,	printargs,		"SYS_3747"	}, /* 3747 */
-	{ 0,	0,	printargs,		"SYS_3748"	}, /* 3748 */
-	{ 0,	0,	printargs,		"SYS_3749"	}, /* 3749 */
-	{ 0,	0,	printargs,		"SYS_3750"	}, /* 3750 */
-	{ 0,	0,	printargs,		"SYS_3751"	}, /* 3751 */
-	{ 0,	0,	printargs,		"SYS_3752"	}, /* 3752 */
-	{ 0,	0,	printargs,		"SYS_3753"	}, /* 3753 */
-	{ 0,	0,	printargs,		"SYS_3754"	}, /* 3754 */
-	{ 0,	0,	printargs,		"SYS_3755"	}, /* 3755 */
-	{ 0,	0,	printargs,		"SYS_3756"	}, /* 3756 */
-	{ 0,	0,	printargs,		"SYS_3757"	}, /* 3757 */
-	{ 0,	0,	printargs,		"SYS_3758"	}, /* 3758 */
-	{ 0,	0,	printargs,		"SYS_3759"	}, /* 3759 */
-	{ 0,	0,	printargs,		"SYS_3760"	}, /* 3760 */
-	{ 0,	0,	printargs,		"SYS_3761"	}, /* 3761 */
-	{ 0,	0,	printargs,		"SYS_3762"	}, /* 3762 */
-	{ 0,	0,	printargs,		"SYS_3763"	}, /* 3763 */
-	{ 0,	0,	printargs,		"SYS_3764"	}, /* 3764 */
-	{ 0,	0,	printargs,		"SYS_3765"	}, /* 3765 */
-	{ 0,	0,	printargs,		"SYS_3766"	}, /* 3766 */
-	{ 0,	0,	printargs,		"SYS_3767"	}, /* 3767 */
-	{ 0,	0,	printargs,		"SYS_3768"	}, /* 3768 */
-	{ 0,	0,	printargs,		"SYS_3769"	}, /* 3769 */
-	{ 0,	0,	printargs,		"SYS_3770"	}, /* 3770 */
-	{ 0,	0,	printargs,		"SYS_3771"	}, /* 3771 */
-	{ 0,	0,	printargs,		"SYS_3772"	}, /* 3772 */
-	{ 0,	0,	printargs,		"SYS_3773"	}, /* 3773 */
-	{ 0,	0,	printargs,		"SYS_3774"	}, /* 3774 */
-	{ 0,	0,	printargs,		"SYS_3775"	}, /* 3775 */
-	{ 0,	0,	printargs,		"SYS_3776"	}, /* 3776 */
-	{ 0,	0,	printargs,		"SYS_3777"	}, /* 3777 */
-	{ 0,	0,	printargs,		"SYS_3778"	}, /* 3778 */
-	{ 0,	0,	printargs,		"SYS_3779"	}, /* 3779 */
-	{ 0,	0,	printargs,		"SYS_3780"	}, /* 3780 */
-	{ 0,	0,	printargs,		"SYS_3781"	}, /* 3781 */
-	{ 0,	0,	printargs,		"SYS_3782"	}, /* 3782 */
-	{ 0,	0,	printargs,		"SYS_3783"	}, /* 3783 */
-	{ 0,	0,	printargs,		"SYS_3784"	}, /* 3784 */
-	{ 0,	0,	printargs,		"SYS_3785"	}, /* 3785 */
-	{ 0,	0,	printargs,		"SYS_3786"	}, /* 3786 */
-	{ 0,	0,	printargs,		"SYS_3787"	}, /* 3787 */
-	{ 0,	0,	printargs,		"SYS_3788"	}, /* 3788 */
-	{ 0,	0,	printargs,		"SYS_3789"	}, /* 3789 */
-	{ 0,	0,	printargs,		"SYS_3790"	}, /* 3790 */
-	{ 0,	0,	printargs,		"SYS_3791"	}, /* 3791 */
-	{ 0,	0,	printargs,		"SYS_3792"	}, /* 3792 */
-	{ 0,	0,	printargs,		"SYS_3793"	}, /* 3793 */
-	{ 0,	0,	printargs,		"SYS_3794"	}, /* 3794 */
-	{ 0,	0,	printargs,		"SYS_3795"	}, /* 3795 */
-	{ 0,	0,	printargs,		"SYS_3796"	}, /* 3796 */
-	{ 0,	0,	printargs,		"SYS_3797"	}, /* 3797 */
-	{ 0,	0,	printargs,		"SYS_3798"	}, /* 3798 */
-	{ 0,	0,	printargs,		"SYS_3799"	}, /* 3799 */
-	{ 0,	0,	printargs,		"SYS_3800"	}, /* 3800 */
-	{ 0,	0,	printargs,		"SYS_3801"	}, /* 3801 */
-	{ 0,	0,	printargs,		"SYS_3802"	}, /* 3802 */
-	{ 0,	0,	printargs,		"SYS_3803"	}, /* 3803 */
-	{ 0,	0,	printargs,		"SYS_3804"	}, /* 3804 */
-	{ 0,	0,	printargs,		"SYS_3805"	}, /* 3805 */
-	{ 0,	0,	printargs,		"SYS_3806"	}, /* 3806 */
-	{ 0,	0,	printargs,		"SYS_3807"	}, /* 3807 */
-	{ 0,	0,	printargs,		"SYS_3808"	}, /* 3808 */
-	{ 0,	0,	printargs,		"SYS_3809"	}, /* 3809 */
-	{ 0,	0,	printargs,		"SYS_3810"	}, /* 3810 */
-	{ 0,	0,	printargs,		"SYS_3811"	}, /* 3811 */
-	{ 0,	0,	printargs,		"SYS_3812"	}, /* 3812 */
-	{ 0,	0,	printargs,		"SYS_3813"	}, /* 3813 */
-	{ 0,	0,	printargs,		"SYS_3814"	}, /* 3814 */
-	{ 0,	0,	printargs,		"SYS_3815"	}, /* 3815 */
-	{ 0,	0,	printargs,		"SYS_3816"	}, /* 3816 */
-	{ 0,	0,	printargs,		"SYS_3817"	}, /* 3817 */
-	{ 0,	0,	printargs,		"SYS_3818"	}, /* 3818 */
-	{ 0,	0,	printargs,		"SYS_3819"	}, /* 3819 */
-	{ 0,	0,	printargs,		"SYS_3820"	}, /* 3820 */
-	{ 0,	0,	printargs,		"SYS_3821"	}, /* 3821 */
-	{ 0,	0,	printargs,		"SYS_3822"	}, /* 3822 */
-	{ 0,	0,	printargs,		"SYS_3823"	}, /* 3823 */
-	{ 0,	0,	printargs,		"SYS_3824"	}, /* 3824 */
-	{ 0,	0,	printargs,		"SYS_3825"	}, /* 3825 */
-	{ 0,	0,	printargs,		"SYS_3826"	}, /* 3826 */
-	{ 0,	0,	printargs,		"SYS_3827"	}, /* 3827 */
-	{ 0,	0,	printargs,		"SYS_3828"	}, /* 3828 */
-	{ 0,	0,	printargs,		"SYS_3829"	}, /* 3829 */
-	{ 0,	0,	printargs,		"SYS_3830"	}, /* 3830 */
-	{ 0,	0,	printargs,		"SYS_3831"	}, /* 3831 */
-	{ 0,	0,	printargs,		"SYS_3832"	}, /* 3832 */
-	{ 0,	0,	printargs,		"SYS_3833"	}, /* 3833 */
-	{ 0,	0,	printargs,		"SYS_3834"	}, /* 3834 */
-	{ 0,	0,	printargs,		"SYS_3835"	}, /* 3835 */
-	{ 0,	0,	printargs,		"SYS_3836"	}, /* 3836 */
-	{ 0,	0,	printargs,		"SYS_3837"	}, /* 3837 */
-	{ 0,	0,	printargs,		"SYS_3838"	}, /* 3838 */
-	{ 0,	0,	printargs,		"SYS_3839"	}, /* 3839 */
-	{ 0,	0,	printargs,		"SYS_3840"	}, /* 3840 */
-	{ 0,	0,	printargs,		"SYS_3841"	}, /* 3841 */
-	{ 0,	0,	printargs,		"SYS_3842"	}, /* 3842 */
-	{ 0,	0,	printargs,		"SYS_3843"	}, /* 3843 */
-	{ 0,	0,	printargs,		"SYS_3844"	}, /* 3844 */
-	{ 0,	0,	printargs,		"SYS_3845"	}, /* 3845 */
-	{ 0,	0,	printargs,		"SYS_3846"	}, /* 3846 */
-	{ 0,	0,	printargs,		"SYS_3847"	}, /* 3847 */
-	{ 0,	0,	printargs,		"SYS_3848"	}, /* 3848 */
-	{ 0,	0,	printargs,		"SYS_3849"	}, /* 3849 */
-	{ 0,	0,	printargs,		"SYS_3850"	}, /* 3850 */
-	{ 0,	0,	printargs,		"SYS_3851"	}, /* 3851 */
-	{ 0,	0,	printargs,		"SYS_3852"	}, /* 3852 */
-	{ 0,	0,	printargs,		"SYS_3853"	}, /* 3853 */
-	{ 0,	0,	printargs,		"SYS_3854"	}, /* 3854 */
-	{ 0,	0,	printargs,		"SYS_3855"	}, /* 3855 */
-	{ 0,	0,	printargs,		"SYS_3856"	}, /* 3856 */
-	{ 0,	0,	printargs,		"SYS_3857"	}, /* 3857 */
-	{ 0,	0,	printargs,		"SYS_3858"	}, /* 3858 */
-	{ 0,	0,	printargs,		"SYS_3859"	}, /* 3859 */
-	{ 0,	0,	printargs,		"SYS_3860"	}, /* 3860 */
-	{ 0,	0,	printargs,		"SYS_3861"	}, /* 3861 */
-	{ 0,	0,	printargs,		"SYS_3862"	}, /* 3862 */
-	{ 0,	0,	printargs,		"SYS_3863"	}, /* 3863 */
-	{ 0,	0,	printargs,		"SYS_3864"	}, /* 3864 */
-	{ 0,	0,	printargs,		"SYS_3865"	}, /* 3865 */
-	{ 0,	0,	printargs,		"SYS_3866"	}, /* 3866 */
-	{ 0,	0,	printargs,		"SYS_3867"	}, /* 3867 */
-	{ 0,	0,	printargs,		"SYS_3868"	}, /* 3868 */
-	{ 0,	0,	printargs,		"SYS_3869"	}, /* 3869 */
-	{ 0,	0,	printargs,		"SYS_3870"	}, /* 3870 */
-	{ 0,	0,	printargs,		"SYS_3871"	}, /* 3871 */
-	{ 0,	0,	printargs,		"SYS_3872"	}, /* 3872 */
-	{ 0,	0,	printargs,		"SYS_3873"	}, /* 3873 */
-	{ 0,	0,	printargs,		"SYS_3874"	}, /* 3874 */
-	{ 0,	0,	printargs,		"SYS_3875"	}, /* 3875 */
-	{ 0,	0,	printargs,		"SYS_3876"	}, /* 3876 */
-	{ 0,	0,	printargs,		"SYS_3877"	}, /* 3877 */
-	{ 0,	0,	printargs,		"SYS_3878"	}, /* 3878 */
-	{ 0,	0,	printargs,		"SYS_3879"	}, /* 3879 */
-	{ 0,	0,	printargs,		"SYS_3880"	}, /* 3880 */
-	{ 0,	0,	printargs,		"SYS_3881"	}, /* 3881 */
-	{ 0,	0,	printargs,		"SYS_3882"	}, /* 3882 */
-	{ 0,	0,	printargs,		"SYS_3883"	}, /* 3883 */
-	{ 0,	0,	printargs,		"SYS_3884"	}, /* 3884 */
-	{ 0,	0,	printargs,		"SYS_3885"	}, /* 3885 */
-	{ 0,	0,	printargs,		"SYS_3886"	}, /* 3886 */
-	{ 0,	0,	printargs,		"SYS_3887"	}, /* 3887 */
-	{ 0,	0,	printargs,		"SYS_3888"	}, /* 3888 */
-	{ 0,	0,	printargs,		"SYS_3889"	}, /* 3889 */
-	{ 0,	0,	printargs,		"SYS_3890"	}, /* 3890 */
-	{ 0,	0,	printargs,		"SYS_3891"	}, /* 3891 */
-	{ 0,	0,	printargs,		"SYS_3892"	}, /* 3892 */
-	{ 0,	0,	printargs,		"SYS_3893"	}, /* 3893 */
-	{ 0,	0,	printargs,		"SYS_3894"	}, /* 3894 */
-	{ 0,	0,	printargs,		"SYS_3895"	}, /* 3895 */
-	{ 0,	0,	printargs,		"SYS_3896"	}, /* 3896 */
-	{ 0,	0,	printargs,		"SYS_3897"	}, /* 3897 */
-	{ 0,	0,	printargs,		"SYS_3898"	}, /* 3898 */
-	{ 0,	0,	printargs,		"SYS_3899"	}, /* 3899 */
-	{ 0,	0,	printargs,		"SYS_3900"	}, /* 3900 */
-	{ 0,	0,	printargs,		"SYS_3901"	}, /* 3901 */
-	{ 0,	0,	printargs,		"SYS_3902"	}, /* 3902 */
-	{ 0,	0,	printargs,		"SYS_3903"	}, /* 3903 */
-	{ 0,	0,	printargs,		"SYS_3904"	}, /* 3904 */
-	{ 0,	0,	printargs,		"SYS_3905"	}, /* 3905 */
-	{ 0,	0,	printargs,		"SYS_3906"	}, /* 3906 */
-	{ 0,	0,	printargs,		"SYS_3907"	}, /* 3907 */
-	{ 0,	0,	printargs,		"SYS_3908"	}, /* 3908 */
-	{ 0,	0,	printargs,		"SYS_3909"	}, /* 3909 */
-	{ 0,	0,	printargs,		"SYS_3910"	}, /* 3910 */
-	{ 0,	0,	printargs,		"SYS_3911"	}, /* 3911 */
-	{ 0,	0,	printargs,		"SYS_3912"	}, /* 3912 */
-	{ 0,	0,	printargs,		"SYS_3913"	}, /* 3913 */
-	{ 0,	0,	printargs,		"SYS_3914"	}, /* 3914 */
-	{ 0,	0,	printargs,		"SYS_3915"	}, /* 3915 */
-	{ 0,	0,	printargs,		"SYS_3916"	}, /* 3916 */
-	{ 0,	0,	printargs,		"SYS_3917"	}, /* 3917 */
-	{ 0,	0,	printargs,		"SYS_3918"	}, /* 3918 */
-	{ 0,	0,	printargs,		"SYS_3919"	}, /* 3919 */
-	{ 0,	0,	printargs,		"SYS_3920"	}, /* 3920 */
-	{ 0,	0,	printargs,		"SYS_3921"	}, /* 3921 */
-	{ 0,	0,	printargs,		"SYS_3922"	}, /* 3922 */
-	{ 0,	0,	printargs,		"SYS_3923"	}, /* 3923 */
-	{ 0,	0,	printargs,		"SYS_3924"	}, /* 3924 */
-	{ 0,	0,	printargs,		"SYS_3925"	}, /* 3925 */
-	{ 0,	0,	printargs,		"SYS_3926"	}, /* 3926 */
-	{ 0,	0,	printargs,		"SYS_3927"	}, /* 3927 */
-	{ 0,	0,	printargs,		"SYS_3928"	}, /* 3928 */
-	{ 0,	0,	printargs,		"SYS_3929"	}, /* 3929 */
-	{ 0,	0,	printargs,		"SYS_3930"	}, /* 3930 */
-	{ 0,	0,	printargs,		"SYS_3931"	}, /* 3931 */
-	{ 0,	0,	printargs,		"SYS_3932"	}, /* 3932 */
-	{ 0,	0,	printargs,		"SYS_3933"	}, /* 3933 */
-	{ 0,	0,	printargs,		"SYS_3934"	}, /* 3934 */
-	{ 0,	0,	printargs,		"SYS_3935"	}, /* 3935 */
-	{ 0,	0,	printargs,		"SYS_3936"	}, /* 3936 */
-	{ 0,	0,	printargs,		"SYS_3937"	}, /* 3937 */
-	{ 0,	0,	printargs,		"SYS_3938"	}, /* 3938 */
-	{ 0,	0,	printargs,		"SYS_3939"	}, /* 3939 */
-	{ 0,	0,	printargs,		"SYS_3940"	}, /* 3940 */
-	{ 0,	0,	printargs,		"SYS_3941"	}, /* 3941 */
-	{ 0,	0,	printargs,		"SYS_3942"	}, /* 3942 */
-	{ 0,	0,	printargs,		"SYS_3943"	}, /* 3943 */
-	{ 0,	0,	printargs,		"SYS_3944"	}, /* 3944 */
-	{ 0,	0,	printargs,		"SYS_3945"	}, /* 3945 */
-	{ 0,	0,	printargs,		"SYS_3946"	}, /* 3946 */
-	{ 0,	0,	printargs,		"SYS_3947"	}, /* 3947 */
-	{ 0,	0,	printargs,		"SYS_3948"	}, /* 3948 */
-	{ 0,	0,	printargs,		"SYS_3949"	}, /* 3949 */
-	{ 0,	0,	printargs,		"SYS_3950"	}, /* 3950 */
-	{ 0,	0,	printargs,		"SYS_3951"	}, /* 3951 */
-	{ 0,	0,	printargs,		"SYS_3952"	}, /* 3952 */
-	{ 0,	0,	printargs,		"SYS_3953"	}, /* 3953 */
-	{ 0,	0,	printargs,		"SYS_3954"	}, /* 3954 */
-	{ 0,	0,	printargs,		"SYS_3955"	}, /* 3955 */
-	{ 0,	0,	printargs,		"SYS_3956"	}, /* 3956 */
-	{ 0,	0,	printargs,		"SYS_3957"	}, /* 3957 */
-	{ 0,	0,	printargs,		"SYS_3958"	}, /* 3958 */
-	{ 0,	0,	printargs,		"SYS_3959"	}, /* 3959 */
-	{ 0,	0,	printargs,		"SYS_3960"	}, /* 3960 */
-	{ 0,	0,	printargs,		"SYS_3961"	}, /* 3961 */
-	{ 0,	0,	printargs,		"SYS_3962"	}, /* 3962 */
-	{ 0,	0,	printargs,		"SYS_3963"	}, /* 3963 */
-	{ 0,	0,	printargs,		"SYS_3964"	}, /* 3964 */
-	{ 0,	0,	printargs,		"SYS_3965"	}, /* 3965 */
-	{ 0,	0,	printargs,		"SYS_3966"	}, /* 3966 */
-	{ 0,	0,	printargs,		"SYS_3967"	}, /* 3967 */
-	{ 0,	0,	printargs,		"SYS_3968"	}, /* 3968 */
-	{ 0,	0,	printargs,		"SYS_3969"	}, /* 3969 */
-	{ 0,	0,	printargs,		"SYS_3970"	}, /* 3970 */
-	{ 0,	0,	printargs,		"SYS_3971"	}, /* 3971 */
-	{ 0,	0,	printargs,		"SYS_3972"	}, /* 3972 */
-	{ 0,	0,	printargs,		"SYS_3973"	}, /* 3973 */
-	{ 0,	0,	printargs,		"SYS_3974"	}, /* 3974 */
-	{ 0,	0,	printargs,		"SYS_3975"	}, /* 3975 */
-	{ 0,	0,	printargs,		"SYS_3976"	}, /* 3976 */
-	{ 0,	0,	printargs,		"SYS_3977"	}, /* 3977 */
-	{ 0,	0,	printargs,		"SYS_3978"	}, /* 3978 */
-	{ 0,	0,	printargs,		"SYS_3979"	}, /* 3979 */
-	{ 0,	0,	printargs,		"SYS_3980"	}, /* 3980 */
-	{ 0,	0,	printargs,		"SYS_3981"	}, /* 3981 */
-	{ 0,	0,	printargs,		"SYS_3982"	}, /* 3982 */
-	{ 0,	0,	printargs,		"SYS_3983"	}, /* 3983 */
-	{ 0,	0,	printargs,		"SYS_3984"	}, /* 3984 */
-	{ 0,	0,	printargs,		"SYS_3985"	}, /* 3985 */
-	{ 0,	0,	printargs,		"SYS_3986"	}, /* 3986 */
-	{ 0,	0,	printargs,		"SYS_3987"	}, /* 3987 */
-	{ 0,	0,	printargs,		"SYS_3988"	}, /* 3988 */
-	{ 0,	0,	printargs,		"SYS_3989"	}, /* 3989 */
-	{ 0,	0,	printargs,		"SYS_3990"	}, /* 3990 */
-	{ 0,	0,	printargs,		"SYS_3991"	}, /* 3991 */
-	{ 0,	0,	printargs,		"SYS_3992"	}, /* 3992 */
-	{ 0,	0,	printargs,		"SYS_3993"	}, /* 3993 */
-	{ 0,	0,	printargs,		"SYS_3994"	}, /* 3994 */
-	{ 0,	0,	printargs,		"SYS_3995"	}, /* 3995 */
-	{ 0,	0,	printargs,		"SYS_3996"	}, /* 3996 */
-	{ 0,	0,	printargs,		"SYS_3997"	}, /* 3997 */
-	{ 0,	0,	printargs,		"SYS_3998"	}, /* 3998 */
-	{ 0,	0,	printargs,		"SYS_3999"	}, /* 3999 */ /* end of POSIX */
-#if !defined (LINUX_MIPSN32) && !defined (LINUX_MIPSN64)
+	{ 0,	0,	NULL,			NULL	,	}, /* 3269 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3270 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3271 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3272 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3273 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3274 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3275 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3276 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3277 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3278 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3279 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3280 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3281 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3282 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3283 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3284 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3285 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3286 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3287 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3288 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3289 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3290 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3291 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3292 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3293 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3294 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3295 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3296 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3297 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3298 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3299 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3300 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3301 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3302 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3303 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3304 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3305 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3306 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3307 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3308 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3309 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3310 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3311 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3312 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3313 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3314 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3315 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3316 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3317 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3318 */
+	{ 0,	0,	NULL,			NULL	,	}, /* 3319 */
+	{ 0,	0,	NULL,			NULL		}, /* 3320 */
+	{ 0,	0,	NULL,			NULL		}, /* 3321 */
+	{ 0,	0,	NULL,			NULL		}, /* 3322 */
+	{ 0,	0,	NULL,			NULL		}, /* 3323 */
+	{ 0,	0,	NULL,			NULL		}, /* 3324 */
+	{ 0,	0,	NULL,			NULL		}, /* 3325 */
+	{ 0,	0,	NULL,			NULL		}, /* 3326 */
+	{ 0,	0,	NULL,			NULL		}, /* 3327 */
+	{ 0,	0,	NULL,			NULL		}, /* 3328 */
+	{ 0,	0,	NULL,			NULL		}, /* 3329 */
+	{ 0,	0,	NULL,			NULL		}, /* 3330 */
+	{ 0,	0,	NULL,			NULL		}, /* 3331 */
+	{ 0,	0,	NULL,			NULL		}, /* 3332 */
+	{ 0,	0,	NULL,			NULL		}, /* 3333 */
+	{ 0,	0,	NULL,			NULL		}, /* 3334 */
+	{ 0,	0,	NULL,			NULL		}, /* 3335 */
+	{ 0,	0,	NULL,			NULL		}, /* 3336 */
+	{ 0,	0,	NULL,			NULL		}, /* 3337 */
+	{ 0,	0,	NULL,			NULL		}, /* 3338 */
+	{ 0,	0,	NULL,			NULL		}, /* 3339 */
+	{ 0,	0,	NULL,			NULL		}, /* 3340 */
+	{ 0,	0,	NULL,			NULL		}, /* 3341 */
+	{ 0,	0,	NULL,			NULL		}, /* 3342 */
+	{ 0,	0,	NULL,			NULL		}, /* 3343 */
+	{ 0,	0,	NULL,			NULL		}, /* 3344 */
+	{ 0,	0,	NULL,			NULL		}, /* 3345 */
+	{ 0,	0,	NULL,			NULL		}, /* 3346 */
+	{ 0,	0,	NULL,			NULL		}, /* 3347 */
+	{ 0,	0,	NULL,			NULL		}, /* 3348 */
+	{ 0,	0,	NULL,			NULL		}, /* 3349 */
+	{ 0,	0,	NULL,			NULL		}, /* 3350 */
+	{ 0,	0,	NULL,			NULL		}, /* 3351 */
+	{ 0,	0,	NULL,			NULL		}, /* 3352 */
+	{ 0,	0,	NULL,			NULL		}, /* 3353 */
+	{ 0,	0,	NULL,			NULL		}, /* 3354 */
+	{ 0,	0,	NULL,			NULL		}, /* 3355 */
+	{ 0,	0,	NULL,			NULL		}, /* 3356 */
+	{ 0,	0,	NULL,			NULL		}, /* 3357 */
+	{ 0,	0,	NULL,			NULL		}, /* 3358 */
+	{ 0,	0,	NULL,			NULL		}, /* 3359 */
+	{ 0,	0,	NULL,			NULL		}, /* 3360 */
+	{ 0,	0,	NULL,			NULL		}, /* 3361 */
+	{ 0,	0,	NULL,			NULL		}, /* 3362 */
+	{ 0,	0,	NULL,			NULL		}, /* 3363 */
+	{ 0,	0,	NULL,			NULL		}, /* 3364 */
+	{ 0,	0,	NULL,			NULL		}, /* 3365 */
+	{ 0,	0,	NULL,			NULL		}, /* 3366 */
+	{ 0,	0,	NULL,			NULL		}, /* 3367 */
+	{ 0,	0,	NULL,			NULL		}, /* 3368 */
+	{ 0,	0,	NULL,			NULL		}, /* 3369 */
+	{ 0,	0,	NULL,			NULL		}, /* 3370 */
+	{ 0,	0,	NULL,			NULL		}, /* 3371 */
+	{ 0,	0,	NULL,			NULL		}, /* 3372 */
+	{ 0,	0,	NULL,			NULL		}, /* 3373 */
+	{ 0,	0,	NULL,			NULL		}, /* 3374 */
+	{ 0,	0,	NULL,			NULL		}, /* 3375 */
+	{ 0,	0,	NULL,			NULL		}, /* 3376 */
+	{ 0,	0,	NULL,			NULL		}, /* 3377 */
+	{ 0,	0,	NULL,			NULL		}, /* 3378 */
+	{ 0,	0,	NULL,			NULL		}, /* 3379 */
+	{ 0,	0,	NULL,			NULL		}, /* 3380 */
+	{ 0,	0,	NULL,			NULL		}, /* 3381 */
+	{ 0,	0,	NULL,			NULL		}, /* 3382 */
+	{ 0,	0,	NULL,			NULL		}, /* 3383 */
+	{ 0,	0,	NULL,			NULL		}, /* 3384 */
+	{ 0,	0,	NULL,			NULL		}, /* 3385 */
+	{ 0,	0,	NULL,			NULL		}, /* 3386 */
+	{ 0,	0,	NULL,			NULL		}, /* 3387 */
+	{ 0,	0,	NULL,			NULL		}, /* 3388 */
+	{ 0,	0,	NULL,			NULL		}, /* 3389 */
+	{ 0,	0,	NULL,			NULL		}, /* 3390 */
+	{ 0,	0,	NULL,			NULL		}, /* 3391 */
+	{ 0,	0,	NULL,			NULL		}, /* 3392 */
+	{ 0,	0,	NULL,			NULL		}, /* 3393 */
+	{ 0,	0,	NULL,			NULL		}, /* 3394 */
+	{ 0,	0,	NULL,			NULL		}, /* 3395 */
+	{ 0,	0,	NULL,			NULL		}, /* 3396 */
+	{ 0,	0,	NULL,			NULL		}, /* 3397 */
+	{ 0,	0,	NULL,			NULL		}, /* 3398 */
+	{ 0,	0,	NULL,			NULL		}, /* 3399 */
+	{ 0,	0,	NULL,			NULL		}, /* 3400 */
+	{ 0,	0,	NULL,			NULL		}, /* 3401 */
+	{ 0,	0,	NULL,			NULL		}, /* 3402 */
+	{ 0,	0,	NULL,			NULL		}, /* 3403 */
+	{ 0,	0,	NULL,			NULL		}, /* 3404 */
+	{ 0,	0,	NULL,			NULL		}, /* 3405 */
+	{ 0,	0,	NULL,			NULL		}, /* 3406 */
+	{ 0,	0,	NULL,			NULL		}, /* 3407 */
+	{ 0,	0,	NULL,			NULL		}, /* 3408 */
+	{ 0,	0,	NULL,			NULL		}, /* 3409 */
+	{ 0,	0,	NULL,			NULL		}, /* 3410 */
+	{ 0,	0,	NULL,			NULL		}, /* 3411 */
+	{ 0,	0,	NULL,			NULL		}, /* 3412 */
+	{ 0,	0,	NULL,			NULL		}, /* 3413 */
+	{ 0,	0,	NULL,			NULL		}, /* 3414 */
+	{ 0,	0,	NULL,			NULL		}, /* 3415 */
+	{ 0,	0,	NULL,			NULL		}, /* 3416 */
+	{ 0,	0,	NULL,			NULL		}, /* 3417 */
+	{ 0,	0,	NULL,			NULL		}, /* 3418 */
+	{ 0,	0,	NULL,			NULL		}, /* 3419 */
+	{ 0,	0,	NULL,			NULL		}, /* 3420 */
+	{ 0,	0,	NULL,			NULL		}, /* 3421 */
+	{ 0,	0,	NULL,			NULL		}, /* 3422 */
+	{ 0,	0,	NULL,			NULL		}, /* 3423 */
+	{ 0,	0,	NULL,			NULL		}, /* 3424 */
+	{ 0,	0,	NULL,			NULL		}, /* 3425 */
+	{ 0,	0,	NULL,			NULL		}, /* 3426 */
+	{ 0,	0,	NULL,			NULL		}, /* 3427 */
+	{ 0,	0,	NULL,			NULL		}, /* 3428 */
+	{ 0,	0,	NULL,			NULL		}, /* 3429 */
+	{ 0,	0,	NULL,			NULL		}, /* 3430 */
+	{ 0,	0,	NULL,			NULL		}, /* 3431 */
+	{ 0,	0,	NULL,			NULL		}, /* 3432 */
+	{ 0,	0,	NULL,			NULL		}, /* 3433 */
+	{ 0,	0,	NULL,			NULL		}, /* 3434 */
+	{ 0,	0,	NULL,			NULL		}, /* 3435 */
+	{ 0,	0,	NULL,			NULL		}, /* 3436 */
+	{ 0,	0,	NULL,			NULL		}, /* 3437 */
+	{ 0,	0,	NULL,			NULL		}, /* 3438 */
+	{ 0,	0,	NULL,			NULL		}, /* 3439 */
+	{ 0,	0,	NULL,			NULL		}, /* 3440 */
+	{ 0,	0,	NULL,			NULL		}, /* 3441 */
+	{ 0,	0,	NULL,			NULL		}, /* 3442 */
+	{ 0,	0,	NULL,			NULL		}, /* 3443 */
+	{ 0,	0,	NULL,			NULL		}, /* 3444 */
+	{ 0,	0,	NULL,			NULL		}, /* 3445 */
+	{ 0,	0,	NULL,			NULL		}, /* 3446 */
+	{ 0,	0,	NULL,			NULL		}, /* 3447 */
+	{ 0,	0,	NULL,			NULL		}, /* 3448 */
+	{ 0,	0,	NULL,			NULL		}, /* 3449 */
+	{ 0,	0,	NULL,			NULL		}, /* 3450 */
+	{ 0,	0,	NULL,			NULL		}, /* 3451 */
+	{ 0,	0,	NULL,			NULL		}, /* 3452 */
+	{ 0,	0,	NULL,			NULL		}, /* 3453 */
+	{ 0,	0,	NULL,			NULL		}, /* 3454 */
+	{ 0,	0,	NULL,			NULL		}, /* 3455 */
+	{ 0,	0,	NULL,			NULL		}, /* 3456 */
+	{ 0,	0,	NULL,			NULL		}, /* 3457 */
+	{ 0,	0,	NULL,			NULL		}, /* 3458 */
+	{ 0,	0,	NULL,			NULL		}, /* 3459 */
+	{ 0,	0,	NULL,			NULL		}, /* 3460 */
+	{ 0,	0,	NULL,			NULL		}, /* 3461 */
+	{ 0,	0,	NULL,			NULL		}, /* 3462 */
+	{ 0,	0,	NULL,			NULL		}, /* 3463 */
+	{ 0,	0,	NULL,			NULL		}, /* 3464 */
+	{ 0,	0,	NULL,			NULL		}, /* 3465 */
+	{ 0,	0,	NULL,			NULL		}, /* 3466 */
+	{ 0,	0,	NULL,			NULL		}, /* 3467 */
+	{ 0,	0,	NULL,			NULL		}, /* 3468 */
+	{ 0,	0,	NULL,			NULL		}, /* 3469 */
+	{ 0,	0,	NULL,			NULL		}, /* 3470 */
+	{ 0,	0,	NULL,			NULL		}, /* 3471 */
+	{ 0,	0,	NULL,			NULL		}, /* 3472 */
+	{ 0,	0,	NULL,			NULL		}, /* 3473 */
+	{ 0,	0,	NULL,			NULL		}, /* 3474 */
+	{ 0,	0,	NULL,			NULL		}, /* 3475 */
+	{ 0,	0,	NULL,			NULL		}, /* 3476 */
+	{ 0,	0,	NULL,			NULL		}, /* 3477 */
+	{ 0,	0,	NULL,			NULL		}, /* 3478 */
+	{ 0,	0,	NULL,			NULL		}, /* 3479 */
+	{ 0,	0,	NULL,			NULL		}, /* 3480 */
+	{ 0,	0,	NULL,			NULL		}, /* 3481 */
+	{ 0,	0,	NULL,			NULL		}, /* 3482 */
+	{ 0,	0,	NULL,			NULL		}, /* 3483 */
+	{ 0,	0,	NULL,			NULL		}, /* 3484 */
+	{ 0,	0,	NULL,			NULL		}, /* 3485 */
+	{ 0,	0,	NULL,			NULL		}, /* 3486 */
+	{ 0,	0,	NULL,			NULL		}, /* 3487 */
+	{ 0,	0,	NULL,			NULL		}, /* 3488 */
+	{ 0,	0,	NULL,			NULL		}, /* 3489 */
+	{ 0,	0,	NULL,			NULL		}, /* 3490 */
+	{ 0,	0,	NULL,			NULL		}, /* 3491 */
+	{ 0,	0,	NULL,			NULL		}, /* 3492 */
+	{ 0,	0,	NULL,			NULL		}, /* 3493 */
+	{ 0,	0,	NULL,			NULL		}, /* 3494 */
+	{ 0,	0,	NULL,			NULL		}, /* 3495 */
+	{ 0,	0,	NULL,			NULL		}, /* 3496 */
+	{ 0,	0,	NULL,			NULL		}, /* 3497 */
+	{ 0,	0,	NULL,			NULL		}, /* 3498 */
+	{ 0,	0,	NULL,			NULL		}, /* 3499 */
+	{ 0,	0,	NULL,			NULL		}, /* 3500 */
+	{ 0,	0,	NULL,			NULL		}, /* 3501 */
+	{ 0,	0,	NULL,			NULL		}, /* 3502 */
+	{ 0,	0,	NULL,			NULL		}, /* 3503 */
+	{ 0,	0,	NULL,			NULL		}, /* 3504 */
+	{ 0,	0,	NULL,			NULL		}, /* 3505 */
+	{ 0,	0,	NULL,			NULL		}, /* 3506 */
+	{ 0,	0,	NULL,			NULL		}, /* 3507 */
+	{ 0,	0,	NULL,			NULL		}, /* 3508 */
+	{ 0,	0,	NULL,			NULL		}, /* 3509 */
+	{ 0,	0,	NULL,			NULL		}, /* 3510 */
+	{ 0,	0,	NULL,			NULL		}, /* 3511 */
+	{ 0,	0,	NULL,			NULL		}, /* 3512 */
+	{ 0,	0,	NULL,			NULL		}, /* 3513 */
+	{ 0,	0,	NULL,			NULL		}, /* 3514 */
+	{ 0,	0,	NULL,			NULL		}, /* 3515 */
+	{ 0,	0,	NULL,			NULL		}, /* 3516 */
+	{ 0,	0,	NULL,			NULL		}, /* 3517 */
+	{ 0,	0,	NULL,			NULL		}, /* 3518 */
+	{ 0,	0,	NULL,			NULL		}, /* 3519 */
+	{ 0,	0,	NULL,			NULL		}, /* 3520 */
+	{ 0,	0,	NULL,			NULL		}, /* 3521 */
+	{ 0,	0,	NULL,			NULL		}, /* 3522 */
+	{ 0,	0,	NULL,			NULL		}, /* 3523 */
+	{ 0,	0,	NULL,			NULL		}, /* 3524 */
+	{ 0,	0,	NULL,			NULL		}, /* 3525 */
+	{ 0,	0,	NULL,			NULL		}, /* 3526 */
+	{ 0,	0,	NULL,			NULL		}, /* 3527 */
+	{ 0,	0,	NULL,			NULL		}, /* 3528 */
+	{ 0,	0,	NULL,			NULL		}, /* 3529 */
+	{ 0,	0,	NULL,			NULL		}, /* 3530 */
+	{ 0,	0,	NULL,			NULL		}, /* 3531 */
+	{ 0,	0,	NULL,			NULL		}, /* 3532 */
+	{ 0,	0,	NULL,			NULL		}, /* 3533 */
+	{ 0,	0,	NULL,			NULL		}, /* 3534 */
+	{ 0,	0,	NULL,			NULL		}, /* 3535 */
+	{ 0,	0,	NULL,			NULL		}, /* 3536 */
+	{ 0,	0,	NULL,			NULL		}, /* 3537 */
+	{ 0,	0,	NULL,			NULL		}, /* 3538 */
+	{ 0,	0,	NULL,			NULL		}, /* 3539 */
+	{ 0,	0,	NULL,			NULL		}, /* 3540 */
+	{ 0,	0,	NULL,			NULL		}, /* 3541 */
+	{ 0,	0,	NULL,			NULL		}, /* 3542 */
+	{ 0,	0,	NULL,			NULL		}, /* 3543 */
+	{ 0,	0,	NULL,			NULL		}, /* 3544 */
+	{ 0,	0,	NULL,			NULL		}, /* 3545 */
+	{ 0,	0,	NULL,			NULL		}, /* 3546 */
+	{ 0,	0,	NULL,			NULL		}, /* 3547 */
+	{ 0,	0,	NULL,			NULL		}, /* 3548 */
+	{ 0,	0,	NULL,			NULL		}, /* 3549 */
+	{ 0,	0,	NULL,			NULL		}, /* 3550 */
+	{ 0,	0,	NULL,			NULL		}, /* 3551 */
+	{ 0,	0,	NULL,			NULL		}, /* 3552 */
+	{ 0,	0,	NULL,			NULL		}, /* 3553 */
+	{ 0,	0,	NULL,			NULL		}, /* 3554 */
+	{ 0,	0,	NULL,			NULL		}, /* 3555 */
+	{ 0,	0,	NULL,			NULL		}, /* 3556 */
+	{ 0,	0,	NULL,			NULL		}, /* 3557 */
+	{ 0,	0,	NULL,			NULL		}, /* 3558 */
+	{ 0,	0,	NULL,			NULL		}, /* 3559 */
+	{ 0,	0,	NULL,			NULL		}, /* 3560 */
+	{ 0,	0,	NULL,			NULL		}, /* 3561 */
+	{ 0,	0,	NULL,			NULL		}, /* 3562 */
+	{ 0,	0,	NULL,			NULL		}, /* 3563 */
+	{ 0,	0,	NULL,			NULL		}, /* 3564 */
+	{ 0,	0,	NULL,			NULL		}, /* 3565 */
+	{ 0,	0,	NULL,			NULL		}, /* 3566 */
+	{ 0,	0,	NULL,			NULL		}, /* 3567 */
+	{ 0,	0,	NULL,			NULL		}, /* 3568 */
+	{ 0,	0,	NULL,			NULL		}, /* 3569 */
+	{ 0,	0,	NULL,			NULL		}, /* 3570 */
+	{ 0,	0,	NULL,			NULL		}, /* 3571 */
+	{ 0,	0,	NULL,			NULL		}, /* 3572 */
+	{ 0,	0,	NULL,			NULL		}, /* 3573 */
+	{ 0,	0,	NULL,			NULL		}, /* 3574 */
+	{ 0,	0,	NULL,			NULL		}, /* 3575 */
+	{ 0,	0,	NULL,			NULL		}, /* 3576 */
+	{ 0,	0,	NULL,			NULL		}, /* 3577 */
+	{ 0,	0,	NULL,			NULL		}, /* 3578 */
+	{ 0,	0,	NULL,			NULL		}, /* 3579 */
+	{ 0,	0,	NULL,			NULL		}, /* 3580 */
+	{ 0,	0,	NULL,			NULL		}, /* 3581 */
+	{ 0,	0,	NULL,			NULL		}, /* 3582 */
+	{ 0,	0,	NULL,			NULL		}, /* 3583 */
+	{ 0,	0,	NULL,			NULL		}, /* 3584 */
+	{ 0,	0,	NULL,			NULL		}, /* 3585 */
+	{ 0,	0,	NULL,			NULL		}, /* 3586 */
+	{ 0,	0,	NULL,			NULL		}, /* 3587 */
+	{ 0,	0,	NULL,			NULL		}, /* 3588 */
+	{ 0,	0,	NULL,			NULL		}, /* 3589 */
+	{ 0,	0,	NULL,			NULL		}, /* 3590 */
+	{ 0,	0,	NULL,			NULL		}, /* 3591 */
+	{ 0,	0,	NULL,			NULL		}, /* 3592 */
+	{ 0,	0,	NULL,			NULL		}, /* 3593 */
+	{ 0,	0,	NULL,			NULL		}, /* 3594 */
+	{ 0,	0,	NULL,			NULL		}, /* 3595 */
+	{ 0,	0,	NULL,			NULL		}, /* 3596 */
+	{ 0,	0,	NULL,			NULL		}, /* 3597 */
+	{ 0,	0,	NULL,			NULL		}, /* 3598 */
+	{ 0,	0,	NULL,			NULL		}, /* 3599 */
+	{ 0,	0,	NULL,			NULL		}, /* 3600 */
+	{ 0,	0,	NULL,			NULL		}, /* 3601 */
+	{ 0,	0,	NULL,			NULL		}, /* 3602 */
+	{ 0,	0,	NULL,			NULL		}, /* 3603 */
+	{ 0,	0,	NULL,			NULL		}, /* 3604 */
+	{ 0,	0,	NULL,			NULL		}, /* 3605 */
+	{ 0,	0,	NULL,			NULL		}, /* 3606 */
+	{ 0,	0,	NULL,			NULL		}, /* 3607 */
+	{ 0,	0,	NULL,			NULL		}, /* 3608 */
+	{ 0,	0,	NULL,			NULL		}, /* 3609 */
+	{ 0,	0,	NULL,			NULL		}, /* 3610 */
+	{ 0,	0,	NULL,			NULL		}, /* 3611 */
+	{ 0,	0,	NULL,			NULL		}, /* 3612 */
+	{ 0,	0,	NULL,			NULL		}, /* 3613 */
+	{ 0,	0,	NULL,			NULL		}, /* 3614 */
+	{ 0,	0,	NULL,			NULL		}, /* 3615 */
+	{ 0,	0,	NULL,			NULL		}, /* 3616 */
+	{ 0,	0,	NULL,			NULL		}, /* 3617 */
+	{ 0,	0,	NULL,			NULL		}, /* 3618 */
+	{ 0,	0,	NULL,			NULL		}, /* 3619 */
+	{ 0,	0,	NULL,			NULL		}, /* 3620 */
+	{ 0,	0,	NULL,			NULL		}, /* 3621 */
+	{ 0,	0,	NULL,			NULL		}, /* 3622 */
+	{ 0,	0,	NULL,			NULL		}, /* 3623 */
+	{ 0,	0,	NULL,			NULL		}, /* 3624 */
+	{ 0,	0,	NULL,			NULL		}, /* 3625 */
+	{ 0,	0,	NULL,			NULL		}, /* 3626 */
+	{ 0,	0,	NULL,			NULL		}, /* 3627 */
+	{ 0,	0,	NULL,			NULL		}, /* 3628 */
+	{ 0,	0,	NULL,			NULL		}, /* 3629 */
+	{ 0,	0,	NULL,			NULL		}, /* 3630 */
+	{ 0,	0,	NULL,			NULL		}, /* 3631 */
+	{ 0,	0,	NULL,			NULL		}, /* 3632 */
+	{ 0,	0,	NULL,			NULL		}, /* 3633 */
+	{ 0,	0,	NULL,			NULL		}, /* 3634 */
+	{ 0,	0,	NULL,			NULL		}, /* 3635 */
+	{ 0,	0,	NULL,			NULL		}, /* 3636 */
+	{ 0,	0,	NULL,			NULL		}, /* 3637 */
+	{ 0,	0,	NULL,			NULL		}, /* 3638 */
+	{ 0,	0,	NULL,			NULL		}, /* 3639 */
+	{ 0,	0,	NULL,			NULL		}, /* 3640 */
+	{ 0,	0,	NULL,			NULL		}, /* 3641 */
+	{ 0,	0,	NULL,			NULL		}, /* 3642 */
+	{ 0,	0,	NULL,			NULL		}, /* 3643 */
+	{ 0,	0,	NULL,			NULL		}, /* 3644 */
+	{ 0,	0,	NULL,			NULL		}, /* 3645 */
+	{ 0,	0,	NULL,			NULL		}, /* 3646 */
+	{ 0,	0,	NULL,			NULL		}, /* 3647 */
+	{ 0,	0,	NULL,			NULL		}, /* 3648 */
+	{ 0,	0,	NULL,			NULL		}, /* 3649 */
+	{ 0,	0,	NULL,			NULL		}, /* 3650 */
+	{ 0,	0,	NULL,			NULL		}, /* 3651 */
+	{ 0,	0,	NULL,			NULL		}, /* 3652 */
+	{ 0,	0,	NULL,			NULL		}, /* 3653 */
+	{ 0,	0,	NULL,			NULL		}, /* 3654 */
+	{ 0,	0,	NULL,			NULL		}, /* 3655 */
+	{ 0,	0,	NULL,			NULL		}, /* 3656 */
+	{ 0,	0,	NULL,			NULL		}, /* 3657 */
+	{ 0,	0,	NULL,			NULL		}, /* 3658 */
+	{ 0,	0,	NULL,			NULL		}, /* 3659 */
+	{ 0,	0,	NULL,			NULL		}, /* 3660 */
+	{ 0,	0,	NULL,			NULL		}, /* 3661 */
+	{ 0,	0,	NULL,			NULL		}, /* 3662 */
+	{ 0,	0,	NULL,			NULL		}, /* 3663 */
+	{ 0,	0,	NULL,			NULL		}, /* 3664 */
+	{ 0,	0,	NULL,			NULL		}, /* 3665 */
+	{ 0,	0,	NULL,			NULL		}, /* 3666 */
+	{ 0,	0,	NULL,			NULL		}, /* 3667 */
+	{ 0,	0,	NULL,			NULL		}, /* 3668 */
+	{ 0,	0,	NULL,			NULL		}, /* 3669 */
+	{ 0,	0,	NULL,			NULL		}, /* 3670 */
+	{ 0,	0,	NULL,			NULL		}, /* 3671 */
+	{ 0,	0,	NULL,			NULL		}, /* 3672 */
+	{ 0,	0,	NULL,			NULL		}, /* 3673 */
+	{ 0,	0,	NULL,			NULL		}, /* 3674 */
+	{ 0,	0,	NULL,			NULL		}, /* 3675 */
+	{ 0,	0,	NULL,			NULL		}, /* 3676 */
+	{ 0,	0,	NULL,			NULL		}, /* 3677 */
+	{ 0,	0,	NULL,			NULL		}, /* 3678 */
+	{ 0,	0,	NULL,			NULL		}, /* 3679 */
+	{ 0,	0,	NULL,			NULL		}, /* 3680 */
+	{ 0,	0,	NULL,			NULL		}, /* 3681 */
+	{ 0,	0,	NULL,			NULL		}, /* 3682 */
+	{ 0,	0,	NULL,			NULL		}, /* 3683 */
+	{ 0,	0,	NULL,			NULL		}, /* 3684 */
+	{ 0,	0,	NULL,			NULL		}, /* 3685 */
+	{ 0,	0,	NULL,			NULL		}, /* 3686 */
+	{ 0,	0,	NULL,			NULL		}, /* 3687 */
+	{ 0,	0,	NULL,			NULL		}, /* 3688 */
+	{ 0,	0,	NULL,			NULL		}, /* 3689 */
+	{ 0,	0,	NULL,			NULL		}, /* 3690 */
+	{ 0,	0,	NULL,			NULL		}, /* 3691 */
+	{ 0,	0,	NULL,			NULL		}, /* 3692 */
+	{ 0,	0,	NULL,			NULL		}, /* 3693 */
+	{ 0,	0,	NULL,			NULL		}, /* 3694 */
+	{ 0,	0,	NULL,			NULL		}, /* 3695 */
+	{ 0,	0,	NULL,			NULL		}, /* 3696 */
+	{ 0,	0,	NULL,			NULL		}, /* 3697 */
+	{ 0,	0,	NULL,			NULL		}, /* 3698 */
+	{ 0,	0,	NULL,			NULL		}, /* 3699 */
+	{ 0,	0,	NULL,			NULL		}, /* 3700 */
+	{ 0,	0,	NULL,			NULL		}, /* 3701 */
+	{ 0,	0,	NULL,			NULL		}, /* 3702 */
+	{ 0,	0,	NULL,			NULL		}, /* 3703 */
+	{ 0,	0,	NULL,			NULL		}, /* 3704 */
+	{ 0,	0,	NULL,			NULL		}, /* 3705 */
+	{ 0,	0,	NULL,			NULL		}, /* 3706 */
+	{ 0,	0,	NULL,			NULL		}, /* 3707 */
+	{ 0,	0,	NULL,			NULL		}, /* 3708 */
+	{ 0,	0,	NULL,			NULL		}, /* 3709 */
+	{ 0,	0,	NULL,			NULL		}, /* 3710 */
+	{ 0,	0,	NULL,			NULL		}, /* 3711 */
+	{ 0,	0,	NULL,			NULL		}, /* 3712 */
+	{ 0,	0,	NULL,			NULL		}, /* 3713 */
+	{ 0,	0,	NULL,			NULL		}, /* 3714 */
+	{ 0,	0,	NULL,			NULL		}, /* 3715 */
+	{ 0,	0,	NULL,			NULL		}, /* 3716 */
+	{ 0,	0,	NULL,			NULL		}, /* 3717 */
+	{ 0,	0,	NULL,			NULL		}, /* 3718 */
+	{ 0,	0,	NULL,			NULL		}, /* 3719 */
+	{ 0,	0,	NULL,			NULL		}, /* 3720 */
+	{ 0,	0,	NULL,			NULL		}, /* 3721 */
+	{ 0,	0,	NULL,			NULL		}, /* 3722 */
+	{ 0,	0,	NULL,			NULL		}, /* 3723 */
+	{ 0,	0,	NULL,			NULL		}, /* 3724 */
+	{ 0,	0,	NULL,			NULL		}, /* 3725 */
+	{ 0,	0,	NULL,			NULL		}, /* 3726 */
+	{ 0,	0,	NULL,			NULL		}, /* 3727 */
+	{ 0,	0,	NULL,			NULL		}, /* 3728 */
+	{ 0,	0,	NULL,			NULL		}, /* 3729 */
+	{ 0,	0,	NULL,			NULL		}, /* 3730 */
+	{ 0,	0,	NULL,			NULL		}, /* 3731 */
+	{ 0,	0,	NULL,			NULL		}, /* 3732 */
+	{ 0,	0,	NULL,			NULL		}, /* 3733 */
+	{ 0,	0,	NULL,			NULL		}, /* 3734 */
+	{ 0,	0,	NULL,			NULL		}, /* 3735 */
+	{ 0,	0,	NULL,			NULL		}, /* 3736 */
+	{ 0,	0,	NULL,			NULL		}, /* 3737 */
+	{ 0,	0,	NULL,			NULL		}, /* 3738 */
+	{ 0,	0,	NULL,			NULL		}, /* 3739 */
+	{ 0,	0,	NULL,			NULL		}, /* 3740 */
+	{ 0,	0,	NULL,			NULL		}, /* 3741 */
+	{ 0,	0,	NULL,			NULL		}, /* 3742 */
+	{ 0,	0,	NULL,			NULL		}, /* 3743 */
+	{ 0,	0,	NULL,			NULL		}, /* 3744 */
+	{ 0,	0,	NULL,			NULL		}, /* 3745 */
+	{ 0,	0,	NULL,			NULL		}, /* 3746 */
+	{ 0,	0,	NULL,			NULL		}, /* 3747 */
+	{ 0,	0,	NULL,			NULL		}, /* 3748 */
+	{ 0,	0,	NULL,			NULL		}, /* 3749 */
+	{ 0,	0,	NULL,			NULL		}, /* 3750 */
+	{ 0,	0,	NULL,			NULL		}, /* 3751 */
+	{ 0,	0,	NULL,			NULL		}, /* 3752 */
+	{ 0,	0,	NULL,			NULL		}, /* 3753 */
+	{ 0,	0,	NULL,			NULL		}, /* 3754 */
+	{ 0,	0,	NULL,			NULL		}, /* 3755 */
+	{ 0,	0,	NULL,			NULL		}, /* 3756 */
+	{ 0,	0,	NULL,			NULL		}, /* 3757 */
+	{ 0,	0,	NULL,			NULL		}, /* 3758 */
+	{ 0,	0,	NULL,			NULL		}, /* 3759 */
+	{ 0,	0,	NULL,			NULL		}, /* 3760 */
+	{ 0,	0,	NULL,			NULL		}, /* 3761 */
+	{ 0,	0,	NULL,			NULL		}, /* 3762 */
+	{ 0,	0,	NULL,			NULL		}, /* 3763 */
+	{ 0,	0,	NULL,			NULL		}, /* 3764 */
+	{ 0,	0,	NULL,			NULL		}, /* 3765 */
+	{ 0,	0,	NULL,			NULL		}, /* 3766 */
+	{ 0,	0,	NULL,			NULL		}, /* 3767 */
+	{ 0,	0,	NULL,			NULL		}, /* 3768 */
+	{ 0,	0,	NULL,			NULL		}, /* 3769 */
+	{ 0,	0,	NULL,			NULL		}, /* 3770 */
+	{ 0,	0,	NULL,			NULL		}, /* 3771 */
+	{ 0,	0,	NULL,			NULL		}, /* 3772 */
+	{ 0,	0,	NULL,			NULL		}, /* 3773 */
+	{ 0,	0,	NULL,			NULL		}, /* 3774 */
+	{ 0,	0,	NULL,			NULL		}, /* 3775 */
+	{ 0,	0,	NULL,			NULL		}, /* 3776 */
+	{ 0,	0,	NULL,			NULL		}, /* 3777 */
+	{ 0,	0,	NULL,			NULL		}, /* 3778 */
+	{ 0,	0,	NULL,			NULL		}, /* 3779 */
+	{ 0,	0,	NULL,			NULL		}, /* 3780 */
+	{ 0,	0,	NULL,			NULL		}, /* 3781 */
+	{ 0,	0,	NULL,			NULL		}, /* 3782 */
+	{ 0,	0,	NULL,			NULL		}, /* 3783 */
+	{ 0,	0,	NULL,			NULL		}, /* 3784 */
+	{ 0,	0,	NULL,			NULL		}, /* 3785 */
+	{ 0,	0,	NULL,			NULL		}, /* 3786 */
+	{ 0,	0,	NULL,			NULL		}, /* 3787 */
+	{ 0,	0,	NULL,			NULL		}, /* 3788 */
+	{ 0,	0,	NULL,			NULL		}, /* 3789 */
+	{ 0,	0,	NULL,			NULL		}, /* 3790 */
+	{ 0,	0,	NULL,			NULL		}, /* 3791 */
+	{ 0,	0,	NULL,			NULL		}, /* 3792 */
+	{ 0,	0,	NULL,			NULL		}, /* 3793 */
+	{ 0,	0,	NULL,			NULL		}, /* 3794 */
+	{ 0,	0,	NULL,			NULL		}, /* 3795 */
+	{ 0,	0,	NULL,			NULL		}, /* 3796 */
+	{ 0,	0,	NULL,			NULL		}, /* 3797 */
+	{ 0,	0,	NULL,			NULL		}, /* 3798 */
+	{ 0,	0,	NULL,			NULL		}, /* 3799 */
+	{ 0,	0,	NULL,			NULL		}, /* 3800 */
+	{ 0,	0,	NULL,			NULL		}, /* 3801 */
+	{ 0,	0,	NULL,			NULL		}, /* 3802 */
+	{ 0,	0,	NULL,			NULL		}, /* 3803 */
+	{ 0,	0,	NULL,			NULL		}, /* 3804 */
+	{ 0,	0,	NULL,			NULL		}, /* 3805 */
+	{ 0,	0,	NULL,			NULL		}, /* 3806 */
+	{ 0,	0,	NULL,			NULL		}, /* 3807 */
+	{ 0,	0,	NULL,			NULL		}, /* 3808 */
+	{ 0,	0,	NULL,			NULL		}, /* 3809 */
+	{ 0,	0,	NULL,			NULL		}, /* 3810 */
+	{ 0,	0,	NULL,			NULL		}, /* 3811 */
+	{ 0,	0,	NULL,			NULL		}, /* 3812 */
+	{ 0,	0,	NULL,			NULL		}, /* 3813 */
+	{ 0,	0,	NULL,			NULL		}, /* 3814 */
+	{ 0,	0,	NULL,			NULL		}, /* 3815 */
+	{ 0,	0,	NULL,			NULL		}, /* 3816 */
+	{ 0,	0,	NULL,			NULL		}, /* 3817 */
+	{ 0,	0,	NULL,			NULL		}, /* 3818 */
+	{ 0,	0,	NULL,			NULL		}, /* 3819 */
+	{ 0,	0,	NULL,			NULL		}, /* 3820 */
+	{ 0,	0,	NULL,			NULL		}, /* 3821 */
+	{ 0,	0,	NULL,			NULL		}, /* 3822 */
+	{ 0,	0,	NULL,			NULL		}, /* 3823 */
+	{ 0,	0,	NULL,			NULL		}, /* 3824 */
+	{ 0,	0,	NULL,			NULL		}, /* 3825 */
+	{ 0,	0,	NULL,			NULL		}, /* 3826 */
+	{ 0,	0,	NULL,			NULL		}, /* 3827 */
+	{ 0,	0,	NULL,			NULL		}, /* 3828 */
+	{ 0,	0,	NULL,			NULL		}, /* 3829 */
+	{ 0,	0,	NULL,			NULL		}, /* 3830 */
+	{ 0,	0,	NULL,			NULL		}, /* 3831 */
+	{ 0,	0,	NULL,			NULL		}, /* 3832 */
+	{ 0,	0,	NULL,			NULL		}, /* 3833 */
+	{ 0,	0,	NULL,			NULL		}, /* 3834 */
+	{ 0,	0,	NULL,			NULL		}, /* 3835 */
+	{ 0,	0,	NULL,			NULL		}, /* 3836 */
+	{ 0,	0,	NULL,			NULL		}, /* 3837 */
+	{ 0,	0,	NULL,			NULL		}, /* 3838 */
+	{ 0,	0,	NULL,			NULL		}, /* 3839 */
+	{ 0,	0,	NULL,			NULL		}, /* 3840 */
+	{ 0,	0,	NULL,			NULL		}, /* 3841 */
+	{ 0,	0,	NULL,			NULL		}, /* 3842 */
+	{ 0,	0,	NULL,			NULL		}, /* 3843 */
+	{ 0,	0,	NULL,			NULL		}, /* 3844 */
+	{ 0,	0,	NULL,			NULL		}, /* 3845 */
+	{ 0,	0,	NULL,			NULL		}, /* 3846 */
+	{ 0,	0,	NULL,			NULL		}, /* 3847 */
+	{ 0,	0,	NULL,			NULL		}, /* 3848 */
+	{ 0,	0,	NULL,			NULL		}, /* 3849 */
+	{ 0,	0,	NULL,			NULL		}, /* 3850 */
+	{ 0,	0,	NULL,			NULL		}, /* 3851 */
+	{ 0,	0,	NULL,			NULL		}, /* 3852 */
+	{ 0,	0,	NULL,			NULL		}, /* 3853 */
+	{ 0,	0,	NULL,			NULL		}, /* 3854 */
+	{ 0,	0,	NULL,			NULL		}, /* 3855 */
+	{ 0,	0,	NULL,			NULL		}, /* 3856 */
+	{ 0,	0,	NULL,			NULL		}, /* 3857 */
+	{ 0,	0,	NULL,			NULL		}, /* 3858 */
+	{ 0,	0,	NULL,			NULL		}, /* 3859 */
+	{ 0,	0,	NULL,			NULL		}, /* 3860 */
+	{ 0,	0,	NULL,			NULL		}, /* 3861 */
+	{ 0,	0,	NULL,			NULL		}, /* 3862 */
+	{ 0,	0,	NULL,			NULL		}, /* 3863 */
+	{ 0,	0,	NULL,			NULL		}, /* 3864 */
+	{ 0,	0,	NULL,			NULL		}, /* 3865 */
+	{ 0,	0,	NULL,			NULL		}, /* 3866 */
+	{ 0,	0,	NULL,			NULL		}, /* 3867 */
+	{ 0,	0,	NULL,			NULL		}, /* 3868 */
+	{ 0,	0,	NULL,			NULL		}, /* 3869 */
+	{ 0,	0,	NULL,			NULL		}, /* 3870 */
+	{ 0,	0,	NULL,			NULL		}, /* 3871 */
+	{ 0,	0,	NULL,			NULL		}, /* 3872 */
+	{ 0,	0,	NULL,			NULL		}, /* 3873 */
+	{ 0,	0,	NULL,			NULL		}, /* 3874 */
+	{ 0,	0,	NULL,			NULL		}, /* 3875 */
+	{ 0,	0,	NULL,			NULL		}, /* 3876 */
+	{ 0,	0,	NULL,			NULL		}, /* 3877 */
+	{ 0,	0,	NULL,			NULL		}, /* 3878 */
+	{ 0,	0,	NULL,			NULL		}, /* 3879 */
+	{ 0,	0,	NULL,			NULL		}, /* 3880 */
+	{ 0,	0,	NULL,			NULL		}, /* 3881 */
+	{ 0,	0,	NULL,			NULL		}, /* 3882 */
+	{ 0,	0,	NULL,			NULL		}, /* 3883 */
+	{ 0,	0,	NULL,			NULL		}, /* 3884 */
+	{ 0,	0,	NULL,			NULL		}, /* 3885 */
+	{ 0,	0,	NULL,			NULL		}, /* 3886 */
+	{ 0,	0,	NULL,			NULL		}, /* 3887 */
+	{ 0,	0,	NULL,			NULL		}, /* 3888 */
+	{ 0,	0,	NULL,			NULL		}, /* 3889 */
+	{ 0,	0,	NULL,			NULL		}, /* 3890 */
+	{ 0,	0,	NULL,			NULL		}, /* 3891 */
+	{ 0,	0,	NULL,			NULL		}, /* 3892 */
+	{ 0,	0,	NULL,			NULL		}, /* 3893 */
+	{ 0,	0,	NULL,			NULL		}, /* 3894 */
+	{ 0,	0,	NULL,			NULL		}, /* 3895 */
+	{ 0,	0,	NULL,			NULL		}, /* 3896 */
+	{ 0,	0,	NULL,			NULL		}, /* 3897 */
+	{ 0,	0,	NULL,			NULL		}, /* 3898 */
+	{ 0,	0,	NULL,			NULL		}, /* 3899 */
+	{ 0,	0,	NULL,			NULL		}, /* 3900 */
+	{ 0,	0,	NULL,			NULL		}, /* 3901 */
+	{ 0,	0,	NULL,			NULL		}, /* 3902 */
+	{ 0,	0,	NULL,			NULL		}, /* 3903 */
+	{ 0,	0,	NULL,			NULL		}, /* 3904 */
+	{ 0,	0,	NULL,			NULL		}, /* 3905 */
+	{ 0,	0,	NULL,			NULL		}, /* 3906 */
+	{ 0,	0,	NULL,			NULL		}, /* 3907 */
+	{ 0,	0,	NULL,			NULL		}, /* 3908 */
+	{ 0,	0,	NULL,			NULL		}, /* 3909 */
+	{ 0,	0,	NULL,			NULL		}, /* 3910 */
+	{ 0,	0,	NULL,			NULL		}, /* 3911 */
+	{ 0,	0,	NULL,			NULL		}, /* 3912 */
+	{ 0,	0,	NULL,			NULL		}, /* 3913 */
+	{ 0,	0,	NULL,			NULL		}, /* 3914 */
+	{ 0,	0,	NULL,			NULL		}, /* 3915 */
+	{ 0,	0,	NULL,			NULL		}, /* 3916 */
+	{ 0,	0,	NULL,			NULL		}, /* 3917 */
+	{ 0,	0,	NULL,			NULL		}, /* 3918 */
+	{ 0,	0,	NULL,			NULL		}, /* 3919 */
+	{ 0,	0,	NULL,			NULL		}, /* 3920 */
+	{ 0,	0,	NULL,			NULL		}, /* 3921 */
+	{ 0,	0,	NULL,			NULL		}, /* 3922 */
+	{ 0,	0,	NULL,			NULL		}, /* 3923 */
+	{ 0,	0,	NULL,			NULL		}, /* 3924 */
+	{ 0,	0,	NULL,			NULL		}, /* 3925 */
+	{ 0,	0,	NULL,			NULL		}, /* 3926 */
+	{ 0,	0,	NULL,			NULL		}, /* 3927 */
+	{ 0,	0,	NULL,			NULL		}, /* 3928 */
+	{ 0,	0,	NULL,			NULL		}, /* 3929 */
+	{ 0,	0,	NULL,			NULL		}, /* 3930 */
+	{ 0,	0,	NULL,			NULL		}, /* 3931 */
+	{ 0,	0,	NULL,			NULL		}, /* 3932 */
+	{ 0,	0,	NULL,			NULL		}, /* 3933 */
+	{ 0,	0,	NULL,			NULL		}, /* 3934 */
+	{ 0,	0,	NULL,			NULL		}, /* 3935 */
+	{ 0,	0,	NULL,			NULL		}, /* 3936 */
+	{ 0,	0,	NULL,			NULL		}, /* 3937 */
+	{ 0,	0,	NULL,			NULL		}, /* 3938 */
+	{ 0,	0,	NULL,			NULL		}, /* 3939 */
+	{ 0,	0,	NULL,			NULL		}, /* 3940 */
+	{ 0,	0,	NULL,			NULL		}, /* 3941 */
+	{ 0,	0,	NULL,			NULL		}, /* 3942 */
+	{ 0,	0,	NULL,			NULL		}, /* 3943 */
+	{ 0,	0,	NULL,			NULL		}, /* 3944 */
+	{ 0,	0,	NULL,			NULL		}, /* 3945 */
+	{ 0,	0,	NULL,			NULL		}, /* 3946 */
+	{ 0,	0,	NULL,			NULL		}, /* 3947 */
+	{ 0,	0,	NULL,			NULL		}, /* 3948 */
+	{ 0,	0,	NULL,			NULL		}, /* 3949 */
+	{ 0,	0,	NULL,			NULL		}, /* 3950 */
+	{ 0,	0,	NULL,			NULL		}, /* 3951 */
+	{ 0,	0,	NULL,			NULL		}, /* 3952 */
+	{ 0,	0,	NULL,			NULL		}, /* 3953 */
+	{ 0,	0,	NULL,			NULL		}, /* 3954 */
+	{ 0,	0,	NULL,			NULL		}, /* 3955 */
+	{ 0,	0,	NULL,			NULL		}, /* 3956 */
+	{ 0,	0,	NULL,			NULL		}, /* 3957 */
+	{ 0,	0,	NULL,			NULL		}, /* 3958 */
+	{ 0,	0,	NULL,			NULL		}, /* 3959 */
+	{ 0,	0,	NULL,			NULL		}, /* 3960 */
+	{ 0,	0,	NULL,			NULL		}, /* 3961 */
+	{ 0,	0,	NULL,			NULL		}, /* 3962 */
+	{ 0,	0,	NULL,			NULL		}, /* 3963 */
+	{ 0,	0,	NULL,			NULL		}, /* 3964 */
+	{ 0,	0,	NULL,			NULL		}, /* 3965 */
+	{ 0,	0,	NULL,			NULL		}, /* 3966 */
+	{ 0,	0,	NULL,			NULL		}, /* 3967 */
+	{ 0,	0,	NULL,			NULL		}, /* 3968 */
+	{ 0,	0,	NULL,			NULL		}, /* 3969 */
+	{ 0,	0,	NULL,			NULL		}, /* 3970 */
+	{ 0,	0,	NULL,			NULL		}, /* 3971 */
+	{ 0,	0,	NULL,			NULL		}, /* 3972 */
+	{ 0,	0,	NULL,			NULL		}, /* 3973 */
+	{ 0,	0,	NULL,			NULL		}, /* 3974 */
+	{ 0,	0,	NULL,			NULL		}, /* 3975 */
+	{ 0,	0,	NULL,			NULL		}, /* 3976 */
+	{ 0,	0,	NULL,			NULL		}, /* 3977 */
+	{ 0,	0,	NULL,			NULL		}, /* 3978 */
+	{ 0,	0,	NULL,			NULL		}, /* 3979 */
+	{ 0,	0,	NULL,			NULL		}, /* 3980 */
+	{ 0,	0,	NULL,			NULL		}, /* 3981 */
+	{ 0,	0,	NULL,			NULL		}, /* 3982 */
+	{ 0,	0,	NULL,			NULL		}, /* 3983 */
+	{ 0,	0,	NULL,			NULL		}, /* 3984 */
+	{ 0,	0,	NULL,			NULL		}, /* 3985 */
+	{ 0,	0,	NULL,			NULL		}, /* 3986 */
+	{ 0,	0,	NULL,			NULL		}, /* 3987 */
+	{ 0,	0,	NULL,			NULL		}, /* 3988 */
+	{ 0,	0,	NULL,			NULL		}, /* 3989 */
+	{ 0,	0,	NULL,			NULL		}, /* 3990 */
+	{ 0,	0,	NULL,			NULL		}, /* 3991 */
+	{ 0,	0,	NULL,			NULL		}, /* 3992 */
+	{ 0,	0,	NULL,			NULL		}, /* 3993 */
+	{ 0,	0,	NULL,			NULL		}, /* 3994 */
+	{ 0,	0,	NULL,			NULL		}, /* 3995 */
+	{ 0,	0,	NULL,			NULL		}, /* 3996 */
+	{ 0,	0,	NULL,			NULL		}, /* 3997 */
+	{ 0,	0,	NULL,			NULL		}, /* 3998 */
+	{ 0,	0,	NULL,			NULL		}, /* 3999 */ /* end of POSIX */
+#if !defined(LINUX_MIPSN32) && !defined(LINUX_MIPSN64)
 	/* For an O32 strace, decode the o32 syscalls.  */
-	{ 8,	0,	printargs,		"syscall"	}, /* 4000 */ /* start of Linux o32 */
+	{ MA,	0,	printargs,		"syscall"	}, /* 4000 */ /* start of Linux o32 */
 	{ 1,	TP,	sys_exit,		"exit"		}, /* 4001 */
 	{ 0,	TP,	sys_fork,		"fork"		}, /* 4002 */
 	{ 3,	TD,	sys_read,		"read"		}, /* 4003 */
@@ -4070,8 +4070,8 @@
 	{ 0,	0,	sys_getpgrp,		"getpgrp"	}, /* 4065 */
 	{ 0,	0,	sys_setsid,		"setsid"	}, /* 4066 */
 	{ 3,	TS,	sys_sigaction,		"sigaction"	}, /* 4067 */
-	{ 0,	TS,	sys_siggetmask,		"siggetmask"	}, /* 4068 */
-	{ 1,	TS,	sys_sigsetmask,		"sigsetmask"	}, /* 4069 */
+	{ 0,	TS,	sys_siggetmask,		"sgetmask"	}, /* 4068 */
+	{ 1,	TS,	sys_sigsetmask,		"ssetmask"	}, /* 4069 */
 	{ 2,	0,	sys_setreuid,		"setreuid"	}, /* 4070 */
 	{ 2,	0,	sys_setregid,		"setregid"	}, /* 4071 */
 	{ 3,	TS,	sys_sigsuspend,		"sigsuspend"	}, /* 4072 */
@@ -4089,8 +4089,8 @@
 	{ 2,	TF,	sys_oldlstat,		"oldlstat"	}, /* 4084 */
 	{ 3,	TF,	sys_readlink,		"readlink"	}, /* 4085 */
 	{ 1,	TF,	sys_uselib,		"uselib"	}, /* 4086 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 4087 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 4088 */
+	{ 2,	TF,	sys_swapon,		"swapon"	}, /* 4087 */
+	{ 4,	0,	sys_reboot,		"reboot"	}, /* 4088 */
 	{ 3,	TD,	sys_readdir,		"readdir"	}, /* 4089 */
 	{ 6,	TD,	sys_mmap,		"old_mmap"	}, /* 4090 */
 	{ 2,	0,	sys_munmap,		"munmap"	}, /* 4091 */
@@ -4119,9 +4119,9 @@
 	{ 4,	TP,	sys_wait4,		"wait4"		}, /* 4114 */
 	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 4115 */
 	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 4116 */
-	{ 6,	0,	sys_ipc,		"ipc"		}, /* 4117 */
+	{ 6,	TI,	sys_ipc,		"ipc"		}, /* 4117 */
 	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 4118 */
-	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 4119 */
+	{ 0,	TS,	sys_sigreturn,		"sigreturn"	}, /* 4119 */
 	{ 5,	TP,	sys_clone,		"clone"		}, /* 4120 */
 	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 4121 */
 	{ 1,	0,	sys_uname,		"uname"		}, /* 4122 */
@@ -4191,11 +4191,11 @@
 	{ 3,	0,	sys_getresuid,		"getresuid"	}, /* 4186 */
 	{ 5,	0,	sys_query_module,	"query_module"	}, /* 4187 */
 	{ 3,	TD,	sys_poll,		"poll"		}, /* 4188 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 4189 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	}, /* 4189 */
 	{ 3,	0,	sys_setresgid,		"setresgid"	}, /* 4190 */
 	{ 3,	0,	sys_getresgid,		"getresgid"	}, /* 4191 */
-	{ 5,	0,	printargs,		"prctl"		}, /* 4192 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 4193 */
+	{ 5,	0,	sys_prctl,		"prctl"		}, /* 4192 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	}, /* 4193 */
 	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	}, /* 4194 */
 	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 4195 */
 	{ 2,	TS,	sys_rt_sigpending,	"rt_sigpending"	}, /* 4196 */
@@ -4210,8 +4210,8 @@
 	{ 2,	0,	sys_capset,		"capset"	}, /* 4205 */
 	{ 2,	TS,	sys_sigaltstack,	"sigaltstatck"	}, /* 4206 */
 	{ 4,	TD|TN,	sys_sendfile,		"sendfile"	}, /* 4207 */
-	{ 0,	0,	printargs,		"SYS_4208"	}, /* 4208 */
-	{ 0,	0,	printargs,		"SYS_4209"	}, /* 4209 */
+	{ 0,	0,	NULL,			NULL		}, /* 4208 */
+	{ 0,	0,	NULL,			NULL		}, /* 4209 */
 	{ 6,	TD,	sys_mmap,		"mmap"		}, /* 4210 */
 	{ 4,	TF,	sys_truncate64,		"truncate64"	}, /* 4211 */
 	{ 4,	TD,	sys_ftruncate64,	"ftruncate64"	}, /* 4212 */
@@ -4219,12 +4219,12 @@
 	{ 2,	TF,	sys_lstat64,		"lstat64"	}, /* 4214 */
 	{ 2,	TD,	sys_fstat64,		"fstat64"	}, /* 4215 */
 	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 4216 */
-	{ 3,	0,	printargs,		"mincore"	}, /* 4217 */
+	{ 3,	0,	sys_mincore,		"mincore"	}, /* 4217 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 4218 */
 	{ 3,	TF,	sys_getdents64,		"getdents64"	}, /* 4219 */
 	{ 3,	TD,	sys_fcntl,		"fcntl64"	}, /* 4220 */
-	{ 0,	0,	printargs,		"SYS_4221"	}, /* 4221 */
-	{ 0,	0,	printargs,		"gettid"	}, /* 4222 */
+	{ 0,	0,	NULL,			NULL		}, /* 4221 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 4222 */
 	{ 5,	TD,	sys_readahead,		"readahead"	}, /* 4223 */
 	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 4224 */
 	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 4225 */
@@ -4239,7 +4239,7 @@
 	{ 2,	TF,	sys_removexattr,	"lremovexattr"	}, /* 4234 */
 	{ 2,	TD,	sys_fremovexattr,	"fremovexattr"	}, /* 4235 */
 	{ 2,	TS,	sys_kill,		"tkill"		}, /* 4236 */
-	{ 5,	TD|TN,	sys_sendfile64,		"sendfile64"	}, /* 4237 */
+	{ 4,	TD|TN,	sys_sendfile64,		"sendfile64"	}, /* 4237 */
 	{ 6,	0,	sys_futex,		"futex"		}, /* 4238 */
 	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity"}, /* 4239 */
 	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity"}, /* 4240 */
@@ -4249,12 +4249,12 @@
 	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 4244 */
 	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 4245 */
 	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 4246 */
-	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 4247 */
+	{ 4,	0,	sys_lookup_dcookie,	"lookup_dcookie"}, /* 4247 */
 	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 4248 */
 	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 4249 */
 	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 4250 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 4251 */
-	{ 1,	0,	printargs,		"set_tid_address"}, /* 4252 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address"}, /* 4252 */
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall"}, /* 4253 */
 	{ 6,	TD,	sys_fadvise64_64,	"fadvise64_64"	}, /* 4254 */
 	{ 3,	TF,	sys_statfs64,		"statfs64"	}, /* 4255 */
@@ -4271,25 +4271,25 @@
 	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 4266 */
 	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 4267 */
 	{ 4,	0,	sys_mbind,		"mbind"		}, /* 4268 */
-	{ 0,	0,	printargs,		"SYS_4269"	}, /* 4269 */
-	{ 0,	0,	printargs,		"SYS_4270"	}, /* 4270 */
+	{ 0,	0,	NULL,			NULL		}, /* 4269 */
+	{ 0,	0,	NULL,			NULL		}, /* 4270 */
 	{ 4,	0,	sys_mq_open,		"mq_open"	}, /* 4271 */
 	{ 1,	0,	sys_mq_unlink,		"mq_unlink"	}, /* 4272 */
 	{ 5,	0,	sys_mq_timedsend,	"mq_timedsend"	}, /* 4273 */
 	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive"}, /* 4274 */
 	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 4275 */
 	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 4276 */
-	{ 0,	0,	printargs,		"SYS_4277"	}, /* 4277 */
+	{ 0,	0,	NULL,			NULL		}, /* 4277 */
 	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 4278 */
-	{ 0,	0,	printargs,		"SYS_4279"	}, /* 4279 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 4280 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 4281 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 4282 */
+	{ 0,	0,	NULL,			NULL		}, /* 4279 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 4280 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 4281 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 4282 */
 	{ 1,	0,	sys_set_thread_area,	"set_thread_area" }, /* 4283 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 4284 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 4284 */
 	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 4285 */
 	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 4286 */
-	{ 4,	0,	printargs,		"migrate_pages"	}, /* 4287 */
+	{ 4,	0,	sys_migrate_pages,	"migrate_pages"	}, /* 4287 */
 	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 4288 */
 	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 4289 */
 	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 4290 */
@@ -4306,18 +4306,18 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 4301 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 4302 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 4303 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 4304 */
-	{ 4,	TD,	printargs,		"sync_file_range" }, /* 4305 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 4306 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 4307 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 4304 */
+	{ 4,	TD,	sys_sync_file_range,	"sync_file_range" }, /* 4305 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 4306 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 4307 */
 	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 4308 */
-	{ 2,	0,	printargs,		"set_robust_list" }, /* 4309 */
-	{ 3,	0,	printargs,		"get_robust_list" }, /* 4310 */
-	{ 4,	0,	printargs,		"kexec_load"	}, /* 4311 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 4309 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 4310 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 4311 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 4312 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 4313 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 4314 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 4315 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 4313 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 4314 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 4315 */
 	{ 4,	0,	printargs,		"utimensat"	}, /* 4316 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 4317 */
 	{ 4,	TD,	sys_timerfd,		"timerfd"	}, /* 4318 */
@@ -4332,15 +4332,23 @@
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 4327 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 4328 */
 	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 4329 */
-	{ 6,	TD,	printargs,		"preadv"	}, /* 4330 */
-	{ 6,	TD,	printargs,		"pwritev"	}, /* 4331 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo" }, /* 4332 */
-	{ 5,	TD,	printargs,		"perf_event_open" }, /* 4333 */
+	{ 6,	TD,	sys_preadv,		"preadv"	}, /* 4330 */
+	{ 6,	TD,	sys_pwritev,		"pwritev"	}, /* 4331 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo" }, /* 4332 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open" }, /* 4333 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 4334 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 4335 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 4336 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 4337 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 4338 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 4336 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 4337 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 4338 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 4339 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 4340 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 4341 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 4342 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 4343 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 4344 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 4345 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 4346 */
 #else
 	{ 0,	0,	printargs,		"o32_syscall"	}, /* 4000 */
 	{ 0,	0,	printargs,		"o32_exit"		}, /* 4001 */
@@ -4550,8 +4558,8 @@
 	{ 0,	0,	printargs,		"o32_capset"	}, /* 4205 */
 	{ 0,	0,	printargs,		"o32_sigaltstatck"	}, /* 4206 */
 	{ 0,	0,	printargs,		"o32_sendfile"	}, /* 4207 */
-	{ 0,	0,	printargs,		"SYS_4208"	}, /* 4208 */
-	{ 0,	0,	printargs,		"SYS_4209"	}, /* 4209 */
+	{ 0,	0,	NULL,			NULL		}, /* 4208 */
+	{ 0,	0,	NULL,			NULL		}, /* 4209 */
 	{ 0,	0,	printargs,		"o32_mmap"		}, /* 4210 */
 	{ 0,	0,	printargs,		"o32_truncate64"	}, /* 4211 */
 	{ 0,	0,	printargs,		"o32_ftruncate64"	}, /* 4212 */
@@ -4563,7 +4571,7 @@
 	{ 0,	0,	printargs,		"o32_madvise"	}, /* 4218 */
 	{ 0,	0,	printargs,		"o32_getdents64"	}, /* 4219 */
 	{ 0,	0,	printargs,		"o32_fcntl64"	}, /* 4220 */
-	{ 0,	0,	printargs,		"SYS_4221"	}, /* 4221 */
+	{ 0,	0,	NULL,			NULL		}, /* 4221 */
 	{ 0,	0,	printargs,		"o32_gettid"	}, /* 4222 */
 	{ 5,	TD,	printargs,		"o32_readahead"	}, /* 4223 */
 	{ 5,	TF,	printargs,		"o32_setxattr"	}, /* 4224 */
@@ -4596,7 +4604,7 @@
 	{ 5,	0,	printargs,		"o32_remap_file_pages"}, /* 4251 */
 	{ 1,	0,	printargs,		"o32_set_tid_address"}, /* 4252 */
 	{ 0,	0,	printargs,		"o32_restart_syscall"}, /* 4253 */
-	{ 7,	0,	printargs,		"o32_fadvise64_64"	}, /* 4254 */
+	{ MA,	0,	printargs,		"o32_fadvise64_64"	}, /* 4254 */
 	{ 3,	TF,	printargs,		"o32_statfs64"	}, /* 4255 */
 	{ 2,	TD,	printargs,		"o32_fstatfs64"	}, /* 4256 */
 	{ 3,	0,	printargs,		"o32_timer_create"	}, /* 4257 */
@@ -4678,675 +4686,672 @@
 	{ 5,	TD,	printargs,		"o32_perf_event_open" }, /* 4333 */
 	{ 4,	TN,	printargs,		"o32_accept4"	}, /* 4334 */
 	{ 5,	TN,	printargs,		"o32_recvmmsg"	}, /* 4335 */
-	{ 2,	0,	printargs,		"o32_fanotify_init"	}, /* 4336 */
-	{ 5,	0,	printargs,		"o32_fanotify_mark"	}, /* 4337 */
+	{ 2,	TD,	printargs,		"o32_fanotify_init" }, /* 4336 */
+	{ 5,	TD|TF,	printargs,		"o32_fanotify_mark" }, /* 4337 */
 	{ 4,	0,	printargs,		"o32_prlimit64"	}, /* 4338 */
+	{ 5,	TD|TF,	printargs,		"o32_name_to_handle_at"}, /* 4339 */
+	{ 3,	TD,	printargs,		"o32_open_by_handle_at"}, /* 4340 */
+	{ 2,	0,	printargs,		"o32_clock_adjtime" }, /* 4341 */
+	{ 1,	TD,	printargs,		"o32_syncfs"	}, /* 4342 */
+	{ 4,	TN,	printargs,		"o32_sendmmsg"	}, /* 4343 */
+	{ 2,	TD,	printargs,		"o32_setns"	}, /* 4344 */
+	{ 6,	0,	printargs,		"o32_process_vm_readv"	}, /* 4345 */
+	{ 6,	0,	printargs,		"o32_process_vm_writev"	}, /* 4346 */
 #endif
-	{ 0,	0,	printargs,		"SYS_4336"	}, /* 4336 */
-	{ 0,	0,	printargs,		"SYS_4337"	}, /* 4337 */
-	{ 0,	0,	printargs,		"SYS_4338"	}, /* 4338 */
-	{ 0,	0,	printargs,		"SYS_4339"	}, /* 4339 */
-	{ 0,	0,	printargs,		"SYS_4340"	}, /* 4340 */
-	{ 0,	0,	printargs,		"SYS_4341"	}, /* 4341 */
-	{ 0,	0,	printargs,		"SYS_4342"	}, /* 4342 */
-	{ 0,	0,	printargs,		"SYS_4343"	}, /* 4343 */
-	{ 0,	0,	printargs,		"SYS_4344"	}, /* 4344 */
-	{ 0,	0,	printargs,		"SYS_4345"	}, /* 4345 */
-	{ 0,	0,	printargs,		"SYS_4346"	}, /* 4346 */
-	{ 0,	0,	printargs,		"SYS_4347"	}, /* 4347 */
-	{ 0,	0,	printargs,		"SYS_4348"	}, /* 4348 */
-	{ 0,	0,	printargs,		"SYS_4349"	}, /* 4349 */
-	{ 0,	0,	printargs,		"SYS_4350"	}, /* 4350 */
-	{ 0,	0,	printargs,		"SYS_4351"	}, /* 4351 */
-	{ 0,	0,	printargs,		"SYS_4352"	}, /* 4352 */
-	{ 0,	0,	printargs,		"SYS_4353"	}, /* 4353 */
-	{ 0,	0,	printargs,		"SYS_4354"	}, /* 4354 */
-	{ 0,	0,	printargs,		"SYS_4355"	}, /* 4355 */
-	{ 0,	0,	printargs,		"SYS_4356"	}, /* 4356 */
-	{ 0,	0,	printargs,		"SYS_4357"	}, /* 4357 */
-	{ 0,	0,	printargs,		"SYS_4358"	}, /* 4358 */
-	{ 0,	0,	printargs,		"SYS_4359"	}, /* 4359 */
-	{ 0,	0,	printargs,		"SYS_4360"	}, /* 4360 */
-	{ 0,	0,	printargs,		"SYS_4361"	}, /* 4361 */
-	{ 0,	0,	printargs,		"SYS_4362"	}, /* 4362 */
-	{ 0,	0,	printargs,		"SYS_4363"	}, /* 4363 */
-	{ 0,	0,	printargs,		"SYS_4364"	}, /* 4364 */
-	{ 0,	0,	printargs,		"SYS_4365"	}, /* 4365 */
-	{ 0,	0,	printargs,		"SYS_4366"	}, /* 4366 */
-	{ 0,	0,	printargs,		"SYS_4367"	}, /* 4367 */
-	{ 0,	0,	printargs,		"SYS_4368"	}, /* 4368 */
-	{ 0,	0,	printargs,		"SYS_4369"	}, /* 4369 */
-	{ 0,	0,	printargs,		"SYS_4370"	}, /* 4370 */
-	{ 0,	0,	printargs,		"SYS_4371"	}, /* 4371 */
-	{ 0,	0,	printargs,		"SYS_4372"	}, /* 4372 */
-	{ 0,	0,	printargs,		"SYS_4373"	}, /* 4373 */
-	{ 0,	0,	printargs,		"SYS_4374"	}, /* 4374 */
-	{ 0,	0,	printargs,		"SYS_4375"	}, /* 4375 */
-	{ 0,	0,	printargs,		"SYS_4376"	}, /* 4376 */
-	{ 0,	0,	printargs,		"SYS_4377"	}, /* 4377 */
-	{ 0,	0,	printargs,		"SYS_4378"	}, /* 4378 */
-	{ 0,	0,	printargs,		"SYS_4379"	}, /* 4379 */
-	{ 0,	0,	printargs,		"SYS_4380"	}, /* 4380 */
-	{ 0,	0,	printargs,		"SYS_4381"	}, /* 4381 */
-	{ 0,	0,	printargs,		"SYS_4382"	}, /* 4382 */
-	{ 0,	0,	printargs,		"SYS_4383"	}, /* 4383 */
-	{ 0,	0,	printargs,		"SYS_4384"	}, /* 4384 */
-	{ 0,	0,	printargs,		"SYS_4385"	}, /* 4385 */
-	{ 0,	0,	printargs,		"SYS_4386"	}, /* 4386 */
-	{ 0,	0,	printargs,		"SYS_4387"	}, /* 4387 */
-	{ 0,	0,	printargs,		"SYS_4388"	}, /* 4388 */
-	{ 0,	0,	printargs,		"SYS_4389"	}, /* 4389 */
-	{ 0,	0,	printargs,		"SYS_4390"	}, /* 4390 */
-	{ 0,	0,	printargs,		"SYS_4391"	}, /* 4391 */
-	{ 0,	0,	printargs,		"SYS_4392"	}, /* 4392 */
-	{ 0,	0,	printargs,		"SYS_4393"	}, /* 4393 */
-	{ 0,	0,	printargs,		"SYS_4394"	}, /* 4394 */
-	{ 0,	0,	printargs,		"SYS_4395"	}, /* 4395 */
-	{ 0,	0,	printargs,		"SYS_4396"	}, /* 4396 */
-	{ 0,	0,	printargs,		"SYS_4397"	}, /* 4397 */
-	{ 0,	0,	printargs,		"SYS_4398"	}, /* 4398 */
-	{ 0,	0,	printargs,		"SYS_4399"	}, /* 4399 */
-	{ 0,	0,	printargs,		"SYS_4400"	}, /* 4400 */
-	{ 0,	0,	printargs,		"SYS_4401"	}, /* 4401 */
-	{ 0,	0,	printargs,		"SYS_4402"	}, /* 4402 */
-	{ 0,	0,	printargs,		"SYS_4403"	}, /* 4403 */
-	{ 0,	0,	printargs,		"SYS_4404"	}, /* 4404 */
-	{ 0,	0,	printargs,		"SYS_4405"	}, /* 4405 */
-	{ 0,	0,	printargs,		"SYS_4406"	}, /* 4406 */
-	{ 0,	0,	printargs,		"SYS_4407"	}, /* 4407 */
-	{ 0,	0,	printargs,		"SYS_4408"	}, /* 4408 */
-	{ 0,	0,	printargs,		"SYS_4409"	}, /* 4409 */
-	{ 0,	0,	printargs,		"SYS_4410"	}, /* 4410 */
-	{ 0,	0,	printargs,		"SYS_4411"	}, /* 4411 */
-	{ 0,	0,	printargs,		"SYS_4412"	}, /* 4412 */
-	{ 0,	0,	printargs,		"SYS_4413"	}, /* 4413 */
-	{ 0,	0,	printargs,		"SYS_4414"	}, /* 4414 */
-	{ 0,	0,	printargs,		"SYS_4415"	}, /* 4415 */
-	{ 0,	0,	printargs,		"SYS_4416"	}, /* 4416 */
-	{ 0,	0,	printargs,		"SYS_4417"	}, /* 4417 */
-	{ 0,	0,	printargs,		"SYS_4418"	}, /* 4418 */
-	{ 0,	0,	printargs,		"SYS_4419"	}, /* 4419 */
-	{ 0,	0,	printargs,		"SYS_4420"	}, /* 4420 */
-	{ 0,	0,	printargs,		"SYS_4421"	}, /* 4421 */
-	{ 0,	0,	printargs,		"SYS_4422"	}, /* 4422 */
-	{ 0,	0,	printargs,		"SYS_4423"	}, /* 4423 */
-	{ 0,	0,	printargs,		"SYS_4424"	}, /* 4424 */
-	{ 0,	0,	printargs,		"SYS_4425"	}, /* 4425 */
-	{ 0,	0,	printargs,		"SYS_4426"	}, /* 4426 */
-	{ 0,	0,	printargs,		"SYS_4427"	}, /* 4427 */
-	{ 0,	0,	printargs,		"SYS_4428"	}, /* 4428 */
-	{ 0,	0,	printargs,		"SYS_4429"	}, /* 4429 */
-	{ 0,	0,	printargs,		"SYS_4430"	}, /* 4430 */
-	{ 0,	0,	printargs,		"SYS_4431"	}, /* 4431 */
-	{ 0,	0,	printargs,		"SYS_4432"	}, /* 4432 */
-	{ 0,	0,	printargs,		"SYS_4433"	}, /* 4433 */
-	{ 0,	0,	printargs,		"SYS_4434"	}, /* 4434 */
-	{ 0,	0,	printargs,		"SYS_4435"	}, /* 4435 */
-	{ 0,	0,	printargs,		"SYS_4436"	}, /* 4436 */
-	{ 0,	0,	printargs,		"SYS_4437"	}, /* 4437 */
-	{ 0,	0,	printargs,		"SYS_4438"	}, /* 4438 */
-	{ 0,	0,	printargs,		"SYS_4439"	}, /* 4439 */
-	{ 0,	0,	printargs,		"SYS_4440"	}, /* 4440 */
-	{ 0,	0,	printargs,		"SYS_4441"	}, /* 4441 */
-	{ 0,	0,	printargs,		"SYS_4442"	}, /* 4442 */
-	{ 0,	0,	printargs,		"SYS_4443"	}, /* 4443 */
-	{ 0,	0,	printargs,		"SYS_4444"	}, /* 4444 */
-	{ 0,	0,	printargs,		"SYS_4445"	}, /* 4445 */
-	{ 0,	0,	printargs,		"SYS_4446"	}, /* 4446 */
-	{ 0,	0,	printargs,		"SYS_4447"	}, /* 4447 */
-	{ 0,	0,	printargs,		"SYS_4448"	}, /* 4448 */
-	{ 0,	0,	printargs,		"SYS_4449"	}, /* 4449 */
-	{ 0,	0,	printargs,		"SYS_4450"	}, /* 4450 */
-	{ 0,	0,	printargs,		"SYS_4451"	}, /* 4451 */
-	{ 0,	0,	printargs,		"SYS_4452"	}, /* 4452 */
-	{ 0,	0,	printargs,		"SYS_4453"	}, /* 4453 */
-	{ 0,	0,	printargs,		"SYS_4454"	}, /* 4454 */
-	{ 0,	0,	printargs,		"SYS_4455"	}, /* 4455 */
-	{ 0,	0,	printargs,		"SYS_4456"	}, /* 4456 */
-	{ 0,	0,	printargs,		"SYS_4457"	}, /* 4457 */
-	{ 0,	0,	printargs,		"SYS_4458"	}, /* 4458 */
-	{ 0,	0,	printargs,		"SYS_4459"	}, /* 4459 */
-	{ 0,	0,	printargs,		"SYS_4460"	}, /* 4460 */
-	{ 0,	0,	printargs,		"SYS_4461"	}, /* 4461 */
-	{ 0,	0,	printargs,		"SYS_4462"	}, /* 4462 */
-	{ 0,	0,	printargs,		"SYS_4463"	}, /* 4463 */
-	{ 0,	0,	printargs,		"SYS_4464"	}, /* 4464 */
-	{ 0,	0,	printargs,		"SYS_4465"	}, /* 4465 */
-	{ 0,	0,	printargs,		"SYS_4466"	}, /* 4466 */
-	{ 0,	0,	printargs,		"SYS_4467"	}, /* 4467 */
-	{ 0,	0,	printargs,		"SYS_4468"	}, /* 4468 */
-	{ 0,	0,	printargs,		"SYS_4469"	}, /* 4469 */
-	{ 0,	0,	printargs,		"SYS_4470"	}, /* 4470 */
-	{ 0,	0,	printargs,		"SYS_4471"	}, /* 4471 */
-	{ 0,	0,	printargs,		"SYS_4472"	}, /* 4472 */
-	{ 0,	0,	printargs,		"SYS_4473"	}, /* 4473 */
-	{ 0,	0,	printargs,		"SYS_4474"	}, /* 4474 */
-	{ 0,	0,	printargs,		"SYS_4475"	}, /* 4475 */
-	{ 0,	0,	printargs,		"SYS_4476"	}, /* 4476 */
-	{ 0,	0,	printargs,		"SYS_4477"	}, /* 4477 */
-	{ 0,	0,	printargs,		"SYS_4478"	}, /* 4478 */
-	{ 0,	0,	printargs,		"SYS_4479"	}, /* 4479 */
-	{ 0,	0,	printargs,		"SYS_4480"	}, /* 4480 */
-	{ 0,	0,	printargs,		"SYS_4481"	}, /* 4481 */
-	{ 0,	0,	printargs,		"SYS_4482"	}, /* 4482 */
-	{ 0,	0,	printargs,		"SYS_4483"	}, /* 4483 */
-	{ 0,	0,	printargs,		"SYS_4484"	}, /* 4484 */
-	{ 0,	0,	printargs,		"SYS_4485"	}, /* 4485 */
-	{ 0,	0,	printargs,		"SYS_4486"	}, /* 4486 */
-	{ 0,	0,	printargs,		"SYS_4487"	}, /* 4487 */
-	{ 0,	0,	printargs,		"SYS_4488"	}, /* 4488 */
-	{ 0,	0,	printargs,		"SYS_4489"	}, /* 4489 */
-	{ 0,	0,	printargs,		"SYS_4490"	}, /* 4490 */
-	{ 0,	0,	printargs,		"SYS_4491"	}, /* 4491 */
-	{ 0,	0,	printargs,		"SYS_4492"	}, /* 4492 */
-	{ 0,	0,	printargs,		"SYS_4493"	}, /* 4493 */
-	{ 0,	0,	printargs,		"SYS_4494"	}, /* 4494 */
-	{ 0,	0,	printargs,		"SYS_4495"	}, /* 4495 */
-	{ 0,	0,	printargs,		"SYS_4496"	}, /* 4496 */
-	{ 0,	0,	printargs,		"SYS_4497"	}, /* 4497 */
-	{ 0,	0,	printargs,		"SYS_4498"	}, /* 4498 */
-	{ 0,	0,	printargs,		"SYS_4499"	}, /* 4499 */
-	{ 0,	0,	printargs,		"SYS_4500"	}, /* 4500 */
-	{ 0,	0,	printargs,		"SYS_4501"	}, /* 4501 */
-	{ 0,	0,	printargs,		"SYS_4502"	}, /* 4502 */
-	{ 0,	0,	printargs,		"SYS_4503"	}, /* 4503 */
-	{ 0,	0,	printargs,		"SYS_4504"	}, /* 4504 */
-	{ 0,	0,	printargs,		"SYS_4505"	}, /* 4505 */
-	{ 0,	0,	printargs,		"SYS_4506"	}, /* 4506 */
-	{ 0,	0,	printargs,		"SYS_4507"	}, /* 4507 */
-	{ 0,	0,	printargs,		"SYS_4508"	}, /* 4508 */
-	{ 0,	0,	printargs,		"SYS_4509"	}, /* 4509 */
-	{ 0,	0,	printargs,		"SYS_4510"	}, /* 4510 */
-	{ 0,	0,	printargs,		"SYS_4511"	}, /* 4511 */
-	{ 0,	0,	printargs,		"SYS_4512"	}, /* 4512 */
-	{ 0,	0,	printargs,		"SYS_4513"	}, /* 4513 */
-	{ 0,	0,	printargs,		"SYS_4514"	}, /* 4514 */
-	{ 0,	0,	printargs,		"SYS_4515"	}, /* 4515 */
-	{ 0,	0,	printargs,		"SYS_4516"	}, /* 4516 */
-	{ 0,	0,	printargs,		"SYS_4517"	}, /* 4517 */
-	{ 0,	0,	printargs,		"SYS_4518"	}, /* 4518 */
-	{ 0,	0,	printargs,		"SYS_4519"	}, /* 4519 */
-	{ 0,	0,	printargs,		"SYS_4520"	}, /* 4520 */
-	{ 0,	0,	printargs,		"SYS_4521"	}, /* 4521 */
-	{ 0,	0,	printargs,		"SYS_4522"	}, /* 4522 */
-	{ 0,	0,	printargs,		"SYS_4523"	}, /* 4523 */
-	{ 0,	0,	printargs,		"SYS_4524"	}, /* 4524 */
-	{ 0,	0,	printargs,		"SYS_4525"	}, /* 4525 */
-	{ 0,	0,	printargs,		"SYS_4526"	}, /* 4526 */
-	{ 0,	0,	printargs,		"SYS_4527"	}, /* 4527 */
-	{ 0,	0,	printargs,		"SYS_4528"	}, /* 4528 */
-	{ 0,	0,	printargs,		"SYS_4529"	}, /* 4529 */
-	{ 0,	0,	printargs,		"SYS_4530"	}, /* 4530 */
-	{ 0,	0,	printargs,		"SYS_4531"	}, /* 4531 */
-	{ 0,	0,	printargs,		"SYS_4532"	}, /* 4532 */
-	{ 0,	0,	printargs,		"SYS_4533"	}, /* 4533 */
-	{ 0,	0,	printargs,		"SYS_4534"	}, /* 4534 */
-	{ 0,	0,	printargs,		"SYS_4535"	}, /* 4535 */
-	{ 0,	0,	printargs,		"SYS_4536"	}, /* 4536 */
-	{ 0,	0,	printargs,		"SYS_4537"	}, /* 4537 */
-	{ 0,	0,	printargs,		"SYS_4538"	}, /* 4538 */
-	{ 0,	0,	printargs,		"SYS_4539"	}, /* 4539 */
-	{ 0,	0,	printargs,		"SYS_4540"	}, /* 4540 */
-	{ 0,	0,	printargs,		"SYS_4541"	}, /* 4541 */
-	{ 0,	0,	printargs,		"SYS_4542"	}, /* 4542 */
-	{ 0,	0,	printargs,		"SYS_4543"	}, /* 4543 */
-	{ 0,	0,	printargs,		"SYS_4544"	}, /* 4544 */
-	{ 0,	0,	printargs,		"SYS_4545"	}, /* 4545 */
-	{ 0,	0,	printargs,		"SYS_4546"	}, /* 4546 */
-	{ 0,	0,	printargs,		"SYS_4547"	}, /* 4547 */
-	{ 0,	0,	printargs,		"SYS_4548"	}, /* 4548 */
-	{ 0,	0,	printargs,		"SYS_4549"	}, /* 4549 */
-	{ 0,	0,	printargs,		"SYS_4550"	}, /* 4550 */
-	{ 0,	0,	printargs,		"SYS_4551"	}, /* 4551 */
-	{ 0,	0,	printargs,		"SYS_4552"	}, /* 4552 */
-	{ 0,	0,	printargs,		"SYS_4553"	}, /* 4553 */
-	{ 0,	0,	printargs,		"SYS_4554"	}, /* 4554 */
-	{ 0,	0,	printargs,		"SYS_4555"	}, /* 4555 */
-	{ 0,	0,	printargs,		"SYS_4556"	}, /* 4556 */
-	{ 0,	0,	printargs,		"SYS_4557"	}, /* 4557 */
-	{ 0,	0,	printargs,		"SYS_4558"	}, /* 4558 */
-	{ 0,	0,	printargs,		"SYS_4559"	}, /* 4559 */
-	{ 0,	0,	printargs,		"SYS_4560"	}, /* 4560 */
-	{ 0,	0,	printargs,		"SYS_4561"	}, /* 4561 */
-	{ 0,	0,	printargs,		"SYS_4562"	}, /* 4562 */
-	{ 0,	0,	printargs,		"SYS_4563"	}, /* 4563 */
-	{ 0,	0,	printargs,		"SYS_4564"	}, /* 4564 */
-	{ 0,	0,	printargs,		"SYS_4565"	}, /* 4565 */
-	{ 0,	0,	printargs,		"SYS_4566"	}, /* 4566 */
-	{ 0,	0,	printargs,		"SYS_4567"	}, /* 4567 */
-	{ 0,	0,	printargs,		"SYS_4568"	}, /* 4568 */
-	{ 0,	0,	printargs,		"SYS_4569"	}, /* 4569 */
-	{ 0,	0,	printargs,		"SYS_4570"	}, /* 4570 */
-	{ 0,	0,	printargs,		"SYS_4571"	}, /* 4571 */
-	{ 0,	0,	printargs,		"SYS_4572"	}, /* 4572 */
-	{ 0,	0,	printargs,		"SYS_4573"	}, /* 4573 */
-	{ 0,	0,	printargs,		"SYS_4574"	}, /* 4574 */
-	{ 0,	0,	printargs,		"SYS_4575"	}, /* 4575 */
-	{ 0,	0,	printargs,		"SYS_4576"	}, /* 4576 */
-	{ 0,	0,	printargs,		"SYS_4577"	}, /* 4577 */
-	{ 0,	0,	printargs,		"SYS_4578"	}, /* 4578 */
-	{ 0,	0,	printargs,		"SYS_4579"	}, /* 4579 */
-	{ 0,	0,	printargs,		"SYS_4580"	}, /* 4580 */
-	{ 0,	0,	printargs,		"SYS_4581"	}, /* 4581 */
-	{ 0,	0,	printargs,		"SYS_4582"	}, /* 4582 */
-	{ 0,	0,	printargs,		"SYS_4583"	}, /* 4583 */
-	{ 0,	0,	printargs,		"SYS_4584"	}, /* 4584 */
-	{ 0,	0,	printargs,		"SYS_4585"	}, /* 4585 */
-	{ 0,	0,	printargs,		"SYS_4586"	}, /* 4586 */
-	{ 0,	0,	printargs,		"SYS_4587"	}, /* 4587 */
-	{ 0,	0,	printargs,		"SYS_4588"	}, /* 4588 */
-	{ 0,	0,	printargs,		"SYS_4589"	}, /* 4589 */
-	{ 0,	0,	printargs,		"SYS_4590"	}, /* 4590 */
-	{ 0,	0,	printargs,		"SYS_4591"	}, /* 4591 */
-	{ 0,	0,	printargs,		"SYS_4592"	}, /* 4592 */
-	{ 0,	0,	printargs,		"SYS_4593"	}, /* 4593 */
-	{ 0,	0,	printargs,		"SYS_4594"	}, /* 4594 */
-	{ 0,	0,	printargs,		"SYS_4595"	}, /* 4595 */
-	{ 0,	0,	printargs,		"SYS_4596"	}, /* 4596 */
-	{ 0,	0,	printargs,		"SYS_4597"	}, /* 4597 */
-	{ 0,	0,	printargs,		"SYS_4598"	}, /* 4598 */
-	{ 0,	0,	printargs,		"SYS_4599"	}, /* 4599 */
-	{ 0,	0,	printargs,		"SYS_4600"	}, /* 4600 */
-	{ 0,	0,	printargs,		"SYS_4601"	}, /* 4601 */
-	{ 0,	0,	printargs,		"SYS_4602"	}, /* 4602 */
-	{ 0,	0,	printargs,		"SYS_4603"	}, /* 4603 */
-	{ 0,	0,	printargs,		"SYS_4604"	}, /* 4604 */
-	{ 0,	0,	printargs,		"SYS_4605"	}, /* 4605 */
-	{ 0,	0,	printargs,		"SYS_4606"	}, /* 4606 */
-	{ 0,	0,	printargs,		"SYS_4607"	}, /* 4607 */
-	{ 0,	0,	printargs,		"SYS_4608"	}, /* 4608 */
-	{ 0,	0,	printargs,		"SYS_4609"	}, /* 4609 */
-	{ 0,	0,	printargs,		"SYS_4610"	}, /* 4610 */
-	{ 0,	0,	printargs,		"SYS_4611"	}, /* 4611 */
-	{ 0,	0,	printargs,		"SYS_4612"	}, /* 4612 */
-	{ 0,	0,	printargs,		"SYS_4613"	}, /* 4613 */
-	{ 0,	0,	printargs,		"SYS_4614"	}, /* 4614 */
-	{ 0,	0,	printargs,		"SYS_4615"	}, /* 4615 */
-	{ 0,	0,	printargs,		"SYS_4616"	}, /* 4616 */
-	{ 0,	0,	printargs,		"SYS_4617"	}, /* 4617 */
-	{ 0,	0,	printargs,		"SYS_4618"	}, /* 4618 */
-	{ 0,	0,	printargs,		"SYS_4619"	}, /* 4619 */
-	{ 0,	0,	printargs,		"SYS_4620"	}, /* 4620 */
-	{ 0,	0,	printargs,		"SYS_4621"	}, /* 4621 */
-	{ 0,	0,	printargs,		"SYS_4622"	}, /* 4622 */
-	{ 0,	0,	printargs,		"SYS_4623"	}, /* 4623 */
-	{ 0,	0,	printargs,		"SYS_4624"	}, /* 4624 */
-	{ 0,	0,	printargs,		"SYS_4625"	}, /* 4625 */
-	{ 0,	0,	printargs,		"SYS_4626"	}, /* 4626 */
-	{ 0,	0,	printargs,		"SYS_4627"	}, /* 4627 */
-	{ 0,	0,	printargs,		"SYS_4628"	}, /* 4628 */
-	{ 0,	0,	printargs,		"SYS_4629"	}, /* 4629 */
-	{ 0,	0,	printargs,		"SYS_4630"	}, /* 4630 */
-	{ 0,	0,	printargs,		"SYS_4631"	}, /* 4631 */
-	{ 0,	0,	printargs,		"SYS_4632"	}, /* 4632 */
-	{ 0,	0,	printargs,		"SYS_4633"	}, /* 4633 */
-	{ 0,	0,	printargs,		"SYS_4634"	}, /* 4634 */
-	{ 0,	0,	printargs,		"SYS_4635"	}, /* 4635 */
-	{ 0,	0,	printargs,		"SYS_4636"	}, /* 4636 */
-	{ 0,	0,	printargs,		"SYS_4637"	}, /* 4637 */
-	{ 0,	0,	printargs,		"SYS_4638"	}, /* 4638 */
-	{ 0,	0,	printargs,		"SYS_4639"	}, /* 4639 */
-	{ 0,	0,	printargs,		"SYS_4640"	}, /* 4640 */
-	{ 0,	0,	printargs,		"SYS_4641"	}, /* 4641 */
-	{ 0,	0,	printargs,		"SYS_4642"	}, /* 4642 */
-	{ 0,	0,	printargs,		"SYS_4643"	}, /* 4643 */
-	{ 0,	0,	printargs,		"SYS_4644"	}, /* 4644 */
-	{ 0,	0,	printargs,		"SYS_4645"	}, /* 4645 */
-	{ 0,	0,	printargs,		"SYS_4646"	}, /* 4646 */
-	{ 0,	0,	printargs,		"SYS_4647"	}, /* 4647 */
-	{ 0,	0,	printargs,		"SYS_4648"	}, /* 4648 */
-	{ 0,	0,	printargs,		"SYS_4649"	}, /* 4649 */
-	{ 0,	0,	printargs,		"SYS_4650"	}, /* 4650 */
-	{ 0,	0,	printargs,		"SYS_4651"	}, /* 4651 */
-	{ 0,	0,	printargs,		"SYS_4652"	}, /* 4652 */
-	{ 0,	0,	printargs,		"SYS_4653"	}, /* 4653 */
-	{ 0,	0,	printargs,		"SYS_4654"	}, /* 4654 */
-	{ 0,	0,	printargs,		"SYS_4655"	}, /* 4655 */
-	{ 0,	0,	printargs,		"SYS_4656"	}, /* 4656 */
-	{ 0,	0,	printargs,		"SYS_4657"	}, /* 4657 */
-	{ 0,	0,	printargs,		"SYS_4658"	}, /* 4658 */
-	{ 0,	0,	printargs,		"SYS_4659"	}, /* 4659 */
-	{ 0,	0,	printargs,		"SYS_4660"	}, /* 4660 */
-	{ 0,	0,	printargs,		"SYS_4661"	}, /* 4661 */
-	{ 0,	0,	printargs,		"SYS_4662"	}, /* 4662 */
-	{ 0,	0,	printargs,		"SYS_4663"	}, /* 4663 */
-	{ 0,	0,	printargs,		"SYS_4664"	}, /* 4664 */
-	{ 0,	0,	printargs,		"SYS_4665"	}, /* 4665 */
-	{ 0,	0,	printargs,		"SYS_4666"	}, /* 4666 */
-	{ 0,	0,	printargs,		"SYS_4667"	}, /* 4667 */
-	{ 0,	0,	printargs,		"SYS_4668"	}, /* 4668 */
-	{ 0,	0,	printargs,		"SYS_4669"	}, /* 4669 */
-	{ 0,	0,	printargs,		"SYS_4670"	}, /* 4670 */
-	{ 0,	0,	printargs,		"SYS_4671"	}, /* 4671 */
-	{ 0,	0,	printargs,		"SYS_4672"	}, /* 4672 */
-	{ 0,	0,	printargs,		"SYS_4673"	}, /* 4673 */
-	{ 0,	0,	printargs,		"SYS_4674"	}, /* 4674 */
-	{ 0,	0,	printargs,		"SYS_4675"	}, /* 4675 */
-	{ 0,	0,	printargs,		"SYS_4676"	}, /* 4676 */
-	{ 0,	0,	printargs,		"SYS_4677"	}, /* 4677 */
-	{ 0,	0,	printargs,		"SYS_4678"	}, /* 4678 */
-	{ 0,	0,	printargs,		"SYS_4679"	}, /* 4679 */
-	{ 0,	0,	printargs,		"SYS_4680"	}, /* 4680 */
-	{ 0,	0,	printargs,		"SYS_4681"	}, /* 4681 */
-	{ 0,	0,	printargs,		"SYS_4682"	}, /* 4682 */
-	{ 0,	0,	printargs,		"SYS_4683"	}, /* 4683 */
-	{ 0,	0,	printargs,		"SYS_4684"	}, /* 4684 */
-	{ 0,	0,	printargs,		"SYS_4685"	}, /* 4685 */
-	{ 0,	0,	printargs,		"SYS_4686"	}, /* 4686 */
-	{ 0,	0,	printargs,		"SYS_4687"	}, /* 4687 */
-	{ 0,	0,	printargs,		"SYS_4688"	}, /* 4688 */
-	{ 0,	0,	printargs,		"SYS_4689"	}, /* 4689 */
-	{ 0,	0,	printargs,		"SYS_4690"	}, /* 4690 */
-	{ 0,	0,	printargs,		"SYS_4691"	}, /* 4691 */
-	{ 0,	0,	printargs,		"SYS_4692"	}, /* 4692 */
-	{ 0,	0,	printargs,		"SYS_4693"	}, /* 4693 */
-	{ 0,	0,	printargs,		"SYS_4694"	}, /* 4694 */
-	{ 0,	0,	printargs,		"SYS_4695"	}, /* 4695 */
-	{ 0,	0,	printargs,		"SYS_4696"	}, /* 4696 */
-	{ 0,	0,	printargs,		"SYS_4697"	}, /* 4697 */
-	{ 0,	0,	printargs,		"SYS_4698"	}, /* 4698 */
-	{ 0,	0,	printargs,		"SYS_4699"	}, /* 4699 */
-	{ 0,	0,	printargs,		"SYS_4700"	}, /* 4700 */
-	{ 0,	0,	printargs,		"SYS_4701"	}, /* 4701 */
-	{ 0,	0,	printargs,		"SYS_4702"	}, /* 4702 */
-	{ 0,	0,	printargs,		"SYS_4703"	}, /* 4703 */
-	{ 0,	0,	printargs,		"SYS_4704"	}, /* 4704 */
-	{ 0,	0,	printargs,		"SYS_4705"	}, /* 4705 */
-	{ 0,	0,	printargs,		"SYS_4706"	}, /* 4706 */
-	{ 0,	0,	printargs,		"SYS_4707"	}, /* 4707 */
-	{ 0,	0,	printargs,		"SYS_4708"	}, /* 4708 */
-	{ 0,	0,	printargs,		"SYS_4709"	}, /* 4709 */
-	{ 0,	0,	printargs,		"SYS_4710"	}, /* 4710 */
-	{ 0,	0,	printargs,		"SYS_4711"	}, /* 4711 */
-	{ 0,	0,	printargs,		"SYS_4712"	}, /* 4712 */
-	{ 0,	0,	printargs,		"SYS_4713"	}, /* 4713 */
-	{ 0,	0,	printargs,		"SYS_4714"	}, /* 4714 */
-	{ 0,	0,	printargs,		"SYS_4715"	}, /* 4715 */
-	{ 0,	0,	printargs,		"SYS_4716"	}, /* 4716 */
-	{ 0,	0,	printargs,		"SYS_4717"	}, /* 4717 */
-	{ 0,	0,	printargs,		"SYS_4718"	}, /* 4718 */
-	{ 0,	0,	printargs,		"SYS_4719"	}, /* 4719 */
-	{ 0,	0,	printargs,		"SYS_4720"	}, /* 4720 */
-	{ 0,	0,	printargs,		"SYS_4721"	}, /* 4721 */
-	{ 0,	0,	printargs,		"SYS_4722"	}, /* 4722 */
-	{ 0,	0,	printargs,		"SYS_4723"	}, /* 4723 */
-	{ 0,	0,	printargs,		"SYS_4724"	}, /* 4724 */
-	{ 0,	0,	printargs,		"SYS_4725"	}, /* 4725 */
-	{ 0,	0,	printargs,		"SYS_4726"	}, /* 4726 */
-	{ 0,	0,	printargs,		"SYS_4727"	}, /* 4727 */
-	{ 0,	0,	printargs,		"SYS_4728"	}, /* 4728 */
-	{ 0,	0,	printargs,		"SYS_4729"	}, /* 4729 */
-	{ 0,	0,	printargs,		"SYS_4730"	}, /* 4730 */
-	{ 0,	0,	printargs,		"SYS_4731"	}, /* 4731 */
-	{ 0,	0,	printargs,		"SYS_4732"	}, /* 4732 */
-	{ 0,	0,	printargs,		"SYS_4733"	}, /* 4733 */
-	{ 0,	0,	printargs,		"SYS_4734"	}, /* 4734 */
-	{ 0,	0,	printargs,		"SYS_4735"	}, /* 4735 */
-	{ 0,	0,	printargs,		"SYS_4736"	}, /* 4736 */
-	{ 0,	0,	printargs,		"SYS_4737"	}, /* 4737 */
-	{ 0,	0,	printargs,		"SYS_4738"	}, /* 4738 */
-	{ 0,	0,	printargs,		"SYS_4739"	}, /* 4739 */
-	{ 0,	0,	printargs,		"SYS_4740"	}, /* 4740 */
-	{ 0,	0,	printargs,		"SYS_4741"	}, /* 4741 */
-	{ 0,	0,	printargs,		"SYS_4742"	}, /* 4742 */
-	{ 0,	0,	printargs,		"SYS_4743"	}, /* 4743 */
-	{ 0,	0,	printargs,		"SYS_4744"	}, /* 4744 */
-	{ 0,	0,	printargs,		"SYS_4745"	}, /* 4745 */
-	{ 0,	0,	printargs,		"SYS_4746"	}, /* 4746 */
-	{ 0,	0,	printargs,		"SYS_4747"	}, /* 4747 */
-	{ 0,	0,	printargs,		"SYS_4748"	}, /* 4748 */
-	{ 0,	0,	printargs,		"SYS_4749"	}, /* 4749 */
-	{ 0,	0,	printargs,		"SYS_4750"	}, /* 4750 */
-	{ 0,	0,	printargs,		"SYS_4751"	}, /* 4751 */
-	{ 0,	0,	printargs,		"SYS_4752"	}, /* 4752 */
-	{ 0,	0,	printargs,		"SYS_4753"	}, /* 4753 */
-	{ 0,	0,	printargs,		"SYS_4754"	}, /* 4754 */
-	{ 0,	0,	printargs,		"SYS_4755"	}, /* 4755 */
-	{ 0,	0,	printargs,		"SYS_4756"	}, /* 4756 */
-	{ 0,	0,	printargs,		"SYS_4757"	}, /* 4757 */
-	{ 0,	0,	printargs,		"SYS_4758"	}, /* 4758 */
-	{ 0,	0,	printargs,		"SYS_4759"	}, /* 4759 */
-	{ 0,	0,	printargs,		"SYS_4760"	}, /* 4760 */
-	{ 0,	0,	printargs,		"SYS_4761"	}, /* 4761 */
-	{ 0,	0,	printargs,		"SYS_4762"	}, /* 4762 */
-	{ 0,	0,	printargs,		"SYS_4763"	}, /* 4763 */
-	{ 0,	0,	printargs,		"SYS_4764"	}, /* 4764 */
-	{ 0,	0,	printargs,		"SYS_4765"	}, /* 4765 */
-	{ 0,	0,	printargs,		"SYS_4766"	}, /* 4766 */
-	{ 0,	0,	printargs,		"SYS_4767"	}, /* 4767 */
-	{ 0,	0,	printargs,		"SYS_4768"	}, /* 4768 */
-	{ 0,	0,	printargs,		"SYS_4769"	}, /* 4769 */
-	{ 0,	0,	printargs,		"SYS_4770"	}, /* 4770 */
-	{ 0,	0,	printargs,		"SYS_4771"	}, /* 4771 */
-	{ 0,	0,	printargs,		"SYS_4772"	}, /* 4772 */
-	{ 0,	0,	printargs,		"SYS_4773"	}, /* 4773 */
-	{ 0,	0,	printargs,		"SYS_4774"	}, /* 4774 */
-	{ 0,	0,	printargs,		"SYS_4775"	}, /* 4775 */
-	{ 0,	0,	printargs,		"SYS_4776"	}, /* 4776 */
-	{ 0,	0,	printargs,		"SYS_4777"	}, /* 4777 */
-	{ 0,	0,	printargs,		"SYS_4778"	}, /* 4778 */
-	{ 0,	0,	printargs,		"SYS_4779"	}, /* 4779 */
-	{ 0,	0,	printargs,		"SYS_4780"	}, /* 4780 */
-	{ 0,	0,	printargs,		"SYS_4781"	}, /* 4781 */
-	{ 0,	0,	printargs,		"SYS_4782"	}, /* 4782 */
-	{ 0,	0,	printargs,		"SYS_4783"	}, /* 4783 */
-	{ 0,	0,	printargs,		"SYS_4784"	}, /* 4784 */
-	{ 0,	0,	printargs,		"SYS_4785"	}, /* 4785 */
-	{ 0,	0,	printargs,		"SYS_4786"	}, /* 4786 */
-	{ 0,	0,	printargs,		"SYS_4787"	}, /* 4787 */
-	{ 0,	0,	printargs,		"SYS_4788"	}, /* 4788 */
-	{ 0,	0,	printargs,		"SYS_4789"	}, /* 4789 */
-	{ 0,	0,	printargs,		"SYS_4790"	}, /* 4790 */
-	{ 0,	0,	printargs,		"SYS_4791"	}, /* 4791 */
-	{ 0,	0,	printargs,		"SYS_4792"	}, /* 4792 */
-	{ 0,	0,	printargs,		"SYS_4793"	}, /* 4793 */
-	{ 0,	0,	printargs,		"SYS_4794"	}, /* 4794 */
-	{ 0,	0,	printargs,		"SYS_4795"	}, /* 4795 */
-	{ 0,	0,	printargs,		"SYS_4796"	}, /* 4796 */
-	{ 0,	0,	printargs,		"SYS_4797"	}, /* 4797 */
-	{ 0,	0,	printargs,		"SYS_4798"	}, /* 4798 */
-	{ 0,	0,	printargs,		"SYS_4799"	}, /* 4799 */
-	{ 0,	0,	printargs,		"SYS_4800"	}, /* 4800 */
-	{ 0,	0,	printargs,		"SYS_4801"	}, /* 4801 */
-	{ 0,	0,	printargs,		"SYS_4802"	}, /* 4802 */
-	{ 0,	0,	printargs,		"SYS_4803"	}, /* 4803 */
-	{ 0,	0,	printargs,		"SYS_4804"	}, /* 4804 */
-	{ 0,	0,	printargs,		"SYS_4805"	}, /* 4805 */
-	{ 0,	0,	printargs,		"SYS_4806"	}, /* 4806 */
-	{ 0,	0,	printargs,		"SYS_4807"	}, /* 4807 */
-	{ 0,	0,	printargs,		"SYS_4808"	}, /* 4808 */
-	{ 0,	0,	printargs,		"SYS_4809"	}, /* 4809 */
-	{ 0,	0,	printargs,		"SYS_4810"	}, /* 4810 */
-	{ 0,	0,	printargs,		"SYS_4811"	}, /* 4811 */
-	{ 0,	0,	printargs,		"SYS_4812"	}, /* 4812 */
-	{ 0,	0,	printargs,		"SYS_4813"	}, /* 4813 */
-	{ 0,	0,	printargs,		"SYS_4814"	}, /* 4814 */
-	{ 0,	0,	printargs,		"SYS_4815"	}, /* 4815 */
-	{ 0,	0,	printargs,		"SYS_4816"	}, /* 4816 */
-	{ 0,	0,	printargs,		"SYS_4817"	}, /* 4817 */
-	{ 0,	0,	printargs,		"SYS_4818"	}, /* 4818 */
-	{ 0,	0,	printargs,		"SYS_4819"	}, /* 4819 */
-	{ 0,	0,	printargs,		"SYS_4820"	}, /* 4820 */
-	{ 0,	0,	printargs,		"SYS_4821"	}, /* 4821 */
-	{ 0,	0,	printargs,		"SYS_4822"	}, /* 4822 */
-	{ 0,	0,	printargs,		"SYS_4823"	}, /* 4823 */
-	{ 0,	0,	printargs,		"SYS_4824"	}, /* 4824 */
-	{ 0,	0,	printargs,		"SYS_4825"	}, /* 4825 */
-	{ 0,	0,	printargs,		"SYS_4826"	}, /* 4826 */
-	{ 0,	0,	printargs,		"SYS_4827"	}, /* 4827 */
-	{ 0,	0,	printargs,		"SYS_4828"	}, /* 4828 */
-	{ 0,	0,	printargs,		"SYS_4829"	}, /* 4829 */
-	{ 0,	0,	printargs,		"SYS_4830"	}, /* 4830 */
-	{ 0,	0,	printargs,		"SYS_4831"	}, /* 4831 */
-	{ 0,	0,	printargs,		"SYS_4832"	}, /* 4832 */
-	{ 0,	0,	printargs,		"SYS_4833"	}, /* 4833 */
-	{ 0,	0,	printargs,		"SYS_4834"	}, /* 4834 */
-	{ 0,	0,	printargs,		"SYS_4835"	}, /* 4835 */
-	{ 0,	0,	printargs,		"SYS_4836"	}, /* 4836 */
-	{ 0,	0,	printargs,		"SYS_4837"	}, /* 4837 */
-	{ 0,	0,	printargs,		"SYS_4838"	}, /* 4838 */
-	{ 0,	0,	printargs,		"SYS_4839"	}, /* 4839 */
-	{ 0,	0,	printargs,		"SYS_4840"	}, /* 4840 */
-	{ 0,	0,	printargs,		"SYS_4841"	}, /* 4841 */
-	{ 0,	0,	printargs,		"SYS_4842"	}, /* 4842 */
-	{ 0,	0,	printargs,		"SYS_4843"	}, /* 4843 */
-	{ 0,	0,	printargs,		"SYS_4844"	}, /* 4844 */
-	{ 0,	0,	printargs,		"SYS_4845"	}, /* 4845 */
-	{ 0,	0,	printargs,		"SYS_4846"	}, /* 4846 */
-	{ 0,	0,	printargs,		"SYS_4847"	}, /* 4847 */
-	{ 0,	0,	printargs,		"SYS_4848"	}, /* 4848 */
-	{ 0,	0,	printargs,		"SYS_4849"	}, /* 4849 */
-	{ 0,	0,	printargs,		"SYS_4850"	}, /* 4850 */
-	{ 0,	0,	printargs,		"SYS_4851"	}, /* 4851 */
-	{ 0,	0,	printargs,		"SYS_4852"	}, /* 4852 */
-	{ 0,	0,	printargs,		"SYS_4853"	}, /* 4853 */
-	{ 0,	0,	printargs,		"SYS_4854"	}, /* 4854 */
-	{ 0,	0,	printargs,		"SYS_4855"	}, /* 4855 */
-	{ 0,	0,	printargs,		"SYS_4856"	}, /* 4856 */
-	{ 0,	0,	printargs,		"SYS_4857"	}, /* 4857 */
-	{ 0,	0,	printargs,		"SYS_4858"	}, /* 4858 */
-	{ 0,	0,	printargs,		"SYS_4859"	}, /* 4859 */
-	{ 0,	0,	printargs,		"SYS_4860"	}, /* 4860 */
-	{ 0,	0,	printargs,		"SYS_4861"	}, /* 4861 */
-	{ 0,	0,	printargs,		"SYS_4862"	}, /* 4862 */
-	{ 0,	0,	printargs,		"SYS_4863"	}, /* 4863 */
-	{ 0,	0,	printargs,		"SYS_4864"	}, /* 4864 */
-	{ 0,	0,	printargs,		"SYS_4865"	}, /* 4865 */
-	{ 0,	0,	printargs,		"SYS_4866"	}, /* 4866 */
-	{ 0,	0,	printargs,		"SYS_4867"	}, /* 4867 */
-	{ 0,	0,	printargs,		"SYS_4868"	}, /* 4868 */
-	{ 0,	0,	printargs,		"SYS_4869"	}, /* 4869 */
-	{ 0,	0,	printargs,		"SYS_4870"	}, /* 4870 */
-	{ 0,	0,	printargs,		"SYS_4871"	}, /* 4871 */
-	{ 0,	0,	printargs,		"SYS_4872"	}, /* 4872 */
-	{ 0,	0,	printargs,		"SYS_4873"	}, /* 4873 */
-	{ 0,	0,	printargs,		"SYS_4874"	}, /* 4874 */
-	{ 0,	0,	printargs,		"SYS_4875"	}, /* 4875 */
-	{ 0,	0,	printargs,		"SYS_4876"	}, /* 4876 */
-	{ 0,	0,	printargs,		"SYS_4877"	}, /* 4877 */
-	{ 0,	0,	printargs,		"SYS_4878"	}, /* 4878 */
-	{ 0,	0,	printargs,		"SYS_4879"	}, /* 4879 */
-	{ 0,	0,	printargs,		"SYS_4880"	}, /* 4880 */
-	{ 0,	0,	printargs,		"SYS_4881"	}, /* 4881 */
-	{ 0,	0,	printargs,		"SYS_4882"	}, /* 4882 */
-	{ 0,	0,	printargs,		"SYS_4883"	}, /* 4883 */
-	{ 0,	0,	printargs,		"SYS_4884"	}, /* 4884 */
-	{ 0,	0,	printargs,		"SYS_4885"	}, /* 4885 */
-	{ 0,	0,	printargs,		"SYS_4886"	}, /* 4886 */
-	{ 0,	0,	printargs,		"SYS_4887"	}, /* 4887 */
-	{ 0,	0,	printargs,		"SYS_4888"	}, /* 4888 */
-	{ 0,	0,	printargs,		"SYS_4889"	}, /* 4889 */
-	{ 0,	0,	printargs,		"SYS_4890"	}, /* 4890 */
-	{ 0,	0,	printargs,		"SYS_4891"	}, /* 4891 */
-	{ 0,	0,	printargs,		"SYS_4892"	}, /* 4892 */
-	{ 0,	0,	printargs,		"SYS_4893"	}, /* 4893 */
-	{ 0,	0,	printargs,		"SYS_4894"	}, /* 4894 */
-	{ 0,	0,	printargs,		"SYS_4895"	}, /* 4895 */
-	{ 0,	0,	printargs,		"SYS_4896"	}, /* 4896 */
-	{ 0,	0,	printargs,		"SYS_4897"	}, /* 4897 */
-	{ 0,	0,	printargs,		"SYS_4898"	}, /* 4898 */
-	{ 0,	0,	printargs,		"SYS_4899"	}, /* 4899 */
-	{ 0,	0,	printargs,		"SYS_4900"	}, /* 4900 */
-	{ 0,	0,	printargs,		"SYS_4901"	}, /* 4901 */
-	{ 0,	0,	printargs,		"SYS_4902"	}, /* 4902 */
-	{ 0,	0,	printargs,		"SYS_4903"	}, /* 4903 */
-	{ 0,	0,	printargs,		"SYS_4904"	}, /* 4904 */
-	{ 0,	0,	printargs,		"SYS_4905"	}, /* 4905 */
-	{ 0,	0,	printargs,		"SYS_4906"	}, /* 4906 */
-	{ 0,	0,	printargs,		"SYS_4907"	}, /* 4907 */
-	{ 0,	0,	printargs,		"SYS_4908"	}, /* 4908 */
-	{ 0,	0,	printargs,		"SYS_4909"	}, /* 4909 */
-	{ 0,	0,	printargs,		"SYS_4910"	}, /* 4910 */
-	{ 0,	0,	printargs,		"SYS_4911"	}, /* 4911 */
-	{ 0,	0,	printargs,		"SYS_4912"	}, /* 4912 */
-	{ 0,	0,	printargs,		"SYS_4913"	}, /* 4913 */
-	{ 0,	0,	printargs,		"SYS_4914"	}, /* 4914 */
-	{ 0,	0,	printargs,		"SYS_4915"	}, /* 4915 */
-	{ 0,	0,	printargs,		"SYS_4916"	}, /* 4916 */
-	{ 0,	0,	printargs,		"SYS_4917"	}, /* 4917 */
-	{ 0,	0,	printargs,		"SYS_4918"	}, /* 4918 */
-	{ 0,	0,	printargs,		"SYS_4919"	}, /* 4919 */
-	{ 0,	0,	printargs,		"SYS_4920"	}, /* 4920 */
-	{ 0,	0,	printargs,		"SYS_4921"	}, /* 4921 */
-	{ 0,	0,	printargs,		"SYS_4922"	}, /* 4922 */
-	{ 0,	0,	printargs,		"SYS_4923"	}, /* 4923 */
-	{ 0,	0,	printargs,		"SYS_4924"	}, /* 4924 */
-	{ 0,	0,	printargs,		"SYS_4925"	}, /* 4925 */
-	{ 0,	0,	printargs,		"SYS_4926"	}, /* 4926 */
-	{ 0,	0,	printargs,		"SYS_4927"	}, /* 4927 */
-	{ 0,	0,	printargs,		"SYS_4928"	}, /* 4928 */
-	{ 0,	0,	printargs,		"SYS_4929"	}, /* 4929 */
-	{ 0,	0,	printargs,		"SYS_4930"	}, /* 4930 */
-	{ 0,	0,	printargs,		"SYS_4931"	}, /* 4931 */
-	{ 0,	0,	printargs,		"SYS_4932"	}, /* 4932 */
-	{ 0,	0,	printargs,		"SYS_4933"	}, /* 4933 */
-	{ 0,	0,	printargs,		"SYS_4934"	}, /* 4934 */
-	{ 0,	0,	printargs,		"SYS_4935"	}, /* 4935 */
-	{ 0,	0,	printargs,		"SYS_4936"	}, /* 4936 */
-	{ 0,	0,	printargs,		"SYS_4937"	}, /* 4937 */
-	{ 0,	0,	printargs,		"SYS_4938"	}, /* 4938 */
-	{ 0,	0,	printargs,		"SYS_4939"	}, /* 4939 */
-	{ 0,	0,	printargs,		"SYS_4940"	}, /* 4940 */
-	{ 0,	0,	printargs,		"SYS_4941"	}, /* 4941 */
-	{ 0,	0,	printargs,		"SYS_4942"	}, /* 4942 */
-	{ 0,	0,	printargs,		"SYS_4943"	}, /* 4943 */
-	{ 0,	0,	printargs,		"SYS_4944"	}, /* 4944 */
-	{ 0,	0,	printargs,		"SYS_4945"	}, /* 4945 */
-	{ 0,	0,	printargs,		"SYS_4946"	}, /* 4946 */
-	{ 0,	0,	printargs,		"SYS_4947"	}, /* 4947 */
-	{ 0,	0,	printargs,		"SYS_4948"	}, /* 4948 */
-	{ 0,	0,	printargs,		"SYS_4949"	}, /* 4949 */
-	{ 0,	0,	printargs,		"SYS_4950"	}, /* 4950 */
-	{ 0,	0,	printargs,		"SYS_4951"	}, /* 4951 */
-	{ 0,	0,	printargs,		"SYS_4952"	}, /* 4952 */
-	{ 0,	0,	printargs,		"SYS_4953"	}, /* 4953 */
-	{ 0,	0,	printargs,		"SYS_4954"	}, /* 4954 */
-	{ 0,	0,	printargs,		"SYS_4955"	}, /* 4955 */
-	{ 0,	0,	printargs,		"SYS_4956"	}, /* 4956 */
-	{ 0,	0,	printargs,		"SYS_4957"	}, /* 4957 */
-	{ 0,	0,	printargs,		"SYS_4958"	}, /* 4958 */
-	{ 0,	0,	printargs,		"SYS_4959"	}, /* 4959 */
-	{ 0,	0,	printargs,		"SYS_4960"	}, /* 4960 */
-	{ 0,	0,	printargs,		"SYS_4961"	}, /* 4961 */
-	{ 0,	0,	printargs,		"SYS_4962"	}, /* 4962 */
-	{ 0,	0,	printargs,		"SYS_4963"	}, /* 4963 */
-	{ 0,	0,	printargs,		"SYS_4964"	}, /* 4964 */
-	{ 0,	0,	printargs,		"SYS_4965"	}, /* 4965 */
-	{ 0,	0,	printargs,		"SYS_4966"	}, /* 4966 */
-	{ 0,	0,	printargs,		"SYS_4967"	}, /* 4967 */
-	{ 0,	0,	printargs,		"SYS_4968"	}, /* 4968 */
-	{ 0,	0,	printargs,		"SYS_4969"	}, /* 4969 */
-	{ 0,	0,	printargs,		"SYS_4970"	}, /* 4970 */
-	{ 0,	0,	printargs,		"SYS_4971"	}, /* 4971 */
-	{ 0,	0,	printargs,		"SYS_4972"	}, /* 4972 */
-	{ 0,	0,	printargs,		"SYS_4973"	}, /* 4973 */
-	{ 0,	0,	printargs,		"SYS_4974"	}, /* 4974 */
-	{ 0,	0,	printargs,		"SYS_4975"	}, /* 4975 */
-	{ 0,	0,	printargs,		"SYS_4976"	}, /* 4976 */
-	{ 0,	0,	printargs,		"SYS_4977"	}, /* 4977 */
-	{ 0,	0,	printargs,		"SYS_4978"	}, /* 4978 */
-	{ 0,	0,	printargs,		"SYS_4979"	}, /* 4979 */
-	{ 0,	0,	printargs,		"SYS_4980"	}, /* 4980 */
-	{ 0,	0,	printargs,		"SYS_4981"	}, /* 4981 */
-	{ 0,	0,	printargs,		"SYS_4982"	}, /* 4982 */
-	{ 0,	0,	printargs,		"SYS_4983"	}, /* 4983 */
-	{ 0,	0,	printargs,		"SYS_4984"	}, /* 4984 */
-	{ 0,	0,	printargs,		"SYS_4985"	}, /* 4985 */
-	{ 0,	0,	printargs,		"SYS_4986"	}, /* 4986 */
-	{ 0,	0,	printargs,		"SYS_4987"	}, /* 4987 */
-	{ 0,	0,	printargs,		"SYS_4988"	}, /* 4988 */
-	{ 0,	0,	printargs,		"SYS_4989"	}, /* 4989 */
-	{ 0,	0,	printargs,		"SYS_4990"	}, /* 4990 */
-	{ 0,	0,	printargs,		"SYS_4991"	}, /* 4991 */
-	{ 0,	0,	printargs,		"SYS_4992"	}, /* 4992 */
-	{ 0,	0,	printargs,		"SYS_4993"	}, /* 4993 */
-	{ 0,	0,	printargs,		"SYS_4994"	}, /* 4994 */
-	{ 0,	0,	printargs,		"SYS_4995"	}, /* 4995 */
-	{ 0,	0,	printargs,		"SYS_4996"	}, /* 4996 */
-	{ 0,	0,	printargs,		"SYS_4997"	}, /* 4997 */
-	{ 0,	0,	printargs,		"SYS_4998"	}, /* 4998 */
-	{ 0,	0,	printargs,		"SYS_4999"	}, /* 4999 */ /* end of Linux o32 */
-#if defined (LINUX_MIPSN64)
+	{ 0,	0,	NULL,			NULL		}, /* 4347 */
+	{ 0,	0,	NULL,			NULL		}, /* 4348 */
+	{ 0,	0,	NULL,			NULL		}, /* 4349 */
+	{ 0,	0,	NULL,			NULL		}, /* 4350 */
+	{ 0,	0,	NULL,			NULL		}, /* 4351 */
+	{ 0,	0,	NULL,			NULL		}, /* 4352 */
+	{ 0,	0,	NULL,			NULL		}, /* 4353 */
+	{ 0,	0,	NULL,			NULL		}, /* 4354 */
+	{ 0,	0,	NULL,			NULL		}, /* 4355 */
+	{ 0,	0,	NULL,			NULL		}, /* 4356 */
+	{ 0,	0,	NULL,			NULL		}, /* 4357 */
+	{ 0,	0,	NULL,			NULL		}, /* 4358 */
+	{ 0,	0,	NULL,			NULL		}, /* 4359 */
+	{ 0,	0,	NULL,			NULL		}, /* 4360 */
+	{ 0,	0,	NULL,			NULL		}, /* 4361 */
+	{ 0,	0,	NULL,			NULL		}, /* 4362 */
+	{ 0,	0,	NULL,			NULL		}, /* 4363 */
+	{ 0,	0,	NULL,			NULL		}, /* 4364 */
+	{ 0,	0,	NULL,			NULL		}, /* 4365 */
+	{ 0,	0,	NULL,			NULL		}, /* 4366 */
+	{ 0,	0,	NULL,			NULL		}, /* 4367 */
+	{ 0,	0,	NULL,			NULL		}, /* 4368 */
+	{ 0,	0,	NULL,			NULL		}, /* 4369 */
+	{ 0,	0,	NULL,			NULL		}, /* 4370 */
+	{ 0,	0,	NULL,			NULL		}, /* 4371 */
+	{ 0,	0,	NULL,			NULL		}, /* 4372 */
+	{ 0,	0,	NULL,			NULL		}, /* 4373 */
+	{ 0,	0,	NULL,			NULL		}, /* 4374 */
+	{ 0,	0,	NULL,			NULL		}, /* 4375 */
+	{ 0,	0,	NULL,			NULL		}, /* 4376 */
+	{ 0,	0,	NULL,			NULL		}, /* 4377 */
+	{ 0,	0,	NULL,			NULL		}, /* 4378 */
+	{ 0,	0,	NULL,			NULL		}, /* 4379 */
+	{ 0,	0,	NULL,			NULL		}, /* 4380 */
+	{ 0,	0,	NULL,			NULL		}, /* 4381 */
+	{ 0,	0,	NULL,			NULL		}, /* 4382 */
+	{ 0,	0,	NULL,			NULL		}, /* 4383 */
+	{ 0,	0,	NULL,			NULL		}, /* 4384 */
+	{ 0,	0,	NULL,			NULL		}, /* 4385 */
+	{ 0,	0,	NULL,			NULL		}, /* 4386 */
+	{ 0,	0,	NULL,			NULL		}, /* 4387 */
+	{ 0,	0,	NULL,			NULL		}, /* 4388 */
+	{ 0,	0,	NULL,			NULL		}, /* 4389 */
+	{ 0,	0,	NULL,			NULL		}, /* 4390 */
+	{ 0,	0,	NULL,			NULL		}, /* 4391 */
+	{ 0,	0,	NULL,			NULL		}, /* 4392 */
+	{ 0,	0,	NULL,			NULL		}, /* 4393 */
+	{ 0,	0,	NULL,			NULL		}, /* 4394 */
+	{ 0,	0,	NULL,			NULL		}, /* 4395 */
+	{ 0,	0,	NULL,			NULL		}, /* 4396 */
+	{ 0,	0,	NULL,			NULL		}, /* 4397 */
+	{ 0,	0,	NULL,			NULL		}, /* 4398 */
+	{ 0,	0,	NULL,			NULL		}, /* 4399 */
+	{ 0,	0,	NULL,			NULL		}, /* 4400 */
+	{ 0,	0,	NULL,			NULL		}, /* 4401 */
+	{ 0,	0,	NULL,			NULL		}, /* 4402 */
+	{ 0,	0,	NULL,			NULL		}, /* 4403 */
+	{ 0,	0,	NULL,			NULL		}, /* 4404 */
+	{ 0,	0,	NULL,			NULL		}, /* 4405 */
+	{ 0,	0,	NULL,			NULL		}, /* 4406 */
+	{ 0,	0,	NULL,			NULL		}, /* 4407 */
+	{ 0,	0,	NULL,			NULL		}, /* 4408 */
+	{ 0,	0,	NULL,			NULL		}, /* 4409 */
+	{ 0,	0,	NULL,			NULL		}, /* 4410 */
+	{ 0,	0,	NULL,			NULL		}, /* 4411 */
+	{ 0,	0,	NULL,			NULL		}, /* 4412 */
+	{ 0,	0,	NULL,			NULL		}, /* 4413 */
+	{ 0,	0,	NULL,			NULL		}, /* 4414 */
+	{ 0,	0,	NULL,			NULL		}, /* 4415 */
+	{ 0,	0,	NULL,			NULL		}, /* 4416 */
+	{ 0,	0,	NULL,			NULL		}, /* 4417 */
+	{ 0,	0,	NULL,			NULL		}, /* 4418 */
+	{ 0,	0,	NULL,			NULL		}, /* 4419 */
+	{ 0,	0,	NULL,			NULL		}, /* 4420 */
+	{ 0,	0,	NULL,			NULL		}, /* 4421 */
+	{ 0,	0,	NULL,			NULL		}, /* 4422 */
+	{ 0,	0,	NULL,			NULL		}, /* 4423 */
+	{ 0,	0,	NULL,			NULL		}, /* 4424 */
+	{ 0,	0,	NULL,			NULL		}, /* 4425 */
+	{ 0,	0,	NULL,			NULL		}, /* 4426 */
+	{ 0,	0,	NULL,			NULL		}, /* 4427 */
+	{ 0,	0,	NULL,			NULL		}, /* 4428 */
+	{ 0,	0,	NULL,			NULL		}, /* 4429 */
+	{ 0,	0,	NULL,			NULL		}, /* 4430 */
+	{ 0,	0,	NULL,			NULL		}, /* 4431 */
+	{ 0,	0,	NULL,			NULL		}, /* 4432 */
+	{ 0,	0,	NULL,			NULL		}, /* 4433 */
+	{ 0,	0,	NULL,			NULL		}, /* 4434 */
+	{ 0,	0,	NULL,			NULL		}, /* 4435 */
+	{ 0,	0,	NULL,			NULL		}, /* 4436 */
+	{ 0,	0,	NULL,			NULL		}, /* 4437 */
+	{ 0,	0,	NULL,			NULL		}, /* 4438 */
+	{ 0,	0,	NULL,			NULL		}, /* 4439 */
+	{ 0,	0,	NULL,			NULL		}, /* 4440 */
+	{ 0,	0,	NULL,			NULL		}, /* 4441 */
+	{ 0,	0,	NULL,			NULL		}, /* 4442 */
+	{ 0,	0,	NULL,			NULL		}, /* 4443 */
+	{ 0,	0,	NULL,			NULL		}, /* 4444 */
+	{ 0,	0,	NULL,			NULL		}, /* 4445 */
+	{ 0,	0,	NULL,			NULL		}, /* 4446 */
+	{ 0,	0,	NULL,			NULL		}, /* 4447 */
+	{ 0,	0,	NULL,			NULL		}, /* 4448 */
+	{ 0,	0,	NULL,			NULL		}, /* 4449 */
+	{ 0,	0,	NULL,			NULL		}, /* 4450 */
+	{ 0,	0,	NULL,			NULL		}, /* 4451 */
+	{ 0,	0,	NULL,			NULL		}, /* 4452 */
+	{ 0,	0,	NULL,			NULL		}, /* 4453 */
+	{ 0,	0,	NULL,			NULL		}, /* 4454 */
+	{ 0,	0,	NULL,			NULL		}, /* 4455 */
+	{ 0,	0,	NULL,			NULL		}, /* 4456 */
+	{ 0,	0,	NULL,			NULL		}, /* 4457 */
+	{ 0,	0,	NULL,			NULL		}, /* 4458 */
+	{ 0,	0,	NULL,			NULL		}, /* 4459 */
+	{ 0,	0,	NULL,			NULL		}, /* 4460 */
+	{ 0,	0,	NULL,			NULL		}, /* 4461 */
+	{ 0,	0,	NULL,			NULL		}, /* 4462 */
+	{ 0,	0,	NULL,			NULL		}, /* 4463 */
+	{ 0,	0,	NULL,			NULL		}, /* 4464 */
+	{ 0,	0,	NULL,			NULL		}, /* 4465 */
+	{ 0,	0,	NULL,			NULL		}, /* 4466 */
+	{ 0,	0,	NULL,			NULL		}, /* 4467 */
+	{ 0,	0,	NULL,			NULL		}, /* 4468 */
+	{ 0,	0,	NULL,			NULL		}, /* 4469 */
+	{ 0,	0,	NULL,			NULL		}, /* 4470 */
+	{ 0,	0,	NULL,			NULL		}, /* 4471 */
+	{ 0,	0,	NULL,			NULL		}, /* 4472 */
+	{ 0,	0,	NULL,			NULL		}, /* 4473 */
+	{ 0,	0,	NULL,			NULL		}, /* 4474 */
+	{ 0,	0,	NULL,			NULL		}, /* 4475 */
+	{ 0,	0,	NULL,			NULL		}, /* 4476 */
+	{ 0,	0,	NULL,			NULL		}, /* 4477 */
+	{ 0,	0,	NULL,			NULL		}, /* 4478 */
+	{ 0,	0,	NULL,			NULL		}, /* 4479 */
+	{ 0,	0,	NULL,			NULL		}, /* 4480 */
+	{ 0,	0,	NULL,			NULL		}, /* 4481 */
+	{ 0,	0,	NULL,			NULL		}, /* 4482 */
+	{ 0,	0,	NULL,			NULL		}, /* 4483 */
+	{ 0,	0,	NULL,			NULL		}, /* 4484 */
+	{ 0,	0,	NULL,			NULL		}, /* 4485 */
+	{ 0,	0,	NULL,			NULL		}, /* 4486 */
+	{ 0,	0,	NULL,			NULL		}, /* 4487 */
+	{ 0,	0,	NULL,			NULL		}, /* 4488 */
+	{ 0,	0,	NULL,			NULL		}, /* 4489 */
+	{ 0,	0,	NULL,			NULL		}, /* 4490 */
+	{ 0,	0,	NULL,			NULL		}, /* 4491 */
+	{ 0,	0,	NULL,			NULL		}, /* 4492 */
+	{ 0,	0,	NULL,			NULL		}, /* 4493 */
+	{ 0,	0,	NULL,			NULL		}, /* 4494 */
+	{ 0,	0,	NULL,			NULL		}, /* 4495 */
+	{ 0,	0,	NULL,			NULL		}, /* 4496 */
+	{ 0,	0,	NULL,			NULL		}, /* 4497 */
+	{ 0,	0,	NULL,			NULL		}, /* 4498 */
+	{ 0,	0,	NULL,			NULL		}, /* 4499 */
+	{ 0,	0,	NULL,			NULL		}, /* 4500 */
+	{ 0,	0,	NULL,			NULL		}, /* 4501 */
+	{ 0,	0,	NULL,			NULL		}, /* 4502 */
+	{ 0,	0,	NULL,			NULL		}, /* 4503 */
+	{ 0,	0,	NULL,			NULL		}, /* 4504 */
+	{ 0,	0,	NULL,			NULL		}, /* 4505 */
+	{ 0,	0,	NULL,			NULL		}, /* 4506 */
+	{ 0,	0,	NULL,			NULL		}, /* 4507 */
+	{ 0,	0,	NULL,			NULL		}, /* 4508 */
+	{ 0,	0,	NULL,			NULL		}, /* 4509 */
+	{ 0,	0,	NULL,			NULL		}, /* 4510 */
+	{ 0,	0,	NULL,			NULL		}, /* 4511 */
+	{ 0,	0,	NULL,			NULL		}, /* 4512 */
+	{ 0,	0,	NULL,			NULL		}, /* 4513 */
+	{ 0,	0,	NULL,			NULL		}, /* 4514 */
+	{ 0,	0,	NULL,			NULL		}, /* 4515 */
+	{ 0,	0,	NULL,			NULL		}, /* 4516 */
+	{ 0,	0,	NULL,			NULL		}, /* 4517 */
+	{ 0,	0,	NULL,			NULL		}, /* 4518 */
+	{ 0,	0,	NULL,			NULL		}, /* 4519 */
+	{ 0,	0,	NULL,			NULL		}, /* 4520 */
+	{ 0,	0,	NULL,			NULL		}, /* 4521 */
+	{ 0,	0,	NULL,			NULL		}, /* 4522 */
+	{ 0,	0,	NULL,			NULL		}, /* 4523 */
+	{ 0,	0,	NULL,			NULL		}, /* 4524 */
+	{ 0,	0,	NULL,			NULL		}, /* 4525 */
+	{ 0,	0,	NULL,			NULL		}, /* 4526 */
+	{ 0,	0,	NULL,			NULL		}, /* 4527 */
+	{ 0,	0,	NULL,			NULL		}, /* 4528 */
+	{ 0,	0,	NULL,			NULL		}, /* 4529 */
+	{ 0,	0,	NULL,			NULL		}, /* 4530 */
+	{ 0,	0,	NULL,			NULL		}, /* 4531 */
+	{ 0,	0,	NULL,			NULL		}, /* 4532 */
+	{ 0,	0,	NULL,			NULL		}, /* 4533 */
+	{ 0,	0,	NULL,			NULL		}, /* 4534 */
+	{ 0,	0,	NULL,			NULL		}, /* 4535 */
+	{ 0,	0,	NULL,			NULL		}, /* 4536 */
+	{ 0,	0,	NULL,			NULL		}, /* 4537 */
+	{ 0,	0,	NULL,			NULL		}, /* 4538 */
+	{ 0,	0,	NULL,			NULL		}, /* 4539 */
+	{ 0,	0,	NULL,			NULL		}, /* 4540 */
+	{ 0,	0,	NULL,			NULL		}, /* 4541 */
+	{ 0,	0,	NULL,			NULL		}, /* 4542 */
+	{ 0,	0,	NULL,			NULL		}, /* 4543 */
+	{ 0,	0,	NULL,			NULL		}, /* 4544 */
+	{ 0,	0,	NULL,			NULL		}, /* 4545 */
+	{ 0,	0,	NULL,			NULL		}, /* 4546 */
+	{ 0,	0,	NULL,			NULL		}, /* 4547 */
+	{ 0,	0,	NULL,			NULL		}, /* 4548 */
+	{ 0,	0,	NULL,			NULL		}, /* 4549 */
+	{ 0,	0,	NULL,			NULL		}, /* 4550 */
+	{ 0,	0,	NULL,			NULL		}, /* 4551 */
+	{ 0,	0,	NULL,			NULL		}, /* 4552 */
+	{ 0,	0,	NULL,			NULL		}, /* 4553 */
+	{ 0,	0,	NULL,			NULL		}, /* 4554 */
+	{ 0,	0,	NULL,			NULL		}, /* 4555 */
+	{ 0,	0,	NULL,			NULL		}, /* 4556 */
+	{ 0,	0,	NULL,			NULL		}, /* 4557 */
+	{ 0,	0,	NULL,			NULL		}, /* 4558 */
+	{ 0,	0,	NULL,			NULL		}, /* 4559 */
+	{ 0,	0,	NULL,			NULL		}, /* 4560 */
+	{ 0,	0,	NULL,			NULL		}, /* 4561 */
+	{ 0,	0,	NULL,			NULL		}, /* 4562 */
+	{ 0,	0,	NULL,			NULL		}, /* 4563 */
+	{ 0,	0,	NULL,			NULL		}, /* 4564 */
+	{ 0,	0,	NULL,			NULL		}, /* 4565 */
+	{ 0,	0,	NULL,			NULL		}, /* 4566 */
+	{ 0,	0,	NULL,			NULL		}, /* 4567 */
+	{ 0,	0,	NULL,			NULL		}, /* 4568 */
+	{ 0,	0,	NULL,			NULL		}, /* 4569 */
+	{ 0,	0,	NULL,			NULL		}, /* 4570 */
+	{ 0,	0,	NULL,			NULL		}, /* 4571 */
+	{ 0,	0,	NULL,			NULL		}, /* 4572 */
+	{ 0,	0,	NULL,			NULL		}, /* 4573 */
+	{ 0,	0,	NULL,			NULL		}, /* 4574 */
+	{ 0,	0,	NULL,			NULL		}, /* 4575 */
+	{ 0,	0,	NULL,			NULL		}, /* 4576 */
+	{ 0,	0,	NULL,			NULL		}, /* 4577 */
+	{ 0,	0,	NULL,			NULL		}, /* 4578 */
+	{ 0,	0,	NULL,			NULL		}, /* 4579 */
+	{ 0,	0,	NULL,			NULL		}, /* 4580 */
+	{ 0,	0,	NULL,			NULL		}, /* 4581 */
+	{ 0,	0,	NULL,			NULL		}, /* 4582 */
+	{ 0,	0,	NULL,			NULL		}, /* 4583 */
+	{ 0,	0,	NULL,			NULL		}, /* 4584 */
+	{ 0,	0,	NULL,			NULL		}, /* 4585 */
+	{ 0,	0,	NULL,			NULL		}, /* 4586 */
+	{ 0,	0,	NULL,			NULL		}, /* 4587 */
+	{ 0,	0,	NULL,			NULL		}, /* 4588 */
+	{ 0,	0,	NULL,			NULL		}, /* 4589 */
+	{ 0,	0,	NULL,			NULL		}, /* 4590 */
+	{ 0,	0,	NULL,			NULL		}, /* 4591 */
+	{ 0,	0,	NULL,			NULL		}, /* 4592 */
+	{ 0,	0,	NULL,			NULL		}, /* 4593 */
+	{ 0,	0,	NULL,			NULL		}, /* 4594 */
+	{ 0,	0,	NULL,			NULL		}, /* 4595 */
+	{ 0,	0,	NULL,			NULL		}, /* 4596 */
+	{ 0,	0,	NULL,			NULL		}, /* 4597 */
+	{ 0,	0,	NULL,			NULL		}, /* 4598 */
+	{ 0,	0,	NULL,			NULL		}, /* 4599 */
+	{ 0,	0,	NULL,			NULL		}, /* 4600 */
+	{ 0,	0,	NULL,			NULL		}, /* 4601 */
+	{ 0,	0,	NULL,			NULL		}, /* 4602 */
+	{ 0,	0,	NULL,			NULL		}, /* 4603 */
+	{ 0,	0,	NULL,			NULL		}, /* 4604 */
+	{ 0,	0,	NULL,			NULL		}, /* 4605 */
+	{ 0,	0,	NULL,			NULL		}, /* 4606 */
+	{ 0,	0,	NULL,			NULL		}, /* 4607 */
+	{ 0,	0,	NULL,			NULL		}, /* 4608 */
+	{ 0,	0,	NULL,			NULL		}, /* 4609 */
+	{ 0,	0,	NULL,			NULL		}, /* 4610 */
+	{ 0,	0,	NULL,			NULL		}, /* 4611 */
+	{ 0,	0,	NULL,			NULL		}, /* 4612 */
+	{ 0,	0,	NULL,			NULL		}, /* 4613 */
+	{ 0,	0,	NULL,			NULL		}, /* 4614 */
+	{ 0,	0,	NULL,			NULL		}, /* 4615 */
+	{ 0,	0,	NULL,			NULL		}, /* 4616 */
+	{ 0,	0,	NULL,			NULL		}, /* 4617 */
+	{ 0,	0,	NULL,			NULL		}, /* 4618 */
+	{ 0,	0,	NULL,			NULL		}, /* 4619 */
+	{ 0,	0,	NULL,			NULL		}, /* 4620 */
+	{ 0,	0,	NULL,			NULL		}, /* 4621 */
+	{ 0,	0,	NULL,			NULL		}, /* 4622 */
+	{ 0,	0,	NULL,			NULL		}, /* 4623 */
+	{ 0,	0,	NULL,			NULL		}, /* 4624 */
+	{ 0,	0,	NULL,			NULL		}, /* 4625 */
+	{ 0,	0,	NULL,			NULL		}, /* 4626 */
+	{ 0,	0,	NULL,			NULL		}, /* 4627 */
+	{ 0,	0,	NULL,			NULL		}, /* 4628 */
+	{ 0,	0,	NULL,			NULL		}, /* 4629 */
+	{ 0,	0,	NULL,			NULL		}, /* 4630 */
+	{ 0,	0,	NULL,			NULL		}, /* 4631 */
+	{ 0,	0,	NULL,			NULL		}, /* 4632 */
+	{ 0,	0,	NULL,			NULL		}, /* 4633 */
+	{ 0,	0,	NULL,			NULL		}, /* 4634 */
+	{ 0,	0,	NULL,			NULL		}, /* 4635 */
+	{ 0,	0,	NULL,			NULL		}, /* 4636 */
+	{ 0,	0,	NULL,			NULL		}, /* 4637 */
+	{ 0,	0,	NULL,			NULL		}, /* 4638 */
+	{ 0,	0,	NULL,			NULL		}, /* 4639 */
+	{ 0,	0,	NULL,			NULL		}, /* 4640 */
+	{ 0,	0,	NULL,			NULL		}, /* 4641 */
+	{ 0,	0,	NULL,			NULL		}, /* 4642 */
+	{ 0,	0,	NULL,			NULL		}, /* 4643 */
+	{ 0,	0,	NULL,			NULL		}, /* 4644 */
+	{ 0,	0,	NULL,			NULL		}, /* 4645 */
+	{ 0,	0,	NULL,			NULL		}, /* 4646 */
+	{ 0,	0,	NULL,			NULL		}, /* 4647 */
+	{ 0,	0,	NULL,			NULL		}, /* 4648 */
+	{ 0,	0,	NULL,			NULL		}, /* 4649 */
+	{ 0,	0,	NULL,			NULL		}, /* 4650 */
+	{ 0,	0,	NULL,			NULL		}, /* 4651 */
+	{ 0,	0,	NULL,			NULL		}, /* 4652 */
+	{ 0,	0,	NULL,			NULL		}, /* 4653 */
+	{ 0,	0,	NULL,			NULL		}, /* 4654 */
+	{ 0,	0,	NULL,			NULL		}, /* 4655 */
+	{ 0,	0,	NULL,			NULL		}, /* 4656 */
+	{ 0,	0,	NULL,			NULL		}, /* 4657 */
+	{ 0,	0,	NULL,			NULL		}, /* 4658 */
+	{ 0,	0,	NULL,			NULL		}, /* 4659 */
+	{ 0,	0,	NULL,			NULL		}, /* 4660 */
+	{ 0,	0,	NULL,			NULL		}, /* 4661 */
+	{ 0,	0,	NULL,			NULL		}, /* 4662 */
+	{ 0,	0,	NULL,			NULL		}, /* 4663 */
+	{ 0,	0,	NULL,			NULL		}, /* 4664 */
+	{ 0,	0,	NULL,			NULL		}, /* 4665 */
+	{ 0,	0,	NULL,			NULL		}, /* 4666 */
+	{ 0,	0,	NULL,			NULL		}, /* 4667 */
+	{ 0,	0,	NULL,			NULL		}, /* 4668 */
+	{ 0,	0,	NULL,			NULL		}, /* 4669 */
+	{ 0,	0,	NULL,			NULL		}, /* 4670 */
+	{ 0,	0,	NULL,			NULL		}, /* 4671 */
+	{ 0,	0,	NULL,			NULL		}, /* 4672 */
+	{ 0,	0,	NULL,			NULL		}, /* 4673 */
+	{ 0,	0,	NULL,			NULL		}, /* 4674 */
+	{ 0,	0,	NULL,			NULL		}, /* 4675 */
+	{ 0,	0,	NULL,			NULL		}, /* 4676 */
+	{ 0,	0,	NULL,			NULL		}, /* 4677 */
+	{ 0,	0,	NULL,			NULL		}, /* 4678 */
+	{ 0,	0,	NULL,			NULL		}, /* 4679 */
+	{ 0,	0,	NULL,			NULL		}, /* 4680 */
+	{ 0,	0,	NULL,			NULL		}, /* 4681 */
+	{ 0,	0,	NULL,			NULL		}, /* 4682 */
+	{ 0,	0,	NULL,			NULL		}, /* 4683 */
+	{ 0,	0,	NULL,			NULL		}, /* 4684 */
+	{ 0,	0,	NULL,			NULL		}, /* 4685 */
+	{ 0,	0,	NULL,			NULL		}, /* 4686 */
+	{ 0,	0,	NULL,			NULL		}, /* 4687 */
+	{ 0,	0,	NULL,			NULL		}, /* 4688 */
+	{ 0,	0,	NULL,			NULL		}, /* 4689 */
+	{ 0,	0,	NULL,			NULL		}, /* 4690 */
+	{ 0,	0,	NULL,			NULL		}, /* 4691 */
+	{ 0,	0,	NULL,			NULL		}, /* 4692 */
+	{ 0,	0,	NULL,			NULL		}, /* 4693 */
+	{ 0,	0,	NULL,			NULL		}, /* 4694 */
+	{ 0,	0,	NULL,			NULL		}, /* 4695 */
+	{ 0,	0,	NULL,			NULL		}, /* 4696 */
+	{ 0,	0,	NULL,			NULL		}, /* 4697 */
+	{ 0,	0,	NULL,			NULL		}, /* 4698 */
+	{ 0,	0,	NULL,			NULL		}, /* 4699 */
+	{ 0,	0,	NULL,			NULL		}, /* 4700 */
+	{ 0,	0,	NULL,			NULL		}, /* 4701 */
+	{ 0,	0,	NULL,			NULL		}, /* 4702 */
+	{ 0,	0,	NULL,			NULL		}, /* 4703 */
+	{ 0,	0,	NULL,			NULL		}, /* 4704 */
+	{ 0,	0,	NULL,			NULL		}, /* 4705 */
+	{ 0,	0,	NULL,			NULL		}, /* 4706 */
+	{ 0,	0,	NULL,			NULL		}, /* 4707 */
+	{ 0,	0,	NULL,			NULL		}, /* 4708 */
+	{ 0,	0,	NULL,			NULL		}, /* 4709 */
+	{ 0,	0,	NULL,			NULL		}, /* 4710 */
+	{ 0,	0,	NULL,			NULL		}, /* 4711 */
+	{ 0,	0,	NULL,			NULL		}, /* 4712 */
+	{ 0,	0,	NULL,			NULL		}, /* 4713 */
+	{ 0,	0,	NULL,			NULL		}, /* 4714 */
+	{ 0,	0,	NULL,			NULL		}, /* 4715 */
+	{ 0,	0,	NULL,			NULL		}, /* 4716 */
+	{ 0,	0,	NULL,			NULL		}, /* 4717 */
+	{ 0,	0,	NULL,			NULL		}, /* 4718 */
+	{ 0,	0,	NULL,			NULL		}, /* 4719 */
+	{ 0,	0,	NULL,			NULL		}, /* 4720 */
+	{ 0,	0,	NULL,			NULL		}, /* 4721 */
+	{ 0,	0,	NULL,			NULL		}, /* 4722 */
+	{ 0,	0,	NULL,			NULL		}, /* 4723 */
+	{ 0,	0,	NULL,			NULL		}, /* 4724 */
+	{ 0,	0,	NULL,			NULL		}, /* 4725 */
+	{ 0,	0,	NULL,			NULL		}, /* 4726 */
+	{ 0,	0,	NULL,			NULL		}, /* 4727 */
+	{ 0,	0,	NULL,			NULL		}, /* 4728 */
+	{ 0,	0,	NULL,			NULL		}, /* 4729 */
+	{ 0,	0,	NULL,			NULL		}, /* 4730 */
+	{ 0,	0,	NULL,			NULL		}, /* 4731 */
+	{ 0,	0,	NULL,			NULL		}, /* 4732 */
+	{ 0,	0,	NULL,			NULL		}, /* 4733 */
+	{ 0,	0,	NULL,			NULL		}, /* 4734 */
+	{ 0,	0,	NULL,			NULL		}, /* 4735 */
+	{ 0,	0,	NULL,			NULL		}, /* 4736 */
+	{ 0,	0,	NULL,			NULL		}, /* 4737 */
+	{ 0,	0,	NULL,			NULL		}, /* 4738 */
+	{ 0,	0,	NULL,			NULL		}, /* 4739 */
+	{ 0,	0,	NULL,			NULL		}, /* 4740 */
+	{ 0,	0,	NULL,			NULL		}, /* 4741 */
+	{ 0,	0,	NULL,			NULL		}, /* 4742 */
+	{ 0,	0,	NULL,			NULL		}, /* 4743 */
+	{ 0,	0,	NULL,			NULL		}, /* 4744 */
+	{ 0,	0,	NULL,			NULL		}, /* 4745 */
+	{ 0,	0,	NULL,			NULL		}, /* 4746 */
+	{ 0,	0,	NULL,			NULL		}, /* 4747 */
+	{ 0,	0,	NULL,			NULL		}, /* 4748 */
+	{ 0,	0,	NULL,			NULL		}, /* 4749 */
+	{ 0,	0,	NULL,			NULL		}, /* 4750 */
+	{ 0,	0,	NULL,			NULL		}, /* 4751 */
+	{ 0,	0,	NULL,			NULL		}, /* 4752 */
+	{ 0,	0,	NULL,			NULL		}, /* 4753 */
+	{ 0,	0,	NULL,			NULL		}, /* 4754 */
+	{ 0,	0,	NULL,			NULL		}, /* 4755 */
+	{ 0,	0,	NULL,			NULL		}, /* 4756 */
+	{ 0,	0,	NULL,			NULL		}, /* 4757 */
+	{ 0,	0,	NULL,			NULL		}, /* 4758 */
+	{ 0,	0,	NULL,			NULL		}, /* 4759 */
+	{ 0,	0,	NULL,			NULL		}, /* 4760 */
+	{ 0,	0,	NULL,			NULL		}, /* 4761 */
+	{ 0,	0,	NULL,			NULL		}, /* 4762 */
+	{ 0,	0,	NULL,			NULL		}, /* 4763 */
+	{ 0,	0,	NULL,			NULL		}, /* 4764 */
+	{ 0,	0,	NULL,			NULL		}, /* 4765 */
+	{ 0,	0,	NULL,			NULL		}, /* 4766 */
+	{ 0,	0,	NULL,			NULL		}, /* 4767 */
+	{ 0,	0,	NULL,			NULL		}, /* 4768 */
+	{ 0,	0,	NULL,			NULL		}, /* 4769 */
+	{ 0,	0,	NULL,			NULL		}, /* 4770 */
+	{ 0,	0,	NULL,			NULL		}, /* 4771 */
+	{ 0,	0,	NULL,			NULL		}, /* 4772 */
+	{ 0,	0,	NULL,			NULL		}, /* 4773 */
+	{ 0,	0,	NULL,			NULL		}, /* 4774 */
+	{ 0,	0,	NULL,			NULL		}, /* 4775 */
+	{ 0,	0,	NULL,			NULL		}, /* 4776 */
+	{ 0,	0,	NULL,			NULL		}, /* 4777 */
+	{ 0,	0,	NULL,			NULL		}, /* 4778 */
+	{ 0,	0,	NULL,			NULL		}, /* 4779 */
+	{ 0,	0,	NULL,			NULL		}, /* 4780 */
+	{ 0,	0,	NULL,			NULL		}, /* 4781 */
+	{ 0,	0,	NULL,			NULL		}, /* 4782 */
+	{ 0,	0,	NULL,			NULL		}, /* 4783 */
+	{ 0,	0,	NULL,			NULL		}, /* 4784 */
+	{ 0,	0,	NULL,			NULL		}, /* 4785 */
+	{ 0,	0,	NULL,			NULL		}, /* 4786 */
+	{ 0,	0,	NULL,			NULL		}, /* 4787 */
+	{ 0,	0,	NULL,			NULL		}, /* 4788 */
+	{ 0,	0,	NULL,			NULL		}, /* 4789 */
+	{ 0,	0,	NULL,			NULL		}, /* 4790 */
+	{ 0,	0,	NULL,			NULL		}, /* 4791 */
+	{ 0,	0,	NULL,			NULL		}, /* 4792 */
+	{ 0,	0,	NULL,			NULL		}, /* 4793 */
+	{ 0,	0,	NULL,			NULL		}, /* 4794 */
+	{ 0,	0,	NULL,			NULL		}, /* 4795 */
+	{ 0,	0,	NULL,			NULL		}, /* 4796 */
+	{ 0,	0,	NULL,			NULL		}, /* 4797 */
+	{ 0,	0,	NULL,			NULL		}, /* 4798 */
+	{ 0,	0,	NULL,			NULL		}, /* 4799 */
+	{ 0,	0,	NULL,			NULL		}, /* 4800 */
+	{ 0,	0,	NULL,			NULL		}, /* 4801 */
+	{ 0,	0,	NULL,			NULL		}, /* 4802 */
+	{ 0,	0,	NULL,			NULL		}, /* 4803 */
+	{ 0,	0,	NULL,			NULL		}, /* 4804 */
+	{ 0,	0,	NULL,			NULL		}, /* 4805 */
+	{ 0,	0,	NULL,			NULL		}, /* 4806 */
+	{ 0,	0,	NULL,			NULL		}, /* 4807 */
+	{ 0,	0,	NULL,			NULL		}, /* 4808 */
+	{ 0,	0,	NULL,			NULL		}, /* 4809 */
+	{ 0,	0,	NULL,			NULL		}, /* 4810 */
+	{ 0,	0,	NULL,			NULL		}, /* 4811 */
+	{ 0,	0,	NULL,			NULL		}, /* 4812 */
+	{ 0,	0,	NULL,			NULL		}, /* 4813 */
+	{ 0,	0,	NULL,			NULL		}, /* 4814 */
+	{ 0,	0,	NULL,			NULL		}, /* 4815 */
+	{ 0,	0,	NULL,			NULL		}, /* 4816 */
+	{ 0,	0,	NULL,			NULL		}, /* 4817 */
+	{ 0,	0,	NULL,			NULL		}, /* 4818 */
+	{ 0,	0,	NULL,			NULL		}, /* 4819 */
+	{ 0,	0,	NULL,			NULL		}, /* 4820 */
+	{ 0,	0,	NULL,			NULL		}, /* 4821 */
+	{ 0,	0,	NULL,			NULL		}, /* 4822 */
+	{ 0,	0,	NULL,			NULL		}, /* 4823 */
+	{ 0,	0,	NULL,			NULL		}, /* 4824 */
+	{ 0,	0,	NULL,			NULL		}, /* 4825 */
+	{ 0,	0,	NULL,			NULL		}, /* 4826 */
+	{ 0,	0,	NULL,			NULL		}, /* 4827 */
+	{ 0,	0,	NULL,			NULL		}, /* 4828 */
+	{ 0,	0,	NULL,			NULL		}, /* 4829 */
+	{ 0,	0,	NULL,			NULL		}, /* 4830 */
+	{ 0,	0,	NULL,			NULL		}, /* 4831 */
+	{ 0,	0,	NULL,			NULL		}, /* 4832 */
+	{ 0,	0,	NULL,			NULL		}, /* 4833 */
+	{ 0,	0,	NULL,			NULL		}, /* 4834 */
+	{ 0,	0,	NULL,			NULL		}, /* 4835 */
+	{ 0,	0,	NULL,			NULL		}, /* 4836 */
+	{ 0,	0,	NULL,			NULL		}, /* 4837 */
+	{ 0,	0,	NULL,			NULL		}, /* 4838 */
+	{ 0,	0,	NULL,			NULL		}, /* 4839 */
+	{ 0,	0,	NULL,			NULL		}, /* 4840 */
+	{ 0,	0,	NULL,			NULL		}, /* 4841 */
+	{ 0,	0,	NULL,			NULL		}, /* 4842 */
+	{ 0,	0,	NULL,			NULL		}, /* 4843 */
+	{ 0,	0,	NULL,			NULL		}, /* 4844 */
+	{ 0,	0,	NULL,			NULL		}, /* 4845 */
+	{ 0,	0,	NULL,			NULL		}, /* 4846 */
+	{ 0,	0,	NULL,			NULL		}, /* 4847 */
+	{ 0,	0,	NULL,			NULL		}, /* 4848 */
+	{ 0,	0,	NULL,			NULL		}, /* 4849 */
+	{ 0,	0,	NULL,			NULL		}, /* 4850 */
+	{ 0,	0,	NULL,			NULL		}, /* 4851 */
+	{ 0,	0,	NULL,			NULL		}, /* 4852 */
+	{ 0,	0,	NULL,			NULL		}, /* 4853 */
+	{ 0,	0,	NULL,			NULL		}, /* 4854 */
+	{ 0,	0,	NULL,			NULL		}, /* 4855 */
+	{ 0,	0,	NULL,			NULL		}, /* 4856 */
+	{ 0,	0,	NULL,			NULL		}, /* 4857 */
+	{ 0,	0,	NULL,			NULL		}, /* 4858 */
+	{ 0,	0,	NULL,			NULL		}, /* 4859 */
+	{ 0,	0,	NULL,			NULL		}, /* 4860 */
+	{ 0,	0,	NULL,			NULL		}, /* 4861 */
+	{ 0,	0,	NULL,			NULL		}, /* 4862 */
+	{ 0,	0,	NULL,			NULL		}, /* 4863 */
+	{ 0,	0,	NULL,			NULL		}, /* 4864 */
+	{ 0,	0,	NULL,			NULL		}, /* 4865 */
+	{ 0,	0,	NULL,			NULL		}, /* 4866 */
+	{ 0,	0,	NULL,			NULL		}, /* 4867 */
+	{ 0,	0,	NULL,			NULL		}, /* 4868 */
+	{ 0,	0,	NULL,			NULL		}, /* 4869 */
+	{ 0,	0,	NULL,			NULL		}, /* 4870 */
+	{ 0,	0,	NULL,			NULL		}, /* 4871 */
+	{ 0,	0,	NULL,			NULL		}, /* 4872 */
+	{ 0,	0,	NULL,			NULL		}, /* 4873 */
+	{ 0,	0,	NULL,			NULL		}, /* 4874 */
+	{ 0,	0,	NULL,			NULL		}, /* 4875 */
+	{ 0,	0,	NULL,			NULL		}, /* 4876 */
+	{ 0,	0,	NULL,			NULL		}, /* 4877 */
+	{ 0,	0,	NULL,			NULL		}, /* 4878 */
+	{ 0,	0,	NULL,			NULL		}, /* 4879 */
+	{ 0,	0,	NULL,			NULL		}, /* 4880 */
+	{ 0,	0,	NULL,			NULL		}, /* 4881 */
+	{ 0,	0,	NULL,			NULL		}, /* 4882 */
+	{ 0,	0,	NULL,			NULL		}, /* 4883 */
+	{ 0,	0,	NULL,			NULL		}, /* 4884 */
+	{ 0,	0,	NULL,			NULL		}, /* 4885 */
+	{ 0,	0,	NULL,			NULL		}, /* 4886 */
+	{ 0,	0,	NULL,			NULL		}, /* 4887 */
+	{ 0,	0,	NULL,			NULL		}, /* 4888 */
+	{ 0,	0,	NULL,			NULL		}, /* 4889 */
+	{ 0,	0,	NULL,			NULL		}, /* 4890 */
+	{ 0,	0,	NULL,			NULL		}, /* 4891 */
+	{ 0,	0,	NULL,			NULL		}, /* 4892 */
+	{ 0,	0,	NULL,			NULL		}, /* 4893 */
+	{ 0,	0,	NULL,			NULL		}, /* 4894 */
+	{ 0,	0,	NULL,			NULL		}, /* 4895 */
+	{ 0,	0,	NULL,			NULL		}, /* 4896 */
+	{ 0,	0,	NULL,			NULL		}, /* 4897 */
+	{ 0,	0,	NULL,			NULL		}, /* 4898 */
+	{ 0,	0,	NULL,			NULL		}, /* 4899 */
+	{ 0,	0,	NULL,			NULL		}, /* 4900 */
+	{ 0,	0,	NULL,			NULL		}, /* 4901 */
+	{ 0,	0,	NULL,			NULL		}, /* 4902 */
+	{ 0,	0,	NULL,			NULL		}, /* 4903 */
+	{ 0,	0,	NULL,			NULL		}, /* 4904 */
+	{ 0,	0,	NULL,			NULL		}, /* 4905 */
+	{ 0,	0,	NULL,			NULL		}, /* 4906 */
+	{ 0,	0,	NULL,			NULL		}, /* 4907 */
+	{ 0,	0,	NULL,			NULL		}, /* 4908 */
+	{ 0,	0,	NULL,			NULL		}, /* 4909 */
+	{ 0,	0,	NULL,			NULL		}, /* 4910 */
+	{ 0,	0,	NULL,			NULL		}, /* 4911 */
+	{ 0,	0,	NULL,			NULL		}, /* 4912 */
+	{ 0,	0,	NULL,			NULL		}, /* 4913 */
+	{ 0,	0,	NULL,			NULL		}, /* 4914 */
+	{ 0,	0,	NULL,			NULL		}, /* 4915 */
+	{ 0,	0,	NULL,			NULL		}, /* 4916 */
+	{ 0,	0,	NULL,			NULL		}, /* 4917 */
+	{ 0,	0,	NULL,			NULL		}, /* 4918 */
+	{ 0,	0,	NULL,			NULL		}, /* 4919 */
+	{ 0,	0,	NULL,			NULL		}, /* 4920 */
+	{ 0,	0,	NULL,			NULL		}, /* 4921 */
+	{ 0,	0,	NULL,			NULL		}, /* 4922 */
+	{ 0,	0,	NULL,			NULL		}, /* 4923 */
+	{ 0,	0,	NULL,			NULL		}, /* 4924 */
+	{ 0,	0,	NULL,			NULL		}, /* 4925 */
+	{ 0,	0,	NULL,			NULL		}, /* 4926 */
+	{ 0,	0,	NULL,			NULL		}, /* 4927 */
+	{ 0,	0,	NULL,			NULL		}, /* 4928 */
+	{ 0,	0,	NULL,			NULL		}, /* 4929 */
+	{ 0,	0,	NULL,			NULL		}, /* 4930 */
+	{ 0,	0,	NULL,			NULL		}, /* 4931 */
+	{ 0,	0,	NULL,			NULL		}, /* 4932 */
+	{ 0,	0,	NULL,			NULL		}, /* 4933 */
+	{ 0,	0,	NULL,			NULL		}, /* 4934 */
+	{ 0,	0,	NULL,			NULL		}, /* 4935 */
+	{ 0,	0,	NULL,			NULL		}, /* 4936 */
+	{ 0,	0,	NULL,			NULL		}, /* 4937 */
+	{ 0,	0,	NULL,			NULL		}, /* 4938 */
+	{ 0,	0,	NULL,			NULL		}, /* 4939 */
+	{ 0,	0,	NULL,			NULL		}, /* 4940 */
+	{ 0,	0,	NULL,			NULL		}, /* 4941 */
+	{ 0,	0,	NULL,			NULL		}, /* 4942 */
+	{ 0,	0,	NULL,			NULL		}, /* 4943 */
+	{ 0,	0,	NULL,			NULL		}, /* 4944 */
+	{ 0,	0,	NULL,			NULL		}, /* 4945 */
+	{ 0,	0,	NULL,			NULL		}, /* 4946 */
+	{ 0,	0,	NULL,			NULL		}, /* 4947 */
+	{ 0,	0,	NULL,			NULL		}, /* 4948 */
+	{ 0,	0,	NULL,			NULL		}, /* 4949 */
+	{ 0,	0,	NULL,			NULL		}, /* 4950 */
+	{ 0,	0,	NULL,			NULL		}, /* 4951 */
+	{ 0,	0,	NULL,			NULL		}, /* 4952 */
+	{ 0,	0,	NULL,			NULL		}, /* 4953 */
+	{ 0,	0,	NULL,			NULL		}, /* 4954 */
+	{ 0,	0,	NULL,			NULL		}, /* 4955 */
+	{ 0,	0,	NULL,			NULL		}, /* 4956 */
+	{ 0,	0,	NULL,			NULL		}, /* 4957 */
+	{ 0,	0,	NULL,			NULL		}, /* 4958 */
+	{ 0,	0,	NULL,			NULL		}, /* 4959 */
+	{ 0,	0,	NULL,			NULL		}, /* 4960 */
+	{ 0,	0,	NULL,			NULL		}, /* 4961 */
+	{ 0,	0,	NULL,			NULL		}, /* 4962 */
+	{ 0,	0,	NULL,			NULL		}, /* 4963 */
+	{ 0,	0,	NULL,			NULL		}, /* 4964 */
+	{ 0,	0,	NULL,			NULL		}, /* 4965 */
+	{ 0,	0,	NULL,			NULL		}, /* 4966 */
+	{ 0,	0,	NULL,			NULL		}, /* 4967 */
+	{ 0,	0,	NULL,			NULL		}, /* 4968 */
+	{ 0,	0,	NULL,			NULL		}, /* 4969 */
+	{ 0,	0,	NULL,			NULL		}, /* 4970 */
+	{ 0,	0,	NULL,			NULL		}, /* 4971 */
+	{ 0,	0,	NULL,			NULL		}, /* 4972 */
+	{ 0,	0,	NULL,			NULL		}, /* 4973 */
+	{ 0,	0,	NULL,			NULL		}, /* 4974 */
+	{ 0,	0,	NULL,			NULL		}, /* 4975 */
+	{ 0,	0,	NULL,			NULL		}, /* 4976 */
+	{ 0,	0,	NULL,			NULL		}, /* 4977 */
+	{ 0,	0,	NULL,			NULL		}, /* 4978 */
+	{ 0,	0,	NULL,			NULL		}, /* 4979 */
+	{ 0,	0,	NULL,			NULL		}, /* 4980 */
+	{ 0,	0,	NULL,			NULL		}, /* 4981 */
+	{ 0,	0,	NULL,			NULL		}, /* 4982 */
+	{ 0,	0,	NULL,			NULL		}, /* 4983 */
+	{ 0,	0,	NULL,			NULL		}, /* 4984 */
+	{ 0,	0,	NULL,			NULL		}, /* 4985 */
+	{ 0,	0,	NULL,			NULL		}, /* 4986 */
+	{ 0,	0,	NULL,			NULL		}, /* 4987 */
+	{ 0,	0,	NULL,			NULL		}, /* 4988 */
+	{ 0,	0,	NULL,			NULL		}, /* 4989 */
+	{ 0,	0,	NULL,			NULL		}, /* 4990 */
+	{ 0,	0,	NULL,			NULL		}, /* 4991 */
+	{ 0,	0,	NULL,			NULL		}, /* 4992 */
+	{ 0,	0,	NULL,			NULL		}, /* 4993 */
+	{ 0,	0,	NULL,			NULL		}, /* 4994 */
+	{ 0,	0,	NULL,			NULL		}, /* 4995 */
+	{ 0,	0,	NULL,			NULL		}, /* 4996 */
+	{ 0,	0,	NULL,			NULL		}, /* 4997 */
+	{ 0,	0,	NULL,			NULL		}, /* 4998 */
+	{ 0,	0,	NULL,			NULL		}, /* 4999 */ /* end of Linux o32 */
+#if defined(LINUX_MIPSN64)
 	/* For an N64 strace decode the N64 64-bit syscalls.  */
 	{ 3,	TF,	sys_read,		"read"		}, /* 5000 */ /* start of Linux N64 */
 	{ 3,	TF,	sys_write,		"write"		}, /* 5001 */
@@ -5364,8 +5369,8 @@
 	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	}, /* 5013 */
 	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 5014 */
 	{ 3,	0,	sys_ioctl,		"ioctl"		}, /* 5015 */
-	{ 6,	TF,	sys_pread64,		"pread"		}, /* 5016 */
-	{ 6,	TF,	sys_pwrite64,		"pwrite"	}, /* 5017 */
+	{ 6,	TF,	sys_pread,		"pread"		}, /* 5016 */
+	{ 6,	TF,	sys_pwrite,		"pwrite"	}, /* 5017 */
 	{ 3,	0,	sys_readv,		"readv"		}, /* 5018 */
 	{ 3,	0,	sys_writev,		"writev"	}, /* 5019 */
 	{ 2,	TF,	sys_access,		"access"	}, /* 5020 */
@@ -5374,7 +5379,7 @@
 	{ 0,	0,	sys_sched_yield,	"sched_yield"	}, /* 5023 */
 	{ 5,	0,	sys_mremap,		"mremap"	}, /* 5024 */
 	{ 3,	0,	sys_msync,		"msync"		}, /* 5025 */
-	{ 3,	0,	printargs,		"mincore"	}, /* 5026 */
+	{ 3,	0,	sys_mincore,		"mincore"	}, /* 5026 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 5027 */
 	{ 3,	TI,	sys_shmget,		"shmget"	}, /* 5028 */
 	{ 3,	TI,	sys_shmat,		"shmgat"	}, /* 5029 */
@@ -5420,7 +5425,7 @@
 	{ 3,	TI,	sys_msgctl,		"msgctl"	}, /* 5069 */
 	{ 3,	0,	sys_fcntl,		"fcntl"		}, /* 5070 */
 	{ 2,	0,	sys_flock,		"flock"		}, /* 5071 */
-	{ 1,	0,	sys_fsync,		"fsync"		}, /* 5072 */
+	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 5072 */
 	{ 1,	0,	sys_fdatasync,		"fdatasync"	}, /* 5073 */
 	{ 2,	TF,	sys_truncate,		"truncate"	}, /* 5074 */
 	{ 2,	0,	sys_ftruncate,		"ftruncate"	}, /* 5075 */
@@ -5501,7 +5506,7 @@
 	{ 0,	0,	sys_vhangup,		"vhangup"	}, /* 5150 */
 	{ 2,	0,	sys_pivotroot,		"pivot_root"	}, /* 5151 */
 	{ 1,	0,	sys_sysctl,		"_sysctl"	}, /* 5152 */
-	{ 5,	0,	printargs,		"prctl"		}, /* 5153 */
+	{ 5,	0,	sys_prctl,		"prctl"		}, /* 5153 */
 	{ 1,	0,	sys_adjtimex,		"adjtimex"	}, /* 5154 */
 	{ 2,	0,	sys_setrlimit,		"setrlimit"	}, /* 5155 */
 	{ 1,	TF,	sys_chroot,		"chroot"	}, /* 5156 */
@@ -5510,9 +5515,9 @@
 	{ 2,	0,	sys_settimeofday,	"settimeofday"	}, /* 5159 */
 	{ 5,	TF,	sys_mount,		"mount"		}, /* 5160 */
 	{ 2,	TF,	sys_umount2,		"umount"	}, /* 5161 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 5162 */
+	{ 2,	TF,	sys_swapon,		"swapon"	}, /* 5162 */
 	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 5163 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 5164 */
+	{ 4,	0,	sys_reboot,		"reboot"	}, /* 5164 */
 	{ 2,	0,	sys_sethostname,	"sethostname"	}, /* 5165 */
 	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 5166 */
 	{ 2,	0,	sys_create_module,	"create_module"	}, /* 5167 */
@@ -5521,12 +5526,12 @@
 	{ 1,	0,	sys_get_kernel_syms,	"get_kernel_syms"}, /* 5170 */
 	{ 5,	0,	sys_query_module,	"query_module"	}, /* 5171 */
 	{ 4,	0,	sys_quotactl,		"quotactl"	}, /* 5172 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 5173 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	}, /* 5173 */
 	{ 5,	TN,	printargs,		"getpmsg"	}, /* 5174 */
 	{ 5,	TN,	printargs,		"putpmsg"	}, /* 5175 */
 	{ 0,	0,	sys_afs_syscall,	"afs_syscall"	}, /* 5176 */
 	{ 0,	0,	printargs,		"reserved177"	}, /* 5177 */
-	{ 0,	0,	printargs,		"gettid"	}, /* 5178 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 5178 */
 	{ 3,	0,	sys_readahead,		"readahead"	}, /* 5179 */
 	{ 5,	0,	sys_setxattr,		"setxattr"	}, /* 5180 */
 	{ 5,	0,	sys_setxattr,		"lsetxattr"	}, /* 5181 */
@@ -5540,7 +5545,7 @@
 	{ 2,	0,	sys_removexattr,	"removexattr"	}, /* 5189 */
 	{ 2,	0,	sys_removexattr,	"lremovexattr"	}, /* 5190 */
 	{ 2,	TD,	sys_fremovexattr,	"fremovexattr"	}, /* 5191 */
-	{ 2,	0,	sys_kill,		"tkill"		}, /* 5192 */
+	{ 2,	TS,	sys_kill,		"tkill"		}, /* 5192 */
 	{ 1,	0,	sys_time,		"time"		}, /* 5193 */
 	{ 6,	0,	sys_futex,		"futex"		}, /* 5194 */
 	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity"}, /* 5195 */
@@ -5554,13 +5559,13 @@
 	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 5203 */
 	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 5204 */
 	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 5205 */
-	{ 3,	0,	printargs,		"lookup_dcookie" }, /* 5206 */
+	{ 3,	0,	sys_lookup_dcookie,	"lookup_dcookie" }, /* 5206 */
 	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 5207 */
 	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 5208 */
 	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 5209 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages" }, /* 5210 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 5211 */
-	{ 1,	0,	printargs,		"set_tid_address" }, /* 5212 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	}, /* 5211 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address" }, /* 5212 */
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall" }, /* 5213 */
 	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 5214 */
 	{ 4,	TD,	sys_fadvise64_64,	"fadvise64_64"	}, /* 5215 */
@@ -5576,25 +5581,25 @@
 	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 5225 */
 	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 5226 */
 	{ 6,	0,	sys_mbind,		"mbind"		}, /* 5227 */
-	{ 0,	0,	printargs,		"SYS_5228"	}, /* 5228 */
-	{ 0,	0,	printargs,		"SYS_5228"	}, /* 5229 */
+	{ 0,	0,	NULL,			NULL		}, /* 5228 */
+	{ 0,	0,	NULL,			NULL		}, /* 5229 */
 	{ 4,	0,	sys_mq_open,		"mq_open"	}, /* 5230 */
 	{ 1,	0,	sys_mq_unlink,		"mq_unlink"	}, /* 5231 */
 	{ 5,	0,	sys_mq_timedsend,	"mq_timedsend"	}, /* 5232 */
 	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive" }, /* 5233 */
 	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 5234 */
 	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 5235 */
-	{ 0,	0,	printargs,		"SYS_5236"	}, /* 5236 */
+	{ 0,	0,	NULL,			NULL		}, /* 5236 */
 	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 5237 */
-	{ 0,	0,	printargs,		"SYS_5238"	}, /* 5238 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 5239 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 5230 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 5241 */
+	{ 0,	0,	NULL,			NULL		}, /* 5238 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 5239 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 5230 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 5241 */
 	{ 1,	0,	sys_set_thread_area,	"set_thread_area" }, /* 5242 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 5243 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 5243 */
 	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 5244 */
 	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 5245 */
-	{ 4,	0,	printargs,		"migrate_pages"	}, /* 5246 */
+	{ 4,	0,	sys_migrate_pages,	"migrate_pages"	}, /* 5246 */
 	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 5247 */
 	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 5248 */
 	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 5249 */
@@ -5611,21 +5616,21 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 5260 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 5261 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 5262 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 5263 */
-	{ 4,	TD,	printargs,		"sync_file_range" }, /* 5264 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 5265 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 5266 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 5263 */
+	{ 4,	TD,	sys_sync_file_range,	"sync_file_range" }, /* 5264 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 5265 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 5266 */
 	{ 6,	0,	printargs,		"move_pages"	}, /* 5267 */
-	{ 2,	0,	printargs,		"set_robust_list" }, /* 5268 */
-	{ 3,	0,	printargs,		"get_robust_list" }, /* 5269 */
-	{ 5,	0,	printargs,		"kexec_load"	}, /* 5270 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 5268 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 5269 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 5270 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 5271 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 5272 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 5273 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 5274 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 5272 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 5273 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 5274 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 5275 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 5276 */
-	{ 0,	0,	printargs,		"SYS_5277"	}, /* 5277 */
+	{ 0,	0,	NULL,			NULL		}, /* 5277 */
 	{ 1,	TD,	sys_eventfd,		"eventfd"	}, /* 5278 */
 	{ 6,	TD,	sys_fallocate,		"fallocate"	}, /* 5279 */
 	{ 2,	TD,	sys_timerfd_create,	"timerfd_create" }, /* 5280 */
@@ -5637,15 +5642,23 @@
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 5286 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 5287 */
 	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 5288 */
-	{ 5,	TD,	printargs,		"preadv"	}, /* 5289 */
-	{ 5,	TD,	printargs,		"pwritev"	}, /* 5290 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo" }, /* 5291 */
-	{ 5,	TD,	printargs,		"perf_event_open" }, /* 5292 */
+	{ 5,	TD,	sys_preadv,		"preadv"	}, /* 5289 */
+	{ 5,	TD,	sys_pwritev,		"pwritev"	}, /* 5290 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo" }, /* 5291 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open" }, /* 5292 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 5293 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 5294 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 5295 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 5296 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 5297 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 5295 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 5296 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 5297 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 5298 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 5299 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 5300 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 5301 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 5302 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 5303 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 5304 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 5305 */
 #else
 	{ 0,	0,	printargs,		"n64_read"		}, /* 5000 */
 	{ 0,	0,	printargs,		"n64_write"		}, /* 5001 */
@@ -5945,714 +5958,711 @@
 	{ 2,	0,	printargs,		"n64_fanotify_init"	}, /* 5295 */
 	{ 5,	0,	printargs,		"n64_fanotify_mark"	}, /* 5296 */
 	{ 4,	0,	printargs,		"n64_prlimit64"		}, /* 5297 */
+	{ 5,	TD|TF,	printargs,		"n64_name_to_handle_at"	}, /* 5298 */
+	{ 3,	TD,	printargs,		"n64_open_by_handle_at"	}, /* 5299 */
+	{ 2,	0,	printargs,		"n64_clock_adjtime"	}, /* 5300 */
+	{ 1,	TD,	printargs,		"n64_syncfs"		}, /* 5301 */
+	{ 4,	TN,	printargs,		"n64_sendmmsg"		}, /* 5302 */
+	{ 2,	TD,	printargs,		"n64_setns"		}, /* 5303 */
+	{ 6,	0,	printargs,		"n64_process_vm_readv"	}, /* 5304 */
+	{ 6,	0,	printargs,		"n64_process_vm_writev"	}, /* 5305 */
 #endif
-	{ 0,	0,	printargs,		"SYS_5295"	}, /* 5295 */
-	{ 0,	0,	printargs,		"SYS_5296"	}, /* 5296 */
-	{ 0,	0,	printargs,		"SYS_5297"	}, /* 5297 */
-	{ 0,	0,	printargs,		"SYS_5298"	}, /* 5298 */
-	{ 0,	0,	printargs,		"SYS_5299"	}, /* 5299 */
-	{ 0,	0,	printargs,		"SYS_5300"	}, /* 5300 */
-	{ 0,	0,	printargs,		"SYS_5301"	}, /* 5301 */
-	{ 0,	0,	printargs,		"SYS_5302"	}, /* 5302 */
-	{ 0,	0,	printargs,		"SYS_5303"	}, /* 5303 */
-	{ 0,	0,	printargs,		"SYS_5304"	}, /* 5304 */
-	{ 0,	0,	printargs,		"SYS_5305"	}, /* 5305 */
-	{ 0,	0,	printargs,		"SYS_5306"	}, /* 5306 */
-	{ 0,	0,	printargs,		"SYS_5307"	}, /* 5307 */
-	{ 0,	0,	printargs,		"SYS_5308"	}, /* 5308 */
-	{ 0,	0,	printargs,		"SYS_5309"	}, /* 5309 */
-	{ 0,	0,	printargs,		"SYS_5310"	}, /* 5310 */
-	{ 0,	0,	printargs,		"SYS_5311"	}, /* 5311 */
-	{ 0,	0,	printargs,		"SYS_5312"	}, /* 5312 */
-	{ 0,	0,	printargs,		"SYS_5313"	}, /* 5313 */
-	{ 0,	0,	printargs,		"SYS_5314"	}, /* 5314 */
-	{ 0,	0,	printargs,		"SYS_5315"	}, /* 5315 */
-	{ 0,	0,	printargs,		"SYS_5316"	}, /* 5316 */
-	{ 0,	0,	printargs,		"SYS_5317"	}, /* 5317 */
-	{ 0,	0,	printargs,		"SYS_5318"	}, /* 5318 */
-	{ 0,	0,	printargs,		"SYS_5319"	}, /* 5319 */
-	{ 0,	0,	printargs,		"SYS_5320"	}, /* 5320 */
-	{ 0,	0,	printargs,		"SYS_5321"	}, /* 5321 */
-	{ 0,	0,	printargs,		"SYS_5322"	}, /* 5322 */
-	{ 0,	0,	printargs,		"SYS_5323"	}, /* 5323 */
-	{ 0,	0,	printargs,		"SYS_5324"	}, /* 5324 */
-	{ 0,	0,	printargs,		"SYS_5325"	}, /* 5325 */
-	{ 0,	0,	printargs,		"SYS_5326"	}, /* 5326 */
-	{ 0,	0,	printargs,		"SYS_5327"	}, /* 5327 */
-	{ 0,	0,	printargs,		"SYS_5328"	}, /* 5328 */
-	{ 0,	0,	printargs,		"SYS_5329"	}, /* 5329 */
-	{ 0,	0,	printargs,		"SYS_5330"	}, /* 5330 */
-	{ 0,	0,	printargs,		"SYS_5331"	}, /* 5331 */
-	{ 0,	0,	printargs,		"SYS_5332"	}, /* 5332 */
-	{ 0,	0,	printargs,		"SYS_5333"	}, /* 5333 */
-	{ 0,	0,	printargs,		"SYS_5334"	}, /* 5334 */
-	{ 0,	0,	printargs,		"SYS_5335"	}, /* 5335 */
-	{ 0,	0,	printargs,		"SYS_5336"	}, /* 5336 */
-	{ 0,	0,	printargs,		"SYS_5337"	}, /* 5337 */
-	{ 0,	0,	printargs,		"SYS_5338"	}, /* 5338 */
-	{ 0,	0,	printargs,		"SYS_5339"	}, /* 5339 */
-	{ 0,	0,	printargs,		"SYS_5340"	}, /* 5340 */
-	{ 0,	0,	printargs,		"SYS_5341"	}, /* 5341 */
-	{ 0,	0,	printargs,		"SYS_5342"	}, /* 5342 */
-	{ 0,	0,	printargs,		"SYS_5343"	}, /* 5343 */
-	{ 0,	0,	printargs,		"SYS_5344"	}, /* 5344 */
-	{ 0,	0,	printargs,		"SYS_5345"	}, /* 5345 */
-	{ 0,	0,	printargs,		"SYS_5346"	}, /* 5346 */
-	{ 0,	0,	printargs,		"SYS_5347"	}, /* 5347 */
-	{ 0,	0,	printargs,		"SYS_5348"	}, /* 5348 */
-	{ 0,	0,	printargs,		"SYS_5349"	}, /* 5349 */
-	{ 0,	0,	printargs,		"SYS_5350"	}, /* 5350 */
-	{ 0,	0,	printargs,		"SYS_5351"	}, /* 5351 */
-	{ 0,	0,	printargs,		"SYS_5352"	}, /* 5352 */
-	{ 0,	0,	printargs,		"SYS_5353"	}, /* 5353 */
-	{ 0,	0,	printargs,		"SYS_5354"	}, /* 5354 */
-	{ 0,	0,	printargs,		"SYS_5355"	}, /* 5355 */
-	{ 0,	0,	printargs,		"SYS_5356"	}, /* 5356 */
-	{ 0,	0,	printargs,		"SYS_5357"	}, /* 5357 */
-	{ 0,	0,	printargs,		"SYS_5358"	}, /* 5358 */
-	{ 0,	0,	printargs,		"SYS_5359"	}, /* 5359 */
-	{ 0,	0,	printargs,		"SYS_5360"	}, /* 5360 */
-	{ 0,	0,	printargs,		"SYS_5361"	}, /* 5361 */
-	{ 0,	0,	printargs,		"SYS_5362"	}, /* 5362 */
-	{ 0,	0,	printargs,		"SYS_5363"	}, /* 5363 */
-	{ 0,	0,	printargs,		"SYS_5364"	}, /* 5364 */
-	{ 0,	0,	printargs,		"SYS_5365"	}, /* 5365 */
-	{ 0,	0,	printargs,		"SYS_5366"	}, /* 5366 */
-	{ 0,	0,	printargs,		"SYS_5367"	}, /* 5367 */
-	{ 0,	0,	printargs,		"SYS_5368"	}, /* 5368 */
-	{ 0,	0,	printargs,		"SYS_5369"	}, /* 5369 */
-	{ 0,	0,	printargs,		"SYS_5370"	}, /* 5370 */
-	{ 0,	0,	printargs,		"SYS_5371"	}, /* 5371 */
-	{ 0,	0,	printargs,		"SYS_5372"	}, /* 5372 */
-	{ 0,	0,	printargs,		"SYS_5373"	}, /* 5373 */
-	{ 0,	0,	printargs,		"SYS_5374"	}, /* 5374 */
-	{ 0,	0,	printargs,		"SYS_5375"	}, /* 5375 */
-	{ 0,	0,	printargs,		"SYS_5376"	}, /* 5376 */
-	{ 0,	0,	printargs,		"SYS_5377"	}, /* 5377 */
-	{ 0,	0,	printargs,		"SYS_5378"	}, /* 5378 */
-	{ 0,	0,	printargs,		"SYS_5379"	}, /* 5379 */
-	{ 0,	0,	printargs,		"SYS_5380"	}, /* 5380 */
-	{ 0,	0,	printargs,		"SYS_5381"	}, /* 5381 */
-	{ 0,	0,	printargs,		"SYS_5382"	}, /* 5382 */
-	{ 0,	0,	printargs,		"SYS_5383"	}, /* 5383 */
-	{ 0,	0,	printargs,		"SYS_5384"	}, /* 5384 */
-	{ 0,	0,	printargs,		"SYS_5385"	}, /* 5385 */
-	{ 0,	0,	printargs,		"SYS_5386"	}, /* 5386 */
-	{ 0,	0,	printargs,		"SYS_5387"	}, /* 5387 */
-	{ 0,	0,	printargs,		"SYS_5388"	}, /* 5388 */
-	{ 0,	0,	printargs,		"SYS_5389"	}, /* 5389 */
-	{ 0,	0,	printargs,		"SYS_5390"	}, /* 5390 */
-	{ 0,	0,	printargs,		"SYS_5391"	}, /* 5391 */
-	{ 0,	0,	printargs,		"SYS_5392"	}, /* 5392 */
-	{ 0,	0,	printargs,		"SYS_5393"	}, /* 5393 */
-	{ 0,	0,	printargs,		"SYS_5394"	}, /* 5394 */
-	{ 0,	0,	printargs,		"SYS_5395"	}, /* 5395 */
-	{ 0,	0,	printargs,		"SYS_5396"	}, /* 5396 */
-	{ 0,	0,	printargs,		"SYS_5397"	}, /* 5397 */
-	{ 0,	0,	printargs,		"SYS_5398"	}, /* 5398 */
-	{ 0,	0,	printargs,		"SYS_5399"	}, /* 5399 */
-	{ 0,	0,	printargs,		"SYS_5400"	}, /* 5400 */
-	{ 0,	0,	printargs,		"SYS_5401"	}, /* 5401 */
-	{ 0,	0,	printargs,		"SYS_5402"	}, /* 5402 */
-	{ 0,	0,	printargs,		"SYS_5403"	}, /* 5403 */
-	{ 0,	0,	printargs,		"SYS_5404"	}, /* 5404 */
-	{ 0,	0,	printargs,		"SYS_5405"	}, /* 5405 */
-	{ 0,	0,	printargs,		"SYS_5406"	}, /* 5406 */
-	{ 0,	0,	printargs,		"SYS_5407"	}, /* 5407 */
-	{ 0,	0,	printargs,		"SYS_5408"	}, /* 5408 */
-	{ 0,	0,	printargs,		"SYS_5409"	}, /* 5409 */
-	{ 0,	0,	printargs,		"SYS_5410"	}, /* 5410 */
-	{ 0,	0,	printargs,		"SYS_5411"	}, /* 5411 */
-	{ 0,	0,	printargs,		"SYS_5412"	}, /* 5412 */
-	{ 0,	0,	printargs,		"SYS_5413"	}, /* 5413 */
-	{ 0,	0,	printargs,		"SYS_5414"	}, /* 5414 */
-	{ 0,	0,	printargs,		"SYS_5415"	}, /* 5415 */
-	{ 0,	0,	printargs,		"SYS_5416"	}, /* 5416 */
-	{ 0,	0,	printargs,		"SYS_5417"	}, /* 5417 */
-	{ 0,	0,	printargs,		"SYS_5418"	}, /* 5418 */
-	{ 0,	0,	printargs,		"SYS_5419"	}, /* 5419 */
-	{ 0,	0,	printargs,		"SYS_5420"	}, /* 5420 */
-	{ 0,	0,	printargs,		"SYS_5421"	}, /* 5421 */
-	{ 0,	0,	printargs,		"SYS_5422"	}, /* 5422 */
-	{ 0,	0,	printargs,		"SYS_5423"	}, /* 5423 */
-	{ 0,	0,	printargs,		"SYS_5424"	}, /* 5424 */
-	{ 0,	0,	printargs,		"SYS_5425"	}, /* 5425 */
-	{ 0,	0,	printargs,		"SYS_5426"	}, /* 5426 */
-	{ 0,	0,	printargs,		"SYS_5427"	}, /* 5427 */
-	{ 0,	0,	printargs,		"SYS_5428"	}, /* 5428 */
-	{ 0,	0,	printargs,		"SYS_5429"	}, /* 5429 */
-	{ 0,	0,	printargs,		"SYS_5430"	}, /* 5430 */
-	{ 0,	0,	printargs,		"SYS_5431"	}, /* 5431 */
-	{ 0,	0,	printargs,		"SYS_5432"	}, /* 5432 */
-	{ 0,	0,	printargs,		"SYS_5433"	}, /* 5433 */
-	{ 0,	0,	printargs,		"SYS_5434"	}, /* 5434 */
-	{ 0,	0,	printargs,		"SYS_5435"	}, /* 5435 */
-	{ 0,	0,	printargs,		"SYS_5436"	}, /* 5436 */
-	{ 0,	0,	printargs,		"SYS_5437"	}, /* 5437 */
-	{ 0,	0,	printargs,		"SYS_5438"	}, /* 5438 */
-	{ 0,	0,	printargs,		"SYS_5439"	}, /* 5439 */
-	{ 0,	0,	printargs,		"SYS_5440"	}, /* 5440 */
-	{ 0,	0,	printargs,		"SYS_5441"	}, /* 5441 */
-	{ 0,	0,	printargs,		"SYS_5442"	}, /* 5442 */
-	{ 0,	0,	printargs,		"SYS_5443"	}, /* 5443 */
-	{ 0,	0,	printargs,		"SYS_5444"	}, /* 5444 */
-	{ 0,	0,	printargs,		"SYS_5445"	}, /* 5445 */
-	{ 0,	0,	printargs,		"SYS_5446"	}, /* 5446 */
-	{ 0,	0,	printargs,		"SYS_5447"	}, /* 5447 */
-	{ 0,	0,	printargs,		"SYS_5448"	}, /* 5448 */
-	{ 0,	0,	printargs,		"SYS_5449"	}, /* 5449 */
-	{ 0,	0,	printargs,		"SYS_5450"	}, /* 5450 */
-	{ 0,	0,	printargs,		"SYS_5451"	}, /* 5451 */
-	{ 0,	0,	printargs,		"SYS_5452"	}, /* 5452 */
-	{ 0,	0,	printargs,		"SYS_5453"	}, /* 5453 */
-	{ 0,	0,	printargs,		"SYS_5454"	}, /* 5454 */
-	{ 0,	0,	printargs,		"SYS_5455"	}, /* 5455 */
-	{ 0,	0,	printargs,		"SYS_5456"	}, /* 5456 */
-	{ 0,	0,	printargs,		"SYS_5457"	}, /* 5457 */
-	{ 0,	0,	printargs,		"SYS_5458"	}, /* 5458 */
-	{ 0,	0,	printargs,		"SYS_5459"	}, /* 5459 */
-	{ 0,	0,	printargs,		"SYS_5460"	}, /* 5460 */
-	{ 0,	0,	printargs,		"SYS_5461"	}, /* 5461 */
-	{ 0,	0,	printargs,		"SYS_5462"	}, /* 5462 */
-	{ 0,	0,	printargs,		"SYS_5463"	}, /* 5463 */
-	{ 0,	0,	printargs,		"SYS_5464"	}, /* 5464 */
-	{ 0,	0,	printargs,		"SYS_5465"	}, /* 5465 */
-	{ 0,	0,	printargs,		"SYS_5466"	}, /* 5466 */
-	{ 0,	0,	printargs,		"SYS_5467"	}, /* 5467 */
-	{ 0,	0,	printargs,		"SYS_5468"	}, /* 5468 */
-	{ 0,	0,	printargs,		"SYS_5469"	}, /* 5469 */
-	{ 0,	0,	printargs,		"SYS_5470"	}, /* 5470 */
-	{ 0,	0,	printargs,		"SYS_5471"	}, /* 5471 */
-	{ 0,	0,	printargs,		"SYS_5472"	}, /* 5472 */
-	{ 0,	0,	printargs,		"SYS_5473"	}, /* 5473 */
-	{ 0,	0,	printargs,		"SYS_5474"	}, /* 5474 */
-	{ 0,	0,	printargs,		"SYS_5475"	}, /* 5475 */
-	{ 0,	0,	printargs,		"SYS_5476"	}, /* 5476 */
-	{ 0,	0,	printargs,		"SYS_5477"	}, /* 5477 */
-	{ 0,	0,	printargs,		"SYS_5478"	}, /* 5478 */
-	{ 0,	0,	printargs,		"SYS_5479"	}, /* 5479 */
-	{ 0,	0,	printargs,		"SYS_5480"	}, /* 5480 */
-	{ 0,	0,	printargs,		"SYS_5481"	}, /* 5481 */
-	{ 0,	0,	printargs,		"SYS_5482"	}, /* 5482 */
-	{ 0,	0,	printargs,		"SYS_5483"	}, /* 5483 */
-	{ 0,	0,	printargs,		"SYS_5484"	}, /* 5484 */
-	{ 0,	0,	printargs,		"SYS_5485"	}, /* 5485 */
-	{ 0,	0,	printargs,		"SYS_5486"	}, /* 5486 */
-	{ 0,	0,	printargs,		"SYS_5487"	}, /* 5487 */
-	{ 0,	0,	printargs,		"SYS_5488"	}, /* 5488 */
-	{ 0,	0,	printargs,		"SYS_5489"	}, /* 5489 */
-	{ 0,	0,	printargs,		"SYS_5490"	}, /* 5490 */
-	{ 0,	0,	printargs,		"SYS_5491"	}, /* 5491 */
-	{ 0,	0,	printargs,		"SYS_5492"	}, /* 5492 */
-	{ 0,	0,	printargs,		"SYS_5493"	}, /* 5493 */
-	{ 0,	0,	printargs,		"SYS_5494"	}, /* 5494 */
-	{ 0,	0,	printargs,		"SYS_5495"	}, /* 5495 */
-	{ 0,	0,	printargs,		"SYS_5496"	}, /* 5496 */
-	{ 0,	0,	printargs,		"SYS_5497"	}, /* 5497 */
-	{ 0,	0,	printargs,		"SYS_5498"	}, /* 5498 */
-	{ 0,	0,	printargs,		"SYS_5499"	}, /* 5499 */
-	{ 0,	0,	printargs,		"SYS_5500"	}, /* 5500 */
-	{ 0,	0,	printargs,		"SYS_5501"	}, /* 5501 */
-	{ 0,	0,	printargs,		"SYS_5502"	}, /* 5502 */
-	{ 0,	0,	printargs,		"SYS_5503"	}, /* 5503 */
-	{ 0,	0,	printargs,		"SYS_5504"	}, /* 5504 */
-	{ 0,	0,	printargs,		"SYS_5505"	}, /* 5505 */
-	{ 0,	0,	printargs,		"SYS_5506"	}, /* 5506 */
-	{ 0,	0,	printargs,		"SYS_5507"	}, /* 5507 */
-	{ 0,	0,	printargs,		"SYS_5508"	}, /* 5508 */
-	{ 0,	0,	printargs,		"SYS_5509"	}, /* 5509 */
-	{ 0,	0,	printargs,		"SYS_5510"	}, /* 5510 */
-	{ 0,	0,	printargs,		"SYS_5511"	}, /* 5511 */
-	{ 0,	0,	printargs,		"SYS_5512"	}, /* 5512 */
-	{ 0,	0,	printargs,		"SYS_5513"	}, /* 5513 */
-	{ 0,	0,	printargs,		"SYS_5514"	}, /* 5514 */
-	{ 0,	0,	printargs,		"SYS_5515"	}, /* 5515 */
-	{ 0,	0,	printargs,		"SYS_5516"	}, /* 5516 */
-	{ 0,	0,	printargs,		"SYS_5517"	}, /* 5517 */
-	{ 0,	0,	printargs,		"SYS_5518"	}, /* 5518 */
-	{ 0,	0,	printargs,		"SYS_5519"	}, /* 5519 */
-	{ 0,	0,	printargs,		"SYS_5520"	}, /* 5520 */
-	{ 0,	0,	printargs,		"SYS_5521"	}, /* 5521 */
-	{ 0,	0,	printargs,		"SYS_5522"	}, /* 5522 */
-	{ 0,	0,	printargs,		"SYS_5523"	}, /* 5523 */
-	{ 0,	0,	printargs,		"SYS_5524"	}, /* 5524 */
-	{ 0,	0,	printargs,		"SYS_5525"	}, /* 5525 */
-	{ 0,	0,	printargs,		"SYS_5526"	}, /* 5526 */
-	{ 0,	0,	printargs,		"SYS_5527"	}, /* 5527 */
-	{ 0,	0,	printargs,		"SYS_5528"	}, /* 5528 */
-	{ 0,	0,	printargs,		"SYS_5529"	}, /* 5529 */
-	{ 0,	0,	printargs,		"SYS_5530"	}, /* 5530 */
-	{ 0,	0,	printargs,		"SYS_5531"	}, /* 5531 */
-	{ 0,	0,	printargs,		"SYS_5532"	}, /* 5532 */
-	{ 0,	0,	printargs,		"SYS_5533"	}, /* 5533 */
-	{ 0,	0,	printargs,		"SYS_5534"	}, /* 5534 */
-	{ 0,	0,	printargs,		"SYS_5535"	}, /* 5535 */
-	{ 0,	0,	printargs,		"SYS_5536"	}, /* 5536 */
-	{ 0,	0,	printargs,		"SYS_5537"	}, /* 5537 */
-	{ 0,	0,	printargs,		"SYS_5538"	}, /* 5538 */
-	{ 0,	0,	printargs,		"SYS_5539"	}, /* 5539 */
-	{ 0,	0,	printargs,		"SYS_5540"	}, /* 5540 */
-	{ 0,	0,	printargs,		"SYS_5541"	}, /* 5541 */
-	{ 0,	0,	printargs,		"SYS_5542"	}, /* 5542 */
-	{ 0,	0,	printargs,		"SYS_5543"	}, /* 5543 */
-	{ 0,	0,	printargs,		"SYS_5544"	}, /* 5544 */
-	{ 0,	0,	printargs,		"SYS_5545"	}, /* 5545 */
-	{ 0,	0,	printargs,		"SYS_5546"	}, /* 5546 */
-	{ 0,	0,	printargs,		"SYS_5547"	}, /* 5547 */
-	{ 0,	0,	printargs,		"SYS_5548"	}, /* 5548 */
-	{ 0,	0,	printargs,		"SYS_5549"	}, /* 5549 */
-	{ 0,	0,	printargs,		"SYS_5550"	}, /* 5550 */
-	{ 0,	0,	printargs,		"SYS_5551"	}, /* 5551 */
-	{ 0,	0,	printargs,		"SYS_5552"	}, /* 5552 */
-	{ 0,	0,	printargs,		"SYS_5553"	}, /* 5553 */
-	{ 0,	0,	printargs,		"SYS_5554"	}, /* 5554 */
-	{ 0,	0,	printargs,		"SYS_5555"	}, /* 5555 */
-	{ 0,	0,	printargs,		"SYS_5556"	}, /* 5556 */
-	{ 0,	0,	printargs,		"SYS_5557"	}, /* 5557 */
-	{ 0,	0,	printargs,		"SYS_5558"	}, /* 5558 */
-	{ 0,	0,	printargs,		"SYS_5559"	}, /* 5559 */
-	{ 0,	0,	printargs,		"SYS_5560"	}, /* 5560 */
-	{ 0,	0,	printargs,		"SYS_5561"	}, /* 5561 */
-	{ 0,	0,	printargs,		"SYS_5562"	}, /* 5562 */
-	{ 0,	0,	printargs,		"SYS_5563"	}, /* 5563 */
-	{ 0,	0,	printargs,		"SYS_5564"	}, /* 5564 */
-	{ 0,	0,	printargs,		"SYS_5565"	}, /* 5565 */
-	{ 0,	0,	printargs,		"SYS_5566"	}, /* 5566 */
-	{ 0,	0,	printargs,		"SYS_5567"	}, /* 5567 */
-	{ 0,	0,	printargs,		"SYS_5568"	}, /* 5568 */
-	{ 0,	0,	printargs,		"SYS_5569"	}, /* 5569 */
-	{ 0,	0,	printargs,		"SYS_5570"	}, /* 5570 */
-	{ 0,	0,	printargs,		"SYS_5571"	}, /* 5571 */
-	{ 0,	0,	printargs,		"SYS_5572"	}, /* 5572 */
-	{ 0,	0,	printargs,		"SYS_5573"	}, /* 5573 */
-	{ 0,	0,	printargs,		"SYS_5574"	}, /* 5574 */
-	{ 0,	0,	printargs,		"SYS_5575"	}, /* 5575 */
-	{ 0,	0,	printargs,		"SYS_5576"	}, /* 5576 */
-	{ 0,	0,	printargs,		"SYS_5577"	}, /* 5577 */
-	{ 0,	0,	printargs,		"SYS_5578"	}, /* 5578 */
-	{ 0,	0,	printargs,		"SYS_5579"	}, /* 5579 */
-	{ 0,	0,	printargs,		"SYS_5580"	}, /* 5580 */
-	{ 0,	0,	printargs,		"SYS_5581"	}, /* 5581 */
-	{ 0,	0,	printargs,		"SYS_5582"	}, /* 5582 */
-	{ 0,	0,	printargs,		"SYS_5583"	}, /* 5583 */
-	{ 0,	0,	printargs,		"SYS_5584"	}, /* 5584 */
-	{ 0,	0,	printargs,		"SYS_5585"	}, /* 5585 */
-	{ 0,	0,	printargs,		"SYS_5586"	}, /* 5586 */
-	{ 0,	0,	printargs,		"SYS_5587"	}, /* 5587 */
-	{ 0,	0,	printargs,		"SYS_5588"	}, /* 5588 */
-	{ 0,	0,	printargs,		"SYS_5589"	}, /* 5589 */
-	{ 0,	0,	printargs,		"SYS_5590"	}, /* 5590 */
-	{ 0,	0,	printargs,		"SYS_5591"	}, /* 5591 */
-	{ 0,	0,	printargs,		"SYS_5592"	}, /* 5592 */
-	{ 0,	0,	printargs,		"SYS_5593"	}, /* 5593 */
-	{ 0,	0,	printargs,		"SYS_5594"	}, /* 5594 */
-	{ 0,	0,	printargs,		"SYS_5595"	}, /* 5595 */
-	{ 0,	0,	printargs,		"SYS_5596"	}, /* 5596 */
-	{ 0,	0,	printargs,		"SYS_5597"	}, /* 5597 */
-	{ 0,	0,	printargs,		"SYS_5598"	}, /* 5598 */
-	{ 0,	0,	printargs,		"SYS_5599"	}, /* 5599 */
-	{ 0,	0,	printargs,		"SYS_5600"	}, /* 5600 */
-	{ 0,	0,	printargs,		"SYS_5601"	}, /* 5601 */
-	{ 0,	0,	printargs,		"SYS_5602"	}, /* 5602 */
-	{ 0,	0,	printargs,		"SYS_5603"	}, /* 5603 */
-	{ 0,	0,	printargs,		"SYS_5604"	}, /* 5604 */
-	{ 0,	0,	printargs,		"SYS_5605"	}, /* 5605 */
-	{ 0,	0,	printargs,		"SYS_5606"	}, /* 5606 */
-	{ 0,	0,	printargs,		"SYS_5607"	}, /* 5607 */
-	{ 0,	0,	printargs,		"SYS_5608"	}, /* 5608 */
-	{ 0,	0,	printargs,		"SYS_5609"	}, /* 5609 */
-	{ 0,	0,	printargs,		"SYS_5610"	}, /* 5610 */
-	{ 0,	0,	printargs,		"SYS_5611"	}, /* 5611 */
-	{ 0,	0,	printargs,		"SYS_5612"	}, /* 5612 */
-	{ 0,	0,	printargs,		"SYS_5613"	}, /* 5613 */
-	{ 0,	0,	printargs,		"SYS_5614"	}, /* 5614 */
-	{ 0,	0,	printargs,		"SYS_5615"	}, /* 5615 */
-	{ 0,	0,	printargs,		"SYS_5616"	}, /* 5616 */
-	{ 0,	0,	printargs,		"SYS_5617"	}, /* 5617 */
-	{ 0,	0,	printargs,		"SYS_5618"	}, /* 5618 */
-	{ 0,	0,	printargs,		"SYS_5619"	}, /* 5619 */
-	{ 0,	0,	printargs,		"SYS_5620"	}, /* 5620 */
-	{ 0,	0,	printargs,		"SYS_5621"	}, /* 5621 */
-	{ 0,	0,	printargs,		"SYS_5622"	}, /* 5622 */
-	{ 0,	0,	printargs,		"SYS_5623"	}, /* 5623 */
-	{ 0,	0,	printargs,		"SYS_5624"	}, /* 5624 */
-	{ 0,	0,	printargs,		"SYS_5625"	}, /* 5625 */
-	{ 0,	0,	printargs,		"SYS_5626"	}, /* 5626 */
-	{ 0,	0,	printargs,		"SYS_5627"	}, /* 5627 */
-	{ 0,	0,	printargs,		"SYS_5628"	}, /* 5628 */
-	{ 0,	0,	printargs,		"SYS_5629"	}, /* 5629 */
-	{ 0,	0,	printargs,		"SYS_5630"	}, /* 5630 */
-	{ 0,	0,	printargs,		"SYS_5631"	}, /* 5631 */
-	{ 0,	0,	printargs,		"SYS_5632"	}, /* 5632 */
-	{ 0,	0,	printargs,		"SYS_5633"	}, /* 5633 */
-	{ 0,	0,	printargs,		"SYS_5634"	}, /* 5634 */
-	{ 0,	0,	printargs,		"SYS_5635"	}, /* 5635 */
-	{ 0,	0,	printargs,		"SYS_5636"	}, /* 5636 */
-	{ 0,	0,	printargs,		"SYS_5637"	}, /* 5637 */
-	{ 0,	0,	printargs,		"SYS_5638"	}, /* 5638 */
-	{ 0,	0,	printargs,		"SYS_5639"	}, /* 5639 */
-	{ 0,	0,	printargs,		"SYS_5640"	}, /* 5640 */
-	{ 0,	0,	printargs,		"SYS_5641"	}, /* 5641 */
-	{ 0,	0,	printargs,		"SYS_5642"	}, /* 5642 */
-	{ 0,	0,	printargs,		"SYS_5643"	}, /* 5643 */
-	{ 0,	0,	printargs,		"SYS_5644"	}, /* 5644 */
-	{ 0,	0,	printargs,		"SYS_5645"	}, /* 5645 */
-	{ 0,	0,	printargs,		"SYS_5646"	}, /* 5646 */
-	{ 0,	0,	printargs,		"SYS_5647"	}, /* 5647 */
-	{ 0,	0,	printargs,		"SYS_5648"	}, /* 5648 */
-	{ 0,	0,	printargs,		"SYS_5649"	}, /* 5649 */
-	{ 0,	0,	printargs,		"SYS_5650"	}, /* 5650 */
-	{ 0,	0,	printargs,		"SYS_5651"	}, /* 5651 */
-	{ 0,	0,	printargs,		"SYS_5652"	}, /* 5652 */
-	{ 0,	0,	printargs,		"SYS_5653"	}, /* 5653 */
-	{ 0,	0,	printargs,		"SYS_5654"	}, /* 5654 */
-	{ 0,	0,	printargs,		"SYS_5655"	}, /* 5655 */
-	{ 0,	0,	printargs,		"SYS_5656"	}, /* 5656 */
-	{ 0,	0,	printargs,		"SYS_5657"	}, /* 5657 */
-	{ 0,	0,	printargs,		"SYS_5658"	}, /* 5658 */
-	{ 0,	0,	printargs,		"SYS_5659"	}, /* 5659 */
-	{ 0,	0,	printargs,		"SYS_5660"	}, /* 5660 */
-	{ 0,	0,	printargs,		"SYS_5661"	}, /* 5661 */
-	{ 0,	0,	printargs,		"SYS_5662"	}, /* 5662 */
-	{ 0,	0,	printargs,		"SYS_5663"	}, /* 5663 */
-	{ 0,	0,	printargs,		"SYS_5664"	}, /* 5664 */
-	{ 0,	0,	printargs,		"SYS_5665"	}, /* 5665 */
-	{ 0,	0,	printargs,		"SYS_5666"	}, /* 5666 */
-	{ 0,	0,	printargs,		"SYS_5667"	}, /* 5667 */
-	{ 0,	0,	printargs,		"SYS_5668"	}, /* 5668 */
-	{ 0,	0,	printargs,		"SYS_5669"	}, /* 5669 */
-	{ 0,	0,	printargs,		"SYS_5670"	}, /* 5670 */
-	{ 0,	0,	printargs,		"SYS_5671"	}, /* 5671 */
-	{ 0,	0,	printargs,		"SYS_5672"	}, /* 5672 */
-	{ 0,	0,	printargs,		"SYS_5673"	}, /* 5673 */
-	{ 0,	0,	printargs,		"SYS_5674"	}, /* 5674 */
-	{ 0,	0,	printargs,		"SYS_5675"	}, /* 5675 */
-	{ 0,	0,	printargs,		"SYS_5676"	}, /* 5676 */
-	{ 0,	0,	printargs,		"SYS_5677"	}, /* 5677 */
-	{ 0,	0,	printargs,		"SYS_5678"	}, /* 5678 */
-	{ 0,	0,	printargs,		"SYS_5679"	}, /* 5679 */
-	{ 0,	0,	printargs,		"SYS_5680"	}, /* 5680 */
-	{ 0,	0,	printargs,		"SYS_5681"	}, /* 5681 */
-	{ 0,	0,	printargs,		"SYS_5682"	}, /* 5682 */
-	{ 0,	0,	printargs,		"SYS_5683"	}, /* 5683 */
-	{ 0,	0,	printargs,		"SYS_5684"	}, /* 5684 */
-	{ 0,	0,	printargs,		"SYS_5685"	}, /* 5685 */
-	{ 0,	0,	printargs,		"SYS_5686"	}, /* 5686 */
-	{ 0,	0,	printargs,		"SYS_5687"	}, /* 5687 */
-	{ 0,	0,	printargs,		"SYS_5688"	}, /* 5688 */
-	{ 0,	0,	printargs,		"SYS_5689"	}, /* 5689 */
-	{ 0,	0,	printargs,		"SYS_5690"	}, /* 5690 */
-	{ 0,	0,	printargs,		"SYS_5691"	}, /* 5691 */
-	{ 0,	0,	printargs,		"SYS_5692"	}, /* 5692 */
-	{ 0,	0,	printargs,		"SYS_5693"	}, /* 5693 */
-	{ 0,	0,	printargs,		"SYS_5694"	}, /* 5694 */
-	{ 0,	0,	printargs,		"SYS_5695"	}, /* 5695 */
-	{ 0,	0,	printargs,		"SYS_5696"	}, /* 5696 */
-	{ 0,	0,	printargs,		"SYS_5697"	}, /* 5697 */
-	{ 0,	0,	printargs,		"SYS_5698"	}, /* 5698 */
-	{ 0,	0,	printargs,		"SYS_5699"	}, /* 5699 */
-	{ 0,	0,	printargs,		"SYS_5700"	}, /* 5700 */
-	{ 0,	0,	printargs,		"SYS_5701"	}, /* 5701 */
-	{ 0,	0,	printargs,		"SYS_5702"	}, /* 5702 */
-	{ 0,	0,	printargs,		"SYS_5703"	}, /* 5703 */
-	{ 0,	0,	printargs,		"SYS_5704"	}, /* 5704 */
-	{ 0,	0,	printargs,		"SYS_5705"	}, /* 5705 */
-	{ 0,	0,	printargs,		"SYS_5706"	}, /* 5706 */
-	{ 0,	0,	printargs,		"SYS_5707"	}, /* 5707 */
-	{ 0,	0,	printargs,		"SYS_5708"	}, /* 5708 */
-	{ 0,	0,	printargs,		"SYS_5709"	}, /* 5709 */
-	{ 0,	0,	printargs,		"SYS_5710"	}, /* 5710 */
-	{ 0,	0,	printargs,		"SYS_5711"	}, /* 5711 */
-	{ 0,	0,	printargs,		"SYS_5712"	}, /* 5712 */
-	{ 0,	0,	printargs,		"SYS_5713"	}, /* 5713 */
-	{ 0,	0,	printargs,		"SYS_5714"	}, /* 5714 */
-	{ 0,	0,	printargs,		"SYS_5715"	}, /* 5715 */
-	{ 0,	0,	printargs,		"SYS_5716"	}, /* 5716 */
-	{ 0,	0,	printargs,		"SYS_5717"	}, /* 5717 */
-	{ 0,	0,	printargs,		"SYS_5718"	}, /* 5718 */
-	{ 0,	0,	printargs,		"SYS_5719"	}, /* 5719 */
-	{ 0,	0,	printargs,		"SYS_5720"	}, /* 5720 */
-	{ 0,	0,	printargs,		"SYS_5721"	}, /* 5721 */
-	{ 0,	0,	printargs,		"SYS_5722"	}, /* 5722 */
-	{ 0,	0,	printargs,		"SYS_5723"	}, /* 5723 */
-	{ 0,	0,	printargs,		"SYS_5724"	}, /* 5724 */
-	{ 0,	0,	printargs,		"SYS_5725"	}, /* 5725 */
-	{ 0,	0,	printargs,		"SYS_5726"	}, /* 5726 */
-	{ 0,	0,	printargs,		"SYS_5727"	}, /* 5727 */
-	{ 0,	0,	printargs,		"SYS_5728"	}, /* 5728 */
-	{ 0,	0,	printargs,		"SYS_5729"	}, /* 5729 */
-	{ 0,	0,	printargs,		"SYS_5730"	}, /* 5730 */
-	{ 0,	0,	printargs,		"SYS_5731"	}, /* 5731 */
-	{ 0,	0,	printargs,		"SYS_5732"	}, /* 5732 */
-	{ 0,	0,	printargs,		"SYS_5733"	}, /* 5733 */
-	{ 0,	0,	printargs,		"SYS_5734"	}, /* 5734 */
-	{ 0,	0,	printargs,		"SYS_5735"	}, /* 5735 */
-	{ 0,	0,	printargs,		"SYS_5736"	}, /* 5736 */
-	{ 0,	0,	printargs,		"SYS_5737"	}, /* 5737 */
-	{ 0,	0,	printargs,		"SYS_5738"	}, /* 5738 */
-	{ 0,	0,	printargs,		"SYS_5739"	}, /* 5739 */
-	{ 0,	0,	printargs,		"SYS_5740"	}, /* 5740 */
-	{ 0,	0,	printargs,		"SYS_5741"	}, /* 5741 */
-	{ 0,	0,	printargs,		"SYS_5742"	}, /* 5742 */
-	{ 0,	0,	printargs,		"SYS_5743"	}, /* 5743 */
-	{ 0,	0,	printargs,		"SYS_5744"	}, /* 5744 */
-	{ 0,	0,	printargs,		"SYS_5745"	}, /* 5745 */
-	{ 0,	0,	printargs,		"SYS_5746"	}, /* 5746 */
-	{ 0,	0,	printargs,		"SYS_5747"	}, /* 5747 */
-	{ 0,	0,	printargs,		"SYS_5748"	}, /* 5748 */
-	{ 0,	0,	printargs,		"SYS_5749"	}, /* 5749 */
-	{ 0,	0,	printargs,		"SYS_5750"	}, /* 5750 */
-	{ 0,	0,	printargs,		"SYS_5751"	}, /* 5751 */
-	{ 0,	0,	printargs,		"SYS_5752"	}, /* 5752 */
-	{ 0,	0,	printargs,		"SYS_5753"	}, /* 5753 */
-	{ 0,	0,	printargs,		"SYS_5754"	}, /* 5754 */
-	{ 0,	0,	printargs,		"SYS_5755"	}, /* 5755 */
-	{ 0,	0,	printargs,		"SYS_5756"	}, /* 5756 */
-	{ 0,	0,	printargs,		"SYS_5757"	}, /* 5757 */
-	{ 0,	0,	printargs,		"SYS_5758"	}, /* 5758 */
-	{ 0,	0,	printargs,		"SYS_5759"	}, /* 5759 */
-	{ 0,	0,	printargs,		"SYS_5760"	}, /* 5760 */
-	{ 0,	0,	printargs,		"SYS_5761"	}, /* 5761 */
-	{ 0,	0,	printargs,		"SYS_5762"	}, /* 5762 */
-	{ 0,	0,	printargs,		"SYS_5763"	}, /* 5763 */
-	{ 0,	0,	printargs,		"SYS_5764"	}, /* 5764 */
-	{ 0,	0,	printargs,		"SYS_5765"	}, /* 5765 */
-	{ 0,	0,	printargs,		"SYS_5766"	}, /* 5766 */
-	{ 0,	0,	printargs,		"SYS_5767"	}, /* 5767 */
-	{ 0,	0,	printargs,		"SYS_5768"	}, /* 5768 */
-	{ 0,	0,	printargs,		"SYS_5769"	}, /* 5769 */
-	{ 0,	0,	printargs,		"SYS_5770"	}, /* 5770 */
-	{ 0,	0,	printargs,		"SYS_5771"	}, /* 5771 */
-	{ 0,	0,	printargs,		"SYS_5772"	}, /* 5772 */
-	{ 0,	0,	printargs,		"SYS_5773"	}, /* 5773 */
-	{ 0,	0,	printargs,		"SYS_5774"	}, /* 5774 */
-	{ 0,	0,	printargs,		"SYS_5775"	}, /* 5775 */
-	{ 0,	0,	printargs,		"SYS_5776"	}, /* 5776 */
-	{ 0,	0,	printargs,		"SYS_5777"	}, /* 5777 */
-	{ 0,	0,	printargs,		"SYS_5778"	}, /* 5778 */
-	{ 0,	0,	printargs,		"SYS_5779"	}, /* 5779 */
-	{ 0,	0,	printargs,		"SYS_5780"	}, /* 5780 */
-	{ 0,	0,	printargs,		"SYS_5781"	}, /* 5781 */
-	{ 0,	0,	printargs,		"SYS_5782"	}, /* 5782 */
-	{ 0,	0,	printargs,		"SYS_5783"	}, /* 5783 */
-	{ 0,	0,	printargs,		"SYS_5784"	}, /* 5784 */
-	{ 0,	0,	printargs,		"SYS_5785"	}, /* 5785 */
-	{ 0,	0,	printargs,		"SYS_5786"	}, /* 5786 */
-	{ 0,	0,	printargs,		"SYS_5787"	}, /* 5787 */
-	{ 0,	0,	printargs,		"SYS_5788"	}, /* 5788 */
-	{ 0,	0,	printargs,		"SYS_5789"	}, /* 5789 */
-	{ 0,	0,	printargs,		"SYS_5790"	}, /* 5790 */
-	{ 0,	0,	printargs,		"SYS_5791"	}, /* 5791 */
-	{ 0,	0,	printargs,		"SYS_5792"	}, /* 5792 */
-	{ 0,	0,	printargs,		"SYS_5793"	}, /* 5793 */
-	{ 0,	0,	printargs,		"SYS_5794"	}, /* 5794 */
-	{ 0,	0,	printargs,		"SYS_5795"	}, /* 5795 */
-	{ 0,	0,	printargs,		"SYS_5796"	}, /* 5796 */
-	{ 0,	0,	printargs,		"SYS_5797"	}, /* 5797 */
-	{ 0,	0,	printargs,		"SYS_5798"	}, /* 5798 */
-	{ 0,	0,	printargs,		"SYS_5799"	}, /* 5799 */
-	{ 0,	0,	printargs,		"SYS_5800"	}, /* 5800 */
-	{ 0,	0,	printargs,		"SYS_5801"	}, /* 5801 */
-	{ 0,	0,	printargs,		"SYS_5802"	}, /* 5802 */
-	{ 0,	0,	printargs,		"SYS_5803"	}, /* 5803 */
-	{ 0,	0,	printargs,		"SYS_5804"	}, /* 5804 */
-	{ 0,	0,	printargs,		"SYS_5805"	}, /* 5805 */
-	{ 0,	0,	printargs,		"SYS_5806"	}, /* 5806 */
-	{ 0,	0,	printargs,		"SYS_5807"	}, /* 5807 */
-	{ 0,	0,	printargs,		"SYS_5808"	}, /* 5808 */
-	{ 0,	0,	printargs,		"SYS_5809"	}, /* 5809 */
-	{ 0,	0,	printargs,		"SYS_5810"	}, /* 5810 */
-	{ 0,	0,	printargs,		"SYS_5811"	}, /* 5811 */
-	{ 0,	0,	printargs,		"SYS_5812"	}, /* 5812 */
-	{ 0,	0,	printargs,		"SYS_5813"	}, /* 5813 */
-	{ 0,	0,	printargs,		"SYS_5814"	}, /* 5814 */
-	{ 0,	0,	printargs,		"SYS_5815"	}, /* 5815 */
-	{ 0,	0,	printargs,		"SYS_5816"	}, /* 5816 */
-	{ 0,	0,	printargs,		"SYS_5817"	}, /* 5817 */
-	{ 0,	0,	printargs,		"SYS_5818"	}, /* 5818 */
-	{ 0,	0,	printargs,		"SYS_5819"	}, /* 5819 */
-	{ 0,	0,	printargs,		"SYS_5820"	}, /* 5820 */
-	{ 0,	0,	printargs,		"SYS_5821"	}, /* 5821 */
-	{ 0,	0,	printargs,		"SYS_5822"	}, /* 5822 */
-	{ 0,	0,	printargs,		"SYS_5823"	}, /* 5823 */
-	{ 0,	0,	printargs,		"SYS_5824"	}, /* 5824 */
-	{ 0,	0,	printargs,		"SYS_5825"	}, /* 5825 */
-	{ 0,	0,	printargs,		"SYS_5826"	}, /* 5826 */
-	{ 0,	0,	printargs,		"SYS_5827"	}, /* 5827 */
-	{ 0,	0,	printargs,		"SYS_5828"	}, /* 5828 */
-	{ 0,	0,	printargs,		"SYS_5829"	}, /* 5829 */
-	{ 0,	0,	printargs,		"SYS_5830"	}, /* 5830 */
-	{ 0,	0,	printargs,		"SYS_5831"	}, /* 5831 */
-	{ 0,	0,	printargs,		"SYS_5832"	}, /* 5832 */
-	{ 0,	0,	printargs,		"SYS_5833"	}, /* 5833 */
-	{ 0,	0,	printargs,		"SYS_5834"	}, /* 5834 */
-	{ 0,	0,	printargs,		"SYS_5835"	}, /* 5835 */
-	{ 0,	0,	printargs,		"SYS_5836"	}, /* 5836 */
-	{ 0,	0,	printargs,		"SYS_5837"	}, /* 5837 */
-	{ 0,	0,	printargs,		"SYS_5838"	}, /* 5838 */
-	{ 0,	0,	printargs,		"SYS_5839"	}, /* 5839 */
-	{ 0,	0,	printargs,		"SYS_5840"	}, /* 5840 */
-	{ 0,	0,	printargs,		"SYS_5841"	}, /* 5841 */
-	{ 0,	0,	printargs,		"SYS_5842"	}, /* 5842 */
-	{ 0,	0,	printargs,		"SYS_5843"	}, /* 5843 */
-	{ 0,	0,	printargs,		"SYS_5844"	}, /* 5844 */
-	{ 0,	0,	printargs,		"SYS_5845"	}, /* 5845 */
-	{ 0,	0,	printargs,		"SYS_5846"	}, /* 5846 */
-	{ 0,	0,	printargs,		"SYS_5847"	}, /* 5847 */
-	{ 0,	0,	printargs,		"SYS_5848"	}, /* 5848 */
-	{ 0,	0,	printargs,		"SYS_5849"	}, /* 5849 */
-	{ 0,	0,	printargs,		"SYS_5850"	}, /* 5850 */
-	{ 0,	0,	printargs,		"SYS_5851"	}, /* 5851 */
-	{ 0,	0,	printargs,		"SYS_5852"	}, /* 5852 */
-	{ 0,	0,	printargs,		"SYS_5853"	}, /* 5853 */
-	{ 0,	0,	printargs,		"SYS_5854"	}, /* 5854 */
-	{ 0,	0,	printargs,		"SYS_5855"	}, /* 5855 */
-	{ 0,	0,	printargs,		"SYS_5856"	}, /* 5856 */
-	{ 0,	0,	printargs,		"SYS_5857"	}, /* 5857 */
-	{ 0,	0,	printargs,		"SYS_5858"	}, /* 5858 */
-	{ 0,	0,	printargs,		"SYS_5859"	}, /* 5859 */
-	{ 0,	0,	printargs,		"SYS_5860"	}, /* 5860 */
-	{ 0,	0,	printargs,		"SYS_5861"	}, /* 5861 */
-	{ 0,	0,	printargs,		"SYS_5862"	}, /* 5862 */
-	{ 0,	0,	printargs,		"SYS_5863"	}, /* 5863 */
-	{ 0,	0,	printargs,		"SYS_5864"	}, /* 5864 */
-	{ 0,	0,	printargs,		"SYS_5865"	}, /* 5865 */
-	{ 0,	0,	printargs,		"SYS_5866"	}, /* 5866 */
-	{ 0,	0,	printargs,		"SYS_5867"	}, /* 5867 */
-	{ 0,	0,	printargs,		"SYS_5868"	}, /* 5868 */
-	{ 0,	0,	printargs,		"SYS_5869"	}, /* 5869 */
-	{ 0,	0,	printargs,		"SYS_5870"	}, /* 5870 */
-	{ 0,	0,	printargs,		"SYS_5871"	}, /* 5871 */
-	{ 0,	0,	printargs,		"SYS_5872"	}, /* 5872 */
-	{ 0,	0,	printargs,		"SYS_5873"	}, /* 5873 */
-	{ 0,	0,	printargs,		"SYS_5874"	}, /* 5874 */
-	{ 0,	0,	printargs,		"SYS_5875"	}, /* 5875 */
-	{ 0,	0,	printargs,		"SYS_5876"	}, /* 5876 */
-	{ 0,	0,	printargs,		"SYS_5877"	}, /* 5877 */
-	{ 0,	0,	printargs,		"SYS_5878"	}, /* 5878 */
-	{ 0,	0,	printargs,		"SYS_5879"	}, /* 5879 */
-	{ 0,	0,	printargs,		"SYS_5880"	}, /* 5880 */
-	{ 0,	0,	printargs,		"SYS_5881"	}, /* 5881 */
-	{ 0,	0,	printargs,		"SYS_5882"	}, /* 5882 */
-	{ 0,	0,	printargs,		"SYS_5883"	}, /* 5883 */
-	{ 0,	0,	printargs,		"SYS_5884"	}, /* 5884 */
-	{ 0,	0,	printargs,		"SYS_5885"	}, /* 5885 */
-	{ 0,	0,	printargs,		"SYS_5886"	}, /* 5886 */
-	{ 0,	0,	printargs,		"SYS_5887"	}, /* 5887 */
-	{ 0,	0,	printargs,		"SYS_5888"	}, /* 5888 */
-	{ 0,	0,	printargs,		"SYS_5889"	}, /* 5889 */
-	{ 0,	0,	printargs,		"SYS_5890"	}, /* 5890 */
-	{ 0,	0,	printargs,		"SYS_5891"	}, /* 5891 */
-	{ 0,	0,	printargs,		"SYS_5892"	}, /* 5892 */
-	{ 0,	0,	printargs,		"SYS_5893"	}, /* 5893 */
-	{ 0,	0,	printargs,		"SYS_5894"	}, /* 5894 */
-	{ 0,	0,	printargs,		"SYS_5895"	}, /* 5895 */
-	{ 0,	0,	printargs,		"SYS_5896"	}, /* 5896 */
-	{ 0,	0,	printargs,		"SYS_5897"	}, /* 5897 */
-	{ 0,	0,	printargs,		"SYS_5898"	}, /* 5898 */
-	{ 0,	0,	printargs,		"SYS_5899"	}, /* 5899 */
-	{ 0,	0,	printargs,		"SYS_5900"	}, /* 5900 */
-	{ 0,	0,	printargs,		"SYS_5901"	}, /* 5901 */
-	{ 0,	0,	printargs,		"SYS_5902"	}, /* 5902 */
-	{ 0,	0,	printargs,		"SYS_5903"	}, /* 5903 */
-	{ 0,	0,	printargs,		"SYS_5904"	}, /* 5904 */
-	{ 0,	0,	printargs,		"SYS_5905"	}, /* 5905 */
-	{ 0,	0,	printargs,		"SYS_5906"	}, /* 5906 */
-	{ 0,	0,	printargs,		"SYS_5907"	}, /* 5907 */
-	{ 0,	0,	printargs,		"SYS_5908"	}, /* 5908 */
-	{ 0,	0,	printargs,		"SYS_5909"	}, /* 5909 */
-	{ 0,	0,	printargs,		"SYS_5910"	}, /* 5910 */
-	{ 0,	0,	printargs,		"SYS_5911"	}, /* 5911 */
-	{ 0,	0,	printargs,		"SYS_5912"	}, /* 5912 */
-	{ 0,	0,	printargs,		"SYS_5913"	}, /* 5913 */
-	{ 0,	0,	printargs,		"SYS_5914"	}, /* 5914 */
-	{ 0,	0,	printargs,		"SYS_5915"	}, /* 5915 */
-	{ 0,	0,	printargs,		"SYS_5916"	}, /* 5916 */
-	{ 0,	0,	printargs,		"SYS_5917"	}, /* 5917 */
-	{ 0,	0,	printargs,		"SYS_5918"	}, /* 5918 */
-	{ 0,	0,	printargs,		"SYS_5919"	}, /* 5919 */
-	{ 0,	0,	printargs,		"SYS_5920"	}, /* 5920 */
-	{ 0,	0,	printargs,		"SYS_5921"	}, /* 5921 */
-	{ 0,	0,	printargs,		"SYS_5922"	}, /* 5922 */
-	{ 0,	0,	printargs,		"SYS_5923"	}, /* 5923 */
-	{ 0,	0,	printargs,		"SYS_5924"	}, /* 5924 */
-	{ 0,	0,	printargs,		"SYS_5925"	}, /* 5925 */
-	{ 0,	0,	printargs,		"SYS_5926"	}, /* 5926 */
-	{ 0,	0,	printargs,		"SYS_5927"	}, /* 5927 */
-	{ 0,	0,	printargs,		"SYS_5928"	}, /* 5928 */
-	{ 0,	0,	printargs,		"SYS_5929"	}, /* 5929 */
-	{ 0,	0,	printargs,		"SYS_5930"	}, /* 5930 */
-	{ 0,	0,	printargs,		"SYS_5931"	}, /* 5931 */
-	{ 0,	0,	printargs,		"SYS_5932"	}, /* 5932 */
-	{ 0,	0,	printargs,		"SYS_5933"	}, /* 5933 */
-	{ 0,	0,	printargs,		"SYS_5934"	}, /* 5934 */
-	{ 0,	0,	printargs,		"SYS_5935"	}, /* 5935 */
-	{ 0,	0,	printargs,		"SYS_5936"	}, /* 5936 */
-	{ 0,	0,	printargs,		"SYS_5937"	}, /* 5937 */
-	{ 0,	0,	printargs,		"SYS_5938"	}, /* 5938 */
-	{ 0,	0,	printargs,		"SYS_5939"	}, /* 5939 */
-	{ 0,	0,	printargs,		"SYS_5940"	}, /* 5940 */
-	{ 0,	0,	printargs,		"SYS_5941"	}, /* 5941 */
-	{ 0,	0,	printargs,		"SYS_5942"	}, /* 5942 */
-	{ 0,	0,	printargs,		"SYS_5943"	}, /* 5943 */
-	{ 0,	0,	printargs,		"SYS_5944"	}, /* 5944 */
-	{ 0,	0,	printargs,		"SYS_5945"	}, /* 5945 */
-	{ 0,	0,	printargs,		"SYS_5946"	}, /* 5946 */
-	{ 0,	0,	printargs,		"SYS_5947"	}, /* 5947 */
-	{ 0,	0,	printargs,		"SYS_5948"	}, /* 5948 */
-	{ 0,	0,	printargs,		"SYS_5949"	}, /* 5949 */
-	{ 0,	0,	printargs,		"SYS_5950"	}, /* 5950 */
-	{ 0,	0,	printargs,		"SYS_5951"	}, /* 5951 */
-	{ 0,	0,	printargs,		"SYS_5952"	}, /* 5952 */
-	{ 0,	0,	printargs,		"SYS_5953"	}, /* 5953 */
-	{ 0,	0,	printargs,		"SYS_5954"	}, /* 5954 */
-	{ 0,	0,	printargs,		"SYS_5955"	}, /* 5955 */
-	{ 0,	0,	printargs,		"SYS_5956"	}, /* 5956 */
-	{ 0,	0,	printargs,		"SYS_5957"	}, /* 5957 */
-	{ 0,	0,	printargs,		"SYS_5958"	}, /* 5958 */
-	{ 0,	0,	printargs,		"SYS_5959"	}, /* 5959 */
-	{ 0,	0,	printargs,		"SYS_5960"	}, /* 5960 */
-	{ 0,	0,	printargs,		"SYS_5961"	}, /* 5961 */
-	{ 0,	0,	printargs,		"SYS_5962"	}, /* 5962 */
-	{ 0,	0,	printargs,		"SYS_5963"	}, /* 5963 */
-	{ 0,	0,	printargs,		"SYS_5964"	}, /* 5964 */
-	{ 0,	0,	printargs,		"SYS_5965"	}, /* 5965 */
-	{ 0,	0,	printargs,		"SYS_5966"	}, /* 5966 */
-	{ 0,	0,	printargs,		"SYS_5967"	}, /* 5967 */
-	{ 0,	0,	printargs,		"SYS_5968"	}, /* 5968 */
-	{ 0,	0,	printargs,		"SYS_5969"	}, /* 5969 */
-	{ 0,	0,	printargs,		"SYS_5970"	}, /* 5970 */
-	{ 0,	0,	printargs,		"SYS_5971"	}, /* 5971 */
-	{ 0,	0,	printargs,		"SYS_5972"	}, /* 5972 */
-	{ 0,	0,	printargs,		"SYS_5973"	}, /* 5973 */
-	{ 0,	0,	printargs,		"SYS_5974"	}, /* 5974 */
-	{ 0,	0,	printargs,		"SYS_5975"	}, /* 5975 */
-	{ 0,	0,	printargs,		"SYS_5976"	}, /* 5976 */
-	{ 0,	0,	printargs,		"SYS_5977"	}, /* 5977 */
-	{ 0,	0,	printargs,		"SYS_5978"	}, /* 5978 */
-	{ 0,	0,	printargs,		"SYS_5979"	}, /* 5979 */
-	{ 0,	0,	printargs,		"SYS_5980"	}, /* 5980 */
-	{ 0,	0,	printargs,		"SYS_5981"	}, /* 5981 */
-	{ 0,	0,	printargs,		"SYS_5982"	}, /* 5982 */
-	{ 0,	0,	printargs,		"SYS_5983"	}, /* 5983 */
-	{ 0,	0,	printargs,		"SYS_5984"	}, /* 5984 */
-	{ 0,	0,	printargs,		"SYS_5985"	}, /* 5985 */
-	{ 0,	0,	printargs,		"SYS_5986"	}, /* 5986 */
-	{ 0,	0,	printargs,		"SYS_5987"	}, /* 5987 */
-	{ 0,	0,	printargs,		"SYS_5988"	}, /* 5988 */
-	{ 0,	0,	printargs,		"SYS_5989"	}, /* 5989 */
-	{ 0,	0,	printargs,		"SYS_5990"	}, /* 5990 */
-	{ 0,	0,	printargs,		"SYS_5991"	}, /* 5991 */
-	{ 0,	0,	printargs,		"SYS_5992"	}, /* 5992 */
-	{ 0,	0,	printargs,		"SYS_5993"	}, /* 5993 */
-	{ 0,	0,	printargs,		"SYS_5994"	}, /* 5994 */
-	{ 0,	0,	printargs,		"SYS_5995"	}, /* 5995 */
-	{ 0,	0,	printargs,		"SYS_5996"	}, /* 5996 */
-	{ 0,	0,	printargs,		"SYS_5997"	}, /* 5997 */
-	{ 0,	0,	printargs,		"SYS_5998"	}, /* 5998 */
-	{ 0,	0,	printargs,		"SYS_5999"	}, /* 5999 */ /* end of Linux N64 */
+	{ 0,	0,	NULL,			NULL		}, /* 5306 */
+	{ 0,	0,	NULL,			NULL		}, /* 5307 */
+	{ 0,	0,	NULL,			NULL		}, /* 5308 */
+	{ 0,	0,	NULL,			NULL		}, /* 5309 */
+	{ 0,	0,	NULL,			NULL		}, /* 5310 */
+	{ 0,	0,	NULL,			NULL		}, /* 5311 */
+	{ 0,	0,	NULL,			NULL		}, /* 5312 */
+	{ 0,	0,	NULL,			NULL		}, /* 5313 */
+	{ 0,	0,	NULL,			NULL		}, /* 5314 */
+	{ 0,	0,	NULL,			NULL		}, /* 5315 */
+	{ 0,	0,	NULL,			NULL		}, /* 5316 */
+	{ 0,	0,	NULL,			NULL		}, /* 5317 */
+	{ 0,	0,	NULL,			NULL		}, /* 5318 */
+	{ 0,	0,	NULL,			NULL		}, /* 5319 */
+	{ 0,	0,	NULL,			NULL		}, /* 5320 */
+	{ 0,	0,	NULL,			NULL		}, /* 5321 */
+	{ 0,	0,	NULL,			NULL		}, /* 5322 */
+	{ 0,	0,	NULL,			NULL		}, /* 5323 */
+	{ 0,	0,	NULL,			NULL		}, /* 5324 */
+	{ 0,	0,	NULL,			NULL		}, /* 5325 */
+	{ 0,	0,	NULL,			NULL		}, /* 5326 */
+	{ 0,	0,	NULL,			NULL		}, /* 5327 */
+	{ 0,	0,	NULL,			NULL		}, /* 5328 */
+	{ 0,	0,	NULL,			NULL		}, /* 5329 */
+	{ 0,	0,	NULL,			NULL		}, /* 5330 */
+	{ 0,	0,	NULL,			NULL		}, /* 5331 */
+	{ 0,	0,	NULL,			NULL		}, /* 5332 */
+	{ 0,	0,	NULL,			NULL		}, /* 5333 */
+	{ 0,	0,	NULL,			NULL		}, /* 5334 */
+	{ 0,	0,	NULL,			NULL		}, /* 5335 */
+	{ 0,	0,	NULL,			NULL		}, /* 5336 */
+	{ 0,	0,	NULL,			NULL		}, /* 5337 */
+	{ 0,	0,	NULL,			NULL		}, /* 5338 */
+	{ 0,	0,	NULL,			NULL		}, /* 5339 */
+	{ 0,	0,	NULL,			NULL		}, /* 5340 */
+	{ 0,	0,	NULL,			NULL		}, /* 5341 */
+	{ 0,	0,	NULL,			NULL		}, /* 5342 */
+	{ 0,	0,	NULL,			NULL		}, /* 5343 */
+	{ 0,	0,	NULL,			NULL		}, /* 5344 */
+	{ 0,	0,	NULL,			NULL		}, /* 5345 */
+	{ 0,	0,	NULL,			NULL		}, /* 5346 */
+	{ 0,	0,	NULL,			NULL		}, /* 5347 */
+	{ 0,	0,	NULL,			NULL		}, /* 5348 */
+	{ 0,	0,	NULL,			NULL		}, /* 5349 */
+	{ 0,	0,	NULL,			NULL		}, /* 5350 */
+	{ 0,	0,	NULL,			NULL		}, /* 5351 */
+	{ 0,	0,	NULL,			NULL		}, /* 5352 */
+	{ 0,	0,	NULL,			NULL		}, /* 5353 */
+	{ 0,	0,	NULL,			NULL		}, /* 5354 */
+	{ 0,	0,	NULL,			NULL		}, /* 5355 */
+	{ 0,	0,	NULL,			NULL		}, /* 5356 */
+	{ 0,	0,	NULL,			NULL		}, /* 5357 */
+	{ 0,	0,	NULL,			NULL		}, /* 5358 */
+	{ 0,	0,	NULL,			NULL		}, /* 5359 */
+	{ 0,	0,	NULL,			NULL		}, /* 5360 */
+	{ 0,	0,	NULL,			NULL		}, /* 5361 */
+	{ 0,	0,	NULL,			NULL		}, /* 5362 */
+	{ 0,	0,	NULL,			NULL		}, /* 5363 */
+	{ 0,	0,	NULL,			NULL		}, /* 5364 */
+	{ 0,	0,	NULL,			NULL		}, /* 5365 */
+	{ 0,	0,	NULL,			NULL		}, /* 5366 */
+	{ 0,	0,	NULL,			NULL		}, /* 5367 */
+	{ 0,	0,	NULL,			NULL		}, /* 5368 */
+	{ 0,	0,	NULL,			NULL		}, /* 5369 */
+	{ 0,	0,	NULL,			NULL		}, /* 5370 */
+	{ 0,	0,	NULL,			NULL		}, /* 5371 */
+	{ 0,	0,	NULL,			NULL		}, /* 5372 */
+	{ 0,	0,	NULL,			NULL		}, /* 5373 */
+	{ 0,	0,	NULL,			NULL		}, /* 5374 */
+	{ 0,	0,	NULL,			NULL		}, /* 5375 */
+	{ 0,	0,	NULL,			NULL		}, /* 5376 */
+	{ 0,	0,	NULL,			NULL		}, /* 5377 */
+	{ 0,	0,	NULL,			NULL		}, /* 5378 */
+	{ 0,	0,	NULL,			NULL		}, /* 5379 */
+	{ 0,	0,	NULL,			NULL		}, /* 5380 */
+	{ 0,	0,	NULL,			NULL		}, /* 5381 */
+	{ 0,	0,	NULL,			NULL		}, /* 5382 */
+	{ 0,	0,	NULL,			NULL		}, /* 5383 */
+	{ 0,	0,	NULL,			NULL		}, /* 5384 */
+	{ 0,	0,	NULL,			NULL		}, /* 5385 */
+	{ 0,	0,	NULL,			NULL		}, /* 5386 */
+	{ 0,	0,	NULL,			NULL		}, /* 5387 */
+	{ 0,	0,	NULL,			NULL		}, /* 5388 */
+	{ 0,	0,	NULL,			NULL		}, /* 5389 */
+	{ 0,	0,	NULL,			NULL		}, /* 5390 */
+	{ 0,	0,	NULL,			NULL		}, /* 5391 */
+	{ 0,	0,	NULL,			NULL		}, /* 5392 */
+	{ 0,	0,	NULL,			NULL		}, /* 5393 */
+	{ 0,	0,	NULL,			NULL		}, /* 5394 */
+	{ 0,	0,	NULL,			NULL		}, /* 5395 */
+	{ 0,	0,	NULL,			NULL		}, /* 5396 */
+	{ 0,	0,	NULL,			NULL		}, /* 5397 */
+	{ 0,	0,	NULL,			NULL		}, /* 5398 */
+	{ 0,	0,	NULL,			NULL		}, /* 5399 */
+	{ 0,	0,	NULL,			NULL		}, /* 5400 */
+	{ 0,	0,	NULL,			NULL		}, /* 5401 */
+	{ 0,	0,	NULL,			NULL		}, /* 5402 */
+	{ 0,	0,	NULL,			NULL		}, /* 5403 */
+	{ 0,	0,	NULL,			NULL		}, /* 5404 */
+	{ 0,	0,	NULL,			NULL		}, /* 5405 */
+	{ 0,	0,	NULL,			NULL		}, /* 5406 */
+	{ 0,	0,	NULL,			NULL		}, /* 5407 */
+	{ 0,	0,	NULL,			NULL		}, /* 5408 */
+	{ 0,	0,	NULL,			NULL		}, /* 5409 */
+	{ 0,	0,	NULL,			NULL		}, /* 5410 */
+	{ 0,	0,	NULL,			NULL		}, /* 5411 */
+	{ 0,	0,	NULL,			NULL		}, /* 5412 */
+	{ 0,	0,	NULL,			NULL		}, /* 5413 */
+	{ 0,	0,	NULL,			NULL		}, /* 5414 */
+	{ 0,	0,	NULL,			NULL		}, /* 5415 */
+	{ 0,	0,	NULL,			NULL		}, /* 5416 */
+	{ 0,	0,	NULL,			NULL		}, /* 5417 */
+	{ 0,	0,	NULL,			NULL		}, /* 5418 */
+	{ 0,	0,	NULL,			NULL		}, /* 5419 */
+	{ 0,	0,	NULL,			NULL		}, /* 5420 */
+	{ 0,	0,	NULL,			NULL		}, /* 5421 */
+	{ 0,	0,	NULL,			NULL		}, /* 5422 */
+	{ 0,	0,	NULL,			NULL		}, /* 5423 */
+	{ 0,	0,	NULL,			NULL		}, /* 5424 */
+	{ 0,	0,	NULL,			NULL		}, /* 5425 */
+	{ 0,	0,	NULL,			NULL		}, /* 5426 */
+	{ 0,	0,	NULL,			NULL		}, /* 5427 */
+	{ 0,	0,	NULL,			NULL		}, /* 5428 */
+	{ 0,	0,	NULL,			NULL		}, /* 5429 */
+	{ 0,	0,	NULL,			NULL		}, /* 5430 */
+	{ 0,	0,	NULL,			NULL		}, /* 5431 */
+	{ 0,	0,	NULL,			NULL		}, /* 5432 */
+	{ 0,	0,	NULL,			NULL		}, /* 5433 */
+	{ 0,	0,	NULL,			NULL		}, /* 5434 */
+	{ 0,	0,	NULL,			NULL		}, /* 5435 */
+	{ 0,	0,	NULL,			NULL		}, /* 5436 */
+	{ 0,	0,	NULL,			NULL		}, /* 5437 */
+	{ 0,	0,	NULL,			NULL		}, /* 5438 */
+	{ 0,	0,	NULL,			NULL		}, /* 5439 */
+	{ 0,	0,	NULL,			NULL		}, /* 5440 */
+	{ 0,	0,	NULL,			NULL		}, /* 5441 */
+	{ 0,	0,	NULL,			NULL		}, /* 5442 */
+	{ 0,	0,	NULL,			NULL		}, /* 5443 */
+	{ 0,	0,	NULL,			NULL		}, /* 5444 */
+	{ 0,	0,	NULL,			NULL		}, /* 5445 */
+	{ 0,	0,	NULL,			NULL		}, /* 5446 */
+	{ 0,	0,	NULL,			NULL		}, /* 5447 */
+	{ 0,	0,	NULL,			NULL		}, /* 5448 */
+	{ 0,	0,	NULL,			NULL		}, /* 5449 */
+	{ 0,	0,	NULL,			NULL		}, /* 5450 */
+	{ 0,	0,	NULL,			NULL		}, /* 5451 */
+	{ 0,	0,	NULL,			NULL		}, /* 5452 */
+	{ 0,	0,	NULL,			NULL		}, /* 5453 */
+	{ 0,	0,	NULL,			NULL		}, /* 5454 */
+	{ 0,	0,	NULL,			NULL		}, /* 5455 */
+	{ 0,	0,	NULL,			NULL		}, /* 5456 */
+	{ 0,	0,	NULL,			NULL		}, /* 5457 */
+	{ 0,	0,	NULL,			NULL		}, /* 5458 */
+	{ 0,	0,	NULL,			NULL		}, /* 5459 */
+	{ 0,	0,	NULL,			NULL		}, /* 5460 */
+	{ 0,	0,	NULL,			NULL		}, /* 5461 */
+	{ 0,	0,	NULL,			NULL		}, /* 5462 */
+	{ 0,	0,	NULL,			NULL		}, /* 5463 */
+	{ 0,	0,	NULL,			NULL		}, /* 5464 */
+	{ 0,	0,	NULL,			NULL		}, /* 5465 */
+	{ 0,	0,	NULL,			NULL		}, /* 5466 */
+	{ 0,	0,	NULL,			NULL		}, /* 5467 */
+	{ 0,	0,	NULL,			NULL		}, /* 5468 */
+	{ 0,	0,	NULL,			NULL		}, /* 5469 */
+	{ 0,	0,	NULL,			NULL		}, /* 5470 */
+	{ 0,	0,	NULL,			NULL		}, /* 5471 */
+	{ 0,	0,	NULL,			NULL		}, /* 5472 */
+	{ 0,	0,	NULL,			NULL		}, /* 5473 */
+	{ 0,	0,	NULL,			NULL		}, /* 5474 */
+	{ 0,	0,	NULL,			NULL		}, /* 5475 */
+	{ 0,	0,	NULL,			NULL		}, /* 5476 */
+	{ 0,	0,	NULL,			NULL		}, /* 5477 */
+	{ 0,	0,	NULL,			NULL		}, /* 5478 */
+	{ 0,	0,	NULL,			NULL		}, /* 5479 */
+	{ 0,	0,	NULL,			NULL		}, /* 5480 */
+	{ 0,	0,	NULL,			NULL		}, /* 5481 */
+	{ 0,	0,	NULL,			NULL		}, /* 5482 */
+	{ 0,	0,	NULL,			NULL		}, /* 5483 */
+	{ 0,	0,	NULL,			NULL		}, /* 5484 */
+	{ 0,	0,	NULL,			NULL		}, /* 5485 */
+	{ 0,	0,	NULL,			NULL		}, /* 5486 */
+	{ 0,	0,	NULL,			NULL		}, /* 5487 */
+	{ 0,	0,	NULL,			NULL		}, /* 5488 */
+	{ 0,	0,	NULL,			NULL		}, /* 5489 */
+	{ 0,	0,	NULL,			NULL		}, /* 5490 */
+	{ 0,	0,	NULL,			NULL		}, /* 5491 */
+	{ 0,	0,	NULL,			NULL		}, /* 5492 */
+	{ 0,	0,	NULL,			NULL		}, /* 5493 */
+	{ 0,	0,	NULL,			NULL		}, /* 5494 */
+	{ 0,	0,	NULL,			NULL		}, /* 5495 */
+	{ 0,	0,	NULL,			NULL		}, /* 5496 */
+	{ 0,	0,	NULL,			NULL		}, /* 5497 */
+	{ 0,	0,	NULL,			NULL		}, /* 5498 */
+	{ 0,	0,	NULL,			NULL		}, /* 5499 */
+	{ 0,	0,	NULL,			NULL		}, /* 5500 */
+	{ 0,	0,	NULL,			NULL		}, /* 5501 */
+	{ 0,	0,	NULL,			NULL		}, /* 5502 */
+	{ 0,	0,	NULL,			NULL		}, /* 5503 */
+	{ 0,	0,	NULL,			NULL		}, /* 5504 */
+	{ 0,	0,	NULL,			NULL		}, /* 5505 */
+	{ 0,	0,	NULL,			NULL		}, /* 5506 */
+	{ 0,	0,	NULL,			NULL		}, /* 5507 */
+	{ 0,	0,	NULL,			NULL		}, /* 5508 */
+	{ 0,	0,	NULL,			NULL		}, /* 5509 */
+	{ 0,	0,	NULL,			NULL		}, /* 5510 */
+	{ 0,	0,	NULL,			NULL		}, /* 5511 */
+	{ 0,	0,	NULL,			NULL		}, /* 5512 */
+	{ 0,	0,	NULL,			NULL		}, /* 5513 */
+	{ 0,	0,	NULL,			NULL		}, /* 5514 */
+	{ 0,	0,	NULL,			NULL		}, /* 5515 */
+	{ 0,	0,	NULL,			NULL		}, /* 5516 */
+	{ 0,	0,	NULL,			NULL		}, /* 5517 */
+	{ 0,	0,	NULL,			NULL		}, /* 5518 */
+	{ 0,	0,	NULL,			NULL		}, /* 5519 */
+	{ 0,	0,	NULL,			NULL		}, /* 5520 */
+	{ 0,	0,	NULL,			NULL		}, /* 5521 */
+	{ 0,	0,	NULL,			NULL		}, /* 5522 */
+	{ 0,	0,	NULL,			NULL		}, /* 5523 */
+	{ 0,	0,	NULL,			NULL		}, /* 5524 */
+	{ 0,	0,	NULL,			NULL		}, /* 5525 */
+	{ 0,	0,	NULL,			NULL		}, /* 5526 */
+	{ 0,	0,	NULL,			NULL		}, /* 5527 */
+	{ 0,	0,	NULL,			NULL		}, /* 5528 */
+	{ 0,	0,	NULL,			NULL		}, /* 5529 */
+	{ 0,	0,	NULL,			NULL		}, /* 5530 */
+	{ 0,	0,	NULL,			NULL		}, /* 5531 */
+	{ 0,	0,	NULL,			NULL		}, /* 5532 */
+	{ 0,	0,	NULL,			NULL		}, /* 5533 */
+	{ 0,	0,	NULL,			NULL		}, /* 5534 */
+	{ 0,	0,	NULL,			NULL		}, /* 5535 */
+	{ 0,	0,	NULL,			NULL		}, /* 5536 */
+	{ 0,	0,	NULL,			NULL		}, /* 5537 */
+	{ 0,	0,	NULL,			NULL		}, /* 5538 */
+	{ 0,	0,	NULL,			NULL		}, /* 5539 */
+	{ 0,	0,	NULL,			NULL		}, /* 5540 */
+	{ 0,	0,	NULL,			NULL		}, /* 5541 */
+	{ 0,	0,	NULL,			NULL		}, /* 5542 */
+	{ 0,	0,	NULL,			NULL		}, /* 5543 */
+	{ 0,	0,	NULL,			NULL		}, /* 5544 */
+	{ 0,	0,	NULL,			NULL		}, /* 5545 */
+	{ 0,	0,	NULL,			NULL		}, /* 5546 */
+	{ 0,	0,	NULL,			NULL		}, /* 5547 */
+	{ 0,	0,	NULL,			NULL		}, /* 5548 */
+	{ 0,	0,	NULL,			NULL		}, /* 5549 */
+	{ 0,	0,	NULL,			NULL		}, /* 5550 */
+	{ 0,	0,	NULL,			NULL		}, /* 5551 */
+	{ 0,	0,	NULL,			NULL		}, /* 5552 */
+	{ 0,	0,	NULL,			NULL		}, /* 5553 */
+	{ 0,	0,	NULL,			NULL		}, /* 5554 */
+	{ 0,	0,	NULL,			NULL		}, /* 5555 */
+	{ 0,	0,	NULL,			NULL		}, /* 5556 */
+	{ 0,	0,	NULL,			NULL		}, /* 5557 */
+	{ 0,	0,	NULL,			NULL		}, /* 5558 */
+	{ 0,	0,	NULL,			NULL		}, /* 5559 */
+	{ 0,	0,	NULL,			NULL		}, /* 5560 */
+	{ 0,	0,	NULL,			NULL		}, /* 5561 */
+	{ 0,	0,	NULL,			NULL		}, /* 5562 */
+	{ 0,	0,	NULL,			NULL		}, /* 5563 */
+	{ 0,	0,	NULL,			NULL		}, /* 5564 */
+	{ 0,	0,	NULL,			NULL		}, /* 5565 */
+	{ 0,	0,	NULL,			NULL		}, /* 5566 */
+	{ 0,	0,	NULL,			NULL		}, /* 5567 */
+	{ 0,	0,	NULL,			NULL		}, /* 5568 */
+	{ 0,	0,	NULL,			NULL		}, /* 5569 */
+	{ 0,	0,	NULL,			NULL		}, /* 5570 */
+	{ 0,	0,	NULL,			NULL		}, /* 5571 */
+	{ 0,	0,	NULL,			NULL		}, /* 5572 */
+	{ 0,	0,	NULL,			NULL		}, /* 5573 */
+	{ 0,	0,	NULL,			NULL		}, /* 5574 */
+	{ 0,	0,	NULL,			NULL		}, /* 5575 */
+	{ 0,	0,	NULL,			NULL		}, /* 5576 */
+	{ 0,	0,	NULL,			NULL		}, /* 5577 */
+	{ 0,	0,	NULL,			NULL		}, /* 5578 */
+	{ 0,	0,	NULL,			NULL		}, /* 5579 */
+	{ 0,	0,	NULL,			NULL		}, /* 5580 */
+	{ 0,	0,	NULL,			NULL		}, /* 5581 */
+	{ 0,	0,	NULL,			NULL		}, /* 5582 */
+	{ 0,	0,	NULL,			NULL		}, /* 5583 */
+	{ 0,	0,	NULL,			NULL		}, /* 5584 */
+	{ 0,	0,	NULL,			NULL		}, /* 5585 */
+	{ 0,	0,	NULL,			NULL		}, /* 5586 */
+	{ 0,	0,	NULL,			NULL		}, /* 5587 */
+	{ 0,	0,	NULL,			NULL		}, /* 5588 */
+	{ 0,	0,	NULL,			NULL		}, /* 5589 */
+	{ 0,	0,	NULL,			NULL		}, /* 5590 */
+	{ 0,	0,	NULL,			NULL		}, /* 5591 */
+	{ 0,	0,	NULL,			NULL		}, /* 5592 */
+	{ 0,	0,	NULL,			NULL		}, /* 5593 */
+	{ 0,	0,	NULL,			NULL		}, /* 5594 */
+	{ 0,	0,	NULL,			NULL		}, /* 5595 */
+	{ 0,	0,	NULL,			NULL		}, /* 5596 */
+	{ 0,	0,	NULL,			NULL		}, /* 5597 */
+	{ 0,	0,	NULL,			NULL		}, /* 5598 */
+	{ 0,	0,	NULL,			NULL		}, /* 5599 */
+	{ 0,	0,	NULL,			NULL		}, /* 5600 */
+	{ 0,	0,	NULL,			NULL		}, /* 5601 */
+	{ 0,	0,	NULL,			NULL		}, /* 5602 */
+	{ 0,	0,	NULL,			NULL		}, /* 5603 */
+	{ 0,	0,	NULL,			NULL		}, /* 5604 */
+	{ 0,	0,	NULL,			NULL		}, /* 5605 */
+	{ 0,	0,	NULL,			NULL		}, /* 5606 */
+	{ 0,	0,	NULL,			NULL		}, /* 5607 */
+	{ 0,	0,	NULL,			NULL		}, /* 5608 */
+	{ 0,	0,	NULL,			NULL		}, /* 5609 */
+	{ 0,	0,	NULL,			NULL		}, /* 5610 */
+	{ 0,	0,	NULL,			NULL		}, /* 5611 */
+	{ 0,	0,	NULL,			NULL		}, /* 5612 */
+	{ 0,	0,	NULL,			NULL		}, /* 5613 */
+	{ 0,	0,	NULL,			NULL		}, /* 5614 */
+	{ 0,	0,	NULL,			NULL		}, /* 5615 */
+	{ 0,	0,	NULL,			NULL		}, /* 5616 */
+	{ 0,	0,	NULL,			NULL		}, /* 5617 */
+	{ 0,	0,	NULL,			NULL		}, /* 5618 */
+	{ 0,	0,	NULL,			NULL		}, /* 5619 */
+	{ 0,	0,	NULL,			NULL		}, /* 5620 */
+	{ 0,	0,	NULL,			NULL		}, /* 5621 */
+	{ 0,	0,	NULL,			NULL		}, /* 5622 */
+	{ 0,	0,	NULL,			NULL		}, /* 5623 */
+	{ 0,	0,	NULL,			NULL		}, /* 5624 */
+	{ 0,	0,	NULL,			NULL		}, /* 5625 */
+	{ 0,	0,	NULL,			NULL		}, /* 5626 */
+	{ 0,	0,	NULL,			NULL		}, /* 5627 */
+	{ 0,	0,	NULL,			NULL		}, /* 5628 */
+	{ 0,	0,	NULL,			NULL		}, /* 5629 */
+	{ 0,	0,	NULL,			NULL		}, /* 5630 */
+	{ 0,	0,	NULL,			NULL		}, /* 5631 */
+	{ 0,	0,	NULL,			NULL		}, /* 5632 */
+	{ 0,	0,	NULL,			NULL		}, /* 5633 */
+	{ 0,	0,	NULL,			NULL		}, /* 5634 */
+	{ 0,	0,	NULL,			NULL		}, /* 5635 */
+	{ 0,	0,	NULL,			NULL		}, /* 5636 */
+	{ 0,	0,	NULL,			NULL		}, /* 5637 */
+	{ 0,	0,	NULL,			NULL		}, /* 5638 */
+	{ 0,	0,	NULL,			NULL		}, /* 5639 */
+	{ 0,	0,	NULL,			NULL		}, /* 5640 */
+	{ 0,	0,	NULL,			NULL		}, /* 5641 */
+	{ 0,	0,	NULL,			NULL		}, /* 5642 */
+	{ 0,	0,	NULL,			NULL		}, /* 5643 */
+	{ 0,	0,	NULL,			NULL		}, /* 5644 */
+	{ 0,	0,	NULL,			NULL		}, /* 5645 */
+	{ 0,	0,	NULL,			NULL		}, /* 5646 */
+	{ 0,	0,	NULL,			NULL		}, /* 5647 */
+	{ 0,	0,	NULL,			NULL		}, /* 5648 */
+	{ 0,	0,	NULL,			NULL		}, /* 5649 */
+	{ 0,	0,	NULL,			NULL		}, /* 5650 */
+	{ 0,	0,	NULL,			NULL		}, /* 5651 */
+	{ 0,	0,	NULL,			NULL		}, /* 5652 */
+	{ 0,	0,	NULL,			NULL		}, /* 5653 */
+	{ 0,	0,	NULL,			NULL		}, /* 5654 */
+	{ 0,	0,	NULL,			NULL		}, /* 5655 */
+	{ 0,	0,	NULL,			NULL		}, /* 5656 */
+	{ 0,	0,	NULL,			NULL		}, /* 5657 */
+	{ 0,	0,	NULL,			NULL		}, /* 5658 */
+	{ 0,	0,	NULL,			NULL		}, /* 5659 */
+	{ 0,	0,	NULL,			NULL		}, /* 5660 */
+	{ 0,	0,	NULL,			NULL		}, /* 5661 */
+	{ 0,	0,	NULL,			NULL		}, /* 5662 */
+	{ 0,	0,	NULL,			NULL		}, /* 5663 */
+	{ 0,	0,	NULL,			NULL		}, /* 5664 */
+	{ 0,	0,	NULL,			NULL		}, /* 5665 */
+	{ 0,	0,	NULL,			NULL		}, /* 5666 */
+	{ 0,	0,	NULL,			NULL		}, /* 5667 */
+	{ 0,	0,	NULL,			NULL		}, /* 5668 */
+	{ 0,	0,	NULL,			NULL		}, /* 5669 */
+	{ 0,	0,	NULL,			NULL		}, /* 5670 */
+	{ 0,	0,	NULL,			NULL		}, /* 5671 */
+	{ 0,	0,	NULL,			NULL		}, /* 5672 */
+	{ 0,	0,	NULL,			NULL		}, /* 5673 */
+	{ 0,	0,	NULL,			NULL		}, /* 5674 */
+	{ 0,	0,	NULL,			NULL		}, /* 5675 */
+	{ 0,	0,	NULL,			NULL		}, /* 5676 */
+	{ 0,	0,	NULL,			NULL		}, /* 5677 */
+	{ 0,	0,	NULL,			NULL		}, /* 5678 */
+	{ 0,	0,	NULL,			NULL		}, /* 5679 */
+	{ 0,	0,	NULL,			NULL		}, /* 5680 */
+	{ 0,	0,	NULL,			NULL		}, /* 5681 */
+	{ 0,	0,	NULL,			NULL		}, /* 5682 */
+	{ 0,	0,	NULL,			NULL		}, /* 5683 */
+	{ 0,	0,	NULL,			NULL		}, /* 5684 */
+	{ 0,	0,	NULL,			NULL		}, /* 5685 */
+	{ 0,	0,	NULL,			NULL		}, /* 5686 */
+	{ 0,	0,	NULL,			NULL		}, /* 5687 */
+	{ 0,	0,	NULL,			NULL		}, /* 5688 */
+	{ 0,	0,	NULL,			NULL		}, /* 5689 */
+	{ 0,	0,	NULL,			NULL		}, /* 5690 */
+	{ 0,	0,	NULL,			NULL		}, /* 5691 */
+	{ 0,	0,	NULL,			NULL		}, /* 5692 */
+	{ 0,	0,	NULL,			NULL		}, /* 5693 */
+	{ 0,	0,	NULL,			NULL		}, /* 5694 */
+	{ 0,	0,	NULL,			NULL		}, /* 5695 */
+	{ 0,	0,	NULL,			NULL		}, /* 5696 */
+	{ 0,	0,	NULL,			NULL		}, /* 5697 */
+	{ 0,	0,	NULL,			NULL		}, /* 5698 */
+	{ 0,	0,	NULL,			NULL		}, /* 5699 */
+	{ 0,	0,	NULL,			NULL		}, /* 5700 */
+	{ 0,	0,	NULL,			NULL		}, /* 5701 */
+	{ 0,	0,	NULL,			NULL		}, /* 5702 */
+	{ 0,	0,	NULL,			NULL		}, /* 5703 */
+	{ 0,	0,	NULL,			NULL		}, /* 5704 */
+	{ 0,	0,	NULL,			NULL		}, /* 5705 */
+	{ 0,	0,	NULL,			NULL		}, /* 5706 */
+	{ 0,	0,	NULL,			NULL		}, /* 5707 */
+	{ 0,	0,	NULL,			NULL		}, /* 5708 */
+	{ 0,	0,	NULL,			NULL		}, /* 5709 */
+	{ 0,	0,	NULL,			NULL		}, /* 5710 */
+	{ 0,	0,	NULL,			NULL		}, /* 5711 */
+	{ 0,	0,	NULL,			NULL		}, /* 5712 */
+	{ 0,	0,	NULL,			NULL		}, /* 5713 */
+	{ 0,	0,	NULL,			NULL		}, /* 5714 */
+	{ 0,	0,	NULL,			NULL		}, /* 5715 */
+	{ 0,	0,	NULL,			NULL		}, /* 5716 */
+	{ 0,	0,	NULL,			NULL		}, /* 5717 */
+	{ 0,	0,	NULL,			NULL		}, /* 5718 */
+	{ 0,	0,	NULL,			NULL		}, /* 5719 */
+	{ 0,	0,	NULL,			NULL		}, /* 5720 */
+	{ 0,	0,	NULL,			NULL		}, /* 5721 */
+	{ 0,	0,	NULL,			NULL		}, /* 5722 */
+	{ 0,	0,	NULL,			NULL		}, /* 5723 */
+	{ 0,	0,	NULL,			NULL		}, /* 5724 */
+	{ 0,	0,	NULL,			NULL		}, /* 5725 */
+	{ 0,	0,	NULL,			NULL		}, /* 5726 */
+	{ 0,	0,	NULL,			NULL		}, /* 5727 */
+	{ 0,	0,	NULL,			NULL		}, /* 5728 */
+	{ 0,	0,	NULL,			NULL		}, /* 5729 */
+	{ 0,	0,	NULL,			NULL		}, /* 5730 */
+	{ 0,	0,	NULL,			NULL		}, /* 5731 */
+	{ 0,	0,	NULL,			NULL		}, /* 5732 */
+	{ 0,	0,	NULL,			NULL		}, /* 5733 */
+	{ 0,	0,	NULL,			NULL		}, /* 5734 */
+	{ 0,	0,	NULL,			NULL		}, /* 5735 */
+	{ 0,	0,	NULL,			NULL		}, /* 5736 */
+	{ 0,	0,	NULL,			NULL		}, /* 5737 */
+	{ 0,	0,	NULL,			NULL		}, /* 5738 */
+	{ 0,	0,	NULL,			NULL		}, /* 5739 */
+	{ 0,	0,	NULL,			NULL		}, /* 5740 */
+	{ 0,	0,	NULL,			NULL		}, /* 5741 */
+	{ 0,	0,	NULL,			NULL		}, /* 5742 */
+	{ 0,	0,	NULL,			NULL		}, /* 5743 */
+	{ 0,	0,	NULL,			NULL		}, /* 5744 */
+	{ 0,	0,	NULL,			NULL		}, /* 5745 */
+	{ 0,	0,	NULL,			NULL		}, /* 5746 */
+	{ 0,	0,	NULL,			NULL		}, /* 5747 */
+	{ 0,	0,	NULL,			NULL		}, /* 5748 */
+	{ 0,	0,	NULL,			NULL		}, /* 5749 */
+	{ 0,	0,	NULL,			NULL		}, /* 5750 */
+	{ 0,	0,	NULL,			NULL		}, /* 5751 */
+	{ 0,	0,	NULL,			NULL		}, /* 5752 */
+	{ 0,	0,	NULL,			NULL		}, /* 5753 */
+	{ 0,	0,	NULL,			NULL		}, /* 5754 */
+	{ 0,	0,	NULL,			NULL		}, /* 5755 */
+	{ 0,	0,	NULL,			NULL		}, /* 5756 */
+	{ 0,	0,	NULL,			NULL		}, /* 5757 */
+	{ 0,	0,	NULL,			NULL		}, /* 5758 */
+	{ 0,	0,	NULL,			NULL		}, /* 5759 */
+	{ 0,	0,	NULL,			NULL		}, /* 5760 */
+	{ 0,	0,	NULL,			NULL		}, /* 5761 */
+	{ 0,	0,	NULL,			NULL		}, /* 5762 */
+	{ 0,	0,	NULL,			NULL		}, /* 5763 */
+	{ 0,	0,	NULL,			NULL		}, /* 5764 */
+	{ 0,	0,	NULL,			NULL		}, /* 5765 */
+	{ 0,	0,	NULL,			NULL		}, /* 5766 */
+	{ 0,	0,	NULL,			NULL		}, /* 5767 */
+	{ 0,	0,	NULL,			NULL		}, /* 5768 */
+	{ 0,	0,	NULL,			NULL		}, /* 5769 */
+	{ 0,	0,	NULL,			NULL		}, /* 5770 */
+	{ 0,	0,	NULL,			NULL		}, /* 5771 */
+	{ 0,	0,	NULL,			NULL		}, /* 5772 */
+	{ 0,	0,	NULL,			NULL		}, /* 5773 */
+	{ 0,	0,	NULL,			NULL		}, /* 5774 */
+	{ 0,	0,	NULL,			NULL		}, /* 5775 */
+	{ 0,	0,	NULL,			NULL		}, /* 5776 */
+	{ 0,	0,	NULL,			NULL		}, /* 5777 */
+	{ 0,	0,	NULL,			NULL		}, /* 5778 */
+	{ 0,	0,	NULL,			NULL		}, /* 5779 */
+	{ 0,	0,	NULL,			NULL		}, /* 5780 */
+	{ 0,	0,	NULL,			NULL		}, /* 5781 */
+	{ 0,	0,	NULL,			NULL		}, /* 5782 */
+	{ 0,	0,	NULL,			NULL		}, /* 5783 */
+	{ 0,	0,	NULL,			NULL		}, /* 5784 */
+	{ 0,	0,	NULL,			NULL		}, /* 5785 */
+	{ 0,	0,	NULL,			NULL		}, /* 5786 */
+	{ 0,	0,	NULL,			NULL		}, /* 5787 */
+	{ 0,	0,	NULL,			NULL		}, /* 5788 */
+	{ 0,	0,	NULL,			NULL		}, /* 5789 */
+	{ 0,	0,	NULL,			NULL		}, /* 5790 */
+	{ 0,	0,	NULL,			NULL		}, /* 5791 */
+	{ 0,	0,	NULL,			NULL		}, /* 5792 */
+	{ 0,	0,	NULL,			NULL		}, /* 5793 */
+	{ 0,	0,	NULL,			NULL		}, /* 5794 */
+	{ 0,	0,	NULL,			NULL		}, /* 5795 */
+	{ 0,	0,	NULL,			NULL		}, /* 5796 */
+	{ 0,	0,	NULL,			NULL		}, /* 5797 */
+	{ 0,	0,	NULL,			NULL		}, /* 5798 */
+	{ 0,	0,	NULL,			NULL		}, /* 5799 */
+	{ 0,	0,	NULL,			NULL		}, /* 5800 */
+	{ 0,	0,	NULL,			NULL		}, /* 5801 */
+	{ 0,	0,	NULL,			NULL		}, /* 5802 */
+	{ 0,	0,	NULL,			NULL		}, /* 5803 */
+	{ 0,	0,	NULL,			NULL		}, /* 5804 */
+	{ 0,	0,	NULL,			NULL		}, /* 5805 */
+	{ 0,	0,	NULL,			NULL		}, /* 5806 */
+	{ 0,	0,	NULL,			NULL		}, /* 5807 */
+	{ 0,	0,	NULL,			NULL		}, /* 5808 */
+	{ 0,	0,	NULL,			NULL		}, /* 5809 */
+	{ 0,	0,	NULL,			NULL		}, /* 5810 */
+	{ 0,	0,	NULL,			NULL		}, /* 5811 */
+	{ 0,	0,	NULL,			NULL		}, /* 5812 */
+	{ 0,	0,	NULL,			NULL		}, /* 5813 */
+	{ 0,	0,	NULL,			NULL		}, /* 5814 */
+	{ 0,	0,	NULL,			NULL		}, /* 5815 */
+	{ 0,	0,	NULL,			NULL		}, /* 5816 */
+	{ 0,	0,	NULL,			NULL		}, /* 5817 */
+	{ 0,	0,	NULL,			NULL		}, /* 5818 */
+	{ 0,	0,	NULL,			NULL		}, /* 5819 */
+	{ 0,	0,	NULL,			NULL		}, /* 5820 */
+	{ 0,	0,	NULL,			NULL		}, /* 5821 */
+	{ 0,	0,	NULL,			NULL		}, /* 5822 */
+	{ 0,	0,	NULL,			NULL		}, /* 5823 */
+	{ 0,	0,	NULL,			NULL		}, /* 5824 */
+	{ 0,	0,	NULL,			NULL		}, /* 5825 */
+	{ 0,	0,	NULL,			NULL		}, /* 5826 */
+	{ 0,	0,	NULL,			NULL		}, /* 5827 */
+	{ 0,	0,	NULL,			NULL		}, /* 5828 */
+	{ 0,	0,	NULL,			NULL		}, /* 5829 */
+	{ 0,	0,	NULL,			NULL		}, /* 5830 */
+	{ 0,	0,	NULL,			NULL		}, /* 5831 */
+	{ 0,	0,	NULL,			NULL		}, /* 5832 */
+	{ 0,	0,	NULL,			NULL		}, /* 5833 */
+	{ 0,	0,	NULL,			NULL		}, /* 5834 */
+	{ 0,	0,	NULL,			NULL		}, /* 5835 */
+	{ 0,	0,	NULL,			NULL		}, /* 5836 */
+	{ 0,	0,	NULL,			NULL		}, /* 5837 */
+	{ 0,	0,	NULL,			NULL		}, /* 5838 */
+	{ 0,	0,	NULL,			NULL		}, /* 5839 */
+	{ 0,	0,	NULL,			NULL		}, /* 5840 */
+	{ 0,	0,	NULL,			NULL		}, /* 5841 */
+	{ 0,	0,	NULL,			NULL		}, /* 5842 */
+	{ 0,	0,	NULL,			NULL		}, /* 5843 */
+	{ 0,	0,	NULL,			NULL		}, /* 5844 */
+	{ 0,	0,	NULL,			NULL		}, /* 5845 */
+	{ 0,	0,	NULL,			NULL		}, /* 5846 */
+	{ 0,	0,	NULL,			NULL		}, /* 5847 */
+	{ 0,	0,	NULL,			NULL		}, /* 5848 */
+	{ 0,	0,	NULL,			NULL		}, /* 5849 */
+	{ 0,	0,	NULL,			NULL		}, /* 5850 */
+	{ 0,	0,	NULL,			NULL		}, /* 5851 */
+	{ 0,	0,	NULL,			NULL		}, /* 5852 */
+	{ 0,	0,	NULL,			NULL		}, /* 5853 */
+	{ 0,	0,	NULL,			NULL		}, /* 5854 */
+	{ 0,	0,	NULL,			NULL		}, /* 5855 */
+	{ 0,	0,	NULL,			NULL		}, /* 5856 */
+	{ 0,	0,	NULL,			NULL		}, /* 5857 */
+	{ 0,	0,	NULL,			NULL		}, /* 5858 */
+	{ 0,	0,	NULL,			NULL		}, /* 5859 */
+	{ 0,	0,	NULL,			NULL		}, /* 5860 */
+	{ 0,	0,	NULL,			NULL		}, /* 5861 */
+	{ 0,	0,	NULL,			NULL		}, /* 5862 */
+	{ 0,	0,	NULL,			NULL		}, /* 5863 */
+	{ 0,	0,	NULL,			NULL		}, /* 5864 */
+	{ 0,	0,	NULL,			NULL		}, /* 5865 */
+	{ 0,	0,	NULL,			NULL		}, /* 5866 */
+	{ 0,	0,	NULL,			NULL		}, /* 5867 */
+	{ 0,	0,	NULL,			NULL		}, /* 5868 */
+	{ 0,	0,	NULL,			NULL		}, /* 5869 */
+	{ 0,	0,	NULL,			NULL		}, /* 5870 */
+	{ 0,	0,	NULL,			NULL		}, /* 5871 */
+	{ 0,	0,	NULL,			NULL		}, /* 5872 */
+	{ 0,	0,	NULL,			NULL		}, /* 5873 */
+	{ 0,	0,	NULL,			NULL		}, /* 5874 */
+	{ 0,	0,	NULL,			NULL		}, /* 5875 */
+	{ 0,	0,	NULL,			NULL		}, /* 5876 */
+	{ 0,	0,	NULL,			NULL		}, /* 5877 */
+	{ 0,	0,	NULL,			NULL		}, /* 5878 */
+	{ 0,	0,	NULL,			NULL		}, /* 5879 */
+	{ 0,	0,	NULL,			NULL		}, /* 5880 */
+	{ 0,	0,	NULL,			NULL		}, /* 5881 */
+	{ 0,	0,	NULL,			NULL		}, /* 5882 */
+	{ 0,	0,	NULL,			NULL		}, /* 5883 */
+	{ 0,	0,	NULL,			NULL		}, /* 5884 */
+	{ 0,	0,	NULL,			NULL		}, /* 5885 */
+	{ 0,	0,	NULL,			NULL		}, /* 5886 */
+	{ 0,	0,	NULL,			NULL		}, /* 5887 */
+	{ 0,	0,	NULL,			NULL		}, /* 5888 */
+	{ 0,	0,	NULL,			NULL		}, /* 5889 */
+	{ 0,	0,	NULL,			NULL		}, /* 5890 */
+	{ 0,	0,	NULL,			NULL		}, /* 5891 */
+	{ 0,	0,	NULL,			NULL		}, /* 5892 */
+	{ 0,	0,	NULL,			NULL		}, /* 5893 */
+	{ 0,	0,	NULL,			NULL		}, /* 5894 */
+	{ 0,	0,	NULL,			NULL		}, /* 5895 */
+	{ 0,	0,	NULL,			NULL		}, /* 5896 */
+	{ 0,	0,	NULL,			NULL		}, /* 5897 */
+	{ 0,	0,	NULL,			NULL		}, /* 5898 */
+	{ 0,	0,	NULL,			NULL		}, /* 5899 */
+	{ 0,	0,	NULL,			NULL		}, /* 5900 */
+	{ 0,	0,	NULL,			NULL		}, /* 5901 */
+	{ 0,	0,	NULL,			NULL		}, /* 5902 */
+	{ 0,	0,	NULL,			NULL		}, /* 5903 */
+	{ 0,	0,	NULL,			NULL		}, /* 5904 */
+	{ 0,	0,	NULL,			NULL		}, /* 5905 */
+	{ 0,	0,	NULL,			NULL		}, /* 5906 */
+	{ 0,	0,	NULL,			NULL		}, /* 5907 */
+	{ 0,	0,	NULL,			NULL		}, /* 5908 */
+	{ 0,	0,	NULL,			NULL		}, /* 5909 */
+	{ 0,	0,	NULL,			NULL		}, /* 5910 */
+	{ 0,	0,	NULL,			NULL		}, /* 5911 */
+	{ 0,	0,	NULL,			NULL		}, /* 5912 */
+	{ 0,	0,	NULL,			NULL		}, /* 5913 */
+	{ 0,	0,	NULL,			NULL		}, /* 5914 */
+	{ 0,	0,	NULL,			NULL		}, /* 5915 */
+	{ 0,	0,	NULL,			NULL		}, /* 5916 */
+	{ 0,	0,	NULL,			NULL		}, /* 5917 */
+	{ 0,	0,	NULL,			NULL		}, /* 5918 */
+	{ 0,	0,	NULL,			NULL		}, /* 5919 */
+	{ 0,	0,	NULL,			NULL		}, /* 5920 */
+	{ 0,	0,	NULL,			NULL		}, /* 5921 */
+	{ 0,	0,	NULL,			NULL		}, /* 5922 */
+	{ 0,	0,	NULL,			NULL		}, /* 5923 */
+	{ 0,	0,	NULL,			NULL		}, /* 5924 */
+	{ 0,	0,	NULL,			NULL		}, /* 5925 */
+	{ 0,	0,	NULL,			NULL		}, /* 5926 */
+	{ 0,	0,	NULL,			NULL		}, /* 5927 */
+	{ 0,	0,	NULL,			NULL		}, /* 5928 */
+	{ 0,	0,	NULL,			NULL		}, /* 5929 */
+	{ 0,	0,	NULL,			NULL		}, /* 5930 */
+	{ 0,	0,	NULL,			NULL		}, /* 5931 */
+	{ 0,	0,	NULL,			NULL		}, /* 5932 */
+	{ 0,	0,	NULL,			NULL		}, /* 5933 */
+	{ 0,	0,	NULL,			NULL		}, /* 5934 */
+	{ 0,	0,	NULL,			NULL		}, /* 5935 */
+	{ 0,	0,	NULL,			NULL		}, /* 5936 */
+	{ 0,	0,	NULL,			NULL		}, /* 5937 */
+	{ 0,	0,	NULL,			NULL		}, /* 5938 */
+	{ 0,	0,	NULL,			NULL		}, /* 5939 */
+	{ 0,	0,	NULL,			NULL		}, /* 5940 */
+	{ 0,	0,	NULL,			NULL		}, /* 5941 */
+	{ 0,	0,	NULL,			NULL		}, /* 5942 */
+	{ 0,	0,	NULL,			NULL		}, /* 5943 */
+	{ 0,	0,	NULL,			NULL		}, /* 5944 */
+	{ 0,	0,	NULL,			NULL		}, /* 5945 */
+	{ 0,	0,	NULL,			NULL		}, /* 5946 */
+	{ 0,	0,	NULL,			NULL		}, /* 5947 */
+	{ 0,	0,	NULL,			NULL		}, /* 5948 */
+	{ 0,	0,	NULL,			NULL		}, /* 5949 */
+	{ 0,	0,	NULL,			NULL		}, /* 5950 */
+	{ 0,	0,	NULL,			NULL		}, /* 5951 */
+	{ 0,	0,	NULL,			NULL		}, /* 5952 */
+	{ 0,	0,	NULL,			NULL		}, /* 5953 */
+	{ 0,	0,	NULL,			NULL		}, /* 5954 */
+	{ 0,	0,	NULL,			NULL		}, /* 5955 */
+	{ 0,	0,	NULL,			NULL		}, /* 5956 */
+	{ 0,	0,	NULL,			NULL		}, /* 5957 */
+	{ 0,	0,	NULL,			NULL		}, /* 5958 */
+	{ 0,	0,	NULL,			NULL		}, /* 5959 */
+	{ 0,	0,	NULL,			NULL		}, /* 5960 */
+	{ 0,	0,	NULL,			NULL		}, /* 5961 */
+	{ 0,	0,	NULL,			NULL		}, /* 5962 */
+	{ 0,	0,	NULL,			NULL		}, /* 5963 */
+	{ 0,	0,	NULL,			NULL		}, /* 5964 */
+	{ 0,	0,	NULL,			NULL		}, /* 5965 */
+	{ 0,	0,	NULL,			NULL		}, /* 5966 */
+	{ 0,	0,	NULL,			NULL		}, /* 5967 */
+	{ 0,	0,	NULL,			NULL		}, /* 5968 */
+	{ 0,	0,	NULL,			NULL		}, /* 5969 */
+	{ 0,	0,	NULL,			NULL		}, /* 5970 */
+	{ 0,	0,	NULL,			NULL		}, /* 5971 */
+	{ 0,	0,	NULL,			NULL		}, /* 5972 */
+	{ 0,	0,	NULL,			NULL		}, /* 5973 */
+	{ 0,	0,	NULL,			NULL		}, /* 5974 */
+	{ 0,	0,	NULL,			NULL		}, /* 5975 */
+	{ 0,	0,	NULL,			NULL		}, /* 5976 */
+	{ 0,	0,	NULL,			NULL		}, /* 5977 */
+	{ 0,	0,	NULL,			NULL		}, /* 5978 */
+	{ 0,	0,	NULL,			NULL		}, /* 5979 */
+	{ 0,	0,	NULL,			NULL		}, /* 5980 */
+	{ 0,	0,	NULL,			NULL		}, /* 5981 */
+	{ 0,	0,	NULL,			NULL		}, /* 5982 */
+	{ 0,	0,	NULL,			NULL		}, /* 5983 */
+	{ 0,	0,	NULL,			NULL		}, /* 5984 */
+	{ 0,	0,	NULL,			NULL		}, /* 5985 */
+	{ 0,	0,	NULL,			NULL		}, /* 5986 */
+	{ 0,	0,	NULL,			NULL		}, /* 5987 */
+	{ 0,	0,	NULL,			NULL		}, /* 5988 */
+	{ 0,	0,	NULL,			NULL		}, /* 5989 */
+	{ 0,	0,	NULL,			NULL		}, /* 5990 */
+	{ 0,	0,	NULL,			NULL		}, /* 5991 */
+	{ 0,	0,	NULL,			NULL		}, /* 5992 */
+	{ 0,	0,	NULL,			NULL		}, /* 5993 */
+	{ 0,	0,	NULL,			NULL		}, /* 5994 */
+	{ 0,	0,	NULL,			NULL		}, /* 5995 */
+	{ 0,	0,	NULL,			NULL		}, /* 5996 */
+	{ 0,	0,	NULL,			NULL		}, /* 5997 */
+	{ 0,	0,	NULL,			NULL		}, /* 5998 */
+	{ 0,	0,	NULL,			NULL		}, /* 5999 */ /* end of Linux N64 */
 
-#if defined (LINUX_MIPSN32)
+#if defined(LINUX_MIPSN32)
 	/* For an N32 strace decode the N32 64-bit syscalls.  */
 	{ 3,	TF,	sys_read,		"read"		}, /* 6000 */ /* start of Linux N32 */
 	{ 3,	TF,	sys_write,		"write"		}, /* 6001 */
@@ -6670,8 +6680,8 @@
 	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	}, /* 6013 */
 	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 6014 */
 	{ 3,	0,	sys_ioctl,		"ioctl"		}, /* 6015 */
-	{ 6,	TF,	sys_pread64,		"pread"		}, /* 6016 */
-	{ 6,	TF,	sys_pwrite64,		"pwrite"	}, /* 6017 */
+	{ 6,	TD,	sys_pread,		"pread"		}, /* 6016 */
+	{ 6,	TD,	sys_pwrite,		"pwrite"	}, /* 6017 */
 	{ 3,	0,	sys_readv,		"readv"		}, /* 6018 */
 	{ 3,	0,	sys_writev,		"writev"	}, /* 6019 */
 	{ 2,	TF,	sys_access,		"access"	}, /* 6020 */
@@ -6680,7 +6690,7 @@
 	{ 0,	0,	sys_sched_yield,	"sched_yield"	}, /* 6023 */
 	{ 5,	0,	sys_mremap,		"mremap"	}, /* 6024 */
 	{ 3,	0,	sys_msync,		"msync"		}, /* 6025 */
-	{ 3,	0,	printargs,		"mincore"	}, /* 6026 */
+	{ 3,	0,	sys_mincore,		"mincore"	}, /* 6026 */
 	{ 3,	0,	sys_madvise,		"madvise"	}, /* 6027 */
 	{ 3,	TI,	sys_shmget,		"shmget"	}, /* 6028 */
 	{ 3,	TI,	sys_shmat,		"shmgat"	}, /* 6029 */
@@ -6726,7 +6736,7 @@
 	{ 3,	TI,	sys_msgctl,		"msgctl"	}, /* 6069 */
 	{ 3,	0,	sys_fcntl,		"fcntl"		}, /* 6070 */
 	{ 2,	0,	sys_flock,		"flock"		}, /* 6071 */
-	{ 1,	0,	sys_fsync,		"fsync"		}, /* 6072 */
+	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 6072 */
 	{ 1,	0,	sys_fdatasync,		"fdatasync"	}, /* 6073 */
 	{ 2,	TF,	sys_truncate,		"truncate"	}, /* 6074 */
 	{ 2,	0,	sys_ftruncate,		"ftruncate"	}, /* 6075 */
@@ -6807,7 +6817,7 @@
 	{ 0,	0,	sys_vhangup,		"vhangup"	}, /* 6150 */
 	{ 2,	0,	sys_pivotroot,		"pivot_root"	}, /* 6151 */
 	{ 1,	0,	sys_sysctl,		"_sysctl"	}, /* 6152 */
-	{ 5,	0,	printargs,		"prctl"		}, /* 6153 */
+	{ 5,	0,	sys_prctl,		"prctl"		}, /* 6153 */
 	{ 1,	0,	sys_adjtimex,		"adjtimex"	}, /* 6154 */
 	{ 2,	0,	sys_setrlimit,		"setrlimit"	}, /* 6155 */
 	{ 1,	TF,	sys_chroot,		"chroot"	}, /* 6156 */
@@ -6816,9 +6826,9 @@
 	{ 2,	0,	sys_settimeofday,	"settimeofday"	}, /* 6159 */
 	{ 5,	TF,	sys_mount,		"mount"		}, /* 6160 */
 	{ 2,	TF,	sys_umount2,		"umount"	}, /* 6161 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 6162 */
+	{ 2,	TF,	sys_swapon,		"swapon"	}, /* 6162 */
 	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 6163 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 6164 */
+	{ 4,	0,	sys_reboot,		"reboot"	}, /* 6164 */
 	{ 2,	0,	sys_sethostname,	"sethostname"	}, /* 6165 */
 	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 6166 */
 	{ 2,	0,	sys_create_module,	"create_module"	}, /* 6167 */
@@ -6827,12 +6837,12 @@
 	{ 1,	0,	sys_get_kernel_syms,	"get_kernel_syms"}, /* 6170 */
 	{ 5,	0,	sys_query_module,	"query_module"	}, /* 6171 */
 	{ 4,	0,	sys_quotactl,		"quotactl"	}, /* 6172 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 6173 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	}, /* 6173 */
 	{ 5,	TN,	printargs,		"getpmsg"	}, /* 6174 */
 	{ 5,	TN,	printargs,		"putpmsg"	}, /* 6175 */
 	{ 0,	0,	sys_afs_syscall,	"afs_syscall"	}, /* 6176 */
 	{ 0,	0,	printargs,		"reserved177"	}, /* 6177 */
-	{ 0,	0,	printargs,		"gettid"	}, /* 6178 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 6178 */
 	{ 3,	0,	sys_readahead,		"readahead"	}, /* 6179 */
 	{ 5,	0,	sys_setxattr,		"setxattr"	}, /* 6180 */
 	{ 5,	0,	sys_setxattr,		"lsetxattr"	}, /* 6181 */
@@ -6846,7 +6856,7 @@
 	{ 2,	0,	sys_removexattr,	"removexattr"	}, /* 6189 */
 	{ 2,	0,	sys_removexattr,	"lremovexattr"	}, /* 6190 */
 	{ 2,	TD,	sys_fremovexattr,	"fremovexattr"	}, /* 6191 */
-	{ 2,	0,	sys_kill,		"tkill"		}, /* 6192 */
+	{ 2,	TS,	sys_kill,		"tkill"		}, /* 6192 */
 	{ 1,	0,	sys_time,		"time"		}, /* 6193 */
 	{ 6,	0,	sys_futex,		"futex"		}, /* 6194 */
 	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity"}, /* 6195 */
@@ -6860,14 +6870,14 @@
 	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 6203 */
 	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 6204 */
 	{ 1,	TP,	sys_exit,		"exit_group"}, /* 6205 */
-	{ 3,	0,	printargs,		"lookup_dcookie"	}, /* 6206 */
+	{ 3,	0,	sys_lookup_dcookie,	"lookup_dcookie"	}, /* 6206 */
 	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 6207 */
 	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 6208 */
 	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 6209 */
 	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"	}, /* 6210 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 6211 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	}, /* 6211 */
 	{ 3,	0,	sys_fcntl,		"fcntl64"	}, /* 6212 */
-	{ 1,	0,	printargs,		"set_tid_address" }, /* 6213 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address" }, /* 6213 */
 	{ 0,	0,	sys_restart_syscall,	"restart_syscall" }, /* 6214 */
 	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 6215 */
 	{ 5,	TD,	sys_fadvise64,		"fadvise64"	}, /* 6216 */
@@ -6885,26 +6895,26 @@
 	{ 4,	0,	sys_clock_nanosleep,	"clock_nanosleep" }, /* 6228 */
 	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 6229 */
 	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 6230 */
-	{ 0,	0,	printargs,		"SYS_6231"	}, /* 6231 */
-	{ 0,	0,	printargs,		"SYS_6232"	}, /* 6232 */
-	{ 0,	0,	printargs,		"SYS_6233"	}, /* 6233 */
+	{ 0,	0,	NULL,			NULL		}, /* 6231 */
+	{ 0,	0,	NULL,			NULL		}, /* 6232 */
+	{ 0,	0,	NULL,			NULL		}, /* 6233 */
 	{ 4,	0,	sys_mq_open,		"mq_open"	}, /* 6234 */
 	{ 1,	0,	sys_mq_unlink,		"mq_unlink"	}, /* 6235 */
 	{ 5,	0,	sys_mq_timedsend,	"mq_timedsend"	}, /* 6236 */
 	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive" }, /* 6237 */
 	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 6238 */
 	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 6239 */
-	{ 0,	0,	printargs,		"SYS_6240"	}, /* 6240 */
+	{ 0,	0,	NULL,			NULL		}, /* 6240 */
 	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 6241 */
-	{ 0,	0,	printargs,		"SYS_6242"	}, /* 6242 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 6243 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 6244 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 6245 */
+	{ 0,	0,	NULL,			NULL		}, /* 6242 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 6243 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 6244 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 6245 */
 	{ 1,	0,	sys_set_thread_area,	"set_thread_area" }, /* 6246 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 6247 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 6247 */
 	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 6248 */
 	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 6249 */
-	{ 4,	0,	printargs,		"migrate_pages"	}, /* 6250 */
+	{ 4,	0,	sys_migrate_pages,	"migrate_pages"	}, /* 6250 */
 	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 6251 */
 	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 6252 */
 	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 6253 */
@@ -6921,21 +6931,21 @@
 	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 6264 */
 	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 6265 */
 	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 6266 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 6267 */
-	{ 4,	TD,	printargs,		"sync_file_range" }, /* 6268 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 6269 */
-	{ 4,	TD,	printargs,		"vmsplice"	}, /* 6270 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 6267 */
+	{ 4,	TD,	sys_sync_file_range,	"sync_file_range" }, /* 6268 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 6269 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 6270 */
 	{ 6,	0,	printargs,		"move_pages"	}, /* 6271 */
-	{ 2,	0,	printargs,		"set_robust_list" }, /* 6272 */
-	{ 3,	0,	printargs,		"get_robust_list" }, /* 6273 */
-	{ 5,	0,	printargs,		"kexec_load"	}, /* 6274 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 6272 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 6273 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 6274 */
 	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 6275 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 6276 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 6277 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 6278 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 6276 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 6277 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 6278 */
 	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 6279 */
 	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 6280 */
-	{ 0,	0,	printargs,		"SYS_6281"	}, /* 6281 */
+	{ 0,	0,	NULL,			NULL		}, /* 6281 */
 	{ 1,	TD,	sys_eventfd,		"eventfd"	}, /* 6282 */
 	{ 6,	TD,	sys_fallocate,		"fallocate"	}, /* 6283 */
 	{ 2,	TD,	sys_timerfd_create,	"timerfd_create" }, /* 6284 */
@@ -6947,16 +6957,24 @@
 	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 6290 */
 	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 6291 */
 	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 6292 */
-	{ 5,	TD,	printargs,		"preadv"	}, /* 6293 */
-	{ 5,	TD,	printargs,		"pwritev"	}, /* 6294 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo" }, /* 6295 */
-	{ 5,	TD,	printargs,		"perf_event_open" }, /* 6296 */
+	{ 5,	TD,	sys_preadv,		"preadv"	}, /* 6293 */
+	{ 5,	TD,	sys_pwritev,		"pwritev"	}, /* 6294 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo" }, /* 6295 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open" }, /* 6296 */
 	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 6297 */
 	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 6298 */
 	{ 3,	TD,	sys_getdents,		"getdents"	}, /* 6299 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 6300 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 6301 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 6302 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 6300 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 6301 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 6302 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 6303 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 6304 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 6305 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 6306 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 6307 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 6308 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 6309 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 6310 */
 
 #else
 	{ 0,	0,	printargs,		"n32_read"		}, /* 6000 */
@@ -7262,704 +7280,701 @@
 	{ 2,	0,	printargs,		"n32_fanotify_init"	}, /* 6300 */
 	{ 5,	0,	printargs,		"n32_fanotify_mark"	}, /* 6301 */
 	{ 4,	0,	printargs,		"n32_prlimit64"		}, /* 6302 */
+	{ 5,	TD|TF,	printargs,		"n32_name_to_handle_at"	}, /* 6303 */
+	{ 3,	TD,	printargs,		"n32_open_by_handle_at"	}, /* 6304 */
+	{ 2,	0,	printargs,		"n32_clock_adjtime"	}, /* 6305 */
+	{ 1,	TD,	printargs,		"n32_syncfs"		}, /* 6306 */
+	{ 4,	TN,	printargs,		"n32_sendmmsg"		}, /* 6307 */
+	{ 2,	TD,	printargs,		"n32_setns"		}, /* 6308 */
+	{ 6,	0,	printargs,		"n32_process_vm_readv"	}, /* 6309 */
+	{ 6,	0,	printargs,		"n32_process_vm_writev"	}, /* 6310 */
 #endif
-	{ 0,	0,	printargs,		"SYS_6300"	}, /* 6300 */
-	{ 0,	0,	printargs,		"SYS_6301"	}, /* 6301 */
-	{ 0,	0,	printargs,		"SYS_6302"	}, /* 6302 */
-	{ 0,	0,	printargs,		"SYS_6303"	}, /* 6303 */
-	{ 0,	0,	printargs,		"SYS_6304"	}, /* 6304 */
-	{ 0,	0,	printargs,		"SYS_6305"	}, /* 6305 */
-	{ 0,	0,	printargs,		"SYS_6306"	}, /* 6306 */
-	{ 0,	0,	printargs,		"SYS_6307"	}, /* 6307 */
-	{ 0,	0,	printargs,		"SYS_6308"	}, /* 6308 */
-	{ 0,	0,	printargs,		"SYS_6309"	}, /* 6309 */
-	{ 0,	0,	printargs,		"SYS_6310"	}, /* 6310 */
-	{ 0,	0,	printargs,		"SYS_6311"	}, /* 6311 */
-	{ 0,	0,	printargs,		"SYS_6312"	}, /* 6312 */
-	{ 0,	0,	printargs,		"SYS_6313"	}, /* 6313 */
-	{ 0,	0,	printargs,		"SYS_6314"	}, /* 6314 */
-	{ 0,	0,	printargs,		"SYS_6315"	}, /* 6315 */
-	{ 0,	0,	printargs,		"SYS_6316"	}, /* 6316 */
-	{ 0,	0,	printargs,		"SYS_6317"	}, /* 6317 */
-	{ 0,	0,	printargs,		"SYS_6318"	}, /* 6318 */
-	{ 0,	0,	printargs,		"SYS_6319"	}, /* 6319 */
-	{ 0,	0,	printargs,		"SYS_6320"	}, /* 6320 */
-	{ 0,	0,	printargs,		"SYS_6321"	}, /* 6321 */
-	{ 0,	0,	printargs,		"SYS_6322"	}, /* 6322 */
-	{ 0,	0,	printargs,		"SYS_6323"	}, /* 6323 */
-	{ 0,	0,	printargs,		"SYS_6324"	}, /* 6324 */
-	{ 0,	0,	printargs,		"SYS_6325"	}, /* 6325 */
-	{ 0,	0,	printargs,		"SYS_6326"	}, /* 6326 */
-	{ 0,	0,	printargs,		"SYS_6327"	}, /* 6327 */
-	{ 0,	0,	printargs,		"SYS_6328"	}, /* 6328 */
-	{ 0,	0,	printargs,		"SYS_6329"	}, /* 6329 */
-	{ 0,	0,	printargs,		"SYS_6330"	}, /* 6330 */
-	{ 0,	0,	printargs,		"SYS_6331"	}, /* 6331 */
-	{ 0,	0,	printargs,		"SYS_6332"	}, /* 6332 */
-	{ 0,	0,	printargs,		"SYS_6333"	}, /* 6333 */
-	{ 0,	0,	printargs,		"SYS_6334"	}, /* 6334 */
-	{ 0,	0,	printargs,		"SYS_6335"	}, /* 6335 */
-	{ 0,	0,	printargs,		"SYS_6336"	}, /* 6336 */
-	{ 0,	0,	printargs,		"SYS_6337"	}, /* 6337 */
-	{ 0,	0,	printargs,		"SYS_6338"	}, /* 6338 */
-	{ 0,	0,	printargs,		"SYS_6339"	}, /* 6339 */
-	{ 0,	0,	printargs,		"SYS_6340"	}, /* 6340 */
-	{ 0,	0,	printargs,		"SYS_6341"	}, /* 6341 */
-	{ 0,	0,	printargs,		"SYS_6342"	}, /* 6342 */
-	{ 0,	0,	printargs,		"SYS_6343"	}, /* 6343 */
-	{ 0,	0,	printargs,		"SYS_6344"	}, /* 6344 */
-	{ 0,	0,	printargs,		"SYS_6345"	}, /* 6345 */
-	{ 0,	0,	printargs,		"SYS_6346"	}, /* 6346 */
-	{ 0,	0,	printargs,		"SYS_6347"	}, /* 6347 */
-	{ 0,	0,	printargs,		"SYS_6348"	}, /* 6348 */
-	{ 0,	0,	printargs,		"SYS_6349"	}, /* 6349 */
-	{ 0,	0,	printargs,		"SYS_6350"	}, /* 6350 */
-	{ 0,	0,	printargs,		"SYS_6351"	}, /* 6351 */
-	{ 0,	0,	printargs,		"SYS_6352"	}, /* 6352 */
-	{ 0,	0,	printargs,		"SYS_6353"	}, /* 6353 */
-	{ 0,	0,	printargs,		"SYS_6354"	}, /* 6354 */
-	{ 0,	0,	printargs,		"SYS_6355"	}, /* 6355 */
-	{ 0,	0,	printargs,		"SYS_6356"	}, /* 6356 */
-	{ 0,	0,	printargs,		"SYS_6357"	}, /* 6357 */
-	{ 0,	0,	printargs,		"SYS_6358"	}, /* 6358 */
-	{ 0,	0,	printargs,		"SYS_6359"	}, /* 6359 */
-	{ 0,	0,	printargs,		"SYS_6360"	}, /* 6360 */
-	{ 0,	0,	printargs,		"SYS_6361"	}, /* 6361 */
-	{ 0,	0,	printargs,		"SYS_6362"	}, /* 6362 */
-	{ 0,	0,	printargs,		"SYS_6363"	}, /* 6363 */
-	{ 0,	0,	printargs,		"SYS_6364"	}, /* 6364 */
-	{ 0,	0,	printargs,		"SYS_6365"	}, /* 6365 */
-	{ 0,	0,	printargs,		"SYS_6366"	}, /* 6366 */
-	{ 0,	0,	printargs,		"SYS_6367"	}, /* 6367 */
-	{ 0,	0,	printargs,		"SYS_6368"	}, /* 6368 */
-	{ 0,	0,	printargs,		"SYS_6369"	}, /* 6369 */
-	{ 0,	0,	printargs,		"SYS_6370"	}, /* 6370 */
-	{ 0,	0,	printargs,		"SYS_6371"	}, /* 6371 */
-	{ 0,	0,	printargs,		"SYS_6372"	}, /* 6372 */
-	{ 0,	0,	printargs,		"SYS_6373"	}, /* 6373 */
-	{ 0,	0,	printargs,		"SYS_6374"	}, /* 6374 */
-	{ 0,	0,	printargs,		"SYS_6375"	}, /* 6375 */
-	{ 0,	0,	printargs,		"SYS_6376"	}, /* 6376 */
-	{ 0,	0,	printargs,		"SYS_6377"	}, /* 6377 */
-	{ 0,	0,	printargs,		"SYS_6378"	}, /* 6378 */
-	{ 0,	0,	printargs,		"SYS_6379"	}, /* 6379 */
-	{ 0,	0,	printargs,		"SYS_6380"	}, /* 6380 */
-	{ 0,	0,	printargs,		"SYS_6381"	}, /* 6381 */
-	{ 0,	0,	printargs,		"SYS_6382"	}, /* 6382 */
-	{ 0,	0,	printargs,		"SYS_6383"	}, /* 6383 */
-	{ 0,	0,	printargs,		"SYS_6384"	}, /* 6384 */
-	{ 0,	0,	printargs,		"SYS_6385"	}, /* 6385 */
-	{ 0,	0,	printargs,		"SYS_6386"	}, /* 6386 */
-	{ 0,	0,	printargs,		"SYS_6387"	}, /* 6387 */
-	{ 0,	0,	printargs,		"SYS_6388"	}, /* 6388 */
-	{ 0,	0,	printargs,		"SYS_6389"	}, /* 6389 */
-	{ 0,	0,	printargs,		"SYS_6390"	}, /* 6390 */
-	{ 0,	0,	printargs,		"SYS_6391"	}, /* 6391 */
-	{ 0,	0,	printargs,		"SYS_6392"	}, /* 6392 */
-	{ 0,	0,	printargs,		"SYS_6393"	}, /* 6393 */
-	{ 0,	0,	printargs,		"SYS_6394"	}, /* 6394 */
-	{ 0,	0,	printargs,		"SYS_6395"	}, /* 6395 */
-	{ 0,	0,	printargs,		"SYS_6396"	}, /* 6396 */
-	{ 0,	0,	printargs,		"SYS_6397"	}, /* 6397 */
-	{ 0,	0,	printargs,		"SYS_6398"	}, /* 6398 */
-	{ 0,	0,	printargs,		"SYS_6399"	}, /* 6399 */
-	{ 0,	0,	printargs,		"SYS_6400"	}, /* 6400 */
-	{ 0,	0,	printargs,		"SYS_6401"	}, /* 6401 */
-	{ 0,	0,	printargs,		"SYS_6402"	}, /* 6402 */
-	{ 0,	0,	printargs,		"SYS_6403"	}, /* 6403 */
-	{ 0,	0,	printargs,		"SYS_6404"	}, /* 6404 */
-	{ 0,	0,	printargs,		"SYS_6405"	}, /* 6405 */
-	{ 0,	0,	printargs,		"SYS_6406"	}, /* 6406 */
-	{ 0,	0,	printargs,		"SYS_6407"	}, /* 6407 */
-	{ 0,	0,	printargs,		"SYS_6408"	}, /* 6408 */
-	{ 0,	0,	printargs,		"SYS_6409"	}, /* 6409 */
-	{ 0,	0,	printargs,		"SYS_6410"	}, /* 6410 */
-	{ 0,	0,	printargs,		"SYS_6411"	}, /* 6411 */
-	{ 0,	0,	printargs,		"SYS_6412"	}, /* 6412 */
-	{ 0,	0,	printargs,		"SYS_6413"	}, /* 6413 */
-	{ 0,	0,	printargs,		"SYS_6414"	}, /* 6414 */
-	{ 0,	0,	printargs,		"SYS_6415"	}, /* 6415 */
-	{ 0,	0,	printargs,		"SYS_6416"	}, /* 6416 */
-	{ 0,	0,	printargs,		"SYS_6417"	}, /* 6417 */
-	{ 0,	0,	printargs,		"SYS_6418"	}, /* 6418 */
-	{ 0,	0,	printargs,		"SYS_6419"	}, /* 6419 */
-	{ 0,	0,	printargs,		"SYS_6420"	}, /* 6420 */
-	{ 0,	0,	printargs,		"SYS_6421"	}, /* 6421 */
-	{ 0,	0,	printargs,		"SYS_6422"	}, /* 6422 */
-	{ 0,	0,	printargs,		"SYS_6423"	}, /* 6423 */
-	{ 0,	0,	printargs,		"SYS_6424"	}, /* 6424 */
-	{ 0,	0,	printargs,		"SYS_6425"	}, /* 6425 */
-	{ 0,	0,	printargs,		"SYS_6426"	}, /* 6426 */
-	{ 0,	0,	printargs,		"SYS_6427"	}, /* 6427 */
-	{ 0,	0,	printargs,		"SYS_6428"	}, /* 6428 */
-	{ 0,	0,	printargs,		"SYS_6429"	}, /* 6429 */
-	{ 0,	0,	printargs,		"SYS_6430"	}, /* 6430 */
-	{ 0,	0,	printargs,		"SYS_6431"	}, /* 6431 */
-	{ 0,	0,	printargs,		"SYS_6432"	}, /* 6432 */
-	{ 0,	0,	printargs,		"SYS_6433"	}, /* 6433 */
-	{ 0,	0,	printargs,		"SYS_6434"	}, /* 6434 */
-	{ 0,	0,	printargs,		"SYS_6435"	}, /* 6435 */
-	{ 0,	0,	printargs,		"SYS_6436"	}, /* 6436 */
-	{ 0,	0,	printargs,		"SYS_6437"	}, /* 6437 */
-	{ 0,	0,	printargs,		"SYS_6438"	}, /* 6438 */
-	{ 0,	0,	printargs,		"SYS_6439"	}, /* 6439 */
-	{ 0,	0,	printargs,		"SYS_6440"	}, /* 6440 */
-	{ 0,	0,	printargs,		"SYS_6441"	}, /* 6441 */
-	{ 0,	0,	printargs,		"SYS_6442"	}, /* 6442 */
-	{ 0,	0,	printargs,		"SYS_6443"	}, /* 6443 */
-	{ 0,	0,	printargs,		"SYS_6444"	}, /* 6444 */
-	{ 0,	0,	printargs,		"SYS_6445"	}, /* 6445 */
-	{ 0,	0,	printargs,		"SYS_6446"	}, /* 6446 */
-	{ 0,	0,	printargs,		"SYS_6447"	}, /* 6447 */
-	{ 0,	0,	printargs,		"SYS_6448"	}, /* 6448 */
-	{ 0,	0,	printargs,		"SYS_6449"	}, /* 6449 */
-	{ 0,	0,	printargs,		"SYS_6450"	}, /* 6450 */
-	{ 0,	0,	printargs,		"SYS_6451"	}, /* 6451 */
-	{ 0,	0,	printargs,		"SYS_6452"	}, /* 6452 */
-	{ 0,	0,	printargs,		"SYS_6453"	}, /* 6453 */
-	{ 0,	0,	printargs,		"SYS_6454"	}, /* 6454 */
-	{ 0,	0,	printargs,		"SYS_6455"	}, /* 6455 */
-	{ 0,	0,	printargs,		"SYS_6456"	}, /* 6456 */
-	{ 0,	0,	printargs,		"SYS_6457"	}, /* 6457 */
-	{ 0,	0,	printargs,		"SYS_6458"	}, /* 6458 */
-	{ 0,	0,	printargs,		"SYS_6459"	}, /* 6459 */
-	{ 0,	0,	printargs,		"SYS_6460"	}, /* 6460 */
-	{ 0,	0,	printargs,		"SYS_6461"	}, /* 6461 */
-	{ 0,	0,	printargs,		"SYS_6462"	}, /* 6462 */
-	{ 0,	0,	printargs,		"SYS_6463"	}, /* 6463 */
-	{ 0,	0,	printargs,		"SYS_6464"	}, /* 6464 */
-	{ 0,	0,	printargs,		"SYS_6465"	}, /* 6465 */
-	{ 0,	0,	printargs,		"SYS_6466"	}, /* 6466 */
-	{ 0,	0,	printargs,		"SYS_6467"	}, /* 6467 */
-	{ 0,	0,	printargs,		"SYS_6468"	}, /* 6468 */
-	{ 0,	0,	printargs,		"SYS_6469"	}, /* 6469 */
-	{ 0,	0,	printargs,		"SYS_6470"	}, /* 6470 */
-	{ 0,	0,	printargs,		"SYS_6471"	}, /* 6471 */
-	{ 0,	0,	printargs,		"SYS_6472"	}, /* 6472 */
-	{ 0,	0,	printargs,		"SYS_6473"	}, /* 6473 */
-	{ 0,	0,	printargs,		"SYS_6474"	}, /* 6474 */
-	{ 0,	0,	printargs,		"SYS_6475"	}, /* 6475 */
-	{ 0,	0,	printargs,		"SYS_6476"	}, /* 6476 */
-	{ 0,	0,	printargs,		"SYS_6477"	}, /* 6477 */
-	{ 0,	0,	printargs,		"SYS_6478"	}, /* 6478 */
-	{ 0,	0,	printargs,		"SYS_6479"	}, /* 6479 */
-	{ 0,	0,	printargs,		"SYS_6480"	}, /* 6480 */
-	{ 0,	0,	printargs,		"SYS_6481"	}, /* 6481 */
-	{ 0,	0,	printargs,		"SYS_6482"	}, /* 6482 */
-	{ 0,	0,	printargs,		"SYS_6483"	}, /* 6483 */
-	{ 0,	0,	printargs,		"SYS_6484"	}, /* 6484 */
-	{ 0,	0,	printargs,		"SYS_6485"	}, /* 6485 */
-	{ 0,	0,	printargs,		"SYS_6486"	}, /* 6486 */
-	{ 0,	0,	printargs,		"SYS_6487"	}, /* 6487 */
-	{ 0,	0,	printargs,		"SYS_6488"	}, /* 6488 */
-	{ 0,	0,	printargs,		"SYS_6489"	}, /* 6489 */
-	{ 0,	0,	printargs,		"SYS_6490"	}, /* 6490 */
-	{ 0,	0,	printargs,		"SYS_6491"	}, /* 6491 */
-	{ 0,	0,	printargs,		"SYS_6492"	}, /* 6492 */
-	{ 0,	0,	printargs,		"SYS_6493"	}, /* 6493 */
-	{ 0,	0,	printargs,		"SYS_6494"	}, /* 6494 */
-	{ 0,	0,	printargs,		"SYS_6495"	}, /* 6495 */
-	{ 0,	0,	printargs,		"SYS_6496"	}, /* 6496 */
-	{ 0,	0,	printargs,		"SYS_6497"	}, /* 6497 */
-	{ 0,	0,	printargs,		"SYS_6498"	}, /* 6498 */
-	{ 0,	0,	printargs,		"SYS_6499"	}, /* 6499 */
-	{ 0,	0,	printargs,		"SYS_6500"	}, /* 6500 */
-	{ 0,	0,	printargs,		"SYS_6501"	}, /* 6501 */
-	{ 0,	0,	printargs,		"SYS_6502"	}, /* 6502 */
-	{ 0,	0,	printargs,		"SYS_6503"	}, /* 6503 */
-	{ 0,	0,	printargs,		"SYS_6504"	}, /* 6504 */
-	{ 0,	0,	printargs,		"SYS_6505"	}, /* 6505 */
-	{ 0,	0,	printargs,		"SYS_6506"	}, /* 6506 */
-	{ 0,	0,	printargs,		"SYS_6507"	}, /* 6507 */
-	{ 0,	0,	printargs,		"SYS_6508"	}, /* 6508 */
-	{ 0,	0,	printargs,		"SYS_6509"	}, /* 6509 */
-	{ 0,	0,	printargs,		"SYS_6510"	}, /* 6510 */
-	{ 0,	0,	printargs,		"SYS_6511"	}, /* 6511 */
-	{ 0,	0,	printargs,		"SYS_6512"	}, /* 6512 */
-	{ 0,	0,	printargs,		"SYS_6513"	}, /* 6513 */
-	{ 0,	0,	printargs,		"SYS_6514"	}, /* 6514 */
-	{ 0,	0,	printargs,		"SYS_6515"	}, /* 6515 */
-	{ 0,	0,	printargs,		"SYS_6516"	}, /* 6516 */
-	{ 0,	0,	printargs,		"SYS_6517"	}, /* 6517 */
-	{ 0,	0,	printargs,		"SYS_6518"	}, /* 6518 */
-	{ 0,	0,	printargs,		"SYS_6519"	}, /* 6519 */
-	{ 0,	0,	printargs,		"SYS_6520"	}, /* 6520 */
-	{ 0,	0,	printargs,		"SYS_6521"	}, /* 6521 */
-	{ 0,	0,	printargs,		"SYS_6522"	}, /* 6522 */
-	{ 0,	0,	printargs,		"SYS_6523"	}, /* 6523 */
-	{ 0,	0,	printargs,		"SYS_6524"	}, /* 6524 */
-	{ 0,	0,	printargs,		"SYS_6525"	}, /* 6525 */
-	{ 0,	0,	printargs,		"SYS_6526"	}, /* 6526 */
-	{ 0,	0,	printargs,		"SYS_6527"	}, /* 6527 */
-	{ 0,	0,	printargs,		"SYS_6528"	}, /* 6528 */
-	{ 0,	0,	printargs,		"SYS_6529"	}, /* 6529 */
-	{ 0,	0,	printargs,		"SYS_6530"	}, /* 6530 */
-	{ 0,	0,	printargs,		"SYS_6531"	}, /* 6531 */
-	{ 0,	0,	printargs,		"SYS_6532"	}, /* 6532 */
-	{ 0,	0,	printargs,		"SYS_6533"	}, /* 6533 */
-	{ 0,	0,	printargs,		"SYS_6534"	}, /* 6534 */
-	{ 0,	0,	printargs,		"SYS_6535"	}, /* 6535 */
-	{ 0,	0,	printargs,		"SYS_6536"	}, /* 6536 */
-	{ 0,	0,	printargs,		"SYS_6537"	}, /* 6537 */
-	{ 0,	0,	printargs,		"SYS_6538"	}, /* 6538 */
-	{ 0,	0,	printargs,		"SYS_6539"	}, /* 6539 */
-	{ 0,	0,	printargs,		"SYS_6540"	}, /* 6540 */
-	{ 0,	0,	printargs,		"SYS_6541"	}, /* 6541 */
-	{ 0,	0,	printargs,		"SYS_6542"	}, /* 6542 */
-	{ 0,	0,	printargs,		"SYS_6543"	}, /* 6543 */
-	{ 0,	0,	printargs,		"SYS_6544"	}, /* 6544 */
-	{ 0,	0,	printargs,		"SYS_6545"	}, /* 6545 */
-	{ 0,	0,	printargs,		"SYS_6546"	}, /* 6546 */
-	{ 0,	0,	printargs,		"SYS_6547"	}, /* 6547 */
-	{ 0,	0,	printargs,		"SYS_6548"	}, /* 6548 */
-	{ 0,	0,	printargs,		"SYS_6549"	}, /* 6549 */
-	{ 0,	0,	printargs,		"SYS_6550"	}, /* 6550 */
-	{ 0,	0,	printargs,		"SYS_6551"	}, /* 6551 */
-	{ 0,	0,	printargs,		"SYS_6552"	}, /* 6552 */
-	{ 0,	0,	printargs,		"SYS_6553"	}, /* 6553 */
-	{ 0,	0,	printargs,		"SYS_6554"	}, /* 6554 */
-	{ 0,	0,	printargs,		"SYS_6555"	}, /* 6555 */
-	{ 0,	0,	printargs,		"SYS_6556"	}, /* 6556 */
-	{ 0,	0,	printargs,		"SYS_6557"	}, /* 6557 */
-	{ 0,	0,	printargs,		"SYS_6558"	}, /* 6558 */
-	{ 0,	0,	printargs,		"SYS_6559"	}, /* 6559 */
-	{ 0,	0,	printargs,		"SYS_6560"	}, /* 6560 */
-	{ 0,	0,	printargs,		"SYS_6561"	}, /* 6561 */
-	{ 0,	0,	printargs,		"SYS_6562"	}, /* 6562 */
-	{ 0,	0,	printargs,		"SYS_6563"	}, /* 6563 */
-	{ 0,	0,	printargs,		"SYS_6564"	}, /* 6564 */
-	{ 0,	0,	printargs,		"SYS_6565"	}, /* 6565 */
-	{ 0,	0,	printargs,		"SYS_6566"	}, /* 6566 */
-	{ 0,	0,	printargs,		"SYS_6567"	}, /* 6567 */
-	{ 0,	0,	printargs,		"SYS_6568"	}, /* 6568 */
-	{ 0,	0,	printargs,		"SYS_6569"	}, /* 6569 */
-	{ 0,	0,	printargs,		"SYS_6570"	}, /* 6570 */
-	{ 0,	0,	printargs,		"SYS_6571"	}, /* 6571 */
-	{ 0,	0,	printargs,		"SYS_6572"	}, /* 6572 */
-	{ 0,	0,	printargs,		"SYS_6573"	}, /* 6573 */
-	{ 0,	0,	printargs,		"SYS_6574"	}, /* 6574 */
-	{ 0,	0,	printargs,		"SYS_6575"	}, /* 6575 */
-	{ 0,	0,	printargs,		"SYS_6576"	}, /* 6576 */
-	{ 0,	0,	printargs,		"SYS_6577"	}, /* 6577 */
-	{ 0,	0,	printargs,		"SYS_6578"	}, /* 6578 */
-	{ 0,	0,	printargs,		"SYS_6579"	}, /* 6579 */
-	{ 0,	0,	printargs,		"SYS_6580"	}, /* 6580 */
-	{ 0,	0,	printargs,		"SYS_6581"	}, /* 6581 */
-	{ 0,	0,	printargs,		"SYS_6582"	}, /* 6582 */
-	{ 0,	0,	printargs,		"SYS_6583"	}, /* 6583 */
-	{ 0,	0,	printargs,		"SYS_6584"	}, /* 6584 */
-	{ 0,	0,	printargs,		"SYS_6585"	}, /* 6585 */
-	{ 0,	0,	printargs,		"SYS_6586"	}, /* 6586 */
-	{ 0,	0,	printargs,		"SYS_6587"	}, /* 6587 */
-	{ 0,	0,	printargs,		"SYS_6588"	}, /* 6588 */
-	{ 0,	0,	printargs,		"SYS_6589"	}, /* 6589 */
-	{ 0,	0,	printargs,		"SYS_6590"	}, /* 6590 */
-	{ 0,	0,	printargs,		"SYS_6591"	}, /* 6591 */
-	{ 0,	0,	printargs,		"SYS_6592"	}, /* 6592 */
-	{ 0,	0,	printargs,		"SYS_6593"	}, /* 6593 */
-	{ 0,	0,	printargs,		"SYS_6594"	}, /* 6594 */
-	{ 0,	0,	printargs,		"SYS_6595"	}, /* 6595 */
-	{ 0,	0,	printargs,		"SYS_6596"	}, /* 6596 */
-	{ 0,	0,	printargs,		"SYS_6597"	}, /* 6597 */
-	{ 0,	0,	printargs,		"SYS_6598"	}, /* 6598 */
-	{ 0,	0,	printargs,		"SYS_6599"	}, /* 6599 */
-	{ 0,	0,	printargs,		"SYS_6600"	}, /* 6600 */
-	{ 0,	0,	printargs,		"SYS_6601"	}, /* 6601 */
-	{ 0,	0,	printargs,		"SYS_6602"	}, /* 6602 */
-	{ 0,	0,	printargs,		"SYS_6603"	}, /* 6603 */
-	{ 0,	0,	printargs,		"SYS_6604"	}, /* 6604 */
-	{ 0,	0,	printargs,		"SYS_6605"	}, /* 6605 */
-	{ 0,	0,	printargs,		"SYS_6606"	}, /* 6606 */
-	{ 0,	0,	printargs,		"SYS_6607"	}, /* 6607 */
-	{ 0,	0,	printargs,		"SYS_6608"	}, /* 6608 */
-	{ 0,	0,	printargs,		"SYS_6609"	}, /* 6609 */
-	{ 0,	0,	printargs,		"SYS_6610"	}, /* 6610 */
-	{ 0,	0,	printargs,		"SYS_6611"	}, /* 6611 */
-	{ 0,	0,	printargs,		"SYS_6612"	}, /* 6612 */
-	{ 0,	0,	printargs,		"SYS_6613"	}, /* 6613 */
-	{ 0,	0,	printargs,		"SYS_6614"	}, /* 6614 */
-	{ 0,	0,	printargs,		"SYS_6615"	}, /* 6615 */
-	{ 0,	0,	printargs,		"SYS_6616"	}, /* 6616 */
-	{ 0,	0,	printargs,		"SYS_6617"	}, /* 6617 */
-	{ 0,	0,	printargs,		"SYS_6618"	}, /* 6618 */
-	{ 0,	0,	printargs,		"SYS_6619"	}, /* 6619 */
-	{ 0,	0,	printargs,		"SYS_6620"	}, /* 6620 */
-	{ 0,	0,	printargs,		"SYS_6621"	}, /* 6621 */
-	{ 0,	0,	printargs,		"SYS_6622"	}, /* 6622 */
-	{ 0,	0,	printargs,		"SYS_6623"	}, /* 6623 */
-	{ 0,	0,	printargs,		"SYS_6624"	}, /* 6624 */
-	{ 0,	0,	printargs,		"SYS_6625"	}, /* 6625 */
-	{ 0,	0,	printargs,		"SYS_6626"	}, /* 6626 */
-	{ 0,	0,	printargs,		"SYS_6627"	}, /* 6627 */
-	{ 0,	0,	printargs,		"SYS_6628"	}, /* 6628 */
-	{ 0,	0,	printargs,		"SYS_6629"	}, /* 6629 */
-	{ 0,	0,	printargs,		"SYS_6630"	}, /* 6630 */
-	{ 0,	0,	printargs,		"SYS_6631"	}, /* 6631 */
-	{ 0,	0,	printargs,		"SYS_6632"	}, /* 6632 */
-	{ 0,	0,	printargs,		"SYS_6633"	}, /* 6633 */
-	{ 0,	0,	printargs,		"SYS_6634"	}, /* 6634 */
-	{ 0,	0,	printargs,		"SYS_6635"	}, /* 6635 */
-	{ 0,	0,	printargs,		"SYS_6636"	}, /* 6636 */
-	{ 0,	0,	printargs,		"SYS_6637"	}, /* 6637 */
-	{ 0,	0,	printargs,		"SYS_6638"	}, /* 6638 */
-	{ 0,	0,	printargs,		"SYS_6639"	}, /* 6639 */
-	{ 0,	0,	printargs,		"SYS_6640"	}, /* 6640 */
-	{ 0,	0,	printargs,		"SYS_6641"	}, /* 6641 */
-	{ 0,	0,	printargs,		"SYS_6642"	}, /* 6642 */
-	{ 0,	0,	printargs,		"SYS_6643"	}, /* 6643 */
-	{ 0,	0,	printargs,		"SYS_6644"	}, /* 6644 */
-	{ 0,	0,	printargs,		"SYS_6645"	}, /* 6645 */
-	{ 0,	0,	printargs,		"SYS_6646"	}, /* 6646 */
-	{ 0,	0,	printargs,		"SYS_6647"	}, /* 6647 */
-	{ 0,	0,	printargs,		"SYS_6648"	}, /* 6648 */
-	{ 0,	0,	printargs,		"SYS_6649"	}, /* 6649 */
-	{ 0,	0,	printargs,		"SYS_6650"	}, /* 6650 */
-	{ 0,	0,	printargs,		"SYS_6651"	}, /* 6651 */
-	{ 0,	0,	printargs,		"SYS_6652"	}, /* 6652 */
-	{ 0,	0,	printargs,		"SYS_6653"	}, /* 6653 */
-	{ 0,	0,	printargs,		"SYS_6654"	}, /* 6654 */
-	{ 0,	0,	printargs,		"SYS_6655"	}, /* 6655 */
-	{ 0,	0,	printargs,		"SYS_6656"	}, /* 6656 */
-	{ 0,	0,	printargs,		"SYS_6657"	}, /* 6657 */
-	{ 0,	0,	printargs,		"SYS_6658"	}, /* 6658 */
-	{ 0,	0,	printargs,		"SYS_6659"	}, /* 6659 */
-	{ 0,	0,	printargs,		"SYS_6660"	}, /* 6660 */
-	{ 0,	0,	printargs,		"SYS_6661"	}, /* 6661 */
-	{ 0,	0,	printargs,		"SYS_6662"	}, /* 6662 */
-	{ 0,	0,	printargs,		"SYS_6663"	}, /* 6663 */
-	{ 0,	0,	printargs,		"SYS_6664"	}, /* 6664 */
-	{ 0,	0,	printargs,		"SYS_6665"	}, /* 6665 */
-	{ 0,	0,	printargs,		"SYS_6666"	}, /* 6666 */
-	{ 0,	0,	printargs,		"SYS_6667"	}, /* 6667 */
-	{ 0,	0,	printargs,		"SYS_6668"	}, /* 6668 */
-	{ 0,	0,	printargs,		"SYS_6669"	}, /* 6669 */
-	{ 0,	0,	printargs,		"SYS_6670"	}, /* 6670 */
-	{ 0,	0,	printargs,		"SYS_6671"	}, /* 6671 */
-	{ 0,	0,	printargs,		"SYS_6672"	}, /* 6672 */
-	{ 0,	0,	printargs,		"SYS_6673"	}, /* 6673 */
-	{ 0,	0,	printargs,		"SYS_6674"	}, /* 6674 */
-	{ 0,	0,	printargs,		"SYS_6675"	}, /* 6675 */
-	{ 0,	0,	printargs,		"SYS_6676"	}, /* 6676 */
-	{ 0,	0,	printargs,		"SYS_6677"	}, /* 6677 */
-	{ 0,	0,	printargs,		"SYS_6678"	}, /* 6678 */
-	{ 0,	0,	printargs,		"SYS_6679"	}, /* 6679 */
-	{ 0,	0,	printargs,		"SYS_6680"	}, /* 6680 */
-	{ 0,	0,	printargs,		"SYS_6681"	}, /* 6681 */
-	{ 0,	0,	printargs,		"SYS_6682"	}, /* 6682 */
-	{ 0,	0,	printargs,		"SYS_6683"	}, /* 6683 */
-	{ 0,	0,	printargs,		"SYS_6684"	}, /* 6684 */
-	{ 0,	0,	printargs,		"SYS_6685"	}, /* 6685 */
-	{ 0,	0,	printargs,		"SYS_6686"	}, /* 6686 */
-	{ 0,	0,	printargs,		"SYS_6687"	}, /* 6687 */
-	{ 0,	0,	printargs,		"SYS_6688"	}, /* 6688 */
-	{ 0,	0,	printargs,		"SYS_6689"	}, /* 6689 */
-	{ 0,	0,	printargs,		"SYS_6690"	}, /* 6690 */
-	{ 0,	0,	printargs,		"SYS_6691"	}, /* 6691 */
-	{ 0,	0,	printargs,		"SYS_6692"	}, /* 6692 */
-	{ 0,	0,	printargs,		"SYS_6693"	}, /* 6693 */
-	{ 0,	0,	printargs,		"SYS_6694"	}, /* 6694 */
-	{ 0,	0,	printargs,		"SYS_6695"	}, /* 6695 */
-	{ 0,	0,	printargs,		"SYS_6696"	}, /* 6696 */
-	{ 0,	0,	printargs,		"SYS_6697"	}, /* 6697 */
-	{ 0,	0,	printargs,		"SYS_6698"	}, /* 6698 */
-	{ 0,	0,	printargs,		"SYS_6699"	}, /* 6699 */
-	{ 0,	0,	printargs,		"SYS_6700"	}, /* 6700 */
-	{ 0,	0,	printargs,		"SYS_6701"	}, /* 6701 */
-	{ 0,	0,	printargs,		"SYS_6702"	}, /* 6702 */
-	{ 0,	0,	printargs,		"SYS_6703"	}, /* 6703 */
-	{ 0,	0,	printargs,		"SYS_6704"	}, /* 6704 */
-	{ 0,	0,	printargs,		"SYS_6705"	}, /* 6705 */
-	{ 0,	0,	printargs,		"SYS_6706"	}, /* 6706 */
-	{ 0,	0,	printargs,		"SYS_6707"	}, /* 6707 */
-	{ 0,	0,	printargs,		"SYS_6708"	}, /* 6708 */
-	{ 0,	0,	printargs,		"SYS_6709"	}, /* 6709 */
-	{ 0,	0,	printargs,		"SYS_6710"	}, /* 6710 */
-	{ 0,	0,	printargs,		"SYS_6711"	}, /* 6711 */
-	{ 0,	0,	printargs,		"SYS_6712"	}, /* 6712 */
-	{ 0,	0,	printargs,		"SYS_6713"	}, /* 6713 */
-	{ 0,	0,	printargs,		"SYS_6714"	}, /* 6714 */
-	{ 0,	0,	printargs,		"SYS_6715"	}, /* 6715 */
-	{ 0,	0,	printargs,		"SYS_6716"	}, /* 6716 */
-	{ 0,	0,	printargs,		"SYS_6717"	}, /* 6717 */
-	{ 0,	0,	printargs,		"SYS_6718"	}, /* 6718 */
-	{ 0,	0,	printargs,		"SYS_6719"	}, /* 6719 */
-	{ 0,	0,	printargs,		"SYS_6720"	}, /* 6720 */
-	{ 0,	0,	printargs,		"SYS_6721"	}, /* 6721 */
-	{ 0,	0,	printargs,		"SYS_6722"	}, /* 6722 */
-	{ 0,	0,	printargs,		"SYS_6723"	}, /* 6723 */
-	{ 0,	0,	printargs,		"SYS_6724"	}, /* 6724 */
-	{ 0,	0,	printargs,		"SYS_6725"	}, /* 6725 */
-	{ 0,	0,	printargs,		"SYS_6726"	}, /* 6726 */
-	{ 0,	0,	printargs,		"SYS_6727"	}, /* 6727 */
-	{ 0,	0,	printargs,		"SYS_6728"	}, /* 6728 */
-	{ 0,	0,	printargs,		"SYS_6729"	}, /* 6729 */
-	{ 0,	0,	printargs,		"SYS_6730"	}, /* 6730 */
-	{ 0,	0,	printargs,		"SYS_6731"	}, /* 6731 */
-	{ 0,	0,	printargs,		"SYS_6732"	}, /* 6732 */
-	{ 0,	0,	printargs,		"SYS_6733"	}, /* 6733 */
-	{ 0,	0,	printargs,		"SYS_6734"	}, /* 6734 */
-	{ 0,	0,	printargs,		"SYS_6735"	}, /* 6735 */
-	{ 0,	0,	printargs,		"SYS_6736"	}, /* 6736 */
-	{ 0,	0,	printargs,		"SYS_6737"	}, /* 6737 */
-	{ 0,	0,	printargs,		"SYS_6738"	}, /* 6738 */
-	{ 0,	0,	printargs,		"SYS_6739"	}, /* 6739 */
-	{ 0,	0,	printargs,		"SYS_6740"	}, /* 6740 */
-	{ 0,	0,	printargs,		"SYS_6741"	}, /* 6741 */
-	{ 0,	0,	printargs,		"SYS_6742"	}, /* 6742 */
-	{ 0,	0,	printargs,		"SYS_6743"	}, /* 6743 */
-	{ 0,	0,	printargs,		"SYS_6744"	}, /* 6744 */
-	{ 0,	0,	printargs,		"SYS_6745"	}, /* 6745 */
-	{ 0,	0,	printargs,		"SYS_6746"	}, /* 6746 */
-	{ 0,	0,	printargs,		"SYS_6747"	}, /* 6747 */
-	{ 0,	0,	printargs,		"SYS_6748"	}, /* 6748 */
-	{ 0,	0,	printargs,		"SYS_6749"	}, /* 6749 */
-	{ 0,	0,	printargs,		"SYS_6750"	}, /* 6750 */
-	{ 0,	0,	printargs,		"SYS_6751"	}, /* 6751 */
-	{ 0,	0,	printargs,		"SYS_6752"	}, /* 6752 */
-	{ 0,	0,	printargs,		"SYS_6753"	}, /* 6753 */
-	{ 0,	0,	printargs,		"SYS_6754"	}, /* 6754 */
-	{ 0,	0,	printargs,		"SYS_6755"	}, /* 6755 */
-	{ 0,	0,	printargs,		"SYS_6756"	}, /* 6756 */
-	{ 0,	0,	printargs,		"SYS_6757"	}, /* 6757 */
-	{ 0,	0,	printargs,		"SYS_6758"	}, /* 6758 */
-	{ 0,	0,	printargs,		"SYS_6759"	}, /* 6759 */
-	{ 0,	0,	printargs,		"SYS_6760"	}, /* 6760 */
-	{ 0,	0,	printargs,		"SYS_6761"	}, /* 6761 */
-	{ 0,	0,	printargs,		"SYS_6762"	}, /* 6762 */
-	{ 0,	0,	printargs,		"SYS_6763"	}, /* 6763 */
-	{ 0,	0,	printargs,		"SYS_6764"	}, /* 6764 */
-	{ 0,	0,	printargs,		"SYS_6765"	}, /* 6765 */
-	{ 0,	0,	printargs,		"SYS_6766"	}, /* 6766 */
-	{ 0,	0,	printargs,		"SYS_6767"	}, /* 6767 */
-	{ 0,	0,	printargs,		"SYS_6768"	}, /* 6768 */
-	{ 0,	0,	printargs,		"SYS_6769"	}, /* 6769 */
-	{ 0,	0,	printargs,		"SYS_6770"	}, /* 6770 */
-	{ 0,	0,	printargs,		"SYS_6771"	}, /* 6771 */
-	{ 0,	0,	printargs,		"SYS_6772"	}, /* 6772 */
-	{ 0,	0,	printargs,		"SYS_6773"	}, /* 6773 */
-	{ 0,	0,	printargs,		"SYS_6774"	}, /* 6774 */
-	{ 0,	0,	printargs,		"SYS_6775"	}, /* 6775 */
-	{ 0,	0,	printargs,		"SYS_6776"	}, /* 6776 */
-	{ 0,	0,	printargs,		"SYS_6777"	}, /* 6777 */
-	{ 0,	0,	printargs,		"SYS_6778"	}, /* 6778 */
-	{ 0,	0,	printargs,		"SYS_6779"	}, /* 6779 */
-	{ 0,	0,	printargs,		"SYS_6780"	}, /* 6780 */
-	{ 0,	0,	printargs,		"SYS_6781"	}, /* 6781 */
-	{ 0,	0,	printargs,		"SYS_6782"	}, /* 6782 */
-	{ 0,	0,	printargs,		"SYS_6783"	}, /* 6783 */
-	{ 0,	0,	printargs,		"SYS_6784"	}, /* 6784 */
-	{ 0,	0,	printargs,		"SYS_6785"	}, /* 6785 */
-	{ 0,	0,	printargs,		"SYS_6786"	}, /* 6786 */
-	{ 0,	0,	printargs,		"SYS_6787"	}, /* 6787 */
-	{ 0,	0,	printargs,		"SYS_6788"	}, /* 6788 */
-	{ 0,	0,	printargs,		"SYS_6789"	}, /* 6789 */
-	{ 0,	0,	printargs,		"SYS_6790"	}, /* 6790 */
-	{ 0,	0,	printargs,		"SYS_6791"	}, /* 6791 */
-	{ 0,	0,	printargs,		"SYS_6792"	}, /* 6792 */
-	{ 0,	0,	printargs,		"SYS_6793"	}, /* 6793 */
-	{ 0,	0,	printargs,		"SYS_6794"	}, /* 6794 */
-	{ 0,	0,	printargs,		"SYS_6795"	}, /* 6795 */
-	{ 0,	0,	printargs,		"SYS_6796"	}, /* 6796 */
-	{ 0,	0,	printargs,		"SYS_6797"	}, /* 6797 */
-	{ 0,	0,	printargs,		"SYS_6798"	}, /* 6798 */
-	{ 0,	0,	printargs,		"SYS_6799"	}, /* 6799 */
-	{ 0,	0,	printargs,		"SYS_6800"	}, /* 6800 */
-	{ 0,	0,	printargs,		"SYS_6801"	}, /* 6801 */
-	{ 0,	0,	printargs,		"SYS_6802"	}, /* 6802 */
-	{ 0,	0,	printargs,		"SYS_6803"	}, /* 6803 */
-	{ 0,	0,	printargs,		"SYS_6804"	}, /* 6804 */
-	{ 0,	0,	printargs,		"SYS_6805"	}, /* 6805 */
-	{ 0,	0,	printargs,		"SYS_6806"	}, /* 6806 */
-	{ 0,	0,	printargs,		"SYS_6807"	}, /* 6807 */
-	{ 0,	0,	printargs,		"SYS_6808"	}, /* 6808 */
-	{ 0,	0,	printargs,		"SYS_6809"	}, /* 6809 */
-	{ 0,	0,	printargs,		"SYS_6810"	}, /* 6810 */
-	{ 0,	0,	printargs,		"SYS_6811"	}, /* 6811 */
-	{ 0,	0,	printargs,		"SYS_6812"	}, /* 6812 */
-	{ 0,	0,	printargs,		"SYS_6813"	}, /* 6813 */
-	{ 0,	0,	printargs,		"SYS_6814"	}, /* 6814 */
-	{ 0,	0,	printargs,		"SYS_6815"	}, /* 6815 */
-	{ 0,	0,	printargs,		"SYS_6816"	}, /* 6816 */
-	{ 0,	0,	printargs,		"SYS_6817"	}, /* 6817 */
-	{ 0,	0,	printargs,		"SYS_6818"	}, /* 6818 */
-	{ 0,	0,	printargs,		"SYS_6819"	}, /* 6819 */
-	{ 0,	0,	printargs,		"SYS_6820"	}, /* 6820 */
-	{ 0,	0,	printargs,		"SYS_6821"	}, /* 6821 */
-	{ 0,	0,	printargs,		"SYS_6822"	}, /* 6822 */
-	{ 0,	0,	printargs,		"SYS_6823"	}, /* 6823 */
-	{ 0,	0,	printargs,		"SYS_6824"	}, /* 6824 */
-	{ 0,	0,	printargs,		"SYS_6825"	}, /* 6825 */
-	{ 0,	0,	printargs,		"SYS_6826"	}, /* 6826 */
-	{ 0,	0,	printargs,		"SYS_6827"	}, /* 6827 */
-	{ 0,	0,	printargs,		"SYS_6828"	}, /* 6828 */
-	{ 0,	0,	printargs,		"SYS_6829"	}, /* 6829 */
-	{ 0,	0,	printargs,		"SYS_6830"	}, /* 6830 */
-	{ 0,	0,	printargs,		"SYS_6831"	}, /* 6831 */
-	{ 0,	0,	printargs,		"SYS_6832"	}, /* 6832 */
-	{ 0,	0,	printargs,		"SYS_6833"	}, /* 6833 */
-	{ 0,	0,	printargs,		"SYS_6834"	}, /* 6834 */
-	{ 0,	0,	printargs,		"SYS_6835"	}, /* 6835 */
-	{ 0,	0,	printargs,		"SYS_6836"	}, /* 6836 */
-	{ 0,	0,	printargs,		"SYS_6837"	}, /* 6837 */
-	{ 0,	0,	printargs,		"SYS_6838"	}, /* 6838 */
-	{ 0,	0,	printargs,		"SYS_6839"	}, /* 6839 */
-	{ 0,	0,	printargs,		"SYS_6840"	}, /* 6840 */
-	{ 0,	0,	printargs,		"SYS_6841"	}, /* 6841 */
-	{ 0,	0,	printargs,		"SYS_6842"	}, /* 6842 */
-	{ 0,	0,	printargs,		"SYS_6843"	}, /* 6843 */
-	{ 0,	0,	printargs,		"SYS_6844"	}, /* 6844 */
-	{ 0,	0,	printargs,		"SYS_6845"	}, /* 6845 */
-	{ 0,	0,	printargs,		"SYS_6846"	}, /* 6846 */
-	{ 0,	0,	printargs,		"SYS_6847"	}, /* 6847 */
-	{ 0,	0,	printargs,		"SYS_6848"	}, /* 6848 */
-	{ 0,	0,	printargs,		"SYS_6849"	}, /* 6849 */
-	{ 0,	0,	printargs,		"SYS_6850"	}, /* 6850 */
-	{ 0,	0,	printargs,		"SYS_6851"	}, /* 6851 */
-	{ 0,	0,	printargs,		"SYS_6852"	}, /* 6852 */
-	{ 0,	0,	printargs,		"SYS_6853"	}, /* 6853 */
-	{ 0,	0,	printargs,		"SYS_6854"	}, /* 6854 */
-	{ 0,	0,	printargs,		"SYS_6855"	}, /* 6855 */
-	{ 0,	0,	printargs,		"SYS_6856"	}, /* 6856 */
-	{ 0,	0,	printargs,		"SYS_6857"	}, /* 6857 */
-	{ 0,	0,	printargs,		"SYS_6858"	}, /* 6858 */
-	{ 0,	0,	printargs,		"SYS_6859"	}, /* 6859 */
-	{ 0,	0,	printargs,		"SYS_6860"	}, /* 6860 */
-	{ 0,	0,	printargs,		"SYS_6861"	}, /* 6861 */
-	{ 0,	0,	printargs,		"SYS_6862"	}, /* 6862 */
-	{ 0,	0,	printargs,		"SYS_6863"	}, /* 6863 */
-	{ 0,	0,	printargs,		"SYS_6864"	}, /* 6864 */
-	{ 0,	0,	printargs,		"SYS_6865"	}, /* 6865 */
-	{ 0,	0,	printargs,		"SYS_6866"	}, /* 6866 */
-	{ 0,	0,	printargs,		"SYS_6867"	}, /* 6867 */
-	{ 0,	0,	printargs,		"SYS_6868"	}, /* 6868 */
-	{ 0,	0,	printargs,		"SYS_6869"	}, /* 6869 */
-	{ 0,	0,	printargs,		"SYS_6870"	}, /* 6870 */
-	{ 0,	0,	printargs,		"SYS_6871"	}, /* 6871 */
-	{ 0,	0,	printargs,		"SYS_6872"	}, /* 6872 */
-	{ 0,	0,	printargs,		"SYS_6873"	}, /* 6873 */
-	{ 0,	0,	printargs,		"SYS_6874"	}, /* 6874 */
-	{ 0,	0,	printargs,		"SYS_6875"	}, /* 6875 */
-	{ 0,	0,	printargs,		"SYS_6876"	}, /* 6876 */
-	{ 0,	0,	printargs,		"SYS_6877"	}, /* 6877 */
-	{ 0,	0,	printargs,		"SYS_6878"	}, /* 6878 */
-	{ 0,	0,	printargs,		"SYS_6879"	}, /* 6879 */
-	{ 0,	0,	printargs,		"SYS_6880"	}, /* 6880 */
-	{ 0,	0,	printargs,		"SYS_6881"	}, /* 6881 */
-	{ 0,	0,	printargs,		"SYS_6882"	}, /* 6882 */
-	{ 0,	0,	printargs,		"SYS_6883"	}, /* 6883 */
-	{ 0,	0,	printargs,		"SYS_6884"	}, /* 6884 */
-	{ 0,	0,	printargs,		"SYS_6885"	}, /* 6885 */
-	{ 0,	0,	printargs,		"SYS_6886"	}, /* 6886 */
-	{ 0,	0,	printargs,		"SYS_6887"	}, /* 6887 */
-	{ 0,	0,	printargs,		"SYS_6888"	}, /* 6888 */
-	{ 0,	0,	printargs,		"SYS_6889"	}, /* 6889 */
-	{ 0,	0,	printargs,		"SYS_6890"	}, /* 6890 */
-	{ 0,	0,	printargs,		"SYS_6891"	}, /* 6891 */
-	{ 0,	0,	printargs,		"SYS_6892"	}, /* 6892 */
-	{ 0,	0,	printargs,		"SYS_6893"	}, /* 6893 */
-	{ 0,	0,	printargs,		"SYS_6894"	}, /* 6894 */
-	{ 0,	0,	printargs,		"SYS_6895"	}, /* 6895 */
-	{ 0,	0,	printargs,		"SYS_6896"	}, /* 6896 */
-	{ 0,	0,	printargs,		"SYS_6897"	}, /* 6897 */
-	{ 0,	0,	printargs,		"SYS_6898"	}, /* 6898 */
-	{ 0,	0,	printargs,		"SYS_6899"	}, /* 6899 */
-	{ 0,	0,	printargs,		"SYS_6900"	}, /* 6900 */
-	{ 0,	0,	printargs,		"SYS_6901"	}, /* 6901 */
-	{ 0,	0,	printargs,		"SYS_6902"	}, /* 6902 */
-	{ 0,	0,	printargs,		"SYS_6903"	}, /* 6903 */
-	{ 0,	0,	printargs,		"SYS_6904"	}, /* 6904 */
-	{ 0,	0,	printargs,		"SYS_6905"	}, /* 6905 */
-	{ 0,	0,	printargs,		"SYS_6906"	}, /* 6906 */
-	{ 0,	0,	printargs,		"SYS_6907"	}, /* 6907 */
-	{ 0,	0,	printargs,		"SYS_6908"	}, /* 6908 */
-	{ 0,	0,	printargs,		"SYS_6909"	}, /* 6909 */
-	{ 0,	0,	printargs,		"SYS_6910"	}, /* 6910 */
-	{ 0,	0,	printargs,		"SYS_6911"	}, /* 6911 */
-	{ 0,	0,	printargs,		"SYS_6912"	}, /* 6912 */
-	{ 0,	0,	printargs,		"SYS_6913"	}, /* 6913 */
-	{ 0,	0,	printargs,		"SYS_6914"	}, /* 6914 */
-	{ 0,	0,	printargs,		"SYS_6915"	}, /* 6915 */
-	{ 0,	0,	printargs,		"SYS_6916"	}, /* 6916 */
-	{ 0,	0,	printargs,		"SYS_6917"	}, /* 6917 */
-	{ 0,	0,	printargs,		"SYS_6918"	}, /* 6918 */
-	{ 0,	0,	printargs,		"SYS_6919"	}, /* 6919 */
-	{ 0,	0,	printargs,		"SYS_6920"	}, /* 6920 */
-	{ 0,	0,	printargs,		"SYS_6921"	}, /* 6921 */
-	{ 0,	0,	printargs,		"SYS_6922"	}, /* 6922 */
-	{ 0,	0,	printargs,		"SYS_6923"	}, /* 6923 */
-	{ 0,	0,	printargs,		"SYS_6924"	}, /* 6924 */
-	{ 0,	0,	printargs,		"SYS_6925"	}, /* 6925 */
-	{ 0,	0,	printargs,		"SYS_6926"	}, /* 6926 */
-	{ 0,	0,	printargs,		"SYS_6927"	}, /* 6927 */
-	{ 0,	0,	printargs,		"SYS_6928"	}, /* 6928 */
-	{ 0,	0,	printargs,		"SYS_6929"	}, /* 6929 */
-	{ 0,	0,	printargs,		"SYS_6930"	}, /* 6930 */
-	{ 0,	0,	printargs,		"SYS_6931"	}, /* 6931 */
-	{ 0,	0,	printargs,		"SYS_6932"	}, /* 6932 */
-	{ 0,	0,	printargs,		"SYS_6933"	}, /* 6933 */
-	{ 0,	0,	printargs,		"SYS_6934"	}, /* 6934 */
-	{ 0,	0,	printargs,		"SYS_6935"	}, /* 6935 */
-	{ 0,	0,	printargs,		"SYS_6936"	}, /* 6936 */
-	{ 0,	0,	printargs,		"SYS_6937"	}, /* 6937 */
-	{ 0,	0,	printargs,		"SYS_6938"	}, /* 6938 */
-	{ 0,	0,	printargs,		"SYS_6939"	}, /* 6939 */
-	{ 0,	0,	printargs,		"SYS_6940"	}, /* 6940 */
-	{ 0,	0,	printargs,		"SYS_6941"	}, /* 6941 */
-	{ 0,	0,	printargs,		"SYS_6942"	}, /* 6942 */
-	{ 0,	0,	printargs,		"SYS_6943"	}, /* 6943 */
-	{ 0,	0,	printargs,		"SYS_6944"	}, /* 6944 */
-	{ 0,	0,	printargs,		"SYS_6945"	}, /* 6945 */
-	{ 0,	0,	printargs,		"SYS_6946"	}, /* 6946 */
-	{ 0,	0,	printargs,		"SYS_6947"	}, /* 6947 */
-	{ 0,	0,	printargs,		"SYS_6948"	}, /* 6948 */
-	{ 0,	0,	printargs,		"SYS_6949"	}, /* 6949 */
-	{ 0,	0,	printargs,		"SYS_6950"	}, /* 6950 */
-	{ 0,	0,	printargs,		"SYS_6951"	}, /* 6951 */
-	{ 0,	0,	printargs,		"SYS_6952"	}, /* 6952 */
-	{ 0,	0,	printargs,		"SYS_6953"	}, /* 6953 */
-	{ 0,	0,	printargs,		"SYS_6954"	}, /* 6954 */
-	{ 0,	0,	printargs,		"SYS_6955"	}, /* 6955 */
-	{ 0,	0,	printargs,		"SYS_6956"	}, /* 6956 */
-	{ 0,	0,	printargs,		"SYS_6957"	}, /* 6957 */
-	{ 0,	0,	printargs,		"SYS_6958"	}, /* 6958 */
-	{ 0,	0,	printargs,		"SYS_6959"	}, /* 6959 */
-	{ 0,	0,	printargs,		"SYS_6960"	}, /* 6960 */
-	{ 0,	0,	printargs,		"SYS_6961"	}, /* 6961 */
-	{ 0,	0,	printargs,		"SYS_6962"	}, /* 6962 */
-	{ 0,	0,	printargs,		"SYS_6963"	}, /* 6963 */
-	{ 0,	0,	printargs,		"SYS_6964"	}, /* 6964 */
-	{ 0,	0,	printargs,		"SYS_6965"	}, /* 6965 */
-	{ 0,	0,	printargs,		"SYS_6966"	}, /* 6966 */
-	{ 0,	0,	printargs,		"SYS_6967"	}, /* 6967 */
-	{ 0,	0,	printargs,		"SYS_6968"	}, /* 6968 */
-	{ 0,	0,	printargs,		"SYS_6969"	}, /* 6969 */
-	{ 0,	0,	printargs,		"SYS_6970"	}, /* 6970 */
-	{ 0,	0,	printargs,		"SYS_6971"	}, /* 6971 */
-	{ 0,	0,	printargs,		"SYS_6972"	}, /* 6972 */
-	{ 0,	0,	printargs,		"SYS_6973"	}, /* 6973 */
-	{ 0,	0,	printargs,		"SYS_6974"	}, /* 6974 */
-	{ 0,	0,	printargs,		"SYS_6975"	}, /* 6975 */
-	{ 0,	0,	printargs,		"SYS_6976"	}, /* 6976 */
-	{ 0,	0,	printargs,		"SYS_6977"	}, /* 6977 */
-	{ 0,	0,	printargs,		"SYS_6978"	}, /* 6978 */
-	{ 0,	0,	printargs,		"SYS_6979"	}, /* 6979 */
-	{ 0,	0,	printargs,		"SYS_6980"	}, /* 6980 */
-	{ 0,	0,	printargs,		"SYS_6981"	}, /* 6981 */
-	{ 0,	0,	printargs,		"SYS_6982"	}, /* 6982 */
-	{ 0,	0,	printargs,		"SYS_6983"	}, /* 6983 */
-	{ 0,	0,	printargs,		"SYS_6984"	}, /* 6984 */
-	{ 0,	0,	printargs,		"SYS_6985"	}, /* 6985 */
-	{ 0,	0,	printargs,		"SYS_6986"	}, /* 6986 */
-	{ 0,	0,	printargs,		"SYS_6987"	}, /* 6987 */
-	{ 0,	0,	printargs,		"SYS_6988"	}, /* 6988 */
-	{ 0,	0,	printargs,		"SYS_6989"	}, /* 6989 */
-	{ 0,	0,	printargs,		"SYS_6990"	}, /* 6990 */
-	{ 0,	0,	printargs,		"SYS_6991"	}, /* 6991 */
-	{ 0,	0,	printargs,		"SYS_6992"	}, /* 6992 */
-	{ 0,	0,	printargs,		"SYS_6993"	}, /* 6993 */
-	{ 0,	0,	printargs,		"SYS_6994"	}, /* 6994 */
-	{ 0,	0,	printargs,		"SYS_6995"	}, /* 6995 */
-	{ 0,	0,	printargs,		"SYS_6996"	}, /* 6996 */
-	{ 0,	0,	printargs,		"SYS_6997"	}, /* 6997 */
-	{ 0,	0,	printargs,		"SYS_6998"	}, /* 6998 */
-	{ 0,	0,	printargs,		"SYS_6999"	}, /* 6999 */ /* end of Linux N32 */
+	{ 0,	0,	NULL,			NULL		}, /* 6311 */
+	{ 0,	0,	NULL,			NULL		}, /* 6312 */
+	{ 0,	0,	NULL,			NULL		}, /* 6313 */
+	{ 0,	0,	NULL,			NULL		}, /* 6314 */
+	{ 0,	0,	NULL,			NULL		}, /* 6315 */
+	{ 0,	0,	NULL,			NULL		}, /* 6316 */
+	{ 0,	0,	NULL,			NULL		}, /* 6317 */
+	{ 0,	0,	NULL,			NULL		}, /* 6318 */
+	{ 0,	0,	NULL,			NULL		}, /* 6319 */
+	{ 0,	0,	NULL,			NULL		}, /* 6320 */
+	{ 0,	0,	NULL,			NULL		}, /* 6321 */
+	{ 0,	0,	NULL,			NULL		}, /* 6322 */
+	{ 0,	0,	NULL,			NULL		}, /* 6323 */
+	{ 0,	0,	NULL,			NULL		}, /* 6324 */
+	{ 0,	0,	NULL,			NULL		}, /* 6325 */
+	{ 0,	0,	NULL,			NULL		}, /* 6326 */
+	{ 0,	0,	NULL,			NULL		}, /* 6327 */
+	{ 0,	0,	NULL,			NULL		}, /* 6328 */
+	{ 0,	0,	NULL,			NULL		}, /* 6329 */
+	{ 0,	0,	NULL,			NULL		}, /* 6330 */
+	{ 0,	0,	NULL,			NULL		}, /* 6331 */
+	{ 0,	0,	NULL,			NULL		}, /* 6332 */
+	{ 0,	0,	NULL,			NULL		}, /* 6333 */
+	{ 0,	0,	NULL,			NULL		}, /* 6334 */
+	{ 0,	0,	NULL,			NULL		}, /* 6335 */
+	{ 0,	0,	NULL,			NULL		}, /* 6336 */
+	{ 0,	0,	NULL,			NULL		}, /* 6337 */
+	{ 0,	0,	NULL,			NULL		}, /* 6338 */
+	{ 0,	0,	NULL,			NULL		}, /* 6339 */
+	{ 0,	0,	NULL,			NULL		}, /* 6340 */
+	{ 0,	0,	NULL,			NULL		}, /* 6341 */
+	{ 0,	0,	NULL,			NULL		}, /* 6342 */
+	{ 0,	0,	NULL,			NULL		}, /* 6343 */
+	{ 0,	0,	NULL,			NULL		}, /* 6344 */
+	{ 0,	0,	NULL,			NULL		}, /* 6345 */
+	{ 0,	0,	NULL,			NULL		}, /* 6346 */
+	{ 0,	0,	NULL,			NULL		}, /* 6347 */
+	{ 0,	0,	NULL,			NULL		}, /* 6348 */
+	{ 0,	0,	NULL,			NULL		}, /* 6349 */
+	{ 0,	0,	NULL,			NULL		}, /* 6350 */
+	{ 0,	0,	NULL,			NULL		}, /* 6351 */
+	{ 0,	0,	NULL,			NULL		}, /* 6352 */
+	{ 0,	0,	NULL,			NULL		}, /* 6353 */
+	{ 0,	0,	NULL,			NULL		}, /* 6354 */
+	{ 0,	0,	NULL,			NULL		}, /* 6355 */
+	{ 0,	0,	NULL,			NULL		}, /* 6356 */
+	{ 0,	0,	NULL,			NULL		}, /* 6357 */
+	{ 0,	0,	NULL,			NULL		}, /* 6358 */
+	{ 0,	0,	NULL,			NULL		}, /* 6359 */
+	{ 0,	0,	NULL,			NULL		}, /* 6360 */
+	{ 0,	0,	NULL,			NULL		}, /* 6361 */
+	{ 0,	0,	NULL,			NULL		}, /* 6362 */
+	{ 0,	0,	NULL,			NULL		}, /* 6363 */
+	{ 0,	0,	NULL,			NULL		}, /* 6364 */
+	{ 0,	0,	NULL,			NULL		}, /* 6365 */
+	{ 0,	0,	NULL,			NULL		}, /* 6366 */
+	{ 0,	0,	NULL,			NULL		}, /* 6367 */
+	{ 0,	0,	NULL,			NULL		}, /* 6368 */
+	{ 0,	0,	NULL,			NULL		}, /* 6369 */
+	{ 0,	0,	NULL,			NULL		}, /* 6370 */
+	{ 0,	0,	NULL,			NULL		}, /* 6371 */
+	{ 0,	0,	NULL,			NULL		}, /* 6372 */
+	{ 0,	0,	NULL,			NULL		}, /* 6373 */
+	{ 0,	0,	NULL,			NULL		}, /* 6374 */
+	{ 0,	0,	NULL,			NULL		}, /* 6375 */
+	{ 0,	0,	NULL,			NULL		}, /* 6376 */
+	{ 0,	0,	NULL,			NULL		}, /* 6377 */
+	{ 0,	0,	NULL,			NULL		}, /* 6378 */
+	{ 0,	0,	NULL,			NULL		}, /* 6379 */
+	{ 0,	0,	NULL,			NULL		}, /* 6380 */
+	{ 0,	0,	NULL,			NULL		}, /* 6381 */
+	{ 0,	0,	NULL,			NULL		}, /* 6382 */
+	{ 0,	0,	NULL,			NULL		}, /* 6383 */
+	{ 0,	0,	NULL,			NULL		}, /* 6384 */
+	{ 0,	0,	NULL,			NULL		}, /* 6385 */
+	{ 0,	0,	NULL,			NULL		}, /* 6386 */
+	{ 0,	0,	NULL,			NULL		}, /* 6387 */
+	{ 0,	0,	NULL,			NULL		}, /* 6388 */
+	{ 0,	0,	NULL,			NULL		}, /* 6389 */
+	{ 0,	0,	NULL,			NULL		}, /* 6390 */
+	{ 0,	0,	NULL,			NULL		}, /* 6391 */
+	{ 0,	0,	NULL,			NULL		}, /* 6392 */
+	{ 0,	0,	NULL,			NULL		}, /* 6393 */
+	{ 0,	0,	NULL,			NULL		}, /* 6394 */
+	{ 0,	0,	NULL,			NULL		}, /* 6395 */
+	{ 0,	0,	NULL,			NULL		}, /* 6396 */
+	{ 0,	0,	NULL,			NULL		}, /* 6397 */
+	{ 0,	0,	NULL,			NULL		}, /* 6398 */
+	{ 0,	0,	NULL,			NULL		}, /* 6399 */
+	{ 0,	0,	NULL,			NULL		}, /* 6400 */
+	{ 0,	0,	NULL,			NULL		}, /* 6401 */
+	{ 0,	0,	NULL,			NULL		}, /* 6402 */
+	{ 0,	0,	NULL,			NULL		}, /* 6403 */
+	{ 0,	0,	NULL,			NULL		}, /* 6404 */
+	{ 0,	0,	NULL,			NULL		}, /* 6405 */
+	{ 0,	0,	NULL,			NULL		}, /* 6406 */
+	{ 0,	0,	NULL,			NULL		}, /* 6407 */
+	{ 0,	0,	NULL,			NULL		}, /* 6408 */
+	{ 0,	0,	NULL,			NULL		}, /* 6409 */
+	{ 0,	0,	NULL,			NULL		}, /* 6410 */
+	{ 0,	0,	NULL,			NULL		}, /* 6411 */
+	{ 0,	0,	NULL,			NULL		}, /* 6412 */
+	{ 0,	0,	NULL,			NULL		}, /* 6413 */
+	{ 0,	0,	NULL,			NULL		}, /* 6414 */
+	{ 0,	0,	NULL,			NULL		}, /* 6415 */
+	{ 0,	0,	NULL,			NULL		}, /* 6416 */
+	{ 0,	0,	NULL,			NULL		}, /* 6417 */
+	{ 0,	0,	NULL,			NULL		}, /* 6418 */
+	{ 0,	0,	NULL,			NULL		}, /* 6419 */
+	{ 0,	0,	NULL,			NULL		}, /* 6420 */
+	{ 0,	0,	NULL,			NULL		}, /* 6421 */
+	{ 0,	0,	NULL,			NULL		}, /* 6422 */
+	{ 0,	0,	NULL,			NULL		}, /* 6423 */
+	{ 0,	0,	NULL,			NULL		}, /* 6424 */
+	{ 0,	0,	NULL,			NULL		}, /* 6425 */
+	{ 0,	0,	NULL,			NULL		}, /* 6426 */
+	{ 0,	0,	NULL,			NULL		}, /* 6427 */
+	{ 0,	0,	NULL,			NULL		}, /* 6428 */
+	{ 0,	0,	NULL,			NULL		}, /* 6429 */
+	{ 0,	0,	NULL,			NULL		}, /* 6430 */
+	{ 0,	0,	NULL,			NULL		}, /* 6431 */
+	{ 0,	0,	NULL,			NULL		}, /* 6432 */
+	{ 0,	0,	NULL,			NULL		}, /* 6433 */
+	{ 0,	0,	NULL,			NULL		}, /* 6434 */
+	{ 0,	0,	NULL,			NULL		}, /* 6435 */
+	{ 0,	0,	NULL,			NULL		}, /* 6436 */
+	{ 0,	0,	NULL,			NULL		}, /* 6437 */
+	{ 0,	0,	NULL,			NULL		}, /* 6438 */
+	{ 0,	0,	NULL,			NULL		}, /* 6439 */
+	{ 0,	0,	NULL,			NULL		}, /* 6440 */
+	{ 0,	0,	NULL,			NULL		}, /* 6441 */
+	{ 0,	0,	NULL,			NULL		}, /* 6442 */
+	{ 0,	0,	NULL,			NULL		}, /* 6443 */
+	{ 0,	0,	NULL,			NULL		}, /* 6444 */
+	{ 0,	0,	NULL,			NULL		}, /* 6445 */
+	{ 0,	0,	NULL,			NULL		}, /* 6446 */
+	{ 0,	0,	NULL,			NULL		}, /* 6447 */
+	{ 0,	0,	NULL,			NULL		}, /* 6448 */
+	{ 0,	0,	NULL,			NULL		}, /* 6449 */
+	{ 0,	0,	NULL,			NULL		}, /* 6450 */
+	{ 0,	0,	NULL,			NULL		}, /* 6451 */
+	{ 0,	0,	NULL,			NULL		}, /* 6452 */
+	{ 0,	0,	NULL,			NULL		}, /* 6453 */
+	{ 0,	0,	NULL,			NULL		}, /* 6454 */
+	{ 0,	0,	NULL,			NULL		}, /* 6455 */
+	{ 0,	0,	NULL,			NULL		}, /* 6456 */
+	{ 0,	0,	NULL,			NULL		}, /* 6457 */
+	{ 0,	0,	NULL,			NULL		}, /* 6458 */
+	{ 0,	0,	NULL,			NULL		}, /* 6459 */
+	{ 0,	0,	NULL,			NULL		}, /* 6460 */
+	{ 0,	0,	NULL,			NULL		}, /* 6461 */
+	{ 0,	0,	NULL,			NULL		}, /* 6462 */
+	{ 0,	0,	NULL,			NULL		}, /* 6463 */
+	{ 0,	0,	NULL,			NULL		}, /* 6464 */
+	{ 0,	0,	NULL,			NULL		}, /* 6465 */
+	{ 0,	0,	NULL,			NULL		}, /* 6466 */
+	{ 0,	0,	NULL,			NULL		}, /* 6467 */
+	{ 0,	0,	NULL,			NULL		}, /* 6468 */
+	{ 0,	0,	NULL,			NULL		}, /* 6469 */
+	{ 0,	0,	NULL,			NULL		}, /* 6470 */
+	{ 0,	0,	NULL,			NULL		}, /* 6471 */
+	{ 0,	0,	NULL,			NULL		}, /* 6472 */
+	{ 0,	0,	NULL,			NULL		}, /* 6473 */
+	{ 0,	0,	NULL,			NULL		}, /* 6474 */
+	{ 0,	0,	NULL,			NULL		}, /* 6475 */
+	{ 0,	0,	NULL,			NULL		}, /* 6476 */
+	{ 0,	0,	NULL,			NULL		}, /* 6477 */
+	{ 0,	0,	NULL,			NULL		}, /* 6478 */
+	{ 0,	0,	NULL,			NULL		}, /* 6479 */
+	{ 0,	0,	NULL,			NULL		}, /* 6480 */
+	{ 0,	0,	NULL,			NULL		}, /* 6481 */
+	{ 0,	0,	NULL,			NULL		}, /* 6482 */
+	{ 0,	0,	NULL,			NULL		}, /* 6483 */
+	{ 0,	0,	NULL,			NULL		}, /* 6484 */
+	{ 0,	0,	NULL,			NULL		}, /* 6485 */
+	{ 0,	0,	NULL,			NULL		}, /* 6486 */
+	{ 0,	0,	NULL,			NULL		}, /* 6487 */
+	{ 0,	0,	NULL,			NULL		}, /* 6488 */
+	{ 0,	0,	NULL,			NULL		}, /* 6489 */
+	{ 0,	0,	NULL,			NULL		}, /* 6490 */
+	{ 0,	0,	NULL,			NULL		}, /* 6491 */
+	{ 0,	0,	NULL,			NULL		}, /* 6492 */
+	{ 0,	0,	NULL,			NULL		}, /* 6493 */
+	{ 0,	0,	NULL,			NULL		}, /* 6494 */
+	{ 0,	0,	NULL,			NULL		}, /* 6495 */
+	{ 0,	0,	NULL,			NULL		}, /* 6496 */
+	{ 0,	0,	NULL,			NULL		}, /* 6497 */
+	{ 0,	0,	NULL,			NULL		}, /* 6498 */
+	{ 0,	0,	NULL,			NULL		}, /* 6499 */
+	{ 0,	0,	NULL,			NULL		}, /* 6500 */
+	{ 0,	0,	NULL,			NULL		}, /* 6501 */
+	{ 0,	0,	NULL,			NULL		}, /* 6502 */
+	{ 0,	0,	NULL,			NULL		}, /* 6503 */
+	{ 0,	0,	NULL,			NULL		}, /* 6504 */
+	{ 0,	0,	NULL,			NULL		}, /* 6505 */
+	{ 0,	0,	NULL,			NULL		}, /* 6506 */
+	{ 0,	0,	NULL,			NULL		}, /* 6507 */
+	{ 0,	0,	NULL,			NULL		}, /* 6508 */
+	{ 0,	0,	NULL,			NULL		}, /* 6509 */
+	{ 0,	0,	NULL,			NULL		}, /* 6510 */
+	{ 0,	0,	NULL,			NULL		}, /* 6511 */
+	{ 0,	0,	NULL,			NULL		}, /* 6512 */
+	{ 0,	0,	NULL,			NULL		}, /* 6513 */
+	{ 0,	0,	NULL,			NULL		}, /* 6514 */
+	{ 0,	0,	NULL,			NULL		}, /* 6515 */
+	{ 0,	0,	NULL,			NULL		}, /* 6516 */
+	{ 0,	0,	NULL,			NULL		}, /* 6517 */
+	{ 0,	0,	NULL,			NULL		}, /* 6518 */
+	{ 0,	0,	NULL,			NULL		}, /* 6519 */
+	{ 0,	0,	NULL,			NULL		}, /* 6520 */
+	{ 0,	0,	NULL,			NULL		}, /* 6521 */
+	{ 0,	0,	NULL,			NULL		}, /* 6522 */
+	{ 0,	0,	NULL,			NULL		}, /* 6523 */
+	{ 0,	0,	NULL,			NULL		}, /* 6524 */
+	{ 0,	0,	NULL,			NULL		}, /* 6525 */
+	{ 0,	0,	NULL,			NULL		}, /* 6526 */
+	{ 0,	0,	NULL,			NULL		}, /* 6527 */
+	{ 0,	0,	NULL,			NULL		}, /* 6528 */
+	{ 0,	0,	NULL,			NULL		}, /* 6529 */
+	{ 0,	0,	NULL,			NULL		}, /* 6530 */
+	{ 0,	0,	NULL,			NULL		}, /* 6531 */
+	{ 0,	0,	NULL,			NULL		}, /* 6532 */
+	{ 0,	0,	NULL,			NULL		}, /* 6533 */
+	{ 0,	0,	NULL,			NULL		}, /* 6534 */
+	{ 0,	0,	NULL,			NULL		}, /* 6535 */
+	{ 0,	0,	NULL,			NULL		}, /* 6536 */
+	{ 0,	0,	NULL,			NULL		}, /* 6537 */
+	{ 0,	0,	NULL,			NULL		}, /* 6538 */
+	{ 0,	0,	NULL,			NULL		}, /* 6539 */
+	{ 0,	0,	NULL,			NULL		}, /* 6540 */
+	{ 0,	0,	NULL,			NULL		}, /* 6541 */
+	{ 0,	0,	NULL,			NULL		}, /* 6542 */
+	{ 0,	0,	NULL,			NULL		}, /* 6543 */
+	{ 0,	0,	NULL,			NULL		}, /* 6544 */
+	{ 0,	0,	NULL,			NULL		}, /* 6545 */
+	{ 0,	0,	NULL,			NULL		}, /* 6546 */
+	{ 0,	0,	NULL,			NULL		}, /* 6547 */
+	{ 0,	0,	NULL,			NULL		}, /* 6548 */
+	{ 0,	0,	NULL,			NULL		}, /* 6549 */
+	{ 0,	0,	NULL,			NULL		}, /* 6550 */
+	{ 0,	0,	NULL,			NULL		}, /* 6551 */
+	{ 0,	0,	NULL,			NULL		}, /* 6552 */
+	{ 0,	0,	NULL,			NULL		}, /* 6553 */
+	{ 0,	0,	NULL,			NULL		}, /* 6554 */
+	{ 0,	0,	NULL,			NULL		}, /* 6555 */
+	{ 0,	0,	NULL,			NULL		}, /* 6556 */
+	{ 0,	0,	NULL,			NULL		}, /* 6557 */
+	{ 0,	0,	NULL,			NULL		}, /* 6558 */
+	{ 0,	0,	NULL,			NULL		}, /* 6559 */
+	{ 0,	0,	NULL,			NULL		}, /* 6560 */
+	{ 0,	0,	NULL,			NULL		}, /* 6561 */
+	{ 0,	0,	NULL,			NULL		}, /* 6562 */
+	{ 0,	0,	NULL,			NULL		}, /* 6563 */
+	{ 0,	0,	NULL,			NULL		}, /* 6564 */
+	{ 0,	0,	NULL,			NULL		}, /* 6565 */
+	{ 0,	0,	NULL,			NULL		}, /* 6566 */
+	{ 0,	0,	NULL,			NULL		}, /* 6567 */
+	{ 0,	0,	NULL,			NULL		}, /* 6568 */
+	{ 0,	0,	NULL,			NULL		}, /* 6569 */
+	{ 0,	0,	NULL,			NULL		}, /* 6570 */
+	{ 0,	0,	NULL,			NULL		}, /* 6571 */
+	{ 0,	0,	NULL,			NULL		}, /* 6572 */
+	{ 0,	0,	NULL,			NULL		}, /* 6573 */
+	{ 0,	0,	NULL,			NULL		}, /* 6574 */
+	{ 0,	0,	NULL,			NULL		}, /* 6575 */
+	{ 0,	0,	NULL,			NULL		}, /* 6576 */
+	{ 0,	0,	NULL,			NULL		}, /* 6577 */
+	{ 0,	0,	NULL,			NULL		}, /* 6578 */
+	{ 0,	0,	NULL,			NULL		}, /* 6579 */
+	{ 0,	0,	NULL,			NULL		}, /* 6580 */
+	{ 0,	0,	NULL,			NULL		}, /* 6581 */
+	{ 0,	0,	NULL,			NULL		}, /* 6582 */
+	{ 0,	0,	NULL,			NULL		}, /* 6583 */
+	{ 0,	0,	NULL,			NULL		}, /* 6584 */
+	{ 0,	0,	NULL,			NULL		}, /* 6585 */
+	{ 0,	0,	NULL,			NULL		}, /* 6586 */
+	{ 0,	0,	NULL,			NULL		}, /* 6587 */
+	{ 0,	0,	NULL,			NULL		}, /* 6588 */
+	{ 0,	0,	NULL,			NULL		}, /* 6589 */
+	{ 0,	0,	NULL,			NULL		}, /* 6590 */
+	{ 0,	0,	NULL,			NULL		}, /* 6591 */
+	{ 0,	0,	NULL,			NULL		}, /* 6592 */
+	{ 0,	0,	NULL,			NULL		}, /* 6593 */
+	{ 0,	0,	NULL,			NULL		}, /* 6594 */
+	{ 0,	0,	NULL,			NULL		}, /* 6595 */
+	{ 0,	0,	NULL,			NULL		}, /* 6596 */
+	{ 0,	0,	NULL,			NULL		}, /* 6597 */
+	{ 0,	0,	NULL,			NULL		}, /* 6598 */
+	{ 0,	0,	NULL,			NULL		}, /* 6599 */
+	{ 0,	0,	NULL,			NULL		}, /* 6600 */
+	{ 0,	0,	NULL,			NULL		}, /* 6601 */
+	{ 0,	0,	NULL,			NULL		}, /* 6602 */
+	{ 0,	0,	NULL,			NULL		}, /* 6603 */
+	{ 0,	0,	NULL,			NULL		}, /* 6604 */
+	{ 0,	0,	NULL,			NULL		}, /* 6605 */
+	{ 0,	0,	NULL,			NULL		}, /* 6606 */
+	{ 0,	0,	NULL,			NULL		}, /* 6607 */
+	{ 0,	0,	NULL,			NULL		}, /* 6608 */
+	{ 0,	0,	NULL,			NULL		}, /* 6609 */
+	{ 0,	0,	NULL,			NULL		}, /* 6610 */
+	{ 0,	0,	NULL,			NULL		}, /* 6611 */
+	{ 0,	0,	NULL,			NULL		}, /* 6612 */
+	{ 0,	0,	NULL,			NULL		}, /* 6613 */
+	{ 0,	0,	NULL,			NULL		}, /* 6614 */
+	{ 0,	0,	NULL,			NULL		}, /* 6615 */
+	{ 0,	0,	NULL,			NULL		}, /* 6616 */
+	{ 0,	0,	NULL,			NULL		}, /* 6617 */
+	{ 0,	0,	NULL,			NULL		}, /* 6618 */
+	{ 0,	0,	NULL,			NULL		}, /* 6619 */
+	{ 0,	0,	NULL,			NULL		}, /* 6620 */
+	{ 0,	0,	NULL,			NULL		}, /* 6621 */
+	{ 0,	0,	NULL,			NULL		}, /* 6622 */
+	{ 0,	0,	NULL,			NULL		}, /* 6623 */
+	{ 0,	0,	NULL,			NULL		}, /* 6624 */
+	{ 0,	0,	NULL,			NULL		}, /* 6625 */
+	{ 0,	0,	NULL,			NULL		}, /* 6626 */
+	{ 0,	0,	NULL,			NULL		}, /* 6627 */
+	{ 0,	0,	NULL,			NULL		}, /* 6628 */
+	{ 0,	0,	NULL,			NULL		}, /* 6629 */
+	{ 0,	0,	NULL,			NULL		}, /* 6630 */
+	{ 0,	0,	NULL,			NULL		}, /* 6631 */
+	{ 0,	0,	NULL,			NULL		}, /* 6632 */
+	{ 0,	0,	NULL,			NULL		}, /* 6633 */
+	{ 0,	0,	NULL,			NULL		}, /* 6634 */
+	{ 0,	0,	NULL,			NULL		}, /* 6635 */
+	{ 0,	0,	NULL,			NULL		}, /* 6636 */
+	{ 0,	0,	NULL,			NULL		}, /* 6637 */
+	{ 0,	0,	NULL,			NULL		}, /* 6638 */
+	{ 0,	0,	NULL,			NULL		}, /* 6639 */
+	{ 0,	0,	NULL,			NULL		}, /* 6640 */
+	{ 0,	0,	NULL,			NULL		}, /* 6641 */
+	{ 0,	0,	NULL,			NULL		}, /* 6642 */
+	{ 0,	0,	NULL,			NULL		}, /* 6643 */
+	{ 0,	0,	NULL,			NULL		}, /* 6644 */
+	{ 0,	0,	NULL,			NULL		}, /* 6645 */
+	{ 0,	0,	NULL,			NULL		}, /* 6646 */
+	{ 0,	0,	NULL,			NULL		}, /* 6647 */
+	{ 0,	0,	NULL,			NULL		}, /* 6648 */
+	{ 0,	0,	NULL,			NULL		}, /* 6649 */
+	{ 0,	0,	NULL,			NULL		}, /* 6650 */
+	{ 0,	0,	NULL,			NULL		}, /* 6651 */
+	{ 0,	0,	NULL,			NULL		}, /* 6652 */
+	{ 0,	0,	NULL,			NULL		}, /* 6653 */
+	{ 0,	0,	NULL,			NULL		}, /* 6654 */
+	{ 0,	0,	NULL,			NULL		}, /* 6655 */
+	{ 0,	0,	NULL,			NULL		}, /* 6656 */
+	{ 0,	0,	NULL,			NULL		}, /* 6657 */
+	{ 0,	0,	NULL,			NULL		}, /* 6658 */
+	{ 0,	0,	NULL,			NULL		}, /* 6659 */
+	{ 0,	0,	NULL,			NULL		}, /* 6660 */
+	{ 0,	0,	NULL,			NULL		}, /* 6661 */
+	{ 0,	0,	NULL,			NULL		}, /* 6662 */
+	{ 0,	0,	NULL,			NULL		}, /* 6663 */
+	{ 0,	0,	NULL,			NULL		}, /* 6664 */
+	{ 0,	0,	NULL,			NULL		}, /* 6665 */
+	{ 0,	0,	NULL,			NULL		}, /* 6666 */
+	{ 0,	0,	NULL,			NULL		}, /* 6667 */
+	{ 0,	0,	NULL,			NULL		}, /* 6668 */
+	{ 0,	0,	NULL,			NULL		}, /* 6669 */
+	{ 0,	0,	NULL,			NULL		}, /* 6670 */
+	{ 0,	0,	NULL,			NULL		}, /* 6671 */
+	{ 0,	0,	NULL,			NULL		}, /* 6672 */
+	{ 0,	0,	NULL,			NULL		}, /* 6673 */
+	{ 0,	0,	NULL,			NULL		}, /* 6674 */
+	{ 0,	0,	NULL,			NULL		}, /* 6675 */
+	{ 0,	0,	NULL,			NULL		}, /* 6676 */
+	{ 0,	0,	NULL,			NULL		}, /* 6677 */
+	{ 0,	0,	NULL,			NULL		}, /* 6678 */
+	{ 0,	0,	NULL,			NULL		}, /* 6679 */
+	{ 0,	0,	NULL,			NULL		}, /* 6680 */
+	{ 0,	0,	NULL,			NULL		}, /* 6681 */
+	{ 0,	0,	NULL,			NULL		}, /* 6682 */
+	{ 0,	0,	NULL,			NULL		}, /* 6683 */
+	{ 0,	0,	NULL,			NULL		}, /* 6684 */
+	{ 0,	0,	NULL,			NULL		}, /* 6685 */
+	{ 0,	0,	NULL,			NULL		}, /* 6686 */
+	{ 0,	0,	NULL,			NULL		}, /* 6687 */
+	{ 0,	0,	NULL,			NULL		}, /* 6688 */
+	{ 0,	0,	NULL,			NULL		}, /* 6689 */
+	{ 0,	0,	NULL,			NULL		}, /* 6690 */
+	{ 0,	0,	NULL,			NULL		}, /* 6691 */
+	{ 0,	0,	NULL,			NULL		}, /* 6692 */
+	{ 0,	0,	NULL,			NULL		}, /* 6693 */
+	{ 0,	0,	NULL,			NULL		}, /* 6694 */
+	{ 0,	0,	NULL,			NULL		}, /* 6695 */
+	{ 0,	0,	NULL,			NULL		}, /* 6696 */
+	{ 0,	0,	NULL,			NULL		}, /* 6697 */
+	{ 0,	0,	NULL,			NULL		}, /* 6698 */
+	{ 0,	0,	NULL,			NULL		}, /* 6699 */
+	{ 0,	0,	NULL,			NULL		}, /* 6700 */
+	{ 0,	0,	NULL,			NULL		}, /* 6701 */
+	{ 0,	0,	NULL,			NULL		}, /* 6702 */
+	{ 0,	0,	NULL,			NULL		}, /* 6703 */
+	{ 0,	0,	NULL,			NULL		}, /* 6704 */
+	{ 0,	0,	NULL,			NULL		}, /* 6705 */
+	{ 0,	0,	NULL,			NULL		}, /* 6706 */
+	{ 0,	0,	NULL,			NULL		}, /* 6707 */
+	{ 0,	0,	NULL,			NULL		}, /* 6708 */
+	{ 0,	0,	NULL,			NULL		}, /* 6709 */
+	{ 0,	0,	NULL,			NULL		}, /* 6710 */
+	{ 0,	0,	NULL,			NULL		}, /* 6711 */
+	{ 0,	0,	NULL,			NULL		}, /* 6712 */
+	{ 0,	0,	NULL,			NULL		}, /* 6713 */
+	{ 0,	0,	NULL,			NULL		}, /* 6714 */
+	{ 0,	0,	NULL,			NULL		}, /* 6715 */
+	{ 0,	0,	NULL,			NULL		}, /* 6716 */
+	{ 0,	0,	NULL,			NULL		}, /* 6717 */
+	{ 0,	0,	NULL,			NULL		}, /* 6718 */
+	{ 0,	0,	NULL,			NULL		}, /* 6719 */
+	{ 0,	0,	NULL,			NULL		}, /* 6720 */
+	{ 0,	0,	NULL,			NULL		}, /* 6721 */
+	{ 0,	0,	NULL,			NULL		}, /* 6722 */
+	{ 0,	0,	NULL,			NULL		}, /* 6723 */
+	{ 0,	0,	NULL,			NULL		}, /* 6724 */
+	{ 0,	0,	NULL,			NULL		}, /* 6725 */
+	{ 0,	0,	NULL,			NULL		}, /* 6726 */
+	{ 0,	0,	NULL,			NULL		}, /* 6727 */
+	{ 0,	0,	NULL,			NULL		}, /* 6728 */
+	{ 0,	0,	NULL,			NULL		}, /* 6729 */
+	{ 0,	0,	NULL,			NULL		}, /* 6730 */
+	{ 0,	0,	NULL,			NULL		}, /* 6731 */
+	{ 0,	0,	NULL,			NULL		}, /* 6732 */
+	{ 0,	0,	NULL,			NULL		}, /* 6733 */
+	{ 0,	0,	NULL,			NULL		}, /* 6734 */
+	{ 0,	0,	NULL,			NULL		}, /* 6735 */
+	{ 0,	0,	NULL,			NULL		}, /* 6736 */
+	{ 0,	0,	NULL,			NULL		}, /* 6737 */
+	{ 0,	0,	NULL,			NULL		}, /* 6738 */
+	{ 0,	0,	NULL,			NULL		}, /* 6739 */
+	{ 0,	0,	NULL,			NULL		}, /* 6740 */
+	{ 0,	0,	NULL,			NULL		}, /* 6741 */
+	{ 0,	0,	NULL,			NULL		}, /* 6742 */
+	{ 0,	0,	NULL,			NULL		}, /* 6743 */
+	{ 0,	0,	NULL,			NULL		}, /* 6744 */
+	{ 0,	0,	NULL,			NULL		}, /* 6745 */
+	{ 0,	0,	NULL,			NULL		}, /* 6746 */
+	{ 0,	0,	NULL,			NULL		}, /* 6747 */
+	{ 0,	0,	NULL,			NULL		}, /* 6748 */
+	{ 0,	0,	NULL,			NULL		}, /* 6749 */
+	{ 0,	0,	NULL,			NULL		}, /* 6750 */
+	{ 0,	0,	NULL,			NULL		}, /* 6751 */
+	{ 0,	0,	NULL,			NULL		}, /* 6752 */
+	{ 0,	0,	NULL,			NULL		}, /* 6753 */
+	{ 0,	0,	NULL,			NULL		}, /* 6754 */
+	{ 0,	0,	NULL,			NULL		}, /* 6755 */
+	{ 0,	0,	NULL,			NULL		}, /* 6756 */
+	{ 0,	0,	NULL,			NULL		}, /* 6757 */
+	{ 0,	0,	NULL,			NULL		}, /* 6758 */
+	{ 0,	0,	NULL,			NULL		}, /* 6759 */
+	{ 0,	0,	NULL,			NULL		}, /* 6760 */
+	{ 0,	0,	NULL,			NULL		}, /* 6761 */
+	{ 0,	0,	NULL,			NULL		}, /* 6762 */
+	{ 0,	0,	NULL,			NULL		}, /* 6763 */
+	{ 0,	0,	NULL,			NULL		}, /* 6764 */
+	{ 0,	0,	NULL,			NULL		}, /* 6765 */
+	{ 0,	0,	NULL,			NULL		}, /* 6766 */
+	{ 0,	0,	NULL,			NULL		}, /* 6767 */
+	{ 0,	0,	NULL,			NULL		}, /* 6768 */
+	{ 0,	0,	NULL,			NULL		}, /* 6769 */
+	{ 0,	0,	NULL,			NULL		}, /* 6770 */
+	{ 0,	0,	NULL,			NULL		}, /* 6771 */
+	{ 0,	0,	NULL,			NULL		}, /* 6772 */
+	{ 0,	0,	NULL,			NULL		}, /* 6773 */
+	{ 0,	0,	NULL,			NULL		}, /* 6774 */
+	{ 0,	0,	NULL,			NULL		}, /* 6775 */
+	{ 0,	0,	NULL,			NULL		}, /* 6776 */
+	{ 0,	0,	NULL,			NULL		}, /* 6777 */
+	{ 0,	0,	NULL,			NULL		}, /* 6778 */
+	{ 0,	0,	NULL,			NULL		}, /* 6779 */
+	{ 0,	0,	NULL,			NULL		}, /* 6780 */
+	{ 0,	0,	NULL,			NULL		}, /* 6781 */
+	{ 0,	0,	NULL,			NULL		}, /* 6782 */
+	{ 0,	0,	NULL,			NULL		}, /* 6783 */
+	{ 0,	0,	NULL,			NULL		}, /* 6784 */
+	{ 0,	0,	NULL,			NULL		}, /* 6785 */
+	{ 0,	0,	NULL,			NULL		}, /* 6786 */
+	{ 0,	0,	NULL,			NULL		}, /* 6787 */
+	{ 0,	0,	NULL,			NULL		}, /* 6788 */
+	{ 0,	0,	NULL,			NULL		}, /* 6789 */
+	{ 0,	0,	NULL,			NULL		}, /* 6790 */
+	{ 0,	0,	NULL,			NULL		}, /* 6791 */
+	{ 0,	0,	NULL,			NULL		}, /* 6792 */
+	{ 0,	0,	NULL,			NULL		}, /* 6793 */
+	{ 0,	0,	NULL,			NULL		}, /* 6794 */
+	{ 0,	0,	NULL,			NULL		}, /* 6795 */
+	{ 0,	0,	NULL,			NULL		}, /* 6796 */
+	{ 0,	0,	NULL,			NULL		}, /* 6797 */
+	{ 0,	0,	NULL,			NULL		}, /* 6798 */
+	{ 0,	0,	NULL,			NULL		}, /* 6799 */
+	{ 0,	0,	NULL,			NULL		}, /* 6800 */
+	{ 0,	0,	NULL,			NULL		}, /* 6801 */
+	{ 0,	0,	NULL,			NULL		}, /* 6802 */
+	{ 0,	0,	NULL,			NULL		}, /* 6803 */
+	{ 0,	0,	NULL,			NULL		}, /* 6804 */
+	{ 0,	0,	NULL,			NULL		}, /* 6805 */
+	{ 0,	0,	NULL,			NULL		}, /* 6806 */
+	{ 0,	0,	NULL,			NULL		}, /* 6807 */
+	{ 0,	0,	NULL,			NULL		}, /* 6808 */
+	{ 0,	0,	NULL,			NULL		}, /* 6809 */
+	{ 0,	0,	NULL,			NULL		}, /* 6810 */
+	{ 0,	0,	NULL,			NULL		}, /* 6811 */
+	{ 0,	0,	NULL,			NULL		}, /* 6812 */
+	{ 0,	0,	NULL,			NULL		}, /* 6813 */
+	{ 0,	0,	NULL,			NULL		}, /* 6814 */
+	{ 0,	0,	NULL,			NULL		}, /* 6815 */
+	{ 0,	0,	NULL,			NULL		}, /* 6816 */
+	{ 0,	0,	NULL,			NULL		}, /* 6817 */
+	{ 0,	0,	NULL,			NULL		}, /* 6818 */
+	{ 0,	0,	NULL,			NULL		}, /* 6819 */
+	{ 0,	0,	NULL,			NULL		}, /* 6820 */
+	{ 0,	0,	NULL,			NULL		}, /* 6821 */
+	{ 0,	0,	NULL,			NULL		}, /* 6822 */
+	{ 0,	0,	NULL,			NULL		}, /* 6823 */
+	{ 0,	0,	NULL,			NULL		}, /* 6824 */
+	{ 0,	0,	NULL,			NULL		}, /* 6825 */
+	{ 0,	0,	NULL,			NULL		}, /* 6826 */
+	{ 0,	0,	NULL,			NULL		}, /* 6827 */
+	{ 0,	0,	NULL,			NULL		}, /* 6828 */
+	{ 0,	0,	NULL,			NULL		}, /* 6829 */
+	{ 0,	0,	NULL,			NULL		}, /* 6830 */
+	{ 0,	0,	NULL,			NULL		}, /* 6831 */
+	{ 0,	0,	NULL,			NULL		}, /* 6832 */
+	{ 0,	0,	NULL,			NULL		}, /* 6833 */
+	{ 0,	0,	NULL,			NULL		}, /* 6834 */
+	{ 0,	0,	NULL,			NULL		}, /* 6835 */
+	{ 0,	0,	NULL,			NULL		}, /* 6836 */
+	{ 0,	0,	NULL,			NULL		}, /* 6837 */
+	{ 0,	0,	NULL,			NULL		}, /* 6838 */
+	{ 0,	0,	NULL,			NULL		}, /* 6839 */
+	{ 0,	0,	NULL,			NULL		}, /* 6840 */
+	{ 0,	0,	NULL,			NULL		}, /* 6841 */
+	{ 0,	0,	NULL,			NULL		}, /* 6842 */
+	{ 0,	0,	NULL,			NULL		}, /* 6843 */
+	{ 0,	0,	NULL,			NULL		}, /* 6844 */
+	{ 0,	0,	NULL,			NULL		}, /* 6845 */
+	{ 0,	0,	NULL,			NULL		}, /* 6846 */
+	{ 0,	0,	NULL,			NULL		}, /* 6847 */
+	{ 0,	0,	NULL,			NULL		}, /* 6848 */
+	{ 0,	0,	NULL,			NULL		}, /* 6849 */
+	{ 0,	0,	NULL,			NULL		}, /* 6850 */
+	{ 0,	0,	NULL,			NULL		}, /* 6851 */
+	{ 0,	0,	NULL,			NULL		}, /* 6852 */
+	{ 0,	0,	NULL,			NULL		}, /* 6853 */
+	{ 0,	0,	NULL,			NULL		}, /* 6854 */
+	{ 0,	0,	NULL,			NULL		}, /* 6855 */
+	{ 0,	0,	NULL,			NULL		}, /* 6856 */
+	{ 0,	0,	NULL,			NULL		}, /* 6857 */
+	{ 0,	0,	NULL,			NULL		}, /* 6858 */
+	{ 0,	0,	NULL,			NULL		}, /* 6859 */
+	{ 0,	0,	NULL,			NULL		}, /* 6860 */
+	{ 0,	0,	NULL,			NULL		}, /* 6861 */
+	{ 0,	0,	NULL,			NULL		}, /* 6862 */
+	{ 0,	0,	NULL,			NULL		}, /* 6863 */
+	{ 0,	0,	NULL,			NULL		}, /* 6864 */
+	{ 0,	0,	NULL,			NULL		}, /* 6865 */
+	{ 0,	0,	NULL,			NULL		}, /* 6866 */
+	{ 0,	0,	NULL,			NULL		}, /* 6867 */
+	{ 0,	0,	NULL,			NULL		}, /* 6868 */
+	{ 0,	0,	NULL,			NULL		}, /* 6869 */
+	{ 0,	0,	NULL,			NULL		}, /* 6870 */
+	{ 0,	0,	NULL,			NULL		}, /* 6871 */
+	{ 0,	0,	NULL,			NULL		}, /* 6872 */
+	{ 0,	0,	NULL,			NULL		}, /* 6873 */
+	{ 0,	0,	NULL,			NULL		}, /* 6874 */
+	{ 0,	0,	NULL,			NULL		}, /* 6875 */
+	{ 0,	0,	NULL,			NULL		}, /* 6876 */
+	{ 0,	0,	NULL,			NULL		}, /* 6877 */
+	{ 0,	0,	NULL,			NULL		}, /* 6878 */
+	{ 0,	0,	NULL,			NULL		}, /* 6879 */
+	{ 0,	0,	NULL,			NULL		}, /* 6880 */
+	{ 0,	0,	NULL,			NULL		}, /* 6881 */
+	{ 0,	0,	NULL,			NULL		}, /* 6882 */
+	{ 0,	0,	NULL,			NULL		}, /* 6883 */
+	{ 0,	0,	NULL,			NULL		}, /* 6884 */
+	{ 0,	0,	NULL,			NULL		}, /* 6885 */
+	{ 0,	0,	NULL,			NULL		}, /* 6886 */
+	{ 0,	0,	NULL,			NULL		}, /* 6887 */
+	{ 0,	0,	NULL,			NULL		}, /* 6888 */
+	{ 0,	0,	NULL,			NULL		}, /* 6889 */
+	{ 0,	0,	NULL,			NULL		}, /* 6890 */
+	{ 0,	0,	NULL,			NULL		}, /* 6891 */
+	{ 0,	0,	NULL,			NULL		}, /* 6892 */
+	{ 0,	0,	NULL,			NULL		}, /* 6893 */
+	{ 0,	0,	NULL,			NULL		}, /* 6894 */
+	{ 0,	0,	NULL,			NULL		}, /* 6895 */
+	{ 0,	0,	NULL,			NULL		}, /* 6896 */
+	{ 0,	0,	NULL,			NULL		}, /* 6897 */
+	{ 0,	0,	NULL,			NULL		}, /* 6898 */
+	{ 0,	0,	NULL,			NULL		}, /* 6899 */
+	{ 0,	0,	NULL,			NULL		}, /* 6900 */
+	{ 0,	0,	NULL,			NULL		}, /* 6901 */
+	{ 0,	0,	NULL,			NULL		}, /* 6902 */
+	{ 0,	0,	NULL,			NULL		}, /* 6903 */
+	{ 0,	0,	NULL,			NULL		}, /* 6904 */
+	{ 0,	0,	NULL,			NULL		}, /* 6905 */
+	{ 0,	0,	NULL,			NULL		}, /* 6906 */
+	{ 0,	0,	NULL,			NULL		}, /* 6907 */
+	{ 0,	0,	NULL,			NULL		}, /* 6908 */
+	{ 0,	0,	NULL,			NULL		}, /* 6909 */
+	{ 0,	0,	NULL,			NULL		}, /* 6910 */
+	{ 0,	0,	NULL,			NULL		}, /* 6911 */
+	{ 0,	0,	NULL,			NULL		}, /* 6912 */
+	{ 0,	0,	NULL,			NULL		}, /* 6913 */
+	{ 0,	0,	NULL,			NULL		}, /* 6914 */
+	{ 0,	0,	NULL,			NULL		}, /* 6915 */
+	{ 0,	0,	NULL,			NULL		}, /* 6916 */
+	{ 0,	0,	NULL,			NULL		}, /* 6917 */
+	{ 0,	0,	NULL,			NULL		}, /* 6918 */
+	{ 0,	0,	NULL,			NULL		}, /* 6919 */
+	{ 0,	0,	NULL,			NULL		}, /* 6920 */
+	{ 0,	0,	NULL,			NULL		}, /* 6921 */
+	{ 0,	0,	NULL,			NULL		}, /* 6922 */
+	{ 0,	0,	NULL,			NULL		}, /* 6923 */
+	{ 0,	0,	NULL,			NULL		}, /* 6924 */
+	{ 0,	0,	NULL,			NULL		}, /* 6925 */
+	{ 0,	0,	NULL,			NULL		}, /* 6926 */
+	{ 0,	0,	NULL,			NULL		}, /* 6927 */
+	{ 0,	0,	NULL,			NULL		}, /* 6928 */
+	{ 0,	0,	NULL,			NULL		}, /* 6929 */
+	{ 0,	0,	NULL,			NULL		}, /* 6930 */
+	{ 0,	0,	NULL,			NULL		}, /* 6931 */
+	{ 0,	0,	NULL,			NULL		}, /* 6932 */
+	{ 0,	0,	NULL,			NULL		}, /* 6933 */
+	{ 0,	0,	NULL,			NULL		}, /* 6934 */
+	{ 0,	0,	NULL,			NULL		}, /* 6935 */
+	{ 0,	0,	NULL,			NULL		}, /* 6936 */
+	{ 0,	0,	NULL,			NULL		}, /* 6937 */
+	{ 0,	0,	NULL,			NULL		}, /* 6938 */
+	{ 0,	0,	NULL,			NULL		}, /* 6939 */
+	{ 0,	0,	NULL,			NULL		}, /* 6940 */
+	{ 0,	0,	NULL,			NULL		}, /* 6941 */
+	{ 0,	0,	NULL,			NULL		}, /* 6942 */
+	{ 0,	0,	NULL,			NULL		}, /* 6943 */
+	{ 0,	0,	NULL,			NULL		}, /* 6944 */
+	{ 0,	0,	NULL,			NULL		}, /* 6945 */
+	{ 0,	0,	NULL,			NULL		}, /* 6946 */
+	{ 0,	0,	NULL,			NULL		}, /* 6947 */
+	{ 0,	0,	NULL,			NULL		}, /* 6948 */
+	{ 0,	0,	NULL,			NULL		}, /* 6949 */
+	{ 0,	0,	NULL,			NULL		}, /* 6950 */
+	{ 0,	0,	NULL,			NULL		}, /* 6951 */
+	{ 0,	0,	NULL,			NULL		}, /* 6952 */
+	{ 0,	0,	NULL,			NULL		}, /* 6953 */
+	{ 0,	0,	NULL,			NULL		}, /* 6954 */
+	{ 0,	0,	NULL,			NULL		}, /* 6955 */
+	{ 0,	0,	NULL,			NULL		}, /* 6956 */
+	{ 0,	0,	NULL,			NULL		}, /* 6957 */
+	{ 0,	0,	NULL,			NULL		}, /* 6958 */
+	{ 0,	0,	NULL,			NULL		}, /* 6959 */
+	{ 0,	0,	NULL,			NULL		}, /* 6960 */
+	{ 0,	0,	NULL,			NULL		}, /* 6961 */
+	{ 0,	0,	NULL,			NULL		}, /* 6962 */
+	{ 0,	0,	NULL,			NULL		}, /* 6963 */
+	{ 0,	0,	NULL,			NULL		}, /* 6964 */
+	{ 0,	0,	NULL,			NULL		}, /* 6965 */
+	{ 0,	0,	NULL,			NULL		}, /* 6966 */
+	{ 0,	0,	NULL,			NULL		}, /* 6967 */
+	{ 0,	0,	NULL,			NULL		}, /* 6968 */
+	{ 0,	0,	NULL,			NULL		}, /* 6969 */
+	{ 0,	0,	NULL,			NULL		}, /* 6970 */
+	{ 0,	0,	NULL,			NULL		}, /* 6971 */
+	{ 0,	0,	NULL,			NULL		}, /* 6972 */
+	{ 0,	0,	NULL,			NULL		}, /* 6973 */
+	{ 0,	0,	NULL,			NULL		}, /* 6974 */
+	{ 0,	0,	NULL,			NULL		}, /* 6975 */
+	{ 0,	0,	NULL,			NULL		}, /* 6976 */
+	{ 0,	0,	NULL,			NULL		}, /* 6977 */
+	{ 0,	0,	NULL,			NULL		}, /* 6978 */
+	{ 0,	0,	NULL,			NULL		}, /* 6979 */
+	{ 0,	0,	NULL,			NULL		}, /* 6980 */
+	{ 0,	0,	NULL,			NULL		}, /* 6981 */
+	{ 0,	0,	NULL,			NULL		}, /* 6982 */
+	{ 0,	0,	NULL,			NULL		}, /* 6983 */
+	{ 0,	0,	NULL,			NULL		}, /* 6984 */
+	{ 0,	0,	NULL,			NULL		}, /* 6985 */
+	{ 0,	0,	NULL,			NULL		}, /* 6986 */
+	{ 0,	0,	NULL,			NULL		}, /* 6987 */
+	{ 0,	0,	NULL,			NULL		}, /* 6988 */
+	{ 0,	0,	NULL,			NULL		}, /* 6989 */
+	{ 0,	0,	NULL,			NULL		}, /* 6990 */
+	{ 0,	0,	NULL,			NULL		}, /* 6991 */
+	{ 0,	0,	NULL,			NULL		}, /* 6992 */
+	{ 0,	0,	NULL,			NULL		}, /* 6993 */
+	{ 0,	0,	NULL,			NULL		}, /* 6994 */
+	{ 0,	0,	NULL,			NULL		}, /* 6995 */
+	{ 0,	0,	NULL,			NULL		}, /* 6996 */
+	{ 0,	0,	NULL,			NULL		}, /* 6997 */
+	{ 0,	0,	NULL,			NULL		}, /* 6998 */
+	{ 0,	0,	NULL,			NULL		}, /* 6999 */ /* end of Linux N32 */
diff --git a/linux/mtd-abi.h b/linux/mtd-abi.h
new file mode 100644
index 0000000..576e8c9
--- /dev/null
+++ b/linux/mtd-abi.h
@@ -0,0 +1,278 @@
+/*
+ * Copyright © 1999-2010 David Woodhouse <dwmw2@infradead.org> et al.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifndef __MTD_ABI_H__
+#define __MTD_ABI_H__
+
+#include <linux/types.h>
+
+struct erase_info_user {
+	__u32 start;
+	__u32 length;
+};
+
+struct erase_info_user64 {
+	__u64 start;
+	__u64 length;
+};
+
+struct mtd_oob_buf {
+	__u32 start;
+	__u32 length;
+	unsigned char *ptr;
+};
+
+struct mtd_oob_buf64 {
+	__u64 start;
+	__u32 pad;
+	__u32 length;
+	__u64 usr_ptr;
+};
+
+/**
+ * MTD operation modes
+ *
+ * @MTD_OPS_PLACE_OOB:	OOB data are placed at the given offset (default)
+ * @MTD_OPS_AUTO_OOB:	OOB data are automatically placed at the free areas
+ *			which are defined by the internal ecclayout
+ * @MTD_OPS_RAW:	data are transferred as-is, with no error correction;
+ *			this mode implies %MTD_OPS_PLACE_OOB
+ *
+ * These modes can be passed to ioctl(MEMWRITE) and are also used internally.
+ * See notes on "MTD file modes" for discussion on %MTD_OPS_RAW vs.
+ * %MTD_FILE_MODE_RAW.
+ */
+enum {
+	MTD_OPS_PLACE_OOB = 0,
+	MTD_OPS_AUTO_OOB = 1,
+	MTD_OPS_RAW = 2,
+};
+
+/**
+ * struct mtd_write_req - data structure for requesting a write operation
+ *
+ * @start:	start address
+ * @len:	length of data buffer
+ * @ooblen:	length of OOB buffer
+ * @usr_data:	user-provided data buffer
+ * @usr_oob:	user-provided OOB buffer
+ * @mode:	MTD mode (see "MTD operation modes")
+ * @padding:	reserved, must be set to 0
+ *
+ * This structure supports ioctl(MEMWRITE) operations, allowing data and/or OOB
+ * writes in various modes. To write to OOB-only, set @usr_data == NULL, and to
+ * write data-only, set @usr_oob == NULL. However, setting both @usr_data and
+ * @usr_oob to NULL is not allowed.
+ */
+struct mtd_write_req {
+	__u64 start;
+	__u64 len;
+	__u64 ooblen;
+	__u64 usr_data;
+	__u64 usr_oob;
+	__u8 mode;
+	__u8 padding[7];
+};
+
+#define MTD_ABSENT		0
+#define MTD_RAM			1
+#define MTD_ROM			2
+#define MTD_NORFLASH		3
+#define MTD_NANDFLASH		4
+#define MTD_DATAFLASH		6
+#define MTD_UBIVOLUME		7
+#define MTD_MLCNANDFLASH	8
+
+#define MTD_WRITEABLE		0x400	/* Device is writeable */
+#define MTD_BIT_WRITEABLE	0x800	/* Single bits can be flipped */
+#define MTD_NO_ERASE		0x1000	/* No erase necessary */
+#define MTD_POWERUP_LOCK	0x2000	/* Always locked after reset */
+
+/* Some common devices / combinations of capabilities */
+#define MTD_CAP_ROM		0
+#define MTD_CAP_RAM		(MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_NO_ERASE)
+#define MTD_CAP_NORFLASH	(MTD_WRITEABLE | MTD_BIT_WRITEABLE)
+#define MTD_CAP_NANDFLASH	(MTD_WRITEABLE)
+
+/* Obsolete ECC byte placement modes (used with obsolete MEMGETOOBSEL) */
+#define MTD_NANDECC_OFF		0	// Switch off ECC (Not recommended)
+#define MTD_NANDECC_PLACE	1	// Use the given placement in the structure (YAFFS1 legacy mode)
+#define MTD_NANDECC_AUTOPLACE	2	// Use the default placement scheme
+#define MTD_NANDECC_PLACEONLY	3	// Use the given placement in the structure (Do not store ecc result on read)
+#define MTD_NANDECC_AUTOPL_USR 	4	// Use the given autoplacement scheme rather than using the default
+
+/* OTP mode selection */
+#define MTD_OTP_OFF		0
+#define MTD_OTP_FACTORY		1
+#define MTD_OTP_USER		2
+
+struct mtd_info_user {
+	__u8 type;
+	__u32 flags;
+	__u32 size;	/* Total size of the MTD */
+	__u32 erasesize;
+	__u32 writesize;
+	__u32 oobsize;	/* Amount of OOB data per block (e.g. 16) */
+	__u64 padding;	/* Old obsolete field; do not use */
+};
+
+struct region_info_user {
+	__u32 offset;		/* At which this region starts,
+				 * from the beginning of the MTD */
+	__u32 erasesize;	/* For this region */
+	__u32 numblocks;	/* Number of blocks in this region */
+	__u32 regionindex;
+};
+
+struct otp_info {
+	__u32 start;
+	__u32 length;
+	__u32 locked;
+};
+
+/*
+ * Note, the following ioctl existed in the past and was removed:
+ * #define MEMSETOOBSEL           _IOW('M', 9, struct nand_oobinfo)
+ * Try to avoid adding a new ioctl with the same ioctl number.
+ */
+
+/* Get basic MTD characteristics info (better to use sysfs) */
+#define MEMGETINFO		_IOR('M', 1, struct mtd_info_user)
+/* Erase segment of MTD */
+#define MEMERASE		_IOW('M', 2, struct erase_info_user)
+/* Write out-of-band data from MTD */
+#define MEMWRITEOOB		_IOWR('M', 3, struct mtd_oob_buf)
+/* Read out-of-band data from MTD */
+#define MEMREADOOB		_IOWR('M', 4, struct mtd_oob_buf)
+/* Lock a chip (for MTD that supports it) */
+#define MEMLOCK			_IOW('M', 5, struct erase_info_user)
+/* Unlock a chip (for MTD that supports it) */
+#define MEMUNLOCK		_IOW('M', 6, struct erase_info_user)
+/* Get the number of different erase regions */
+#define MEMGETREGIONCOUNT	_IOR('M', 7, int)
+/* Get information about the erase region for a specific index */
+#define MEMGETREGIONINFO	_IOWR('M', 8, struct region_info_user)
+/* Get info about OOB modes (e.g., RAW, PLACE, AUTO) - legacy interface */
+#define MEMGETOOBSEL		_IOR('M', 10, struct nand_oobinfo)
+/* Check if an eraseblock is bad */
+#define MEMGETBADBLOCK		_IOW('M', 11, __kernel_loff_t)
+/* Mark an eraseblock as bad */
+#define MEMSETBADBLOCK		_IOW('M', 12, __kernel_loff_t)
+/* Set OTP (One-Time Programmable) mode (factory vs. user) */
+#define OTPSELECT		_IOR('M', 13, int)
+/* Get number of OTP (One-Time Programmable) regions */
+#define OTPGETREGIONCOUNT	_IOW('M', 14, int)
+/* Get all OTP (One-Time Programmable) info about MTD */
+#define OTPGETREGIONINFO	_IOW('M', 15, struct otp_info)
+/* Lock a given range of user data (must be in mode %MTD_FILE_MODE_OTP_USER) */
+#define OTPLOCK			_IOR('M', 16, struct otp_info)
+/* Get ECC layout (deprecated) */
+#define ECCGETLAYOUT		_IOR('M', 17, struct nand_ecclayout_user)
+/* Get statistics about corrected/uncorrected errors */
+#define ECCGETSTATS		_IOR('M', 18, struct mtd_ecc_stats)
+/* Set MTD mode on a per-file-descriptor basis (see "MTD file modes") */
+#define MTDFILEMODE		_IO('M', 19)
+/* Erase segment of MTD (supports 64-bit address) */
+#define MEMERASE64		_IOW('M', 20, struct erase_info_user64)
+/* Write data to OOB (64-bit version) */
+#define MEMWRITEOOB64		_IOWR('M', 21, struct mtd_oob_buf64)
+/* Read data from OOB (64-bit version) */
+#define MEMREADOOB64		_IOWR('M', 22, struct mtd_oob_buf64)
+/* Check if chip is locked (for MTD that supports it) */
+#define MEMISLOCKED		_IOR('M', 23, struct erase_info_user)
+/*
+ * Most generic write interface; can write in-band and/or out-of-band in various
+ * modes (see "struct mtd_write_req"). This ioctl is not supported for flashes
+ * without OOB, e.g., NOR flash.
+ */
+#define MEMWRITE		_IOWR('M', 24, struct mtd_write_req)
+
+/*
+ * Obsolete legacy interface. Keep it in order not to break userspace
+ * interfaces
+ */
+struct nand_oobinfo {
+	__u32 useecc;
+	__u32 eccbytes;
+	__u32 oobfree[8][2];
+	__u32 eccpos[32];
+};
+
+struct nand_oobfree {
+	__u32 offset;
+	__u32 length;
+};
+
+#define MTD_MAX_OOBFREE_ENTRIES	8
+#define MTD_MAX_ECCPOS_ENTRIES	64
+/*
+ * OBSOLETE: ECC layout control structure. Exported to user-space via ioctl
+ * ECCGETLAYOUT for backwards compatbility and should not be mistaken as a
+ * complete set of ECC information. The ioctl truncates the larger internal
+ * structure to retain binary compatibility with the static declaration of the
+ * ioctl. Note that the "MTD_MAX_..._ENTRIES" macros represent the max size of
+ * the user struct, not the MAX size of the internal struct nand_ecclayout.
+ */
+struct nand_ecclayout_user {
+	__u32 eccbytes;
+	__u32 eccpos[MTD_MAX_ECCPOS_ENTRIES];
+	__u32 oobavail;
+	struct nand_oobfree oobfree[MTD_MAX_OOBFREE_ENTRIES];
+};
+
+/**
+ * struct mtd_ecc_stats - error correction stats
+ *
+ * @corrected:	number of corrected bits
+ * @failed:	number of uncorrectable errors
+ * @badblocks:	number of bad blocks in this partition
+ * @bbtblocks:	number of blocks reserved for bad block tables
+ */
+struct mtd_ecc_stats {
+	__u32 corrected;
+	__u32 failed;
+	__u32 badblocks;
+	__u32 bbtblocks;
+};
+
+/*
+ * MTD file modes - for read/write access to MTD
+ *
+ * @MTD_FILE_MODE_NORMAL:	OTP disabled, ECC enabled
+ * @MTD_FILE_MODE_OTP_FACTORY:	OTP enabled in factory mode
+ * @MTD_FILE_MODE_OTP_USER:	OTP enabled in user mode
+ * @MTD_FILE_MODE_RAW:		OTP disabled, ECC disabled
+ *
+ * These modes can be set via ioctl(MTDFILEMODE). The mode mode will be retained
+ * separately for each open file descriptor.
+ *
+ * Note: %MTD_FILE_MODE_RAW provides the same functionality as %MTD_OPS_RAW -
+ * raw access to the flash, without error correction or autoplacement schemes.
+ * Wherever possible, the MTD_OPS_* mode will override the MTD_FILE_MODE_* mode
+ * (e.g., when using ioctl(MEMWRITE)), but in some cases, the MTD_FILE_MODE is
+ * used out of necessity (e.g., `write()', ioctl(MEMWRITEOOB64)).
+ */
+enum mtd_file_modes {
+	MTD_FILE_MODE_NORMAL = MTD_OTP_OFF,
+	MTD_FILE_MODE_OTP_FACTORY = MTD_OTP_FACTORY,
+	MTD_FILE_MODE_OTP_USER = MTD_OTP_USER,
+	MTD_FILE_MODE_RAW,
+};
+
+#endif /* __MTD_ABI_H__ */
diff --git a/linux/sh/syscallent.h b/linux/sh/syscallent.h
deleted file mode 100644
index 2906800..0000000
--- a/linux/sh/syscallent.h
+++ /dev/null
@@ -1,488 +0,0 @@
-/*
- * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
- * Copyright (c) 1993, 1994, 1995 Rick Sladkey <jrs@world.std.com>
- * Copyright (c) 2000 PocketPenguins Inc.  Linux for Hitachi SuperH
- *                    port by Greg Banks <gbanks@pocketpenguins.com>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote products
- *    derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
- * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
- * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
- */
-
-	{ 0,	0,	sys_restart_syscall,	"restart_syscall"}, /* 0 */
-	{ 1,	TP,	sys_exit,		"_exit"		}, /* 1 */
-	{ 0,	TP,	sys_fork,		"fork"		}, /* 2 */
-	{ 3,	TD,	sys_read,		"read"		}, /* 3 */
-	{ 3,	TD,	sys_write,		"write"		}, /* 4 */
-	{ 3,	TD|TF,	sys_open,		"open"		}, /* 5 */
-	{ 1,	TD,	sys_close,		"close"		}, /* 6 */
-	{ 3,	TP,	sys_waitpid,		"waitpid"	}, /* 7 */
-	{ 2,	TD|TF,	sys_creat,		"creat"		}, /* 8 */
-	{ 2,	TF,	sys_link,		"link"		}, /* 9 */
-	{ 1,	TF,	sys_unlink,		"unlink"	}, /* 10 */
-	{ 3,	TF|TP,	sys_execve,		"execve"	}, /* 11 */
-	{ 1,	TF,	sys_chdir,		"chdir"		}, /* 12 */
-	{ 1,	0,	sys_time,		"time"		}, /* 13 */
-	{ 3,	TF,	sys_mknod,		"mknod"		}, /* 14 */
-	{ 2,	TF,	sys_chmod,		"chmod"		}, /* 15 */
-	{ 3,	TF,	sys_chown,		"lchown"		}, /* 16 */
-	{ 0,	0,	sys_break,		"break"		}, /* 17 */
-	{ 2,	TF,	sys_oldstat,		"oldstat"	}, /* 18 */
-	{ 3,	TD,	sys_lseek,		"lseek"		}, /* 19 */
-	{ 0,	0,	sys_getpid,		"getpid"	}, /* 20 */
-	{ 5,	TF,	sys_mount,		"mount"		}, /* 21 */
-	{ 1,	TF,	sys_umount,		"oldumount"	}, /* 22 */
-	{ 1,	0,	sys_setuid,		"setuid"	}, /* 23 */
-	{ 0,	NF,	sys_getuid,		"getuid"	}, /* 24 */
-	{ 1,	0,	sys_stime,		"stime"		}, /* 25 */
-	{ 4,	0,	sys_ptrace,		"ptrace"	}, /* 26 */
-	{ 1,	0,	sys_alarm,		"alarm"		}, /* 27 */
-	{ 2,	TD,	sys_oldfstat,		"oldfstat"	}, /* 28 */
-	{ 0,	TS,	sys_pause,		"pause"		}, /* 29 */
-	{ 2,	TF,	sys_utime,		"utime"		}, /* 30 */
-	{ 2,	0,	sys_stty,		"stty"		}, /* 31 */
-	{ 2,	0,	sys_gtty,		"gtty"		}, /* 32 */
-	{ 2,	TF,	sys_access,		"access"	}, /* 33 */
-	{ 1,	0,	sys_nice,		"nice"		}, /* 34 */
-	{ 0,	0,	sys_ftime,		"ftime"		}, /* 35 */
-	{ 0,	0,	sys_sync,		"sync"		}, /* 36 */
-	{ 2,	TS,	sys_kill,		"kill"		}, /* 37 */
-	{ 2,	TF,	sys_rename,		"rename"	}, /* 38 */
-	{ 2,	TF,	sys_mkdir,		"mkdir"		}, /* 39 */
-	{ 1,	TF,	sys_rmdir,		"rmdir"		}, /* 40 */
-	{ 1,	TD,	sys_dup,		"dup"		}, /* 41 */
-	{ 1,	TD,	sys_pipe,		"pipe"		}, /* 42 */
-	{ 1,	0,	sys_times,		"times"		}, /* 43 */
-	{ 0,	0,	sys_prof,		"prof"		}, /* 44 */
-	{ 1,	0,	sys_brk,		"brk"		}, /* 45 */
-	{ 1,	0,	sys_setgid,		"setgid"	}, /* 46 */
-	{ 0,	NF,	sys_getgid,		"getgid"	}, /* 47 */
-	{ 3,	TS,	sys_signal,		"signal"	}, /* 48 */
-	{ 0,	NF,	sys_geteuid,		"geteuid"	}, /* 49 */
-	{ 0,	NF,	sys_getegid,		"getegid"	}, /* 50 */
-	{ 1,	TF,	sys_acct,		"acct"		}, /* 51 */
-	{ 2,	TF,	sys_umount2,		"umount"	}, /* 52 */
-	{ 0,	0,	sys_lock,		"lock"		}, /* 53 */
-	{ 3,	TD,	sys_ioctl,		"ioctl"		}, /* 54 */
-	{ 3,	TD,	sys_fcntl,		"fcntl"		}, /* 55 */
-	{ 0,	0,	sys_mpx,		"mpx"		}, /* 56 */
-	{ 2,	0,	sys_setpgid,		"setpgid"	}, /* 57 */
-	{ 2,	0,	sys_ulimit,		"ulimit"	}, /* 58 */
-	{ 1,	0,	sys_oldolduname,	"oldolduname"	}, /* 59 */
-	{ 1,	0,	sys_umask,		"umask"		}, /* 60 */
-	{ 1,	TF,	sys_chroot,		"chroot"	}, /* 61 */
-	{ 2,	0,	sys_ustat,		"ustat"		}, /* 62 */
-	{ 2,	TD,	sys_dup2,		"dup2"		}, /* 63 */
-	{ 0,	0,	sys_getppid,		"getppid"	}, /* 64 */
-	{ 0,	0,	sys_getpgrp,		"getpgrp"	}, /* 65 */
-	{ 0,	0,	sys_setsid,		"setsid"	}, /* 66 */
-	{ 3,	TS,	sys_sigaction,		"sigaction"	}, /* 67 */
-	{ 0,	TS,	sys_siggetmask,		"siggetmask"	}, /* 68 */
-	{ 1,	TS,	sys_sigsetmask,		"sigsetmask"	}, /* 69 */
-	{ 2,	0,	sys_setreuid,		"setreuid"	}, /* 70 */
-	{ 2,	0,	sys_setregid,		"setregid"	}, /* 71 */
-	{ 3,	TS,	sys_sigsuspend,		"sigsuspend"	}, /* 72 */
-	{ 1,	TS,	sys_sigpending,		"sigpending"	}, /* 73 */
-	{ 2,	0,	sys_sethostname,	"sethostname"	}, /* 74 */
-	{ 2,	0,	sys_setrlimit,		"setrlimit"	}, /* 75 */
-	{ 2,	0,	sys_getrlimit,		"getrlimit"	}, /* 76 */
-	{ 2,	0,	sys_getrusage,		"getrusage"	}, /* 77 */
-	{ 2,	0,	sys_gettimeofday,	"gettimeofday"	}, /* 78 */
-	{ 2,	0,	sys_settimeofday,	"settimeofday"	}, /* 79 */
-	{ 2,	0,	sys_getgroups,		"getgroups"	}, /* 80 */
-	{ 2,	0,	sys_setgroups,		"setgroups"	}, /* 81 */
-	{ 1,	TD,	sys_oldselect,		"oldselect"	}, /* 82 */
-	{ 2,	TF,	sys_symlink,		"symlink"	}, /* 83 */
-	{ 2,	TF,	sys_oldlstat,		"oldlstat"	}, /* 84 */
-	{ 3,	TF,	sys_readlink,		"readlink"	}, /* 85 */
-	{ 1,	TF,	sys_uselib,		"uselib"	}, /* 86 */
-	{ 1,	TF,	sys_swapon,		"swapon"	}, /* 87 */
-	{ 3,	0,	sys_reboot,		"reboot"	}, /* 88 */
-	{ 3,	TD,	sys_readdir,		"readdir"	}, /* 89 */
-	{ 6,	TD,	sys_old_mmap,		"old_mmap"   	}, /* 90 */
-	{ 2,	0,	sys_munmap,		"munmap"	}, /* 91 */
-	{ 2,	TF,	sys_truncate,		"truncate"	}, /* 92 */
-	{ 2,	TD,	sys_ftruncate,		"ftruncate"	}, /* 93 */
-	{ 2,	TD,	sys_fchmod,		"fchmod"	}, /* 94 */
-	{ 3,	TD,	sys_fchown,		"fchown"	}, /* 95 */
-	{ 2,	0,	sys_getpriority,	"getpriority"	}, /* 96 */
-	{ 3,	0,	sys_setpriority,	"setpriority"	}, /* 97 */
-	{ 4,	0,	sys_profil,		"profil"	}, /* 98 */
-	{ 2,	TF,	sys_statfs,		"statfs"	}, /* 99 */
-	{ 2,	TD,	sys_fstatfs,		"fstatfs"	}, /* 100 */
-	{ 3,	0,	sys_ioperm,		"ioperm"	}, /* 101 */
-	{ 2,	TD,	sys_socketcall,		"socketcall"	}, /* 102 */
-	{ 3,	0,	sys_syslog,		"syslog"	}, /* 103 */
-	{ 3,	0,	sys_setitimer,		"setitimer"	}, /* 104 */
-	{ 2,	0,	sys_getitimer,		"getitimer"	}, /* 105 */
-	{ 2,	TF,	sys_stat,		"stat"		}, /* 106 */
-	{ 2,	TF,	sys_lstat,		"lstat"		}, /* 107 */
-	{ 2,	TD,	sys_fstat,		"fstat"		}, /* 108 */
-	{ 1,	0,	sys_olduname,		"olduname"	}, /* 109 */
-	{ 1,	0,	sys_iopl,		"iopl"		}, /* 110 */
-	{ 0,	0,	sys_vhangup,		"vhangup"	}, /* 111 */
-	{ 0,	0,	sys_idle,		"idle"		}, /* 112 */
-	{ 1,	0,	sys_vm86old,		"vm86old"	}, /* 113 */
-	{ 4,	TP,	sys_wait4,		"wait4"		}, /* 114 */
-	{ 1,	TF,	sys_swapoff,		"swapoff"	}, /* 115 */
-	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 116 */
-	{ 5,	0,	sys_ipc,		"ipc"		}, /* 117 */
-	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 118 */
-	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
-	{ 5,	TP,	sys_clone,		"clone"		}, /* 120 */
-	{ 2,	0,	sys_setdomainname,	"setdomainname"	}, /* 121 */
-	{ 1,	0,	sys_uname,		"uname"		}, /* 122 */
-	{ 3,	0,	sys_cacheflush,		"cacheflush"	}, /* 123 */
-	{ 1,	0,	sys_adjtimex,		"adjtimex"	}, /* 124 */
-	{ 3,	0,	sys_mprotect,		"mprotect"	}, /* 125 */
-	{ 3,	TS,	sys_sigprocmask,	"sigprocmask"	}, /* 126 */
-	{ 2,	0,	sys_create_module,	"create_module"	}, /* 127 */
-	{ 3,	0,	sys_init_module,	"init_module"	}, /* 128 */
-	{ 2,	0,	sys_delete_module,	"delete_module"	}, /* 129 */
-	{ 1,	0,	sys_get_kernel_syms,	"get_kernel_syms"}, /* 130 */
-	{ 4,	0,	sys_quotactl,		"quotactl"	}, /* 131 */
-	{ 1,	0,	sys_getpgid,		"getpgid"	}, /* 132 */
-	{ 1,	TD,	sys_fchdir,		"fchdir"	}, /* 133 */
-	{ 0,	0,	sys_bdflush,		"bdflush"	}, /* 134 */
-	{ 3,	0,	sys_sysfs,		"sysfs"		}, /* 135 */
-	{ 1,	0,	sys_personality,	"personality"	}, /* 136 */
-	{ 5,	0,	sys_afs_syscall,	"afs_syscall"	}, /* 137 */
-	{ 1,	NF,	sys_setfsuid,		"setfsuid"	}, /* 138 */
-	{ 1,	NF,	sys_setfsgid,		"setfsgid"	}, /* 139 */
-	{ 5,	TD,	sys_llseek,		"_llseek"	}, /* 140 */
-	{ 3,	TD,	sys_getdents,		"getdents"	}, /* 141 */
-	{ 5,	TD,	sys_select,		"select"	}, /* 142 */
-	{ 2,	TD,	sys_flock,		"flock"		}, /* 143 */
-	{ 3,	0,	sys_msync,		"msync"		}, /* 144 */
-	{ 3,	TD,	sys_readv,		"readv"		}, /* 145 */
-	{ 3,	TD,	sys_writev,		"writev"	}, /* 146 */
-	{ 1,	0,	sys_getsid,		"getsid"	}, /* 147 */
-	{ 1,	TD,	sys_fdatasync,		"fdatasync"	}, /* 148 */
-	{ 1,	0,	sys_sysctl,		"_sysctl"	}, /* 149 */
-	{ 1,	0,	sys_mlock,		"mlock"		}, /* 150 */
-	{ 2,	0,	sys_munlock,		"munlock"	}, /* 151 */
-	{ 2,	0,	sys_mlockall,		"mlockall"	}, /* 152 */
-	{ 1,	0,	sys_munlockall,		"munlockall"	}, /* 153 */
-	{ 0,	0,	sys_sched_setparam,	"sched_setparam"}, /* 154 */
-	{ 2,	0,	sys_sched_getparam,	"sched_getparam"}, /* 155 */
-	{ 3,	0,	sys_sched_setscheduler,	"sched_setscheduler"}, /* 156 */
-	{ 1,	0,	sys_sched_getscheduler,	"sched_getscheduler"}, /* 157 */
-	{ 0,	0,	sys_sched_yield,	"sched_yield"}, /* 158 */
-	{ 1,	0,	sys_sched_get_priority_max,"sched_get_priority_max"}, /* 159 */
-	{ 1,	0,	sys_sched_get_priority_min,"sched_get_priority_min"}, /* 160 */
-	{ 2,	0,	sys_sched_rr_get_interval,"sched_rr_get_interval"}, /* 161 */
-	{ 2,	0,	sys_nanosleep,		"nanosleep"	}, /* 162 */
-	{ 5,	0,	sys_mremap,		"mremap"	}, /* 163 */
-	{ 3,	0,	sys_setresuid,		"setresuid"	}, /* 164 */
-	{ 3,	0,	sys_getresuid,		"getresuid"	}, /* 165 */
-	{ 5,	0,	printargs,		"vm86"		}, /* 166 */
-	{ 5,	0,	sys_query_module,	"query_module"	}, /* 167 */
-	{ 3,	TD,	sys_poll,		"poll"		}, /* 168 */
-	{ 3,	0,	printargs,		"nfsservctl"	}, /* 169 */
-	{ 3,	0,	sys_setresgid,		"setresgid"	}, /* 170 */
-	{ 3,	0,	sys_getresgid,		"getresgid"	}, /* 171 */
-	{ 5,	0,	sys_prctl,		"prctl"		}, /* 172 */
-	{ 1,	TS,	printargs,		"rt_sigreturn"	}, /* 173 */
-	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"  }, /* 174 */
-	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"}, /* 175 */
-	{ 2,	TS,	sys_rt_sigpending,	"rt_sigpending"	}, /* 176 */
-	{ 4,	TS,	sys_rt_sigtimedwait,	"rt_sigtimedwait"}, /* 177 */
-	{ 3,	TS,	sys_rt_sigqueueinfo,    "rt_sigqueueinfo"}, /* 178 */
-	{ 2,	TS,	sys_rt_sigsuspend,	"rt_sigsuspend"	}, /* 179 */
-
-	{ 6,	TD,	sys_pread,		"pread"		}, /* 180 */
-	{ 6,	TD,	sys_pwrite,		"pwrite"	}, /* 181 */
-	{ 3,	TF,	sys_chown,		"chown"		}, /* 182 */
-	{ 2,	0,	sys_getcwd,		"getcwd"	}, /* 183 */
-	{ 2,	0,	sys_capget,		"capget"	}, /* 184 */
-	{ 2,	0,	sys_capset,		"capset"	}, /* 185 */
-	{ 2,	TS,	sys_sigaltstack,	"sigaltstack"	}, /* 186 */
-	{ 4,	TD|TN,	sys_sendfile,		"sendfile"	}, /* 187 */
-	{ 5,	0,	printargs,		"SYS_188"	}, /* 188 */
-	{ 5,	0,	printargs,		"SYS_189"	}, /* 189 */
-	{ 0,	TP,	sys_vfork,		"vfork"		}, /* 190 */
-	{ 5,	0,	printargs,		"getrlimit"	}, /* 191 */
-	{ 6,	TD,	sys_mmap,		"mmap2"		}, /* 192 */
-	{ 5,	0,	sys_truncate64,		"truncate64"	}, /* 193 */
-	{ 5,	TD,	sys_ftruncate64,	"ftruncate64"	}, /* 194 */
-	{ 2,	TF,	sys_stat64,		"stat64"	}, /* 195 */
-	{ 2,	TF,	sys_lstat64,		"lstat64"	}, /* 196 */
-	{ 2,	TD,	sys_fstat64,		"fstat64"	}, /* 197 */
-/*TODO*/{ 3,	TF,	printargs,		"lchown32"	}, /* 198 */
-/*TODO*/{ 0,	0,	printargs,		"getuid32"	}, /* 199 */
-
-	{ 0,	0,	printargs,		"getgid32"	}, /* 200 */
-	{ 0,	0,	printargs,		"geteuid32"	}, /* 201 */
-	{ 0,	0,	printargs,		"getegid32"	}, /* 202 */
-	{ 2,	0,	printargs,		"setreuid32"	}, /* 203 */
-	{ 2,	0,	printargs,		"setregid32"	}, /* 204 */
-	{ 2,	0,	sys_getgroups32,	"getgroups32"	}, /* 205 */
-	{ 2,	0,	sys_setgroups32,	"setgroups32"	}, /* 206 */
-	{ 3,	0,	printargs,		"fchown32"	}, /* 207 */
-	{ 3,	0,	printargs,		"setresuid32"	}, /* 208 */
-	{ 3,	0,	printargs,		"getresuid32"	}, /* 209 */
-	{ 3,	0,	printargs,		"setresgid32"	}, /* 210 */
-	{ 3,	0,	printargs,		"getsetgid32"	}, /* 211 */
-	{ 3,	TF,	printargs,		"chown32"	}, /* 212 */
-	{ 1,	0,	printargs,		"setuid32"	}, /* 213 */
-	{ 1,	0,	printargs,		"setgid32"	}, /* 214 */
-	{ 1,	0,	printargs,		"setfsuid32"	}, /* 215 */
-	{ 1,	0,	printargs,		"setfsgid32"	}, /* 216 */
-	{ 2,	TF,	sys_pivotroot,		"pivot_root"	}, /* 217 */
-	{ 3,	0,	printargs,		"mincore"	}, /* 218 */
-	{ 3,	0,	sys_madvise,		"madvise"	}, /* 219 */
-	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 220 */
-	{ 3,	TD,	sys_fcntl,		"fcntl64"	}, /* 221 */
-	{ 4,	0,	printargs,		"SYS_222"	}, /* 222 */
-	{ 4,	0,	printargs,		"SYS_223"	}, /* 223 */
-	{ 4,	0,	printargs,		"gettid"	}, /* 224 */
-	{ 5,	TD,	sys_readahead,		"readahead"	}, /* 225 */
-	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 226 */
-	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 227 */
-	{ 5,	TD,	sys_fsetxattr,		"fsetxattr"	}, /* 228 */
-	{ 4,	TF,	sys_getxattr,		"getxattr"	}, /* 229 */
-	{ 4,	TF,	sys_getxattr,		"lgetxattr"	}, /* 230 */
-	{ 4,	TD,	sys_fgetxattr,		"fgetxattr"	}, /* 231 */
-	{ 3,	TF,	sys_listxattr,		"listxattr"	}, /* 232 */
-	{ 3,	TF,	sys_listxattr,		"llistxattr"	}, /* 233 */
-	{ 3,	TD,	sys_flistxattr,		"flistxattr"	}, /* 234 */
-	{ 2,	TF,	sys_removexattr,	"removexattr"	}, /* 235 */
-	{ 2,	TF,	sys_removexattr,	"lremovexattr"	}, /* 236 */
-	{ 2,	TD,	sys_fremovexattr,	"fremovexattr"	}, /* 237 */
-	{ 2,	TD,	sys_kill,		"tkill"		}, /* 238 */
-	{ 5,	TD|TN,	sys_sendfile64,		"sendfile64"	}, /* 239 */
-	{ 6,	0,	sys_futex,		"futex"		}, /* 240 */
-	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity"}, /* 241 */
-	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity"}, /* 242 */
-	{ 0,	0,	printargs,		"SYS_243"	}, /* 243 */
-	{ 0,	0,	printargs,		"SYS_244"	}, /* 244 */
-	{ 2,	0,	sys_io_setup,		"io_setup"	}, /* 245 */
-	{ 1,	0,	sys_io_destroy,		"io_destroy"	}, /* 246 */
-	{ 5,	0,	sys_io_getevents,	"io_getevents"	}, /* 247 */
-	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 248 */
-	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 249 */
-	{ 5,	TD,	sys_fadvise64,		"fadvise64"	}, /* 250 */
-	{ 0,	0,	printargs,		"SYS_251"	}, /* 251 */
-	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 252 */
-	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 253 */
-	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 254 */
-	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 255 */
-	{ 3,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 256 */
-	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 257 */
-	{ 1,	0,	printargs,		"set_tid_address"}, /* 258 */
-	{ 3,	0,	sys_timer_create,	"timer_create"	}, /* 259 */
-	{ 4,	0,	sys_timer_settime,	"timer_settime"	}, /* 260 */
-	{ 2,	0,	sys_timer_gettime,	"timer_gettime"	}, /* 261 */
-	{ 1,	0,	sys_timer_getoverrun,	"timer_getoverrun"}, /* 262 */
-	{ 1,	0,	sys_timer_delete,	"timer_delete"	}, /* 263 */
-	{ 2,	0,	sys_clock_settime,	"clock_settime"	}, /* 264 */
-	{ 2,	0,	sys_clock_gettime,	"clock_gettime"	}, /* 265 */
-	{ 2,	0,	sys_clock_getres,	"clock_getres"	}, /* 266 */
-	{ 4,	0,	sys_clock_nanosleep,	"clock_nanosleep"}, /* 267 */
-	{ 3,	TF,	sys_statfs64,		"statfs64"	}, /* 268 */
-	{ 2,	TD,	sys_fstatfs64,		"fstatfs64"	}, /* 269 */
-	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 270 */
-	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 271 */
-	{ 6,	TD,	sys_fadvise64_64,	"fadvise64_64"	}, /* 272 */
-	{ 0,	0,	printargs,		"SYS_273"	}, /* 273 */
-	{ 4,	0,	sys_mbind,		"mbind"		}, /* 274 */
-	{ 5,	0,	sys_get_mempolicy,	"get_mempolicy"	}, /* 275 */
-	{ 3,	0,	sys_set_mempolicy,	"set_mempolicy"	}, /* 276 */
-	{ 4,	0,	sys_mq_open,		"mq_open"	}, /* 277 */
-	{ 1,	0,	sys_mq_unlink,		"mq_unlink"	}, /* 278 */
-	{ 5,	0,	sys_mq_timedsend,	"mq_timedsend"	}, /* 279 */
-	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive"}, /* 280 */
-	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 281 */
-	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 282 */
-	{ 5,	0,	printargs,		"kexec_load"	}, /* 283 */
-	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 284 */
-	{ 5,	0,	printargs,		"add_key"	}, /* 285 */
-	{ 4,	0,	printargs,		"request_key"	}, /* 286 */
-	{ 5,	0,	printargs,		"keyctl"	}, /* 287 */
-	{ 3,	0,	printargs,		"ioprio_set"	}, /* 288 */
-	{ 2,	0,	printargs,		"ioprio_get"	}, /* 289 */
-	{ 0,	TD,	printargs,		"inotify_init"	}, /* 290 */
-	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch"}, /* 291 */
-	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch"}, /* 292 */
-	{ 5,	0,	printargs,		"SYS_293"	}, /* 293 */
-	{ 4,	0,	printargs,		"migrate_pages"	}, /* 294 */
-	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 295 */
-	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 296 */
-	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 297 */
-	{ 5,	TD|TF,	sys_fchownat,		"fchownat"	}, /* 298 */
-	{ 3,	TD|TF,	sys_futimesat,		"futimesat"	}, /* 299 */
-	{ 4,	TD|TF,	sys_newfstatat,		"newfstatat"	}, /* 300 */
-	{ 3,	TD|TF,	sys_unlinkat,		"unlinkat"	}, /* 301 */
-	{ 4,	TD|TF,	sys_renameat,		"renameat"	}, /* 302 */
-	{ 5,	TD|TF,	sys_linkat,		"linkat"	}, /* 303 */
-	{ 3,	TD|TF,	sys_symlinkat,		"symlinkat"	}, /* 304 */
-	{ 4,	TD|TF,	sys_readlinkat,		"readlinkat"	}, /* 305 */
-	{ 3,	TD|TF,	sys_fchmodat,		"fchmodat"	}, /* 306 */
-	{ 3,	TD|TF,	sys_faccessat,		"faccessat"	}, /* 307 */
-	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 308 */
-	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 309 */
-	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 310 */
-	{ 2,	0,	printargs,		"set_robust_list"}, /* 311 */
-	{ 3,	0,	printargs,		"get_robust_list"}, /* 312 */
-	{ 6,	TD,	printargs,		"splice"	}, /* 313 */
-	{ 4,	TD,	printargs,		"sync_file_range"}, /* 314 */
-	{ 4,	TD,	printargs,		"tee"		}, /* 315 */
-	{ 5,	TD,	printargs,		"vmsplice"	}, /* 316 */
-	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 317 */
-	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 318 */
-	{ 5,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 319 */
-	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 320 */
-	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 321 */
-	{ 4,	TD,	sys_timerfd,		"timerfd"	}, /* 322 */
-	{ 1,	TD,	sys_eventfd,		"eventfd"	}, /* 323 */
-	{ 6,	TD,	sys_fallocate,		"fallocate"	}, /* 324 */
-	{ 4,	TD,	sys_timerfd_settime,	"timerfd_settime"}, /* 325 */
-	{ 2,	TD,	sys_timerfd_gettime,	"timerfd_gettime"}, /* 326 */
-	{ 4,	TD|TS,	sys_signalfd4,		"signalfd4"	}, /* 327 */
-	{ 2,	TD,	sys_eventfd2,		"eventfd2"	}, /* 328 */
-	{ 1,	TD,	sys_epoll_create1,	"epoll_create1"	}, /* 329 */
-	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 330 */
-	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 331 */
-	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 332 */
-	{ 5,	TD,	printargs,		"preadv"	}, /* 333 */
-	{ 5,	TD,	printargs,		"pwritev"	}, /* 334 */
-	{ 4,	TP|TS,	printargs,		"rt_tgsigqueueinfo"}, /* 335 */
-	{ 5,	TD,	printargs,		"perf_event_open"}, /* 336 */
-	{ 2,	TD,	printargs,		"fanotify_init"	}, /* 337 */
-	{ 5,	TD|TF,	printargs,		"fanotify_mark"	}, /* 338 */
-	{ 4,	0,	printargs,		"prlimit64"	}, /* 339 */
-	{ 3,	TN,	sys_socket,		"socket"	}, /* 340 */
-	{ 3,	TN,	sys_bind,		"bind"		}, /* 341 */
-	{ 3,	TN,	sys_connect,		"connect"	}, /* 342 */
-	{ 2,	TN,	sys_listen,		"listen"	}, /* 343 */
-	{ 3,	TN,	sys_accept,		"accept"	}, /* 344 */
-	{ 3,	TN,	sys_getsockname,	"getsockname"	}, /* 345 */
-	{ 3,	TN,	sys_getpeername,	"getpeername"	}, /* 346 */
-	{ 4,	TN,	sys_socketpair,		"socketpair"	}, /* 347 */
-	{ 4,	TN,	sys_send,		"send"		}, /* 348 */
-	{ 4,	TN,	sys_recv,		"recv"		}, /* 349 */
-	{ 6,	TN,	sys_sendto,		"sendto"	}, /* 350 */
-	{ 6,	TN,	sys_recvfrom,		"recvfrom"	}, /* 351 */
-	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 352 */
-	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 353 */
-	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 354 */
-	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 355 */
-	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 356 */
-	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 357 */
-	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 358 */
-	{ 5,	0,	printargs,		"SYS_359"	}, /* 359 */
-	{ 5,	0,	printargs,		"SYS_360"	}, /* 360 */
-	{ 5,	0,	printargs,		"SYS_361"	}, /* 361 */
-	{ 5,	0,	printargs,		"SYS_362"	}, /* 362 */
-	{ 5,	0,	printargs,		"SYS_363"	}, /* 363 */
-	{ 5,	0,	printargs,		"SYS_364"	}, /* 364 */
-	{ 5,	0,	printargs,		"SYS_365"	}, /* 365 */
-	{ 5,	0,	printargs,		"SYS_366"	}, /* 366 */
-	{ 5,	0,	printargs,		"SYS_367"	}, /* 367 */
-	{ 5,	0,	printargs,		"SYS_368"	}, /* 368 */
-	{ 5,	0,	printargs,		"SYS_369"	}, /* 369 */
-	{ 5,	0,	printargs,		"SYS_370"	}, /* 370 */
-	{ 5,	0,	printargs,		"SYS_371"	}, /* 371 */
-	{ 5,	0,	printargs,		"SYS_372"	}, /* 372 */
-	{ 5,	0,	printargs,		"SYS_373"	}, /* 373 */
-	{ 5,	0,	printargs,		"SYS_374"	}, /* 374 */
-	{ 5,	0,	printargs,		"SYS_375"	}, /* 375 */
-	{ 5,	0,	printargs,		"SYS_376"	}, /* 376 */
-	{ 5,	0,	printargs,		"SYS_377"	}, /* 377 */
-	{ 5,	0,	printargs,		"SYS_378"	}, /* 378 */
-	{ 5,	0,	printargs,		"SYS_379"	}, /* 379 */
-	{ 5,	0,	printargs,		"SYS_380"	}, /* 380 */
-	{ 5,	0,	printargs,		"SYS_381"	}, /* 381 */
-	{ 5,	0,	printargs,		"SYS_382"	}, /* 382 */
-	{ 5,	0,	printargs,		"SYS_383"	}, /* 383 */
-	{ 5,	0,	printargs,		"SYS_384"	}, /* 384 */
-	{ 5,	0,	printargs,		"SYS_385"	}, /* 385 */
-	{ 5,	0,	printargs,		"SYS_386"	}, /* 386 */
-	{ 5,	0,	printargs,		"SYS_387"	}, /* 387 */
-	{ 5,	0,	printargs,		"SYS_388"	}, /* 388 */
-	{ 5,	0,	printargs,		"SYS_389"	}, /* 389 */
-	{ 5,	0,	printargs,		"SYS_390"	}, /* 390 */
-	{ 5,	0,	printargs,		"SYS_391"	}, /* 391 */
-	{ 5,	0,	printargs,		"SYS_392"	}, /* 392 */
-	{ 5,	0,	printargs,		"SYS_393"	}, /* 393 */
-	{ 5,	0,	printargs,		"SYS_394"	}, /* 394 */
-	{ 5,	0,	printargs,		"SYS_395"	}, /* 395 */
-	{ 5,	0,	printargs,		"SYS_396"	}, /* 396 */
-	{ 5,	0,	printargs,		"SYS_397"	}, /* 397 */
-	{ 5,	0,	printargs,		"SYS_398"	}, /* 398 */
-	{ 5,	0,	printargs,		"SYS_399"	}, /* 399 */
-
-#if SYS_socket_subcall != 400
- #error fix me
-#endif
-	{ 8,	0,	printargs,		"socket_subcall"}, /* 400 */
-	{ 3,	TN,	sys_socket,		"socket"	}, /* 401 */
-	{ 3,	TN,	sys_bind,		"bind"		}, /* 402 */
-	{ 3,	TN,	sys_connect,		"connect"	}, /* 403 */
-	{ 2,	TN,	sys_listen,		"listen"	}, /* 404 */
-	{ 3,	TN,	sys_accept,		"accept"	}, /* 405 */
-	{ 3,	TN,	sys_getsockname,	"getsockname"	}, /* 406 */
-	{ 3,	TN,	sys_getpeername,	"getpeername"	}, /* 407 */
-	{ 4,	TN,	sys_socketpair,		"socketpair"	}, /* 408 */
-	{ 4,	TN,	sys_send,		"send"		}, /* 409 */
-	{ 4,	TN,	sys_recv,		"recv"		}, /* 410 */
-	{ 6,	TN,	sys_sendto,		"sendto"	}, /* 411 */
-	{ 6,	TN,	sys_recvfrom,		"recvfrom"	}, /* 412 */
-	{ 2,	TN,	sys_shutdown,		"shutdown"	}, /* 413 */
-	{ 5,	TN,	sys_setsockopt,		"setsockopt"	}, /* 414 */
-	{ 5,	TN,	sys_getsockopt,		"getsockopt"	}, /* 415 */
-	{ 5,	TN,	sys_sendmsg,		"sendmsg"	}, /* 416 */
-	{ 5,	TN,	sys_recvmsg,		"recvmsg"	}, /* 417 */
-	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 418 */
-	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 419 */
-
-#if SYS_ipc_subcall != 420
- #error fix me
-#endif
-
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 420 */
-	{ 4,	TI,	sys_semop,		"semop"		}, /* 421 */
-	{ 4,	TI,	sys_semget,		"semget"	}, /* 422 */
-	{ 4,	TI,	sys_semctl,		"semctl"	}, /* 423 */
-	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 424 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 425 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 426 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 427 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 428 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 429 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 430 */
-	{ 4,	TI,	sys_msgsnd,		"msgsnd"	}, /* 431 */
-	{ 4,	TI,	sys_msgrcv,		"msgrcv"	}, /* 432 */
-	{ 4,	TI,	sys_msgget,		"msgget"	}, /* 433 */
-	{ 4,	TI,	sys_msgctl,		"msgctl"	}, /* 434 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 435 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 436 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 437 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 438 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 439 */
-	{ 4,	0,	printargs,		"ipc_subcall"	}, /* 440 */
-	{ 4,	TI,	sys_shmat,		"shmat"		}, /* 441 */
-	{ 4,	TI,	sys_shmdt,		"shmdt"		}, /* 442 */
-	{ 4,	TI,	sys_shmget,		"shmget"	}, /* 443 */
-	{ 4,	TI,	sys_shmctl,		"shmctl"	}, /* 444 */
diff --git a/linux/syscall.h b/linux/syscall.h
index e657f1e..7e0155e 100644
--- a/linux/syscall.h
+++ b/linux/syscall.h
@@ -24,347 +24,354 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "dummy.h"
 
-/* primary syscalls */
+/* common syscalls */
 
-int sys_restart_syscall();
-int sys_setup(), sys_exit(), sys_fork(), sys_read(), sys_write();
-int sys_open(), sys_close(), sys_waitpid(), sys_creat(), sys_link();
-int sys_unlink(), sys_execve(), sys_chdir(), sys_time(), sys_mknod();
-int sys_chmod(), sys_chown(), sys_break(), sys_oldstat();
-int sys_lseek(), sys_getpid(), sys_mount(), sys_umount(), sys_umount2();
-int sys_setuid(), sys_getuid(), sys_stime(), sys_ptrace();
-int sys_alarm(), sys_oldfstat(), sys_pause(), sys_utime();
-int sys_stty(), sys_gtty(), sys_access(), sys_nice(), sys_ftime();
-int sys_sync(), sys_kill(), sys_rename(), sys_mkdir(), sys_rmdir();
-int sys_dup(), sys_pipe(), sys_times(), sys_prof(), sys_brk();
-int sys_setgid(), sys_getgid(), sys_signal(), sys_geteuid();
-int sys_getegid(), sys_acct(), sys_phys(), sys_lock(), sys_ioctl();
-int sys_fcntl(), sys_mpx(), sys_setpgid(), sys_ulimit();
-int sys_olduname(), sys_umask(), sys_chroot(), sys_ustat();
-int sys_dup2(), sys_getppid(), sys_getpgrp(), sys_setsid();
-int sys_sigaction(), sys_siggetmask(), sys_sigsetmask();
-int sys_setreuid(), sys_setregid(), sys_sigsuspend();
-int sys_sigpending(), sys_sethostname(), sys_setrlimit();
-int sys_getrlimit(), sys_getrusage(), sys_gettimeofday();
-int sys_settimeofday(), sys_getgroups(), sys_setgroups();
-int sys_setgroups32(), sys_getgroups32();
-int sys_oldselect(), sys_symlink(), sys_oldlstat(), sys_readlink();
-int sys_uselib(), sys_swapon(), sys_reboot(), sys_readdir();
-int sys_mmap(), sys_munmap(), sys_truncate(), sys_ftruncate();
-int sys_fchmod(), sys_fchown(), sys_getpriority();
-int sys_setpriority(), sys_profil(), sys_statfs(), sys_fstatfs();
-int sys_ioperm(), sys_socketcall(), sys_syslog(), sys_setitimer();
-int sys_getitimer(), sys_stat(), sys_lstat(), sys_fstat();
-int sys_uname(), sys_iopl(), sys_vhangup(), sys_idle(), sys_vm86();
-int sys_wait4(), sys_swapoff(), sys_ipc(), sys_sigreturn();
-int sys_fsync(), sys_clone(), sys_setdomainname(), sys_sysinfo();
-int sys_modify_ldt(), sys_adjtimex(), sys_mprotect();
-int sys_sigprocmask(), sys_create_module(), sys_init_module();
-int sys_delete_module(), sys_get_kernel_syms(), sys_quotactl();
-int sys_getpgid(), sys_fchdir(), sys_bdflush();
-int sys_sysfs(), sys_personality(), sys_afs_syscall();
-int sys_setfsuid(), sys_setfsgid(), sys_llseek();
-int sys_getdents(), sys_flock(), sys_msync();
-int sys_readv(), sys_writev(), sys_select();
-int sys_getsid(), sys_fdatasync(), sys_sysctl();
-int sys_mlock(), sys_munlock(), sys_mlockall(), sys_munlockall(), sys_madvise();
-int sys_sched_setparam(), sys_sched_getparam();
-int sys_sched_setscheduler(), sys_sched_getscheduler(), sys_sched_yield();
-int sys_sched_get_priority_max(), sys_sched_get_priority_min();
-int sys_sched_rr_get_interval(), sys_nanosleep(), sys_mremap();
-int sys_sendmsg(), sys_recvmsg(), sys_setresuid(), sys_setresgid();
-int sys_getresuid(), sys_getresgid(), sys_pread(), sys_pwrite(), sys_getcwd();
-int sys_sigaltstack(), sys_rt_sigprocmask(), sys_rt_sigaction();
-int sys_rt_sigpending(), sys_rt_sigsuspend(), sys_rt_sigqueueinfo();
-int sys_rt_sigtimedwait(), sys_prctl(), sys_poll(), sys_vfork();
-int sys_sendfile(), sys_old_mmap(), sys_stat64(), sys_lstat64(), sys_fstat64();
-int sys_truncate64(), sys_ftruncate64(), sys_pivotroot();
-int sys_getdents64();
-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_remap_file_pages();
-int sys_timer_create(), sys_timer_delete(), sys_timer_getoverrun();
-int sys_timer_gettime(), sys_timer_settime(), sys_clock_settime();
-int sys_clock_gettime(), sys_clock_getres(), sys_clock_nanosleep();
-int sys_semtimedop(), sys_statfs64(), sys_fstatfs64(), sys_tgkill();
-int sys_mq_open(), sys_mq_timedsend(), sys_mq_timedreceive();
-int sys_mq_notify(), sys_mq_getsetattr();
-int sys_epoll_create(), sys_epoll_ctl(), sys_epoll_wait();
-int sys_waitid(), sys_fadvise64(), sys_fadvise64_64();
-int sys_mbind(), sys_get_mempolicy(), sys_set_mempolicy(), sys_move_pages();
+int sys_accept();
+int sys_accept4();
+int sys_access();
+int sys_adjtimex();
 int sys_arch_prctl();
-int sys_io_setup(), sys_io_submit(), sys_io_cancel(), sys_io_getevents(), sys_io_destroy();
-int sys_utimensat(), sys_epoll_pwait(), sys_signalfd(), sys_timerfd(), sys_eventfd();
-int sys_getcpu();
-int sys_fallocate(), sys_timerfd_create(), sys_timerfd_settime(), sys_timerfd_gettime();
-int sys_signalfd4(), sys_eventfd2(), sys_epoll_create1(), sys_dup3(), sys_pipe2();
-
-/* sys_socketcall subcalls */
-
-int sys_socket(), sys_bind(), sys_connect(), sys_listen(), sys_accept4();
-int sys_accept(), sys_getsockname(), sys_getpeername(), sys_socketpair();
-int sys_send(), sys_recv(), sys_sendto(), sys_recvfrom();
-int sys_shutdown(), sys_setsockopt(), sys_getsockopt();
-int sys_recvmmsg();
-
-/* *at syscalls */
-int sys_fchmodat();
-int sys_newfstatat();
-int sys_unlinkat();
-int sys_fchownat();
-int sys_openat();
-int sys_renameat();
-int sys_symlinkat();
-int sys_readlinkat();
-int sys_linkat();
+int sys_bind();
+int sys_brk();
+int sys_capget();
+int sys_capset();
+int sys_chdir();
+int sys_chmod();
+int sys_chown();
+int sys_clock_adjtime();
+int sys_clock_gettime();
+int sys_clock_nanosleep();
+int sys_clock_settime();
+int sys_clone();
+int sys_close();
+int sys_connect();
+int sys_creat();
+int sys_create_module();
+int sys_dup2();
+int sys_dup3();
+int sys_epoll_create();
+int sys_epoll_create1();
+int sys_epoll_ctl();
+int sys_epoll_pwait();
+int sys_epoll_wait();
+int sys_eventfd();
+int sys_eventfd2();
+int sys_execve();
+int sys_exit();
 int sys_faccessat();
-int sys_mkdirat();
-int sys_mknodat();
+int sys_fadvise64();
+int sys_fadvise64_64();
+int sys_fallocate();
+int sys_fchmod();
+int sys_fchmodat();
+int sys_fchown();
+int sys_fchownat();
+int sys_fcntl();
+int sys_fgetxattr();
+int sys_flistxattr();
+int sys_flock();
+int sys_fork();
+int sys_fremovexattr();
+int sys_fsetxattr();
+int sys_fstat();
+int sys_fstat64();
+int sys_fstatfs();
+int sys_fstatfs64();
+int sys_ftruncate();
+int sys_ftruncate64();
+int sys_futex();
 int sys_futimesat();
-
-/* new ones */
-int sys_query_module();
-int sys_poll();
-int sys_mincore();
+int sys_get_mempolicy();
+int sys_get_robust_list();
+int sys_get_thread_area();
+int sys_getcpu();
+int sys_getcwd();
+int sys_getdents();
+int sys_getdents64();
+int sys_getdtablesize();
+int sys_getgroups();
+int sys_getgroups32();
+int sys_gethostname();
+int sys_getitimer();
+int sys_getpeername();
+int sys_getpmsg();
+int sys_getpriority();
+int sys_getresuid();
+int sys_getrlimit();
+int sys_getrusage();
+int sys_getsockname();
+int sys_getsockopt();
+int sys_gettimeofday();
+int sys_getuid();
+int sys_getxattr();
+int sys_init_module();
 int sys_inotify_add_watch();
-int sys_inotify_rm_watch();
 int sys_inotify_init1();
-int sys_pselect6();
+int sys_inotify_rm_watch();
+int sys_io_cancel();
+int sys_io_destroy();
+int sys_io_getevents();
+int sys_io_setup();
+int sys_io_submit();
+int sys_ioctl();
+int sys_ipc();
+int sys_kill();
+int sys_link();
+int sys_linkat();
+int sys_listen();
+int sys_listxattr();
+int sys_llseek();
+int sys_lseek();
+int sys_lstat();
+int sys_lstat64();
+int sys_madvise();
+int sys_mbind();
+int sys_migrate_pages();
+int sys_mincore();
+int sys_mkdir();
+int sys_mkdirat();
+int sys_mknod();
+int sys_mknodat();
+int sys_mlockall();
+int sys_mmap();
+int sys_modify_ldt();
+int sys_mount();
+int sys_move_pages();
+int sys_mprotect();
+int sys_mq_getsetattr();
+int sys_mq_notify();
+int sys_mq_open();
+int sys_mq_timedreceive();
+int sys_mq_timedsend();
+int sys_mremap();
+int sys_msgctl();
+int sys_msgget();
+int sys_msgrcv();
+int sys_msgsnd();
+int sys_msync();
+int sys_munmap();
+int sys_nanosleep();
+int sys_newfstatat();
+int sys_old_mmap();
+int sys_oldfstat();
+int sys_oldlstat();
+int sys_oldselect();
+int sys_oldstat();
+int sys_open();
+int sys_openat();
+int sys_personality();
+int sys_pipe();
+int sys_pipe2();
+int sys_poll();
+int sys_poll();
 int sys_ppoll();
+int sys_prctl();
+int sys_pread();
+int sys_preadv();
+int sys_prlimit64();
+int sys_process_vm_readv();
+int sys_process_vm_writev();
+int sys_pselect6();
+int sys_ptrace();
+int sys_putpmsg();
+int sys_pwrite();
+int sys_pwritev();
+int sys_query_module();
+int sys_quotactl();
+int sys_read();
+int sys_readahead();
+int sys_readdir();
+int sys_readlink();
+int sys_readlinkat();
+int sys_readv();
+int sys_reboot();
+int sys_recv();
+int sys_recvfrom();
+int sys_recvmmsg();
+int sys_recvmsg();
+int sys_remap_file_pages();
+int sys_removexattr();
+int sys_renameat();
+int sys_restart_syscall();
+int sys_rt_sigaction();
+int sys_rt_sigpending();
+int sys_rt_sigprocmask();
+int sys_rt_sigqueueinfo();
+int sys_rt_sigsuspend();
+int sys_rt_sigtimedwait();
+int sys_rt_tgsigqueueinfo();
+int sys_sched_get_priority_min();
+int sys_sched_getaffinity();
+int sys_sched_getparam();
+int sys_sched_getscheduler();
+int sys_sched_rr_get_interval();
+int sys_sched_setaffinity();
+int sys_sched_setparam();
+int sys_sched_setscheduler();
+int sys_select();
+int sys_semctl();
+int sys_semget();
+int sys_semop();
+int sys_semtimedop();
+int sys_send();
+int sys_sendfile();
+int sys_sendfile64();
+int sys_sendmmsg();
+int sys_sendmsg();
+int sys_sendto();
+int sys_set_mempolicy();
+int sys_set_thread_area();
+int sys_setdomainname();
+int sys_setfsuid();
+int sys_setgroups();
+int sys_setgroups32();
+int sys_sethostname();
+int sys_setitimer();
+int sys_setpriority();
+int sys_setresuid();
+int sys_setreuid();
+int sys_setrlimit();
+int sys_setsockopt();
+int sys_settimeofday();
+int sys_setuid();
+int sys_setxattr();
+int sys_shmat();
+int sys_shmctl();
+int sys_shmdt();
+int sys_shmget();
+int sys_shutdown();
+int sys_sigaction();
+int sys_sigaltstack();
+int sys_siggetmask();
+int sys_signal();
+int sys_signalfd();
+int sys_signalfd4();
+int sys_sigpending();
+int sys_sigprocmask();
+int sys_sigreturn();
+int sys_sigsetmask();
+int sys_sigsuspend();
+int sys_socket();
+int sys_socketcall();
+int sys_socketpair();
+int sys_splice();
+int sys_stat();
+int sys_stat64();
+int sys_statfs();
+int sys_statfs64();
+int sys_stime();
+int sys_swapon();
+int sys_symlinkat();
+int sys_sysctl();
+int sys_sysinfo();
+int sys_syslog();
+int sys_tee();
+int sys_tgkill();
+int sys_time();
+int sys_timer_create();
+int sys_timer_gettime();
+int sys_timer_settime();
+int sys_timerfd();
+int sys_timerfd_create();
+int sys_timerfd_gettime();
+int sys_timerfd_settime();
+int sys_times();
+int sys_truncate();
+int sys_truncate64();
+int sys_umask();
+int sys_umount2();
+int sys_uname();
+int sys_unlinkat();
 int sys_unshare();
+int sys_utime();
+int sys_utimensat();
+int sys_utimes();
+int sys_vfork();
+int sys_vmsplice();
+int sys_wait4();
+int sys_waitid();
+int sys_waitpid();
+int sys_write();
+int sys_writev();
 
 /* architecture-specific calls */
 #ifdef ALPHA
-int sys_osf_select();
-int sys_osf_gettimeofday();
-int sys_osf_settimeofday();
+int osf_statfs();
+int osf_fstatfs();
 int sys_osf_getitimer();
-int sys_osf_setitimer();
 int sys_osf_getrusage();
-int sys_osf_wait4();
+int sys_osf_gettimeofday();
+int sys_osf_select();
+int sys_osf_setitimer();
+int sys_osf_settimeofday();
 int sys_osf_utimes();
-#endif
-
-
-#ifndef SYS_waitid
-# ifdef I386
-#  define SYS_waitid 284
-# elif defined ALPHA
-#  define SYS_waitid 438
-# elif defined ARM
-#  define SYS_waitid (NR_SYSCALL_BASE + 280)
-# elif defined IA64
-#  define SYS_waitid 1270
-# elif defined M68K
-#  define SYS_waitid 277
-# elif defined POWERPC
-#  define SYS_waitid 272
-# elif defined S390 || defined S390X
-#  define SYS_waitid 281
-# elif defined SH64
-#  define SYS_waitid 312
-# elif defined SH64
-#  define SYS_waitid 312
-# elif defined SH
-#  define SYS_waitid 284
-# elif defined SPARC || defined SPARC64
-#  define SYS_waitid 279
-# elif defined X86_64
-#  define SYS_waitid 247
-# endif
+int sys_osf_wait4();
 #endif
 
 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
 	!defined(__ARM_EABI__)
-# ifdef	IA64
-/*
- *  IA64 syscall numbers (the only ones available from standard header
- *  files) are disjoint from IA32 syscall numbers.  We need to define
- *  the IA32 socket call number here.
- */
-#  define SYS_socketcall	102
-
-#  undef SYS_socket
-#  undef SYS_bind
-#  undef SYS_connect
-#  undef SYS_listen
-#  undef SYS_accept
-#  undef SYS_getsockname
-#  undef SYS_getpeername
-#  undef SYS_socketpair
-#  undef SYS_send
-#  undef SYS_recv
-#  undef SYS_sendto
-#  undef SYS_recvfrom
-#  undef SYS_shutdown
-#  undef SYS_setsockopt
-#  undef SYS_getsockopt
-#  undef SYS_sendmsg
-#  undef SYS_recvmsg
-# endif /* IA64 */
 # if defined(SPARC) || defined(SPARC64)
 #  define SYS_socket_subcall	353
 # else
 #  define SYS_socket_subcall	400
 # endif
-#define SYS_sub_socket		(SYS_socket_subcall + 1)
-#define SYS_sub_bind		(SYS_socket_subcall + 2)
-#define SYS_sub_connect		(SYS_socket_subcall + 3)
-#define SYS_sub_listen		(SYS_socket_subcall + 4)
-#define SYS_sub_accept		(SYS_socket_subcall + 5)
-#define SYS_sub_getsockname	(SYS_socket_subcall + 6)
-#define SYS_sub_getpeername	(SYS_socket_subcall + 7)
-#define SYS_sub_socketpair	(SYS_socket_subcall + 8)
-#define SYS_sub_send		(SYS_socket_subcall + 9)
-#define SYS_sub_recv		(SYS_socket_subcall + 10)
-#define SYS_sub_sendto		(SYS_socket_subcall + 11)
-#define SYS_sub_recvfrom	(SYS_socket_subcall + 12)
-#define SYS_sub_shutdown	(SYS_socket_subcall + 13)
-#define SYS_sub_setsockopt	(SYS_socket_subcall + 14)
-#define SYS_sub_getsockopt	(SYS_socket_subcall + 15)
-#define SYS_sub_sendmsg		(SYS_socket_subcall + 16)
-#define SYS_sub_recvmsg		(SYS_socket_subcall + 17)
-#define SYS_sub_accept4		(SYS_socket_subcall + 18)
-#define SYS_sub_recvmmsg	(SYS_socket_subcall + 19)
 
 #define SYS_socket_nsubcalls	20
 #endif /* !(ALPHA || MIPS || HPPA) */
 
-/* sys_ipc subcalls */
-
-int sys_semget(), sys_semctl(), sys_semop();
-int sys_msgsnd(), sys_msgrcv(), sys_msgget(), sys_msgctl();
-int sys_shmat(), sys_shmdt(), sys_shmget(), sys_shmctl();
-
 #if !defined(ALPHA) && !defined(MIPS) && !defined(HPPA) && \
 	!defined(__ARM_EABI__)
-# ifdef	IA64
-   /*
-    * IA64 syscall numbers (the only ones available from standard
-    * header files) are disjoint from IA32 syscall numbers.  We need
-    * to define the IA32 socket call number here.  Fortunately, this
-    * symbol, `SYS_ipc', is not used by any of the IA64 code so
-    * re-defining this symbol will not cause a problem.
-   */
-#  undef SYS_ipc
-#  define SYS_ipc		117
-#  undef SYS_semop
-#  undef SYS_semget
-#  undef SYS_semctl
-#  undef SYS_semtimedop
-#  undef SYS_msgsnd
-#  undef SYS_msgrcv
-#  undef SYS_msgget
-#  undef SYS_msgctl
-#  undef SYS_shmat
-#  undef SYS_shmdt
-#  undef SYS_shmget
-#  undef SYS_shmctl
-# endif /* IA64 */
 #define SYS_ipc_subcall		((SYS_socket_subcall)+(SYS_socket_nsubcalls))
-#define SYS_sub_semop		(SYS_ipc_subcall + 1)
-#define SYS_sub_semget		(SYS_ipc_subcall + 2)
-#define SYS_sub_semctl		(SYS_ipc_subcall + 3)
-#define SYS_sub_semtimedop	(SYS_ipc_subcall + 4)
-#define SYS_sub_msgsnd		(SYS_ipc_subcall + 11)
-#define SYS_sub_msgrcv		(SYS_ipc_subcall + 12)
-#define SYS_sub_msgget		(SYS_ipc_subcall + 13)
-#define SYS_sub_msgctl		(SYS_ipc_subcall + 14)
-#define SYS_sub_shmat		(SYS_ipc_subcall + 21)
-#define SYS_sub_shmdt		(SYS_ipc_subcall + 22)
-#define SYS_sub_shmget		(SYS_ipc_subcall + 23)
-#define SYS_sub_shmctl		(SYS_ipc_subcall + 24)
-
 #define SYS_ipc_nsubcalls	25
 #endif /* !(ALPHA || MIPS || HPPA) */
 
-#if defined SYS_ipc_subcall && !defined SYS_ipc
-# define SYS_ipc SYS_ipc_subcall
-#endif
-#if defined SYS_socket_subcall && !defined SYS_socketcall
-# define SYS_socketcall SYS_socket_subcall
-#endif
-
-#ifdef IA64
-  /*
-   * IA64 syscall numbers (the only ones available from standard header
-   * files) are disjoint from IA32 syscall numbers.  We need to define
-   * some IA32 specific syscalls here.
-   */
-# define SYS_fork	2
-# define SYS_vfork	190
-# define SYS32_exit	1
-# define SYS_waitpid	7
-# define SYS32_wait4	114
-# define SYS32_execve	11
-#endif /* IA64 */
-
-#if defined(ALPHA) || defined(IA64)
+#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
 int sys_getpagesize();
 #endif
 
-#ifdef ALPHA
-int osf_statfs(), osf_fstatfs();
-#endif
-
 #ifdef IA64
-int sys_getpmsg(), sys_putpmsg();	/* STREAMS stuff */
+/* STREAMS stuff */
+int sys_getpmsg();
+int sys_putpmsg();
 #endif
 
 #ifdef MIPS
 int sys_sysmips();
 #endif
 
-int sys_setpgrp(), sys_gethostname(), sys_getdtablesize(), sys_utimes();
-int sys_capget(), sys_capset();
-
 #if defined M68K || defined SH
 int sys_cacheflush();
 #endif
 
-int sys_pread64(), sys_pwrite64();
-
 #ifdef POWERPC
 int sys_subpage_prot();
 #endif
 
 #ifdef BFIN
-int sys_sram_alloc();
 int sys_cacheflush();
+int sys_sram_alloc();
 #endif
 
 #if defined SPARC || defined SPARC64
 #include "sparc/syscall1.h"
 int sys_execv();
-int sys_getpagesize();
-int sys_getmsg(), sys_putmsg();
-
-int	sys_semsys(), sys_semctl(), sys_semget();
+int sys_getmsg();
+int sys_msgsys();
+int sys_putmsg();
+int sys_semsys();
+int sys_shmsys();
 #define SYS_semsys_subcall	200
 #define SYS_semsys_nsubcalls	3
-#define SYS_semctl		(SYS_semsys_subcall + 0)
-#define SYS_semget		(SYS_semsys_subcall + 1)
-#define SYS_semop		(SYS_semsys_subcall + 2)
-int	sys_msgsys(), sys_msgget(), sys_msgctl(), sys_msgrcv(), sys_msgsnd();
 #define SYS_msgsys_subcall	203
 #define SYS_msgsys_nsubcalls	4
-#define SYS_msgget		(SYS_msgsys_subcall + 0)
-#define SYS_msgctl		(SYS_msgsys_subcall + 1)
-#define SYS_msgrcv		(SYS_msgsys_subcall + 2)
-#define SYS_msgsnd		(SYS_msgsys_subcall + 3)
-int	sys_shmsys(), sys_shmat(), sys_shmctl(), sys_shmdt(), sys_shmget();
 #define SYS_shmsys_subcall	207
 #define SYS_shmsys_nsubcalls	4
-#define SYS_shmat		(SYS_shmsys_subcall + 0)
-#define SYS_shmctl		(SYS_shmsys_subcall + 1)
-#define SYS_shmdt		(SYS_shmsys_subcall + 2)
-#define SYS_shmget		(SYS_shmsys_subcall + 3)
+#endif
+
+#ifdef X32
+int sys_lseek32();
 #endif
diff --git a/linux/x86_64/errnoent1.h b/linux/x86_64/errnoent1.h
new file mode 100644
index 0000000..a894827
--- /dev/null
+++ b/linux/x86_64/errnoent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "../errnoent.h"
diff --git a/linux/x86_64/errnoent2.h b/linux/x86_64/errnoent2.h
new file mode 100644
index 0000000..00de57b
--- /dev/null
+++ b/linux/x86_64/errnoent2.h
@@ -0,0 +1,2 @@
+/* Our third set is for x32.  */
+#include "../errnoent.h"
diff --git a/linux/x86_64/gentab.pl b/linux/x86_64/gentab.pl
new file mode 100644
index 0000000..52f7aa9
--- /dev/null
+++ b/linux/x86_64/gentab.pl
@@ -0,0 +1,73 @@
+#!/usr/bin/perl -w
+#generate syscall table from a template file (usually the master i386 syscall
+#ent.h) and the x86_64 unistd.h
+%conv =  (
+	"exit" => "_exit",
+);
+
+%known = (
+	"mmap" => "sys_mmap",
+	"sched_yield" => "printargs",
+);
+
+# only used when the template file has no entry
+%args = (
+	"arch_prctl" => 2,
+	"tkill" => 2,
+	"gettid" => 0,
+	"readahead" => 3,
+	# should decode all these:
+	"setxattr" => 5,
+	"lsetxattr" => 5,
+	"fsetxattr" => 5,
+	"getxattr" => 4,
+	"lgetxattr" => 4,
+	"fgetxattr" => 4,
+	"listxattr" => 3,
+	"llistxattr" => 3,
+	"flistxattr" => 3,
+	"removexattr" => 2,
+	"lremovexattr" => 2,
+	"fremovexattr" => 2,
+	"mmap" => 6,
+	"sched_yield" => 0,
+);
+
+open(F,$ARGV[0]) || die "cannot open template file $ARGV[0]\n";
+
+while (<F>) {
+	next unless /{/;
+	s/\/\*.*\*\///;
+	($name) = /"([^"]+)"/;
+	chomp;
+	$call{$name} = $_;
+}
+
+open(SL, ">syscallnum.h") || die "cannot create syscallnum.h\n";
+
+open(S,$ARGV[1]) || die "cannot open syscall file $ARGV[1]\n";
+while (<S>) {
+	$name = "";
+	next unless  (($name, $num) = /define\s+__NR_(\S+)\s+(\d+)/);
+	next if $name eq "";
+
+	$name = $conv{$name} if defined($conv{$name});
+
+	if (!defined($call{$name})) {
+		unless (defined($args{$name})) {
+			print STDERR "unknown call $name $num\n";
+			$na = 3;
+		} else {
+			$na = $args{$name};
+		}
+		if (defined($known{$name})) {
+			$func = $known{$name};
+		} else {
+			$func = "printargs";
+		}
+		print "\t{ $na,\t0,\t$func,\t\"$name\" }, /* $num */\n";
+	} else {
+		print "$call{$name} /* $num */\n";
+	}
+	print SL "#define SYS_$name $num\n"
+}
diff --git a/linux/x86_64/ioctlent1.h b/linux/x86_64/ioctlent1.h
new file mode 100644
index 0000000..1f92feb
--- /dev/null
+++ b/linux/x86_64/ioctlent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "linux/ioctlent.h"
diff --git a/linux/x86_64/ioctlent2.h b/linux/x86_64/ioctlent2.h
new file mode 100644
index 0000000..060003b
--- /dev/null
+++ b/linux/x86_64/ioctlent2.h
@@ -0,0 +1,2 @@
+/* Our third set is for x32.  */
+#include "linux/ioctlent.h"
diff --git a/linux/x86_64/signalent1.h b/linux/x86_64/signalent1.h
new file mode 100644
index 0000000..5c18d98
--- /dev/null
+++ b/linux/x86_64/signalent1.h
@@ -0,0 +1,2 @@
+/* Our second set comes from the i386 files.  */
+#include "../signalent.h"
diff --git a/linux/x86_64/signalent2.h b/linux/x86_64/signalent2.h
new file mode 100644
index 0000000..6fbcab1
--- /dev/null
+++ b/linux/x86_64/signalent2.h
@@ -0,0 +1,2 @@
+/* Our third set is for x32.  */
+#include "../signalent.h"
diff --git a/linux/x86_64/syscallent.h b/linux/x86_64/syscallent.h
new file mode 100644
index 0000000..34ebc53
--- /dev/null
+++ b/linux/x86_64/syscallent.h
@@ -0,0 +1,312 @@
+	{ 3,	TD,	sys_read,		"read"		},  /* 0 */
+	{ 3,	TD,	sys_write,		"write"		},  /* 1 */
+	{ 3,	TD|TF,	sys_open,		"open"		},  /* 2 */
+	{ 1,	TD,	sys_close,		"close"		},  /* 3 */
+	{ 2,	TF,	sys_stat,		"stat"		},  /* 4 */
+	{ 2,	TD,	sys_fstat,		"fstat"		},  /* 5 */
+	{ 2,	TF,	sys_lstat,		"lstat"		},  /* 6 */
+	{ 3,	TD,	sys_poll,		"poll"		},  /* 7 */
+	{ 3,	TD,	sys_lseek,		"lseek"		},  /* 8 */
+	{ 6,	TD,	sys_mmap,		"mmap"		},  /* 9 */
+	{ 3,	0,	sys_mprotect,		"mprotect"	},  /* 10 */
+	{ 2,	0,	sys_munmap,		"munmap"	},  /* 11 */
+	{ 1,	0,	sys_brk,		"brk"		},  /* 12 */
+	{ 4,	TS,	sys_rt_sigaction,	"rt_sigaction"	},  /* 13 */
+	{ 4,	TS,	sys_rt_sigprocmask,	"rt_sigprocmask"},  /* 14 */
+	{ 0,	TS,	sys_rt_sigreturn,	"rt_sigreturn"	},  /* 15 */
+	{ 3,	TD,	sys_ioctl,		"ioctl"		},  /* 16 */
+	{ 5,	TD,	sys_pread,		"pread"		},  /* 17 */
+	{ 5,	TD,	sys_pwrite,		"pwrite"	},  /* 18 */
+	{ 3,	TD,	sys_readv,		"readv"		},  /* 19 */
+	{ 3,	TD,	sys_writev,		"writev"	},  /* 20 */
+	{ 2,	TF,	sys_access,		"access"	},  /* 21 */
+	{ 1,	TD,	sys_pipe,		"pipe"		},  /* 22 */
+	{ 5,	TD,	sys_select,		"select"	},  /* 23 */
+	{ 0,	0,	sys_sched_yield,	"sched_yield"	},  /* 24 */
+	{ 5,	0,	sys_mremap,		"mremap"	},  /* 25 */
+	{ 3,	0,	sys_msync,		"msync"		},  /* 26 */
+	{ 3,	0,	sys_mincore,		"mincore"	},  /* 27 */
+	{ 3,	0,	sys_madvise,		"madvise"	},  /* 28 */
+	{ 4,	TI,	sys_shmget,		"shmget"	},  /* 29 */
+	{ 4,	TI,	sys_shmat,		"shmat"		},  /* 30 */
+	{ 4,	TI,	sys_shmctl,		"shmctl"	},  /* 31 */
+	{ 1,	TD,	sys_dup,		"dup"		},  /* 32 */
+	{ 2,	TD,	sys_dup2,		"dup2"		},  /* 33 */
+	{ 0,	TS,	sys_pause,		"pause"		},  /* 34 */
+	{ 2,	0,	sys_nanosleep,		"nanosleep"	},  /* 35 */
+	{ 2,	0,	sys_getitimer,		"getitimer"	},  /* 36 */
+	{ 1,	0,	sys_alarm,		"alarm"		},  /* 37 */
+	{ 3,	0,	sys_setitimer,		"setitimer"	},  /* 38 */
+	{ 0,	0,	sys_getpid,		"getpid"	},  /* 39 */
+	{ 4,	TD|TN,	sys_sendfile,		"sendfile"	},  /* 40 */
+	{ 3,	TN,	sys_socket,		"socket"	},  /* 41 */
+	{ 3,	TN,	sys_connect,		"connect"	},  /* 42 */
+	{ 3,	TN,	sys_accept,		"accept"	},  /* 43 */
+	{ 6,	TN,	sys_sendto,		"sendto"	},  /* 44 */
+	{ 6,	TN,	sys_recvfrom,		"recvfrom"	},  /* 45 */
+	{ 3,	TN,	sys_sendmsg,		"sendmsg"	},  /* 46 */
+	{ 5,	TN,	sys_recvmsg,		"recvmsg"	},  /* 47 */
+	{ 2,	TN,	sys_shutdown,		"shutdown"	},  /* 48 */
+	{ 3,	TN,	sys_bind,		"bind"		},  /* 49 */
+	{ 2,	TN,	sys_listen,		"listen"	},  /* 50 */
+	{ 3,	TN,	sys_getsockname,	"getsockname"	},  /* 51 */
+	{ 3,	TN,	sys_getpeername,	"getpeername"	},  /* 52 */
+	{ 4,	TN,	sys_socketpair,		"socketpair"	},  /* 53 */
+	{ 5,	TN,	sys_setsockopt,		"setsockopt"	},  /* 54 */
+	{ 5,	TN,	sys_getsockopt,		"getsockopt"	},  /* 55 */
+	{ 5,	TP,	sys_clone,		"clone"		},  /* 56 */
+	{ 0,	TP,	sys_fork,		"fork"		},  /* 57 */
+	{ 0,	TP,	sys_vfork,		"vfork"		},  /* 58 */
+	{ 3,	TF|TP,	sys_execve,		"execve"	},  /* 59 */
+	{ 1,	TP,	sys_exit,		"_exit"		},  /* 60 */
+	{ 4,	TP,	sys_wait4,		"wait4"		},  /* 61 */
+	{ 2,	TS,	sys_kill,		"kill"		},  /* 62 */
+	{ 1,	0,	sys_uname,		"uname"		},  /* 63 */
+	{ 4,	TI,	sys_semget,		"semget"	},  /* 64 */
+	{ 4,	TI,	sys_semop,		"semop"		},  /* 65 */
+	{ 4,	TI,	sys_semctl,		"semctl"	},  /* 66 */
+	{ 4,	TI,	sys_shmdt,		"shmdt"		},  /* 67 */
+	{ 4,	TI,	sys_msgget,		"msgget"	},  /* 68 */
+	{ 4,	TI,	sys_msgsnd,		"msgsnd"	},  /* 69 */
+	{ 5,	TI,	sys_msgrcv,		"msgrcv"	},  /* 70 */
+	{ 3,	TI,	sys_msgctl,		"msgctl"	},  /* 71 */
+	{ 3,	TD,	sys_fcntl,		"fcntl"		},  /* 72 */
+	{ 2,	TD,	sys_flock,		"flock"		},  /* 73 */
+	{ 1,	TD,	sys_fsync,		"fsync"		},  /* 74 */
+	{ 1,	TD,	sys_fdatasync,		"fdatasync"	},  /* 75 */
+	{ 2,	TF,	sys_truncate,		"truncate"	},  /* 76 */
+	{ 2,	TD,	sys_ftruncate,		"ftruncate"	},  /* 77 */
+	{ 3,	TD,	sys_getdents,		"getdents"	},  /* 78 */
+	{ 2,	TF,	sys_getcwd,		"getcwd"	},  /* 79 */
+	{ 1,	TF,	sys_chdir,		"chdir"		},  /* 80 */
+	{ 1,	TD,	sys_fchdir,		"fchdir"	},  /* 81 */
+	{ 2,	TF,	sys_rename,		"rename"	},  /* 82 */
+	{ 2,	TF,	sys_mkdir,		"mkdir"		},  /* 83 */
+	{ 1,	TF,	sys_rmdir,		"rmdir"		},  /* 84 */
+	{ 2,	TD|TF,	sys_creat,		"creat"		},  /* 85 */
+	{ 2,	TF,	sys_link,		"link"		},  /* 86 */
+	{ 1,	TF,	sys_unlink,		"unlink"	},  /* 87 */
+	{ 2,	TF,	sys_symlink,		"symlink"	},  /* 88 */
+	{ 3,	TF,	sys_readlink,		"readlink"	},  /* 89 */
+	{ 2,	TF,	sys_chmod,		"chmod"		},  /* 90 */
+	{ 2,	TD,	sys_fchmod,		"fchmod"	},  /* 91 */
+	{ 3,	TF,	sys_chown,		"chown"		},  /* 92 */
+	{ 3,	TD,	sys_fchown,		"fchown"	},  /* 93 */
+	{ 3,	TF,	sys_chown,		"lchown"	},  /* 94 */
+	{ 1,	0,	sys_umask,		"umask"		},  /* 95 */
+	{ 2,	0,	sys_gettimeofday,	"gettimeofday"	},  /* 96 */
+	{ 2,	0,	sys_getrlimit,		"getrlimit"	},  /* 97 */
+	{ 2,	0,	sys_getrusage,		"getrusage"	},  /* 98 */
+	{ 1,	0,	sys_sysinfo,		"sysinfo"	},  /* 99 */
+	{ 1,	0,	sys_times,		"times"		},  /* 100 */
+	{ 4,	0,	sys_ptrace,		"ptrace"	},  /* 101 */
+	{ 0,	NF,	sys_getuid,		"getuid"	},  /* 102 */
+	{ 3,	0,	sys_syslog,		"syslog"	},  /* 103 */
+	{ 0,	NF,	sys_getgid,		"getgid"	},  /* 104 */
+	{ 1,	0,	sys_setuid,		"setuid"	},  /* 105 */
+	{ 1,	0,	sys_setgid,		"setgid"	},  /* 106 */
+	{ 0,	NF,	sys_geteuid,		"geteuid"	},  /* 107 */
+	{ 0,	NF,	sys_getegid,		"getegid"	},  /* 108 */
+	{ 2,	0,	sys_setpgid,		"setpgid"	},  /* 109 */
+	{ 0,	0,	sys_getppid,		"getppid"	},  /* 110 */
+	{ 0,	0,	sys_getpgrp,		"getpgrp"	},  /* 111 */
+	{ 0,	0,	sys_setsid,		"setsid"	},  /* 112 */
+	{ 2,	0,	sys_setreuid,		"setreuid"	},  /* 113 */
+	{ 2,	0,	sys_setregid,		"setregid"	},  /* 114 */
+	{ 2,	0,	sys_getgroups,		"getgroups"	},  /* 115 */
+	{ 2,	0,	sys_setgroups,		"setgroups"	},  /* 116 */
+	{ 3,	0,	sys_setresuid,		"setresuid"	},  /* 117 */
+	{ 3,	0,	sys_getresuid,		"getresuid"	},  /* 118 */
+	{ 3,	0,	sys_setresgid,		"setresgid"	},  /* 119 */
+	{ 3,	0,	sys_getresgid,		"getresgid"	},  /* 120 */
+	{ 1,	0,	sys_getpgid,		"getpgid"	},  /* 121 */
+	{ 1,	NF,	sys_setfsuid,		"setfsuid"	},  /* 122 */
+	{ 1,	NF,	sys_setfsgid,		"setfsgid"	},  /* 123 */
+	{ 1,	0,	sys_getsid,		"getsid"	},  /* 124 */
+	{ 2,	0,	sys_capget,		"capget"	},  /* 125 */
+	{ 2,	0,	sys_capset,		"capset"	},  /* 126 */
+	{ 2,	TS,	sys_rt_sigpending,	"rt_sigpending"	},  /* 127 */
+	{ 4,	TS,	sys_rt_sigtimedwait,	"rt_sigtimedwait"	},  /* 128 */
+	{ 3,	TS,	sys_rt_sigqueueinfo,    "rt_sigqueueinfo"	},  /* 129 */
+	{ 2,	TS,	sys_rt_sigsuspend,	"rt_sigsuspend"	},  /* 130 */
+	{ 2,	TS,	sys_sigaltstack,	"sigaltstack"	},  /* 131 */
+	{ 2,	TF,	sys_utime,		"utime"		},  /* 132 */
+	{ 3,	TF,	sys_mknod,		"mknod"		},  /* 133 */
+	{ 1,	TF,	sys_uselib,		"uselib"	},  /* 134 */
+	{ 1,	0,	sys_personality,	"personality"	},  /* 135 */
+	{ 2,	0,	sys_ustat,		"ustat"		},  /* 136 */
+	{ 2,	TF,	sys_statfs,		"statfs"	},  /* 137 */
+	{ 2,	TD,	sys_fstatfs,		"fstatfs"	},  /* 138 */
+	{ 3,	0,	sys_sysfs,		"sysfs"		},  /* 139 */
+	{ 2,	0,	sys_getpriority,	"getpriority"	},  /* 140 */
+	{ 3,	0,	sys_setpriority,	"setpriority"	},  /* 141 */
+	{ 0,	0,	sys_sched_setparam,	"sched_setparam"	},  /* 142 */
+	{ 2,	0,	sys_sched_getparam,	"sched_getparam"	},  /* 143 */
+	{ 3,	0,	sys_sched_setscheduler,	"sched_setscheduler"	},  /* 144 */
+	{ 1,	0,	sys_sched_getscheduler,	"sched_getscheduler"	},  /* 145 */
+	{ 1,	0,	sys_sched_get_priority_max,	"sched_get_priority_max"	},  /* 146 */
+	{ 1,	0,	sys_sched_get_priority_min,	"sched_get_priority_min"	},  /* 147 */
+	{ 2,	0,	sys_sched_rr_get_interval,	"sched_rr_get_interval"	},  /* 148 */
+	{ 2,	0,	sys_mlock,		"mlock"		},  /* 149 */
+	{ 2,	0,	sys_munlock,		"munlock"	},  /* 150 */
+	{ 1,	0,	sys_mlockall,		"mlockall"	},  /* 151 */
+	{ 0,	0,	sys_munlockall,		"munlockall"	},  /* 152 */
+	{ 0,	0,	sys_vhangup,		"vhangup"	},  /* 153 */
+	{ 3,	0,	sys_modify_ldt,		"modify_ldt"	},  /* 154 */
+	{ 2,	TF,	sys_pivotroot,		"pivot_root"	},  /* 155 */
+	{ 1,	0,	sys_sysctl,		"_sysctl"	},  /* 156 */
+	{ 5,	0,	sys_prctl,		"prctl"		},  /* 157 */
+	{ 2,	TP,	sys_arch_prctl,		"arch_prctl"	},  /* 158 */
+	{ 1,	0,	sys_adjtimex,		"adjtimex"	},  /* 159 */
+	{ 2,	0,	sys_setrlimit,		"setrlimit"	},  /* 160 */
+	{ 1,	TF,	sys_chroot,		"chroot"	},  /* 161 */
+	{ 0,	0,	sys_sync,		"sync"		},  /* 162 */
+	{ 1,	TF,	sys_acct,		"acct"		},  /* 163 */
+	{ 2,	0,	sys_settimeofday,	"settimeofday"	},  /* 164 */
+	{ 5,	TF,	sys_mount,		"mount"		},  /* 165 */
+	{ 2,	TF,	sys_umount2,		"umount"	}, /* 166 */
+	{ 2,	TF,	sys_swapon,		"swapon"	},  /* 167 */
+	{ 1,	TF,	sys_swapoff,		"swapoff"	},  /* 168 */
+	{ 4,	0,	sys_reboot,		"reboot"	},  /* 169 */
+	{ 2,	0,	sys_sethostname,	"sethostname"	},  /* 170 */
+	{ 2,	0,	sys_setdomainname,	"setdomainname"	},  /* 171 */
+	{ 1,	0,	sys_iopl,		"iopl"		},  /* 172 */
+	{ 3,	0,	sys_ioperm,		"ioperm"	},  /* 173 */
+	{ 2,	0,	sys_create_module,	"create_module"	},  /* 174 */
+	{ 3,	0,	sys_init_module,	"init_module"	},  /* 175 */
+	{ 2,	0,	sys_delete_module,	"delete_module"	},  /* 176 */
+	{ 1,	0,	sys_get_kernel_syms,	"get_kernel_syms"},  /* 177 */
+	{ 5,	0,	sys_query_module,	"query_module"	},  /* 178 */
+	{ 4,	0,	sys_quotactl,		"quotactl"	},  /* 179 */
+	{ 3,	0,	sys_nfsservctl,		"nfsservctl"	},  /* 180 */
+	{ 5,	0,	sys_getpmsg,		"getpmsg"	}, /* 181 */
+	{ 5,	0,	sys_putpmsg,		"putpmsg"	}, /* 182 */
+	{ 5,	0,	sys_afs_syscall,	"afs_syscall"	},  /* 183 */
+	{ 3,	0,	sys_tuxcall,		"tuxcall"	}, /* 184 */
+	{ 3,	0,	sys_security,		"security"	}, /* 185 */
+	{ 0,	0,	sys_gettid,		"gettid"	}, /* 186 */
+	{ 4,	TD,	sys_readahead,		"readahead"	}, /* 187 */
+	{ 5,	TF,	sys_setxattr,		"setxattr"	}, /* 188 */
+	{ 5,	TF,	sys_setxattr,		"lsetxattr"	}, /* 189 */
+	{ 5,	TD,	sys_fsetxattr,		"fsetxattr"	}, /* 190 */
+	{ 4,	TF,	sys_getxattr,		"getxattr"	}, /* 191 */
+	{ 4,	TF,	sys_getxattr,		"lgetxattr"	}, /* 192 */
+	{ 4,	TD,	sys_fgetxattr,		"fgetxattr"	}, /* 193 */
+	{ 3,	TF,	sys_listxattr,		"listxattr"	}, /* 194 */
+	{ 3,	TF,	sys_listxattr,		"llistxattr"	}, /* 195 */
+	{ 3,	TD,	sys_flistxattr,		"flistxattr"	}, /* 196 */
+	{ 2,	TF,	sys_removexattr,	"removexattr"	}, /* 197 */
+	{ 2,	TF,	sys_removexattr,	"lremovexattr"	}, /* 198 */
+	{ 2,	TD,	sys_fremovexattr,	"fremovexattr"	}, /* 199 */
+	{ 2,	TS,	sys_kill,		"tkill"		}, /* 200 */
+	{ 1,	0,	sys_time,		"time"		},  /* 201 */
+	{ 6,	0,	sys_futex,		"futex"		}, /* 202 */
+	{ 3,	0,	sys_sched_setaffinity,	"sched_setaffinity" },/* 203 */
+	{ 3,	0,	sys_sched_getaffinity,	"sched_getaffinity" },/* 204 */
+	{ 1,	0,	sys_set_thread_area,	"set_thread_area" }, /* 205 */
+	{ 2,	0,	sys_io_setup,		"io_setup"	}, /* 206 */
+	{ 1,	0,	sys_io_destroy,		"io_destroy"	}, /* 207 */
+	{ 5,	0,	sys_io_getevents,	"io_getevents"	}, /* 208 */
+	{ 3,	0,	sys_io_submit,		"io_submit"	}, /* 209 */
+	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 210 */
+	{ 1,	0,	sys_get_thread_area,	"get_thread_area" }, /* 211 */
+	{ 4,	0,	sys_lookup_dcookie,	"lookup_dcookie"}, /* 212 */
+	{ 1,	TD,	sys_epoll_create,	"epoll_create"	}, /* 213 */
+	{ 4,	0,	printargs,		"epoll_ctl_old"	}, /* 214 */
+	{ 4,	0,	printargs,		"epoll_wait_old"}, /* 215 */
+	{ 5,	0,	sys_remap_file_pages,	"remap_file_pages"}, /* 216 */
+	{ 3,	TD,	sys_getdents64,		"getdents64"	}, /* 217 */
+	{ 1,	0,	sys_set_tid_address,	"set_tid_address"}, /* 218 */
+	{ 0,	0,	sys_restart_syscall,	"restart_syscall"}, /* 219 */
+	{ 5,	TI,	sys_semtimedop,		"semtimedop"	}, /* 220 */
+	{ 4,	TD,	sys_fadvise64_64,	"fadvise64"	}, /* 221 */
+	{ 3,	0,	sys_timer_create,	"timer_create"	}, /* 222 */
+	{ 4,	0,	sys_timer_settime,	"timer_settime"	}, /* 223 */
+	{ 2,	0,	sys_timer_gettime,	"timer_gettime"	}, /* 224 */
+	{ 1,	0,	sys_timer_getoverrun,	"timer_getoverrun"}, /* 225 */
+	{ 1,	0,	sys_timer_delete,	"timer_delete"	}, /* 226 */
+	{ 2,	0,	sys_clock_settime,	"clock_settime"	}, /* 227 */
+	{ 2,	0,	sys_clock_gettime,	"clock_gettime"	}, /* 228 */
+	{ 2,	0,	sys_clock_getres,	"clock_getres"	}, /* 229 */
+	{ 4,	0,	sys_clock_nanosleep,	"clock_nanosleep"}, /* 230 */
+	{ 1,	TP,	sys_exit,		"exit_group"	}, /* 231 */
+	{ 4,	TD,	sys_epoll_wait,		"epoll_wait"	}, /* 232 */
+	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 233 */
+	{ 3,	TS,	sys_tgkill,		"tgkill"	}, /* 234 */
+	{ 2,	TF,	sys_utimes,		"utimes"	}, /* 235 */
+	{ 5,	0,	sys_vserver,		"vserver"	}, /* 236 */
+	{ 6,	0,	sys_mbind,		"mbind"		}, /* 237 */
+	{ 3,	0,	sys_set_mempolicy,	"set_mempolicy"	}, /* 238 */
+	{ 5,	0,	sys_get_mempolicy,	"get_mempolicy"	}, /* 239 */
+	{ 4,	0,	sys_mq_open,		"mq_open"	}, /* 240 */
+	{ 1,	0,	sys_mq_unlink,		"mq_unlink"	}, /* 241 */
+	{ 5,	0,	sys_mq_timedsend,	"mq_timedsend"	}, /* 242 */
+	{ 5,	0,	sys_mq_timedreceive,	"mq_timedreceive" }, /* 243 */
+	{ 2,	0,	sys_mq_notify,		"mq_notify"	}, /* 244 */
+	{ 3,	0,	sys_mq_getsetattr,	"mq_getsetattr"	}, /* 245 */
+	{ 4,	0,	sys_kexec_load,		"kexec_load"	}, /* 246 */
+	{ 5,	TP,	sys_waitid,		"waitid"	}, /* 247 */
+	{ 5,	0,	sys_add_key,		"add_key"	}, /* 248 */
+	{ 4,	0,	sys_request_key,	"request_key"	}, /* 249 */
+	{ 5,	0,	sys_keyctl,		"keyctl"	}, /* 250 */
+	{ 3,	0,	sys_ioprio_set,		"ioprio_set"	}, /* 251 */
+	{ 2,	0,	sys_ioprio_get,		"ioprio_get"	}, /* 252 */
+	{ 0,	TD,	sys_inotify_init,	"inotify_init"	}, /* 253 */
+	{ 3,	TD,	sys_inotify_add_watch,	"inotify_add_watch" }, /* 254 */
+	{ 2,	TD,	sys_inotify_rm_watch,	"inotify_rm_watch" }, /* 255 */
+	{ 4,	0,	sys_migrate_pages,	"migrate_pages"	}, /* 256 */
+	{ 4,	TD|TF,	sys_openat,		"openat"	}, /* 257 */
+	{ 3,	TD|TF,	sys_mkdirat,		"mkdirat"	}, /* 258 */
+	{ 4,	TD|TF,	sys_mknodat,		"mknodat"	}, /* 259 */
+	{ 5,	TD|TF,	sys_fchownat,		"fchownat"	}, /* 260 */
+	{ 3,	TD|TF,	sys_futimesat,		"futimesat"	}, /* 261 */
+	{ 4,	TD|TF,	sys_newfstatat,		"newfstatat"	}, /* 262 */
+	{ 3,	TD|TF,	sys_unlinkat,		"unlinkat"	}, /* 263 */
+	{ 4,	TD|TF,	sys_renameat,		"renameat"	}, /* 264 */
+	{ 5,	TD|TF,	sys_linkat,		"linkat"	}, /* 265 */
+	{ 3,	TD|TF,	sys_symlinkat,		"symlinkat"	}, /* 266 */
+	{ 4,	TD|TF,	sys_readlinkat,		"readlinkat"	}, /* 267 */
+	{ 3,	TD|TF,	sys_fchmodat,		"fchmodat"	}, /* 268 */
+	{ 3,	TD|TF,	sys_faccessat,		"faccessat"	}, /* 269 */
+	{ 6,	TD,	sys_pselect6,		"pselect6"	}, /* 270 */
+	{ 5,	TD,	sys_ppoll,		"ppoll"		}, /* 271 */
+	{ 1,	TP,	sys_unshare,		"unshare"	}, /* 272 */
+	{ 2,	0,	sys_set_robust_list,	"set_robust_list" }, /* 273 */
+	{ 3,	0,	sys_get_robust_list,	"get_robust_list" }, /* 274 */
+	{ 6,	TD,	sys_splice,		"splice"	}, /* 275 */
+	{ 4,	TD,	sys_tee,		"tee"		}, /* 276 */
+	{ 4,	TD,	sys_sync_file_range,	"sync_file_range" }, /* 277 */
+	{ 4,	TD,	sys_vmsplice,		"vmsplice"	}, /* 278 */
+	{ 6,	0,	sys_move_pages,		"move_pages"	}, /* 279 */
+	{ 4,	TD|TF,	sys_utimensat,		"utimensat"	}, /* 280 */
+	{ 6,	TD,	sys_epoll_pwait,	"epoll_pwait"	}, /* 281 */
+	{ 3,	TD|TS,	sys_signalfd,		"signalfd"	}, /* 282 */
+	{ 2,	TD,	sys_timerfd_create,	"timerfd_create"}, /* 283 */
+	{ 1,	TD,	sys_eventfd,		"eventfd"	}, /* 284 */
+	{ 6,	TD,	sys_fallocate,		"fallocate"	}, /* 285 */
+	{ 4,	TD,	sys_timerfd_settime,	"timerfd_settime"}, /* 286 */
+	{ 2,	TD,	sys_timerfd_gettime,	"timerfd_gettime"}, /* 287 */
+	{ 4,	TN,	sys_accept4,		"accept4"	}, /* 288 */
+	{ 4,	TD|TS,	sys_signalfd4,		"signalfd4"	}, /* 289 */
+	{ 2,	TD,	sys_eventfd2,		"eventfd2"	}, /* 290 */
+	{ 1,	TD,	sys_epoll_create1,	"epoll_create1"	}, /* 291 */
+	{ 3,	TD,	sys_dup3,		"dup3"		}, /* 292 */
+	{ 2,	TD,	sys_pipe2,		"pipe2"		}, /* 293 */
+	{ 1,	TD,	sys_inotify_init1,	"inotify_init1"	}, /* 294 */
+	{ 5,	TD,	sys_preadv,		"preadv"	}, /* 295 */
+	{ 5,	TD,	sys_pwritev,		"pwritev"	}, /* 296 */
+	{ 4,	TP|TS,	sys_rt_tgsigqueueinfo,	"rt_tgsigqueueinfo"}, /* 297 */
+	{ 5,	TD,	sys_perf_event_open,	"perf_event_open"}, /* 298 */
+	{ 5,	TN,	sys_recvmmsg,		"recvmmsg"	}, /* 299 */
+	{ 2,	TD,	sys_fanotify_init,	"fanotify_init"	}, /* 300 */
+	{ 5,	TD|TF,	sys_fanotify_mark,	"fanotify_mark"	}, /* 301 */
+	{ 4,	0,	sys_prlimit64,		"prlimit64"	}, /* 302 */
+	{ 5,	TD|TF,	sys_name_to_handle_at,	"name_to_handle_at"}, /* 303 */
+	{ 3,	TD,	sys_open_by_handle_at,	"open_by_handle_at"}, /* 304 */
+	{ 2,	0,	sys_clock_adjtime,	"clock_adjtime"	}, /* 305 */
+	{ 1,	TD,	sys_syncfs,		"syncfs"	}, /* 306 */
+	{ 4,	TN,	sys_sendmmsg,		"sendmmsg"	}, /* 307 */
+	{ 2,	TD,	sys_setns,		"setns"		}, /* 308 */
+	{ 3,	0,	sys_getcpu,		"getcpu"	}, /* 309 */
+	{ 6,	0,	sys_process_vm_readv,	"process_vm_readv"	}, /* 310 */
+	{ 6,	0,	sys_process_vm_writev,	"process_vm_writev"	}, /* 311 */
diff --git a/linux/x86_64/syscallent1.h b/linux/x86_64/syscallent1.h
new file mode 100644
index 0000000..9097785
--- /dev/null
+++ b/linux/x86_64/syscallent1.h
@@ -0,0 +1,7 @@
+/* Our second set comes from the i386 files.
+   Only a couple of calls we cannot support without the i386 headers.  */
+
+#define sys_oldstat printargs
+#define sys_oldfstat printargs
+#define sys_oldlstat printargs
+#include "i386/syscallent.h"
diff --git a/linux/x86_64/syscallent2.h b/linux/x86_64/syscallent2.h
new file mode 100644
index 0000000..1d35f53
--- /dev/null
+++ b/linux/x86_64/syscallent2.h
@@ -0,0 +1,2 @@
+/* Our third set is for x32.  */
+#include "x32/syscallent.h"
diff --git a/loop.c b/loop.c
new file mode 100644
index 0000000..83d9152
--- /dev/null
+++ b/loop.c
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2012 The Chromium OS Authors.
+ * Written by Mike Frysinger <vapier@gentoo.org>.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "defs.h"
+
+#include <sys/ioctl.h>
+
+#include <linux/loop.h>
+
+static const struct xlat loop_flags_options[] = {
+	{ LO_FLAGS_READ_ONLY,	"LO_FLAGS_READ_ONLY"	},
+#if HAVE_DECL_LO_FLAGS_AUTOCLEAR
+	{ LO_FLAGS_AUTOCLEAR,	"LO_FLAGS_AUTOCLEAR"	},
+#endif
+#if HAVE_DECL_LO_FLAGS_PARTSCAN
+	{ LO_FLAGS_PARTSCAN,	"LO_FLAGS_PARTSCAN"	},
+#endif
+	{ 0,			NULL			},
+};
+
+static const struct xlat loop_crypt_type_options[] = {
+	{ LO_CRYPT_NONE,	"LO_CRYPT_NONE"		},
+	{ LO_CRYPT_XOR,		"LO_CRYPT_XOR"		},
+	{ LO_CRYPT_DES,		"LO_CRYPT_DES"		},
+	{ LO_CRYPT_FISH2,	"LO_CRYPT_FISH2"	},
+	{ LO_CRYPT_BLOW,	"LO_CRYPT_BLOW"		},
+	{ LO_CRYPT_CAST128,	"LO_CRYPT_CAST128"	},
+	{ LO_CRYPT_IDEA,	"LO_CRYPT_IDEA"		},
+	{ LO_CRYPT_DUMMY,	"LO_CRYPT_DUMMY"	},
+	{ LO_CRYPT_SKIPJACK,	"LO_CRYPT_SKIPJACK"	},
+	{ LO_CRYPT_CRYPTOAPI,	"LO_CRYPT_CRYPTOAPI"	},
+	{ 0,			NULL			},
+};
+
+int loop_ioctl(struct tcb *tcp, long code, long arg)
+{
+	struct loop_info info;
+	struct loop_info64 info64;
+	char *s = alloca((LO_NAME_SIZE + LO_KEY_SIZE) * 4);
+
+	if (entering(tcp))
+		return 0;
+
+	switch (code) {
+
+	case LOOP_SET_STATUS:
+	case LOOP_GET_STATUS:
+		if (!verbose(tcp) || umove(tcp, arg, &info) < 0)
+			return 0;
+
+		tprintf(", {number=%i", info.lo_number);
+
+		if (!abbrev(tcp)) {
+			tprintf(", device=%#lx, inode=%lu, rdevice=%#lx",
+				(unsigned long) info.lo_device,
+				info.lo_inode,
+				(unsigned long) info.lo_rdevice);
+		}
+
+		tprintf(", offset=%#x", info.lo_offset);
+
+		if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) {
+			tprints(", encrypt_type=");
+			printxval(loop_crypt_type_options, info.lo_encrypt_type,
+				"LO_CRYPT_???");
+			tprintf(", encrypt_key_size=%i", info.lo_encrypt_key_size);
+		}
+
+		tprints(", flags=");
+		printflags(loop_flags_options, info.lo_flags, "LO_FLAGS_???");
+
+		string_quote(info.lo_name, s, -1, LO_NAME_SIZE);
+		tprintf(", name=%s", s);
+
+		if (!abbrev(tcp) || info.lo_encrypt_type != LO_CRYPT_NONE) {
+			string_quote((void *) info.lo_encrypt_key, s, 0, LO_KEY_SIZE);
+			tprintf(", encrypt_key=%s", s);
+		}
+
+		if (!abbrev(tcp))
+			tprintf(", init={%#lx, %#lx}"
+				", reserved={%#x, %#x, %#x, %#x}}",
+				info.lo_init[0], info.lo_init[1],
+				info.reserved[0], info.reserved[1],
+				info.reserved[2], info.reserved[3]);
+		else
+			tprints(", ...}");
+
+		return 1;
+
+	case LOOP_SET_STATUS64:
+	case LOOP_GET_STATUS64:
+		if (!verbose(tcp) || umove(tcp, arg, &info64) < 0)
+			return 0;
+
+		tprints(", {");
+
+		if (!abbrev(tcp)) {
+			tprintf("device=%" PRIu64 ", inode=%" PRIu64 ", "
+				"rdevice=%" PRIu64 ", offset=%#" PRIx64 ", "
+				"sizelimit=%" PRIu64 ", number=%" PRIu32,
+				(uint64_t) info64.lo_device,
+				(uint64_t) info64.lo_inode,
+				(uint64_t) info64.lo_rdevice,
+				(uint64_t) info64.lo_offset,
+				(uint64_t) info64.lo_sizelimit,
+				(uint32_t) info64.lo_number);
+		} else {
+			tprintf("offset=%#" PRIx64 ", number=%" PRIu32,
+				(uint64_t) info64.lo_offset,
+				(uint32_t) info64.lo_number);
+		}
+
+		if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) {
+			tprints(", encrypt_type=");
+			printxval(loop_crypt_type_options, info64.lo_encrypt_type,
+				"LO_CRYPT_???");
+			tprintf(", encrypt_key_size=%" PRIu32,
+				info64.lo_encrypt_key_size);
+		}
+
+		tprints(", flags=");
+		printflags(loop_flags_options, info64.lo_flags, "LO_FLAGS_???");
+
+		string_quote((void *) info64.lo_file_name, s, -1, LO_NAME_SIZE);
+		tprintf(", file_name=%s", s);
+
+		if (!abbrev(tcp) || info64.lo_encrypt_type != LO_CRYPT_NONE) {
+			string_quote((void *) info64.lo_crypt_name, s, -1, LO_NAME_SIZE);
+			tprintf(", crypt_name=%s", s);
+			string_quote((void *) info64.lo_encrypt_key, s, 0, LO_KEY_SIZE);
+			tprintf(", encrypt_key=%s", s);
+		}
+
+		if (!abbrev(tcp))
+			tprintf(", init={%#" PRIx64 ", %#" PRIx64 "}}",
+				(uint64_t) info64.lo_init[0],
+				(uint64_t) info64.lo_init[1]);
+		else
+			tprints(", ...}");
+
+		return 1;
+
+	case LOOP_CLR_FD:
+#ifdef LOOP_SET_CAPACITY
+	case LOOP_SET_CAPACITY:
+#endif
+#ifdef LOOP_CTL_GET_FREE
+	/* newer loop-control stuff */
+	case LOOP_CTL_GET_FREE:
+#endif
+		/* Takes no arguments */
+		return 1;
+
+	case LOOP_SET_FD:
+	case LOOP_CHANGE_FD:
+#ifdef LOOP_CTL_ADD
+	/* newer loop-control stuff */
+	case LOOP_CTL_ADD:
+	case LOOP_CTL_REMOVE:
+#endif
+		/* These take simple args, so let default printer handle it */
+
+	default:
+		return 0;
+	}
+}
diff --git a/mem.c b/mem.c
index d4c223a..0279030 100644
--- a/mem.c
+++ b/mem.c
@@ -28,59 +28,36 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#ifdef LINUX
 #include <asm/mman.h>
-#endif
 #include <sys/mman.h>
-
-#if defined(LINUX) && defined(I386)
-#include <asm/ldt.h>
+#if defined(I386)
+# include <asm/ldt.h>
 # ifdef HAVE_STRUCT_USER_DESC
 #  define modify_ldt_ldt_s user_desc
 # endif
 #endif
-#if defined(LINUX) && defined(SH64)
-#include <asm/page.h>	    /* for PAGE_SHIFT */
+#if defined(SH64)
+# include <asm/page.h>	    /* for PAGE_SHIFT */
 #endif
 
 #ifdef HAVE_LONG_LONG_OFF_T
 /*
  * Ugly hacks for systems that have a long long off_t
  */
-#define sys_mmap64	sys_mmap
+# define sys_mmap64	sys_mmap
 #endif
 
 int
-sys_brk(tcp)
-struct tcb *tcp;
+sys_brk(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx", tcp->u_arg[0]);
 	}
-#ifdef LINUX
-	return RVAL_HEX;
-#else
-	return 0;
-#endif
-}
-
-#if defined(FREEBSD) || defined(SUNOS4)
-int
-sys_sbrk(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%lu", tcp->u_arg[0]);
-	}
 	return RVAL_HEX;
 }
-#endif /* FREEBSD || SUNOS4 */
 
 static const struct xlat mmap_prot[] = {
 	{ PROT_NONE,	"PROT_NONE",	},
@@ -164,29 +141,29 @@
 	{ MAP_EXECUTABLE,"MAP_EXECUTABLE"},
 #endif
 #ifdef MAP_INHERIT
-	{ MAP_INHERIT,"MAP_INHERIT"	},
+	{ MAP_INHERIT,	"MAP_INHERIT"	},
 #endif
 #ifdef MAP_FILE
-	{ MAP_FILE,"MAP_FILE"},
+	{ MAP_FILE,	"MAP_FILE"	},
 #endif
 #ifdef MAP_LOCKED
-	{ MAP_LOCKED,"MAP_LOCKED"},
+	{ MAP_LOCKED,	"MAP_LOCKED"	},
 #endif
 	/* FreeBSD ones */
-#ifdef MAP_ANON
-	{ MAP_ANON,		"MAP_ANON"	},
+#if defined(MAP_ANON) && (!defined(MAP_ANONYMOUS) || MAP_ANON != MAP_ANONYMOUS)
+	{ MAP_ANON,	"MAP_ANON"	},
 #endif
 #ifdef MAP_HASSEMAPHORE
-	{ MAP_HASSEMAPHORE,	"MAP_HASSEMAPHORE"	},
+	{ MAP_HASSEMAPHORE,"MAP_HASSEMAPHORE"},
 #endif
 #ifdef MAP_STACK
-	{ MAP_STACK,		"MAP_STACK"	},
+	{ MAP_STACK,	"MAP_STACK"	},
 #endif
 #ifdef MAP_NOSYNC
-	{ MAP_NOSYNC,		"MAP_NOSYNC"	},
+	{ MAP_NOSYNC,	"MAP_NOSYNC"	},
 #endif
 #ifdef MAP_NOCORE
-	{ MAP_NOCORE,		"MAP_NOCORE"	},
+	{ MAP_NOCORE,	"MAP_NOCORE"	},
 #endif
 #ifdef TILE
 	{ MAP_CACHE_NO_LOCAL, "MAP_CACHE_NO_LOCAL" },
@@ -197,10 +174,8 @@
 };
 
 #ifdef TILE
-static
-int
-addtileflags(flags)
-long flags;
+static int
+addtileflags(long flags)
 {
 	long home = flags & _MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
 	flags &= ~_MAP_CACHE_MKHOME(_MAP_CACHE_HOME_MASK);
@@ -208,19 +183,19 @@
 	if (flags & _MAP_CACHE_INCOHERENT) {
 		flags &= ~_MAP_CACHE_INCOHERENT;
 		if (home == MAP_CACHE_HOME_NONE) {
-			tprintf("|MAP_CACHE_INCOHERENT");
+			tprints("|MAP_CACHE_INCOHERENT");
 			return flags;
 		}
-		tprintf("|_MAP_CACHE_INCOHERENT");
+		tprints("|_MAP_CACHE_INCOHERENT");
 	}
 
 	switch (home) {
 	case 0:	break;
-	case MAP_CACHE_HOME_HERE: tprintf("|MAP_CACHE_HOME_HERE"); break;
-	case MAP_CACHE_HOME_NONE: tprintf("|MAP_CACHE_HOME_NONE"); break;
-	case MAP_CACHE_HOME_SINGLE: tprintf("|MAP_CACHE_HOME_SINGLE"); break;
-	case MAP_CACHE_HOME_TASK: tprintf("|MAP_CACHE_HOME_TASK"); break;
-	case MAP_CACHE_HOME_HASH: tprintf("|MAP_CACHE_HOME_HASH"); break;
+	case MAP_CACHE_HOME_HERE: tprints("|MAP_CACHE_HOME_HERE"); break;
+	case MAP_CACHE_HOME_NONE: tprints("|MAP_CACHE_HOME_NONE"); break;
+	case MAP_CACHE_HOME_SINGLE: tprints("|MAP_CACHE_HOME_SINGLE"); break;
+	case MAP_CACHE_HOME_TASK: tprints("|MAP_CACHE_HOME_TASK"); break;
+	case MAP_CACHE_HOME_HASH: tprints("|MAP_CACHE_HOME_HASH"); break;
 	default:
 		tprintf("|MAP_CACHE_HOME(%d)",
 			(home >> _MAP_CACHE_HOME_SHIFT) );
@@ -238,14 +213,14 @@
 	if (entering(tcp)) {
 		/* addr */
 		if (!u_arg[0])
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else
 			tprintf("%#lx, ", u_arg[0]);
 		/* len */
 		tprintf("%lu, ", u_arg[1]);
 		/* prot */
 		printflags(mmap_prot, u_arg[2], "PROT_???");
-		tprintf(", ");
+		tprints(", ");
 		/* flags */
 #ifdef MAP_TYPE
 		printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
@@ -258,7 +233,7 @@
 		printflags(mmap_flags, u_arg[3], "MAP_???");
 #endif
 		/* fd */
-		tprintf(", ");
+		tprints(", ");
 		printfd(tcp, u_arg[4]);
 		/* offset */
 		tprintf(", %#llx", offset);
@@ -266,61 +241,60 @@
 	return RVAL_HEX;
 }
 
-#ifdef LINUX
-int sys_old_mmap(tcp)
-struct tcb *tcp;
+int sys_old_mmap(struct tcb *tcp)
 {
-	long u_arg[6];
-
-#if	defined(IA64)
-	int i, v;
+#if defined(IA64)
 	/*
-	 *  IA64 processes never call this routine, they only use the
-	 *  new `sys_mmap' interface.  This code converts the integer
-	 *  arguments that the IA32 process pushed onto the stack into
-	 *  longs.
+	 * IA64 processes never call this routine, they only use the
+	 * new `sys_mmap' interface.
+	 * For IA32 processes, this code converts the integer arguments
+	 * that they pushed onto the stack, into longs.
 	 *
-	 *  Note that addresses with bit 31 set will be sign extended.
-	 *  Fortunately, those addresses are not currently being generated
-	 *  for IA32 processes so it's not a problem.
+	 * Note that addresses with bit 31 set will be sign extended.
+	 * Fortunately, those addresses are not currently being generated
+	 * for IA32 processes so it's not a problem.
 	 */
+	int i;
+	long u_arg[6];
+	int narrow_arg[6];
+	if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), (char *) narrow_arg) == -1)
+		return 0;
 	for (i = 0; i < 6; i++)
-		if (umove(tcp, tcp->u_arg[0] + (i * sizeof(int)), &v) == -1)
-			return 0;
-		else
-			u_arg[i] = v;
+		u_arg[i] = narrow_arg[i];
 #elif defined(SH) || defined(SH64)
 	/* SH has always passed the args in registers */
-	int i;
-	for (i=0; i<6; i++)
-		u_arg[i] = tcp->u_arg[i];
+	long *u_arg = tcp->u_arg;
 #else
+	long u_arg[6];
 # if defined(X86_64)
 	if (current_personality == 1) {
 		int i;
-		for (i = 0; i < 6; ++i) {
-			unsigned int val;
-			if (umove(tcp, tcp->u_arg[0] + i * 4, &val) == -1)
-				return 0;
-			u_arg[i] = val;
-		}
+		unsigned narrow_arg[6];
+		if (umoven(tcp, tcp->u_arg[0], sizeof(narrow_arg), (char *) narrow_arg) == -1)
+			return 0;
+		for (i = 0; i < 6; ++i)
+			u_arg[i] = narrow_arg[i];
 	}
 	else
 # endif
-	if (umoven(tcp, tcp->u_arg[0], sizeof u_arg, (char *) u_arg) == -1)
+	if (umoven(tcp, tcp->u_arg[0], sizeof(u_arg), (char *) u_arg) == -1)
 		return 0;
-#endif	// defined(IA64)
+#endif /* other architectures */
+
 	return print_mmap(tcp, u_arg, u_arg[5]);
 }
-#endif
 
 int
-sys_mmap(tcp)
-struct tcb *tcp;
+sys_mmap(struct tcb *tcp)
 {
 	long long offset = tcp->u_arg[5];
 
-#if defined(LINUX) && defined(SH64)
+	/* FIXME: why only SH64? i386 mmap2 syscall ends up
+	 * in this function, but does not convert offset
+	 * from pages to bytes. See test/mmap_offset_decode.c
+	 * Why SH64 and i386 are handled differently?
+	 */
+#if defined(SH64)
 	/*
 	 * Old mmap differs from new mmap in specifying the
 	 * offset in units of bytes rather than pages.  We
@@ -337,35 +311,67 @@
 #endif /* !HAVE_LONG_LONG_OFF_T */
 
 #if _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T
-int
-sys_mmap64(struct tcb *tcp)
+# if defined(X32)
+int sys_old_mmap(struct tcb *tcp)
 {
-#ifdef linux
-#ifdef ALPHA
-	long *u_arg = tcp->u_arg;
-#else /* !ALPHA */
-	long u_arg[7];
-#endif /* !ALPHA */
-#else /* !linux */
-	long *u_arg = tcp->u_arg;
-#endif /* !linux */
-
+	long u_arg[6];
+	if (umoven(tcp, tcp->u_arg[0], sizeof(u_arg), (char *) u_arg) == -1)
+		return 0;
 	if (entering(tcp)) {
-#ifdef linux
-#ifndef ALPHA
-		if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
-				(char *) u_arg) == -1)
-			return 0;
-#endif /* ALPHA */
-#endif /* linux */
-
 		/* addr */
-		tprintf("%#lx, ", u_arg[0]);
+		if (!u_arg[0])
+			tprints("NULL, ");
+		else
+			tprintf("%#lx, ", u_arg[0]);
 		/* len */
 		tprintf("%lu, ", u_arg[1]);
 		/* prot */
 		printflags(mmap_prot, u_arg[2], "PROT_???");
-		tprintf(", ");
+		tprints(", ");
+		/* flags */
+#  ifdef MAP_TYPE
+		printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
+		addflags(mmap_flags, u_arg[3] & ~MAP_TYPE);
+#  else
+		printflags(mmap_flags, u_arg[3], "MAP_???");
+#  endif
+		/* fd */
+		tprints(", ");
+		printfd(tcp, u_arg[4]);
+		/* offset */
+		tprintf(", %#lx", u_arg[5]);
+	}
+	return RVAL_HEX;
+}
+# endif
+
+/* TODO: comment which arches use this routine.
+ * For one, does ALPHA on Linux use this??
+ * From code it seems that it might use 7 or 8 registers,
+ * which is strange - Linux syscalls can pass maximum of 6 parameters!
+ */
+int
+sys_mmap64(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+#if defined(ALPHA) || defined(X32)
+		long *u_arg = tcp->u_arg;
+#else
+		long u_arg[7];
+		if (umoven(tcp, tcp->u_arg[0], sizeof u_arg,
+				(char *) u_arg) == -1)
+			return 0;
+#endif
+		/* addr */
+		if (!u_arg[0])
+			tprints("NULL, ");
+		else
+			tprintf("%#lx, ", u_arg[0]);
+		/* len */
+		tprintf("%lu, ", u_arg[1]);
+		/* prot */
+		printflags(mmap_prot, u_arg[2], "PROT_???");
+		tprints(", ");
 		/* flags */
 #ifdef MAP_TYPE
 		printxval(mmap_flags, u_arg[3] & MAP_TYPE, "MAP_???");
@@ -374,19 +380,25 @@
 		printflags(mmap_flags, u_arg[3], "MAP_???");
 #endif
 		/* fd */
-		tprintf(", ");
-		printfd(tcp, tcp->u_arg[4]);
+		tprints(", ");
+		printfd(tcp, u_arg[4]);
 		/* offset */
+#if defined(ALPHA) || defined(X32)
 		printllval(tcp, ", %#llx", 5);
+#else
+		/* NOTE: not verified that [5] and [6] should be used.
+		 * It's possible that long long is 64-bit aligned in memory
+		 * and we need to use [6] and [7] here instead:
+		 */
+		tprintf(", %#llx", LONG_LONG(u_arg[5], u_arg[6]));
+#endif
 	}
 	return RVAL_HEX;
 }
-#endif
-
+#endif /* _LFS64_LARGEFILE || HAVE_LONG_LONG_OFF_T */
 
 int
-sys_munmap(tcp)
-struct tcb *tcp;
+sys_munmap(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu",
@@ -396,8 +408,7 @@
 }
 
 int
-sys_mprotect(tcp)
-struct tcb *tcp;
+sys_mprotect(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu, ",
@@ -407,8 +418,6 @@
 	return 0;
 }
 
-#ifdef LINUX
-
 static const struct xlat mremap_flags[] = {
 	{ MREMAP_MAYMOVE,	"MREMAP_MAYMOVE"	},
 #ifdef MREMAP_FIXED
@@ -452,10 +461,8 @@
 	{ 0,			NULL },
 };
 
-
 int
-sys_madvise(tcp)
-struct tcb *tcp;
+sys_madvise(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
@@ -464,7 +471,6 @@
 	return 0;
 }
 
-
 static const struct xlat mlockall_flags[] = {
 #ifdef MCL_CURRENT
 	{ MCL_CURRENT,	"MCL_CURRENT" },
@@ -476,8 +482,7 @@
 };
 
 int
-sys_mlockall(tcp)
-struct tcb *tcp;
+sys_mlockall(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printflags(mlockall_flags, tcp->u_arg[0], "MCL_???");
@@ -485,9 +490,6 @@
 	return 0;
 }
 
-
-#endif /* LINUX */
-
 #ifdef MS_ASYNC
 
 static const struct xlat mctl_sync[] = {
@@ -500,8 +502,7 @@
 };
 
 int
-sys_msync(tcp)
-struct tcb *tcp;
+sys_msync(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		/* addr */
@@ -534,8 +535,7 @@
 };
 
 int
-sys_mctl(tcp)
-struct tcb *tcp;
+sys_mctl(struct tcb *tcp)
 {
 	int arg, function;
 
@@ -549,7 +549,7 @@
 		printflags(mctl_funcs, function, "MC_???");
 		/* arg */
 		arg = tcp->u_arg[3];
-		tprintf(", ");
+		tprints(", ");
 		switch (function) {
 		case MC_SYNC:
 			printflags(mctl_sync, arg, "MS_???");
@@ -568,49 +568,46 @@
 #endif /* MC_SYNC */
 
 int
-sys_mincore(tcp)
-struct tcb *tcp;
+sys_mincore(struct tcb *tcp)
 {
-	unsigned long i, len;
-	char *vec = NULL;
-
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
 	} else {
+		unsigned long i, len;
+		char *vec = NULL;
+
 		len = tcp->u_arg[1];
 		if (syserror(tcp) || tcp->u_arg[2] == 0 ||
 			(vec = malloc(len)) == NULL ||
 			umoven(tcp, tcp->u_arg[2], len, vec) < 0)
 			tprintf("%#lx", tcp->u_arg[2]);
 		else {
-			tprintf("[");
+			tprints("[");
 			for (i = 0; i < len; i++) {
 				if (abbrev(tcp) && i >= max_strlen) {
-					tprintf("...");
+					tprints("...");
 					break;
 				}
-				tprintf((vec[i] & 1) ? "1" : "0");
+				tprints((vec[i] & 1) ? "1" : "0");
 			}
-			tprintf("]");
+			tprints("]");
 		}
-		if (vec)
-			free(vec);
+		free(vec);
 	}
 	return 0;
 }
 
-#if defined(ALPHA) || defined(FREEBSD) || defined(IA64) || defined(SUNOS4) || defined(SVR4) || defined(SPARC) || defined(SPARC64)
+#if defined(ALPHA) || defined(IA64) || defined(SPARC) || defined(SPARC64)
 int
-sys_getpagesize(tcp)
-struct tcb *tcp;
+sys_getpagesize(struct tcb *tcp)
 {
 	if (exiting(tcp))
 		return RVAL_HEX;
 	return 0;
 }
-#endif /* ALPHA || FREEBSD || IA64 || SUNOS4 || SVR4 */
+#endif
 
-#if defined(LINUX) && defined(__i386__)
+#if defined(I386)
 void
 print_ldt_entry(struct modify_ldt_ldt_s *ldt_entry)
 {
@@ -633,20 +630,19 @@
 }
 
 int
-sys_modify_ldt(tcp)
-struct tcb *tcp;
+sys_modify_ldt(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		struct modify_ldt_ldt_s copy;
 		tprintf("%ld", tcp->u_arg[0]);
 		if (tcp->u_arg[1] == 0
-				|| tcp->u_arg[2] != sizeof (struct modify_ldt_ldt_s)
+				|| tcp->u_arg[2] != sizeof(struct modify_ldt_ldt_s)
 				|| umove(tcp, tcp->u_arg[1], &copy) == -1)
 			tprintf(", %lx", tcp->u_arg[1]);
 		else {
 			tprintf(", {entry_number:%d, ", copy.entry_number);
 			if (!verbose(tcp))
-				tprintf("...}");
+				tprints("...}");
 			else {
 				print_ldt_entry(&copy);
 			}
@@ -657,8 +653,7 @@
 }
 
 int
-sys_set_thread_area(tcp)
-struct tcb *tcp;
+sys_set_thread_area(struct tcb *tcp)
 {
 	struct modify_ldt_ldt_s copy;
 	if (entering(tcp)) {
@@ -667,13 +662,13 @@
 				tprintf("{entry_number:%d -> ",
 					copy.entry_number);
 			else
-				tprintf("{entry_number:");
+				tprints("{entry_number:");
 		}
 	} else {
 		if (umove(tcp, tcp->u_arg[0], &copy) != -1) {
 			tprintf("%d, ", copy.entry_number);
 			if (!verbose(tcp))
-				tprintf("...}");
+				tprints("...}");
 			else {
 				print_ldt_entry(&copy);
 			}
@@ -686,15 +681,14 @@
 }
 
 int
-sys_get_thread_area(tcp)
-struct tcb *tcp;
+sys_get_thread_area(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("...}");
+				tprints("...}");
 			else {
 				print_ldt_entry(&copy);
 			}
@@ -705,13 +699,11 @@
 	return 0;
 
 }
-#endif /* LINUX && __i386__ */
+#endif /* I386 */
 
-#if defined(LINUX) && defined(M68K)
-
+#if defined(M68K)
 int
-sys_set_thread_area(tcp)
-struct tcb *tcp;
+sys_set_thread_area(struct tcb *tcp)
 {
 	if (entering(tcp))
 		tprintf("%#lx", tcp->u_arg[0]);
@@ -720,17 +712,14 @@
 }
 
 int
-sys_get_thread_area(tcp)
-struct tcb *tcp;
+sys_get_thread_area(struct tcb *tcp)
 {
 	return RVAL_HEX;
 }
 #endif
 
-#if defined(LINUX)
 int
-sys_remap_file_pages(tcp)
-struct tcb *tcp;
+sys_remap_file_pages(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
@@ -746,7 +735,6 @@
 	return 0;
 }
 
-
 #define MPOL_DEFAULT    0
 #define MPOL_PREFERRED  1
 #define MPOL_BIND       2
@@ -759,7 +747,6 @@
 #define MPOL_MF_MOVE	(1<<1)
 #define MPOL_MF_MOVE_ALL (1<<2)
 
-
 static const struct xlat policies[] = {
 	{ MPOL_DEFAULT,		"MPOL_DEFAULT"		},
 	{ MPOL_PREFERRED,	"MPOL_PREFERRED"	},
@@ -787,13 +774,8 @@
 	{ 0,			NULL			}
 };
 
-
 static void
-get_nodes(tcp, ptr, maxnodes, err)
-struct tcb *tcp;
-unsigned long ptr;
-unsigned long maxnodes;
-int err;
+get_nodes(struct tcb *tcp, unsigned long ptr, unsigned long maxnodes, int err)
 {
 	unsigned long nlongs, size, end;
 
@@ -812,22 +794,22 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf(", {");
+		tprints(", {");
 		for (cur = ptr; cur < end; cur += sizeof(long)) {
 			if (cur > ptr)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof(n), (char *) &n) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
 			tprintf("%#0*lx", (int) sizeof(long) * 2 + 2, n);
 		}
-		tprintf("}");
+		tprints("}");
 		if (failed)
 			tprintf(" %#lx", ptr);
 	} else
@@ -836,22 +818,20 @@
 }
 
 int
-sys_mbind(tcp)
-struct tcb *tcp;
+sys_mbind(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
 		printxval(policies, tcp->u_arg[2], "MPOL_???");
 		get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[4], 0);
-		tprintf(", ");
+		tprints(", ");
 		printflags(mbindflags, tcp->u_arg[5], "MPOL_???");
 	}
 	return 0;
 }
 
 int
-sys_set_mempolicy(tcp)
-struct tcb *tcp;
+sys_set_mempolicy(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(policies, tcp->u_arg[0], "MPOL_???");
@@ -861,13 +841,12 @@
 }
 
 int
-sys_get_mempolicy(tcp)
-struct tcb *tcp;
+sys_get_mempolicy(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		int pol;
 		if (tcp->u_arg[0] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp) || umove(tcp, tcp->u_arg[0], &pol) < 0)
 			tprintf("%#lx", tcp->u_arg[0]);
 		else
@@ -880,82 +859,91 @@
 }
 
 int
-sys_move_pages(tcp)
-struct tcb *tcp;
+sys_migrate_pages(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]);
+		get_nodes(tcp, tcp->u_arg[2], tcp->u_arg[1], 0);
+		tprints(", ");
+		get_nodes(tcp, tcp->u_arg[3], tcp->u_arg[1], 0);
+	}
+	return 0;
+}
+
+int
+sys_move_pages(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		unsigned long npages = tcp->u_arg[1];
 		tprintf("%ld, %lu, ", tcp->u_arg[0], npages);
 		if (tcp->u_arg[2] == 0)
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else {
 			int i;
 			long puser = tcp->u_arg[2];
-			tprintf("{");
+			tprints("{");
 			for (i = 0; i < npages; ++i) {
 				void *p;
 				if (i > 0)
-					tprintf(", ");
+					tprints(", ");
 				if (umove(tcp, puser, &p) < 0) {
-					tprintf("???");
+					tprints("???");
 					break;
 				}
 				tprintf("%p", p);
-				puser += sizeof (void *);
+				puser += sizeof(void *);
 			}
-			tprintf("}, ");
+			tprints("}, ");
 		}
 		if (tcp->u_arg[3] == 0)
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else {
 			int i;
 			long nodeuser = tcp->u_arg[3];
-			tprintf("{");
+			tprints("{");
 			for (i = 0; i < npages; ++i) {
 				int node;
 				if (i > 0)
-					tprintf(", ");
+					tprints(", ");
 				if (umove(tcp, nodeuser, &node) < 0) {
-					tprintf("???");
+					tprints("???");
 					break;
 				}
 				tprintf("%#x", node);
-				nodeuser += sizeof (int);
+				nodeuser += sizeof(int);
 			}
-			tprintf("}, ");
+			tprints("}, ");
 		}
 	}
 	if (exiting(tcp)) {
 		unsigned long npages = tcp->u_arg[1];
 		if (tcp->u_arg[4] == 0)
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else {
 			int i;
 			long statususer = tcp->u_arg[4];
-			tprintf("{");
+			tprints("{");
 			for (i = 0; i < npages; ++i) {
 				int status;
 				if (i > 0)
-					tprintf(", ");
+					tprints(", ");
 				if (umove(tcp, statususer, &status) < 0) {
-					tprintf("???");
+					tprints("???");
 					break;
 				}
 				tprintf("%#x", status);
-				statususer += sizeof (int);
+				statususer += sizeof(int);
 			}
-			tprintf("}, ");
+			tprints("}, ");
 		}
 		printflags(move_pages_flags, tcp->u_arg[5], "MPOL_???");
 	}
 	return 0;
 }
-#endif
 
-#if defined(LINUX) && defined(POWERPC)
+#if defined(POWERPC)
 int
-sys_subpage_prot(tcp)
-struct tcb *tcp;
+sys_subpage_prot(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		unsigned long cur, end, abbrev_end, entries;
@@ -964,7 +952,7 @@
 		tprintf("%#lx, %#lx, ", tcp->u_arg[0], tcp->u_arg[1]);
 		entries = tcp->u_arg[1] >> 16;
 		if (!entries || !tcp->u_arg[2]) {
-			tprintf("{}");
+			tprints("{}");
 			return 0;
 		}
 		cur = tcp->u_arg[2];
@@ -980,12 +968,12 @@
 		}
 		else
 			abbrev_end = end;
-		tprintf("{");
+		tprints("{");
 		for (; cur < end; cur += sizeof(int)) {
 			if (cur > tcp->u_arg[2])
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umove(tcp, cur, &entry) < 0) {
@@ -995,7 +983,7 @@
 			else
 				tprintf("%#08x", entry);
 		}
-		tprintf("}");
+		tprints("}");
 	}
 
 	return 0;
diff --git a/mtd.c b/mtd.c
new file mode 100644
index 0000000..976024e
--- /dev/null
+++ b/mtd.c
@@ -0,0 +1,282 @@
+/*
+ * Copyright (c) 2012 Mike Frysinger <vapier@gentoo.org>
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "defs.h"
+
+#include <sys/ioctl.h>
+
+/* The mtd api changes quickly, so we have to keep a local copy */
+#include <linux/version.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
+# include "mtd-abi.h"
+#else
+# include <mtd/mtd-abi.h>
+#endif
+
+static const struct xlat mtd_mode_options[] = {
+	{ MTD_OPS_PLACE_OOB,	"MTD_OPS_PLACE_OOB"	},
+	{ MTD_OPS_AUTO_OOB,	"MTD_OPS_AUTO_OOB"	},
+	{ MTD_OPS_RAW,		"MTD_OPS_RAW"		},
+	{ 0,			NULL			},
+};
+
+static const struct xlat mtd_type_options[] = {
+	{ MTD_ABSENT,		"MTD_ABSENT"		},
+	{ MTD_RAM,		"MTD_RAM"		},
+	{ MTD_ROM,		"MTD_ROM"		},
+	{ MTD_NORFLASH,		"MTD_NORFLASH"		},
+	{ MTD_NANDFLASH,	"MTD_NANDFLASH"		},
+	{ MTD_DATAFLASH,	"MTD_DATAFLASH"		},
+	{ MTD_UBIVOLUME,	"MTD_UBIVOLUME"		},
+	{ MTD_MLCNANDFLASH,	"MTD_MLCNANDFLASH"	},
+	{ 0,			NULL			},
+};
+
+static const struct xlat mtd_flags_options[] = {
+	{ MTD_WRITEABLE,	"MTD_WRITEABLE"		},
+	{ MTD_BIT_WRITEABLE,	"MTD_BIT_WRITEABLE"	},
+	{ MTD_NO_ERASE,		"MTD_NO_ERASE"		},
+	{ MTD_POWERUP_LOCK,	"MTD_POWERUP_LOCK"	},
+	{ 0,			NULL			},
+};
+
+static const struct xlat mtd_otp_options[] = {
+	{ MTD_OTP_OFF,		"MTD_OTP_OFF"		},
+	{ MTD_OTP_FACTORY,	"MTD_OTP_FACTORY"	},
+	{ MTD_OTP_USER,		"MTD_OTP_USER"		},
+	{ 0,			NULL			},
+};
+
+static const struct xlat mtd_nandecc_options[] = {
+	{ MTD_NANDECC_OFF,		"MTD_NANDECC_OFF"		},
+	{ MTD_NANDECC_PLACE,		"MTD_NANDECC_PLACE"		},
+	{ MTD_NANDECC_AUTOPLACE,	"MTD_NANDECC_AUTOPLACE"		},
+	{ MTD_NANDECC_PLACEONLY,	"MTD_NANDECC_PLACEONLY"		},
+	{ MTD_NANDECC_AUTOPL_USR,	"MTD_NANDECC_AUTOPL_USR"	},
+	{ 0,				NULL				},
+};
+
+int mtd_ioctl(struct tcb *tcp, long code, long arg)
+{
+	struct mtd_info_user minfo;
+	struct erase_info_user einfo;
+	struct erase_info_user64 einfo64;
+	struct mtd_oob_buf mbuf;
+	struct mtd_oob_buf64 mbuf64;
+	struct region_info_user rinfo;
+	struct otp_info oinfo;
+	struct mtd_ecc_stats estat;
+	struct mtd_write_req mreq;
+	struct nand_oobinfo ninfo;
+	struct nand_ecclayout_user nlay;
+	int i, j;
+
+	if (entering(tcp))
+		return 0;
+
+	switch (code) {
+
+	case MEMGETINFO:
+		if (!verbose(tcp) || umove(tcp, arg, &minfo) < 0)
+			return 0;
+
+		tprints(", {type=");
+		printxval(mtd_type_options, minfo.type, "MTD_???");
+		tprints(", flags=");
+		printflags(mtd_flags_options, minfo.flags, "MTD_???");
+		tprintf(", size=%#" PRIx32 ", erasesize=%#" PRIx32,
+			minfo.size, minfo.erasesize);
+		tprintf(", writesize=%#" PRIx32 ", oobsize=%#" PRIx32,
+			minfo.writesize, minfo.oobsize);
+		tprintf(", padding=%#" PRIx64 "}",
+			(uint64_t) minfo.padding);
+		return 1;
+
+	case MEMERASE:
+	case MEMLOCK:
+	case MEMUNLOCK:
+	case MEMISLOCKED:
+		if (!verbose(tcp) || umove(tcp, arg, &einfo) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 "}",
+			einfo.start, einfo.length);
+		return 1;
+
+	case MEMERASE64:
+		if (!verbose(tcp) || umove(tcp, arg, &einfo64) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx64 ", length=%#" PRIx64 "}",
+			(uint64_t) einfo64.start, (uint64_t) einfo64.length);
+		return 1;
+
+	case MEMWRITEOOB:
+	case MEMREADOOB:
+		if (!verbose(tcp) || umove(tcp, arg, &mbuf) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 ", ptr=...}",
+			mbuf.start, mbuf.length);
+		return 1;
+
+	case MEMWRITEOOB64:
+	case MEMREADOOB64:
+		if (!verbose(tcp) || umove(tcp, arg, &mbuf64) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx64 ", length=%#" PRIx64 ", ptr=...}",
+			(uint64_t) mbuf64.start, (uint64_t) mbuf64.length);
+		return 1;
+
+	case MEMGETREGIONINFO:
+		if (!verbose(tcp) || umove(tcp, arg, &rinfo) < 0)
+			return 0;
+
+		tprintf(", {offset=%#" PRIx32 ", erasesize=%#" PRIx32,
+			rinfo.offset, rinfo.erasesize);
+		tprintf(", numblocks=%#" PRIx32 ", regionindex=%#" PRIx32 "}",
+			rinfo.numblocks, rinfo.regionindex);
+		return 1;
+
+	case MEMGETOOBSEL:
+		if (!verbose(tcp) || umove(tcp, arg, &ninfo) < 0)
+			return 0;
+
+		tprints(", {useecc=");
+		printxval(mtd_nandecc_options, ninfo.useecc, "MTD_NANDECC_???");
+		tprintf(", eccbytes=%#" PRIx32, ninfo.eccbytes);
+
+		tprints(", oobfree={");
+		for (i = 0; i < ARRAY_SIZE(ninfo.oobfree); ++i) {
+			if (i)
+				tprints("}, ");
+			tprints("{");
+			for (j = 0; j < ARRAY_SIZE(ninfo.oobfree[0]); ++j) {
+				if (j)
+					tprints(", ");
+				tprintf("%#" PRIx32, ninfo.oobfree[i][j]);
+			}
+		}
+
+		tprints("}}, eccpos={");
+		for (i = 0; i < ARRAY_SIZE(ninfo.eccpos); ++i) {
+			if (i)
+				tprints(", ");
+			tprintf("%#" PRIx32, ninfo.eccpos[i]);
+		}
+
+		tprints("}");
+		return 1;
+
+	case OTPGETREGIONINFO:
+	case OTPLOCK:
+		if (!verbose(tcp) || umove(tcp, arg, &oinfo) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx32 ", length=%#" PRIx32 ", locked=%" PRIu32 "}",
+			oinfo.start, oinfo.length, oinfo.locked);
+		return 1;
+
+	case ECCGETLAYOUT:
+		if (!verbose(tcp) || umove(tcp, arg, &nlay) < 0)
+			return 0;
+
+		tprintf(", {eccbytes=%#" PRIx32 ", eccpos={", nlay.eccbytes);
+		for (i = 0; i < ARRAY_SIZE(nlay.eccpos); ++i) {
+			if (i)
+				tprints(", ");
+			tprintf("%#" PRIx32, nlay.eccpos[i]);
+		}
+		tprintf("}, oobavail=%#" PRIx32 ", oobfree={", nlay.oobavail);
+		for (i = 0; i < ARRAY_SIZE(nlay.oobfree); ++i) {
+			if (i)
+				tprints(", ");
+			tprintf("{offset=%#" PRIx32 ", length=%#" PRIx32 "}",
+				nlay.oobfree[i].offset, nlay.oobfree[i].length);
+		}
+		tprints("}");
+		return 1;
+
+	case ECCGETSTATS:
+		if (!verbose(tcp) || umove(tcp, arg, &estat) < 0)
+			return 0;
+
+		tprintf(", {corrected=%#" PRIx32 ", failed=%#" PRIx32,
+			estat.corrected, estat.failed);
+		tprintf(", badblocks=%#" PRIx32 ", bbtblocks=%#" PRIx32 "}",
+			estat.badblocks, estat.bbtblocks);
+		return 1;
+
+	case MEMWRITE:
+		if (!verbose(tcp) || umove(tcp, arg, &mreq) < 0)
+			return 0;
+
+		tprintf(", {start=%#" PRIx64 ", len=%#" PRIx64,
+			(uint64_t) mreq.start, (uint64_t) mreq.len);
+		tprintf(", ooblen=%#" PRIx64 ", usr_data=%#" PRIx64,
+			(uint64_t) mreq.ooblen, (uint64_t) mreq.usr_data);
+		tprintf(", usr_oob=%#" PRIx64 ", mode=",
+			(uint64_t) mreq.usr_oob);
+		printxval(mtd_mode_options, mreq.mode, "MTD_OPS_???");
+		tprints(", padding=...}");
+		return 1;
+
+	case OTPSELECT:
+		if (!verbose(tcp) || umove(tcp, arg, &i) < 0)
+			return 0;
+
+		tprints(", [");
+		printxval(mtd_otp_options, i, "MTD_OTP_???");
+		tprints("]");
+		return 1;
+
+	case MEMGETBADBLOCK:
+	case MEMSETBADBLOCK:
+		if (!verbose(tcp))
+			return 0;
+
+		tprints(", ");
+		print_loff_t(tcp, arg);
+		return 1;
+
+	case OTPGETREGIONCOUNT:
+		if (!verbose(tcp) || umove(tcp, arg, &i) < 0)
+			return 0;
+
+		tprintf(", [%i]", i);
+		return 1;
+
+	case MTDFILEMODE:
+		/* XXX: process return value as enum mtd_file_modes */
+
+	case MEMGETREGIONCOUNT:
+		/* These ones take simple args, so let default printer handle it */
+
+	default:
+		return 0;
+	}
+}
diff --git a/net.c b/net.c
index a46cf06..2911c73 100644
--- a/net.c
+++ b/net.c
@@ -26,90 +26,74 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/un.h>
-
 #if defined(HAVE_SIN6_SCOPE_ID_LINUX)
-#define in6_addr in6_addr_libc
-#define ipv6_mreq ipv6_mreq_libc
-#define sockaddr_in6 sockaddr_in6_libc
+# define in6_addr in6_addr_libc
+# define ipv6_mreq ipv6_mreq_libc
+# define sockaddr_in6 sockaddr_in6_libc
 #endif
-
 #include <netinet/in.h>
 #ifdef HAVE_NETINET_TCP_H
-#include <netinet/tcp.h>
+# include <netinet/tcp.h>
 #endif
 #ifdef HAVE_NETINET_UDP_H
-#include <netinet/udp.h>
+# include <netinet/udp.h>
 #endif
 #ifdef HAVE_NETINET_SCTP_H
-#include <netinet/sctp.h>
+# include <netinet/sctp.h>
 #endif
 #include <arpa/inet.h>
 #include <net/if.h>
-#if defined(LINUX)
 #include <asm/types.h>
 #if defined(__GLIBC__) && (__GLIBC__ >= 2) && (__GLIBC__ + __GLIBC_MINOR__ >= 3)
-#  include <netipx/ipx.h>
+# include <netipx/ipx.h>
 #else
-#  include <linux/ipx.h>
+# include <linux/ipx.h>
 #endif
-#endif /* LINUX */
 
-#if defined (__GLIBC__) && (((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) || defined(HAVE_SIN6_SCOPE_ID_LINUX))
-#if defined(HAVE_LINUX_IN6_H)
-#if defined(HAVE_SIN6_SCOPE_ID_LINUX)
-#undef in6_addr
-#undef ipv6_mreq
-#undef sockaddr_in6
-#define in6_addr in6_addr_kernel
-#define ipv6_mreq ipv6_mreq_kernel
-#define sockaddr_in6 sockaddr_in6_kernel
-#endif
-#include <linux/in6.h>
-#if defined(HAVE_SIN6_SCOPE_ID_LINUX)
-#undef in6_addr
-#undef ipv6_mreq
-#undef sockaddr_in6
-#define in6_addr in6_addr_libc
-#define ipv6_mreq ipv6_mreq_libc
-#define sockaddr_in6 sockaddr_in6_kernel
-#endif
-#endif
+#if defined(__GLIBC__) && (((__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)) || defined(HAVE_SIN6_SCOPE_ID_LINUX))
+# if defined(HAVE_LINUX_IN6_H)
+#  if defined(HAVE_SIN6_SCOPE_ID_LINUX)
+#   undef in6_addr
+#   undef ipv6_mreq
+#   undef sockaddr_in6
+#   define in6_addr in6_addr_kernel
+#   define ipv6_mreq ipv6_mreq_kernel
+#   define sockaddr_in6 sockaddr_in6_kernel
+#  endif
+#  include <linux/in6.h>
+#  if defined(HAVE_SIN6_SCOPE_ID_LINUX)
+#   undef in6_addr
+#   undef ipv6_mreq
+#   undef sockaddr_in6
+#   define in6_addr in6_addr_libc
+#   define ipv6_mreq ipv6_mreq_libc
+#   define sockaddr_in6 sockaddr_in6_kernel
+#  endif
+# endif
 #endif
 
 #if defined(HAVE_SYS_UIO_H)
-#include <sys/uio.h>
+# include <sys/uio.h>
 #endif
-
 #if defined(HAVE_LINUX_NETLINK_H)
-#include <linux/netlink.h>
+# include <linux/netlink.h>
 #endif
-
 #if defined(HAVE_LINUX_IF_PACKET_H)
-#include <linux/if_packet.h>
+# include <linux/if_packet.h>
 #endif
-
 #if defined(HAVE_LINUX_ICMP_H)
-#include <linux/icmp.h>
+# include <linux/icmp.h>
 #endif
-
 #ifndef PF_UNSPEC
-#define PF_UNSPEC AF_UNSPEC
+# define PF_UNSPEC AF_UNSPEC
 #endif
 
-#if UNIXWARE >= 7
-#define HAVE_SENDMSG		1		/* HACK - *FIXME* */
-#endif
-
-#ifdef LINUX
 /* Under Linux these are enums so we can't test for them with ifdef. */
 #define IPPROTO_EGP IPPROTO_EGP
 #define IPPROTO_PUP IPPROTO_PUP
@@ -117,7 +101,6 @@
 #define IPPROTO_IGMP IPPROTO_IGMP
 #define IPPROTO_RAW IPPROTO_RAW
 #define IPPROTO_MAX IPPROTO_MAX
-#endif
 
 static const struct xlat domains[] = {
 #ifdef PF_AAL5
@@ -595,6 +578,9 @@
 #ifdef MSG_MORE
 	{ MSG_MORE,		"MSG_MORE"		},
 #endif
+#ifdef MSG_WAITFORONE
+	{ MSG_WAITFORONE,	"MSG_WAITFORONE"	},
+#endif
 #ifdef MSG_CMSG_CLOEXEC
 	{ MSG_CMSG_CLOEXEC,	"MSG_CMSG_CLOEXEC"	},
 #endif
@@ -731,7 +717,7 @@
 	{ 0,		NULL		},
 };
 
-#if !defined (SOL_IP) && defined (IPPROTO_IP)
+#if !defined(SOL_IP) && defined(IPPROTO_IP)
 #define SOL_IP IPPROTO_IP
 #endif
 
@@ -893,8 +879,8 @@
 
 #ifdef SOL_IPX
 static const struct xlat sockipxoptions[] = {
-	{ IPX_TYPE,     "IPX_TYPE"      },
-	{ 0,            NULL            },
+	{ IPX_TYPE,	"IPX_TYPE"	},
+	{ 0,		NULL		},
 };
 #endif /* SOL_IPX */
 
@@ -1078,7 +1064,7 @@
 };
 #endif
 
-#if  !defined (SOL_TCP) && defined (IPPROTO_TCP)
+#if !defined(SOL_TCP) && defined(IPPROTO_TCP)
 #define SOL_TCP IPPROTO_TCP
 #endif
 
@@ -1119,6 +1105,24 @@
 #if defined(TCP_QUICKACK)
 	{ TCP_QUICKACK,		"TCP_QUICKACK" },
 #endif
+#if defined(TCP_CONGESTION)
+	{ TCP_CONGESTION,	"TCP_CONGESTION" },
+#endif
+#if defined(TCP_MD5SIG)
+	{ TCP_MD5SIG,		"TCP_MD5SIG" },
+#endif
+#if defined(TCP_COOKIE_TRANSACTIONS)
+	{ TCP_COOKIE_TRANSACTIONS,	"TCP_COOKIE_TRANSACTIONS" },
+#endif
+#if defined(TCP_THIN_LINEAR_TIMEOUTS)
+	{ TCP_THIN_LINEAR_TIMEOUTS,	"TCP_THIN_LINEAR_TIMEOUTS" },
+#endif
+#if defined(TCP_THIN_DUPACK)
+	{ TCP_THIN_DUPACK,	"TCP_THIN_DUPACK" },
+#endif
+#if defined(TCP_USER_TIMEOUT)
+	{ TCP_USER_TIMEOUT,	"TCP_USER_TIMEOUT" },
+#endif
 	{ 0,			NULL		},
 };
 #endif /* SOL_TCP */
@@ -1195,7 +1199,6 @@
 };
 #endif /* defined(AF_PACKET) */
 
-
 void
 printsock(struct tcb *tcp, long addr, int addrlen)
 {
@@ -1207,7 +1210,7 @@
 #ifdef HAVE_INET_NTOP
 		struct sockaddr_in6 sa6;
 #endif
-#if defined(LINUX) && defined(AF_IPX)
+#if defined(AF_IPX)
 		struct sockaddr_ipx sipx;
 #endif
 #ifdef AF_PACKET
@@ -1220,7 +1223,7 @@
 	char string_addr[100];
 
 	if (addr == 0) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (!verbose(tcp)) {
@@ -1233,24 +1236,24 @@
 
 	memset(&addrbuf, 0, sizeof(addrbuf));
 	if (umoven(tcp, addr, addrlen, addrbuf.pad) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 	addrbuf.pad[sizeof(addrbuf.pad) - 1] = '\0';
 
-	tprintf("{sa_family=");
+	tprints("{sa_family=");
 	printxval(addrfams, addrbuf.sa.sa_family, "AF_???");
-	tprintf(", ");
+	tprints(", ");
 
 	switch (addrbuf.sa.sa_family) {
 	case AF_UNIX:
 		if (addrlen == 2) {
-			tprintf("NULL");
+			tprints("NULL");
 		} else if (addrbuf.sau.sun_path[0]) {
-			tprintf("path=");
+			tprints("sun_path=");
 			printpathn(tcp, addr + 2, strlen(addrbuf.sau.sun_path));
 		} else {
-			tprintf("path=@");
+			tprints("sun_path=@");
 			printpathn(tcp, addr + 3, strlen(addrbuf.sau.sun_path + 1));
 		}
 		break;
@@ -1267,26 +1270,26 @@
 #ifdef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
 		{
 #if defined(HAVE_IF_INDEXTONAME) && defined(IN6_IS_ADDR_LINKLOCAL) && defined(IN6_IS_ADDR_MC_LINKLOCAL)
-		    int numericscope = 0;
-		    if (IN6_IS_ADDR_LINKLOCAL (&addrbuf.sa6.sin6_addr)
-			    || IN6_IS_ADDR_MC_LINKLOCAL (&addrbuf.sa6.sin6_addr)) {
-			char scopebuf[IFNAMSIZ + 1];
+			int numericscope = 0;
+			if (IN6_IS_ADDR_LINKLOCAL(&addrbuf.sa6.sin6_addr)
+			    || IN6_IS_ADDR_MC_LINKLOCAL(&addrbuf.sa6.sin6_addr)) {
+				char scopebuf[IFNAMSIZ + 1];
 
-			if (if_indextoname (addrbuf.sa6.sin6_scope_id, scopebuf) == NULL)
-			    numericscope++;
-			else
-			    tprintf(", sin6_scope_id=if_nametoindex(\"%s\")", scopebuf);
-		    } else
-			numericscope++;
+				if (if_indextoname(addrbuf.sa6.sin6_scope_id, scopebuf) == NULL)
+					numericscope++;
+				else
+					tprintf(", sin6_scope_id=if_nametoindex(\"%s\")", scopebuf);
+			} else
+				numericscope++;
 
-		    if (numericscope)
+			if (numericscope)
 #endif
-			tprintf(", sin6_scope_id=%u", addrbuf.sa6.sin6_scope_id);
+				tprintf(", sin6_scope_id=%u", addrbuf.sa6.sin6_scope_id);
 		}
 #endif
-		    break;
+		break;
 #endif
-#if defined(AF_IPX) && defined(linux)
+#if defined(AF_IPX)
 	case AF_IPX:
 		{
 			int i;
@@ -1299,12 +1302,12 @@
 			 * this way.. :)
 			 */
 			tprintf("%08lx:", (unsigned long)ntohl(addrbuf.sipx.sipx_network));
-			for (i = 0; i<IPX_NODE_LEN; i++)
+			for (i = 0; i < IPX_NODE_LEN; i++)
 				tprintf("%02x", addrbuf.sipx.sipx_node[i]);
 			tprintf("/[%02x]", addrbuf.sipx.sipx_type);
 		}
 		break;
-#endif /* AF_IPX && linux */
+#endif /* AF_IPX */
 #ifdef AF_PACKET
 	case AF_PACKET:
 		{
@@ -1316,12 +1319,12 @@
 			tprintf(", addr(%d)={%d, ",
 					addrbuf.ll.sll_halen,
 					addrbuf.ll.sll_hatype);
-			for (i=0; i<addrbuf.ll.sll_halen; i++)
+			for (i = 0; i < addrbuf.ll.sll_halen; i++)
 				tprintf("%02x", addrbuf.ll.sll_addr[i]);
 		}
 		break;
 
-#endif /* AF_APACKET */
+#endif /* AF_PACKET */
 #ifdef AF_NETLINK
 	case AF_NETLINK:
 		tprintf("pid=%d, groups=%08x", addrbuf.nl.nl_pid, addrbuf.nl.nl_groups);
@@ -1331,12 +1334,12 @@
 	AF_X25 AF_ROSE etc. still need to be done */
 
 	default:
-		tprintf("sa_data=");
+		tprints("sa_data=");
 		printstr(tcp, (long) &((struct sockaddr *) addr)->sa_data,
 			sizeof addrbuf.sa.sa_data);
 		break;
 	}
-	tprintf("}");
+	tprints("}");
 }
 
 #if HAVE_SENDMSG
@@ -1363,7 +1366,7 @@
 
 	tprintf(", {cmsg_len=%u, cmsg_level=", (unsigned) cmsg->cmsg_len);
 	printxval(socketlayers, cmsg->cmsg_level, "SOL_???");
-	tprintf(", cmsg_type=");
+	tprints(", cmsg_type=");
 
 	if (cmsg->cmsg_level == SOL_SOCKET) {
 		unsigned long cmsg_len;
@@ -1373,23 +1376,23 @@
 
 		if (cmsg->cmsg_type == SCM_RIGHTS
 		    && CMSG_LEN(sizeof(int)) <= cmsg_len) {
-			int *fds = (int *) CMSG_DATA (cmsg);
+			int *fds = (int *) CMSG_DATA(cmsg);
 			int first = 1;
 
-			tprintf(", {");
+			tprints(", {");
 			while ((char *) fds < ((char *) cmsg + cmsg_len)) {
 				if (!first)
-					tprintf(", ");
+					tprints(", ");
 				tprintf("%d", *fds++);
 				first = 0;
 			}
-			tprintf("}}");
+			tprints("}}");
 			free(cmsg);
 			return;
 		}
 		if (cmsg->cmsg_type == SCM_CREDENTIALS
 		    && CMSG_LEN(sizeof(struct ucred)) <= cmsg_len) {
-			struct ucred *uc = (struct ucred *) CMSG_DATA (cmsg);
+			struct ucred *uc = (struct ucred *) CMSG_DATA(cmsg);
 
 			tprintf("{pid=%ld, uid=%ld, gid=%ld}}",
 				(long)uc->pid, (long)uc->uid, (long)uc->gid);
@@ -1398,37 +1401,35 @@
 		}
 	}
 	free(cmsg);
-	tprintf(", ...}");
+	tprints(", ...}");
 }
 
 static void
-do_msghdr(struct tcb *tcp, struct msghdr *msg)
+do_msghdr(struct tcb *tcp, struct msghdr *msg, unsigned long data_size)
 {
 	tprintf("{msg_name(%d)=", msg->msg_namelen);
 	printsock(tcp, (long)msg->msg_name, msg->msg_namelen);
 
 	tprintf(", msg_iov(%lu)=", (unsigned long)msg->msg_iovlen);
-	tprint_iov(tcp, (unsigned long)msg->msg_iovlen,
-		   (unsigned long)msg->msg_iov);
+	tprint_iov_upto(tcp, (unsigned long)msg->msg_iovlen,
+		   (unsigned long)msg->msg_iov, 1, data_size);
 
 #ifdef HAVE_STRUCT_MSGHDR_MSG_CONTROL
 	tprintf(", msg_controllen=%lu", (unsigned long)msg->msg_controllen);
 	if (msg->msg_controllen)
 		printcmsghdr(tcp, (unsigned long) msg->msg_control,
 			     msg->msg_controllen);
-	tprintf(", msg_flags=");
+	tprints(", msg_flags=");
 	printflags(msg_flags, msg->msg_flags, "MSG_???");
 #else /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
 	tprintf("msg_accrights=%#lx, msg_accrightslen=%u",
 		(unsigned long) msg->msg_accrights, msg->msg_accrightslen);
 #endif /* !HAVE_STRUCT_MSGHDR_MSG_CONTROL */
-	tprintf("}");
+	tprints("}");
 }
 
 static void
-printmsghdr(tcp, addr)
-struct tcb *tcp;
-long addr;
+printmsghdr(struct tcb *tcp, long addr, unsigned long data_size)
 {
 	struct msghdr msg;
 
@@ -1436,27 +1437,50 @@
 		tprintf("%#lx", addr);
 		return;
 	}
-	do_msghdr(tcp, &msg);
+	do_msghdr(tcp, &msg, data_size);
 }
 
-#ifdef LINUX
 static void
-printmmsghdr(struct tcb *tcp, long addr)
+printmmsghdr(struct tcb *tcp, long addr, unsigned int idx, unsigned long msg_len)
 {
 	struct mmsghdr {
 		struct msghdr msg_hdr;
 		unsigned msg_len;
 	} mmsg;
 
+	addr += sizeof(mmsg) * idx;
 	if (umove(tcp, addr, &mmsg) < 0) {
 		tprintf("%#lx", addr);
 		return;
 	}
-	tprintf("{");
-	do_msghdr(tcp, &mmsg.msg_hdr);
+	tprints("{");
+	do_msghdr(tcp, &mmsg.msg_hdr, msg_len ? msg_len : mmsg.msg_len);
 	tprintf(", %u}", mmsg.msg_len);
 }
-#endif
+
+static void
+decode_mmsg(struct tcb *tcp, unsigned long msg_len)
+{
+	/* mmsgvec */
+	if (syserror(tcp)) {
+		tprintf("%#lx", tcp->u_arg[1]);
+	} else {
+		unsigned int len = tcp->u_rval;
+		unsigned int i;
+
+		tprints("{");
+		for (i = 0; i < len; ++i) {
+			if (i)
+				tprints(", ");
+			printmmsghdr(tcp, tcp->u_arg[1], i, msg_len);
+		}
+		tprints("}");
+	}
+	/* vlen */
+	tprintf(", %u, ", (unsigned int) tcp->u_arg[2]);
+	/* flags */
+	printflags(msg_flags, tcp->u_arg[3], "MSG_???");
+}
 
 #endif /* HAVE_SENDMSG */
 
@@ -1469,13 +1493,12 @@
 {
 	const char *str = xlookup(socktypes, flags & SOCK_TYPE_MASK);
 
-	if (str)
-	{
-		tprintf("%s", str);
+	if (str) {
+		tprints(str);
 		flags &= ~SOCK_TYPE_MASK;
 		if (!flags)
 			return;
-		tprintf("|");
+		tprints("|");
 	}
 	printflags(sock_type_flags, flags, "SOCK_???");
 }
@@ -1485,9 +1508,9 @@
 {
 	if (entering(tcp)) {
 		printxval(domains, tcp->u_arg[0], "PF_???");
-		tprintf(", ");
+		tprints(", ");
 		tprint_sock_type(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		switch (tcp->u_arg[0]) {
 		case PF_INET:
 #ifdef PF_INET6
@@ -1498,9 +1521,9 @@
 #ifdef PF_IPX
 		case PF_IPX:
 			/* BTW: I don't believe this.. */
-			tprintf("[");
+			tprints("[");
 			printxval(domains, tcp->u_arg[2], "PF_???");
-			tprintf("]");
+			tprints("]");
 			break;
 #endif /* PF_IPX */
 		default:
@@ -1511,38 +1534,8 @@
 	return 0;
 }
 
-#ifdef SVR4
 int
-sys_so_socket(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		/* not sure really what these args are... but this
-		 * is how truss prints it
-		 */
-		tprintf("%ld, %ld, %ld, ",
-		  tcp->u_arg[0], tcp->u_arg[1], tcp->u_arg[2]);
-		printpath(tcp, tcp->u_arg[3]);
-		tprintf(", %ld", tcp->u_arg[4]);
-	}
-	return 0;
-}
-
-int
-sys_so_socketpair(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		/* not sure what this arg is */
-		tprintf("0x%lx", tcp->u_arg[0]);
-	}
-	return 0;
-}
-#endif /* SVR4 */
-
-int
-sys_bind(tcp)
-struct tcb *tcp;
+sys_bind(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1553,15 +1546,13 @@
 }
 
 int
-sys_connect(tcp)
-struct tcb *tcp;
+sys_connect(struct tcb *tcp)
 {
 	return sys_bind(tcp);
 }
 
 int
-sys_listen(tcp)
-struct tcb *tcp;
+sys_listen(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, %lu", tcp->u_arg[0], tcp->u_arg[1]);
@@ -1581,16 +1572,16 @@
 	else {
 		int len;
 		if (tcp->u_arg[1] == 0 || syserror(tcp)
-		    || umove (tcp, tcp->u_arg[2], &len) < 0) {
+		    || umove(tcp, tcp->u_arg[2], &len) < 0) {
 			tprintf("%#lx", tcp->u_arg[1]);
 		} else {
 			printsock(tcp, tcp->u_arg[1], len);
 		}
-		tprintf(", ");
+		tprints(", ");
 		printnum_int(tcp, tcp->u_arg[2], "%u");
 	}
 	if (flags_arg >= 0) {
-		tprintf(", ");
+		tprints(", ");
 		printflags(sock_type_flags, tcp->u_arg[flags_arg],
 			   "SOCK_???");
 	}
@@ -1603,17 +1594,14 @@
 	return do_accept(tcp, -1);
 }
 
-#ifdef LINUX
 int
 sys_accept4(struct tcb *tcp)
 {
 	return do_accept(tcp, 3);
 }
-#endif
 
 int
-sys_send(tcp)
-struct tcb *tcp;
+sys_send(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1626,8 +1614,7 @@
 }
 
 int
-sys_sendto(tcp)
-struct tcb *tcp;
+sys_sendto(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1636,7 +1623,7 @@
 		/* flags */
 		printflags(msg_flags, tcp->u_arg[3], "MSG_???");
 		/* to address */
-		tprintf(", ");
+		tprints(", ");
 		printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
 		/* to length */
 		tprintf(", %lu", tcp->u_arg[5]);
@@ -1647,24 +1634,40 @@
 #ifdef HAVE_SENDMSG
 
 int
-sys_sendmsg(tcp)
-struct tcb *tcp;
+sys_sendmsg(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
-		printmsghdr(tcp, tcp->u_arg[1]);
+		printmsghdr(tcp, tcp->u_arg[1], (unsigned long) -1L);
 		/* flags */
-		tprintf(", ");
+		tprints(", ");
 		printflags(msg_flags, tcp->u_arg[2], "MSG_???");
 	}
 	return 0;
 }
 
+int
+sys_sendmmsg(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* sockfd */
+		tprintf("%d, ", (int) tcp->u_arg[0]);
+		if (!verbose(tcp)) {
+			tprintf("%#lx, %u, ",
+				tcp->u_arg[1], (unsigned int) tcp->u_arg[2]);
+			printflags(msg_flags, tcp->u_arg[3], "MSG_???");
+		}
+	} else {
+		if (verbose(tcp))
+			decode_mmsg(tcp, (unsigned long) -1L);
+	}
+	return 0;
+}
+
 #endif /* HAVE_SENDMSG */
 
 int
-sys_recv(tcp)
-struct tcb *tcp;
+sys_recv(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1681,8 +1684,7 @@
 }
 
 int
-sys_recvfrom(tcp)
-struct tcb *tcp;
+sys_recvfrom(struct tcb *tcp)
 {
 	int fromlen;
 
@@ -1704,20 +1706,20 @@
 		/* from address, len */
 		if (!tcp->u_arg[4] || !tcp->u_arg[5]) {
 			if (tcp->u_arg[4] == 0)
-				tprintf(", NULL");
+				tprints(", NULL");
 			else
 				tprintf(", %#lx", tcp->u_arg[4]);
 			if (tcp->u_arg[5] == 0)
-				tprintf(", NULL");
+				tprints(", NULL");
 			else
 				tprintf(", %#lx", tcp->u_arg[5]);
 			return 0;
 		}
 		if (umove(tcp, tcp->u_arg[5], &fromlen) < 0) {
-			tprintf(", {...}, [?]");
+			tprints(", {...}, [?]");
 			return 0;
 		}
-		tprintf(", ");
+		tprints(", ");
 		printsock(tcp, tcp->u_arg[4], tcp->u_arg[5]);
 		/* from length */
 		tprintf(", [%u]", fromlen);
@@ -1728,8 +1730,7 @@
 #ifdef HAVE_SENDMSG
 
 int
-sys_recvmsg(tcp)
-struct tcb *tcp;
+sys_recvmsg(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1737,41 +1738,38 @@
 		if (syserror(tcp) || !verbose(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
 		else
-			printmsghdr(tcp, tcp->u_arg[1]);
+			printmsghdr(tcp, tcp->u_arg[1], tcp->u_rval);
 		/* flags */
-		tprintf(", ");
+		tprints(", ");
 		printflags(msg_flags, tcp->u_arg[2], "MSG_???");
 	}
 	return 0;
 }
 
-#ifdef LINUX
 int
 sys_recvmmsg(struct tcb *tcp)
 {
-	static char str[128];
-	if (entering(tcp)) {
+	/* +5 chars are for "left " prefix */
+	static char str[5 + TIMESPEC_TEXT_BUFSIZE];
 
+	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
 		if (verbose(tcp)) {
 			sprint_timespec(str, tcp, tcp->u_arg[4]);
+			/* Abusing tcp->auxstr as temp storage.
+			 * Will be used and freed on syscall exit.
+			 */
 			tcp->auxstr = strdup(str);
 		} else {
 			tprintf("%#lx, %ld, ", tcp->u_arg[1], tcp->u_arg[2]);
 			printflags(msg_flags, tcp->u_arg[3], "MSG_???");
-			tprintf(", ");
+			tprints(", ");
 			print_timespec(tcp, tcp->u_arg[4]);
 		}
 		return 0;
 	} else {
 		if (verbose(tcp)) {
-			if (syserror(tcp))
-				tprintf("%#lx", tcp->u_arg[1]);
-			else
-				printmmsghdr(tcp, tcp->u_arg[1]);
-			tprintf(", %ld, ", tcp->u_arg[2]);
-			/* flags */
-			printflags(msg_flags, tcp->u_arg[3], "MSG_???");
+			decode_mmsg(tcp, 0);
 			/* timeout on entrance */
 			tprintf(", %s", tcp->auxstr ? tcp->auxstr : "{...}");
 			free((void *) tcp->auxstr);
@@ -1786,26 +1784,23 @@
 		if (!verbose(tcp))
 			return 0;
 		/* timeout on exit */
-		strcpy(str, "left ");
-		sprint_timespec(str + strlen(str), tcp, tcp->u_arg[4]);
+		sprint_timespec(stpcpy(str, "left "), tcp, tcp->u_arg[4]);
 		tcp->auxstr = str;
 		return RVAL_STR;
 	}
 }
-#endif
 
 #endif /* HAVE_SENDMSG */
 
 static const struct xlat shutdown_modes[] = {
-       { 0,	"SHUT_RD"	},
-       { 1,	"SHUT_WR"	},
-       { 2,	"SHUT_RDWR"	},
-       { 0,	NULL		}
+	{ 0,	"SHUT_RD"	},
+	{ 1,	"SHUT_WR"	},
+	{ 2,	"SHUT_RDWR"	},
+	{ 0,	NULL		}
 };
 
 int
-sys_shutdown(tcp)
-struct tcb *tcp;
+sys_shutdown(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
@@ -1815,15 +1810,13 @@
 }
 
 int
-sys_getsockname(tcp)
-struct tcb *tcp;
+sys_getsockname(struct tcb *tcp)
 {
 	return sys_accept(tcp);
 }
 
 int
-sys_getpeername(tcp)
-struct tcb *tcp;
+sys_getpeername(struct tcb *tcp)
 {
 	return sys_accept(tcp);
 }
@@ -1835,21 +1828,21 @@
 		if (syserror(tcp)) {
 			tprintf("%#lx", tcp->u_arg[0]);
 		} else {
-#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64)
+#if !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64)
 			int fds[2];
 
 			if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0)
-				tprintf("[...]");
+				tprints("[...]");
 			else
 				tprintf("[%u, %u]", fds[0], fds[1]);
-#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64)
+#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(IA64)
 			tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp));
 #else
 			tprintf("%#lx", tcp->u_arg[0]);
 #endif
 		}
 		if (flags_arg >= 0) {
-			tprintf(", ");
+			tprints(", ");
 			printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
 		}
 	}
@@ -1862,26 +1855,22 @@
 	return do_pipe(tcp, -1);
 }
 
-#ifdef LINUX
 int
 sys_pipe2(struct tcb *tcp)
 {
 	return do_pipe(tcp, 1);
 }
-#endif
 
 int
 sys_socketpair(struct tcb *tcp)
 {
-#ifdef LINUX
 	int fds[2];
-#endif
 
 	if (entering(tcp)) {
 		printxval(domains, tcp->u_arg[0], "PF_???");
-		tprintf(", ");
+		tprints(", ");
 		tprint_sock_type(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 		switch (tcp->u_arg[0]) {
 		case PF_INET:
 			printxval(protocols, tcp->u_arg[2], "IPPROTO_???");
@@ -1889,9 +1878,9 @@
 #ifdef PF_IPX
 		case PF_IPX:
 			/* BTW: I don't believe this.. */
-			tprintf("[");
+			tprints("[");
 			printxval(domains, tcp->u_arg[2], "PF_???");
-			tprintf("]");
+			tprints("]");
 			break;
 #endif /* PF_IPX */
 		default:
@@ -1903,15 +1892,10 @@
 			tprintf(", %#lx", tcp->u_arg[3]);
 			return 0;
 		}
-#ifdef LINUX
 		if (umoven(tcp, tcp->u_arg[3], sizeof fds, (char *) fds) < 0)
-			tprintf(", [...]");
+			tprints(", [...]");
 		else
 			tprintf(", [%u, %u]", fds[0], fds[1]);
-#endif /* LINUX */
-#if defined(SUNOS4) || defined(SVR4) || defined(FREEBSD)
-		tprintf(", [%lu, %lu]", tcp->u_rval, getrval2(tcp));
-#endif /* SUNOS4 || SVR4 || FREEBSD */
 	}
 	return 0;
 }
@@ -1922,7 +1906,7 @@
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
 		printxval(socketlayers, tcp->u_arg[1], "SOL_???");
-		tprintf (", ");
+		tprints(", ");
 		switch (tcp->u_arg[1]) {
 		case SOL_SOCKET:
 			printxval(sockoptions, tcp->u_arg[2], "SO_???");
@@ -1964,10 +1948,10 @@
 			tprintf("%lu", tcp->u_arg[2]);
 			break;
 		}
-		tprintf (", ");
+		tprints(", ");
 	} else {
 		int len;
-		if (syserror(tcp) || umove (tcp, tcp->u_arg[4], &len) < 0) {
+		if (syserror(tcp) || umove(tcp, tcp->u_arg[4], &len) < 0) {
 			tprintf("%#lx, %#lx",
 				tcp->u_arg[3], tcp->u_arg[4]);
 			return 0;
@@ -1978,9 +1962,9 @@
 			switch (tcp->u_arg[2]) {
 #ifdef SO_LINGER
 			case SO_LINGER:
-				if (len == sizeof (struct linger)) {
+				if (len == sizeof(struct linger)) {
 					struct linger linger;
-					if (umove (tcp,
+					if (umove(tcp,
 						   tcp->u_arg[3],
 						   &linger) < 0)
 						break;
@@ -1995,9 +1979,9 @@
 #endif
 #ifdef SO_PEERCRED
 			case SO_PEERCRED:
-				if (len == sizeof (struct ucred)) {
+				if (len == sizeof(struct ucred)) {
 					struct ucred uc;
-					if (umove (tcp,
+					if (umove(tcp,
 						   tcp->u_arg[3],
 						   &uc) < 0)
 						break;
@@ -2019,7 +2003,7 @@
 			case PACKET_STATISTICS:
 				if (len == sizeof(struct tpacket_stats)) {
 					struct tpacket_stats stats;
-					if (umove (tcp,
+					if (umove(tcp,
 						   tcp->u_arg[3],
 						   &stats) < 0)
 						break;
@@ -2036,11 +2020,11 @@
 			break;
 		}
 
-		if (len == sizeof (int)) {
+		if (len == sizeof(int)) {
 			printnum_int(tcp, tcp->u_arg[3], "%d");
 		}
 		else {
-			printstr (tcp, tcp->u_arg[3], len);
+			printstr(tcp, tcp->u_arg[3], len);
 		}
 		tprintf(", [%d]", len);
 	}
@@ -2048,14 +2032,12 @@
 }
 
 #if defined(ICMP_FILTER)
-static void printicmpfilter(tcp, addr)
-struct tcb *tcp;
-long addr;
+static void printicmpfilter(struct tcb *tcp, long addr)
 {
 	struct icmp_filter	filter;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (syserror(tcp) || !verbose(tcp)) {
@@ -2063,35 +2045,30 @@
 		return;
 	}
 	if (umove(tcp, addr, &filter) < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		return;
 	}
 
-	tprintf("~(");
+	tprints("~(");
 	printflags(icmpfilterflags, ~filter.data, "ICMP_???");
-	tprintf(")");
+	tprints(")");
 }
 #endif /* ICMP_FILTER */
 
 static int
-printsockopt (tcp, level, name, addr, len)
-struct tcb *tcp;
-int level;
-int name;
-long addr;
-int len;
+printsockopt(struct tcb *tcp, int level, int name, long addr, int len)
 {
 	printxval(socketlayers, level, "SOL_??");
-	tprintf (", ");
+	tprints(", ");
 	switch (level) {
-	    case SOL_SOCKET:
+	case SOL_SOCKET:
 		printxval(sockoptions, name, "SO_???");
 		switch (name) {
 #if defined(SO_LINGER)
-		    case SO_LINGER:
-			if (len == sizeof (struct linger)) {
+		case SO_LINGER:
+			if (len == sizeof(struct linger)) {
 				struct linger linger;
-				if (umove (tcp, addr, &linger) < 0)
+				if (umove(tcp, addr, &linger) < 0)
 					break;
 				tprintf(", {onoff=%d, linger=%d}",
 					linger.l_onoff,
@@ -2103,30 +2080,30 @@
 		}
 		break;
 #ifdef SOL_IP
-	    case SOL_IP:
+	case SOL_IP:
 		printxval(sockipoptions, name, "IP_???");
 		break;
 #endif
 #ifdef SOL_IPV6
-	    case SOL_IPV6:
+	case SOL_IPV6:
 		printxval(sockipv6options, name, "IPV6_???");
 		break;
 #endif
 #ifdef SOL_IPX
-	    case SOL_IPX:
+	case SOL_IPX:
 		printxval(sockipxoptions, name, "IPX_???");
 		break;
 #endif
 #ifdef SOL_PACKET
-	    case SOL_PACKET:
+	case SOL_PACKET:
 		printxval(sockpacketoptions, name, "PACKET_???");
 		/* TODO: decode packate_mreq for PACKET_*_MEMBERSHIP */
 		switch (name) {
 #ifdef PACKET_RX_RING
-		    case PACKET_RX_RING:
+		case PACKET_RX_RING:
 #endif
 #ifdef PACKET_TX_RING
-		    case PACKET_TX_RING:
+		case PACKET_TX_RING:
 #endif
 #if defined(PACKET_RX_RING) || defined(PACKET_TX_RING)
 			if (len == sizeof(struct tpacket_req)) {
@@ -2146,24 +2123,24 @@
 		break;
 #endif
 #ifdef SOL_TCP
-	    case SOL_TCP:
+	case SOL_TCP:
 		printxval(socktcpoptions, name, "TCP_???");
 		break;
 #endif
 #ifdef SOL_SCTP
-	   case SOL_SCTP:
+	case SOL_SCTP:
 		printxval(socksctpoptions, name, "SCTP_???");
 		break;
 #endif
 #ifdef SOL_RAW
-	    case SOL_RAW:
+	case SOL_RAW:
 		printxval(sockrawoptions, name, "RAW_???");
 		switch (name) {
 #if defined(ICMP_FILTER)
-		    case ICMP_FILTER:
-			tprintf(", ");
-			printicmpfilter(tcp, addr);
-			return 0;
+			case ICMP_FILTER:
+				tprints(", ");
+				printicmpfilter(tcp, addr);
+				return 0;
 #endif
 		}
 		break;
@@ -2172,31 +2149,27 @@
 		/* SOL_AX25 SOL_ATALK SOL_NETROM SOL_UDP SOL_DECNET SOL_X25
 		 * etc. still need work  */
 
-	    default:
+	default:
 		tprintf("%u", name);
 	}
 
 	/* default arg printing */
 
-	tprintf (", ");
+	tprints(", ");
 
-	if (len == sizeof (int)) {
-		printnum_int (tcp, addr, "%d");
+	if (len == sizeof(int)) {
+		printnum_int(tcp, addr, "%d");
 	}
 	else {
-		printstr (tcp, addr, len);
+		printstr(tcp, addr, len);
 	}
 	return 0;
 }
 
-
 #ifdef HAVE_STRUCT_OPTHDR
 
 void
-print_sock_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+print_sock_optmgmt(struct tcb *tcp, long addr, int len)
 {
 	int c = 0;
 	struct opthdr hdr;
@@ -2204,182 +2177,38 @@
 	while (len >= (int) sizeof hdr) {
 		if (umove(tcp, addr, &hdr) < 0) break;
 		if (c++) {
-			tprintf (", ");
+			tprints(", ");
 		}
 		else if (len > hdr.len + sizeof hdr) {
-			tprintf ("[");
+			tprints("[");
 		}
-		tprintf ("{");
+		tprints("{");
 		addr += sizeof hdr;
 		len -= sizeof hdr;
-		printsockopt (tcp, hdr.level, hdr.name, addr, hdr.len);
+		printsockopt(tcp, hdr.level, hdr.name, addr, hdr.len);
 		if (hdr.len > 0) {
 			addr += hdr.len;
 			len -= hdr.len;
 		}
-		tprintf ("}");
+		tprints("}");
 	}
 	if (len > 0) {
-		if (c++) tprintf (", ");
-		printstr (tcp, addr, len);
+		if (c++) tprints(", ");
+		printstr(tcp, addr, len);
 	}
-	if (c > 1) tprintf ("]");
+	if (c > 1) tprints("]");
 }
 
 #endif
 
 int
-sys_setsockopt(tcp)
-struct tcb *tcp;
+sys_setsockopt(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, ", tcp->u_arg[0]);
-		printsockopt (tcp, tcp->u_arg[1], tcp->u_arg[2],
+		printsockopt(tcp, tcp->u_arg[1], tcp->u_arg[2],
 			      tcp->u_arg[3], tcp->u_arg[4]);
 		tprintf(", %lu", tcp->u_arg[4]);
 	}
 	return 0;
 }
-
-#if UNIXWARE >= 7
-
-static const struct xlat sock_version[] = {
-	{ __NETLIB_UW211_SVR4,	"UW211_SVR4" },
-	{ __NETLIB_UW211_XPG4,	"UW211_XPG4" },
-	{ __NETLIB_GEMINI_SVR4,	"GEMINI_SVR4" },
-	{ __NETLIB_GEMINI_XPG4,	"GEMINI_XPG4" },
-	{ __NETLIB_FP1_SVR4,	"FP1_SVR4" },
-	{ __NETLIB_FP1_XPG4,	"FP1_XPG4" },
-	{ 0,            NULL            },
-};
-
-
-int
-netlib_call(tcp, func)
-struct tcb *tcp;
-int (*func) ();
-{
-	if (entering(tcp)) {
-		int i;
-		printxval (sock_version, tcp->u_arg[0], "__NETLIB_???");
-		tprintf(", ");
-		--tcp->u_nargs;
-		for (i = 0; i < tcp->u_nargs; i++)
-			tcp->u_arg[i] = tcp->u_arg[i + 1];
-		return func (tcp);
-
-	}
-
-	return func (tcp);
-}
-
-int
-sys_xsocket(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_socket);
-}
-
-int
-sys_xsocketpair(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_socketpair);
-}
-
-int
-sys_xbind(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_bind);
-}
-
-int
-sys_xconnect(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_connect);
-}
-
-int
-sys_xlisten(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_listen);
-}
-
-int
-sys_xaccept(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_accept);
-}
-
-int
-sys_xsendmsg(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_sendmsg);
-}
-
-int
-sys_xrecvmsg(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_recvmsg);
-}
-
-int
-sys_xgetsockaddr(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printxval (sock_version, tcp->u_arg[0], "__NETLIB_???");
-		tprintf(", ");
-		if (tcp->u_arg[1] == 0) {
-			tprintf ("LOCALNAME, ");
-		}
-		else if (tcp->u_arg[1] == 1) {
-			tprintf ("REMOTENAME, ");
-		}
-		else {
-			tprintf ("%ld, ", tcp->u_arg [1]);
-		}
-		tprintf ("%ld, ", tcp->u_arg [2]);
-	}
-	else {
-		if (tcp->u_arg[3] == 0 || syserror(tcp)) {
-			tprintf("%#lx", tcp->u_arg[3]);
-		} else {
-			printsock(tcp, tcp->u_arg[3], tcp->u_arg[4]);
-		}
-		tprintf(", ");
-		printnum(tcp, tcp->u_arg[4], "%lu");
-	}
-
-	return 0;
-
-}
-
-int
-sys_xgetsockopt(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_getsockopt);
-}
-
-int
-sys_xsetsockopt(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_setsockopt);
-}
-
-int
-sys_xshutdown(tcp)
-struct tcb *tcp;
-{
-	return netlib_call (tcp, sys_shutdown);
-}
-
-#endif /* UNIXWARE */
diff --git a/pathtrace.c b/pathtrace.c
new file mode 100644
index 0000000..c000c83
--- /dev/null
+++ b/pathtrace.c
@@ -0,0 +1,357 @@
+/*
+ * Copyright (c) 2011, Comtrol Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+#include "defs.h"
+#include <sys/param.h>
+#ifdef HAVE_POLL_H
+# include <poll.h>
+#endif
+#ifdef HAVE_SYS_POLL_H
+# include <sys/poll.h>
+#endif
+
+#include "syscall.h"
+
+#define MAXSELECTED  256	/* max number of "selected" paths */
+static const char *selected[MAXSELECTED];	/* paths selected for tracing */
+
+/*
+ * Return true if specified path matches one that we're tracing.
+ */
+static int
+pathmatch(const char *path)
+{
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(selected); ++i) {
+		if (selected[i] == NULL)
+			return 0;
+		if (strcmp(path, selected[i]) == 0)
+			return 1;
+	}
+	return 0;
+}
+
+/*
+ * Return true if specified path (in user-space) matches.
+ */
+static int
+upathmatch(struct tcb *tcp, unsigned long upath)
+{
+	char path[PATH_MAX + 1];
+
+	return umovestr(tcp, upath, sizeof path, path) >= 0 &&
+		pathmatch(path);
+}
+
+/*
+ * Return true if specified fd maps to a path we're tracing.
+ */
+static int
+fdmatch(struct tcb *tcp, int fd)
+{
+	const char *path = getfdpath(tcp, fd);
+
+	return path && pathmatch(path);
+}
+
+/*
+ * Add a path to the set we're tracing.
+ * Secifying NULL will delete all paths.
+ */
+static int
+storepath(const char *path)
+{
+	unsigned int i;
+
+	for (i = 0; i < ARRAY_SIZE(selected); ++i) {
+		if (!selected[i]) {
+			selected[i] = path;
+			return 0;
+		}
+	}
+
+	fprintf(stderr, "Max trace paths exceeded, only using first %u\n",
+		(unsigned int) ARRAY_SIZE(selected));
+	return -1;
+}
+
+/*
+ * Get path associated with fd.
+ */
+const char *
+getfdpath(struct tcb *tcp, int fd)
+{
+	static char path[PATH_MAX+1];
+	char linkpath[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3];
+	ssize_t n;
+
+	if (fd < 0)
+		return NULL;
+
+	sprintf(linkpath, "/proc/%u/fd/%u", tcp->pid, fd);
+	n = readlink(linkpath, path, (sizeof path) - 1);
+	if (n <= 0)
+		return NULL;
+	path[n] = '\0';
+	return path;
+}
+
+/*
+ * Add a path to the set we're tracing.  Also add the canonicalized
+ * version of the path.  Secifying NULL will delete all paths.
+ */
+int
+pathtrace_select(const char *path)
+{
+	char *rpath;
+
+	if (storepath(path))
+		return -1;
+
+	rpath = realpath(path, NULL);
+
+	if (rpath == NULL)
+		return 0;
+
+	/* if realpath and specified path are same, we're done */
+	if (strcmp(path, rpath) == 0) {
+		free(rpath);
+		return 0;
+	}
+
+	fprintf(stderr, "Requested path '%s' resolved into '%s'\n",
+		path, rpath);
+	return storepath(rpath);
+}
+
+/*
+ * Return true if syscall accesses a selected path
+ * (or if no paths have been specified for tracing).
+ */
+int
+pathtrace_match(struct tcb *tcp)
+{
+	const struct sysent *s;
+
+	if (selected[0] == NULL)
+		return 1;
+
+	if (!SCNO_IN_RANGE(tcp->scno))
+		return 0;
+
+	s = &sysent[tcp->scno];
+
+	if (!(s->sys_flags & (TRACE_FILE | TRACE_DESC)))
+		return 0;
+
+	/*
+	 * Check for special cases where we need to do something
+	 * other than test arg[0].
+	 */
+
+	if (s->sys_func == sys_dup2 ||
+	    s->sys_func == sys_dup3 ||
+	    s->sys_func == sys_sendfile ||
+	    s->sys_func == sys_sendfile64 ||
+	    s->sys_func == sys_tee)
+	{
+		/* fd, fd */
+		return fdmatch(tcp, tcp->u_arg[0]) ||
+			fdmatch(tcp, tcp->u_arg[1]);
+	}
+
+	if (s->sys_func == sys_inotify_add_watch ||
+	    s->sys_func == sys_faccessat ||
+	    s->sys_func == sys_fchmodat ||
+	    s->sys_func == sys_futimesat ||
+	    s->sys_func == sys_mkdirat ||
+	    s->sys_func == sys_unlinkat ||
+	    s->sys_func == sys_newfstatat ||
+	    s->sys_func == sys_mknodat ||
+	    s->sys_func == sys_openat ||
+	    s->sys_func == sys_readlinkat ||
+	    s->sys_func == sys_utimensat ||
+	    s->sys_func == sys_fchownat ||
+	    s->sys_func == sys_pipe2)
+	{
+		/* fd, path */
+		return fdmatch(tcp, tcp->u_arg[0]) ||
+			upathmatch(tcp, tcp->u_arg[1]);
+	}
+
+	if (s->sys_func == sys_link ||
+	    s->sys_func == sys_mount)
+	{
+		/* path, path */
+		return upathmatch(tcp, tcp->u_arg[0]) ||
+			upathmatch(tcp, tcp->u_arg[1]);
+	}
+
+	if (s->sys_func == sys_renameat ||
+	    s->sys_func == sys_linkat)
+	{
+		/* fd, path, fd, path */
+		return fdmatch(tcp, tcp->u_arg[0]) ||
+			fdmatch(tcp, tcp->u_arg[2]) ||
+			upathmatch(tcp, tcp->u_arg[1]) ||
+			upathmatch(tcp, tcp->u_arg[3]);
+	}
+
+	if (
+	    s->sys_func == sys_old_mmap ||
+	    s->sys_func == sys_mmap) {
+		/* x, x, x, x, fd */
+		return fdmatch(tcp, tcp->u_arg[4]);
+	}
+
+	if (s->sys_func == sys_symlinkat) {
+		/* path, fd, path */
+		return fdmatch(tcp, tcp->u_arg[1]) ||
+			upathmatch(tcp, tcp->u_arg[0]) ||
+			upathmatch(tcp, tcp->u_arg[2]);
+	}
+
+	if (s->sys_func == sys_splice) {
+		/* fd, x, fd, x, x */
+		return fdmatch(tcp, tcp->u_arg[0]) ||
+			fdmatch(tcp, tcp->u_arg[2]);
+	}
+
+	if (s->sys_func == sys_epoll_ctl) {
+		/* x, x, fd, x */
+		return fdmatch(tcp, tcp->u_arg[2]);
+	}
+
+	if (s->sys_func == sys_select ||
+	    s->sys_func == sys_oldselect ||
+	    s->sys_func == sys_pselect6)
+	{
+		int     i, j;
+		unsigned nfds;
+		long   *args, oldargs[5];
+		unsigned fdsize;
+		fd_set *fds;
+
+		if (s->sys_func == sys_oldselect) {
+			if (umoven(tcp, tcp->u_arg[0], sizeof oldargs,
+				   (char*) oldargs) < 0)
+			{
+				fprintf(stderr, "umoven() failed\n");
+				return 0;
+			}
+			args = oldargs;
+		} else
+			args = tcp->u_arg;
+
+		nfds = args[0];
+		/* Beware of select(2^31-1, NULL, NULL, NULL) and similar... */
+		if (args[0] > 1024*1024)
+			nfds = 1024*1024;
+		if (args[0] < 0)
+			nfds = 0;
+		fdsize = ((((nfds + 7) / 8) + sizeof(long) - 1)
+			  & -sizeof(long));
+		fds = malloc(fdsize);
+		if (!fds)
+			die_out_of_memory();
+
+		for (i = 1; i <= 3; ++i) {
+			if (args[i] == 0)
+				continue;
+
+			if (umoven(tcp, args[i], fdsize, (char *) fds) < 0) {
+				fprintf(stderr, "umoven() failed\n");
+				continue;
+			}
+
+			for (j = 0; j < nfds; ++j)
+				if (FD_ISSET(j, fds) && fdmatch(tcp, j)) {
+					free(fds);
+					return 1;
+				}
+		}
+		free(fds);
+		return 0;
+	}
+
+	if (s->sys_func == sys_poll ||
+	    s->sys_func == sys_ppoll)
+	{
+		struct pollfd fds;
+		unsigned nfds;
+		unsigned long start, cur, end;
+
+		start = tcp->u_arg[0];
+		nfds = tcp->u_arg[1];
+
+		end = start + sizeof(fds) * nfds;
+
+		if (nfds == 0 || end < start)
+			return 0;
+
+		for (cur = start; cur < end; cur += sizeof(fds))
+			if ((umoven(tcp, cur, sizeof fds, (char *) &fds) == 0)
+			    && fdmatch(tcp, fds.fd))
+				return 1;
+
+		return 0;
+	}
+
+	if (s->sys_func == printargs ||
+	    s->sys_func == sys_pipe ||
+	    s->sys_func == sys_pipe2 ||
+	    s->sys_func == sys_eventfd2 ||
+	    s->sys_func == sys_eventfd ||
+	    s->sys_func == sys_inotify_init1 ||
+	    s->sys_func == sys_timerfd_create ||
+	    s->sys_func == sys_timerfd_settime ||
+	    s->sys_func == sys_timerfd_gettime ||
+	    s->sys_func == sys_epoll_create ||
+	    strcmp(s->sys_name, "fanotify_init") == 0)
+	{
+		/*
+		 * These have TRACE_FILE or TRACE_DESCRIPTOR set, but they
+		 * don't have any file descriptor or path args to test.
+		 */
+		return 0;
+	}
+
+	/*
+	 * Our fallback position for calls that haven't already
+	 * been handled is to just check arg[0].
+	 */
+
+	if (s->sys_flags & TRACE_FILE)
+		return upathmatch(tcp, tcp->u_arg[0]);
+
+	if (s->sys_flags & TRACE_DESC)
+		return fdmatch(tcp, tcp->u_arg[0]);
+
+	return 0;
+}
diff --git a/process.c b/process.c
index 56d68f3..fa304e5 100644
--- a/process.c
+++ b/process.c
@@ -8,7 +8,6 @@
  *                    <barrow_dj@mail.yahoo.com,djbarrow@de.ibm.com>
  * Copyright (c) 2000 PocketPenguins Inc.  Linux for Hitachi SuperH
  *                    port by Greg Banks <gbanks@pocketpenguins.com>
-
  *
  * All rights reserved.
  *
@@ -33,92 +32,71 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/time.h>
 #include <sys/wait.h>
 #include <sys/resource.h>
 #include <sys/utsname.h>
 #include <sys/user.h>
-#include <sys/syscall.h>
-#include <signal.h>
-#ifdef SUNOS4
-#include <machine/reg.h>
-#endif /* SUNOS4 */
-
-#ifdef FREEBSD
-#include <sys/ptrace.h>
-#endif
 
 #ifdef HAVE_SYS_REG_H
 # include <sys/reg.h>
-#ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-#endif
-#ifndef PTRACE_POKEUSR
-# define PTRACE_POKEUSR PTRACE_POKEUSER
-#endif
+# ifndef PTRACE_PEEKUSR
+#  define PTRACE_PEEKUSR PTRACE_PEEKUSER
+# endif
+# ifndef PTRACE_POKEUSR
+#  define PTRACE_POKEUSR PTRACE_POKEUSER
+# endif
 #endif
 
 #ifdef HAVE_LINUX_PTRACE_H
-#undef PTRACE_SYSCALL
+# undef PTRACE_SYSCALL
 # ifdef HAVE_STRUCT_IA64_FPREG
 #  define ia64_fpreg XXX_ia64_fpreg
 # endif
 # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
 #  define pt_all_user_regs XXX_pt_all_user_regs
 # endif
-#include <linux/ptrace.h>
+# include <linux/ptrace.h>
 # undef ia64_fpreg
 # undef pt_all_user_regs
 #endif
 
-#if defined (LINUX) && defined (SPARC64)
+#if defined(SPARC64)
 # define r_pc r_tpc
 # undef PTRACE_GETREGS
 # define PTRACE_GETREGS PTRACE_GETREGS64
 # undef PTRACE_SETREGS
 # define PTRACE_SETREGS PTRACE_SETREGS64
-#endif /* LINUX && SPARC64 */
+#endif
 
 #ifdef HAVE_LINUX_FUTEX_H
 # include <linux/futex.h>
 #endif
-#ifdef 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
-# ifndef FUTEX_REQUEUE
-#  define FUTEX_REQUEUE 3
-# endif
-#endif /* 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
+#ifndef FUTEX_REQUEUE
+# define FUTEX_REQUEUE 3
+#endif
 
-#ifdef LINUX
 #include <sched.h>
 #include <asm/posix_types.h>
 #undef GETGROUPS_T
 #define GETGROUPS_T __kernel_gid_t
 #undef GETGROUPS32_T
 #define GETGROUPS32_T __kernel_gid32_t
-#endif /* LINUX */
 
-#ifdef HAVE_ANDROID_OS
-#define __sched_priority sched_priority
-#endif
-
-#if defined(LINUX) && defined(IA64)
+#if defined(IA64)
 # include <asm/ptrace_offsets.h>
 # include <asm/rse.h>
 #endif
@@ -253,32 +231,29 @@
 	{ 0,			NULL			},
 };
 
-
 static const char *
-unalignctl_string (unsigned int ctl)
+unalignctl_string(unsigned int ctl)
 {
-	static char buf[16];
+	static char buf[sizeof(int)*2 + 2];
 
 	switch (ctl) {
 #ifdef PR_UNALIGN_NOPRINT
-	      case PR_UNALIGN_NOPRINT:
-		return "NOPRINT";
+		case PR_UNALIGN_NOPRINT:
+			return "NOPRINT";
 #endif
 #ifdef PR_UNALIGN_SIGBUS
-	      case PR_UNALIGN_SIGBUS:
-		return "SIGBUS";
+		case PR_UNALIGN_SIGBUS:
+			return "SIGBUS";
 #endif
-	      default:
-		break;
+		default:
+			break;
 	}
 	sprintf(buf, "%x", ctl);
 	return buf;
 }
 
-
 int
-sys_prctl(tcp)
-struct tcb *tcp;
+sys_prctl(struct tcb *tcp)
 {
 	int i;
 
@@ -364,20 +339,8 @@
 }
 #endif /* HAVE_PRCTL */
 
-#if defined(FREEBSD) || defined(SUNOS4) || defined(SVR4)
 int
-sys_gethostid(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp))
-		return RVAL_HEX;
-	return 0;
-}
-#endif /* FREEBSD || SUNOS4 || SVR4 */
-
-int
-sys_sethostname(tcp)
-struct tcb *tcp;
+sys_sethostname(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
@@ -386,10 +349,9 @@
 	return 0;
 }
 
-#if defined(ALPHA) || defined(FREEBSD) || defined(SUNOS4) || defined(SVR4)
+#if defined(ALPHA)
 int
-sys_gethostname(tcp)
-struct tcb *tcp;
+sys_gethostname(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		if (syserror(tcp))
@@ -400,11 +362,10 @@
 	}
 	return 0;
 }
-#endif /* ALPHA || FREEBSD || SUNOS4 || SVR4 */
+#endif
 
 int
-sys_setdomainname(tcp)
-struct tcb *tcp;
+sys_setdomainname(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printpathn(tcp, tcp->u_arg[0], tcp->u_arg[1]);
@@ -413,26 +374,8 @@
 	return 0;
 }
 
-#if !defined(LINUX)
-
 int
-sys_getdomainname(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else
-			printpath(tcp, tcp->u_arg[0]);
-		tprintf(", %lu", tcp->u_arg[1]);
-	}
-	return 0;
-}
-#endif /* !LINUX */
-
-int
-sys_exit(tcp)
-struct tcb *tcp;
+sys_exit(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		fprintf(stderr, "_exit returned!\n");
@@ -440,100 +383,12 @@
 	}
 	/* special case: we stop tracing this process, finish line now */
 	tprintf("%ld) ", tcp->u_arg[0]);
-	tabto(acolumn);
-	tprintf("= ?");
-	printtrailer();
+	tabto();
+	tprints("= ?\n");
+	line_ended();
 	return 0;
 }
 
-int
-internal_exit(struct tcb *tcp)
-{
-	if (entering(tcp)) {
-		tcp->flags |= TCB_EXITING;
-#ifdef __NR_exit_group
-		if (known_scno(tcp) == __NR_exit_group)
-			tcp->flags |= TCB_GROUP_EXITING;
-#endif
-	}
-	return 0;
-}
-
-/* TCP is creating a child we want to follow.
-   If there will be space in tcbtab for it, set TCB_FOLLOWFORK and return 0.
-   If not, clear TCB_FOLLOWFORK, print an error, and return 1.  */
-static void
-fork_tcb(struct tcb *tcp)
-{
-	if (nprocs == tcbtabsize)
-		expand_tcbtab();
-
-	tcp->flags |= TCB_FOLLOWFORK;
-}
-
-#ifdef USE_PROCFS
-
-int
-sys_fork(struct tcb *tcp)
-{
-	if (exiting(tcp) && !syserror(tcp)) {
-		if (getrval2(tcp)) {
-			tcp->auxstr = "child process";
-			return RVAL_UDECIMAL | RVAL_STR;
-		}
-	}
-	return 0;
-}
-
-#if UNIXWARE > 2
-
-int
-sys_rfork(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf ("%ld", tcp->u_arg[0]);
-	}
-	else if (!syserror(tcp)) {
-		if (getrval2(tcp)) {
-			tcp->auxstr = "child process";
-			return RVAL_UDECIMAL | RVAL_STR;
-		}
-	}
-	return 0;
-}
-
-#endif
-
-int
-internal_fork(tcp)
-struct tcb *tcp;
-{
-	struct tcb *tcpchild;
-
-	if (exiting(tcp)) {
-#ifdef SYS_rfork
-		if (known_scno(tcp) == SYS_rfork && !(tcp->u_arg[0]&RFPROC))
-			return 0;
-#endif
-		if (getrval2(tcp))
-			return 0;
-		if (!followfork)
-			return 0;
-		fork_tcb(tcp);
-		if (syserror(tcp))
-			return 0;
-		tcpchild = alloctcb(tcp->u_rval);
-		if (proc_open(tcpchild, 2) < 0)
-			droptcb(tcpchild);
-	}
-	return 0;
-}
-
-#else /* !USE_PROCFS */
-
-#ifdef LINUX
-
 /* defines copied from linux/sched.h since we can't include that
  * ourselves (it conflicts with *lots* of libc includes)
  */
@@ -563,81 +418,80 @@
 #define CLONE_IO		0x80000000	/* Clone io context */
 
 static const struct xlat clone_flags[] = {
-    { CLONE_VM,		"CLONE_VM"	},
-    { CLONE_FS,		"CLONE_FS"	},
-    { CLONE_FILES,	"CLONE_FILES"	},
-    { CLONE_SIGHAND,	"CLONE_SIGHAND"	},
-    { CLONE_IDLETASK,	"CLONE_IDLETASK"},
-    { CLONE_PTRACE,	"CLONE_PTRACE"	},
-    { CLONE_VFORK,	"CLONE_VFORK"	},
-    { CLONE_PARENT,	"CLONE_PARENT"	},
-    { CLONE_THREAD,	"CLONE_THREAD" },
-    { CLONE_NEWNS,	"CLONE_NEWNS" },
-    { CLONE_SYSVSEM,	"CLONE_SYSVSEM" },
-    { CLONE_SETTLS,	"CLONE_SETTLS" },
-    { CLONE_PARENT_SETTID,"CLONE_PARENT_SETTID" },
-    { CLONE_CHILD_CLEARTID,"CLONE_CHILD_CLEARTID" },
-    { CLONE_UNTRACED,	"CLONE_UNTRACED" },
-    { CLONE_CHILD_SETTID,"CLONE_CHILD_SETTID" },
-    { CLONE_STOPPED,	"CLONE_STOPPED" },
-    { CLONE_NEWUTS,	"CLONE_NEWUTS" },
-    { CLONE_NEWIPC,	"CLONE_NEWIPC" },
-    { CLONE_NEWUSER,	"CLONE_NEWUSER" },
-    { CLONE_NEWPID,	"CLONE_NEWPID" },
-    { CLONE_NEWNET,	"CLONE_NEWNET" },
-    { CLONE_IO,		"CLONE_IO" },
-    { 0,		NULL		},
+	{ CLONE_VM,		"CLONE_VM"	},
+	{ CLONE_FS,		"CLONE_FS"	},
+	{ CLONE_FILES,		"CLONE_FILES"	},
+	{ CLONE_SIGHAND,	"CLONE_SIGHAND"	},
+	{ CLONE_IDLETASK,	"CLONE_IDLETASK" },
+	{ CLONE_PTRACE,		"CLONE_PTRACE"	},
+	{ CLONE_VFORK,		"CLONE_VFORK"	},
+	{ CLONE_PARENT,		"CLONE_PARENT"	},
+	{ CLONE_THREAD,		"CLONE_THREAD"	},
+	{ CLONE_NEWNS,		"CLONE_NEWNS"	},
+	{ CLONE_SYSVSEM,	"CLONE_SYSVSEM"	},
+	{ CLONE_SETTLS,		"CLONE_SETTLS"	},
+	{ CLONE_PARENT_SETTID,	"CLONE_PARENT_SETTID" },
+	{ CLONE_CHILD_CLEARTID,	"CLONE_CHILD_CLEARTID" },
+	{ CLONE_UNTRACED,	"CLONE_UNTRACED" },
+	{ CLONE_CHILD_SETTID,	"CLONE_CHILD_SETTID" },
+	{ CLONE_STOPPED,	"CLONE_STOPPED"	},
+	{ CLONE_NEWUTS,		"CLONE_NEWUTS"	},
+	{ CLONE_NEWIPC,		"CLONE_NEWIPC"	},
+	{ CLONE_NEWUSER,	"CLONE_NEWUSER"	},
+	{ CLONE_NEWPID,		"CLONE_NEWPID"	},
+	{ CLONE_NEWNET,		"CLONE_NEWNET"	},
+	{ CLONE_IO,		"CLONE_IO"	},
+	{ 0,			NULL		},
 };
 
-# ifdef I386
-#  include <asm/ldt.h>
-#   ifdef HAVE_STRUCT_USER_DESC
-#    define modify_ldt_ldt_s user_desc
-#   endif
+#ifdef I386
+# include <asm/ldt.h>
+#  ifdef HAVE_STRUCT_USER_DESC
+#   define modify_ldt_ldt_s user_desc
+#  endif
 extern void print_ldt_entry();
-# endif
+#endif
 
-# if defined IA64
-#  define ARG_FLAGS	0
-#  define ARG_STACK	1
-#  define ARG_STACKSIZE	(known_scno(tcp) == SYS_clone2 ? 2 : -1)
-#  define ARG_PTID	(known_scno(tcp) == SYS_clone2 ? 3 : 2)
-#  define ARG_CTID	(known_scno(tcp) == SYS_clone2 ? 4 : 3)
-#  define ARG_TLS	(known_scno(tcp) == SYS_clone2 ? 5 : 4)
-# elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32
-#  define ARG_STACK	0
-#  define ARG_FLAGS	1
-#  define ARG_PTID	2
-#  define ARG_CTID	3
-#  define ARG_TLS	4
-# elif defined X86_64 || defined ALPHA
-#  define ARG_FLAGS	0
-#  define ARG_STACK	1
-#  define ARG_PTID	2
-#  define ARG_CTID	3
-#  define ARG_TLS	4
-# else
-#  define ARG_FLAGS	0
-#  define ARG_STACK	1
-#  define ARG_PTID	2
-#  define ARG_TLS	3
-#  define ARG_CTID	4
-# endif
+#if defined IA64
+# define ARG_FLAGS	0
+# define ARG_STACK	1
+# define ARG_STACKSIZE	(tcp->scno == SYS_clone2 ? 2 : -1)
+# define ARG_PTID	(tcp->scno == SYS_clone2 ? 3 : 2)
+# define ARG_CTID	(tcp->scno == SYS_clone2 ? 4 : 3)
+# define ARG_TLS	(tcp->scno == SYS_clone2 ? 5 : 4)
+#elif defined S390 || defined S390X || defined CRISV10 || defined CRISV32
+# define ARG_STACK	0
+# define ARG_FLAGS	1
+# define ARG_PTID	2
+# define ARG_CTID	3
+# define ARG_TLS	4
+#elif defined X86_64 || defined X32 || defined ALPHA
+# define ARG_FLAGS	0
+# define ARG_STACK	1
+# define ARG_PTID	2
+# define ARG_CTID	3
+# define ARG_TLS	4
+#else
+# define ARG_FLAGS	0
+# define ARG_STACK	1
+# define ARG_PTID	2
+# define ARG_TLS	3
+# define ARG_CTID	4
+#endif
 
 int
-sys_clone(tcp)
-struct tcb *tcp;
+sys_clone(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		const char *sep = "|";
 		unsigned long flags = tcp->u_arg[ARG_FLAGS];
 		tprintf("child_stack=%#lx, ", tcp->u_arg[ARG_STACK]);
-# ifdef ARG_STACKSIZE
+#ifdef ARG_STACKSIZE
 		if (ARG_STACKSIZE != -1)
 			tprintf("stack_size=%#lx, ",
 				tcp->u_arg[ARG_STACKSIZE]);
-# endif
-		tprintf("flags=");
+#endif
+		tprints("flags=");
 		if (!printflags(clone_flags, flags &~ CSIGNAL, NULL))
 			sep = "";
 		if ((flags & CSIGNAL) != 0)
@@ -648,18 +502,18 @@
 		if (flags & CLONE_PARENT_SETTID)
 			tprintf(", parent_tidptr=%#lx", tcp->u_arg[ARG_PTID]);
 		if (flags & CLONE_SETTLS) {
-# ifdef I386
+#ifdef I386
 			struct modify_ldt_ldt_s copy;
 			if (umove(tcp, tcp->u_arg[ARG_TLS], &copy) != -1) {
 				tprintf(", {entry_number:%d, ",
 					copy.entry_number);
 				if (!verbose(tcp))
-					tprintf("...}");
+					tprints("...}");
 				else
 					print_ldt_entry(&copy);
 			}
 			else
-# endif
+#endif
 				tprintf(", tls=%#lx", tcp->u_arg[ARG_TLS]);
 		}
 		if (flags & (CLONE_CHILD_SETTID|CLONE_CHILD_CLEARTID))
@@ -675,11 +529,9 @@
 		printflags(clone_flags, tcp->u_arg[0], "CLONE_???");
 	return 0;
 }
-#endif /* LINUX */
 
 int
-sys_fork(tcp)
-struct tcb *tcp;
+sys_fork(struct tcb *tcp)
 {
 	if (exiting(tcp))
 		return RVAL_UDECIMAL;
@@ -687,426 +539,13 @@
 }
 
 int
-change_syscall(struct tcb *tcp, int new)
-{
-#ifdef LINUX
-#if defined(I386)
-	/* Attempt to make vfork into fork, which we can follow. */
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0)
-		return -1;
-	return 0;
-#elif defined(X86_64)
-	/* Attempt to make vfork into fork, which we can follow. */
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_RAX * 8), new) < 0)
-		return -1;
-	return 0;
-#elif defined(POWERPC)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid,
-		   (char*)(sizeof(unsigned long)*PT_R0), new) < 0)
-		return -1;
-	return 0;
-#elif defined(S390) || defined(S390X)
-	/* s390 linux after 2.4.7 has a hook in entry.S to allow this */
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR2), new)<0)
-		return -1;
-	return 0;
-#elif defined(M68K)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_ORIG_D0), new)<0)
-		return -1;
-	return 0;
-#elif defined(SPARC) || defined(SPARC64)
-	struct pt_regs regs;
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)&regs, 0)<0)
-		return -1;
-	regs.u_regs[U_REG_G1] = new;
-	if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)&regs, 0)<0)
-		return -1;
-	return 0;
-#elif defined(MIPS)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), new)<0)
-		return -1;
-	return 0;
-#elif defined(ALPHA)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new)<0)
-		return -1;
-	return 0;
-#elif defined(AVR32)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R8), new) < 0)
-		return -1;
-	return 0;
-#elif defined(BFIN)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_P0), new)<0)
-		return -1;
-	return 0;
-#elif defined(IA64)
-	if (ia32) {
-		switch (new) {
-		case 2:
-			break;	/* x86 SYS_fork */
-		case SYS_clone:
-			new = 120;
-			break;
-		default:
-			fprintf(stderr, "%s: unexpected syscall %d\n",
-				__FUNCTION__, new);
-			return -1;
-		}
-		if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R1), new)<0)
-			return -1;
-	} else if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R15), new)<0)
-		return -1;
-	return 0;
-#elif defined(HPPA)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GR20), new)<0)
-		return -1;
-	return 0;
-#elif defined(SH)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*(REG_REG0+3)), new)<0)
-		return -1;
-	return 0;
-#elif defined(SH64)
-	/* Top half of reg encodes the no. of args n as 0x1n.
-	   Assume 0 args as kernel never actually checks... */
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_SYSCALL),
-				0x100000 | new) < 0)
-		return -1;
-	return 0;
-#elif defined(CRISV10) || defined(CRISV32)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0)
-		return -1;
-	return 0;
-#elif defined(ARM)
-	/* Some kernels support this, some (pre-2.6.16 or so) don't.  */
-# ifndef PTRACE_SET_SYSCALL
-#  define PTRACE_SET_SYSCALL 23
-# endif
-
-	if (ptrace (PTRACE_SET_SYSCALL, tcp->pid, 0, new & 0xffff) != 0)
-		return -1;
-
-	return 0;
-#elif defined(TILE)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid,
-		   (char*)PTREGS_OFFSET_REG(0),
-		   new) != 0)
-		return -1;
-	return 0;
-#elif defined(MICROBLAZE)
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR(0)), new)<0)
-		return -1;
-	return 0;
-#else
-#warning Do not know how to handle change_syscall for this architecture
-#endif /* architecture */
-#endif /* LINUX */
-	return -1;
-}
-
-#ifdef LINUX
-int
-handle_new_child(struct tcb *tcp, int pid, int bpt)
-{
-	struct tcb *tcpchild;
-
-#ifdef CLONE_PTRACE		/* See new setbpt code.  */
-	tcpchild = pid2tcb(pid);
-	if (tcpchild != NULL) {
-		/* The child already reported its startup trap
-		   before the parent reported its syscall return.  */
-		if ((tcpchild->flags
-		     & (TCB_STARTUP|TCB_ATTACHED|TCB_SUSPENDED))
-		    != (TCB_STARTUP|TCB_ATTACHED|TCB_SUSPENDED))
-			fprintf(stderr, "\
-[preattached child %d of %d in weird state!]\n",
-				pid, tcp->pid);
-	}
-	else
-#endif /* CLONE_PTRACE */
-	{
-		fork_tcb(tcp);
-		tcpchild = alloctcb(pid);
-	}
-
-#ifndef CLONE_PTRACE
-	/* Attach to the new child */
-	if (ptrace(PTRACE_ATTACH, pid, (char *) 1, 0) < 0) {
-		if (bpt)
-			clearbpt(tcp);
-		perror("PTRACE_ATTACH");
-		fprintf(stderr, "Too late?\n");
-		droptcb(tcpchild);
-		return 0;
-	}
-#endif /* !CLONE_PTRACE */
-
-	if (bpt)
-		clearbpt(tcp);
-
-	tcpchild->flags |= TCB_ATTACHED;
-	/* Child has BPT too, must be removed on first occasion.  */
-	if (bpt) {
-		tcpchild->flags |= TCB_BPTSET;
-		tcpchild->baddr = tcp->baddr;
-		memcpy(tcpchild->inst, tcp->inst,
-			sizeof tcpchild->inst);
-	}
-	tcpchild->parent = tcp;
-	tcp->nchildren++;
-	if (tcpchild->flags & TCB_SUSPENDED) {
-		/* The child was born suspended, due to our having
-		   forced CLONE_PTRACE.  */
-		if (bpt)
-			clearbpt(tcpchild);
-
-		tcpchild->flags &= ~(TCB_SUSPENDED|TCB_STARTUP);
-		if (ptrace_restart(PTRACE_SYSCALL, tcpchild, 0) < 0)
-			return -1;
-
-		if (!qflag)
-			fprintf(stderr, "\
-Process %u resumed (parent %d ready)\n",
-				pid, tcp->pid);
-	}
-	else {
-		if (!qflag)
-			fprintf(stderr, "Process %d attached\n", pid);
-	}
-
-#ifdef TCB_CLONE_THREAD
-	if (sysent[tcp->scno].sys_func == sys_clone)
-	{
-		/*
-		 * Save the flags used in this call,
-		 * in case we point TCP to our parent below.
-		 */
-		int call_flags = tcp->u_arg[ARG_FLAGS];
-		if ((tcp->flags & TCB_CLONE_THREAD) &&
-		    tcp->parent != NULL) {
-			/* The parent in this clone is itself a
-			   thread belonging to another process.
-			   There is no meaning to the parentage
-			   relationship of the new child with the
-			   thread, only with the process.  We
-			   associate the new thread with our
-			   parent.  Since this is done for every
-			   new thread, there will never be a
-			   TCB_CLONE_THREAD process that has
-			   children.  */
-			--tcp->nchildren;
-			tcp = tcp->parent;
-			tcpchild->parent = tcp;
-			++tcp->nchildren;
-		}
-		if (call_flags & CLONE_THREAD) {
-			tcpchild->flags |= TCB_CLONE_THREAD;
-			++tcp->nclone_threads;
-		}
-		if ((call_flags & CLONE_PARENT) &&
-		    !(call_flags & CLONE_THREAD)) {
-			--tcp->nchildren;
-			tcpchild->parent = NULL;
-			if (tcp->parent != NULL) {
-				tcp = tcp->parent;
-				tcpchild->parent = tcp;
-				++tcp->nchildren;
-			}
-		}
-	}
-#endif /* TCB_CLONE_THREAD */
-	return 0;
-}
-
-int
-internal_fork(struct tcb *tcp)
-{
-	if ((ptrace_setoptions
-	    & (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
-	   == (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
-		return 0;
-
-	if (entering(tcp)) {
-		tcp->flags &= ~TCB_FOLLOWFORK;
-		if (!followfork)
-			return 0;
-		/*
-		 * In occasion of using PTRACE_O_TRACECLONE, we won't see the
-		 * new child if clone is called with flag CLONE_UNTRACED, so
-		 * we keep the same logic with that option and don't trace it.
-		 */
-		if ((sysent[tcp->scno].sys_func == sys_clone) &&
-		    (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED))
-			return 0;
-		fork_tcb(tcp);
-		if (setbpt(tcp) < 0)
-			return 0;
-	} else {
-		int pid;
-		int bpt;
-
-		if (!(tcp->flags & TCB_FOLLOWFORK))
-			return 0;
-
-		bpt = tcp->flags & TCB_BPTSET;
-
-		if (syserror(tcp)) {
-			if (bpt)
-				clearbpt(tcp);
-			return 0;
-		}
-
-		pid = tcp->u_rval;
-
-		return handle_new_child(tcp, pid, bpt);
-	}
-	return 0;
-}
-
-#else /* !LINUX */
-
-int
-internal_fork(tcp)
-struct tcb *tcp;
-{
-	struct tcb *tcpchild;
-	int pid;
-	int dont_follow = 0;
-
-#ifdef SYS_vfork
-	if (known_scno(tcp) == SYS_vfork) {
-		/* Attempt to make vfork into fork, which we can follow. */
-		if (change_syscall(tcp, SYS_fork) < 0)
-			dont_follow = 1;
-	}
-#endif
-	if (entering(tcp)) {
-		if (!followfork || dont_follow)
-			return 0;
-		fork_tcb(tcp);
-		if (setbpt(tcp) < 0)
-			return 0;
-	}
-	else {
-		int bpt = tcp->flags & TCB_BPTSET;
-
-		if (!(tcp->flags & TCB_FOLLOWFORK))
-			return 0;
-		if (bpt)
-			clearbpt(tcp);
-
-		if (syserror(tcp))
-			return 0;
-
-		pid = tcp->u_rval;
-		fork_tcb(tcp);
-		tcpchild = alloctcb(pid);
-#ifdef SUNOS4
-#ifdef oldway
-		/* The child must have run before it can be attached. */
-		{
-			struct timeval tv;
-			tv.tv_sec = 0;
-			tv.tv_usec = 10000;
-			select(0, NULL, NULL, NULL, &tv);
-		}
-		if (ptrace(PTRACE_ATTACH, pid, (char *)1, 0) < 0) {
-			perror("PTRACE_ATTACH");
-			fprintf(stderr, "Too late?\n");
-			droptcb(tcpchild);
-			return 0;
-		}
-#else /* !oldway */
-		/* Try to catch the new process as soon as possible. */
-		{
-			int i;
-			for (i = 0; i < 1024; i++)
-				if (ptrace(PTRACE_ATTACH, pid, (char *) 1, 0) >= 0)
-					break;
-			if (i == 1024) {
-				perror("PTRACE_ATTACH");
-				fprintf(stderr, "Too late?\n");
-				droptcb(tcpchild);
-				return 0;
-			}
-		}
-#endif /* !oldway */
-#endif /* SUNOS4 */
-		tcpchild->flags |= TCB_ATTACHED;
-		/* Child has BPT too, must be removed on first occasion */
-		if (bpt) {
-			tcpchild->flags |= TCB_BPTSET;
-			tcpchild->baddr = tcp->baddr;
-			memcpy(tcpchild->inst, tcp->inst,
-				sizeof tcpchild->inst);
-		}
-		tcpchild->parent = tcp;
-		tcp->nchildren++;
-		if (!qflag)
-			fprintf(stderr, "Process %d attached\n", pid);
-	}
-	return 0;
-}
-
-#endif /* !LINUX */
-
-#endif /* !USE_PROCFS */
-
-#if defined(SUNOS4) || defined(LINUX) || defined(FREEBSD)
-
-int
-sys_vfork(tcp)
-struct tcb *tcp;
+sys_vfork(struct tcb *tcp)
 {
 	if (exiting(tcp))
 		return RVAL_UDECIMAL;
 	return 0;
 }
 
-#endif /* SUNOS4 || LINUX || FREEBSD */
-
-#ifndef LINUX
-
-static char idstr[16];
-
-int
-sys_getpid(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		sprintf(idstr, "ppid %lu", getrval2(tcp));
-		tcp->auxstr = idstr;
-		return RVAL_STR;
-	}
-	return 0;
-}
-
-int
-sys_getuid(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		sprintf(idstr, "euid %lu", getrval2(tcp));
-		tcp->auxstr = idstr;
-		return RVAL_STR;
-	}
-	return 0;
-}
-
-int
-sys_getgid(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		sprintf(idstr, "egid %lu", getrval2(tcp));
-		tcp->auxstr = idstr;
-		return RVAL_STR;
-	}
-	return 0;
-}
-
-#endif /* !LINUX */
-
-#ifdef LINUX
-
 int sys_getuid(struct tcb *tcp)
 {
 	if (exiting(tcp))
@@ -1124,8 +563,7 @@
 }
 
 int
-sys_setuid(tcp)
-struct tcb *tcp;
+sys_setuid(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%u", (uid_t) tcp->u_arg[0]);
@@ -1134,16 +572,6 @@
 }
 
 int
-sys_setgid(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%u", (gid_t) tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-int
 sys_getresuid(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
@@ -1170,37 +598,7 @@
 }
 
 int
-sys_getresgid(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		__kernel_gid_t gid;
-		if (syserror(tcp))
-			tprintf("%#lx, %#lx, %#lx", tcp->u_arg[0],
-				tcp->u_arg[1], tcp->u_arg[2]);
-		else {
-			if (umove(tcp, tcp->u_arg[0], &gid) < 0)
-				tprintf("%#lx, ", tcp->u_arg[0]);
-			else
-				tprintf("[%lu], ", (unsigned long) gid);
-			if (umove(tcp, tcp->u_arg[1], &gid) < 0)
-				tprintf("%#lx, ", tcp->u_arg[1]);
-			else
-				tprintf("[%lu], ", (unsigned long) gid);
-			if (umove(tcp, tcp->u_arg[2], &gid) < 0)
-				tprintf("%#lx", tcp->u_arg[2]);
-			else
-				tprintf("[%lu]", (unsigned long) gid);
-		}
-	}
-	return 0;
-}
-
-#endif /* LINUX */
-
-int
-sys_setreuid(tcp)
-struct tcb *tcp;
+sys_setreuid(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printuid("", tcp->u_arg[0]);
@@ -1210,31 +608,7 @@
 }
 
 int
-sys_setregid(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printuid("", tcp->u_arg[0]);
-		printuid(", ", tcp->u_arg[1]);
-	}
-	return 0;
-}
-
-#if defined(LINUX) || defined(FREEBSD)
-int
-sys_setresuid(tcp)
-     struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printuid("", tcp->u_arg[0]);
-		printuid(", ", tcp->u_arg[1]);
-		printuid(", ", tcp->u_arg[2]);
-	}
-	return 0;
-}
-int
-sys_setresgid(tcp)
-     struct tcb *tcp;
+sys_setresuid(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printuid("", tcp->u_arg[0]);
@@ -1244,11 +618,8 @@
 	return 0;
 }
 
-#endif /* LINUX || FREEBSD */
-
 int
-sys_setgroups(tcp)
-struct tcb *tcp;
+sys_setgroups(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		unsigned long len, size, start, cur, end, abbrev_end;
@@ -1258,12 +629,12 @@
 		len = tcp->u_arg[0];
 		tprintf("%lu, ", len);
 		if (len == 0) {
-			tprintf("[]");
+			tprints("[]");
 			return 0;
 		}
 		start = tcp->u_arg[1];
 		if (start == 0) {
-			tprintf("NULL");
+			tprints("NULL");
 			return 0;
 		}
 		size = len * sizeof(gid);
@@ -1279,22 +650,22 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf("[");
+		tprints("[");
 		for (cur = start; cur < end; cur += sizeof(gid)) {
 			if (cur > start)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
 			tprintf("%lu", (unsigned long) gid);
 		}
-		tprintf("]");
+		tprints("]");
 		if (failed)
 			tprintf(" %#lx", tcp->u_arg[1]);
 	}
@@ -1302,8 +673,7 @@
 }
 
 int
-sys_getgroups(tcp)
-struct tcb *tcp;
+sys_getgroups(struct tcb *tcp)
 {
 	unsigned long len;
 
@@ -1317,12 +687,12 @@
 
 		len = tcp->u_rval;
 		if (len == 0) {
-			tprintf("[]");
+			tprints("[]");
 			return 0;
 		}
 		start = tcp->u_arg[1];
 		if (start == 0) {
-			tprintf("NULL");
+			tprints("NULL");
 			return 0;
 		}
 		if (tcp->u_arg[0] == 0) {
@@ -1343,32 +713,30 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf("[");
+		tprints("[");
 		for (cur = start; cur < end; cur += sizeof(gid)) {
 			if (cur > start)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
 			tprintf("%lu", (unsigned long) gid);
 		}
-		tprintf("]");
+		tprints("]");
 		if (failed)
 			tprintf(" %#lx", tcp->u_arg[1]);
 	}
 	return 0;
 }
 
-#ifdef LINUX
 int
-sys_setgroups32(tcp)
-struct tcb *tcp;
+sys_setgroups32(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		unsigned long len, size, start, cur, end, abbrev_end;
@@ -1378,12 +746,12 @@
 		len = tcp->u_arg[0];
 		tprintf("%lu, ", len);
 		if (len == 0) {
-			tprintf("[]");
+			tprints("[]");
 			return 0;
 		}
 		start = tcp->u_arg[1];
 		if (start == 0) {
-			tprintf("NULL");
+			tprints("NULL");
 			return 0;
 		}
 		size = len * sizeof(gid);
@@ -1399,22 +767,22 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf("[");
+		tprints("[");
 		for (cur = start; cur < end; cur += sizeof(gid)) {
 			if (cur > start)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
 			tprintf("%lu", (unsigned long) gid);
 		}
-		tprintf("]");
+		tprints("]");
 		if (failed)
 			tprintf(" %#lx", tcp->u_arg[1]);
 	}
@@ -1422,8 +790,7 @@
 }
 
 int
-sys_getgroups32(tcp)
-struct tcb *tcp;
+sys_getgroups32(struct tcb *tcp)
 {
 	unsigned long len;
 
@@ -1437,12 +804,12 @@
 
 		len = tcp->u_rval;
 		if (len == 0) {
-			tprintf("[]");
+			tprints("[]");
 			return 0;
 		}
 		start = tcp->u_arg[1];
 		if (start == 0) {
-			tprintf("NULL");
+			tprints("NULL");
 			return 0;
 		}
 		size = len * sizeof(gid);
@@ -1459,225 +826,27 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf("[");
+		tprints("[");
 		for (cur = start; cur < end; cur += sizeof(gid)) {
 			if (cur > start)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof(gid), (char *) &gid) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
 			tprintf("%lu", (unsigned long) gid);
 		}
-		tprintf("]");
+		tprints("]");
 		if (failed)
 			tprintf(" %#lx", tcp->u_arg[1]);
 	}
 	return 0;
 }
-#endif /* LINUX */
-
-#if defined(ALPHA) || defined(SUNOS4) || defined(SVR4)
-int
-sys_setpgrp(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-#ifndef SVR4
-		tprintf("%lu, %lu", tcp->u_arg[0], tcp->u_arg[1]);
-#endif /* !SVR4 */
-	}
-	return 0;
-}
-#endif /* ALPHA || SUNOS4 || SVR4 */
-
-int
-sys_getpgrp(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-#ifndef SVR4
-		tprintf("%lu", tcp->u_arg[0]);
-#endif /* !SVR4 */
-	}
-	return 0;
-}
-
-int
-sys_getsid(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%lu", tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-int
-sys_setsid(tcp)
-struct tcb *tcp;
-{
-	return 0;
-}
-
-int
-sys_getpgid(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%lu", tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-int
-sys_setpgid(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%lu, %lu", tcp->u_arg[0], tcp->u_arg[1]);
-	}
-	return 0;
-}
-
-#if UNIXWARE >= 2
-
-#include <sys/privilege.h>
-
-
-static const struct xlat procpriv_cmds [] = {
-	{ SETPRV,	"SETPRV"	},
-	{ CLRPRV,	"CLRPRV"	},
-	{ PUTPRV,	"PUTPRV"	},
-	{ GETPRV,	"GETPRV"	},
-	{ CNTPRV,	"CNTPRV"	},
-	{ 0,		NULL		},
-};
-
-
-static const struct xlat procpriv_priv [] = {
-	{ P_OWNER,	"P_OWNER"	},
-	{ P_AUDIT,	"P_AUDIT"	},
-	{ P_COMPAT,	"P_COMPAT"	},
-	{ P_DACREAD,	"P_DACREAD"	},
-	{ P_DACWRITE,	"P_DACWRITE"	},
-	{ P_DEV,	"P_DEV"		},
-	{ P_FILESYS,	"P_FILESYS"	},
-	{ P_MACREAD,	"P_MACREAD"	},
-	{ P_MACWRITE,	"P_MACWRITE"	},
-	{ P_MOUNT,	"P_MOUNT"	},
-	{ P_MULTIDIR,	"P_MULTIDIR"	},
-	{ P_SETPLEVEL,	"P_SETPLEVEL"	},
-	{ P_SETSPRIV,	"P_SETSPRIV"	},
-	{ P_SETUID,	"P_SETUID"	},
-	{ P_SYSOPS,	"P_SYSOPS"	},
-	{ P_SETUPRIV,	"P_SETUPRIV"	},
-	{ P_DRIVER,	"P_DRIVER"	},
-	{ P_RTIME,	"P_RTIME"	},
-	{ P_MACUPGRADE,	"P_MACUPGRADE"	},
-	{ P_FSYSRANGE,	"P_FSYSRANGE"	},
-	{ P_SETFLEVEL,	"P_SETFLEVEL"	},
-	{ P_AUDITWR,	"P_AUDITWR"	},
-	{ P_TSHAR,	"P_TSHAR"	},
-	{ P_PLOCK,	"P_PLOCK"	},
-	{ P_CORE,	"P_CORE"	},
-	{ P_LOADMOD,	"P_LOADMOD"	},
-	{ P_BIND,	"P_BIND"	},
-	{ P_ALLPRIVS,	"P_ALLPRIVS"	},
-	{ 0,		NULL		},
-};
-
-
-static const struct xlat procpriv_type [] = {
-	{ PS_FIX,	"PS_FIX"	},
-	{ PS_INH,	"PS_INH"	},
-	{ PS_MAX,	"PS_MAX"	},
-	{ PS_WKG,	"PS_WKG"	},
-	{ 0,		NULL		},
-};
-
-
-static void
-printpriv(struct tcb *tcp, long addr, int len, const struct xlat *opt)
-{
-	priv_t buf [128];
-	int max = verbose (tcp) ? sizeof buf / sizeof buf [0] : 10;
-	int dots = len > max;
-	int i;
-
-	if (len > max) len = max;
-
-	if (len <= 0 ||
-	    umoven (tcp, addr, len * sizeof buf[0], (char *) buf) < 0)
-	{
-		tprintf ("%#lx", addr);
-		return;
-	}
-
-	tprintf ("[");
-
-	for (i = 0; i < len; ++i) {
-		const char *t, *p;
-
-		if (i) tprintf (", ");
-
-		if ((t = xlookup (procpriv_type, buf [i] & PS_TYPE)) &&
-		    (p = xlookup (procpriv_priv, buf [i] & ~PS_TYPE)))
-		{
-			tprintf ("%s|%s", t, p);
-		}
-		else {
-			tprintf ("%#lx", buf [i]);
-		}
-	}
-
-	if (dots) tprintf (" ...");
-
-	tprintf ("]");
-}
-
-
-int
-sys_procpriv(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printxval(procpriv_cmds, tcp->u_arg[0], "???PRV");
-		switch (tcp->u_arg[0]) {
-		    case CNTPRV:
-			tprintf(", %#lx, %ld", tcp->u_arg[1], tcp->u_arg[2]);
-			break;
-
-		    case GETPRV:
-			break;
-
-		    default:
-			tprintf (", ");
-			printpriv (tcp, tcp->u_arg[1], tcp->u_arg[2]);
-			tprintf (", %ld", tcp->u_arg[2]);
-		}
-	}
-	else if (tcp->u_arg[0] == GETPRV) {
-		if (syserror (tcp)) {
-			tprintf(", %#lx, %ld", tcp->u_arg[1], tcp->u_arg[2]);
-		}
-		else {
-			tprintf (", ");
-			printpriv (tcp, tcp->u_arg[1], tcp->u_rval);
-			tprintf (", %ld", tcp->u_arg[2]);
-		}
-	}
-
-	return 0;
-}
-
-#endif /* UNIXWARE */
-
 
 static void
 printargv(struct tcb *tcp, long addr)
@@ -1689,21 +858,21 @@
 	} cp;
 	const char *sep;
 	int n = 0;
+	unsigned wordsize = current_wordsize;
 
 	cp.p64 = 1;
 	for (sep = ""; !abbrev(tcp) || n < max_strlen / 2; sep = ", ", ++n) {
-		if (umoven(tcp, addr, personality_wordsize[current_personality],
-			   cp.data) < 0) {
+		if (umoven(tcp, addr, wordsize, cp.data) < 0) {
 			tprintf("%#lx", addr);
 			return;
 		}
-		if (personality_wordsize[current_personality] == 4)
+		if (wordsize == 4)
 			cp.p64 = cp.p32;
 		if (cp.p64 == 0)
 			break;
-		tprintf("%s", sep);
+		tprints(sep);
 		printstr(tcp, cp.p64, -1);
-		addr += personality_wordsize[current_personality];
+		addr += wordsize;
 	}
 	if (cp.p64)
 		tprintf("%s...", sep);
@@ -1721,7 +890,7 @@
 	tprintf(fmt, count, count == 1 ? "" : "s");
 }
 
-#if defined(SPARC) || defined(SPARC64) || defined(SUNOS4)
+#if defined(SPARC) || defined(SPARC64)
 int
 sys_execv(struct tcb *tcp)
 {
@@ -1730,14 +899,14 @@
 		if (!verbose(tcp))
 			tprintf(", %#lx", tcp->u_arg[1]);
 		else {
-			tprintf(", [");
+			tprints(", [");
 			printargv(tcp, tcp->u_arg[1]);
-			tprintf("]");
+			tprints("]");
 		}
 	}
 	return 0;
 }
-#endif /* SPARC || SPARC64 || SUNOS4 */
+#endif
 
 int
 sys_execve(struct tcb *tcp)
@@ -1747,55 +916,23 @@
 		if (!verbose(tcp))
 			tprintf(", %#lx", tcp->u_arg[1]);
 		else {
-			tprintf(", [");
+			tprints(", [");
 			printargv(tcp, tcp->u_arg[1]);
-			tprintf("]");
+			tprints("]");
 		}
 		if (!verbose(tcp))
 			tprintf(", %#lx", tcp->u_arg[2]);
 		else if (abbrev(tcp))
 			printargc(", [/* %d var%s */]", tcp, tcp->u_arg[2]);
 		else {
-			tprintf(", [");
+			tprints(", [");
 			printargv(tcp, tcp->u_arg[2]);
-			tprintf("]");
+			tprints("]");
 		}
 	}
 	return 0;
 }
 
-#if UNIXWARE > 2
-
-int sys_rexecve(tcp)
-struct tcb *tcp;
-{
-	if (entering (tcp)) {
-		sys_execve (tcp);
-		tprintf (", %ld", tcp->u_arg[3]);
-	}
-	return 0;
-}
-
-#endif
-
-int
-internal_exec(tcp)
-struct tcb *tcp;
-{
-#ifdef SUNOS4
-	if (exiting(tcp) && !syserror(tcp) && followfork)
-		fixvfork(tcp);
-#endif /* SUNOS4 */
-#if defined LINUX && defined TCB_WAITEXECVE
-	if (exiting(tcp) && syserror(tcp))
-		tcp->flags &= ~TCB_WAITEXECVE;
-	else
-		tcp->flags |= TCB_WAITEXECVE;
-#endif /* LINUX && TCB_WAITEXECVE */
-	return 0;
-}
-
-#ifdef LINUX
 #ifndef __WNOTHREAD
 #define __WNOTHREAD	0x20000000
 #endif
@@ -1805,7 +942,6 @@
 #ifndef __WCLONE
 #define __WCLONE	0x80000000
 #endif
-#endif /* LINUX */
 
 static const struct xlat wait4_options[] = {
 	{ WNOHANG,	"WNOHANG"	},
@@ -1846,20 +982,17 @@
 # define WCOREFLAG 0x80
 #endif
 #ifndef WCOREDUMP
-# define WCOREDUMP(status) ((status) & 0200)
+# define WCOREDUMP(status)  ((status) & 0200)
 #endif
-
-
 #ifndef W_STOPCODE
-#define W_STOPCODE(sig)		((sig) << 8 | 0x7f)
+# define W_STOPCODE(sig)  ((sig) << 8 | 0x7f)
 #endif
 #ifndef W_EXITCODE
-#define W_EXITCODE(ret, sig)	((ret) << 8 | (sig))
+# define W_EXITCODE(ret, sig)  ((ret) << 8 | (sig))
 #endif
 
 static int
-printstatus(status)
-int status;
+printstatus(int status)
 {
 	int exited = 0;
 
@@ -1891,7 +1024,7 @@
 	}
 
 	if (status == 0)
-		tprintf("]");
+		tprints("]");
 	else
 		tprintf(" | %#x]", status);
 
@@ -1902,12 +1035,8 @@
 printwaitn(struct tcb *tcp, int n, int bitness)
 {
 	int status;
-#ifdef SUNOS4
-	int exited = 0;
-#endif
 
 	if (entering(tcp)) {
-#ifdef LINUX
 		/* On Linux, kernel-side pid_t is typedef'ed to int
 		 * on all arches. Also, glibc-2.8 truncates wait3 and wait4
 		 * pid argument to int on 64bit arches, producing,
@@ -1916,37 +1045,24 @@
 		 */
 		int pid = tcp->u_arg[0];
 		tprintf("%d, ", pid);
-#else
-		/*
-		 * Sign-extend a 32-bit value when that's what it is.
-		 */
-		long pid = tcp->u_arg[0];
-		if (personality_wordsize[current_personality] < sizeof pid)
-			pid = (long) (int) pid;
-		tprintf("%ld, ", pid);
-#endif
 	} else {
 		/* status */
 		if (!tcp->u_arg[1])
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp) || tcp->u_rval == 0)
 			tprintf("%#lx", tcp->u_arg[1]);
 		else if (umove(tcp, tcp->u_arg[1], &status) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
-#ifdef SUNOS4
-			exited =
-#endif
 			printstatus(status);
 		/* options */
-		tprintf(", ");
+		tprints(", ");
 		printflags(wait4_options, tcp->u_arg[2], "W???");
 		if (n == 4) {
-			tprintf(", ");
+			tprints(", ");
 			/* usage */
 			if (!tcp->u_arg[3])
-				tprintf("NULL");
-#ifdef LINUX
+				tprints("NULL");
 			else if (tcp->u_rval > 0) {
 #ifdef ALPHA
 				if (bitness)
@@ -1955,11 +1071,6 @@
 #endif
 					printrusage(tcp, tcp->u_arg[3]);
 			}
-#endif /* LINUX */
-#ifdef SUNOS4
-			else if (tcp->u_rval > 0 && exited)
-				printrusage(tcp, tcp->u_arg[3]);
-#endif /* SUNOS4 */
 			else
 				tprintf("%#lx", tcp->u_arg[3]);
 		}
@@ -1968,153 +1079,25 @@
 }
 
 int
-internal_wait(tcp, flagarg)
-struct tcb *tcp;
-int flagarg;
-{
-	int got_kids;
-
-#ifdef TCB_CLONE_THREAD
-	if (tcp->flags & TCB_CLONE_THREAD)
-		/* The children we wait for are our parent's children.  */
-		got_kids = (tcp->parent->nchildren
-			    > tcp->parent->nclone_threads);
-	else
-		got_kids = (tcp->nchildren > tcp->nclone_threads);
-#else
-	got_kids = tcp->nchildren > 0;
-#endif
-
-	if (entering(tcp) && got_kids) {
-		/* There are children that this parent should block for.
-		   But ptrace made us the parent of the traced children
-		   and the real parent will get ECHILD from the wait call.
-
-		   XXX If we attached with strace -f -p PID, then there
-		   may be untraced dead children the parent could be reaping
-		   now, but we make him block.  */
-
-		/* ??? WTA: fix bug with hanging children */
-
-		if (!(tcp->u_arg[flagarg] & WNOHANG)) {
-			/*
-			 * There are traced children.  We'll make the parent
-			 * block to avoid a false ECHILD error due to our
-			 * ptrace having stolen the children.  However,
-			 * we shouldn't block if there are zombies to reap.
-			 * XXX doesn't handle pgrp matches (u_arg[0]==0,<-1)
-			 */
-			struct tcb *child = NULL;
-			if (tcp->nzombies > 0 &&
-			    (tcp->u_arg[0] == -1 ||
-			     (child = pid2tcb(tcp->u_arg[0])) == NULL))
-				return 0;
-			if (tcp->u_arg[0] > 0) {
-				/*
-				 * If the parent waits for a specified child
-				 * PID, then it must get ECHILD right away
-				 * if that PID is not one of its children.
-				 * Make sure that the requested PID matches
-				 * one of the parent's children that we are
-				 * tracing, and don't suspend it otherwise.
-				 */
-				if (child == NULL)
-					child = pid2tcb(tcp->u_arg[0]);
-				if (child == NULL || child->parent != (
-#ifdef TCB_CLONE_THREAD
-					    (tcp->flags & TCB_CLONE_THREAD)
-					    ? tcp->parent :
-#endif
-					    tcp) ||
-				    (child->flags & TCB_EXITING))
-					return 0;
-			}
-			tcp->flags |= TCB_SUSPENDED;
-			tcp->waitpid = tcp->u_arg[0];
-#ifdef TCB_CLONE_THREAD
-			if (tcp->flags & TCB_CLONE_THREAD)
-				tcp->parent->nclone_waiting++;
-#endif
-		}
-	}
-	if (exiting(tcp) && tcp->u_error == ECHILD && got_kids) {
-		if (tcp->u_arg[flagarg] & WNOHANG) {
-			/* We must force a fake result of 0 instead of
-			   the ECHILD error.  */
-			return force_result(tcp, 0, 0);
-		}
-	}
-	else if (exiting(tcp) && tcp->u_error == 0 && tcp->u_rval > 0 &&
-		 tcp->nzombies > 0 && pid2tcb(tcp->u_rval) == NULL) {
-		/*
-		 * We just reaped a child we don't know about,
-		 * presumably a zombie we already droptcb'd.
-		 */
-		tcp->nzombies--;
-	}
-	return 0;
-}
-
-#ifdef SVR4
-
-int
-sys_wait(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-		/* The library wrapper stuffs this into the user variable. */
-		if (!syserror(tcp))
-			printstatus(getrval2(tcp));
-	}
-	return 0;
-}
-
-#endif /* SVR4 */
-
-#ifdef FREEBSD
-int
-sys_wait(tcp)
-struct tcb *tcp;
-{
-	int status;
-
-	if (exiting(tcp)) {
-		if (!syserror(tcp)) {
-			if (umove(tcp, tcp->u_arg[0], &status) < 0)
-				tprintf("%#lx", tcp->u_arg[0]);
-			else
-				printstatus(status);
-		}
-	}
-	return 0;
-}
-#endif
-
-int
-sys_waitpid(tcp)
-struct tcb *tcp;
+sys_waitpid(struct tcb *tcp)
 {
 	return printwaitn(tcp, 3, 0);
 }
 
 int
-sys_wait4(tcp)
-struct tcb *tcp;
+sys_wait4(struct tcb *tcp)
 {
 	return printwaitn(tcp, 4, 0);
 }
 
 #ifdef ALPHA
 int
-sys_osf_wait4(tcp)
-struct tcb *tcp;
+sys_osf_wait4(struct tcb *tcp)
 {
 	return printwaitn(tcp, 4, 1);
 }
 #endif
 
-#if defined SVR4 || defined LINUX
-
 static const struct xlat waitid_types[] = {
 	{ P_PID,	"P_PID"		},
 #ifdef P_PPID
@@ -2152,21 +1135,21 @@
 	else {
 		/* siginfo */
 		if (!tcp->u_arg[2])
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[2]);
 		else if (umove(tcp, tcp->u_arg[2], &si) < 0)
-			tprintf("{???}");
+			tprints("{???}");
 		else
 			printsiginfo(&si, verbose(tcp));
 		/* options */
-		tprintf(", ");
+		tprints(", ");
 		printflags(wait4_options, tcp->u_arg[3], "W???");
 		if (tcp->u_nargs > 4) {
 			/* usage */
-			tprintf(", ");
+			tprints(", ");
 			if (!tcp->u_arg[4])
-				tprintf("NULL");
+				tprints("NULL");
 			else if (tcp->u_error)
 				tprintf("%#lx", tcp->u_arg[4]);
 			else
@@ -2176,20 +1159,8 @@
 	return 0;
 }
 
-#endif /* SVR4 or LINUX */
-
 int
-sys_alarm(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp))
-		tprintf("%lu", tcp->u_arg[0]);
-	return 0;
-}
-
-int
-sys_uname(tcp)
-struct tcb *tcp;
+sys_uname(struct tcb *tcp)
 {
 	struct utsname uname;
 
@@ -2197,20 +1168,17 @@
 		if (syserror(tcp) || !verbose(tcp))
 			tprintf("%#lx", tcp->u_arg[0]);
 		else if (umove(tcp, tcp->u_arg[0], &uname) < 0)
-			tprintf("{...}");
+			tprints("{...}");
 		else if (!abbrev(tcp)) {
-
 			tprintf("{sysname=\"%s\", nodename=\"%s\", ",
 				uname.sysname, uname.nodename);
 			tprintf("release=\"%s\", version=\"%s\", ",
 				uname.release, uname.version);
 			tprintf("machine=\"%s\"", uname.machine);
-#ifdef LINUX
-#ifndef __GLIBC__
+#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME
 			tprintf(", domainname=\"%s\"", uname.domainname);
 #endif
-#endif
-			tprintf("}");
+			tprints("}");
 		}
 		else
 			tprintf("{sys=\"%s\", node=\"%s\", ...}",
@@ -2219,155 +1187,109 @@
 	return 0;
 }
 
-#ifndef SVR4
-
 static const struct xlat ptrace_cmds[] = {
-# ifndef FREEBSD
 	{ PTRACE_TRACEME,	"PTRACE_TRACEME"	},
-	{ PTRACE_PEEKTEXT,	"PTRACE_PEEKTEXT",	},
-	{ PTRACE_PEEKDATA,	"PTRACE_PEEKDATA",	},
-	{ PTRACE_PEEKUSER,	"PTRACE_PEEKUSER",	},
-	{ PTRACE_POKETEXT,	"PTRACE_POKETEXT",	},
-	{ PTRACE_POKEDATA,	"PTRACE_POKEDATA",	},
-	{ PTRACE_POKEUSER,	"PTRACE_POKEUSER",	},
+	{ PTRACE_PEEKTEXT,	"PTRACE_PEEKTEXT"	},
+	{ PTRACE_PEEKDATA,	"PTRACE_PEEKDATA"	},
+	{ PTRACE_PEEKUSER,	"PTRACE_PEEKUSER"	},
+	{ PTRACE_POKETEXT,	"PTRACE_POKETEXT"	},
+	{ PTRACE_POKEDATA,	"PTRACE_POKEDATA"	},
+	{ PTRACE_POKEUSER,	"PTRACE_POKEUSER"	},
 	{ PTRACE_CONT,		"PTRACE_CONT"		},
 	{ PTRACE_KILL,		"PTRACE_KILL"		},
 	{ PTRACE_SINGLESTEP,	"PTRACE_SINGLESTEP"	},
 	{ PTRACE_ATTACH,	"PTRACE_ATTACH"		},
 	{ PTRACE_DETACH,	"PTRACE_DETACH"		},
-#  ifdef PTRACE_GETREGS
+#ifdef PTRACE_GETREGS
 	{ PTRACE_GETREGS,	"PTRACE_GETREGS"	},
-#  endif
-#  ifdef PTRACE_SETREGS
+#endif
+#ifdef PTRACE_SETREGS
 	{ PTRACE_SETREGS,	"PTRACE_SETREGS"	},
-#  endif
-#  ifdef PTRACE_GETFPREGS
-	{ PTRACE_GETFPREGS,	"PTRACE_GETFPREGS",	},
-#  endif
-#  ifdef PTRACE_SETFPREGS
-	{ PTRACE_SETFPREGS,	"PTRACE_SETFPREGS",	},
-#  endif
-#  ifdef PTRACE_GETFPXREGS
-	{ PTRACE_GETFPXREGS,	"PTRACE_GETFPXREGS",	},
-#  endif
-#  ifdef PTRACE_SETFPXREGS
-	{ PTRACE_SETFPXREGS,	"PTRACE_SETFPXREGS",	},
-#  endif
-#  ifdef PTRACE_GETVRREGS
-	{ PTRACE_GETVRREGS,	"PTRACE_GETVRREGS",	},
-#  endif
-#  ifdef PTRACE_SETVRREGS
-	{ PTRACE_SETVRREGS,	"PTRACE_SETVRREGS",	},
-#  endif
-#  ifdef PTRACE_SETOPTIONS
-	{ PTRACE_SETOPTIONS,	"PTRACE_SETOPTIONS",	},
-#  endif
-#  ifdef PTRACE_GETEVENTMSG
-	{ PTRACE_GETEVENTMSG,	"PTRACE_GETEVENTMSG",	},
-#  endif
-#  ifdef PTRACE_GETSIGINFO
-	{ PTRACE_GETSIGINFO,	"PTRACE_GETSIGINFO",	},
-#  endif
-#  ifdef PTRACE_SETSIGINFO
-	{ PTRACE_SETSIGINFO,	"PTRACE_SETSIGINFO",	},
-#  endif
-#  ifdef PTRACE_GETREGSET
-	{ PTRACE_GETREGSET,	"PTRACE_GETREGSET",	},
-#  endif
-#  ifdef PTRACE_SETREGSET
-	{ PTRACE_SETREGSET,	"PTRACE_SETREGSET",	},
-#  endif
-#  ifdef PTRACE_SET_SYSCALL
-	{ PTRACE_SET_SYSCALL,	"PTRACE_SET_SYSCALL",	},
-#  endif
-#  ifdef SUNOS4
-	{ PTRACE_READDATA,	"PTRACE_READDATA"	},
-	{ PTRACE_WRITEDATA,	"PTRACE_WRITEDATA"	},
-	{ PTRACE_READTEXT,	"PTRACE_READTEXT"	},
-	{ PTRACE_WRITETEXT,	"PTRACE_WRITETEXT"	},
-	{ PTRACE_GETFPAREGS,	"PTRACE_GETFPAREGS"	},
-	{ PTRACE_SETFPAREGS,	"PTRACE_SETFPAREGS"	},
-#   ifdef SPARC
-	{ PTRACE_GETWINDOW,	"PTRACE_GETWINDOW"	},
-	{ PTRACE_SETWINDOW,	"PTRACE_SETWINDOW"	},
-#   else /* !SPARC */
-	{ PTRACE_22,		"PTRACE_22"		},
-	{ PTRACE_23,		"PTRACE_3"		},
-#   endif /* !SPARC */
-#  endif /* SUNOS4 */
+#endif
+#ifdef PTRACE_GETFPREGS
+	{ PTRACE_GETFPREGS,	"PTRACE_GETFPREGS"	},
+#endif
+#ifdef PTRACE_SETFPREGS
+	{ PTRACE_SETFPREGS,	"PTRACE_SETFPREGS"	},
+#endif
+#ifdef PTRACE_GETFPXREGS
+	{ PTRACE_GETFPXREGS,	"PTRACE_GETFPXREGS"	},
+#endif
+#ifdef PTRACE_SETFPXREGS
+	{ PTRACE_SETFPXREGS,	"PTRACE_SETFPXREGS"	},
+#endif
+#ifdef PTRACE_GETVRREGS
+	{ PTRACE_GETVRREGS,	"PTRACE_GETVRREGS"	},
+#endif
+#ifdef PTRACE_SETVRREGS
+	{ PTRACE_SETVRREGS,	"PTRACE_SETVRREGS"	},
+#endif
+#ifdef PTRACE_SETOPTIONS
+	{ PTRACE_SETOPTIONS,	"PTRACE_SETOPTIONS"	},
+#endif
+#ifdef PTRACE_GETEVENTMSG
+	{ PTRACE_GETEVENTMSG,	"PTRACE_GETEVENTMSG"	},
+#endif
+#ifdef PTRACE_GETSIGINFO
+	{ PTRACE_GETSIGINFO,	"PTRACE_GETSIGINFO"	},
+#endif
+#ifdef PTRACE_SETSIGINFO
+	{ PTRACE_SETSIGINFO,	"PTRACE_SETSIGINFO"	},
+#endif
+#ifdef PTRACE_GETREGSET
+	{ PTRACE_GETREGSET,	"PTRACE_GETREGSET"	},
+#endif
+#ifdef PTRACE_SETREGSET
+	{ PTRACE_SETREGSET,	"PTRACE_SETREGSET"	},
+#endif
+#ifdef PTRACE_SET_SYSCALL
+	{ PTRACE_SET_SYSCALL,	"PTRACE_SET_SYSCALL"	},
+#endif
+#ifdef PTRACE_SEIZE
+	{ PTRACE_SEIZE,		"PTRACE_SEIZE"		},
+#endif
+#ifdef PTRACE_INTERRUPT
+	{ PTRACE_INTERRUPT,	"PTRACE_INTERRUPT"	},
+#endif
+#ifdef PTRACE_LISTEN
+	{ PTRACE_LISTEN,	"PTRACE_LISTEN"		},
+#endif
 	{ PTRACE_SYSCALL,	"PTRACE_SYSCALL"	},
-#  ifdef SUNOS4
-	{ PTRACE_DUMPCORE,	"PTRACE_DUMPCORE"	},
-#   ifdef I386
-	{ PTRACE_SETWRBKPT,	"PTRACE_SETWRBKPT"	},
-	{ PTRACE_SETACBKPT,	"PTRACE_SETACBKPT"	},
-	{ PTRACE_CLRDR7,	"PTRACE_CLRDR7"		},
-#   else /* !I386 */
-	{ PTRACE_26,		"PTRACE_26"		},
-	{ PTRACE_27,		"PTRACE_27"		},
-	{ PTRACE_28,		"PTRACE_28"		},
-#   endif /* !I386 */
-	{ PTRACE_GETUCODE,	"PTRACE_GETUCODE"	},
-#  endif /* SUNOS4 */
 
-# else /* FREEBSD */
-
-	{ PT_TRACE_ME,		"PT_TRACE_ME"		},
-	{ PT_READ_I,		"PT_READ_I"		},
-	{ PT_READ_D,		"PT_READ_D"		},
-	{ PT_WRITE_I,		"PT_WRITE_I"		},
-	{ PT_WRITE_D,		"PT_WRITE_D"		},
-#  ifdef PT_READ_U
-	{ PT_READ_U,		"PT_READ_U"		},
-#  endif
-	{ PT_CONTINUE,		"PT_CONTINUE"		},
-	{ PT_KILL,		"PT_KILL"		},
-	{ PT_STEP,		"PT_STEP"		},
-	{ PT_ATTACH,		"PT_ATTACH"		},
-	{ PT_DETACH,		"PT_DETACH"		},
-	{ PT_GETREGS,		"PT_GETREGS"		},
-	{ PT_SETREGS,		"PT_SETREGS"		},
-	{ PT_GETFPREGS,		"PT_GETFPREGS"		},
-	{ PT_SETFPREGS,		"PT_SETFPREGS"		},
-	{ PT_GETDBREGS,		"PT_GETDBREGS"		},
-	{ PT_SETDBREGS,		"PT_SETDBREGS"		},
-# endif /* FREEBSD */
 	{ 0,			NULL			},
 };
 
-# ifndef FREEBSD
-#  ifdef PTRACE_SETOPTIONS
+#ifdef PTRACE_SETOPTIONS
 static const struct xlat ptrace_setoptions_flags[] = {
-#   ifdef PTRACE_O_TRACESYSGOOD
+# ifdef PTRACE_O_TRACESYSGOOD
 	{ PTRACE_O_TRACESYSGOOD,"PTRACE_O_TRACESYSGOOD"	},
-#   endif
-#   ifdef PTRACE_O_TRACEFORK
+# endif
+# ifdef PTRACE_O_TRACEFORK
 	{ PTRACE_O_TRACEFORK,	"PTRACE_O_TRACEFORK"	},
-#   endif
-#   ifdef PTRACE_O_TRACEVFORK
+# endif
+# ifdef PTRACE_O_TRACEVFORK
 	{ PTRACE_O_TRACEVFORK,	"PTRACE_O_TRACEVFORK"	},
-#   endif
-#   ifdef PTRACE_O_TRACECLONE
+# endif
+# ifdef PTRACE_O_TRACECLONE
 	{ PTRACE_O_TRACECLONE,	"PTRACE_O_TRACECLONE"	},
-#   endif
-#   ifdef PTRACE_O_TRACEEXEC
+# endif
+# ifdef PTRACE_O_TRACEEXEC
 	{ PTRACE_O_TRACEEXEC,	"PTRACE_O_TRACEEXEC"	},
-#   endif
-#   ifdef PTRACE_O_TRACEVFORKDONE
+# endif
+# ifdef PTRACE_O_TRACEVFORKDONE
 	{ PTRACE_O_TRACEVFORKDONE,"PTRACE_O_TRACEVFORKDONE"},
-#   endif
-#   ifdef PTRACE_O_TRACEEXIT
+# endif
+# ifdef PTRACE_O_TRACEEXIT
 	{ PTRACE_O_TRACEEXIT,	"PTRACE_O_TRACEEXIT"	},
-#   endif
+# endif
 	{ 0,			NULL			},
 };
-#  endif /* PTRACE_SETOPTIONS */
-# endif /* !FREEBSD */
+#endif /* PTRACE_SETOPTIONS */
 
-# ifndef FREEBSD
+#define uoff(member)	offsetof(struct user, member)
+
 const struct xlat struct_user_offsets[] = {
-#  ifdef LINUX
-#   if defined(S390) || defined(S390X)
+#if defined(S390) || defined(S390X)
 	{ PT_PSWMASK,		"psw_mask"				},
 	{ PT_PSWADDR,		"psw_addr"				},
 	{ PT_GPR0,		"gpr0"					},
@@ -2404,7 +1326,7 @@
 	{ PT_ACR15,		"acr15"					},
 	{ PT_ORIGGPR2,		"orig_gpr2"				},
 	{ PT_FPC,		"fpc"					},
-#    if defined(S390)
+#if defined(S390)
 	{ PT_FPR0_HI,		"fpr0.hi"				},
 	{ PT_FPR0_LO,		"fpr0.lo"				},
 	{ PT_FPR1_HI,		"fpr1.hi"				},
@@ -2437,8 +1359,8 @@
 	{ PT_FPR14_LO,		"fpr14.lo"				},
 	{ PT_FPR15_HI,		"fpr15.hi"				},
 	{ PT_FPR15_LO,		"fpr15.lo"				},
-#    endif
-#    if defined(S390X)
+#endif
+#if defined(S390X)
 	{ PT_FPR0,		"fpr0"					},
 	{ PT_FPR1,		"fpr1"					},
 	{ PT_FPR2,		"fpr2"					},
@@ -2455,20 +1377,20 @@
 	{ PT_FPR13,		"fpr13"					},
 	{ PT_FPR14,		"fpr14"					},
 	{ PT_FPR15,		"fpr15"					},
-#    endif
+#endif
 	{ PT_CR_9,		"cr9"					},
 	{ PT_CR_10,		"cr10"					},
 	{ PT_CR_11,		"cr11"					},
-	{ PT_IEEE_IP,           "ieee_exception_ip"                     },
-#   elif defined(SPARC)
+	{ PT_IEEE_IP,		"ieee_exception_ip"			},
+#elif defined(SPARC)
 	/* XXX No support for these offsets yet. */
-#   elif defined(HPPA)
+#elif defined(HPPA)
 	/* XXX No support for these offsets yet. */
-#   elif defined(POWERPC)
-#    ifndef PT_ORIG_R3
-#     define PT_ORIG_R3 34
-#    endif
-#    define REGSIZE (sizeof(unsigned long))
+#elif defined(POWERPC)
+# ifndef PT_ORIG_R3
+#  define PT_ORIG_R3 34
+# endif
+# define REGSIZE (sizeof(unsigned long))
 	{ REGSIZE*PT_R0,		"r0"				},
 	{ REGSIZE*PT_R1,		"r1"				},
 	{ REGSIZE*PT_R2,		"r2"				},
@@ -2509,8 +1431,8 @@
 	{ REGSIZE*PT_XER,		"XER"				},
 	{ REGSIZE*PT_CCR,		"CCR"				},
 	{ REGSIZE*PT_FPR0,		"FPR0"				},
-#    undef REGSIZE
-#   elif defined(ALPHA)
+# undef REGSIZE
+#elif defined(ALPHA)
 	{ 0,			"r0"					},
 	{ 1,			"r1"					},
 	{ 2,			"r2"					},
@@ -2576,7 +1498,7 @@
 	{ 62,			"fp30"					},
 	{ 63,			"fp31"					},
 	{ 64,			"pc"					},
-#   elif defined(IA64)
+#elif defined(IA64)
 	{ PT_F32, "f32" }, { PT_F33, "f33" }, { PT_F34, "f34" },
 	{ PT_F35, "f35" }, { PT_F36, "f36" }, { PT_F37, "f37" },
 	{ PT_F38, "f38" }, { PT_F39, "f39" }, { PT_F40, "f40" },
@@ -2641,14 +1563,14 @@
 	{ PT_AR_CCV, "ar.ccv" }, { PT_AR_FPSR, "ar.fpsr" },
 	{ PT_B0, "b0" }, { PT_B7, "b7" }, { PT_F6, "f6" },
 	{ PT_F7, "f7" }, { PT_F8, "f8" }, { PT_F9, "f9" },
-#    ifdef PT_AR_CSD
+# ifdef PT_AR_CSD
 	{ PT_AR_CSD, "ar.csd" },
-#    endif
-#    ifdef PT_AR_SSD
+# endif
+# ifdef PT_AR_SSD
 	{ PT_AR_SSD, "ar.ssd" },
-#    endif
+# endif
 	{ PT_DBR, "dbr" }, { PT_IBR, "ibr" }, { PT_PMD, "pmd" },
-#   elif defined(I386)
+#elif defined(I386)
 	{ 4*EBX,		"4*EBX"					},
 	{ 4*ECX,		"4*ECX"					},
 	{ 4*EDX,		"4*EDX"					},
@@ -2666,11 +1588,11 @@
 	{ 4*EFL,		"4*EFL"					},
 	{ 4*UESP,		"4*UESP"				},
 	{ 4*SS,			"4*SS"					},
-#   elif defined(X86_64)
-	{ 8*R15, 		"8*R15"					},
-	{ 8*R14, 		"8*R14"					},
-	{ 8*R13, 		"8*R13"					},
-	{ 8*R12, 		"8*R12"					},
+#elif defined(X86_64) || defined(X32)
+	{ 8*R15,		"8*R15"					},
+	{ 8*R14,		"8*R14"					},
+	{ 8*R13,		"8*R13"					},
+	{ 8*R12,		"8*R12"					},
 	{ 8*RBP,		"8*RBP"					},
 	{ 8*RBX,		"8*RBX"					},
 	{ 8*R11,		"8*R11"					},
@@ -2688,7 +1610,7 @@
 	{ 8*EFLAGS,		"8*EFL"					},
 	{ 8*RSP,		"8*RSP"					},
 	{ 8*SS,			"8*SS"					},
-#   elif defined(M68K)
+#elif defined(M68K)
 	{ 4*PT_D1,		"4*PT_D1"				},
 	{ 4*PT_D2,		"4*PT_D2"				},
 	{ 4*PT_D3,		"4*PT_D3"				},
@@ -2708,212 +1630,212 @@
 	{ 4*PT_ORIG_D0,		"4*PT_ORIG_D0"				},
 	{ 4*PT_SR,		"4*PT_SR"				},
 	{ 4*PT_PC,		"4*PT_PC"				},
-#   elif defined(SH)
-	{ 4*REG_REG0,           "4*REG_REG0"                            },
-	{ 4*(REG_REG0+1),       "4*REG_REG1"                            },
-	{ 4*(REG_REG0+2),       "4*REG_REG2"                            },
-	{ 4*(REG_REG0+3),       "4*REG_REG3"                            },
-	{ 4*(REG_REG0+4),       "4*REG_REG4"                            },
-	{ 4*(REG_REG0+5),       "4*REG_REG5"                            },
-	{ 4*(REG_REG0+6),       "4*REG_REG6"                            },
-	{ 4*(REG_REG0+7),       "4*REG_REG7"                            },
-	{ 4*(REG_REG0+8),       "4*REG_REG8"                            },
-	{ 4*(REG_REG0+9),       "4*REG_REG9"                            },
-	{ 4*(REG_REG0+10),      "4*REG_REG10"                           },
-	{ 4*(REG_REG0+11),      "4*REG_REG11"                           },
-	{ 4*(REG_REG0+12),      "4*REG_REG12"                           },
-	{ 4*(REG_REG0+13),      "4*REG_REG13"                           },
-	{ 4*(REG_REG0+14),      "4*REG_REG14"                           },
-	{ 4*REG_REG15,          "4*REG_REG15"                           },
-	{ 4*REG_PC,             "4*REG_PC"                              },
-	{ 4*REG_PR,             "4*REG_PR"                              },
-	{ 4*REG_SR,             "4*REG_SR"                              },
-	{ 4*REG_GBR,            "4*REG_GBR"                             },
-	{ 4*REG_MACH,           "4*REG_MACH"                            },
-	{ 4*REG_MACL,           "4*REG_MACL"                            },
-	{ 4*REG_SYSCALL,        "4*REG_SYSCALL"                         },
-	{ 4*REG_FPUL,           "4*REG_FPUL"                            },
-	{ 4*REG_FPREG0,         "4*REG_FPREG0"                          },
-	{ 4*(REG_FPREG0+1),     "4*REG_FPREG1"                          },
-	{ 4*(REG_FPREG0+2),     "4*REG_FPREG2"                          },
-	{ 4*(REG_FPREG0+3),     "4*REG_FPREG3"                          },
-	{ 4*(REG_FPREG0+4),     "4*REG_FPREG4"                          },
-	{ 4*(REG_FPREG0+5),     "4*REG_FPREG5"                          },
-	{ 4*(REG_FPREG0+6),     "4*REG_FPREG6"                          },
-	{ 4*(REG_FPREG0+7),     "4*REG_FPREG7"                          },
-	{ 4*(REG_FPREG0+8),     "4*REG_FPREG8"                          },
-	{ 4*(REG_FPREG0+9),     "4*REG_FPREG9"                          },
-	{ 4*(REG_FPREG0+10),    "4*REG_FPREG10"                         },
-	{ 4*(REG_FPREG0+11),    "4*REG_FPREG11"                         },
-	{ 4*(REG_FPREG0+12),    "4*REG_FPREG12"                         },
-	{ 4*(REG_FPREG0+13),    "4*REG_FPREG13"                         },
-	{ 4*(REG_FPREG0+14),    "4*REG_FPREG14"                         },
-	{ 4*REG_FPREG15,        "4*REG_FPREG15"                         },
-#    ifdef REG_XDREG0
-	{ 4*REG_XDREG0,         "4*REG_XDREG0"                          },
-	{ 4*(REG_XDREG0+2),     "4*REG_XDREG2"                          },
-	{ 4*(REG_XDREG0+4),     "4*REG_XDREG4"                          },
-	{ 4*(REG_XDREG0+6),     "4*REG_XDREG6"                          },
-	{ 4*(REG_XDREG0+8),     "4*REG_XDREG8"                          },
-	{ 4*(REG_XDREG0+10),    "4*REG_XDREG10"                         },
-	{ 4*(REG_XDREG0+12),    "4*REG_XDREG12"                         },
-	{ 4*REG_XDREG14,        "4*REG_XDREG14"                         },
-#    endif
-	{ 4*REG_FPSCR,          "4*REG_FPSCR"                           },
-#   elif defined(SH64)
-	{ 0,		        "PC(L)"				        },
-	{ 4,	                "PC(U)"				        },
-	{ 8, 	                "SR(L)"	  	         		},
-	{ 12,               	"SR(U)"     				},
-	{ 16,            	"syscall no.(L)" 			},
-	{ 20,            	"syscall_no.(U)"			},
-	{ 24,            	"R0(L)"     				},
-	{ 28,            	"R0(U)"     				},
-	{ 32,            	"R1(L)"     				},
-	{ 36,            	"R1(U)"     				},
-	{ 40,            	"R2(L)"     				},
-	{ 44,            	"R2(U)"     				},
-	{ 48,            	"R3(L)"     				},
-	{ 52,            	"R3(U)"     				},
-	{ 56,            	"R4(L)"     				},
-	{ 60,            	"R4(U)"     				},
-	{ 64,            	"R5(L)"     				},
-	{ 68,            	"R5(U)"     				},
-	{ 72,            	"R6(L)"     				},
-	{ 76,            	"R6(U)"     				},
-	{ 80,            	"R7(L)"     				},
-	{ 84,            	"R7(U)"     				},
-	{ 88,            	"R8(L)"     				},
-	{ 92,            	"R8(U)"     				},
-	{ 96,            	"R9(L)"     				},
-	{ 100,           	"R9(U)"     				},
-	{ 104,           	"R10(L)"     				},
-	{ 108,           	"R10(U)"     				},
-	{ 112,           	"R11(L)"     				},
-	{ 116,           	"R11(U)"     				},
-	{ 120,           	"R12(L)"     				},
-	{ 124,           	"R12(U)"     				},
-	{ 128,           	"R13(L)"     				},
-	{ 132,           	"R13(U)"     				},
-	{ 136,           	"R14(L)"     				},
-	{ 140,           	"R14(U)"     				},
-	{ 144,           	"R15(L)"     				},
-	{ 148,           	"R15(U)"     				},
-	{ 152,           	"R16(L)"     				},
-	{ 156,           	"R16(U)"     				},
-	{ 160,           	"R17(L)"     				},
-	{ 164,           	"R17(U)"     				},
-	{ 168,           	"R18(L)"     				},
-	{ 172,           	"R18(U)"     				},
-	{ 176,           	"R19(L)"     				},
-	{ 180,           	"R19(U)"     				},
-	{ 184,           	"R20(L)"     				},
-	{ 188,           	"R20(U)"     				},
-	{ 192,           	"R21(L)"     				},
-	{ 196,           	"R21(U)"     				},
-	{ 200,           	"R22(L)"     				},
-	{ 204,           	"R22(U)"     				},
-	{ 208,           	"R23(L)"     				},
-	{ 212,           	"R23(U)"     				},
-	{ 216,           	"R24(L)"     				},
-	{ 220,           	"R24(U)"     				},
-	{ 224,           	"R25(L)"     				},
-	{ 228,           	"R25(U)"     				},
-	{ 232,           	"R26(L)"     				},
-	{ 236,           	"R26(U)"     				},
-	{ 240,           	"R27(L)"     				},
-	{ 244,           	"R27(U)"     				},
-	{ 248,           	"R28(L)"     				},
-	{ 252,           	"R28(U)"     				},
-	{ 256,           	"R29(L)"     				},
-	{ 260,           	"R29(U)"     				},
-	{ 264,           	"R30(L)"     				},
-	{ 268,           	"R30(U)"     				},
-	{ 272,           	"R31(L)"     				},
-	{ 276,           	"R31(U)"     				},
-	{ 280,           	"R32(L)"     				},
-	{ 284,           	"R32(U)"     				},
-	{ 288,           	"R33(L)"     				},
-	{ 292,           	"R33(U)"     				},
-	{ 296,           	"R34(L)"     				},
-	{ 300,           	"R34(U)"     				},
-	{ 304,           	"R35(L)"     				},
-	{ 308,           	"R35(U)"     				},
-	{ 312,           	"R36(L)"     				},
-	{ 316,           	"R36(U)"     				},
-	{ 320,           	"R37(L)"     				},
-	{ 324,           	"R37(U)"     				},
-	{ 328,           	"R38(L)"     				},
-	{ 332,           	"R38(U)"     				},
-	{ 336,           	"R39(L)"     				},
-	{ 340,           	"R39(U)"     				},
-	{ 344,           	"R40(L)"     				},
-	{ 348,           	"R40(U)"     				},
-	{ 352,           	"R41(L)"     				},
-	{ 356,           	"R41(U)"     				},
-	{ 360,           	"R42(L)"     				},
-	{ 364,           	"R42(U)"     				},
-	{ 368,           	"R43(L)"     				},
-	{ 372,           	"R43(U)"     				},
-	{ 376,           	"R44(L)"     				},
-	{ 380,           	"R44(U)"     				},
-	{ 384,           	"R45(L)"     				},
-	{ 388,           	"R45(U)"     				},
-	{ 392,           	"R46(L)"     				},
-	{ 396,           	"R46(U)"     				},
-	{ 400,           	"R47(L)"     				},
-	{ 404,           	"R47(U)"     				},
-	{ 408,           	"R48(L)"     				},
-	{ 412,           	"R48(U)"     				},
-	{ 416,           	"R49(L)"     				},
-	{ 420,           	"R49(U)"     				},
-	{ 424,           	"R50(L)"     				},
-	{ 428,           	"R50(U)"     				},
-	{ 432,           	"R51(L)"     				},
-	{ 436,           	"R51(U)"     				},
-	{ 440,           	"R52(L)"     				},
-	{ 444,           	"R52(U)"     				},
-	{ 448,           	"R53(L)"     				},
-	{ 452,           	"R53(U)"     				},
-	{ 456,           	"R54(L)"     				},
-	{ 460,           	"R54(U)"     				},
-	{ 464,           	"R55(L)"     				},
-	{ 468,           	"R55(U)"     				},
-	{ 472,           	"R56(L)"     				},
-	{ 476,           	"R56(U)"     				},
-	{ 480,           	"R57(L)"     				},
-	{ 484,           	"R57(U)"     				},
-	{ 488,           	"R58(L)"     				},
-	{ 492,           	"R58(U)"     				},
-	{ 496,           	"R59(L)"     				},
-	{ 500,           	"R59(U)"     				},
-	{ 504,           	"R60(L)"     				},
-	{ 508,           	"R60(U)"     				},
-	{ 512,           	"R61(L)"     				},
-	{ 516,           	"R61(U)"     				},
-	{ 520,           	"R62(L)"     				},
-	{ 524,           	"R62(U)"     				},
-	{ 528,                  "TR0(L)"                                },
-	{ 532,                  "TR0(U)"                                },
-	{ 536,                  "TR1(L)"                                },
-	{ 540,                  "TR1(U)"                                },
-	{ 544,                  "TR2(L)"                                },
-	{ 548,                  "TR2(U)"                                },
-	{ 552,                  "TR3(L)"                                },
-	{ 556,                  "TR3(U)"                                },
-	{ 560,                  "TR4(L)"                                },
-	{ 564,                  "TR4(U)"                                },
-	{ 568,                  "TR5(L)"                                },
-	{ 572,                  "TR5(U)"                                },
-	{ 576,                  "TR6(L)"                                },
-	{ 580,                  "TR6(U)"                                },
-	{ 584,                  "TR7(L)"                                },
-	{ 588,                  "TR7(U)"                                },
+#elif defined(SH)
+	{ 4*REG_REG0,		"4*REG_REG0"				},
+	{ 4*(REG_REG0+1),	"4*REG_REG1"				},
+	{ 4*(REG_REG0+2),	"4*REG_REG2"				},
+	{ 4*(REG_REG0+3),	"4*REG_REG3"				},
+	{ 4*(REG_REG0+4),	"4*REG_REG4"				},
+	{ 4*(REG_REG0+5),	"4*REG_REG5"				},
+	{ 4*(REG_REG0+6),	"4*REG_REG6"				},
+	{ 4*(REG_REG0+7),	"4*REG_REG7"				},
+	{ 4*(REG_REG0+8),	"4*REG_REG8"				},
+	{ 4*(REG_REG0+9),	"4*REG_REG9"				},
+	{ 4*(REG_REG0+10),	"4*REG_REG10"				},
+	{ 4*(REG_REG0+11),	"4*REG_REG11"				},
+	{ 4*(REG_REG0+12),	"4*REG_REG12"				},
+	{ 4*(REG_REG0+13),	"4*REG_REG13"				},
+	{ 4*(REG_REG0+14),	"4*REG_REG14"				},
+	{ 4*REG_REG15,		"4*REG_REG15"				},
+	{ 4*REG_PC,		"4*REG_PC"				},
+	{ 4*REG_PR,		"4*REG_PR"				},
+	{ 4*REG_SR,		"4*REG_SR"				},
+	{ 4*REG_GBR,		"4*REG_GBR"				},
+	{ 4*REG_MACH,		"4*REG_MACH"				},
+	{ 4*REG_MACL,		"4*REG_MACL"				},
+	{ 4*REG_SYSCALL,	"4*REG_SYSCALL"				},
+	{ 4*REG_FPUL,		"4*REG_FPUL"				},
+	{ 4*REG_FPREG0,		"4*REG_FPREG0"				},
+	{ 4*(REG_FPREG0+1),	"4*REG_FPREG1"				},
+	{ 4*(REG_FPREG0+2),	"4*REG_FPREG2"				},
+	{ 4*(REG_FPREG0+3),	"4*REG_FPREG3"				},
+	{ 4*(REG_FPREG0+4),	"4*REG_FPREG4"				},
+	{ 4*(REG_FPREG0+5),	"4*REG_FPREG5"				},
+	{ 4*(REG_FPREG0+6),	"4*REG_FPREG6"				},
+	{ 4*(REG_FPREG0+7),	"4*REG_FPREG7"				},
+	{ 4*(REG_FPREG0+8),	"4*REG_FPREG8"				},
+	{ 4*(REG_FPREG0+9),	"4*REG_FPREG9"				},
+	{ 4*(REG_FPREG0+10),	"4*REG_FPREG10"				},
+	{ 4*(REG_FPREG0+11),	"4*REG_FPREG11"				},
+	{ 4*(REG_FPREG0+12),	"4*REG_FPREG12"				},
+	{ 4*(REG_FPREG0+13),	"4*REG_FPREG13"				},
+	{ 4*(REG_FPREG0+14),	"4*REG_FPREG14"				},
+	{ 4*REG_FPREG15,	"4*REG_FPREG15"				},
+# ifdef REG_XDREG0
+	{ 4*REG_XDREG0,		"4*REG_XDREG0"				},
+	{ 4*(REG_XDREG0+2),	"4*REG_XDREG2"				},
+	{ 4*(REG_XDREG0+4),	"4*REG_XDREG4"				},
+	{ 4*(REG_XDREG0+6),	"4*REG_XDREG6"				},
+	{ 4*(REG_XDREG0+8),	"4*REG_XDREG8"				},
+	{ 4*(REG_XDREG0+10),	"4*REG_XDREG10"				},
+	{ 4*(REG_XDREG0+12),	"4*REG_XDREG12"				},
+	{ 4*REG_XDREG14,	"4*REG_XDREG14"				},
+# endif
+	{ 4*REG_FPSCR,		"4*REG_FPSCR"				},
+#elif defined(SH64)
+	{ 0,			"PC(L)"					},
+	{ 4,			"PC(U)"					},
+	{ 8,			"SR(L)"					},
+	{ 12,			"SR(U)"					},
+	{ 16,			"syscall no.(L)"			},
+	{ 20,			"syscall_no.(U)"			},
+	{ 24,			"R0(L)"					},
+	{ 28,			"R0(U)"					},
+	{ 32,			"R1(L)"					},
+	{ 36,			"R1(U)"					},
+	{ 40,			"R2(L)"					},
+	{ 44,			"R2(U)"					},
+	{ 48,			"R3(L)"					},
+	{ 52,			"R3(U)"					},
+	{ 56,			"R4(L)"					},
+	{ 60,			"R4(U)"					},
+	{ 64,			"R5(L)"					},
+	{ 68,			"R5(U)"					},
+	{ 72,			"R6(L)"					},
+	{ 76,			"R6(U)"					},
+	{ 80,			"R7(L)"					},
+	{ 84,			"R7(U)"					},
+	{ 88,			"R8(L)"					},
+	{ 92,			"R8(U)"					},
+	{ 96,			"R9(L)"					},
+	{ 100,			"R9(U)"					},
+	{ 104,			"R10(L)"				},
+	{ 108,			"R10(U)"				},
+	{ 112,			"R11(L)"				},
+	{ 116,			"R11(U)"				},
+	{ 120,			"R12(L)"				},
+	{ 124,			"R12(U)"				},
+	{ 128,			"R13(L)"				},
+	{ 132,			"R13(U)"				},
+	{ 136,			"R14(L)"				},
+	{ 140,			"R14(U)"				},
+	{ 144,			"R15(L)"				},
+	{ 148,			"R15(U)"				},
+	{ 152,			"R16(L)"				},
+	{ 156,			"R16(U)"				},
+	{ 160,			"R17(L)"				},
+	{ 164,			"R17(U)"				},
+	{ 168,			"R18(L)"				},
+	{ 172,			"R18(U)"				},
+	{ 176,			"R19(L)"				},
+	{ 180,			"R19(U)"				},
+	{ 184,			"R20(L)"				},
+	{ 188,			"R20(U)"				},
+	{ 192,			"R21(L)"				},
+	{ 196,			"R21(U)"				},
+	{ 200,			"R22(L)"				},
+	{ 204,			"R22(U)"				},
+	{ 208,			"R23(L)"				},
+	{ 212,			"R23(U)"				},
+	{ 216,			"R24(L)"				},
+	{ 220,			"R24(U)"				},
+	{ 224,			"R25(L)"				},
+	{ 228,			"R25(U)"				},
+	{ 232,			"R26(L)"				},
+	{ 236,			"R26(U)"				},
+	{ 240,			"R27(L)"				},
+	{ 244,			"R27(U)"				},
+	{ 248,			"R28(L)"				},
+	{ 252,			"R28(U)"				},
+	{ 256,			"R29(L)"				},
+	{ 260,			"R29(U)"				},
+	{ 264,			"R30(L)"				},
+	{ 268,			"R30(U)"				},
+	{ 272,			"R31(L)"				},
+	{ 276,			"R31(U)"				},
+	{ 280,			"R32(L)"				},
+	{ 284,			"R32(U)"				},
+	{ 288,			"R33(L)"				},
+	{ 292,			"R33(U)"				},
+	{ 296,			"R34(L)"				},
+	{ 300,			"R34(U)"				},
+	{ 304,			"R35(L)"				},
+	{ 308,			"R35(U)"				},
+	{ 312,			"R36(L)"				},
+	{ 316,			"R36(U)"				},
+	{ 320,			"R37(L)"				},
+	{ 324,			"R37(U)"				},
+	{ 328,			"R38(L)"				},
+	{ 332,			"R38(U)"				},
+	{ 336,			"R39(L)"				},
+	{ 340,			"R39(U)"				},
+	{ 344,			"R40(L)"				},
+	{ 348,			"R40(U)"				},
+	{ 352,			"R41(L)"				},
+	{ 356,			"R41(U)"				},
+	{ 360,			"R42(L)"				},
+	{ 364,			"R42(U)"				},
+	{ 368,			"R43(L)"				},
+	{ 372,			"R43(U)"				},
+	{ 376,			"R44(L)"				},
+	{ 380,			"R44(U)"				},
+	{ 384,			"R45(L)"				},
+	{ 388,			"R45(U)"				},
+	{ 392,			"R46(L)"				},
+	{ 396,			"R46(U)"				},
+	{ 400,			"R47(L)"				},
+	{ 404,			"R47(U)"				},
+	{ 408,			"R48(L)"				},
+	{ 412,			"R48(U)"				},
+	{ 416,			"R49(L)"				},
+	{ 420,			"R49(U)"				},
+	{ 424,			"R50(L)"				},
+	{ 428,			"R50(U)"				},
+	{ 432,			"R51(L)"				},
+	{ 436,			"R51(U)"				},
+	{ 440,			"R52(L)"				},
+	{ 444,			"R52(U)"				},
+	{ 448,			"R53(L)"				},
+	{ 452,			"R53(U)"				},
+	{ 456,			"R54(L)"				},
+	{ 460,			"R54(U)"				},
+	{ 464,			"R55(L)"				},
+	{ 468,			"R55(U)"				},
+	{ 472,			"R56(L)"				},
+	{ 476,			"R56(U)"				},
+	{ 480,			"R57(L)"				},
+	{ 484,			"R57(U)"				},
+	{ 488,			"R58(L)"				},
+	{ 492,			"R58(U)"				},
+	{ 496,			"R59(L)"				},
+	{ 500,			"R59(U)"				},
+	{ 504,			"R60(L)"				},
+	{ 508,			"R60(U)"				},
+	{ 512,			"R61(L)"				},
+	{ 516,			"R61(U)"				},
+	{ 520,			"R62(L)"				},
+	{ 524,			"R62(U)"				},
+	{ 528,			"TR0(L)"				},
+	{ 532,			"TR0(U)"				},
+	{ 536,			"TR1(L)"				},
+	{ 540,			"TR1(U)"				},
+	{ 544,			"TR2(L)"				},
+	{ 548,			"TR2(U)"				},
+	{ 552,			"TR3(L)"				},
+	{ 556,			"TR3(U)"				},
+	{ 560,			"TR4(L)"				},
+	{ 564,			"TR4(U)"				},
+	{ 568,			"TR5(L)"				},
+	{ 572,			"TR5(U)"				},
+	{ 576,			"TR6(L)"				},
+	{ 580,			"TR6(U)"				},
+	{ 584,			"TR7(L)"				},
+	{ 588,			"TR7(U)"				},
 	/* This entry is in case pt_regs contains dregs (depends on
 	   the kernel build options). */
-	{ uoff(regs),	        "offsetof(struct user, regs)"	        },
-	{ uoff(fpu),	        "offsetof(struct user, fpu)"	        },
-#   elif defined(ARM)
+	{ uoff(regs),		"offsetof(struct user, regs)"		},
+	{ uoff(fpu),		"offsetof(struct user, fpu)"		},
+#elif defined(ARM)
 	{ uoff(regs.ARM_r0),	"r0"					},
 	{ uoff(regs.ARM_r1),	"r1"					},
 	{ uoff(regs.ARM_r2),	"r2"					},
@@ -2931,7 +1853,7 @@
 	{ uoff(regs.ARM_lr),	"lr"					},
 	{ uoff(regs.ARM_pc),	"pc"					},
 	{ uoff(regs.ARM_cpsr),	"cpsr"					},
-#   elif defined(AVR32)
+#elif defined(AVR32)
 	{ uoff(regs.sr),	"sr"					},
 	{ uoff(regs.pc),	"pc"					},
 	{ uoff(regs.lr),	"lr"					},
@@ -2950,7 +1872,7 @@
 	{ uoff(regs.r1),	"r1"					},
 	{ uoff(regs.r0),	"r0"					},
 	{ uoff(regs.r12_orig),	"orig_r12"				},
-#   elif defined(MIPS)
+#elif defined(MIPS)
 	{ 0,			"r0"					},
 	{ 1,			"r1"					},
 	{ 2,			"r2"					},
@@ -3022,7 +1944,7 @@
 	{ 68,			"mmlo"					},
 	{ 69,			"fpcsr"					},
 	{ 70,			"fpeir"					},
-#   elif defined(TILE)
+#elif defined(TILE)
 	{ PTREGS_OFFSET_REG(0),  "r0"  },
 	{ PTREGS_OFFSET_REG(1),  "r1"  },
 	{ PTREGS_OFFSET_REG(2),  "r2"  },
@@ -3084,8 +2006,8 @@
 	{ PTREGS_OFFSET_FAULTNUM, "faultnum" },
 	{ PTREGS_OFFSET_ORIG_R0, "orig_r0" },
 	{ PTREGS_OFFSET_FLAGS, "flags" },
-#   endif
-#   ifdef CRISV10
+#endif
+#ifdef CRISV10
 	{ 4*PT_FRAMETYPE, "4*PT_FRAMETYPE" },
 	{ 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
 	{ 4*PT_R13, "4*PT_R13" },
@@ -3110,8 +2032,8 @@
 	{ 4*PT_CSRADDR, "4*PT_CSRADDR" },
 	{ 4*PT_CSRDATA, "4*PT_CSRDATA" },
 	{ 4*PT_USP, "4*PT_USP" },
-#   endif
-#   ifdef CRISV32
+#endif
+#ifdef CRISV32
 	{ 4*PT_ORIG_R10, "4*PT_ORIG_R10" },
 	{ 4*PT_R0, "4*PT_R0" },
 	{ 4*PT_R1, "4*PT_R1" },
@@ -3153,8 +2075,8 @@
 	{ 4*PT_BP+48, "4*PT_BP+48" },
 	{ 4*PT_BP+52, "4*PT_BP+52" },
 	{ 4*PT_BP+56, "4*PT_BP+56" },
-#   endif
-#   ifdef MICROBLAZE
+#endif
+#ifdef MICROBLAZE
 	{ PT_GPR(0),		"r0"					},
 	{ PT_GPR(1),		"r1"					},
 	{ PT_GPR(2),		"r2"					},
@@ -3187,110 +2109,60 @@
 	{ PT_GPR(29),		"r29"					},
 	{ PT_GPR(30),		"r30"					},
 	{ PT_GPR(31),		"r31"					},
-	{ PT_PC, 		"rpc",					},
-	{ PT_MSR, 		"rmsr",					},
+	{ PT_PC,		"rpc",					},
+	{ PT_MSR,		"rmsr",					},
 	{ PT_EAR,		"rear",					},
 	{ PT_ESR,		"resr",					},
 	{ PT_FSR,		"rfsr",					},
-	{ PT_KERNEL_MODE, 	"kernel_mode",				},
-#   endif
+	{ PT_KERNEL_MODE,	"kernel_mode",				},
+#endif
 
-#   if !defined(SPARC) && !defined(HPPA) && !defined(POWERPC) \
+#if !defined(SPARC) && !defined(HPPA) && !defined(POWERPC) \
 		&& !defined(ALPHA) && !defined(IA64) \
 		&& !defined(CRISV10) && !defined(CRISV32) && !defined(MICROBLAZE)
-#    if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) && !defined(BFIN) && !defined(TILE)
+# if !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SPARC64) && !defined(AVR32) && !defined(BFIN) && !defined(TILE)
 	{ uoff(u_fpvalid),	"offsetof(struct user, u_fpvalid)"	},
-#    endif
-#    if defined(I386) || defined(X86_64)
+# endif
+# if defined(I386) || defined(X86_64) || defined(X32)
 	{ uoff(i387),		"offsetof(struct user, i387)"		},
-#    endif
-#    if defined(M68K)
+# endif
+# if defined(M68K)
 	{ uoff(m68kfp),		"offsetof(struct user, m68kfp)"		},
-#    endif
+# endif
 	{ uoff(u_tsize),	"offsetof(struct user, u_tsize)"	},
 	{ uoff(u_dsize),	"offsetof(struct user, u_dsize)"	},
 	{ uoff(u_ssize),	"offsetof(struct user, u_ssize)"	},
-#    if !defined(SPARC64)
+# if !defined(SPARC64)
 	{ uoff(start_code),	"offsetof(struct user, start_code)"	},
-#    endif
-#    if defined(AVR32) || defined(SH64)
+# endif
+# if defined(AVR32) || defined(SH64)
 	{ uoff(start_data),	"offsetof(struct user, start_data)"	},
-#    endif
-#    if !defined(SPARC64)
+# endif
+# if !defined(SPARC64)
 	{ uoff(start_stack),	"offsetof(struct user, start_stack)"	},
-#    endif
+# endif
 	{ uoff(signal),		"offsetof(struct user, signal)"		},
-#    if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(TILE)
+# if !defined(AVR32) && !defined(S390) && !defined(S390X) && !defined(MIPS) && !defined(SH) && !defined(SH64) && !defined(SPARC64) && !defined(TILE)
 	{ uoff(reserved),	"offsetof(struct user, reserved)"	},
-#    endif
-#    if !defined(SPARC64)
+# endif
+# if !defined(SPARC64)
 	{ uoff(u_ar0),		"offsetof(struct user, u_ar0)"		},
-#    endif
-#    if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
+# endif
+# if !defined(ARM) && !defined(AVR32) && !defined(MIPS) && !defined(S390) && !defined(S390X) && !defined(SPARC64) && !defined(BFIN) && !defined(TILE)
 	{ uoff(u_fpstate),	"offsetof(struct user, u_fpstate)"	},
-#    endif
+# endif
 	{ uoff(magic),		"offsetof(struct user, magic)"		},
 	{ uoff(u_comm),		"offsetof(struct user, u_comm)"		},
-#    if defined(I386) || defined(X86_64)
+# if defined(I386) || defined(X86_64) || defined(X32)
 	{ uoff(u_debugreg),	"offsetof(struct user, u_debugreg)"	},
-#    endif
-#   endif /* !defined(many arches) */
+# endif
+#endif /* !defined(many arches) */
 
-#  endif /* LINUX */
-
-#  ifdef SUNOS4
-	{ uoff(u_pcb),		"offsetof(struct user, u_pcb)"		},
-	{ uoff(u_procp),	"offsetof(struct user, u_procp)"	},
-	{ uoff(u_ar0),		"offsetof(struct user, u_ar0)"		},
-	{ uoff(u_comm[0]),	"offsetof(struct user, u_comm[0])"	},
-	{ uoff(u_arg[0]),	"offsetof(struct user, u_arg[0])"	},
-	{ uoff(u_ap),		"offsetof(struct user, u_ap)"		},
-	{ uoff(u_qsave),	"offsetof(struct user, u_qsave)"	},
-	{ uoff(u_rval1),	"offsetof(struct user, u_rval1)"	},
-	{ uoff(u_rval2),	"offsetof(struct user, u_rval2)"	},
-	{ uoff(u_error),	"offsetof(struct user, u_error)"	},
-	{ uoff(u_eosys),	"offsetof(struct user, u_eosys)"	},
-	{ uoff(u_ssave),	"offsetof(struct user, u_ssave)"	},
-	{ uoff(u_signal[0]),	"offsetof(struct user, u_signal)"	},
-	{ uoff(u_sigmask[0]),	"offsetof(struct user, u_sigmask)"	},
-	{ uoff(u_sigonstack),	"offsetof(struct user, u_sigonstack)"	},
-	{ uoff(u_sigintr),	"offsetof(struct user, u_sigintr)"	},
-	{ uoff(u_sigreset),	"offsetof(struct user, u_sigreset)"	},
-	{ uoff(u_oldmask),	"offsetof(struct user, u_oldmask)"	},
-	{ uoff(u_code),		"offsetof(struct user, u_code)"		},
-	{ uoff(u_addr),		"offsetof(struct user, u_addr)"		},
-	{ uoff(u_sigstack),	"offsetof(struct user, u_sigstack)"	},
-	{ uoff(u_ofile),	"offsetof(struct user, u_ofile)"	},
-	{ uoff(u_pofile),	"offsetof(struct user, u_pofile)"	},
-	{ uoff(u_ofile_arr[0]),	"offsetof(struct user, u_ofile_arr[0])"	},
-	{ uoff(u_pofile_arr[0]),"offsetof(struct user, u_pofile_arr[0])"},
-	{ uoff(u_lastfile),	"offsetof(struct user, u_lastfile)"	},
-	{ uoff(u_cwd),		"offsetof(struct user, u_cwd)"		},
-	{ uoff(u_cdir),		"offsetof(struct user, u_cdir)"		},
-	{ uoff(u_rdir),		"offsetof(struct user, u_rdir)"		},
-	{ uoff(u_cmask),	"offsetof(struct user, u_cmask)"	},
-	{ uoff(u_ru),		"offsetof(struct user, u_ru)"		},
-	{ uoff(u_cru),		"offsetof(struct user, u_cru)"		},
-	{ uoff(u_timer[0]),	"offsetof(struct user, u_timer[0])"	},
-	{ uoff(u_XXX[0]),	"offsetof(struct user, u_XXX[0])"	},
-	{ uoff(u_ioch),		"offsetof(struct user, u_ioch)"		},
-	{ uoff(u_start),	"offsetof(struct user, u_start)"	},
-	{ uoff(u_acflag),	"offsetof(struct user, u_acflag)"	},
-	{ uoff(u_prof.pr_base),	"offsetof(struct user, u_prof.pr_base)"	},
-	{ uoff(u_prof.pr_size),	"offsetof(struct user, u_prof.pr_size)"	},
-	{ uoff(u_prof.pr_off),	"offsetof(struct user, u_prof.pr_off)"	},
-	{ uoff(u_prof.pr_scale),"offsetof(struct user, u_prof.pr_scale)"},
-	{ uoff(u_rlimit[0]),	"offsetof(struct user, u_rlimit)"	},
-	{ uoff(u_exdata.Ux_A),	"offsetof(struct user, u_exdata.Ux_A)"	},
-	{ uoff(u_exdata.ux_shell[0]),"offsetof(struct user, u_exdata.ux_shell[0])"},
-	{ uoff(u_lofault),	"offsetof(struct user, u_lofault)"	},
-#  endif /* SUNOS4 */
-#  ifndef HPPA
+#ifndef HPPA
 	{ sizeof(struct user),	"sizeof(struct user)"			},
-#  endif
+#endif
 	{ 0,			NULL					},
 };
-# endif /* !FREEBSD */
 
 int
 sys_ptrace(struct tcb *tcp)
@@ -3299,16 +2171,9 @@
 	long addr;
 
 	if (entering(tcp)) {
-		printxval(ptrace_cmds, tcp->u_arg[0],
-# ifndef FREEBSD
-			  "PTRACE_???"
-# else
-			  "PT_???"
-# endif
-			);
+		printxval(ptrace_cmds, tcp->u_arg[0], "PTRACE_???");
 		tprintf(", %lu, ", tcp->u_arg[1]);
 		addr = tcp->u_arg[2];
-# ifndef FREEBSD
 		if (tcp->u_arg[0] == PTRACE_PEEKUSER
 			|| tcp->u_arg[0] == PTRACE_POKEUSER) {
 			for (x = struct_user_offsets; x->str; x++) {
@@ -3325,46 +2190,44 @@
 				tprintf("%s, ", x->str);
 		}
 		else
-# endif
 			tprintf("%#lx, ", tcp->u_arg[2]);
-# ifdef LINUX
 		switch (tcp->u_arg[0]) {
-#  ifndef IA64
+#ifndef IA64
 		case PTRACE_PEEKDATA:
 		case PTRACE_PEEKTEXT:
 		case PTRACE_PEEKUSER:
 			break;
-#  endif
+#endif
 		case PTRACE_CONT:
 		case PTRACE_SINGLESTEP:
 		case PTRACE_SYSCALL:
 		case PTRACE_DETACH:
 			printsignal(tcp->u_arg[3]);
 			break;
-#  ifdef PTRACE_SETOPTIONS
+#ifdef PTRACE_SETOPTIONS
 		case PTRACE_SETOPTIONS:
 			printflags(ptrace_setoptions_flags, tcp->u_arg[3], "PTRACE_O_???");
 			break;
-#  endif
-#  ifdef PTRACE_SETSIGINFO
+#endif
+#ifdef PTRACE_SETSIGINFO
 		case PTRACE_SETSIGINFO: {
 			siginfo_t si;
 			if (!tcp->u_arg[3])
-				tprintf("NULL");
+				tprints("NULL");
 			else if (syserror(tcp))
 				tprintf("%#lx", tcp->u_arg[3]);
 			else if (umove(tcp, tcp->u_arg[3], &si) < 0)
-				tprintf("{???}");
+				tprints("{???}");
 			else
 				printsiginfo(&si, verbose(tcp));
 			break;
 		}
-#  endif
-#  ifdef PTRACE_GETSIGINFO
+#endif
+#ifdef PTRACE_GETSIGINFO
 		case PTRACE_GETSIGINFO:
 			/* Don't print anything, do it at syscall return. */
 			break;
-#  endif
+#endif
 		default:
 			tprintf("%#lx", tcp->u_arg[3]);
 			break;
@@ -3374,85 +2237,60 @@
 		case PTRACE_PEEKDATA:
 		case PTRACE_PEEKTEXT:
 		case PTRACE_PEEKUSER:
-#  ifdef IA64
+#ifdef IA64
 			return RVAL_HEX;
-#  else
+#else
 			printnum(tcp, tcp->u_arg[3], "%#lx");
 			break;
-#  endif
-#  ifdef PTRACE_GETSIGINFO
+#endif
+#ifdef PTRACE_GETSIGINFO
 		case PTRACE_GETSIGINFO: {
 			siginfo_t si;
 			if (!tcp->u_arg[3])
-				tprintf("NULL");
+				tprints("NULL");
 			else if (syserror(tcp))
 				tprintf("%#lx", tcp->u_arg[3]);
 			else if (umove(tcp, tcp->u_arg[3], &si) < 0)
-				tprintf("{???}");
+				tprints("{???}");
 			else
 				printsiginfo(&si, verbose(tcp));
 			break;
 		}
-#  endif
+#endif
 		}
 	}
-# endif /* LINUX */
-# ifdef SUNOS4
-		if (tcp->u_arg[0] == PTRACE_WRITEDATA ||
-			tcp->u_arg[0] == PTRACE_WRITETEXT) {
-			tprintf("%lu, ", tcp->u_arg[3]);
-			printstr(tcp, tcp->u_arg[4], tcp->u_arg[3]);
-		} else if (tcp->u_arg[0] != PTRACE_READDATA &&
-				tcp->u_arg[0] != PTRACE_READTEXT) {
-			tprintf("%#lx", tcp->u_arg[3]);
-		}
-	} else {
-		if (tcp->u_arg[0] == PTRACE_READDATA ||
-			tcp->u_arg[0] == PTRACE_READTEXT) {
-			tprintf("%lu, ", tcp->u_arg[3]);
-			printstr(tcp, tcp->u_arg[4], tcp->u_arg[3]);
-		}
-	}
-# endif /* SUNOS4 */
-# ifdef FREEBSD
-		tprintf("%lu", tcp->u_arg[3]);
-	}
-# endif /* FREEBSD */
 	return 0;
 }
 
-#endif /* !SVR4 */
-
-#ifdef LINUX
-# ifndef FUTEX_CMP_REQUEUE
-#  define FUTEX_CMP_REQUEUE 4
-# endif
-# ifndef FUTEX_WAKE_OP
-#  define FUTEX_WAKE_OP 5
-# endif
-# ifndef FUTEX_LOCK_PI
-#  define FUTEX_LOCK_PI 6
-#  define FUTEX_UNLOCK_PI 7
-#  define FUTEX_TRYLOCK_PI 8
-# endif
-# ifndef FUTEX_WAIT_BITSET
-#  define FUTEX_WAIT_BITSET 9
-# endif
-# ifndef FUTEX_WAKE_BITSET
-#  define FUTEX_WAKE_BITSET 10
-# endif
-# ifndef FUTEX_WAIT_REQUEUE_PI
-#  define FUTEX_WAIT_REQUEUE_PI 11
-# endif
-# ifndef FUTEX_CMP_REQUEUE_PI
-#  define FUTEX_CMP_REQUEUE_PI 12
-# endif
-# ifndef FUTEX_PRIVATE_FLAG
-#  define FUTEX_PRIVATE_FLAG 128
-# endif
-# ifndef FUTEX_CLOCK_REALTIME
-#  define FUTEX_CLOCK_REALTIME 256
-# endif
+#ifndef FUTEX_CMP_REQUEUE
+# define FUTEX_CMP_REQUEUE 4
+#endif
+#ifndef FUTEX_WAKE_OP
+# define FUTEX_WAKE_OP 5
+#endif
+#ifndef FUTEX_LOCK_PI
+# define FUTEX_LOCK_PI 6
+# define FUTEX_UNLOCK_PI 7
+# define FUTEX_TRYLOCK_PI 8
+#endif
+#ifndef FUTEX_WAIT_BITSET
+# define FUTEX_WAIT_BITSET 9
+#endif
+#ifndef FUTEX_WAKE_BITSET
+# define FUTEX_WAKE_BITSET 10
+#endif
+#ifndef FUTEX_WAIT_REQUEUE_PI
+# define FUTEX_WAIT_REQUEUE_PI 11
+#endif
+#ifndef FUTEX_CMP_REQUEUE_PI
+# define FUTEX_CMP_REQUEUE_PI 12
+#endif
+#ifndef FUTEX_PRIVATE_FLAG
+# define FUTEX_PRIVATE_FLAG 128
+#endif
+#ifndef FUTEX_CLOCK_REALTIME
+# define FUTEX_CLOCK_REALTIME 256
+#endif
 static const struct xlat futexops[] = {
 	{ FUTEX_WAIT,					"FUTEX_WAIT" },
 	{ FUTEX_WAKE,					"FUTEX_WAKE" },
@@ -3486,19 +2324,19 @@
 	{ FUTEX_WAIT_REQUEUE_PI|FUTEX_PRIVATE_FLAG|FUTEX_CLOCK_REALTIME,	"FUTEX_WAIT_REQUEUE_PI_PRIVATE|FUTEX_CLOCK_REALTIME" },
 	{ 0,						NULL }
 };
-# ifndef FUTEX_OP_SET
-#  define FUTEX_OP_SET		0
-#  define FUTEX_OP_ADD		1
-#  define FUTEX_OP_OR		2
-#  define FUTEX_OP_ANDN		3
-#  define FUTEX_OP_XOR		4
-#  define FUTEX_OP_CMP_EQ	0
-#  define FUTEX_OP_CMP_NE	1
-#  define FUTEX_OP_CMP_LT	2
-#  define FUTEX_OP_CMP_LE	3
-#  define FUTEX_OP_CMP_GT	4
-#  define FUTEX_OP_CMP_GE	5
-# endif
+#ifndef FUTEX_OP_SET
+# define FUTEX_OP_SET		0
+# define FUTEX_OP_ADD		1
+# define FUTEX_OP_OR		2
+# define FUTEX_OP_ANDN		3
+# define FUTEX_OP_XOR		4
+# define FUTEX_OP_CMP_EQ	0
+# define FUTEX_OP_CMP_NE	1
+# define FUTEX_OP_CMP_LT	2
+# define FUTEX_OP_CMP_LE	3
+# define FUTEX_OP_CMP_GT	4
+# define FUTEX_OP_CMP_GE	5
+#endif
 static const struct xlat futexwakeops[] = {
 	{ FUTEX_OP_SET,		"FUTEX_OP_SET" },
 	{ FUTEX_OP_ADD,		"FUTEX_OP_ADD" },
@@ -3528,10 +2366,10 @@
 		if (cmd == FUTEX_WAKE_BITSET)
 			tprintf(", %lx", tcp->u_arg[5]);
 		else if (cmd == FUTEX_WAIT) {
-			tprintf(", ");
+			tprints(", ");
 			printtv(tcp, tcp->u_arg[3]);
 		} else if (cmd == FUTEX_WAIT_BITSET) {
-			tprintf(", ");
+			tprints(", ");
 			printtv(tcp, tcp->u_arg[3]);
 			tprintf(", %lx", tcp->u_arg[5]);
 		} else if (cmd == FUTEX_REQUEUE)
@@ -3541,15 +2379,15 @@
 		else if (cmd == FUTEX_WAKE_OP) {
 			tprintf(", %ld, %p, {", tcp->u_arg[3], (void *) tcp->u_arg[4]);
 			if ((tcp->u_arg[5] >> 28) & 8)
-				tprintf("FUTEX_OP_OPARG_SHIFT|");
+				tprints("FUTEX_OP_OPARG_SHIFT|");
 			printxval(futexwakeops, (tcp->u_arg[5] >> 28) & 0x7, "FUTEX_OP_???");
 			tprintf(", %ld, ", (tcp->u_arg[5] >> 12) & 0xfff);
 			if ((tcp->u_arg[5] >> 24) & 8)
-				tprintf("FUTEX_OP_OPARG_SHIFT|");
+				tprints("FUTEX_OP_OPARG_SHIFT|");
 			printxval(futexwakecmps, (tcp->u_arg[5] >> 24) & 0x7, "FUTEX_OP_CMP_???");
 			tprintf(", %ld}", tcp->u_arg[5] & 0xfff);
 		} else if (cmd == FUTEX_WAIT_REQUEUE_PI) {
-			tprintf(", ");
+			tprints(", ");
 			printtv(tcp, tcp->u_arg[3]);
 			tprintf(", %p", (void *) tcp->u_arg[4]);
 		}
@@ -3572,9 +2410,9 @@
 		if (umove(tcp, list, &w) < 0)
 			break;
 		if (first)
-			tprintf("{");
+			tprints("{");
 		else
-			tprintf(", ");
+			tprints(", ");
 		first = 0;
 		tprintf("%lx", w);
 	}
@@ -3585,7 +2423,7 @@
 			tprintf(", %s}", (len >= sizeof(w) && len > min_len ?
 				"???" : "..."));
 	} else {
-		tprintf(first ? "{}" : "}");
+		tprints(first ? "{}" : "}");
 	}
 }
 
@@ -3613,6 +2451,34 @@
 	return 0;
 }
 
+int
+sys_get_robust_list(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]);
+	} else {
+		void *addr;
+		size_t len;
+
+		if (syserror(tcp) ||
+		    !tcp->u_arg[1] ||
+		    umove(tcp, tcp->u_arg[1], &addr) < 0) {
+			tprintf("%#lx, ", tcp->u_arg[1]);
+		} else {
+			tprintf("[%p], ", addr);
+		}
+
+		if (syserror(tcp) ||
+		    !tcp->u_arg[2] ||
+		    umove(tcp, tcp->u_arg[2], &len) < 0) {
+			tprintf("%#lx", tcp->u_arg[2]);
+		} else {
+			tprintf("[%lu]", (unsigned long) len);
+		}
+	}
+	return 0;
+}
+
 static const struct xlat schedulers[] = {
 	{ SCHED_OTHER,	"SCHED_OTHER" },
 	{ SCHED_RR,	"SCHED_RR" },
@@ -3625,8 +2491,8 @@
 {
 	if (entering(tcp)) {
 		tprintf("%d", (int) tcp->u_arg[0]);
-	} else if (! syserror(tcp)) {
-		tcp->auxstr = xlookup (schedulers, tcp->u_rval);
+	} else if (!syserror(tcp)) {
+		tcp->auxstr = xlookup(schedulers, tcp->u_rval);
 		if (tcp->auxstr != NULL)
 			return RVAL_STR;
 	}
@@ -3685,7 +2551,21 @@
 	return 0;
 }
 
-# ifdef X86_64
+int
+sys_sched_rr_get_interval(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		tprintf("%ld, ", (long) (pid_t) tcp->u_arg[0]);
+	} else {
+		if (syserror(tcp))
+			tprintf("%#lx", tcp->u_arg[1]);
+		else
+			print_timespec(tcp, tcp->u_arg[1]);
+	}
+	return 0;
+}
+
+#if defined X86_64 || defined X32
 # include <asm/prctl.h>
 
 static const struct xlat archvals[] = {
@@ -3719,8 +2599,7 @@
 	}
 	return 0;
 }
-# endif /* X86_64 */
-
+#endif /* X86_64 || X32 */
 
 int
 sys_getcpu(struct tcb *tcp)
@@ -3728,13 +2607,13 @@
 	if (exiting(tcp)) {
 		unsigned u;
 		if (tcp->u_arg[0] == 0)
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else if (umove(tcp, tcp->u_arg[0], &u) < 0)
 			tprintf("%#lx, ", tcp->u_arg[0]);
 		else
 			tprintf("[%u], ", u);
 		if (tcp->u_arg[1] == 0)
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else if (umove(tcp, tcp->u_arg[1], &u) < 0)
 			tprintf("%#lx, ", tcp->u_arg[1]);
 		else
@@ -3744,4 +2623,55 @@
 	return 0;
 }
 
-#endif /* LINUX */
+int
+sys_process_vm_readv(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* arg 1: pid */
+		tprintf("%ld, ", tcp->u_arg[0]);
+	} else {
+		/* arg 2: local iov */
+		if (syserror(tcp)) {
+			tprintf("%#lx", tcp->u_arg[1]);
+		} else {
+			tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		}
+		/* arg 3: local iovcnt */
+		tprintf(", %lu, ", tcp->u_arg[2]);
+		/* arg 4: remote iov */
+		if (syserror(tcp)) {
+			tprintf("%#lx", tcp->u_arg[3]);
+		} else {
+			tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
+		}
+		/* arg 5: remote iovcnt */
+		/* arg 6: flags */
+		tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
+	}
+	return 0;
+}
+
+int
+sys_process_vm_writev(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		/* arg 1: pid */
+		tprintf("%ld, ", tcp->u_arg[0]);
+		/* arg 2: local iov */
+		if (syserror(tcp))
+			tprintf("%#lx", tcp->u_arg[1]);
+		else
+			tprint_iov(tcp, tcp->u_arg[2], tcp->u_arg[1], 1);
+		/* arg 3: local iovcnt */
+		tprintf(", %lu, ", tcp->u_arg[2]);
+		/* arg 4: remote iov */
+		if (syserror(tcp))
+			tprintf("%#lx", tcp->u_arg[3]);
+		else
+			tprint_iov(tcp, tcp->u_arg[4], tcp->u_arg[3], 0);
+		/* arg 5: remote iovcnt */
+		/* arg 6: flags */
+		tprintf(", %lu, %lu", tcp->u_arg[4], tcp->u_arg[5]);
+	}
+	return 0;
+}
diff --git a/quota.c b/quota.c
index f07d1a1..a1fd92d 100644
--- a/quota.c
+++ b/quota.c
@@ -27,16 +27,10 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
 
-#ifdef LINUX
-
-#include <inttypes.h>
-
 #define SUBCMDMASK  0x00ff
 #define SUBCMDSHIFT 8
 #define QCMD_CMD(cmd)	((u_int32_t)(cmd) >> SUBCMDSHIFT)
@@ -330,20 +324,17 @@
 static void
 decode_cmd_data(struct tcb *tcp, u_int32_t cmd, unsigned long data)
 {
-	switch (cmd)
-	{
+	switch (cmd) {
 		case Q_GETQUOTA:
 		case Q_SETQUOTA:
 		{
 			struct if_dqblk dq;
 
-			if (cmd == Q_GETQUOTA && syserror(tcp))
-			{
+			if (cmd == Q_GETQUOTA && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -353,16 +344,15 @@
 			tprintf("ihardlimit=%" PRIu64 ", ", dq.dqb_ihardlimit);
 			tprintf("isoftlimit=%" PRIu64 ", ", dq.dqb_isoftlimit);
 			tprintf("curinodes=%" PRIu64 ", ", dq.dqb_curinodes);
-			if (!abbrev(tcp))
-			{
+			if (!abbrev(tcp)) {
 				tprintf("btime=%" PRIu64 ", ", dq.dqb_btime);
 				tprintf("itime=%" PRIu64 ", ", dq.dqb_itime);
-				tprintf("valid=");
+				tprints("valid=");
 				printflags(if_dqblk_valid,
 					   dq.dqb_valid, "QIF_???");
-				tprintf("}");
+				tprints("}");
 			} else
-				tprintf("...}");
+				tprints("...}");
 			break;
 		}
 		case Q_V1_GETQUOTA:
@@ -370,13 +360,11 @@
 		{
 			struct v1_dqblk dq;
 
-			if (cmd == Q_V1_GETQUOTA && syserror(tcp))
-			{
+			if (cmd == Q_V1_GETQUOTA && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -386,8 +374,8 @@
 			tprintf("ihardlimit=%u, ", dq.dqb_ihardlimit);
 			tprintf("isoftlimit=%u, ", dq.dqb_isoftlimit);
 			tprintf("curinodes=%u, ", dq.dqb_curinodes);
-			tprintf("btime=%lu, ", dq.dqb_btime);
-			tprintf("itime=%lu}", dq.dqb_itime);
+			tprintf("btime=%lu, ", (long) dq.dqb_btime);
+			tprintf("itime=%lu}", (long) dq.dqb_itime);
 			break;
 		}
 		case Q_V2_GETQUOTA:
@@ -395,13 +383,11 @@
 		{
 			struct v2_dqblk dq;
 
-			if (cmd == Q_V2_GETQUOTA && syserror(tcp))
-			{
+			if (cmd == Q_V2_GETQUOTA && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -411,8 +397,8 @@
 			tprintf("bhardlimit=%u, ", dq.dqb_bhardlimit);
 			tprintf("bsoftlimit=%u, ", dq.dqb_bsoftlimit);
 			tprintf("curspace=%" PRIu64 ", ", dq.dqb_curspace);
-			tprintf("btime=%lu, ", dq.dqb_btime);
-			tprintf("itime=%lu}", dq.dqb_itime);
+			tprintf("btime=%lu, ", (long) dq.dqb_btime);
+			tprintf("itime=%lu}", (long) dq.dqb_itime);
 			break;
 		}
 		case Q_XGETQUOTA:
@@ -420,18 +406,16 @@
 		{
 			struct xfs_dqblk dq;
 
-			if (cmd == Q_XGETQUOTA && syserror(tcp))
-			{
+			if (cmd == Q_XGETQUOTA && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
 			tprintf("{version=%d, ", dq.d_version);
-			tprintf("flags=");
+			tprints("flags=");
 			printflags(xfs_dqblk_flags,
 				   dq.d_flags, "XFS_???_QUOTA");
 			tprintf(", fieldmask=%#x, ", dq.d_fieldmask);
@@ -442,8 +426,7 @@
 			tprintf("ino_softlimit=%" PRIu64 ", ", dq.d_ino_softlimit);
 			tprintf("bcount=%" PRIu64 ", ", dq.d_bcount);
 			tprintf("icount=%" PRIu64 ", ", dq.d_icount);
-			if (!abbrev(tcp))
-			{
+			if (!abbrev(tcp)) {
 				tprintf("itimer=%d, ", dq.d_itimer);
 				tprintf("btimer=%d, ", dq.d_btimer);
 				tprintf("iwarns=%u, ", dq.d_iwarns);
@@ -452,26 +435,24 @@
 				tprintf("rtbtimer=%d, ", dq.d_rtbtimer);
 				tprintf("rtbwarns=%u}", dq.d_rtbwarns);
 			} else
-				tprintf("...}");
+				tprints("...}");
 			break;
 		}
 		case Q_GETFMT:
 		{
 			u_int32_t fmt;
 
-			if (syserror(tcp))
-			{
+			if (syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &fmt) < 0)
-			{
+			if (umove(tcp, data, &fmt) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
-			tprintf("{");
+			tprints("{");
 			printxval(quota_formats, fmt, "QFMT_VFS_???");
-			tprintf("}");
+			tprints("}");
 			break;
 		}
 		case Q_GETINFO:
@@ -479,22 +460,20 @@
 		{
 			struct if_dqinfo dq;
 
-			if (cmd == Q_GETINFO && syserror(tcp))
-			{
+			if (cmd == Q_GETINFO && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
 			tprintf("{bgrace=%" PRIu64 ", ", dq.dqi_bgrace);
 			tprintf("igrace=%" PRIu64 ", ", dq.dqi_igrace);
 			tprintf("flags=%#x, ", dq.dqi_flags);
-			tprintf("valid=");
+			tprints("valid=");
 			printflags(if_dqinfo_valid, dq.dqi_valid, "IIF_???");
-			tprintf("}");
+			tprints("}");
 			break;
 		}
 		case Q_V2_GETINFO:
@@ -502,13 +481,11 @@
 		{
 			struct v2_dqinfo dq;
 
-			if (cmd == Q_V2_GETINFO && syserror(tcp))
-			{
+			if (cmd == Q_V2_GETINFO && syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -524,13 +501,11 @@
 		{
 			struct v1_dqstats dq;
 
-			if (syserror(tcp))
-			{
+			if (syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -548,13 +523,11 @@
 		{
 			struct v2_dqstats dq;
 
-			if (syserror(tcp))
-			{
+			if (syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
@@ -573,23 +546,20 @@
 		{
 			struct xfs_dqstats dq;
 
-			if (syserror(tcp))
-			{
+			if (syserror(tcp)) {
 				tprintf("%#lx", data);
 				break;
 			}
-			if (umove(tcp, data, &dq) < 0)
-			{
+			if (umove(tcp, data, &dq) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
 			tprintf("{version=%d, ", dq.qs_version);
-			if (abbrev(tcp))
-			{
-				tprintf("...}");
+			if (abbrev(tcp)) {
+				tprints("...}");
 				break;
 			}
-			tprintf("flags=");
+			tprints("flags=");
 			printflags(xfs_quota_flags,
 				   dq.qs_flags, "XFS_QUOTA_???");
 			tprintf(", incoredqs=%u, ", dq.qs_incoredqs);
@@ -610,14 +580,13 @@
 		{
 			u_int32_t flag;
 
-			if (umove(tcp, data, &flag) < 0)
-			{
+			if (umove(tcp, data, &flag) < 0) {
 				tprintf("{???} %#lx", data);
 				break;
 			}
-			tprintf("{");
+			tprints("{");
 			printflags(xfs_quota_flags, flag, "XFS_QUOTA_???");
-			tprintf("}");
+			tprints("}");
 			break;
 		}
 		default:
@@ -643,16 +612,14 @@
 	if (!verbose(tcp))
 		return printargs(tcp);
 
-	if (entering(tcp))
-	{
+	if (entering(tcp)) {
 		printxval(quotacmds, cmd, "Q_???");
-		tprintf("|");
+		tprints("|");
 		printxval(quotatypes, type, "???QUOTA");
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, tcp->u_arg[1], -1);
-		tprintf(", ");
-		switch (cmd)
-		{
+		tprints(", ");
+		switch (cmd) {
 			case Q_V1_QUOTAON:
 			case Q_QUOTAON:
 				printxval(quota_formats, id, "QFMT_VFS_???");
@@ -674,63 +641,12 @@
 				tprintf("%#lx", tcp->u_arg[2]);
 				break;
 		}
-		tprintf(", ");
-	} else
-	{
+		tprints(", ");
+	} else {
 		if (!tcp->u_arg[3])
-			tprintf("NULL");
+			tprints("NULL");
 		else
 			decode_cmd_data(tcp, cmd, tcp->u_arg[3]);
 	}
 	return 0;
 }
-
-#endif /* Linux */
-
-#if defined(SUNOS4) || defined(FREEBSD)
-
-#ifdef SUNOS4
-#include <ufs/quota.h>
-#endif
-
-#ifdef FREEBSD
-#include <ufs/ufs/quota.h>
-#endif
-
-static const struct xlat quotacmds[] = {
-	{Q_QUOTAON, "Q_QUOTAON"},
-	{Q_QUOTAOFF, "Q_QUOTAOFF"},
-	{Q_GETQUOTA, "Q_GETQUOTA"},
-	{Q_SETQUOTA, "Q_SETQUOTA"},
-#ifdef Q_SETQLIM
-	{Q_SETQLIM, "Q_SETQLIM"},
-#endif
-#ifdef Q_SETUSE
-	{Q_SETUSE, "Q_SETUSE"},
-#endif
-	{Q_SYNC, "Q_SYNC"},
-	{0, NULL},
-};
-
-int
-sys_quotactl(struct tcb *tcp)
-{
-	/* fourth arg (addr) not interpreted here */
-	if (entering(tcp))
-	{
-#ifdef SUNOS4
-		printxval(quotacmds, tcp->u_arg[0], "Q_???");
-		tprintf(", ");
-		printstr(tcp, tcp->u_arg[1], -1);
-#endif
-#ifdef FREEBSD
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printxval(quotacmds, tcp->u_arg[1], "Q_???");
-#endif
-		tprintf(", %lu, %#lx", tcp->u_arg[2], tcp->u_arg[3]);
-	}
-	return 0;
-}
-
-#endif /* SUNOS4 || FREEBSD */
diff --git a/resource.c b/resource.c
index b9550b8..5a51d8c 100644
--- a/resource.c
+++ b/resource.c
@@ -26,53 +26,31 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
 #include <sys/resource.h>
-#ifdef LINUX
 #include <sys/times.h>
 #include <linux/kernel.h>
-#endif /* LINUX */
-#if defined(SVR4) || defined(FREEBSD)
-#include <sys/times.h>
-#include <sys/time.h>
-#endif
-
-#if HAVE_LONG_LONG_RLIM_T
-/*
- * Hacks for systems that have a long long rlim_t
- */
-
-#define rlimit64 rlimit			/* Ugly hack */
-#define rlim64_t rlim_t			/* Ugly hack */
-#define RLIM64_INFINITY RLIM_INFINITY	/* You guessed it */
-
-#define sys_getrlimit64	sys_getrlimit
-#define sys_setrlimit64	sys_setrlimit
-#endif
 
 static const struct xlat resources[] = {
 #ifdef RLIMIT_AS
-	{ RLIMIT_AS,	"RLIMIT_AS"	},
+	{ RLIMIT_AS,		"RLIMIT_AS"		},
 #endif
 #ifdef RLIMIT_CORE
-	{ RLIMIT_CORE,	"RLIMIT_CORE"	},
+	{ RLIMIT_CORE,		"RLIMIT_CORE"		},
 #endif
 #ifdef RLIMIT_CPU
-	{ RLIMIT_CPU,	"RLIMIT_CPU"	},
+	{ RLIMIT_CPU,		"RLIMIT_CPU"		},
 #endif
 #ifdef RLIMIT_DATA
-	{ RLIMIT_DATA,	"RLIMIT_DATA"	},
+	{ RLIMIT_DATA,		"RLIMIT_DATA"		},
 #endif
 #ifdef RLIMIT_FSIZE
-	{ RLIMIT_FSIZE,	"RLIMIT_FSIZE"	},
+	{ RLIMIT_FSIZE,		"RLIMIT_FSIZE"		},
 #endif
 #ifdef RLIMIT_LOCKS
-	{ RLIMIT_LOCKS,	"RLIMIT_LOCKS"	},
+	{ RLIMIT_LOCKS,		"RLIMIT_LOCKS"		},
 #endif
 #ifdef RLIMIT_MEMLOCK
 	{ RLIMIT_MEMLOCK,	"RLIMIT_MEMLOCK"	},
@@ -81,91 +59,150 @@
 	{ RLIMIT_MSGQUEUE,	"RLIMIT_MSGQUEUE"	},
 #endif
 #ifdef RLIMIT_NICE
-	{ RLIMIT_NICE,	"RLIMIT_NICE"	},
+	{ RLIMIT_NICE,		"RLIMIT_NICE"		},
 #endif
 #ifdef RLIMIT_NOFILE
-	{ RLIMIT_NOFILE,	"RLIMIT_NOFILE"	},
+	{ RLIMIT_NOFILE,	"RLIMIT_NOFILE"		},
 #endif
 #ifdef RLIMIT_NPROC
-	{ RLIMIT_NPROC,	"RLIMIT_NPROC"	},
+	{ RLIMIT_NPROC,		"RLIMIT_NPROC"		},
 #endif
 #ifdef RLIMIT_RSS
-	{ RLIMIT_RSS,	"RLIMIT_RSS"	},
+	{ RLIMIT_RSS,		"RLIMIT_RSS"		},
 #endif
 #ifdef RLIMIT_RTPRIO
-	{ RLIMIT_RTPRIO,	"RLIMIT_RTPRIO"	},
+	{ RLIMIT_RTPRIO,	"RLIMIT_RTPRIO"		},
+#endif
+#ifdef RLIMIT_RTTIME
+	{ RLIMIT_RTTIME,	"RLIMIT_RTTIME"		},
 #endif
 #ifdef RLIMIT_SIGPENDING
 	{ RLIMIT_SIGPENDING,	"RLIMIT_SIGPENDING"	},
 #endif
 #ifdef RLIMIT_STACK
-	{ RLIMIT_STACK,	"RLIMIT_STACK"	},
+	{ RLIMIT_STACK,		"RLIMIT_STACK"		},
 #endif
 #ifdef RLIMIT_VMEM
-	{ RLIMIT_VMEM,	"RLIMIT_VMEM"	},
+	{ RLIMIT_VMEM,		"RLIMIT_VMEM"		},
 #endif
-	{ 0,		NULL		},
+	{ 0,			NULL			}
 };
 
-#if !HAVE_LONG_LONG_RLIM_T
-static char *
-sprintrlim(long lim)
-{
-	static char buf[32];
+#if !(SIZEOF_RLIM_T == 4 || SIZEOF_RLIM_T == 8)
+# error "Unsupported SIZEOF_RLIM_T value"
+#endif
 
-	if (lim == RLIM_INFINITY)
-		sprintf(buf, "RLIM_INFINITY");
-	else if (lim > 1024 && lim%1024 == 0)
-		sprintf(buf, "%ld*1024", lim/1024);
+static const char *
+sprint_rlim64(uint64_t lim)
+{
+	static char buf[sizeof(uint64_t)*3 + sizeof("*1024")];
+
+	if (lim == UINT64_MAX)
+		return "RLIM64_INFINITY";
+
+	if (lim > 1024 && lim % 1024 == 0)
+		sprintf(buf, "%" PRIu64 "*1024", lim / 1024);
 	else
-		sprintf(buf, "%ld", lim);
+		sprintf(buf, "%" PRIu64, lim);
 	return buf;
 }
 
-# if defined LINUX && (defined POWERPC64 || defined X86_64)
 static void
-print_rlimit32(struct tcb *tcp)
+print_rlimit64(struct tcb *tcp, unsigned long addr)
 {
-	struct rlimit32 {
-		unsigned int rlim_cur;
-		unsigned int rlim_max;
+	struct rlimit_64 {
+		uint64_t rlim_cur;
+		uint64_t rlim_max;
 	} rlim;
 
-	if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
-		tprintf("{...}");
+	if (umove(tcp, addr, &rlim) < 0)
+		tprintf("%#lx", addr);
 	else {
-		tprintf("{rlim_cur=%s,",
-			sprintrlim(rlim.rlim_cur == -1 ? RLIM_INFINITY
-				   : rlim.rlim_cur));
-		tprintf(" rlim_max=%s}",
-			sprintrlim(rlim.rlim_max == -1 ? RLIM_INFINITY
-				   : rlim.rlim_max));
+		tprintf("{rlim_cur=%s,", sprint_rlim64(rlim.rlim_cur));
+		tprintf(" rlim_max=%s}", sprint_rlim64(rlim.rlim_max));
 	}
 }
+
+static void
+decode_rlimit64(struct tcb *tcp, unsigned long addr)
+{
+	if (!addr)
+		tprints("NULL");
+	else if (!verbose(tcp) ||
+		 (exiting(tcp) && syserror(tcp)))
+		tprintf("%#lx", addr);
+	else
+		print_rlimit64(tcp, addr);
+}
+
+#if SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1
+
+static const char *
+sprint_rlim32(uint32_t lim)
+{
+	static char buf[sizeof(uint32_t)*3 + sizeof("*1024")];
+
+	if (lim == UINT32_MAX)
+		return "RLIM_INFINITY";
+
+	if (lim > 1024 && lim % 1024 == 0)
+		sprintf(buf, "%" PRIu32 "*1024", lim / 1024);
+	else
+		sprintf(buf, "%" PRIu32, lim);
+	return buf;
+}
+
+static void
+print_rlimit32(struct tcb *tcp, unsigned long addr)
+{
+	struct rlimit_32 {
+		uint32_t rlim_cur;
+		uint32_t rlim_max;
+	} rlim;
+
+	if (umove(tcp, addr, &rlim) < 0)
+		tprintf("%#lx", addr);
+	else {
+		tprintf("{rlim_cur=%s,", sprint_rlim32(rlim.rlim_cur));
+		tprintf(" rlim_max=%s}", sprint_rlim32(rlim.rlim_max));
+	}
+}
+
+static void
+decode_rlimit(struct tcb *tcp, unsigned long addr)
+{
+	if (!addr)
+		tprints("NULL");
+	else if (!verbose(tcp) ||
+		 (exiting(tcp) && syserror(tcp)))
+		tprintf("%#lx", addr);
+	else {
+# if SIZEOF_RLIM_T == 4
+		print_rlimit32(tcp, addr);
+# else
+		if (current_wordsize == 4)
+			print_rlimit32(tcp, addr);
+		else
+			print_rlimit64(tcp, addr);
 # endif
+	}
+}
+
+#else /* SIZEOF_RLIM_T == 8 && SUPPORTED_PERSONALITIES == 1 */
+
+# define decode_rlimit decode_rlimit64
+
+#endif /* SIZEOF_RLIM_T == 4 || SUPPORTED_PERSONALITIES > 1 */
 
 int
 sys_getrlimit(struct tcb *tcp)
 {
-	struct rlimit rlim;
-
 	if (entering(tcp)) {
 		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
-		tprintf(", ");
+		tprints(", ");
 	}
 	else {
-		if (syserror(tcp) || !verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-# if defined LINUX && (defined POWERPC64 || defined X86_64)
-		else if (current_personality == 1)
-			print_rlimit32(tcp);
-# endif
-		else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
-			tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
-		}
+		decode_rlimit(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
@@ -173,87 +210,28 @@
 int
 sys_setrlimit(struct tcb *tcp)
 {
-	struct rlimit rlim;
-
 	if (entering(tcp)) {
 		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
-		tprintf(", ");
-		if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-# if defined LINUX && (defined POWERPC64 || defined X86_64)
-		else if (current_personality == 1)
-			print_rlimit32(tcp);
-# endif
-		else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{rlim_cur=%s,", sprintrlim(rlim.rlim_cur));
-			tprintf(" rlim_max=%s}", sprintrlim(rlim.rlim_max));
-		}
-	}
-	return 0;
-}
-#endif /* !HAVE_LONG_LONG_RLIM_T */
-
-#if _LFS64_LARGEFILE || HAVE_LONG_LONG_RLIM_T
-static char *
-sprintrlim64(rlim64_t lim)
-{
-	static char buf[64];
-
-	if (lim == RLIM64_INFINITY)
-		sprintf(buf, "RLIM64_INFINITY");
-	else if (lim > 1024 && lim%1024 == 0)
-		sprintf(buf, "%lld*1024", (long long) lim/1024);
-	else
-		sprintf(buf, "%lld", (long long) lim);
-	return buf;
-}
-
-int
-sys_getrlimit64(struct tcb *tcp)
-{
-	struct rlimit64 rlim;
-
-	if (entering(tcp)) {
-		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
-		tprintf(", ");
-	}
-	else {
-		if (syserror(tcp) || !verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
-			tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
-		}
+		tprints(", ");
+		decode_rlimit(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
 int
-sys_setrlimit64(struct tcb *tcp)
+sys_prlimit64(struct tcb *tcp)
 {
-	struct rlimit64 rlim;
-
 	if (entering(tcp)) {
-		printxval(resources, tcp->u_arg[0], "RLIMIT_???");
-		tprintf(", ");
-		if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umove(tcp, tcp->u_arg[1], &rlim) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{rlim_cur=%s,", sprintrlim64(rlim.rlim_cur));
-			tprintf(" rlim_max=%s}", sprintrlim64(rlim.rlim_max));
-		}
+		tprintf("%ld, ", tcp->u_arg[0]);
+		printxval(resources, tcp->u_arg[1], "RLIMIT_???");
+		tprints(", ");
+		decode_rlimit64(tcp, tcp->u_arg[2]);
+		tprints(", ");
+	} else {
+		decode_rlimit64(tcp, tcp->u_arg[3]);
 	}
 	return 0;
 }
-#endif /* _LFS64_LARGEFILES || HAVE_LONG_LONG_RLIM_T */
-
-#ifndef SVR4
 
 static const struct xlat usagewho[] = {
 	{ RUSAGE_SELF,		"RUSAGE_SELF"		},
@@ -292,11 +270,11 @@
 	} ru;
 
 	if (!addr)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (syserror(tcp) || !verbose(tcp))
 		tprintf("%#lx", addr);
 	else if (umove(tcp, addr, &ru) < 0)
-		tprintf("{...}");
+		tprints("{...}");
 	else if (!abbrev(tcp)) {
 		tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
 			(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -328,11 +306,11 @@
 	struct rusage ru;
 
 	if (!addr)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (syserror(tcp) || !verbose(tcp))
 		tprintf("%#lx", addr);
 	else if (umove(tcp, addr, &ru) < 0)
-		tprintf("{...}");
+		tprints("{...}");
 	else if (!abbrev(tcp)) {
 		tprintf("{ru_utime={%lu, %lu}, ru_stime={%lu, %lu}, ",
 			(long) ru.ru_utime.tv_sec, (long) ru.ru_utime.tv_usec,
@@ -362,7 +340,7 @@
 {
 	if (entering(tcp)) {
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
-		tprintf(", ");
+		tprints(", ");
 	}
 	else
 		printrusage(tcp, tcp->u_arg[1]);
@@ -375,7 +353,7 @@
 {
 	if (entering(tcp)) {
 		printxval(usagewho, tcp->u_arg[0], "RUSAGE_???");
-		tprintf(", ");
+		tprints(", ");
 	}
 	else
 		printrusage32(tcp, tcp->u_arg[1]);
@@ -383,10 +361,6 @@
 }
 #endif /* ALPHA */
 
-#endif /* !SVR4 */
-
-#ifdef LINUX
-
 int
 sys_sysinfo(struct tcb *tcp)
 {
@@ -396,24 +370,23 @@
 		if (syserror(tcp) || !verbose(tcp))
 			tprintf("%#lx", tcp->u_arg[0]);
 		else if (umove(tcp, tcp->u_arg[0], &si) < 0)
-			tprintf("{...}");
+			tprints("{...}");
 		else {
 			tprintf("{uptime=%lu, loads=[%lu, %lu, %lu] ",
-				si.uptime, si.loads[0], si.loads[1],
-				si.loads[2]);
+				(long) si.uptime, (long) si.loads[0],
+				(long) si.loads[1], (long) si.loads[2]);
 			tprintf("totalram=%lu, freeram=%lu, ",
-				si.totalram, si.freeram);
+				(long) si.totalram, (long) si.freeram);
 			tprintf("sharedram=%lu, bufferram=%lu} ",
-				si.sharedram, si.bufferram);
-			tprintf("totalswap=%lu, freeswap=%lu, procs=%hu}",
-				si.totalswap, si.freeswap, si.procs);
+				(long) si.sharedram, (long) si.bufferram);
+			tprintf("totalswap=%lu, freeswap=%lu, procs=%u}",
+				(long) si.totalswap, (long) si.freeswap,
+				(unsigned)si.procs);
 		}
 	}
 	return 0;
 }
 
-#endif /* LINUX */
-
 static const struct xlat priorities[] = {
 	{ PRIO_PROCESS,	"PRIO_PROCESS"	},
 	{ PRIO_PGRP,	"PRIO_PGRP"	},
@@ -442,35 +415,25 @@
 }
 
 int
-sys_nice(struct tcb *tcp)
-{
-	if (entering(tcp))
-		tprintf("%ld", tcp->u_arg[0]);
-	return 0;
-}
-
-#ifndef SUNOS4
-
-int
 sys_times(struct tcb *tcp)
 {
 	struct tms tbuf;
 
 	if (exiting(tcp)) {
 		if (tcp->u_arg[0] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[0]);
 		else if (umove(tcp, tcp->u_arg[0], &tbuf) < 0)
-			tprintf("{...}");
+			tprints("{...}");
 		else {
-			tprintf("{tms_utime=%lu, tms_stime=%lu, ",
-				tbuf.tms_utime, tbuf.tms_stime);
-			tprintf("tms_cutime=%lu, tms_cstime=%lu}",
-				tbuf.tms_cutime, tbuf.tms_cstime);
+			tprintf("{tms_utime=%llu, tms_stime=%llu, ",
+				(unsigned long long) tbuf.tms_utime,
+				(unsigned long long) tbuf.tms_stime);
+			tprintf("tms_cutime=%llu, tms_cstime=%llu}",
+				(unsigned long long) tbuf.tms_cutime,
+				(unsigned long long) tbuf.tms_cstime);
 		}
 	}
 	return 0;
 }
-
-#endif /* !SUNOS4 */
diff --git a/scsi.c b/scsi.c
index cc077a9..682016e 100644
--- a/scsi.c
+++ b/scsi.c
@@ -1,6 +1,32 @@
-#include "defs.h"
+/*
+ * Copyright (c) 2007 Vladimir Nadvornik <nadvornik@suse.cz>
+ * Copyright (c) 2007 Dmitry V. Levin <ldv@altlinux.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 
-#ifdef LINUX
+#include "defs.h"
 #include <sys/ioctl.h>
 #include <scsi/sg.h>
 
@@ -33,7 +59,7 @@
 		tprintf(", %02x", buf[i]);
 	free(buf);
 	if (allocated != len)
-		tprintf(", ...");
+		tprints(", ...");
 }
 
 static void
@@ -55,7 +81,7 @@
 		tprintf(", data[%u]=[", sg_io->dxfer_len);
 		printstr(tcp, (unsigned long) sg_io->dxferp,
 			 sg_io->dxfer_len);
-		tprintf("]");
+		tprints("]");
 	}
 }
 
@@ -67,7 +93,7 @@
 		tprintf(", data[%u]=[", sg_io->dxfer_len);
 		printstr(tcp, (unsigned long) sg_io->dxferp,
 			 sg_io->dxfer_len);
-		tprintf("]");
+		tprints("]");
 	}
 	tprintf(", status=%02x, ", sg_io->status);
 	tprintf("masked_status=%02x, ", sg_io->masked_status);
@@ -91,7 +117,7 @@
 			if (umove(tcp, arg, &sg_io) < 0)
 				tprintf(", %#lx", arg);
 			else {
-				tprintf(", ");
+				tprints(", ");
 				print_sg_io_req(tcp, &sg_io);
 			}
 		}
@@ -101,7 +127,7 @@
 			if (!syserror(tcp) && umove(tcp, arg, &sg_io) >= 0)
 				print_sg_io_res(tcp, &sg_io);
 			else
-				tprintf("}");
+				tprints("}");
 		}
 		break;
 	default:
@@ -111,4 +137,3 @@
 	}
 	return 1;
 }
-#endif /* LINUX */
diff --git a/signal.c b/signal.c
index 7da41ab..8fcfc77 100644
--- a/signal.c
+++ b/signal.c
@@ -29,73 +29,55 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#include <stdint.h>
-#include <signal.h>
 #include <sys/user.h>
 #include <fcntl.h>
 
-#ifdef HAVE_ANDROID_OS
-//FIXME use "sigprocmask" or something
-#define sigmask(sig)    (1UL << ((sig) - 1))
-#define sigcontext_struct sigcontext
-#endif
-
-#ifdef SVR4
-#include <sys/ucontext.h>
-#endif /* SVR4 */
-
 #ifdef HAVE_SYS_REG_H
 # include <sys/reg.h>
-#ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-#endif
-#ifndef PTRACE_POKEUSR
-# define PTRACE_POKEUSR PTRACE_POKEUSER
-#endif
+# ifndef PTRACE_PEEKUSR
+#  define PTRACE_PEEKUSR PTRACE_PEEKUSER
+# endif
+# ifndef PTRACE_POKEUSR
+#  define PTRACE_POKEUSR PTRACE_POKEUSER
+# endif
 #elif defined(HAVE_LINUX_PTRACE_H)
-#undef PTRACE_SYSCALL
+# undef PTRACE_SYSCALL
 # ifdef HAVE_STRUCT_IA64_FPREG
 #  define ia64_fpreg XXX_ia64_fpreg
 # endif
 # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
 #  define pt_all_user_regs XXX_pt_all_user_regs
 # endif
-#include <linux/ptrace.h>
+# include <linux/ptrace.h>
 # undef ia64_fpreg
 # undef pt_all_user_regs
 #endif
 
-
-#ifdef LINUX
-
 #ifdef IA64
 # include <asm/ptrace_offsets.h>
-#endif /* !IA64 */
+#endif
 
-#if defined (LINUX) && defined (SPARC64)
+#if defined(SPARC64)
 # undef PTRACE_GETREGS
 # define PTRACE_GETREGS PTRACE_GETREGS64
 # undef PTRACE_SETREGS
 # define PTRACE_SETREGS PTRACE_SETREGS64
-#endif /* LINUX && SPARC64 */
+#endif
 
-#if defined (SPARC) || defined (SPARC64) || defined (MIPS)
+#if defined(SPARC) || defined(SPARC64) || defined(MIPS)
 typedef struct {
 	struct pt_regs		si_regs;
 	int			si_mask;
 } m_siginfo_t;
 #elif defined HAVE_ASM_SIGCONTEXT_H
-#if !defined(IA64) && !defined(X86_64)
-#include <asm/sigcontext.h>
-#endif /* !IA64 && !X86_64 */
+# if !defined(IA64) && !defined(X86_64) && !defined(X32)
+#  include <asm/sigcontext.h>
+# endif
 #else /* !HAVE_ASM_SIGCONTEXT_H */
-#if defined I386 && !defined HAVE_STRUCT_SIGCONTEXT_STRUCT
+# if defined I386 && !defined HAVE_STRUCT_SIGCONTEXT_STRUCT
 struct sigcontext_struct {
 	unsigned short gs, __gsh;
 	unsigned short fs, __fsh;
@@ -120,8 +102,8 @@
 	unsigned long oldmask;
 	unsigned long cr2;
 };
-#else /* !I386 */
-#if defined M68K && !defined HAVE_STRUCT_SIGCONTEXT
+# else /* !I386 */
+#  if defined M68K && !defined HAVE_STRUCT_SIGCONTEXT
 struct sigcontext
 {
 	unsigned long sc_mask;
@@ -134,57 +116,25 @@
 	unsigned long sc_pc;
 	unsigned short sc_formatvec;
 };
-#endif /* M68K */
-#endif /* !I386 */
+#  endif /* M68K */
+# endif /* !I386 */
 #endif /* !HAVE_ASM_SIGCONTEXT_H */
+
 #ifndef NSIG
-#define NSIG 32
+# warning: NSIG is not defined, using 32
+# define NSIG 32
 #endif
 #ifdef ARM
-#undef NSIG
-#define NSIG 32
+/* Ugh. Is this really correct? ARM has no RT signals?! */
+# undef NSIG
+# define NSIG 32
 #endif
-#endif /* LINUX */
-
-const char *const signalent0[] = {
-#include "signalent.h"
-};
-const int nsignals0 = sizeof signalent0 / sizeof signalent0[0];
-
-#if SUPPORTED_PERSONALITIES >= 2
-const char *const signalent1[] = {
-#include "signalent1.h"
-};
-const int nsignals1 = sizeof signalent1 / sizeof signalent1[0];
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
-
-#if SUPPORTED_PERSONALITIES >= 3
-const char *const signalent2[] = {
-#include "signalent2.h"
-};
-const int nsignals2 = sizeof signalent2 / sizeof signalent2[0];
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
-
-const char *const *signalent;
-int nsignals;
-
-#if defined(SUNOS4) || defined(FREEBSD)
-
-static const struct xlat sigvec_flags[] = {
-	{ SV_ONSTACK,	"SV_ONSTACK"	},
-	{ SV_INTERRUPT,	"SV_INTERRUPT"	},
-	{ SV_RESETHAND,	"SV_RESETHAND"	},
-	{ SA_NOCLDSTOP,	"SA_NOCLDSTOP"	},
-	{ 0,		NULL		},
-};
-
-#endif /* SUNOS4 || FREEBSD */
 
 #ifdef HAVE_SIGACTION
 
-#if defined LINUX && (defined I386 || defined X86_64)
+#if defined I386 || defined X86_64 || defined X32
 /* The libc headers do not define this constant since it should only be
-   used by the implementation.  So wwe define it here.  */
+   used by the implementation.  So we define it here.  */
 # ifndef SA_RESTORER
 #  define SA_RESTORER 0x04000000
 # endif
@@ -264,41 +214,54 @@
 #endif
 #endif
 
+/* Note on the size of sigset_t:
+ *
+ * In glibc, sigset_t is an array with space for 1024 bits (!),
+ * even though all arches supported by Linux have only 64 signals
+ * except MIPS, which has 128. IOW, it is 128 bytes long.
+ *
+ * In-kernel sigset_t is sized correctly (it is either 64 or 128 bit long).
+ * However, some old syscall return only 32 lower bits (one word).
+ * Example: sys_sigpending vs sys_rt_sigpending.
+ *
+ * Be aware of this fact when you try to
+ *     memcpy(&tcp->u_arg[1], &something, sizeof(sigset_t))
+ * - sizeof(sigset_t) is much bigger than you think,
+ * it may overflow tcp->u_arg[] array, and it may try to copy more data
+ * than is really available in <something>.
+ * Similarly,
+ *     umoven(tcp, addr, sizeof(sigset_t), &sigset)
+ * may be a bad idea: it'll try to read much more data than needed
+ * to fetch a sigset_t.
+ * Use (NSIG / 8) as a size instead.
+ */
+
 const char *
-signame(sig)
-int sig;
+signame(int sig)
 {
-	static char buf[30];
-	if (sig >= 0 && sig < nsignals) {
+	static char buf[sizeof("SIGRT_%d") + sizeof(int)*3];
+
+	if (sig >= 0 && sig < nsignals)
 		return signalent[sig];
 #ifdef SIGRTMIN
-	} else if (sig >= __SIGRTMIN && sig <= __SIGRTMAX) {
-		sprintf(buf, "SIGRT_%ld", (long)(sig - __SIGRTMIN));
-		return buf;
-#endif /* SIGRTMIN */
-	} else {
-		sprintf(buf, "%d", sig);
+	if (sig >= __SIGRTMIN && sig <= __SIGRTMAX) {
+		sprintf(buf, "SIGRT_%d", (int)(sig - __SIGRTMIN));
 		return buf;
 	}
+#endif
+	sprintf(buf, "%d", sig);
+	return buf;
 }
 
-#ifndef UNIXWARE
 static void
-long_to_sigset(l, s)
-long l;
-sigset_t *s;
+long_to_sigset(long l, sigset_t *s)
 {
 	sigemptyset(s);
 	*(long *)s = l;
 }
-#endif
 
 static int
-copy_sigset_len(tcp, addr, s, len)
-struct tcb *tcp;
-long addr;
-sigset_t *s;
-int len;
+copy_sigset_len(struct tcb *tcp, long addr, sigset_t *s, int len)
 {
 	if (len > sizeof(*s))
 		len = sizeof(*s);
@@ -308,92 +271,88 @@
 	return 0;
 }
 
-#ifdef LINUX
 /* Original sigset is unsigned long */
 #define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(long))
-#else
-#define copy_sigset(tcp, addr, s) copy_sigset_len(tcp, addr, s, sizeof(sigset_t))
-#endif
 
 static const char *
 sprintsigmask(const char *str, sigset_t *mask, int rt)
 /* set might include realtime sigs */
 {
+	/* Was [8 * sizeof(sigset_t) * 8], but
+	 * glibc sigset_t is huge (1024 bits = 128 *bytes*),
+	 * and we were ending up with 8k (!) buffer here.
+	 *
+	 * No Unix system can have sig > 255
+	 * (waitpid API won't be able to indicate death from one)
+	 * and sig 0 doesn't exist either.
+	 * Therefore max possible no of sigs is 255: 1..255
+	 */
+	static char outstr[8 * (255 * 2 / 3)];
+
 	int i, nsigs;
 	int maxsigs;
-	const char *format;
+	int show_members;
+	char sep;
 	char *s;
-	static char outstr[8 * sizeof(sigset_t) * 8];
 
-	strcpy(outstr, str);
-	s = outstr + strlen(outstr);
-	nsigs = 0;
 	maxsigs = nsignals;
 #ifdef __SIGRTMAX
 	if (rt)
 		maxsigs = __SIGRTMAX; /* instead */
 #endif
+	s = stpcpy(outstr, str);
+	nsigs = 0;
 	for (i = 1; i < maxsigs; i++) {
 		if (sigismember(mask, i) == 1)
 			nsigs++;
 	}
-	if (nsigs >= nsignals * 2 / 3) {
+
+	/* 1: show mask members, 0: show those which are NOT in mask */
+	show_members = (nsigs < nsignals * 2 / 3);
+	if (!show_members)
 		*s++ = '~';
-		for (i = 1; i < maxsigs; i++) {
-			switch (sigismember(mask, i)) {
-			case 1:
-				sigdelset(mask, i);
-				break;
-			case 0:
-				sigaddset(mask, i);
-				break;
-			}
-		}
-	}
-	format = "%s";
-	*s++ = '[';
+
+	sep = '[';
 	for (i = 1; i < maxsigs; i++) {
-		if (sigismember(mask, i) == 1) {
+		if (sigismember(mask, i) == show_members) {
 			/* real-time signals on solaris don't have
 			 * signalent entries
 			 */
+			char tsig[40];
+			*s++ = sep;
 			if (i < nsignals) {
-				sprintf(s, format, signalent[i] + 3);
+				s = stpcpy(s, signalent[i] + 3);
 			}
 #ifdef SIGRTMIN
 			else if (i >= __SIGRTMIN && i <= __SIGRTMAX) {
-				char tsig[40];
 				sprintf(tsig, "RT_%u", i - __SIGRTMIN);
-				sprintf(s, format, tsig);
+				s = stpcpy(s, tsig);
 			}
 #endif /* SIGRTMIN */
 			else {
-				char tsig[32];
 				sprintf(tsig, "%u", i);
-				sprintf(s, format, tsig);
+				s = stpcpy(s, tsig);
 			}
-			s += strlen(s);
-			format = " %s";
+			sep = ' ';
 		}
 	}
+	if (sep == '[')
+		*s++ = sep;
 	*s++ = ']';
 	*s = '\0';
 	return outstr;
 }
 
 static void
-printsigmask(mask, rt)
-sigset_t *mask;
-int rt;
+printsigmask(sigset_t *mask, int rt)
 {
-	tprintf("%s", sprintsigmask("", mask, rt));
+	tprints(sprintsigmask("", mask, rt));
 }
 
 void
-printsignal(nr)
-int nr;
+printsignal(int nr)
 {
-	tprintf("%s", signame(nr));
+	tprints(signame(nr));
 }
 
 void
@@ -402,15 +361,13 @@
 	sigset_t ss;
 
 	if (!addr)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (copy_sigset(tcp, addr, &ss) < 0)
 		tprintf("%#lx", addr);
 	else
 		printsigmask(&ss, rt);
 }
 
-#ifdef LINUX
-
 #ifndef ILL_ILLOPC
 #define ILL_ILLOPC      1       /* illegal opcode */
 #define ILL_ILLOPN      2       /* illegal operand */
@@ -456,10 +413,11 @@
 #define SI_SIGIO	-5	/* sent by SIGIO */
 #define SI_TKILL	-6	/* sent by tkill */
 #define SI_ASYNCNL	-60     /* sent by asynch name lookup completion */
+#endif
 
-#define SI_FROMUSER(sip)	((sip)->si_code <= 0)
-
-#endif /* LINUX */
+#ifndef SI_FROMUSER
+# define SI_FROMUSER(sip)	((sip)->si_code <= 0)
+#endif
 
 #if __GLIBC_MINOR__ < 1 && !defined(HAVE_ANDROID_OS)
 /* Type for data associated with a signal.  */
@@ -470,7 +428,7 @@
 } sigval_t;
 
 # define __SI_MAX_SIZE     128
-# define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof (int)) - 3)
+# define __SI_PAD_SIZE     ((__SI_MAX_SIZE / sizeof(int)) - 3)
 
 typedef struct siginfo
 {
@@ -543,10 +501,6 @@
 
 #endif
 
-#endif
-
-#if defined (SVR4) || defined (LINUX)
-
 static const struct xlat siginfo_codes[] = {
 #ifdef SI_KERNEL
 	{ SI_KERNEL,	"SI_KERNEL"	},
@@ -669,10 +623,10 @@
 	const char *code;
 
 	if (sip->si_signo == 0) {
-		tprintf ("{}");
+		tprints("{}");
 		return;
 	}
-	tprintf("{si_signo=");
+	tprints("{si_signo=");
 	printsignal(sip->si_signo);
 	code = xlookup(siginfo_codes, sip->si_code);
 	if (!code) {
@@ -742,18 +696,16 @@
 				tprintf(", si_value=%d", sip->si_int);
 				break;
 #endif
-#ifdef LINUX
 			default:
 				if (!sip->si_ptr)
 					break;
 				if (!verbose)
-					tprintf(", ...");
+					tprints(", ...");
 				else
 					tprintf(", si_value={int=%u, ptr=%#lx}",
 						sip->si_int,
 						(unsigned long) sip->si_ptr);
 				break;
-#endif
 			}
 		}
 		else
@@ -767,14 +719,12 @@
 					tprintf("%d", sip->si_status);
 				else
 					printsignal(sip->si_status);
-#if LINUX
 				if (!verbose)
-					tprintf(", ...");
+					tprints(", ...");
 				else
-					tprintf(", si_utime=%lu, si_stime=%lu",
-						sip->si_utime,
-						sip->si_stime);
-#endif
+					tprintf(", si_utime=%llu, si_stime=%llu",
+						(unsigned long long) sip->si_utime,
+						(unsigned long long) sip->si_stime);
 				break;
 			case SIGILL: case SIGFPE:
 			case SIGSEGV: case SIGBUS:
@@ -789,7 +739,6 @@
 					break;
 				}
 				break;
-#ifdef LINUX
 			default:
 				if (sip->si_pid || sip->si_uid)
 				        tprintf(", si_pid=%lu, si_uid=%lu",
@@ -798,281 +747,26 @@
 				if (!sip->si_ptr)
 					break;
 				if (!verbose)
-					tprintf(", ...");
+					tprints(", ...");
 				else {
 					tprintf(", si_value={int=%u, ptr=%#lx}",
 						sip->si_int,
 						(unsigned long) sip->si_ptr);
 				}
-#endif
 
 			}
 		}
 	}
-	tprintf("}");
-}
-
-#endif /* SVR4 || LINUX */
-
-#ifdef LINUX
-
-static void
-parse_sigset_t(const char *str, sigset_t *set)
-{
-	const char *p;
-	unsigned int digit;
-	int i;
-
-	sigemptyset(set);
-
-	p = strchr(str, '\n');
-	if (p == NULL)
-		p = strchr(str, '\0');
-	for (i = 0; p-- > str; i += 4) {
-		if (*p >= '0' && *p <= '9')
-			digit = *p - '0';
-		else if (*p >= 'a' && *p <= 'f')
-			digit = *p - 'a' + 10;
-		else if (*p >= 'A' && *p <= 'F')
-			digit = *p - 'A' + 10;
-		else
-			break;
-		if (digit & 1)
-			sigaddset(set, i + 1);
-		if (digit & 2)
-			sigaddset(set, i + 2);
-		if (digit & 4)
-			sigaddset(set, i + 3);
-		if (digit & 8)
-			sigaddset(set, i + 4);
-	}
-}
-
-#endif
-
-/*
- * Check process TCP for the disposition of signal SIG.
- * Return 1 if the process would somehow manage to  survive signal SIG,
- * else return 0.  This routine will never be called with SIGKILL.
- */
-int
-sigishandled(tcp, sig)
-struct tcb *tcp;
-int sig;
-{
-#ifdef LINUX
-	int sfd;
-	char sname[32];
-	char buf[2048];
-	const char *s;
-	int i;
-	sigset_t ignored, caught;
-#endif
-#ifdef SVR4
-	/*
-	 * Since procfs doesn't interfere with wait I think it is safe
-	 * to punt on this question.  If not, the information is there.
-	 */
-	return 1;
-#else /* !SVR4 */
-	switch (sig) {
-	case SIGCONT:
-	case SIGSTOP:
-	case SIGTSTP:
-	case SIGTTIN:
-	case SIGTTOU:
-	case SIGCHLD:
-	case SIGIO:
-#if defined(SIGURG) && SIGURG != SIGIO
-	case SIGURG:
-#endif
-	case SIGWINCH:
-		/* Gloria Gaynor says ... */
-		return 1;
-	default:
-		break;
-	}
-#endif /* !SVR4 */
-#ifdef LINUX
-
-	/* This is incredibly costly but it's worth it. */
-	/* NOTE: LinuxThreads internally uses SIGRTMIN, SIGRTMIN + 1 and
-	   SIGRTMIN + 2, so we can't use the obsolete /proc/%d/stat which
-	   doesn't handle real-time signals). */
-	sprintf(sname, "/proc/%d/status", tcp->pid);
-	if ((sfd = open(sname, O_RDONLY)) == -1) {
-		perror(sname);
-		return 1;
-	}
-	i = read(sfd, buf, sizeof(buf));
-	buf[i] = '\0';
-	close(sfd);
-	/*
-	 * Skip the extraneous fields. We need to skip
-	 * command name has any spaces in it.  So be it.
-	 */
-	s = strstr(buf, "SigIgn:\t");
-	if (!s)
-	{
-		fprintf(stderr, "/proc/pid/status format error\n");
-		return 1;
-	}
-	parse_sigset_t(s + 8, &ignored);
-
-	s = strstr(buf, "SigCgt:\t");
-	if (!s)
-	{
-		fprintf(stderr, "/proc/pid/status format error\n");
-		return 1;
-	}
-	parse_sigset_t(s + 8, &caught);
-
-#ifdef DEBUG
-	fprintf(stderr, "sigs: %016qx %016qx (sig=%d)\n",
-		*(long long *) &ignored, *(long long *) &caught, sig);
-#endif
-	if (sigismember(&ignored, sig) || sigismember(&caught, sig))
-		return 1;
-#endif /* LINUX */
-
-#ifdef SUNOS4
-	void (*u_signal)();
-
-	if (upeek(tcp, uoff(u_signal[0]) + sig*sizeof(u_signal),
-	    (long *) &u_signal) < 0) {
-		return 0;
-	}
-	if (u_signal != SIG_DFL)
-		return 1;
-#endif /* SUNOS4 */
-
-	return 0;
-}
-
-#if defined(SUNOS4) || defined(FREEBSD)
-
-int
-sys_sigvec(tcp)
-struct tcb *tcp;
-{
-	struct sigvec sv;
-	long addr;
-
-	if (entering(tcp)) {
-		printsignal(tcp->u_arg[0]);
-		tprintf(", ");
-		addr = tcp->u_arg[1];
-	} else {
-		addr = tcp->u_arg[2];
-	}
-	if (addr == 0)
-		tprintf("NULL");
-	else if (!verbose(tcp))
-		tprintf("%#lx", addr);
-	else if (umove(tcp, addr, &sv) < 0)
-		tprintf("{...}");
-	else {
-		switch ((int) sv.sv_handler) {
-		case (int) SIG_ERR:
-			tprintf("{SIG_ERR}");
-			break;
-		case (int) SIG_DFL:
-			tprintf("{SIG_DFL}");
-			break;
-		case (int) SIG_IGN:
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-			tprintf("{SIG_IGN}");
-			break;
-		case (int) SIG_HOLD:
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-			tprintf("SIG_HOLD");
-			break;
-		default:
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-			tprintf("{%#lx, ", (unsigned long) sv.sv_handler);
-			printsigmask(&sv.sv_mask, 0);
-			tprintf(", ");
-			printflags(sigvec_flags, sv.sv_flags, "SV_???");
-			tprintf("}");
-		}
-	}
-	if (entering(tcp))
-		tprintf(", ");
-	return 0;
+	tprints("}");
 }
 
 int
-sys_sigpause(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {	/* WTA: UD had a bug here: he forgot the braces */
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[0], &sigm);
-		printsigmask(&sigm, 0);
-	}
-	return 0;
-}
-
-int
-sys_sigstack(tcp)
-struct tcb *tcp;
-{
-	struct sigstack ss;
-	long addr;
-
-	if (entering(tcp))
-		addr = tcp->u_arg[0];
-	else
-		addr = tcp->u_arg[1];
-	if (addr == 0)
-		tprintf("NULL");
-	else if (umove(tcp, addr, &ss) < 0)
-		tprintf("%#lx", addr);
-	else {
-		tprintf("{ss_sp %#lx ", (unsigned long) ss.ss_sp);
-		tprintf("ss_onstack %s}", ss.ss_onstack ? "YES" : "NO");
-	}
-	if (entering(tcp))
-		tprintf(", ");
-	return 0;
-}
-
-int
-sys_sigcleanup(tcp)
-struct tcb *tcp;
-{
-	return 0;
-}
-
-#endif /* SUNOS4 || FREEBSD */
-
-#ifndef SVR4
-
-int
-sys_sigsetmask(tcp)
-struct tcb *tcp;
+sys_sigsetmask(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		sigset_t sigm;
 		long_to_sigset(tcp->u_arg[0], &sigm);
 		printsigmask(&sigm, 0);
-#ifndef USE_PROCFS
-		if ((tcp->u_arg[0] & sigmask(SIGTRAP))) {
-			/* Mark attempt to block SIGTRAP */
-			tcp->flags |= TCB_SIGTRAPPED;
-			/* Send unblockable signal */
-			kill(tcp->pid, SIGSTOP);
-		}
-#endif /* !USE_PROCFS */
 	}
 	else if (!syserror(tcp)) {
 		sigset_t sigm;
@@ -1084,25 +778,8 @@
 	return 0;
 }
 
-#if defined(SUNOS4) || defined(FREEBSD)
-int
-sys_sigblock(tcp)
-struct tcb *tcp;
-{
-	return sys_sigsetmask(tcp);
-}
-#endif /* SUNOS4 || FREEBSD */
-
-#endif /* !SVR4 */
-
 #ifdef HAVE_SIGACTION
 
-/* For MIPS, struct sigaction is common between kernel and userland */
-#if defined(LINUX) && !defined(MIPS)
-#define USE_OLD_SIGACTION
-#endif
-
-#ifdef USE_OLD_SIGACTION
 struct old_sigaction {
 	__sighandler_t __sa_handler;
 	unsigned long sa_mask;
@@ -1110,37 +787,30 @@
 	void (*sa_restorer)(void);
 };
 #define SA_HANDLER __sa_handler
-#endif /* USE_OLD_SIGACTION */
 
 #ifndef SA_HANDLER
 #define SA_HANDLER sa_handler
 #endif
 
 int
-sys_sigaction(tcp)
-struct tcb *tcp;
+sys_sigaction(struct tcb *tcp)
 {
 	long addr;
-#ifdef USE_OLD_SIGACTION
 	sigset_t sigset;
 	struct old_sigaction sa;
-#else
-	struct sigaction sa;
-#endif
-
 
 	if (entering(tcp)) {
 		printsignal(tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		addr = tcp->u_arg[1];
 	} else
 		addr = tcp->u_arg[2];
 	if (addr == 0)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (!verbose(tcp))
 		tprintf("%#lx", addr);
 	else if (umove(tcp, addr, &sa) < 0)
-		tprintf("{...}");
+		tprints("{...}");
 	else {
 		/* Architectures using function pointers, like
 		 * hppa, may need to manipulate the function pointer
@@ -1151,89 +821,60 @@
 		 * compiler from generating code to manipulate
 		 * SA_HANDLER we cast the function pointers to long. */
 		if ((long)sa.SA_HANDLER == (long)SIG_ERR)
-			tprintf("{SIG_ERR, ");
+			tprints("{SIG_ERR, ");
 		else if ((long)sa.SA_HANDLER == (long)SIG_DFL)
-			tprintf("{SIG_DFL, ");
-		else if ((long)sa.SA_HANDLER == (long)SIG_IGN) {
-#ifndef USE_PROCFS
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-#endif /* !USE_PROCFS */
-			tprintf("{SIG_IGN, ");
-		}
-		else {
-#ifndef USE_PROCFS
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-#endif /* !USE_PROCFS */
-			tprintf("{%p, ", sa.SA_HANDLER);
-		}
-#ifndef USE_OLD_SIGACTION
-		printsigmask (&sa.sa_mask, 0);
-#else
+			tprints("{SIG_DFL, ");
+		else if ((long)sa.SA_HANDLER == (long)SIG_IGN)
+			tprints("{SIG_IGN, ");
+		else
+			tprintf("{%#lx, ", (long) sa.SA_HANDLER);
 		long_to_sigset(sa.sa_mask, &sigset);
 		printsigmask(&sigset, 0);
-#endif
-		tprintf(", ");
+		tprints(", ");
 		printflags(sigact_flags, sa.sa_flags, "SA_???");
-#if defined(SA_RESTORER) && !defined(MIPS)
+#ifdef SA_RESTORER
 		if (sa.sa_flags & SA_RESTORER)
 			tprintf(", %p", sa.sa_restorer);
 #endif
-		tprintf("}");
+		tprints("}");
 	}
 	if (entering(tcp))
-		tprintf(", ");
+		tprints(", ");
+	else
+		tprintf(", %#lx", (unsigned long) sa.sa_restorer);
 	return 0;
 }
 
 int
-sys_signal(tcp)
-struct tcb *tcp;
+sys_signal(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printsignal(tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		switch (tcp->u_arg[1]) {
 		case (long) SIG_ERR:
-			tprintf("SIG_ERR");
+			tprints("SIG_ERR");
 			break;
 		case (long) SIG_DFL:
-			tprintf("SIG_DFL");
+			tprints("SIG_DFL");
 			break;
 		case (long) SIG_IGN:
-#ifndef USE_PROCFS
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-#endif /* !USE_PROCFS */
-			tprintf("SIG_IGN");
+			tprints("SIG_IGN");
 			break;
 		default:
-#ifndef USE_PROCFS
-			if (tcp->u_arg[0] == SIGTRAP) {
-				tcp->flags |= TCB_SIGTRAPPED;
-				kill(tcp->pid, SIGSTOP);
-			}
-#endif /* !USE_PROCFS */
 			tprintf("%#lx", tcp->u_arg[1]);
 		}
 		return 0;
 	}
 	else if (!syserror(tcp)) {
 		switch (tcp->u_rval) {
-		    case (long) SIG_ERR:
+		case (long) SIG_ERR:
 			tcp->auxstr = "SIG_ERR"; break;
-		    case (long) SIG_DFL:
+		case (long) SIG_DFL:
 			tcp->auxstr = "SIG_DFL"; break;
-		    case (long) SIG_IGN:
+		case (long) SIG_IGN:
 			tcp->auxstr = "SIG_IGN"; break;
-		    default:
+		default:
 			tcp->auxstr = NULL;
 		}
 		return RVAL_HEX | RVAL_STR;
@@ -1241,126 +882,72 @@
 	return 0;
 }
 
-#ifdef SVR4
-int
-sys_sighold(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printsignal(tcp->u_arg[0]);
-	}
-	return 0;
-}
-#endif /* SVR4 */
-
 #endif /* HAVE_SIGACTION */
 
-#ifdef LINUX
-
 int
 sys_sigreturn(struct tcb *tcp)
 {
 #if defined(ARM)
-	struct pt_regs regs;
-	struct sigcontext_struct sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
-
+		struct pt_regs regs;
+		struct sigcontext_struct sc;
+		sigset_t sigm;
 		if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
 			return 0;
-
 		if (umove(tcp, regs.ARM_sp, &sc) < 0)
 			return 0;
-
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.oldmask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.oldmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(S390) || defined(S390X)
-	long usp;
-	struct sigcontext_struct sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
-		if (upeek(tcp,PT_GPR15,&usp)<0)
+		long usp;
+		struct sigcontext_struct sc;
+		if (upeek(tcp, PT_GPR15, &usp) < 0)
 			return 0;
-		if (umove(tcp, usp+__SIGNAL_FRAMESIZE, &sc) < 0)
+		if (umove(tcp, usp + __SIGNAL_FRAMESIZE, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		memcpy(&tcp->u_arg[1],&sc.oldmask[0],sizeof(sigset_t));
-	} else {
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ",(sigset_t *)&tcp->u_arg[1],0);
-		return RVAL_NONE | RVAL_STR;
+		tprints(sprintsigmask(") (mask ", (sigset_t *)&sc.oldmask[0], 0));
 	}
 	return 0;
 #elif defined(I386)
-	long esp;
-	struct sigcontext_struct sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
-		if (upeek(tcp, 4*UESP, &esp) < 0)
-			return 0;
-		if (umove(tcp, esp, &sc) < 0)
-			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.oldmask;
-	}
-	else {
+		struct sigcontext_struct sc;
+		/* Note: on i386, sc is followed on stack by struct fpstate
+		 * and after it an additional u32 extramask[1] which holds
+		 * upper half of the mask. We can fetch it there
+		 * if/when we'd want to display the full mask...
+		 */
 		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
+		if (umove(tcp, i386_regs.esp, &sc) < 0)
 			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.oldmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(IA64)
-	struct sigcontext sc;
-	long sp;
-
 	if (entering(tcp)) {
+		struct sigcontext sc;
+		long sp;
+		sigset_t sigm;
 		/* offset of sigcontext in the kernel's sigframe structure: */
 #		define SIGFRAME_SC_OFFSET	0x90
-		tcp->u_arg[0] = 0;
 		if (upeek(tcp, PT_R12, &sp) < 0)
 			return 0;
 		if (umove(tcp, sp + 16 + SIGFRAME_SC_OFFSET, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		memcpy(tcp->u_arg + 1, &sc.sc_mask, sizeof(sc.sc_mask));
-	}
-	else {
-		sigset_t sigm;
-
-		memcpy(&sigm, tcp->u_arg + 1, sizeof (sigm));
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		sigemptyset(&sigm);
+		memcpy(&sigm, &sc.sc_mask, NSIG / 8);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(POWERPC)
-	long esp;
-	struct sigcontext_struct sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
-		if (upeek(tcp, sizeof(unsigned long)*PT_R1, &esp) < 0)
+		long esp;
+		struct sigcontext_struct sc;
+		sigset_t sigm;
+		if (upeek(tcp, sizeof(unsigned long) * PT_R1, &esp) < 0)
 			return 0;
 		/* Skip dummy stack frame. */
 #ifdef POWERPC64
@@ -1373,223 +960,134 @@
 #endif
 		if (umove(tcp, esp, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.oldmask;
-	}
-	else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.oldmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(M68K)
-	long usp;
-	struct sigcontext sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
+		long usp;
+		struct sigcontext sc;
+		sigset_t sigm;
 		if (upeek(tcp, 4*PT_USP, &usp) < 0)
 			return 0;
 		if (umove(tcp, usp, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.sc_mask;
-	}
-	else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.sc_mask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(ALPHA)
-	long fp;
-	struct sigcontext_struct sc;
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
+		long fp;
+		struct sigcontext_struct sc;
+		sigset_t sigm;
 		if (upeek(tcp, REG_FP, &fp) < 0)
 			return 0;
 		if (umove(tcp, fp, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.sc_mask;
-	}
-	else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.sc_mask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
-#elif defined (SPARC) || defined (SPARC64)
-	long i1;
-	struct pt_regs regs;
-	m_siginfo_t si;
-
-	if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
-		perror("sigreturn: PTRACE_GETREGS ");
-		return 0;
-	}
-	if(entering(tcp)) {
-		tcp->u_arg[0] = 0;
-		i1 = regs.u_regs[U_REG_O1];
-		if(umove(tcp, i1, &si) < 0) {
-			perror("sigreturn: umove ");
+#elif defined(SPARC) || defined(SPARC64)
+	if (entering(tcp)) {
+		long i1;
+		struct pt_regs regs;
+		m_siginfo_t si;
+		sigset_t sigm;
+		if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
+			perror("sigreturn: PTRACE_GETREGS");
 			return 0;
 		}
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = si.si_mask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if(tcp->u_arg[0] == 0)
+		i1 = regs.u_regs[U_REG_O1];
+		if (umove(tcp, i1, &si) < 0) {
+			perror("sigreturn: umove");
 			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		}
+		long_to_sigset(si.si_mask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
-#elif defined (LINUX_MIPSN32) || defined (LINUX_MIPSN64)
+#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64)
 	/* This decodes rt_sigreturn.  The 64-bit ABIs do not have
 	   sigreturn.  */
-	long sp;
-	struct ucontext uc;
-
-	if(entering(tcp)) {
-		tcp->u_arg[0] = 0;
+	if (entering(tcp)) {
+		long sp;
+		struct ucontext uc;
+		sigset_t sigm;
 		if (upeek(tcp, REG_SP, &sp) < 0)
 			return 0;
 		/* There are six words followed by a 128-byte siginfo.  */
 		sp = sp + 6 * 4 + 128;
 		if (umove(tcp, sp, &uc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = *(long *) &uc.uc_sigmask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if(tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(*(long *) &uc.uc_sigmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(MIPS)
-	long sp;
-	struct pt_regs regs;
-	m_siginfo_t si;
-
-	if(ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
-		perror("sigreturn: PTRACE_GETREGS ");
-		return 0;
-	}
-	if(entering(tcp)) {
-		tcp->u_arg[0] = 0;
+	if (entering(tcp)) {
+		long sp;
+		struct pt_regs regs;
+		m_siginfo_t si;
+		sigset_t sigm;
+		if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
+			perror("sigreturn: PTRACE_GETREGS");
+			return 0;
+		}
 		sp = regs.regs[29];
 		if (umove(tcp, sp, &si) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = si.si_mask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if(tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(si.si_mask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(CRISV10) || defined(CRISV32)
-	struct sigcontext sc;
-
 	if (entering(tcp)) {
+		struct sigcontext sc;
 		long regs[PT_MAX+1];
-
-		tcp->u_arg[0] = 0;
-
+		sigset_t sigm;
 		if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long)regs) < 0) {
 			perror("sigreturn: PTRACE_GETREGS");
 			return 0;
 		}
 		if (umove(tcp, regs[PT_USP], &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.oldmask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.oldmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(TILE)
-	struct ucontext uc;
-	long sp;
-
-	/* offset of ucontext in the kernel's sigframe structure */
-#	define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(struct siginfo)
-
 	if (entering(tcp)) {
-		tcp->u_arg[0] = 0;
+		struct ucontext uc;
+		long sp;
+		sigset_t sigm;
+
+		/* offset of ucontext in the kernel's sigframe structure */
+#		define SIGFRAME_UC_OFFSET C_ABI_SAVE_AREA_SIZE + sizeof(struct siginfo)
 		if (upeek(tcp, PTREGS_OFFSET_SP, &sp) < 0)
 			return 0;
 		if (umove(tcp, sp + SIGFRAME_UC_OFFSET, &uc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		memcpy(tcp->u_arg + 1, &uc.uc_sigmask, sizeof(uc.uc_sigmask));
-	}
-	else {
-		sigset_t sigm;
-
-		memcpy(&sigm, tcp->u_arg + 1, sizeof (sigm));
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		sigemptyset(&sigm);
+		memcpy(&sigm, &uc.uc_sigmask, NSIG / 8);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #elif defined(MICROBLAZE)
-	struct sigcontext sc;
-
 	/* TODO: Verify that this is correct...  */
 	if (entering(tcp)) {
+		struct sigcontext sc;
 		long sp;
-
-		tcp->u_arg[0] = 0;
-
+		sigset_t sigm;
 		/* Read r1, the stack pointer.  */
 		if (upeek(tcp, 1 * 4, &sp) < 0)
 			return 0;
 		if (umove(tcp, sp, &sc) < 0)
 			return 0;
-		tcp->u_arg[0] = 1;
-		tcp->u_arg[1] = sc.oldmask;
-	} else {
-		sigset_t sigm;
-		long_to_sigset(tcp->u_arg[1], &sigm);
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		tcp->auxstr = sprintsigmask("mask now ", &sigm, 0);
-		return RVAL_NONE | RVAL_STR;
+		long_to_sigset(sc.oldmask, &sigm);
+		tprints(sprintsigmask(") (mask ", &sigm, 0));
 	}
 	return 0;
 #else
@@ -1600,8 +1098,7 @@
 }
 
 int
-sys_siggetmask(tcp)
-struct tcb *tcp;
+sys_siggetmask(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		sigset_t sigm;
@@ -1622,42 +1119,7 @@
 	return 0;
 }
 
-#endif /* LINUX */
-
-#if defined(SVR4) || defined(FREEBSD)
-
-int
-sys_sigsuspend(tcp)
-struct tcb *tcp;
-{
-	sigset_t sigset;
-
-	if (entering(tcp)) {
-		if (umove(tcp, tcp->u_arg[0], &sigset) < 0)
-			tprintf("[?]");
-		else
-			printsigmask(&sigset, 0);
-	}
-	return 0;
-}
-#ifndef FREEBSD
-static const struct xlat ucontext_flags[] = {
-	{ UC_SIGMASK,	"UC_SIGMASK"	},
-	{ UC_STACK,	"UC_STACK"	},
-	{ UC_CPU,	"UC_CPU"	},
-#ifdef UC_FPU
-	{ UC_FPU,	"UC_FPU"	},
-#endif
-#ifdef UC_INTR
-	{ UC_INTR,	"UC_INTR"	},
-#endif
-	{ 0,		NULL		},
-};
-#endif /* !FREEBSD */
-#endif /* SVR4 || FREEBSD */
-
-#if defined SVR4 || defined LINUX || defined FREEBSD
-#if defined LINUX && !defined SS_ONSTACK
+#if !defined SS_ONSTACK
 #define SS_ONSTACK      1
 #define SS_DISABLE      2
 #if __GLIBC_MINOR__ == 0
@@ -1669,91 +1131,15 @@
 } stack_t;
 #endif
 #endif
-#ifdef FREEBSD
-#define stack_t struct sigaltstack
-#endif
 
 static const struct xlat sigaltstack_flags[] = {
 	{ SS_ONSTACK,	"SS_ONSTACK"	},
 	{ SS_DISABLE,	"SS_DISABLE"	},
 	{ 0,		NULL		},
 };
-#endif
-
-#ifdef SVR4
-static void
-printcontext(tcp, ucp)
-struct tcb *tcp;
-ucontext_t *ucp;
-{
-	tprintf("{");
-	if (!abbrev(tcp)) {
-		tprintf("uc_flags=");
-		printflags(ucontext_flags, ucp->uc_flags, "UC_???");
-		tprintf(", uc_link=%#lx, ", (unsigned long) ucp->uc_link);
-	}
-	tprintf("uc_sigmask=");
-	printsigmask(&ucp->uc_sigmask, 0);
-	if (!abbrev(tcp)) {
-		tprintf(", uc_stack={ss_sp=%#lx, ss_size=%d, ss_flags=",
-			(unsigned long) ucp->uc_stack.ss_sp,
-			ucp->uc_stack.ss_size);
-		printflags(sigaltstack_flags, ucp->uc_stack.ss_flags, "SS_???");
-		tprintf("}");
-	}
-	tprintf(", ...}");
-}
-
-int
-sys_getcontext(tcp)
-struct tcb *tcp;
-{
-	ucontext_t uc;
-
-	if (exiting(tcp)) {
-		if (tcp->u_error)
-			tprintf("%#lx", tcp->u_arg[0]);
-		else if (!tcp->u_arg[0])
-			tprintf("NULL");
-		else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
-			tprintf("{...}");
-		else
-			printcontext(tcp, &uc);
-	}
-	return 0;
-}
-
-int
-sys_setcontext(tcp)
-struct tcb *tcp;
-{
-	ucontext_t uc;
-
-	if (entering(tcp)) {
-		if (!tcp->u_arg[0])
-			tprintf("NULL");
-		else if (umove(tcp, tcp->u_arg[0], &uc) < 0)
-			tprintf("{...}");
-		else
-			printcontext(tcp, &uc);
-	}
-	else {
-		tcp->u_rval = tcp->u_error = 0;
-		if (tcp->u_arg[0] == 0)
-			return 0;
-		return RVAL_NONE;
-	}
-	return 0;
-}
-
-#endif /* SVR4 */
-
-#if defined(LINUX) || defined(FREEBSD)
 
 static int
-print_stack_t(tcp, addr)
-struct tcb *tcp;
-unsigned long addr;
+print_stack_t(struct tcb *tcp, unsigned long addr)
 {
 	stack_t ss;
 	if (umove(tcp, addr, &ss) < 0)
@@ -1765,57 +1151,63 @@
 }
 
 int
-sys_sigaltstack(tcp)
-	struct tcb *tcp;
+sys_sigaltstack(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		if (tcp->u_arg[0] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (print_stack_t(tcp, tcp->u_arg[0]) < 0)
 			return -1;
 	}
 	else {
-		tprintf(", ");
+		tprints(", ");
 		if (tcp->u_arg[1] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (print_stack_t(tcp, tcp->u_arg[1]) < 0)
 			return -1;
 	}
 	return 0;
 }
-#endif
 
 #ifdef HAVE_SIGACTION
 
 int
-sys_sigprocmask(tcp)
-struct tcb *tcp;
+sys_sigprocmask(struct tcb *tcp)
 {
 #ifdef ALPHA
+	sigset_t ss;
 	if (entering(tcp)) {
+		/*
+		 * Alpha/OSF is different: it doesn't pass in two pointers,
+		 * but rather passes in the new bitmask as an argument and
+		 * then returns the old bitmask.  This "works" because we
+		 * only have 64 signals to worry about.  If you want more,
+		 * use of the rt_sigprocmask syscall is required.
+		 * Alpha:
+		 *	old = osf_sigprocmask(how, new);
+		 * Everyone else:
+		 *	ret = sigprocmask(how, &new, &old, ...);
+		 */
+		memcpy(&ss, &tcp->u_arg[1], sizeof(long));
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
-		tprintf(", ");
-		printsigmask(tcp->u_arg[1], 0);
+		tprints(", ");
+		printsigmask(&ss, 0);
 	}
 	else if (!syserror(tcp)) {
-		tcp->auxstr = sprintsigmask("old mask ", tcp->u_rval, 0);
+		memcpy(&ss, &tcp->u_rval, sizeof(long));
+		tcp->auxstr = sprintsigmask("old mask ", &ss, 0);
 		return RVAL_HEX | RVAL_STR;
 	}
 #else /* !ALPHA */
 	if (entering(tcp)) {
-#ifdef SVR4
-		if (tcp->u_arg[0] == 0)
-			tprintf("0");
-		else
-#endif /* SVR4 */
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
-		tprintf(", ");
+		tprints(", ");
 		print_sigset(tcp, tcp->u_arg[1], 0);
-		tprintf(", ");
+		tprints(", ");
 	}
 	else {
 		if (!tcp->u_arg[2])
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[2]);
 		else
@@ -1828,34 +1220,22 @@
 #endif /* HAVE_SIGACTION */
 
 int
-sys_kill(tcp)
-struct tcb *tcp;
+sys_kill(struct tcb *tcp)
 {
 	if (entering(tcp)) {
-		/*
-		 * Sign-extend a 32-bit value when that's what it is.
-		 */
 		long pid = tcp->u_arg[0];
-		if (personality_wordsize[current_personality] < sizeof pid)
+#if SUPPORTED_PERSONALITIES > 1
+		/* Sign-extend a 32-bit value when that's what it is. */
+		if (current_wordsize < sizeof pid)
 			pid = (long) (int) pid;
+#endif
 		tprintf("%ld, %s", pid, signame(tcp->u_arg[1]));
 	}
 	return 0;
 }
 
-#if defined(FREEBSD) || defined(SUNOS4)
 int
-sys_killpg(tcp)
-struct tcb *tcp;
-{
-	return sys_kill(tcp);
-}
-#endif /* FREEBSD || SUNOS4 */
-
-#ifdef LINUX
-int
-sys_tgkill(tcp)
-	struct tcb *tcp;
+sys_tgkill(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%ld, %ld, %s",
@@ -1863,11 +1243,9 @@
 	}
 	return 0;
 }
-#endif
 
 int
-sys_sigpending(tcp)
-struct tcb *tcp;
+sys_sigpending(struct tcb *tcp)
 {
 	sigset_t sigset;
 
@@ -1875,64 +1253,38 @@
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[0]);
 		else if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
 			printsigmask(&sigset, 0);
 	}
 	return 0;
 }
 
-#ifdef SVR4
-int sys_sigwait(tcp)
-struct tcb *tcp;
-{
-	sigset_t sigset;
-
-	if (entering(tcp)) {
-		if (copy_sigset(tcp, tcp->u_arg[0], &sigset) < 0)
-			tprintf("[?]");
-		else
-			printsigmask(&sigset, 0);
-	}
-	else {
-		if (!syserror(tcp)) {
-			tcp->auxstr = signalent[tcp->u_rval];
-			return RVAL_DECIMAL | RVAL_STR;
-		}
-	}
-	return 0;
-}
-#endif /* SVR4 */
-
-#ifdef LINUX
-
-	int
-sys_rt_sigprocmask(tcp)
-	struct tcb *tcp;
+int
+sys_rt_sigprocmask(struct tcb *tcp)
 {
 	sigset_t sigset;
 
 	/* Note: arg[3] is the length of the sigset. */
 	if (entering(tcp)) {
 		printxval(sigprocmaskcmds, tcp->u_arg[0], "SIG_???");
-		tprintf(", ");
+		tprints(", ");
 		if (!tcp->u_arg[1])
-			tprintf("NULL, ");
+			tprints("NULL, ");
 		else if (copy_sigset_len(tcp, tcp->u_arg[1], &sigset, tcp->u_arg[3]) < 0)
 			tprintf("%#lx, ", tcp->u_arg[1]);
 		else {
 			printsigmask(&sigset, 1);
-			tprintf(", ");
+			tprints(", ");
 		}
 	}
 	else {
 		if (!tcp->u_arg[2])
-
-			tprintf("NULL");
+			tprints("NULL");
 		else if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[2]);
 		else if (copy_sigset_len(tcp, tcp->u_arg[2], &sigset, tcp->u_arg[3]) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
 			printsigmask(&sigset, 1);
 		tprintf(", %lu", tcp->u_arg[3]);
@@ -1940,15 +1292,10 @@
 	return 0;
 }
 
-
 /* Structure describing the action to be taken when a signal arrives.  */
-#ifdef MIPS
-#define new_sigaction sigaction
-#define new_sigaction2 sigaction
-#else
 struct new_sigaction
 {
-	__sighandler_t SA_HANDLER;
+	__sighandler_t __sa_handler;
 	unsigned long sa_flags;
 	void (*sa_restorer) (void);
 	/* Kernel treats sa_mask as an array of longs. */
@@ -1957,12 +1304,11 @@
 /* Same for i386-on-x86_64 and similar cases */
 struct new_sigaction32
 {
-	uint32_t SA_HANDLER;
+	uint32_t __sa_handler;
 	uint32_t sa_flags;
 	uint32_t sa_restorer;
 	uint32_t sa_mask[2 * (NSIG / sizeof(long) ? NSIG / sizeof(long) : 1)];
 };
-#endif
 
 int
 sys_rt_sigaction(struct tcb *tcp)
@@ -1974,13 +1320,13 @@
 
 	if (entering(tcp)) {
 		printsignal(tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		addr = tcp->u_arg[1];
 	} else
 		addr = tcp->u_arg[2];
 
 	if (addr == 0) {
-		tprintf("NULL");
+		tprints("NULL");
 		goto after_sa;
 	}
 	if (!verbose(tcp)) {
@@ -1988,18 +1334,15 @@
 		goto after_sa;
 	}
 #if SUPPORTED_PERSONALITIES > 1
-	if (personality_wordsize[current_personality] != sizeof(sa.sa_flags)
-	 && personality_wordsize[current_personality] == 4
-	) {
+#if SIZEOF_LONG > 4
+	if (current_wordsize != sizeof(sa.sa_flags) && current_wordsize == 4) {
 		struct new_sigaction32 sa32;
 		r = umove(tcp, addr, &sa32);
 		if (r >= 0) {
 			memset(&sa, 0, sizeof(sa));
-			sa.SA_HANDLER   = (void*)(unsigned long)sa32.SA_HANDLER;
+			sa.__sa_handler = (void*)(unsigned long)sa32.__sa_handler;
 			sa.sa_flags     = sa32.sa_flags;
-#ifndef MIPS
 			sa.sa_restorer  = (void*)(unsigned long)sa32.sa_restorer;
-#endif
 			/* Kernel treats sa_mask as an array of longs.
 			 * For 32-bit process, "long" is uint32_t, thus, for example,
 			 * 32th bit in sa_mask will end up as bit 0 in sa_mask[1].
@@ -2012,11 +1355,12 @@
 		}
 	} else
 #endif
+#endif
 	{
 		r = umove(tcp, addr, &sa);
 	}
 	if (r < 0) {
-		tprintf("{...}");
+		tprints("{...}");
 		goto after_sa;
 	}
 	/* Architectures using function pointers, like
@@ -2027,14 +1371,14 @@
 	 * be manipulated by strace. In order to prevent the
 	 * compiler from generating code to manipulate
 	 * SA_HANDLER we cast the function pointers to long. */
-	if ((long)sa.SA_HANDLER == (long)SIG_ERR)
-		tprintf("{SIG_ERR, ");
-	else if ((long)sa.SA_HANDLER == (long)SIG_DFL)
-		tprintf("{SIG_DFL, ");
-	else if ((long)sa.SA_HANDLER == (long)SIG_IGN)
-		tprintf("{SIG_IGN, ");
+	if ((long)sa.__sa_handler == (long)SIG_ERR)
+		tprints("{SIG_ERR, ");
+	else if ((long)sa.__sa_handler == (long)SIG_DFL)
+		tprints("{SIG_DFL, ");
+	else if ((long)sa.__sa_handler == (long)SIG_IGN)
+		tprints("{SIG_IGN, ");
 	else
-		tprintf("{%#lx, ", (long) sa.SA_HANDLER);
+		tprintf("{%#lx, ", (long) sa.__sa_handler);
 	/* Questionable code below.
 	 * Kernel won't handle sys_rt_sigaction
 	 * with wrong sigset size (just returns EINVAL)
@@ -2051,17 +1395,17 @@
 	else
 		memcpy(&sigset, &sa.sa_mask, sizeof(sigset));
 	printsigmask(&sigset, 1);
-	tprintf(", ");
+	tprints(", ");
 	printflags(sigact_flags, sa.sa_flags, "SA_???");
-#if defined(SA_RESTORER) && !defined(MIPS)
+#ifdef SA_RESTORER
 	if (sa.sa_flags & SA_RESTORER)
 		tprintf(", %p", sa.sa_restorer);
 #endif
-	tprintf("}");
+	tprints("}");
 
  after_sa:
 	if (entering(tcp))
-		tprintf(", ");
+		tprints(", ");
 	else
 #ifdef LINUXSPARC
 		tprintf(", %#lx, %lu", tcp->u_arg[3], tcp->u_arg[4]);
@@ -2083,7 +1427,7 @@
 			tprintf("%#lx", tcp->u_arg[0]);
 		else if (copy_sigset_len(tcp, tcp->u_arg[0],
 					 &sigset, tcp->u_arg[1]) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
 			printsigmask(&sigset, 1);
 	}
@@ -2096,25 +1440,42 @@
 	if (entering(tcp)) {
 		sigset_t sigm;
 		if (copy_sigset_len(tcp, tcp->u_arg[0], &sigm, tcp->u_arg[1]) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
 			printsigmask(&sigm, 1);
 	}
 	return 0;
 }
 
+static void
+print_sigqueueinfo(struct tcb *tcp, int sig, unsigned long uinfo)
+{
+	siginfo_t si;
+
+	printsignal(sig);
+	tprints(", ");
+	if (umove(tcp, uinfo, &si) < 0)
+		tprintf("%#lx", uinfo);
+	else
+		printsiginfo(&si, verbose(tcp));
+}
+
 int
 sys_rt_sigqueueinfo(struct tcb *tcp)
 {
 	if (entering(tcp)) {
-		siginfo_t si;
 		tprintf("%lu, ", tcp->u_arg[0]);
-		printsignal(tcp->u_arg[1]);
-		tprintf(", ");
-		if (umove(tcp, tcp->u_arg[2], &si) < 0)
-			tprintf("%#lx", tcp->u_arg[2]);
-		else
-			printsiginfo(&si, verbose(tcp));
+		print_sigqueueinfo(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+	}
+	return 0;
+}
+
+int
+sys_rt_tgsigqueueinfo(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		tprintf("%lu, %lu, ", tcp->u_arg[0], tcp->u_arg[1]);
+		print_sigqueueinfo(tcp, tcp->u_arg[2], tcp->u_arg[3]);
 	}
 	return 0;
 }
@@ -2126,15 +1487,15 @@
 
 		if (copy_sigset_len(tcp, tcp->u_arg[0],
 				    &sigset, tcp->u_arg[3]) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else
 			printsigmask(&sigset, 1);
-		tprintf(", ");
+		tprints(", ");
 		/* This is the only "return" parameter, */
 		if (tcp->u_arg[1] != 0)
 			return 0;
 		/* ... if it's NULL, can decode all on entry */
-		tprintf("NULL, ");
+		tprints("NULL, ");
 	}
 	else if (tcp->u_arg[1] != 0) {
 		/* syscall exit, and u_arg[1] wasn't NULL */
@@ -2146,7 +1507,7 @@
 				tprintf("%#lx, ", tcp->u_arg[1]);
 			else {
 				printsiginfo(&si, verbose(tcp));
-				tprintf(", ");
+				tprints(", ");
 			}
 		}
 	}
@@ -2163,7 +1524,7 @@
 sys_restart_syscall(struct tcb *tcp)
 {
 	if (entering(tcp))
-		tprintf("<... resuming interrupted call ...>");
+		tprints("<... resuming interrupted call ...>");
 	return 0;
 }
 
@@ -2172,11 +1533,11 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		print_sigset(tcp, tcp->u_arg[1], 1);
 		tprintf(", %lu", tcp->u_arg[2]);
 		if (flags_arg >= 0) {
-			tprintf(", ");
+			tprints(", ");
 			printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
 		}
 	}
@@ -2194,4 +1555,3 @@
 {
 	return do_signalfd(tcp, 3);
 }
-#endif /* LINUX */
diff --git a/sock.c b/sock.c
index e7c72b5..9c6fe96 100644
--- a/sock.c
+++ b/sock.c
@@ -23,27 +23,18 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#ifdef LINUX
 #include <sys/socket.h>
 #include <linux/sockios.h>
-#else
-#include <sys/socket.h>
-#include <sys/sockio.h>
-#endif
 #include <arpa/inet.h>
-
-#if defined (ALPHA) || defined(SH) || defined(SH64)
-#ifdef HAVE_SYS_IOCTL_H
-#include <sys/ioctl.h>
-#elif defined(HAVE_IOCTLS_H)
-#include <ioctls.h>
-#endif
+#if defined(ALPHA) || defined(SH) || defined(SH64)
+# if defined(HAVE_SYS_IOCTL_H)
+#  include <sys/ioctl.h>
+# elif defined(HAVE_IOCTLS_H)
+#  include <ioctls.h>
+# endif
 #endif
 #include <net/if.h>
 
@@ -66,12 +57,8 @@
 	{ 0,			NULL			}
 };
 
-
 static void
-print_addr(tcp, addr, ifr)
-struct tcb *tcp;
-long addr;
-struct ifreq *ifr;
+print_addr(struct tcb *tcp, long addr, struct ifreq *ifr)
 {
 	if (ifr->ifr_addr.sa_family == AF_INET) {
 		struct sockaddr_in *sinp;
@@ -95,7 +82,7 @@
 			    && ifc.ifc_buf == NULL)
 				tprintf(", {%d -> ", ifc.ifc_len);
 			else
-				tprintf(", {");
+				tprints(", {");
 		}
 		return 0;
 	}
@@ -130,7 +117,6 @@
 #endif
 		printnum(tcp, arg, ", %#d");
 		return 1;
-#ifdef LINUX
 	case SIOCGIFNAME:
 	case SIOCSIFNAME:
 	case SIOCGIFINDEX:
@@ -191,12 +177,12 @@
 				printxval(addrfams,
 					  ifr.ifr_addr.sa_family,
 					  "AF_???");
-				tprintf(", ");
+				tprints(", ");
 				print_addr(tcp, ((long) tcp->u_arg[2]
-						 + offsetof (struct ifreq,
+						 + offsetof(struct ifreq,
 							     ifr_addr.sa_data)),
 					   &ifr);
-				tprintf("}");
+				tprints("}");
 				break;
 			case SIOCGIFHWADDR:
 			case SIOCSIFHWADDR:
@@ -209,7 +195,7 @@
 				break;
 			case SIOCGIFFLAGS:
 			case SIOCSIFFLAGS:
-				tprintf("ifr_flags=");
+				tprints("ifr_flags=");
 				printflags(iffflags, ifr.ifr_flags, "IFF_???");
 				break;
 			case SIOCGIFMETRIC:
@@ -241,19 +227,19 @@
 					(unsigned) ifr.ifr_map.port);
 				break;
 			}
-			tprintf("}");
+			tprints("}");
 		}
 		return 1;
 	case SIOCGIFCONF:
 		if (umove(tcp, tcp->u_arg[2], &ifc) < 0) {
-			tprintf("???}");
+			tprints("???}");
 			return 1;
 		}
 		tprintf("%d, ", ifc.ifc_len);
 		if (syserror(tcp)) {
 			tprintf("%lx", (unsigned long) ifc.ifc_buf);
 		} else if (ifc.ifc_buf == NULL) {
-			tprintf("NULL");
+			tprints("NULL");
 		} else {
 			int i;
 			unsigned nifra = ifc.ifc_len / sizeof(struct ifreq);
@@ -264,33 +250,38 @@
 				tprintf("%lx}", (unsigned long) ifc.ifc_buf);
 				return 1;
 			}
-			tprintf("{");
+			tprints("{");
 			for (i = 0; i < nifra; ++i ) {
 				if (i > 0)
-					tprintf(", ");
+					tprints(", ");
 				tprintf("{\"%s\", {",
 					ifra[i].ifr_name);
 				if (verbose(tcp)) {
 					printxval(addrfams,
 						  ifra[i].ifr_addr.sa_family,
 						  "AF_???");
-					tprintf(", ");
+					tprints(", ");
 					print_addr(tcp, ((long) tcp->u_arg[2]
-							 + offsetof (struct ifreq,
+							 + offsetof(struct ifreq,
 								     ifr_addr.sa_data)
 							 + ((char *) &ifra[i]
 							    - (char *) &ifra[0])),
 						   &ifra[i]);
 				} else
-					tprintf("...");
-				tprintf("}}");
+					tprints("...");
+				tprints("}}");
 			}
-			tprintf("}");
+			tprints("}");
 		}
-		tprintf("}");
+		tprints("}");
 		return 1;
-#endif
 	default:
 		return 0;
 	}
 }
+
+int
+sys_socketcall(struct tcb *tcp)
+{
+	return printargs(tcp);
+}
diff --git a/strace-graph b/strace-graph
index 6a04ac2..d57e768 100755
--- a/strace-graph
+++ b/strace-graph
@@ -32,8 +32,6 @@
 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-#
-#	$Id$
 
 my %unfinished;
 
diff --git a/strace-log-merge b/strace-log-merge
new file mode 100755
index 0000000..8ab2409
--- /dev/null
+++ b/strace-log-merge
@@ -0,0 +1,43 @@
+#!/bin/sh
+
+show_usage()
+{
+	cat <<__EOF__
+Usage: ${0##*/} STRACE_LOG
+
+Finds all STRACE_LOG.PID files, adds PID prefix to every line,
+then combines and sorts them, and prints result to standard output.
+
+It is assumed that STRACE_LOGs were produced by strace with -tt[t]
+option which prints timestamps (otherwise sorting won't do any good).
+__EOF__
+}
+
+if [ $# -ne 1 ]; then
+	show_usage >&2
+	exit 1
+elif [ "$1" = '--help' ]; then
+	show_usage
+	exit 0
+fi
+
+logfile=$1
+
+for file in "$logfile".*; do
+	[ -f "$file" ] || continue
+	suffix=${file#"$logfile".}
+	[ "$suffix" -gt 0 ] 2> /dev/null ||
+		continue
+	pid=$(printf "%-5s" $suffix)
+	# Some strace logs have last line which is not '\n' terminated,
+	# so add extra newline to every file.
+	# grep -v '^$' removes empty lines which may result.
+	sed "s/^/$pid /" < "$file"
+	echo
+done \
+| sort -s -k2,2 | grep -v '^$'
+
+rc=$?
+[ $rc -eq 1 ] &&
+	echo >&2 "${0##*/}: $logfile: strace output not found"
+exit $rc
diff --git a/strace.1 b/strace.1
index ec03e9a..faf4d45 100644
--- a/strace.1
+++ b/strace.1
@@ -24,9 +24,6 @@
 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-.\"
-.\"	$Id$
-.\"
 .de CW
 .sp
 .nf
@@ -42,67 +39,24 @@
 strace \- trace system calls and signals
 .SH SYNOPSIS
 .B strace
-[
-.B \-CdDffhiqrtttTvxx
-]
-[
-.BI \-a column
-]
-[
-.BI \-e expr
-]
-\&...
-[
-.BI \-o file
-]
-[
-.BI \-p pid
-]
-\&...
-[
-.BI \-s strsize
-]
-[
-.BI \-u username
-]
-[
-.BI \-E var=val
-]
-\&...
-[
-.BI \-E var
-]
-\&...
-[
-.I command
-[
-.I arg
-\&...
-]
-]
+[\fB-CdffhiqrtttTvVxxy\fR]
+[\fB-I\fIn\fR]
+[\fB-e\fIexpr\fR]... [\fB-a\fIcolumn\fR]
+[\fB-o\fIfile\fR]
+[\fB-s\fIstrsize\fR]
+[\fB-P\fIpath\fR]... \fB-p\fIpid\fR... /
+[\fB-D\fR]
+[\fB-E\fIvar\fR[=\fIval\fR]]... [\fB-u\fIusername\fR]
+\fIcommand\fR [\fIargs\fR]
 .sp
 .B strace
-.B \-c
-[
-.B \-D
-]
-[
-.BI \-e expr
-]
-\&...
-[
-.BI \-O overhead
-]
-[
-.BI \-S sortby
-]
-[
-.I command
-[
-.I arg
-\&...
-]
-]
+\fB-c\fR[\fBdf\fR]
+[\fB-I\fIn\fR]
+[\fB-e\fIexpr\fR]... [\fB-O\fIoverhead\fR]
+[\fB-S\fIsortby\fR] \fB-p\fIpid\fR... /
+[\fB-D\fR]
+[\fB-E\fIvar\fR[=\fIval\fR]]... [\fB-u\fIusername\fR]
+\fIcommand\fR [\fIargs\fR]
 .SH DESCRIPTION
 .IX "strace command" "" "\fLstrace\fR command"
 .LP
@@ -177,7 +131,7 @@
 .CW
 open("xyzzy", O_WRONLY|O_APPEND|O_CREAT, 0666) = 3
 .CE
-Here the three argument form of open is decoded by breaking down the
+Here the third argument of open is decoded by breaking down the
 flag argument into its three bitwise-OR constituents and printing the
 mode value in octal by tradition.  Where traditional or native
 usage differs from ANSI or POSIX, the latter forms are preferred.
@@ -259,7 +213,6 @@
 but also print regular output while processes are running.
 .TP
 .B \-D
-(Not available on SVR4 and FreeBSD.)
 Run tracer process as a detached grandchild, not as parent of the
 tracee.  This reduces the visible effect of
 .B strace
@@ -291,10 +244,6 @@
 being traced, it is suspended until an appropriate child process either
 terminates or incurs a signal that would cause it to terminate (as
 determined from the child's current signal disposition).
-.IP
-On SunOS 4.x the tracing of
-.BR vfork s
-is accomplished with some dynamic linking trickery.
 .TP
 .B \-ff
 If the
@@ -358,6 +307,9 @@
 .B \-xx
 Print all strings in hexadecimal string format.
 .TP
+.B \-y
+Print paths associated with file descriptor arguments.
+.TP
 .BI "\-a " column
 Align return values in a specific column (default column 40).
 .TP
@@ -501,6 +453,13 @@
 system call which is controlled by the option
 .BR -e "\ " trace = write .
 .TP
+.BI "\-I " interruptible
+When strace can be interrupted by signals (such as pressing ^C).
+1: no signals are blocked; 2: fatal signals are blocked while decoding syscall
+(default); 3: fatal signals are always blocked (default if '-o FILE PROG');
+4: fatal signals and SIGTSTP (^Z) are always blocked (useful to make
+strace -o FILE PROG not stop on ^Z).
+.TP
 .BI "\-o " filename
 Write the trace output to the file
 .I filename
@@ -543,11 +502,15 @@
 leaving it (them) to continue running.
 Multiple
 .B \-p
-options can be used to attach to up to 32 processes in addition to
-.I command
-(which is optional if at least one
-.B \-p
-option is given).
+options can be used to attach to many processes.
+-p "`pidof PROG`" syntax is supported.
+.TP
+.BI "\-P " path
+Trace only system calls accessing
+.I path.
+Multiple
+.B \-P
+options can be used to specify up to 256 paths.
 .TP
 .BI "\-s " strsize
 Specify the maximum string size to print (the default is 32).  Note
@@ -674,13 +637,6 @@
 .SM ID
 privileges while being traced.
 .LP
-A traced process ignores
-.SM SIGSTOP
-except on SVR4 platforms.
-.LP
-A traced process which tries to block SIGTRAP will be sent a SIGSTOP
-in an attempt to force continuation of tracing.
-.LP
 A traced process runs slowly.
 .LP
 Traced processes which are descended from
@@ -688,8 +644,6 @@
 may be left running after an interrupt signal (\c
 .SM CTRL\s0-C).
 .LP
-On Linux, exciting as it would be, tracing the init process is forbidden.
-.LP
 The
 .B \-i
 option is weakly supported.
@@ -724,17 +678,9 @@
 .B strace
 to Irix
 and tired of writing about himself in the third person.
-.SH BUGS
-The SIGTRAP signal is used internally by the kernel implementation of
-system call tracing.  When a traced process receives a SIGTRAP signal not
-associated with tracing, strace will not report that signal correctly.
-This signal is not normally used by programs, but could be via a hard-coded
-break instruction or via
-.BR kill (2).
 .SH PROBLEMS
 Problems with
 .B strace
-should be reported via the Debian Bug Tracking System,
-or to the
+should be reported to the
 .B strace
 mailing list at <strace\-devel@lists.sourceforge.net>.
diff --git a/strace.c b/strace.c
index 774d172..857136d 100644
--- a/strace.c
+++ b/strace.c
@@ -26,15 +26,10 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#include <sys/types.h>
-#include <signal.h>
-#include <errno.h>
+#include <stdarg.h>
 #include <sys/param.h>
 #include <fcntl.h>
 #include <sys/resource.h>
@@ -42,51 +37,57 @@
 #include <sys/stat.h>
 #include <pwd.h>
 #include <grp.h>
-#include <string.h>
-#include <limits.h>
 #include <dirent.h>
-
-#ifdef LINUX
-# include <asm/unistd.h>
-# if defined __NR_tgkill
-#  define my_tgkill(pid, tid, sig) syscall (__NR_tgkill, (pid), (tid), (sig))
-# elif defined __NR_tkill
-#  define my_tgkill(pid, tid, sig) syscall (__NR_tkill, (tid), (sig))
-# else
-   /* kill() may choose arbitrarily the target task of the process group
-      while we later wait on a that specific TID.  PID process waits become
-      TID task specific waits for a process under ptrace(2).  */
-#  warning "Neither tkill(2) nor tgkill(2) available, risk of strace hangs!"
-#  define my_tgkill(pid, tid, sig) kill ((tid), (sig))
-# endif
-#endif
-
-#if defined(IA64) && defined(LINUX)
+#include <sys/utsname.h>
+#if defined(IA64)
 # include <asm/ptrace_offsets.h>
 #endif
-
-#ifdef USE_PROCFS
-#include <poll.h>
-#endif
-
-#ifdef SVR4
-#include <sys/stropts.h>
-#ifdef HAVE_MP_PROCFS
-#ifdef HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-#endif
-#endif
+/* In some libc, these aren't declared. Do it ourself: */
 extern char **environ;
 extern int optind;
 extern char *optarg;
 
 
-int debug = 0, followfork = 0;
-unsigned int ptrace_setoptions = 0;
-int dtime = 0, xflag = 0, qflag = 0;
+#if defined __NR_tkill
+# define my_tkill(tid, sig) syscall(__NR_tkill, (tid), (sig))
+#else
+   /* kill() may choose arbitrarily the target task of the process group
+      while we later wait on a that specific TID.  PID process waits become
+      TID task specific waits for a process under ptrace(2).  */
+# warning "Neither tkill(2) nor tgkill(2) available, risk of strace hangs!"
+# define my_tkill(tid, sig) kill((tid), (sig))
+#endif
+
+#undef KERNEL_VERSION
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+
 cflag_t cflag = CFLAG_NONE;
-static int iflag = 0, interactive = 0, pflag_seen = 0, rflag = 0, tflag = 0;
+unsigned int followfork = 0;
+unsigned int ptrace_setoptions = 0;
+unsigned int xflag = 0;
+bool debug_flag = 0;
+bool Tflag = 0;
+bool qflag = 0;
+/* Which WSTOPSIG(status) value marks syscall traps? */
+static unsigned int syscall_trap_sig = SIGTRAP;
+static unsigned int tflag = 0;
+static bool iflag = 0;
+static bool rflag = 0;
+static bool print_pid_pfx = 0;
+
+/* -I n */
+enum {
+    INTR_NOT_SET        = 0,
+    INTR_ANYWHERE       = 1, /* don't block/ignore any signals */
+    INTR_WHILE_WAIT     = 2, /* block fatal signals while decoding syscall. default */
+    INTR_NEVER          = 3, /* block fatal signals. default if '-o FILE PROG' */
+    INTR_BLOCK_TSTP_TOO = 4, /* block fatal signals and SIGTSTP (^Z) */
+    NUM_INTR_OPTS
+};
+static int opt_intr;
+/* We play with signal mask only if this mode is active: */
+#define interactive (opt_intr == INTR_WHILE_WAIT)
+
 /*
  * daemonized_tracer supports -D option.
  * With this option, strace forks twice.
@@ -101,27 +102,52 @@
  */
 static bool daemonized_tracer = 0;
 
+#ifdef USE_SEIZE
+static int post_attach_sigstop = TCB_IGNORE_ONE_SIGSTOP;
+# define use_seize (post_attach_sigstop == 0)
+#else
+# define post_attach_sigstop TCB_IGNORE_ONE_SIGSTOP
+# define use_seize 0
+#endif
+
 /* Sometimes we want to print only succeeding syscalls. */
-int not_failing_only = 0;
+bool not_failing_only = 0;
+
+/* Show path associated with fd arguments */
+bool show_fd_path = 0;
+
+/* are we filtering traces based on paths? */
+bool tracing_paths = 0;
+
+static bool detach_on_execve = 0;
+static bool skip_startup_execve = 0;
 
 static int exit_code = 0;
 static int strace_child = 0;
+static int strace_tracer_pid = 0;
 
 static char *username = NULL;
-uid_t run_uid;
-gid_t run_gid;
+static uid_t run_uid;
+static gid_t run_gid;
 
-int acolumn = DEFAULT_ACOLUMN;
-int max_strlen = DEFAULT_STRLEN;
+unsigned int max_strlen = DEFAULT_STRLEN;
+static int acolumn = DEFAULT_ACOLUMN;
+static char *acolumn_spaces;
+
 static char *outfname = NULL;
-FILE *outf;
-static int curcol;
-struct tcb **tcbtab;
-unsigned int nprocs, tcbtabsize;
-const char *progname;
-extern char **environ;
+/* If -ff, points to stderr. Else, it's our common output log */
+static FILE *shared_log;
 
-static int detach(struct tcb *tcp, int sig);
+struct tcb *printing_tcp = NULL;
+static struct tcb *current_tcp;
+
+static struct tcb **tcbtab;
+static unsigned int nprocs, tcbtabsize;
+static const char *progname;
+
+static unsigned os_release; /* generated from uname()'s u.release */
+
+static int detach(struct tcb *tcp);
 static int trace(void);
 static void cleanup(void);
 static void interrupt(int sig);
@@ -129,88 +155,170 @@
 
 #ifdef HAVE_SIG_ATOMIC_T
 static volatile sig_atomic_t interrupted;
-#else /* !HAVE_SIG_ATOMIC_T */
-static volatile int interrupted;
-#endif /* !HAVE_SIG_ATOMIC_T */
-
-#ifdef USE_PROCFS
-
-static struct tcb *pfd2tcb(int pfd);
-static void reaper(int sig);
-static void rebuild_pollv(void);
-static struct pollfd *pollv;
-
-#ifndef HAVE_POLLABLE_PROCFS
-
-static void proc_poll_open(void);
-static void proc_poller(int pfd);
-
-struct proc_pollfd {
-	int fd;
-	int revents;
-	int pid;
-};
-
-static int poller_pid;
-static int proc_poll_pipe[2] = { -1, -1 };
-
-#endif /* !HAVE_POLLABLE_PROCFS */
-
-#ifdef HAVE_MP_PROCFS
-#define POLLWANT	POLLWRNORM
 #else
-#define POLLWANT	POLLPRI
+static volatile int interrupted;
 #endif
-#endif /* USE_PROCFS */
+
+#ifndef HAVE_STRERROR
+
+#if !HAVE_DECL_SYS_ERRLIST
+extern int sys_nerr;
+extern char *sys_errlist[];
+#endif
+
+const char *
+strerror(int err_no)
+{
+	static char buf[sizeof("Unknown error %d") + sizeof(int)*3];
+
+	if (err_no < 1 || err_no >= sys_nerr) {
+		sprintf(buf, "Unknown error %d", err_no);
+		return buf;
+	}
+	return sys_errlist[err_no];
+}
+
+#endif /* HAVE_STERRROR */
 
 static void
-usage(ofp, exitval)
-FILE *ofp;
-int exitval;
+usage(FILE *ofp, int exitval)
 {
 	fprintf(ofp, "\
-usage: strace [-CdDffhiqrtttTvVxx] [-a column] [-e expr] ... [-o file]\n\
-              [-p pid] ... [-s strsize] [-u username] [-E var=val] ...\n\
-              [command [arg ...]]\n\
-   or: strace -c [-D] [-e expr] ... [-O overhead] [-S sortby] [-E var=val] ...\n\
-              [command [arg ...]]\n\
+usage: strace [-CdffhiqrtttTvVxxy] [-I n] [-e expr]...\n\
+              [-a column] [-o file] [-s strsize] [-P path]...\n\
+              -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\
+   or: strace -c[df] [-I n] [-e expr]... [-O overhead] [-S sortby]\n\
+              -p pid... / [-D] [-E var=val]... [-u username] PROG [ARGS]\n\
 -c -- count time, calls, and errors for each syscall and report summary\n\
--C -- like -c but also print regular output while processes are running\n\
+-C -- like -c but also print regular output\n\
+-d -- enable debug output to stderr\n\
+-D -- run tracer process as a detached grandchild, not as parent\n\
 -f -- follow forks, -ff -- with output into separate files\n\
--F -- attempt to follow vforks, -h -- print help message\n\
+-F -- attempt to follow vforks (deprecated, use -f)\n\
 -i -- print instruction pointer at time of syscall\n\
 -q -- suppress messages about attaching, detaching, etc.\n\
 -r -- print relative timestamp, -t -- absolute timestamp, -tt -- with usecs\n\
--T -- print time spent in each syscall, -V -- print version\n\
--v -- verbose mode: print unabbreviated argv, stat, termio[s], etc. args\n\
+-T -- print time spent in each syscall\n\
+-v -- verbose mode: print unabbreviated argv, stat, termios, etc. args\n\
 -x -- print non-ascii strings in hex, -xx -- print all strings in hex\n\
+-y -- print paths associated with file descriptor arguments\n\
+-h -- print help message, -V -- print version\n\
 -a column -- alignment COLUMN for printing syscall results (default %d)\n\
 -e expr -- a qualifying expression: option=[!]all or option=[!]val1[,val2]...\n\
    options: trace, abbrev, verbose, raw, signal, read, or write\n\
+-I interruptible --\n\
+   1: no signals are blocked\n\
+   2: fatal signals are blocked while decoding syscall (default)\n\
+   3: fatal signals are always blocked (default if '-o FILE PROG')\n\
+   4: fatal signals and SIGTSTP (^Z) are always blocked\n\
+      (useful to make 'strace -o FILE PROG' not stop on ^Z)\n\
 -o file -- send trace output to FILE instead of stderr\n\
 -O overhead -- set overhead for tracing syscalls to OVERHEAD usecs\n\
 -p pid -- trace process with process id PID, may be repeated\n\
--D -- run tracer process as a detached grandchild, not as parent\n\
 -s strsize -- limit length of print strings to STRSIZE chars (default %d)\n\
 -S sortby -- sort syscall counts by: time, calls, name, nothing (default %s)\n\
 -u username -- run command as username handling setuid and/or setgid\n\
 -E var=val -- put var=val in the environment for command\n\
 -E var -- remove var from the environment for command\n\
-" /* this is broken, so don't document it
+-P path -- trace accesses to path\n\
+"
+/* this is broken, so don't document it
 -z -- print only succeeding syscalls\n\
-  */
+ */
+/* experimental, don't document it yet (option letter may change in the future!)
+-b -- detach on successful execve\n\
+ */
 , DEFAULT_ACOLUMN, DEFAULT_STRLEN, DEFAULT_SORTBY);
 	exit(exitval);
 }
 
-#ifdef SVR4
-#ifdef MIPS
-void
-foobar()
+static void die(void) __attribute__ ((noreturn));
+static void die(void)
 {
+	if (strace_tracer_pid == getpid()) {
+		cflag = 0;
+		cleanup();
+	}
+	exit(1);
 }
-#endif /* MIPS */
-#endif /* SVR4 */
+
+static void verror_msg(int err_no, const char *fmt, va_list p)
+{
+	char *msg;
+
+	fflush(NULL);
+
+	/* We want to print entire message with single fprintf to ensure
+	 * message integrity if stderr is shared with other programs.
+	 * Thus we use vasprintf + single fprintf.
+	 */
+	msg = NULL;
+	if (vasprintf(&msg, fmt, p) >= 0) {
+		if (err_no)
+			fprintf(stderr, "%s: %s: %s\n", progname, msg, strerror(err_no));
+		else
+			fprintf(stderr, "%s: %s\n", progname, msg);
+		free(msg);
+	} else {
+		/* malloc in vasprintf failed, try it without malloc */
+		fprintf(stderr, "%s: ", progname);
+		vfprintf(stderr, fmt, p);
+		if (err_no)
+			fprintf(stderr, ": %s\n", strerror(err_no));
+		else
+			putc('\n', stderr);
+	}
+	/* We don't switch stderr to buffered, thus fprintf(stderr)
+	 * always flushes its output and this is not necessary: */
+	/* fflush(stderr); */
+}
+
+void error_msg(const char *fmt, ...)
+{
+	va_list p;
+	va_start(p, fmt);
+	verror_msg(0, fmt, p);
+	va_end(p);
+}
+
+void error_msg_and_die(const char *fmt, ...)
+{
+	va_list p;
+	va_start(p, fmt);
+	verror_msg(0, fmt, p);
+	die();
+}
+
+void perror_msg(const char *fmt, ...)
+{
+	va_list p;
+	va_start(p, fmt);
+	verror_msg(errno, fmt, p);
+	va_end(p);
+}
+
+void perror_msg_and_die(const char *fmt, ...)
+{
+	va_list p;
+	va_start(p, fmt);
+	verror_msg(errno, fmt, p);
+	die();
+}
+
+void die_out_of_memory(void)
+{
+	static bool recursed = 0;
+	if (recursed)
+		exit(1);
+	recursed = 1;
+	error_msg_and_die("Out of memory");
+}
+
+static void
+error_opt_arg(int opt, const char *arg)
+{
+	error_msg_and_die("Invalid -%c argument: '%s'", opt, arg);
+}
 
 /* Glue for systems without a MMU that cannot provide fork() */
 #ifdef HAVE_FORK
@@ -220,30 +328,99 @@
 # define fork()         vfork()
 #endif
 
+#ifdef USE_SEIZE
 static int
+ptrace_attach_or_seize(int pid)
+{
+	int r;
+	if (!use_seize)
+		return ptrace(PTRACE_ATTACH, pid, 0, 0);
+	r = ptrace(PTRACE_SEIZE, pid, 0, PTRACE_SEIZE_DEVEL);
+	if (r)
+		return r;
+	r = ptrace(PTRACE_INTERRUPT, pid, 0, 0);
+	return r;
+}
+#else
+# define ptrace_attach_or_seize(pid) ptrace(PTRACE_ATTACH, (pid), 0, 0)
+#endif
+
+/*
+ * Used when we want to unblock stopped traced process.
+ * Should be only used with PTRACE_CONT, PTRACE_DETACH and PTRACE_SYSCALL.
+ * Returns 0 on success or if error was ESRCH
+ * (presumably process was killed while we talk to it).
+ * Otherwise prints error message and returns -1.
+ */
+static int
+ptrace_restart(int op, struct tcb *tcp, int sig)
+{
+	int err;
+	const char *msg;
+
+	errno = 0;
+	ptrace(op, tcp->pid, (void *) 0, (long) sig);
+	err = errno;
+	if (!err)
+		return 0;
+
+	msg = "SYSCALL";
+	if (op == PTRACE_CONT)
+		msg = "CONT";
+	if (op == PTRACE_DETACH)
+		msg = "DETACH";
+#ifdef PTRACE_LISTEN
+	if (op == PTRACE_LISTEN)
+		msg = "LISTEN";
+#endif
+	/*
+	 * Why curcol != 0? Otherwise sometimes we get this:
+	 *
+	 * 10252 kill(10253, SIGKILL)              = 0
+	 *  <ptrace(SYSCALL,10252):No such process>10253 ...next decode...
+	 *
+	 * 10252 died after we retrieved syscall exit data,
+	 * but before we tried to restart it. Log looks ugly.
+	 */
+	if (current_tcp && current_tcp->curcol != 0) {
+		tprintf(" <ptrace(%s):%s>\n", msg, strerror(err));
+		line_ended();
+	}
+	if (err == ESRCH)
+		return 0;
+	errno = err;
+	perror_msg("ptrace(PTRACE_%s,pid:%d,sig:%d)", msg, tcp->pid, sig);
+	return -1;
+}
+
+static void
 set_cloexec_flag(int fd)
 {
-	int     flags, newflags;
+	int flags, newflags;
 
-	if ((flags = fcntl(fd, F_GETFD, 0)) < 0)
-	{
-		fprintf(stderr, "%s: fcntl F_GETFD: %s\n",
-			progname, strerror(errno));
-		return -1;
+	flags = fcntl(fd, F_GETFD);
+	if (flags < 0) {
+		/* Can happen only if fd is bad.
+		 * Should never happen: if it does, we have a bug
+		 * in the caller. Therefore we just abort
+		 * instead of propagating the error.
+		 */
+		perror_msg_and_die("fcntl(%d, F_GETFD)", fd);
 	}
 
 	newflags = flags | FD_CLOEXEC;
 	if (flags == newflags)
-		return 0;
+		return;
 
-	if (fcntl(fd, F_SETFD, newflags) < 0)
-	{
-		fprintf(stderr, "%s: fcntl F_SETFD: %s\n",
-			progname, strerror(errno));
-		return -1;
-	}
+	fcntl(fd, F_SETFD, newflags); /* never fails */
+}
 
-	return 0;
+static void kill_save_errno(pid_t pid, int sig)
+{
+	int saved_errno = errno;
+
+	(void) kill(pid, sig);
+	errno = saved_errno;
 }
 
 /*
@@ -253,16 +430,11 @@
 static void
 swap_uid(void)
 {
-#ifndef SVR4
 	int euid = geteuid(), uid = getuid();
 
-	if (euid != uid && setreuid(euid, uid) < 0)
-	{
-		fprintf(stderr, "%s: setreuid: %s\n",
-			progname, strerror(errno));
-		exit(1);
+	if (euid != uid && setreuid(euid, uid) < 0) {
+		perror_msg_and_die("setreuid");
 	}
-#endif
 }
 
 #if _LFS64_LARGEFILE
@@ -272,24 +444,20 @@
 #endif
 
 static FILE *
-strace_fopen(const char *path, const char *mode)
+strace_fopen(const char *path)
 {
 	FILE *fp;
 
 	swap_uid();
-	if ((fp = fopen_for_output(path, mode)) == NULL)
-		fprintf(stderr, "%s: can't fopen '%s': %s\n",
-			progname, path, strerror(errno));
+	fp = fopen_for_output(path, "w");
+	if (!fp)
+		perror_msg_and_die("Can't fopen '%s'", path);
 	swap_uid();
-	if (fp && set_cloexec_flag(fileno(fp)) < 0)
-	{
-		fclose(fp);
-		fp = NULL;
-	}
+	set_cloexec_flag(fileno(fp));
 	return fp;
 }
 
-static int popen_pid = -1;
+static int popen_pid = 0;
 
 #ifndef _PATH_BSHELL
 # define _PATH_BSHELL "/bin/sh"
@@ -303,2492 +471,117 @@
 static FILE *
 strace_popen(const char *command)
 {
-	int     fds[2];
+	FILE *fp;
+	int fds[2];
 
 	swap_uid();
 	if (pipe(fds) < 0)
-	{
-		fprintf(stderr, "%s: pipe: %s\n",
-			progname, strerror(errno));
-		swap_uid();
-		return NULL;
-	}
+		perror_msg_and_die("pipe");
 
-	if (set_cloexec_flag(fds[1]) < 0)
-	{
-		close(fds[0]);
-		close(fds[1]);
-		swap_uid();
-		return NULL;
-	}
+	set_cloexec_flag(fds[1]); /* never fails */
 
-	if ((popen_pid = fork()) == -1)
-	{
-		fprintf(stderr, "%s: fork: %s\n",
-			progname, strerror(errno));
-		close(fds[0]);
-		close(fds[1]);
-		swap_uid();
-		return NULL;
-	}
+	popen_pid = vfork();
+	if (popen_pid == -1)
+		perror_msg_and_die("vfork");
 
-	if (popen_pid)
-	{
-		/* parent */
-		close(fds[0]);
-		swap_uid();
-		return fdopen(fds[1], "w");
-	} else
-	{
+	if (popen_pid == 0) {
 		/* child */
 		close(fds[1]);
-		if (fds[0] && (dup2(fds[0], 0) || close(fds[0])))
-		{
-			fprintf(stderr, "%s: dup2: %s\n",
-				progname, strerror(errno));
-			_exit(1);
+		if (fds[0] != 0) {
+			if (dup2(fds[0], 0))
+				perror_msg_and_die("dup2");
+			close(fds[0]);
 		}
 		execl(_PATH_BSHELL, "sh", "-c", command, NULL);
-		fprintf(stderr, "%s: execl: %s: %s\n",
-			progname, _PATH_BSHELL, strerror(errno));
-		_exit(1);
+		perror_msg_and_die("Can't execute '%s'", _PATH_BSHELL);
 	}
+
+	/* parent */
+	close(fds[0]);
+	swap_uid();
+	fp = fdopen(fds[1], "w");
+	if (!fp)
+		die_out_of_memory();
+	return fp;
 }
 
-static int
-newoutf(struct tcb *tcp)
-{
-	if (outfname && followfork > 1) {
-		char name[520 + sizeof(int) * 3];
-		FILE *fp;
-
-		sprintf(name, "%.512s.%u", outfname, tcp->pid);
-		if ((fp = strace_fopen(name, "w")) == NULL)
-			return -1;
-		tcp->outf = fp;
-	}
-	return 0;
-}
-
-static void
-startup_attach(void)
-{
-	int tcbi;
-	struct tcb *tcp;
-
-	/*
-	 * Block user interruptions as we would leave the traced
-	 * process stopped (process state T) if we would terminate in
-	 * between PTRACE_ATTACH and wait4 () on SIGSTOP.
-	 * We rely on cleanup () from this point on.
-	 */
-	if (interactive)
-		sigprocmask(SIG_BLOCK, &blocked_set, NULL);
-
-	if (daemonized_tracer) {
-		pid_t pid = fork();
-		if (pid < 0) {
-			_exit(1);
-		}
-		if (pid) { /* parent */
-			/*
-			 * Wait for child to attach to straced process
-			 * (our parent). Child SIGKILLs us after it attached.
-			 * Parent's wait() is unblocked by our death,
-			 * it proceeds to exec the straced program.
-			 */
-			pause();
-			_exit(0); /* paranoia */
-		}
-	}
-
-	for (tcbi = 0; tcbi < tcbtabsize; tcbi++) {
-		tcp = tcbtab[tcbi];
-		if (!(tcp->flags & TCB_INUSE) || !(tcp->flags & TCB_ATTACHED))
-			continue;
-#ifdef LINUX
-		if (tcp->flags & TCB_CLONE_THREAD)
-			continue;
-#endif
-		/* Reinitialize the output since it may have changed. */
-		tcp->outf = outf;
-		if (newoutf(tcp) < 0)
-			exit(1);
-
-#ifdef USE_PROCFS
-		if (proc_open(tcp, 1) < 0) {
-			fprintf(stderr, "trouble opening proc file\n");
-			droptcb(tcp);
-			continue;
-		}
-#else /* !USE_PROCFS */
-# ifdef LINUX
-		if (followfork && !daemonized_tracer) {
-			char procdir[sizeof("/proc/%d/task") + sizeof(int) * 3];
-			DIR *dir;
-
-			sprintf(procdir, "/proc/%d/task", tcp->pid);
-			dir = opendir(procdir);
-			if (dir != NULL) {
-				unsigned int ntid = 0, nerr = 0;
-				struct dirent *de;
-				int tid;
-				while ((de = readdir(dir)) != NULL) {
-					if (de->d_fileno == 0)
-						continue;
-					tid = atoi(de->d_name);
-					if (tid <= 0)
-						continue;
-					++ntid;
-					if (ptrace(PTRACE_ATTACH, tid, (char *) 1, 0) < 0)
-						++nerr;
-					else if (tid != tcbtab[tcbi]->pid) {
-						tcp = alloctcb(tid);
-						tcp->flags |= TCB_ATTACHED|TCB_CLONE_THREAD|TCB_FOLLOWFORK;
-						tcbtab[tcbi]->nchildren++;
-						tcbtab[tcbi]->nclone_threads++;
-						tcp->parent = tcbtab[tcbi];
-					}
-					if (interactive) {
-						sigprocmask(SIG_SETMASK, &empty_set, NULL);
-						if (interrupted)
-							return;
-						sigprocmask(SIG_BLOCK, &blocked_set, NULL);
-					}
-				}
-				closedir(dir);
-				ntid -= nerr;
-				if (ntid == 0) {
-					perror("attach: ptrace(PTRACE_ATTACH, ...)");
-					droptcb(tcp);
-					continue;
-				}
-				if (!qflag) {
-					fprintf(stderr, ntid > 1
-? "Process %u attached with %u threads - interrupt to quit\n"
-: "Process %u attached - interrupt to quit\n",
-						tcbtab[tcbi]->pid, ntid);
-				}
-				continue;
-			} /* if (opendir worked) */
-		} /* if (-f) */
-# endif
-		if (ptrace(PTRACE_ATTACH, tcp->pid, (char *) 1, 0) < 0) {
-			perror("attach: ptrace(PTRACE_ATTACH, ...)");
-			droptcb(tcp);
-			continue;
-		}
-		/* INTERRUPTED is going to be checked at the top of TRACE.  */
-
-		if (daemonized_tracer) {
-			/*
-			 * It is our grandparent we trace, not a -p PID.
-			 * Don't want to just detach on exit, so...
-			 */
-			tcp->flags &= ~TCB_ATTACHED;
-			/*
-			 * Make parent go away.
-			 * Also makes grandparent's wait() unblock.
-			 */
-			kill(getppid(), SIGKILL);
-		}
-
-#endif /* !USE_PROCFS */
-		if (!qflag)
-			fprintf(stderr,
-				"Process %u attached - interrupt to quit\n",
-				tcp->pid);
-	}
-
-	if (interactive)
-		sigprocmask(SIG_SETMASK, &empty_set, NULL);
-}
-
-static void
-startup_child (char **argv)
-{
-	struct stat statbuf;
-	const char *filename;
-	char pathname[MAXPATHLEN];
-	int pid = 0;
-	struct tcb *tcp;
-
-	filename = argv[0];
-	if (strchr(filename, '/')) {
-		if (strlen(filename) > sizeof pathname - 1) {
-			errno = ENAMETOOLONG;
-			perror("strace: exec");
-			exit(1);
-		}
-		strcpy(pathname, filename);
-	}
-#ifdef USE_DEBUGGING_EXEC
-	/*
-	 * Debuggers customarily check the current directory
-	 * first regardless of the path but doing that gives
-	 * security geeks a panic attack.
-	 */
-	else if (stat(filename, &statbuf) == 0)
-		strcpy(pathname, filename);
-#endif /* USE_DEBUGGING_EXEC */
-	else {
-		const char *path;
-		int m, n, len;
-
-		for (path = getenv("PATH"); path && *path; path += m) {
-			if (strchr(path, ':')) {
-				n = strchr(path, ':') - path;
-				m = n + 1;
-			}
-			else
-				m = n = strlen(path);
-			if (n == 0) {
-				if (!getcwd(pathname, MAXPATHLEN))
-					continue;
-				len = strlen(pathname);
-			}
-			else if (n > sizeof pathname - 1)
-				continue;
-			else {
-				strncpy(pathname, path, n);
-				len = n;
-			}
-			if (len && pathname[len - 1] != '/')
-				pathname[len++] = '/';
-			strcpy(pathname + len, filename);
-			if (stat(pathname, &statbuf) == 0 &&
-			    /* Accept only regular files
-			       with some execute bits set.
-			       XXX not perfect, might still fail */
-			    S_ISREG(statbuf.st_mode) &&
-			    (statbuf.st_mode & 0111))
-				break;
-		}
-	}
-	if (stat(pathname, &statbuf) < 0) {
-		fprintf(stderr, "%s: %s: command not found\n",
-			progname, filename);
-		exit(1);
-	}
-	strace_child = pid = fork();
-	if (pid < 0) {
-		perror("strace: fork");
-		cleanup();
-		exit(1);
-	}
-	if ((pid != 0 && daemonized_tracer) /* parent: to become a traced process */
-	 || (pid == 0 && !daemonized_tracer) /* child: to become a traced process */
-	) {
-		pid = getpid();
-#ifdef USE_PROCFS
-		if (outf != stderr) close (fileno (outf));
-#ifdef MIPS
-		/* Kludge for SGI, see proc_open for details. */
-		sa.sa_handler = foobar;
-		sa.sa_flags = 0;
-		sigemptyset(&sa.sa_mask);
-		sigaction(SIGINT, &sa, NULL);
-#endif /* MIPS */
-#ifndef FREEBSD
-		pause();
-#else /* FREEBSD */
-		kill(pid, SIGSTOP); /* stop HERE */
-#endif /* FREEBSD */
-#else /* !USE_PROCFS */
-		if (outf!=stderr)
-			close(fileno (outf));
-
-		if (!daemonized_tracer) {
-			if (ptrace(PTRACE_TRACEME, 0, (char *) 1, 0) < 0) {
-				perror("strace: ptrace(PTRACE_TRACEME, ...)");
-				exit(1);
-			}
-			if (debug)
-				kill(pid, SIGSTOP);
-		}
-
-		if (username != NULL || geteuid() == 0) {
-			uid_t run_euid = run_uid;
-			gid_t run_egid = run_gid;
-
-			if (statbuf.st_mode & S_ISUID)
-				run_euid = statbuf.st_uid;
-			if (statbuf.st_mode & S_ISGID)
-				run_egid = statbuf.st_gid;
-
-			/*
-			 * It is important to set groups before we
-			 * lose privileges on setuid.
-			 */
-			if (username != NULL) {
-				if (initgroups(username, run_gid) < 0) {
-					perror("initgroups");
-					exit(1);
-				}
-				if (setregid(run_gid, run_egid) < 0) {
-					perror("setregid");
-					exit(1);
-				}
-				if (setreuid(run_uid, run_euid) < 0) {
-					perror("setreuid");
-					exit(1);
-				}
-			}
-		}
-		else
-			setreuid(run_uid, run_uid);
-
-		if (!daemonized_tracer) {
-			/*
-			 * Induce an immediate stop so that the parent
-			 * will resume us with PTRACE_SYSCALL and display
-			 * this execve call normally.
-			 * Unless of course we're on a no-MMU system where
-			 * we vfork()-ed, so we cannot stop the child.
-			 */
-			if (!strace_vforked)
-				kill(getpid(), SIGSTOP);
-		} else {
-			struct sigaction sv_sigchld;
-			sigaction(SIGCHLD, NULL, &sv_sigchld);
-			/*
-			 * Make sure it is not SIG_IGN, otherwise wait
-			 * will not block.
-			 */
-			signal(SIGCHLD, SIG_DFL);
-			/*
-			 * Wait for grandchild to attach to us.
-			 * It kills child after that, and wait() unblocks.
-			 */
-			alarm(3);
-			wait(NULL);
-			alarm(0);
-			sigaction(SIGCHLD, &sv_sigchld, NULL);
-		}
-#endif /* !USE_PROCFS */
-
-		execv(pathname, argv);
-		perror("strace: exec");
-		_exit(1);
-	}
-
-	/* We are the tracer.  */
-	tcp = alloctcb(daemonized_tracer ? getppid() : pid);
-	if (daemonized_tracer) {
-		/* We want subsequent startup_attach() to attach to it.  */
-		tcp->flags |= TCB_ATTACHED;
-	}
-#ifdef USE_PROCFS
-	if (proc_open(tcp, 0) < 0) {
-		fprintf(stderr, "trouble opening proc file\n");
-		cleanup();
-		exit(1);
-	}
-#endif /* USE_PROCFS */
-}
-
-#ifdef LINUX
-/*
- * Test whether the kernel support PTRACE_O_TRACECLONE et al options.
- * First fork a new child, call ptrace with PTRACE_SETOPTIONS on it,
- * and then see which options are supported by the kernel.
- */
-static int
-test_ptrace_setoptions(void)
-{
-	int pid, expected_grandchild = 0, found_grandchild = 0;
-	const unsigned int test_options = PTRACE_O_TRACECLONE |
-					  PTRACE_O_TRACEFORK |
-					  PTRACE_O_TRACEVFORK;
-
-	if ((pid = fork()) < 0)
-		return -1;
-	else if (pid == 0) {
-		if (ptrace(PTRACE_TRACEME, 0, (char *)1, 0) < 0)
-			_exit(1);
-		kill(getpid(), SIGSTOP);
-		_exit(fork() < 0);
-	}
-
-	while (1) {
-		int status, tracee_pid;
-
-		tracee_pid = wait(&status);
-		if (tracee_pid == -1) {
-			if (errno == EINTR)
-				continue;
-			else if (errno == ECHILD)
-				break;
-			perror("test_ptrace_setoptions");
-			return -1;
-		}
-		if (tracee_pid != pid) {
-			found_grandchild = tracee_pid;
-			if (ptrace(PTRACE_CONT, tracee_pid, 0, 0) < 0 &&
-			    errno != ESRCH)
-				kill(tracee_pid, SIGKILL);
-		}
-		else if (WIFSTOPPED(status)) {
-			switch (WSTOPSIG(status)) {
-			case SIGSTOP:
-				if (ptrace(PTRACE_SETOPTIONS, pid,
-					   NULL, test_options) < 0) {
-					kill(pid, SIGKILL);
-					return -1;
-				}
-				break;
-			case SIGTRAP:
-				if (status >> 16 == PTRACE_EVENT_FORK) {
-					long msg = 0;
-
-					if (ptrace(PTRACE_GETEVENTMSG, pid,
-						   NULL, (long) &msg) == 0)
-						expected_grandchild = msg;
-				}
-				break;
-			}
-			if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0 &&
-			    errno != ESRCH)
-				kill(pid, SIGKILL);
-		}
-	}
-	if (expected_grandchild && expected_grandchild == found_grandchild)
-		ptrace_setoptions |= test_options;
-	return 0;
-}
-#endif
-
-int
-main(int argc, char *argv[])
-{
-	struct tcb *tcp;
-	int c, pid = 0;
-	int optF = 0;
-	struct sigaction sa;
-
-	static char buf[BUFSIZ];
-
-	progname = argv[0] ? argv[0] : "strace";
-
-	/* Allocate the initial tcbtab.  */
-	tcbtabsize = argc;	/* Surely enough for all -p args.  */
-	if ((tcbtab = calloc(tcbtabsize, sizeof tcbtab[0])) == NULL) {
-		fprintf(stderr, "%s: out of memory\n", progname);
-		exit(1);
-	}
-	if ((tcbtab[0] = calloc(tcbtabsize, sizeof tcbtab[0][0])) == NULL) {
-		fprintf(stderr, "%s: out of memory\n", progname);
-		exit(1);
-	}
-	for (tcp = tcbtab[0]; tcp < &tcbtab[0][tcbtabsize]; ++tcp)
-		tcbtab[tcp - tcbtab[0]] = &tcbtab[0][tcp - tcbtab[0]];
-
-	outf = stderr;
-	interactive = 1;
-	set_sortby(DEFAULT_SORTBY);
-	set_personality(DEFAULT_PERSONALITY);
-	qualify("trace=all");
-	qualify("abbrev=all");
-	qualify("verbose=all");
-	qualify("signal=all");
-	while ((c = getopt(argc, argv,
-		"+cCdfFhiqrtTvVxz"
-#ifndef USE_PROCFS
-		"D"
-#endif
-		"a:e:o:O:p:s:S:u:E:")) != EOF) {
-		switch (c) {
-		case 'c':
-			if (cflag == CFLAG_BOTH) {
-				fprintf(stderr, "%s: -c and -C are mutually exclusive options\n",
-					progname);
-				exit(1);
-			}
-			cflag = CFLAG_ONLY_STATS;
-			break;
-		case 'C':
-			if (cflag == CFLAG_ONLY_STATS) {
-				fprintf(stderr, "%s: -c and -C are mutually exclusive options\n",
-					progname);
-				exit(1);
-			}
-			cflag = CFLAG_BOTH;
-			break;
-		case 'd':
-			debug++;
-			break;
-#ifndef USE_PROCFS
-		case 'D':
-			daemonized_tracer = 1;
-			break;
-#endif
-		case 'F':
-			optF = 1;
-			break;
-		case 'f':
-			followfork++;
-			break;
-		case 'h':
-			usage(stdout, 0);
-			break;
-		case 'i':
-			iflag++;
-			break;
-		case 'q':
-			qflag++;
-			break;
-		case 'r':
-			rflag++;
-			tflag++;
-			break;
-		case 't':
-			tflag++;
-			break;
-		case 'T':
-			dtime++;
-			break;
-		case 'x':
-			xflag++;
-			break;
-		case 'v':
-			qualify("abbrev=none");
-			break;
-		case 'V':
-			printf("%s -- version %s\n", PACKAGE_NAME, VERSION);
-			exit(0);
-			break;
-		case 'z':
-			not_failing_only = 1;
-			break;
-		case 'a':
-			acolumn = atoi(optarg);
-			break;
-		case 'e':
-			qualify(optarg);
-			break;
-		case 'o':
-			outfname = strdup(optarg);
-			break;
-		case 'O':
-			set_overhead(atoi(optarg));
-			break;
-		case 'p':
-			if ((pid = atoi(optarg)) <= 0) {
-				fprintf(stderr, "%s: Invalid process id: %s\n",
-					progname, optarg);
-				break;
-			}
-			if (pid == getpid()) {
-				fprintf(stderr, "%s: I'm sorry, I can't let you do that, Dave.\n", progname);
-				break;
-			}
-			tcp = alloc_tcb(pid, 0);
-			tcp->flags |= TCB_ATTACHED;
-			pflag_seen++;
-			break;
-		case 's':
-			max_strlen = atoi(optarg);
-			if (max_strlen < 0) {
-				fprintf(stderr,
-					"%s: invalid -s argument: %s\n",
-					progname, optarg);
-				exit(1);
-			}
-			break;
-		case 'S':
-			set_sortby(optarg);
-			break;
-		case 'u':
-			username = strdup(optarg);
-			break;
-		case 'E':
-			if (putenv(optarg) < 0) {
-				fprintf(stderr, "%s: out of memory\n",
-					progname);
-				exit(1);
-			}
-			break;
-		default:
-			usage(stderr, 1);
-			break;
-		}
-	}
-
-	if ((optind == argc) == !pflag_seen)
-		usage(stderr, 1);
-
-	if (pflag_seen && daemonized_tracer) {
-		fprintf(stderr,
-			"%s: -D and -p are mutually exclusive options\n",
-			progname);
-		exit(1);
-	}
-
-	if (!followfork)
-		followfork = optF;
-
-	if (followfork > 1 && cflag) {
-		fprintf(stderr,
-			"%s: (-c or -C) and -ff are mutually exclusive options\n",
-			progname);
-		exit(1);
-	}
-
-	/* See if they want to run as another user. */
-	if (username != NULL) {
-		struct passwd *pent;
-
-		if (getuid() != 0 || geteuid() != 0) {
-			fprintf(stderr,
-				"%s: you must be root to use the -u option\n",
-				progname);
-			exit(1);
-		}
-		if ((pent = getpwnam(username)) == NULL) {
-			fprintf(stderr, "%s: cannot find user `%s'\n",
-				progname, username);
-			exit(1);
-		}
-		run_uid = pent->pw_uid;
-		run_gid = pent->pw_gid;
-	}
-	else {
-		run_uid = getuid();
-		run_gid = getgid();
-	}
-
-#ifdef LINUX
-	if (followfork) {
-		if (test_ptrace_setoptions() < 0) {
-			fprintf(stderr,
-				"Test for options supported by PTRACE_SETOPTIONS "
-				"failed, giving up using this feature.\n");
-			ptrace_setoptions = 0;
-		}
-		if (debug)
-			fprintf(stderr, "ptrace_setoptions = %#x\n",
-				ptrace_setoptions);
-	}
-#endif
-
-	/* Check if they want to redirect the output. */
-	if (outfname) {
-		/* See if they want to pipe the output. */
-		if (outfname[0] == '|' || outfname[0] == '!') {
-			/*
-			 * We can't do the <outfname>.PID funny business
-			 * when using popen, so prohibit it.
-			 */
-			if (followfork > 1) {
-				fprintf(stderr, "\
-%s: piping the output and -ff are mutually exclusive options\n",
-					progname);
-				exit(1);
-			}
-
-			if ((outf = strace_popen(outfname + 1)) == NULL)
-				exit(1);
-		}
-		else if (followfork <= 1 &&
-			 (outf = strace_fopen(outfname, "w")) == NULL)
-			exit(1);
-	}
-
-	if (!outfname || outfname[0] == '|' || outfname[0] == '!')
-		setvbuf(outf, buf, _IOLBF, BUFSIZ);
-	if (outfname && optind < argc) {
-		interactive = 0;
-		qflag = 1;
-	}
-
-	/* Valid states here:
-	   optind < argc	pflag_seen	outfname	interactive
-	   1			0		0		1
-	   0			1		0		1
-	   1			0		1		0
-	   0			1		1		1
-	 */
-
-	/* STARTUP_CHILD must be called before the signal handlers get
-	   installed below as they are inherited into the spawned process.
-	   Also we do not need to be protected by them as during interruption
-	   in the STARTUP_CHILD mode we kill the spawned process anyway.  */
-	if (!pflag_seen)
-		startup_child(&argv[optind]);
-
-	sigemptyset(&empty_set);
-	sigemptyset(&blocked_set);
-	sa.sa_handler = SIG_IGN;
-	sigemptyset(&sa.sa_mask);
-	sa.sa_flags = 0;
-	sigaction(SIGTTOU, &sa, NULL);
-	sigaction(SIGTTIN, &sa, NULL);
-	if (interactive) {
-		sigaddset(&blocked_set, SIGHUP);
-		sigaddset(&blocked_set, SIGINT);
-		sigaddset(&blocked_set, SIGQUIT);
-		sigaddset(&blocked_set, SIGPIPE);
-		sigaddset(&blocked_set, SIGTERM);
-		sa.sa_handler = interrupt;
-#ifdef SUNOS4
-		/* POSIX signals on sunos4.1 are a little broken. */
-		sa.sa_flags = SA_INTERRUPT;
-#endif /* SUNOS4 */
-	}
-	sigaction(SIGHUP, &sa, NULL);
-	sigaction(SIGINT, &sa, NULL);
-	sigaction(SIGQUIT, &sa, NULL);
-	sigaction(SIGPIPE, &sa, NULL);
-	sigaction(SIGTERM, &sa, NULL);
-#ifdef USE_PROCFS
-	sa.sa_handler = reaper;
-	sigaction(SIGCHLD, &sa, NULL);
-#else
-	/* Make sure SIGCHLD has the default action so that waitpid
-	   definitely works without losing track of children.  The user
-	   should not have given us a bogus state to inherit, but he might
-	   have.  Arguably we should detect SIG_IGN here and pass it on
-	   to children, but probably noone really needs that.  */
-	sa.sa_handler = SIG_DFL;
-	sigaction(SIGCHLD, &sa, NULL);
-#endif /* USE_PROCFS */
-
-	if (pflag_seen || daemonized_tracer)
-		startup_attach();
-
-	if (trace() < 0)
-		exit(1);
-	cleanup();
-	fflush(NULL);
-	if (exit_code > 0xff) {
-		/* Child was killed by a signal, mimic that.  */
-		exit_code &= 0xff;
-		signal(exit_code, SIG_DFL);
-		raise(exit_code);
-		/* Paranoia - what if this signal is not fatal?
-		   Exit with 128 + signo then.  */
-		exit_code += 128;
-	}
-	exit(exit_code);
-}
-
-void
-expand_tcbtab(void)
-{
-	/* Allocate some more TCBs and expand the table.
-	   We don't want to relocate the TCBs because our
-	   callers have pointers and it would be a pain.
-	   So tcbtab is a table of pointers.  Since we never
-	   free the TCBs, we allocate a single chunk of many.  */
-	struct tcb **newtab = (struct tcb **)
-		realloc(tcbtab, 2 * tcbtabsize * sizeof tcbtab[0]);
-	struct tcb *newtcbs = (struct tcb *) calloc(tcbtabsize,
-						    sizeof *newtcbs);
-	int i;
-	if (newtab == NULL || newtcbs == NULL) {
-		fprintf(stderr, "%s: expand_tcbtab: out of memory\n",
-			progname);
-		cleanup();
-		exit(1);
-	}
-	for (i = tcbtabsize; i < 2 * tcbtabsize; ++i)
-		newtab[i] = &newtcbs[i - tcbtabsize];
-	tcbtabsize *= 2;
-	tcbtab = newtab;
-}
-
-struct tcb *
-alloc_tcb(int pid, int command_options_parsed)
-{
-	int i;
-	struct tcb *tcp;
-
-	if (nprocs == tcbtabsize)
-		expand_tcbtab();
-
-	for (i = 0; i < tcbtabsize; i++) {
-		tcp = tcbtab[i];
-		if ((tcp->flags & TCB_INUSE) == 0) {
-			tcp->pid = pid;
-			tcp->parent = NULL;
-			tcp->nchildren = 0;
-			tcp->nzombies = 0;
-#ifdef TCB_CLONE_THREAD
-			tcp->nclone_threads = 0;
-			tcp->nclone_waiting = 0;
-#endif
-			tcp->flags = TCB_INUSE | TCB_STARTUP;
-			tcp->outf = outf; /* Initialise to current out file */
-			tcp->curcol = 0;
-			tcp->stime.tv_sec = 0;
-			tcp->stime.tv_usec = 0;
-			tcp->pfd = -1;
-			nprocs++;
-			if (command_options_parsed)
-				newoutf(tcp);
-			return tcp;
-		}
-	}
-	fprintf(stderr, "%s: bug in alloc_tcb\n", progname);
-	cleanup();
-	exit(1);
-}
-
-#ifdef USE_PROCFS
-int
-proc_open(struct tcb *tcp, int attaching)
-{
-	char proc[32];
-	long arg;
-#ifdef SVR4
-	int i;
-	sysset_t syscalls;
-	sigset_t signals;
-	fltset_t faults;
-#endif
-#ifndef HAVE_POLLABLE_PROCFS
-	static int last_pfd;
-#endif
-
-#ifdef HAVE_MP_PROCFS
-	/* Open the process pseudo-files in /proc. */
-	sprintf(proc, "/proc/%d/ctl", tcp->pid);
-	if ((tcp->pfd = open(proc, O_WRONLY|O_EXCL)) < 0) {
-		perror("strace: open(\"/proc/...\", ...)");
-		return -1;
-	}
-	if (set_cloexec_flag(tcp->pfd) < 0) {
-		return -1;
-	}
-	sprintf(proc, "/proc/%d/status", tcp->pid);
-	if ((tcp->pfd_stat = open(proc, O_RDONLY|O_EXCL)) < 0) {
-		perror("strace: open(\"/proc/...\", ...)");
-		return -1;
-	}
-	if (set_cloexec_flag(tcp->pfd_stat) < 0) {
-		return -1;
-	}
-	sprintf(proc, "/proc/%d/as", tcp->pid);
-	if ((tcp->pfd_as = open(proc, O_RDONLY|O_EXCL)) < 0) {
-		perror("strace: open(\"/proc/...\", ...)");
-		return -1;
-	}
-	if (set_cloexec_flag(tcp->pfd_as) < 0) {
-		return -1;
-	}
-#else
-	/* Open the process pseudo-file in /proc. */
-#ifndef FREEBSD
-	sprintf(proc, "/proc/%d", tcp->pid);
-	tcp->pfd = open(proc, O_RDWR|O_EXCL);
-#else /* FREEBSD */
-	sprintf(proc, "/proc/%d/mem", tcp->pid);
-	tcp->pfd = open(proc, O_RDWR);
-#endif /* FREEBSD */
-	if (tcp->pfd < 0) {
-		perror("strace: open(\"/proc/...\", ...)");
-		return -1;
-	}
-	if (set_cloexec_flag(tcp->pfd) < 0) {
-		return -1;
-	}
-#endif
-#ifdef FREEBSD
-	sprintf(proc, "/proc/%d/regs", tcp->pid);
-	if ((tcp->pfd_reg = open(proc, O_RDONLY)) < 0) {
-		perror("strace: open(\"/proc/.../regs\", ...)");
-		return -1;
-	}
-	if (cflag) {
-		sprintf(proc, "/proc/%d/status", tcp->pid);
-		if ((tcp->pfd_status = open(proc, O_RDONLY)) < 0) {
-			perror("strace: open(\"/proc/.../status\", ...)");
-			return -1;
-		}
-	} else
-		tcp->pfd_status = -1;
-#endif /* FREEBSD */
-	rebuild_pollv();
-	if (!attaching) {
-		/*
-		 * Wait for the child to pause.  Because of a race
-		 * condition we have to poll for the event.
-		 */
-		for (;;) {
-			if (IOCTL_STATUS (tcp) < 0) {
-				perror("strace: PIOCSTATUS");
-				return -1;
-			}
-			if (tcp->status.PR_FLAGS & PR_ASLEEP)
-			    break;
-		}
-	}
-#ifndef FREEBSD
-	/* Stop the process so that we own the stop. */
-	if (IOCTL(tcp->pfd, PIOCSTOP, (char *)NULL) < 0) {
-		perror("strace: PIOCSTOP");
-		return -1;
-	}
-#endif
-#ifdef PIOCSET
-	/* Set Run-on-Last-Close. */
-	arg = PR_RLC;
-	if (IOCTL(tcp->pfd, PIOCSET, &arg) < 0) {
-		perror("PIOCSET PR_RLC");
-		return -1;
-	}
-	/* Set or Reset Inherit-on-Fork. */
-	arg = PR_FORK;
-	if (IOCTL(tcp->pfd, followfork ? PIOCSET : PIOCRESET, &arg) < 0) {
-		perror("PIOC{SET,RESET} PR_FORK");
-		return -1;
-	}
-#else  /* !PIOCSET */
-#ifndef FREEBSD
-	if (ioctl(tcp->pfd, PIOCSRLC) < 0) {
-		perror("PIOCSRLC");
-		return -1;
-	}
-	if (ioctl(tcp->pfd, followfork ? PIOCSFORK : PIOCRFORK) < 0) {
-		perror("PIOC{S,R}FORK");
-		return -1;
-	}
-#else /* FREEBSD */
-	/* just unset the PF_LINGER flag for the Run-on-Last-Close. */
-	if (ioctl(tcp->pfd, PIOCGFL, &arg) < 0) {
-	        perror("PIOCGFL");
-		return -1;
-	}
-	arg &= ~PF_LINGER;
-	if (ioctl(tcp->pfd, PIOCSFL, arg) < 0) {
-		perror("PIOCSFL");
-		return -1;
-	}
-#endif /* FREEBSD */
-#endif /* !PIOCSET */
-#ifndef FREEBSD
-	/* Enable all syscall entries we care about. */
-	premptyset(&syscalls);
-	for (i = 1; i < MAX_QUALS; ++i) {
-		if (i > (sizeof syscalls) * CHAR_BIT) break;
-		if (qual_flags [i] & QUAL_TRACE) praddset (&syscalls, i);
-	}
-	praddset (&syscalls, SYS_execve);
-	if (followfork) {
-		praddset (&syscalls, SYS_fork);
-#ifdef SYS_forkall
-		praddset (&syscalls, SYS_forkall);
-#endif
-#ifdef SYS_fork1
-		praddset (&syscalls, SYS_fork1);
-#endif
-#ifdef SYS_rfork1
-		praddset (&syscalls, SYS_rfork1);
-#endif
-#ifdef SYS_rforkall
-		praddset (&syscalls, SYS_rforkall);
-#endif
-	}
-	if (IOCTL(tcp->pfd, PIOCSENTRY, &syscalls) < 0) {
-		perror("PIOCSENTRY");
-		return -1;
-	}
-	/* Enable the syscall exits. */
-	if (IOCTL(tcp->pfd, PIOCSEXIT, &syscalls) < 0) {
-		perror("PIOSEXIT");
-		return -1;
-	}
-	/* Enable signals we care about. */
-	premptyset(&signals);
-	for (i = 1; i < MAX_QUALS; ++i) {
-		if (i > (sizeof signals) * CHAR_BIT) break;
-		if (qual_flags [i] & QUAL_SIGNAL) praddset (&signals, i);
-	}
-	if (IOCTL(tcp->pfd, PIOCSTRACE, &signals) < 0) {
-		perror("PIOCSTRACE");
-		return -1;
-	}
-	/* Enable faults we care about */
-	premptyset(&faults);
-	for (i = 1; i < MAX_QUALS; ++i) {
-		if (i > (sizeof faults) * CHAR_BIT) break;
-		if (qual_flags [i] & QUAL_FAULT) praddset (&faults, i);
-	}
-	if (IOCTL(tcp->pfd, PIOCSFAULT, &faults) < 0) {
-		perror("PIOCSFAULT");
-		return -1;
-	}
-#else /* FREEBSD */
-	/* set events flags. */
-	arg = S_SIG | S_SCE | S_SCX ;
-	if(ioctl(tcp->pfd, PIOCBIS, arg) < 0) {
-		perror("PIOCBIS");
-		return -1;
-	}
-#endif /* FREEBSD */
-	if (!attaching) {
-#ifdef MIPS
-		/*
-		 * The SGI PRSABORT doesn't work for pause() so
-		 * we send it a caught signal to wake it up.
-		 */
-		kill(tcp->pid, SIGINT);
-#else /* !MIPS */
-#ifdef PRSABORT
-		/* The child is in a pause(), abort it. */
-		arg = PRSABORT;
-		if (IOCTL (tcp->pfd, PIOCRUN, &arg) < 0) {
-			perror("PIOCRUN");
-			return -1;
-		}
-#endif
-#endif /* !MIPS*/
-#ifdef FREEBSD
-		/* wake up the child if it received the SIGSTOP */
-		kill(tcp->pid, SIGCONT);
-#endif
-		for (;;) {
-			/* Wait for the child to do something. */
-			if (IOCTL_WSTOP (tcp) < 0) {
-				perror("PIOCWSTOP");
-				return -1;
-			}
-			if (tcp->status.PR_WHY == PR_SYSENTRY) {
-				tcp->flags &= ~TCB_INSYSCALL;
-				get_scno(tcp);
-				if (known_scno(tcp) == SYS_execve)
-					break;
-			}
-			/* Set it running: maybe execve will be next. */
-#ifndef FREEBSD
-			arg = 0;
-			if (IOCTL(tcp->pfd, PIOCRUN, &arg) < 0) {
-#else /* FREEBSD */
-			if (IOCTL(tcp->pfd, PIOCRUN, 0) < 0) {
-#endif /* FREEBSD */
-				perror("PIOCRUN");
-				return -1;
-			}
-#ifdef FREEBSD
-			/* handle the case where we "opened" the child before
-			   it did the kill -STOP */
-			if (tcp->status.PR_WHY == PR_SIGNALLED &&
-			    tcp->status.PR_WHAT == SIGSTOP)
-			        kill(tcp->pid, SIGCONT);
-#endif
-		}
-#ifndef FREEBSD
-	}
-#else /* FREEBSD */
-	} else {
-		if (attaching < 2) {
-			/* We are attaching to an already running process.
-			 * Try to figure out the state of the process in syscalls,
-			 * to handle the first event well.
-			 * This is done by having a look at the "wchan" property of the
-			 * process, which tells where it is stopped (if it is). */
-			FILE * status;
-			char wchan[20]; /* should be enough */
-
-			sprintf(proc, "/proc/%d/status", tcp->pid);
-			status = fopen(proc, "r");
-			if (status &&
-			    (fscanf(status, "%*s %*d %*d %*d %*d %*d,%*d %*s %*d,%*d"
-				    "%*d,%*d %*d,%*d %19s", wchan) == 1) &&
-			    strcmp(wchan, "nochan") && strcmp(wchan, "spread") &&
-			    strcmp(wchan, "stopevent")) {
-				/* The process is asleep in the middle of a syscall.
-				   Fake the syscall entry event */
-				tcp->flags &= ~(TCB_INSYSCALL|TCB_STARTUP);
-				tcp->status.PR_WHY = PR_SYSENTRY;
-				trace_syscall(tcp);
-			}
-			if (status)
-				fclose(status);
-		} /* otherwise it's a fork being followed */
-	}
-#endif /* FREEBSD */
-#ifndef HAVE_POLLABLE_PROCFS
-	if (proc_poll_pipe[0] != -1)
-		proc_poller(tcp->pfd);
-	else if (nprocs > 1) {
-		proc_poll_open();
-		proc_poller(last_pfd);
-		proc_poller(tcp->pfd);
-	}
-	last_pfd = tcp->pfd;
-#endif /* !HAVE_POLLABLE_PROCFS */
-	return 0;
-}
-
-#endif /* USE_PROCFS */
-
-struct tcb *
-pid2tcb(int pid)
-{
-	int i;
-
-	if (pid <= 0)
-		return NULL;
-
-	for (i = 0; i < tcbtabsize; i++) {
-		struct tcb *tcp = tcbtab[i];
-		if (tcp->pid == pid && (tcp->flags & TCB_INUSE))
-			return tcp;
-	}
-
-	return NULL;
-}
-
-#ifdef USE_PROCFS
-
-static struct tcb *
-first_used_tcb(void)
-{
-	int i;
-	struct tcb *tcp;
-	for (i = 0; i < tcbtabsize; i++) {
-		tcp = tcbtab[i];
-		if (tcp->flags & TCB_INUSE)
-			return tcp;
-	}
-	return NULL;
-}
-
-static struct tcb *
-pfd2tcb(pfd)
-int pfd;
-{
-	int i;
-
-	for (i = 0; i < tcbtabsize; i++) {
-		struct tcb *tcp = tcbtab[i];
-		if (tcp->pfd != pfd)
-			continue;
-		if (tcp->flags & TCB_INUSE)
-			return tcp;
-	}
-	return NULL;
-}
-
-#endif /* USE_PROCFS */
-
-void
-droptcb(tcp)
-struct tcb *tcp;
-{
-	if (tcp->pid == 0)
-		return;
-#ifdef TCB_CLONE_THREAD
-	if (tcp->nclone_threads > 0) {
-		/* There are other threads left in this process, but this
-		   is the one whose PID represents the whole process.
-		   We need to keep this record around as a zombie until
-		   all the threads die.  */
-		tcp->flags |= TCB_EXITING;
-		return;
-	}
-#endif
-	nprocs--;
-	tcp->pid = 0;
-
-	if (tcp->parent != NULL) {
-		tcp->parent->nchildren--;
-#ifdef TCB_CLONE_THREAD
-		if (tcp->flags & TCB_CLONE_THREAD)
-			tcp->parent->nclone_threads--;
-#endif
-		tcp->parent->nzombies++;
-#ifdef LINUX
-		/* Update `tcp->parent->parent->nchildren' and the other fields
-		   like NCLONE_DETACHED, only for zombie group leader that has
-		   already reported and been short-circuited at the top of this
-		   function.  The same condition as at the top of DETACH.  */
-		if ((tcp->flags & TCB_CLONE_THREAD) &&
-		    tcp->parent->nclone_threads == 0 &&
-		    (tcp->parent->flags & TCB_EXITING))
-			droptcb(tcp->parent);
-#endif
-		tcp->parent = NULL;
-	}
-
-	tcp->flags = 0;
-	if (tcp->pfd != -1) {
-		close(tcp->pfd);
-		tcp->pfd = -1;
-#ifdef FREEBSD
-		if (tcp->pfd_reg != -1) {
-		        close(tcp->pfd_reg);
-		        tcp->pfd_reg = -1;
-		}
-		if (tcp->pfd_status != -1) {
-			close(tcp->pfd_status);
-			tcp->pfd_status = -1;
-		}
-#endif /* !FREEBSD */
-#ifdef USE_PROCFS
-		rebuild_pollv(); /* Note, flags needs to be cleared by now.  */
-#endif
-	}
-
-	if (outfname && followfork > 1 && tcp->outf)
-		fclose(tcp->outf);
-
-	tcp->outf = 0;
-}
-
-#ifndef USE_PROCFS
-
-static int
-resume(tcp)
-struct tcb *tcp;
-{
-	if (tcp == NULL)
-		return -1;
-
-	if (!(tcp->flags & TCB_SUSPENDED)) {
-		fprintf(stderr, "PANIC: pid %u not suspended\n", tcp->pid);
-		return -1;
-	}
-	tcp->flags &= ~TCB_SUSPENDED;
-#ifdef TCB_CLONE_THREAD
-	if (tcp->flags & TCB_CLONE_THREAD)
-		tcp->parent->nclone_waiting--;
-#endif
-
-	if (ptrace_restart(PTRACE_SYSCALL, tcp, 0) < 0)
-		return -1;
-
-	if (!qflag)
-		fprintf(stderr, "Process %u resumed\n", tcp->pid);
-	return 0;
-}
-
-static int
-resume_from_tcp (struct tcb *tcp)
-{
-	int error = 0;
-	int resumed = 0;
-
-	/* XXX This won't always be quite right (but it never was).
-	   A waiter with argument 0 or < -1 is waiting for any pid in
-	   a particular pgrp, which this child might or might not be
-	   in.  The waiter will only wake up if it's argument is -1
-	   or if it's waiting for tcp->pid's pgrp.  It makes a
-	   difference to wake up a waiter when there might be more
-	   traced children, because it could get a false ECHILD
-	   error.  OTOH, if this was the last child in the pgrp, then
-	   it ought to wake up and get ECHILD.  We would have to
-	   search the system for all pid's in the pgrp to be sure.
-
-	     && (t->waitpid == -1 ||
-		 (t->waitpid == 0 && getpgid (tcp->pid) == getpgid (t->pid))
-		 || (t->waitpid < 0 && t->waitpid == -getpid (t->pid)))
-	*/
-
-	if (tcp->parent &&
-	    (tcp->parent->flags & TCB_SUSPENDED) &&
-	    (tcp->parent->waitpid <= 0 || tcp->parent->waitpid == tcp->pid)) {
-		error = resume(tcp->parent);
-		++resumed;
-	}
-#ifdef TCB_CLONE_THREAD
-	if (tcp->parent && tcp->parent->nclone_waiting > 0) {
-		/* Some other threads of our parent are waiting too.  */
-		unsigned int i;
-
-		/* Resume all the threads that were waiting for this PID.  */
-		for (i = 0; i < tcbtabsize; i++) {
-			struct tcb *t = tcbtab[i];
-			if (t->parent == tcp->parent && t != tcp
-			    && ((t->flags & (TCB_CLONE_THREAD|TCB_SUSPENDED))
-				== (TCB_CLONE_THREAD|TCB_SUSPENDED))
-			    && t->waitpid == tcp->pid) {
-				error |= resume (t);
-				++resumed;
-			}
-		}
-		if (resumed == 0)
-			/* Noone was waiting for this PID in particular,
-			   so now we might need to resume some wildcarders.  */
-			for (i = 0; i < tcbtabsize; i++) {
-				struct tcb *t = tcbtab[i];
-				if (t->parent == tcp->parent && t != tcp
-				    && ((t->flags
-					 & (TCB_CLONE_THREAD|TCB_SUSPENDED))
-					== (TCB_CLONE_THREAD|TCB_SUSPENDED))
-				    && t->waitpid <= 0
-					) {
-					error |= resume (t);
-					break;
-				}
-			}
-	}
-#endif
-
-	return error;
-}
-
-#endif /* !USE_PROCFS */
-
-/* detach traced process; continue with sig
-   Never call DETACH twice on the same process as both unattached and
-   attached-unstopped processes give the same ESRCH.  For unattached process we
-   would SIGSTOP it and wait for its SIGSTOP notification forever.  */
-
-static int
-detach(tcp, sig)
-struct tcb *tcp;
-int sig;
-{
-	int error = 0;
-#ifdef LINUX
-	int status, catch_sigstop;
-	struct tcb *zombie = NULL;
-
-	/* If the group leader is lingering only because of this other
-	   thread now dying, then detach the leader as well.  */
-	if ((tcp->flags & TCB_CLONE_THREAD) &&
-	    tcp->parent->nclone_threads == 1 &&
-	    (tcp->parent->flags & TCB_EXITING))
-		zombie = tcp->parent;
-#endif
-
-	if (tcp->flags & TCB_BPTSET)
-		clearbpt(tcp);
-
-#ifdef LINUX
-	/*
-	 * Linux wrongly insists the child be stopped
-	 * before detaching.  Arghh.  We go through hoops
-	 * to make a clean break of things.
-	 */
-#if defined(SPARC)
-#undef PTRACE_DETACH
-#define PTRACE_DETACH PTRACE_SUNDETACH
-#endif
-	/*
-	 * On TCB_STARTUP we did PTRACE_ATTACH but still did not get the
-	 * expected SIGSTOP.  We must catch exactly one as otherwise the
-	 * detached process would be left stopped (process state T).
-	 */
-	catch_sigstop = (tcp->flags & TCB_STARTUP);
-	if ((error = ptrace(PTRACE_DETACH, tcp->pid, (char *) 1, sig)) == 0) {
-		/* On a clear day, you can see forever. */
-	}
-	else if (errno != ESRCH) {
-		/* Shouldn't happen. */
-		perror("detach: ptrace(PTRACE_DETACH, ...)");
-	}
-	else if (my_tgkill((tcp->flags & TCB_CLONE_THREAD ? tcp->parent->pid
-							  : tcp->pid),
-			   tcp->pid, 0) < 0) {
-		if (errno != ESRCH)
-			perror("detach: checking sanity");
-	}
-	else if (!catch_sigstop && my_tgkill((tcp->flags & TCB_CLONE_THREAD
-					      ? tcp->parent->pid : tcp->pid),
-					     tcp->pid, SIGSTOP) < 0) {
-		if (errno != ESRCH)
-			perror("detach: stopping child");
-	}
-	else
-		catch_sigstop = 1;
-	if (catch_sigstop) {
-		for (;;) {
-#ifdef __WALL
-			if (wait4(tcp->pid, &status, __WALL, NULL) < 0) {
-				if (errno == ECHILD) /* Already gone.  */
-					break;
-				if (errno != EINVAL) {
-					perror("detach: waiting");
-					break;
-				}
-#endif /* __WALL */
-				/* No __WALL here.  */
-				if (waitpid(tcp->pid, &status, 0) < 0) {
-					if (errno != ECHILD) {
-						perror("detach: waiting");
-						break;
-					}
-#ifdef __WCLONE
-					/* If no processes, try clones.  */
-					if (wait4(tcp->pid, &status, __WCLONE,
-						  NULL) < 0) {
-						if (errno != ECHILD)
-							perror("detach: waiting");
-						break;
-					}
-#endif /* __WCLONE */
-				}
-#ifdef __WALL
-			}
-#endif
-			if (!WIFSTOPPED(status)) {
-				/* Au revoir, mon ami. */
-				break;
-			}
-			if (WSTOPSIG(status) == SIGSTOP) {
-				ptrace_restart(PTRACE_DETACH, tcp, sig);
-				break;
-			}
-			error = ptrace_restart(PTRACE_CONT, tcp,
-					WSTOPSIG(status) == SIGTRAP ? 0
-					: WSTOPSIG(status));
-			if (error < 0)
-				break;
-		}
-	}
-#endif /* LINUX */
-
-#if defined(SUNOS4)
-	/* PTRACE_DETACH won't respect `sig' argument, so we post it here. */
-	if (sig && kill(tcp->pid, sig) < 0)
-		perror("detach: kill");
-	sig = 0;
-	error = ptrace_restart(PTRACE_DETACH, tcp, sig);
-#endif /* SUNOS4 */
-
-#ifndef USE_PROCFS
-	error |= resume_from_tcp (tcp);
-#endif
-
-	if (!qflag)
-		fprintf(stderr, "Process %u detached\n", tcp->pid);
-
-	droptcb(tcp);
-
-#ifdef LINUX
-	if (zombie != NULL) {
-		/* TCP no longer exists therefore you must not detach () it.  */
-		droptcb(zombie);
-	}
-#endif
-
-	return error;
-}
-
-#ifdef USE_PROCFS
-
-static void reaper(int sig)
-{
-	int pid;
-	int status;
-
-	while ((pid = waitpid(-1, &status, WNOHANG)) > 0) {
-	}
-}
-
-#endif /* USE_PROCFS */
-
-static void
-cleanup()
-{
-	int i;
-	struct tcb *tcp;
-
-	for (i = 0; i < tcbtabsize; i++) {
-		tcp = tcbtab[i];
-		if (!(tcp->flags & TCB_INUSE))
-			continue;
-		if (debug)
-			fprintf(stderr,
-				"cleanup: looking at pid %u\n", tcp->pid);
-		if (tcp_last &&
-		    (!outfname || followfork < 2 || tcp_last == tcp)) {
-			tprintf(" <unfinished ...>");
-			printtrailer();
-		}
-		if (tcp->flags & TCB_ATTACHED)
-			detach(tcp, 0);
-		else {
-			kill(tcp->pid, SIGCONT);
-			kill(tcp->pid, SIGTERM);
-		}
-	}
-	if (cflag)
-		call_summary(outf);
-}
-
-static void
-interrupt(sig)
-int sig;
-{
-	interrupted = 1;
-}
-
-#ifndef HAVE_STRERROR
-
-#if !HAVE_DECL_SYS_ERRLIST
-extern int sys_nerr;
-extern char *sys_errlist[];
-#endif /* HAVE_DECL_SYS_ERRLIST */
-
-const char *
-strerror(errno)
-int errno;
-{
-	static char buf[64];
-
-	if (errno < 1 || errno >= sys_nerr) {
-		sprintf(buf, "Unknown error %d", errno);
-		return buf;
-	}
-	return sys_errlist[errno];
-}
-
-#endif /* HAVE_STERRROR */
-
-#ifndef HAVE_STRSIGNAL
-
-#if defined HAVE_SYS_SIGLIST && !defined HAVE_DECL_SYS_SIGLIST
-extern char *sys_siglist[];
-#endif
-#if defined HAVE_SYS__SIGLIST && !defined HAVE_DECL__SYS_SIGLIST
-extern char *_sys_siglist[];
-#endif
-
-const char *
-strsignal(sig)
-int sig;
-{
-	static char buf[64];
-
-	if (sig < 1 || sig >= NSIG) {
-		sprintf(buf, "Unknown signal %d", sig);
-		return buf;
-	}
-#ifdef HAVE__SYS_SIGLIST
-	return _sys_siglist[sig];
-#else
-	return sys_siglist[sig];
-#endif
-}
-
-#endif /* HAVE_STRSIGNAL */
-
-#ifdef USE_PROCFS
-
-static void
-rebuild_pollv()
-{
-	int i, j;
-
-	if (pollv != NULL)
-		free (pollv);
-	pollv = (struct pollfd *) malloc(nprocs * sizeof pollv[0]);
-	if (pollv == NULL) {
-		fprintf(stderr, "%s: out of memory\n", progname);
-		exit(1);
-	}
-
-	for (i = j = 0; i < tcbtabsize; i++) {
-		struct tcb *tcp = tcbtab[i];
-		if (!(tcp->flags & TCB_INUSE))
-			continue;
-		pollv[j].fd = tcp->pfd;
-		pollv[j].events = POLLWANT;
-		j++;
-	}
-	if (j != nprocs) {
-		fprintf(stderr, "strace: proc miscount\n");
-		exit(1);
-	}
-}
-
-#ifndef HAVE_POLLABLE_PROCFS
-
-static void
-proc_poll_open()
-{
-	int i;
-
-	if (pipe(proc_poll_pipe) < 0) {
-		perror("pipe");
-		exit(1);
-	}
-	for (i = 0; i < 2; i++) {
-		if (set_cloexec_flag(proc_poll_pipe[i]) < 0) {
-			exit(1);
-		}
-	}
-}
-
-static int
-proc_poll(pollv, nfds, timeout)
-struct pollfd *pollv;
-int nfds;
-int timeout;
-{
-	int i;
-	int n;
-	struct proc_pollfd pollinfo;
-
-	if ((n = read(proc_poll_pipe[0], &pollinfo, sizeof(pollinfo))) < 0)
-		return n;
-	if (n != sizeof(struct proc_pollfd)) {
-		fprintf(stderr, "panic: short read: %d\n", n);
-		exit(1);
-	}
-	for (i = 0; i < nprocs; i++) {
-		if (pollv[i].fd == pollinfo.fd)
-			pollv[i].revents = pollinfo.revents;
-		else
-			pollv[i].revents = 0;
-	}
-	poller_pid = pollinfo.pid;
-	return 1;
-}
-
-static void
-wakeup_handler(sig)
-int sig;
-{
-}
-
-static void
-proc_poller(pfd)
-int pfd;
-{
-	struct proc_pollfd pollinfo;
-	struct sigaction sa;
-	sigset_t blocked_set, empty_set;
-	int i;
-	int n;
-	struct rlimit rl;
-#ifdef FREEBSD
-	struct procfs_status pfs;
-#endif /* FREEBSD */
-
-	switch (fork()) {
-	case -1:
-		perror("fork");
-		_exit(1);
-	case 0:
-		break;
-	default:
-		return;
-	}
-
-	sa.sa_handler = interactive ? SIG_DFL : SIG_IGN;
-	sa.sa_flags = 0;
-	sigemptyset(&sa.sa_mask);
-	sigaction(SIGHUP, &sa, NULL);
-	sigaction(SIGINT, &sa, NULL);
-	sigaction(SIGQUIT, &sa, NULL);
-	sigaction(SIGPIPE, &sa, NULL);
-	sigaction(SIGTERM, &sa, NULL);
-	sa.sa_handler = wakeup_handler;
-	sigaction(SIGUSR1, &sa, NULL);
-	sigemptyset(&blocked_set);
-	sigaddset(&blocked_set, SIGUSR1);
-	sigprocmask(SIG_BLOCK, &blocked_set, NULL);
-	sigemptyset(&empty_set);
-
-	if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
-		perror("getrlimit(RLIMIT_NOFILE, ...)");
-		_exit(1);
-	}
-	n = rl.rlim_cur;
-	for (i = 0; i < n; i++) {
-		if (i != pfd && i != proc_poll_pipe[1])
-			close(i);
-	}
-
-	pollinfo.fd = pfd;
-	pollinfo.pid = getpid();
-	for (;;) {
-#ifndef FREEBSD
-		if (ioctl(pfd, PIOCWSTOP, NULL) < 0)
-#else
-		if (ioctl(pfd, PIOCWSTOP, &pfs) < 0)
-#endif
-		{
-			switch (errno) {
-			case EINTR:
-				continue;
-			case EBADF:
-				pollinfo.revents = POLLERR;
-				break;
-			case ENOENT:
-				pollinfo.revents = POLLHUP;
-				break;
-			default:
-				perror("proc_poller: PIOCWSTOP");
-			}
-			write(proc_poll_pipe[1], &pollinfo, sizeof(pollinfo));
-			_exit(0);
-		}
-		pollinfo.revents = POLLWANT;
-		write(proc_poll_pipe[1], &pollinfo, sizeof(pollinfo));
-		sigsuspend(&empty_set);
-	}
-}
-
-#endif /* !HAVE_POLLABLE_PROCFS */
-
-static int
-choose_pfd()
-{
-	int i, j;
-	struct tcb *tcp;
-
-	static int last;
-
-	if (followfork < 2 &&
-	    last < nprocs && (pollv[last].revents & POLLWANT)) {
-		/*
-		 * The previous process is ready to run again.  We'll
-		 * let it do so if it is currently in a syscall.  This
-		 * heuristic improves the readability of the trace.
-		 */
-		tcp = pfd2tcb(pollv[last].fd);
-		if (tcp && (tcp->flags & TCB_INSYSCALL))
-			return pollv[last].fd;
-	}
-
-	for (i = 0; i < nprocs; i++) {
-		/* Let competing children run round robin. */
-		j = (i + last + 1) % nprocs;
-		if (pollv[j].revents & (POLLHUP | POLLERR)) {
-			tcp = pfd2tcb(pollv[j].fd);
-			if (!tcp) {
-				fprintf(stderr, "strace: lost proc\n");
-				exit(1);
-			}
-			droptcb(tcp);
-			return -1;
-		}
-		if (pollv[j].revents & POLLWANT) {
-			last = j;
-			return pollv[j].fd;
-		}
-	}
-	fprintf(stderr, "strace: nothing ready\n");
-	exit(1);
-}
-
-static int
-trace()
-{
-#ifdef POLL_HACK
-	struct tcb *in_syscall = NULL;
-#endif
-	struct tcb *tcp;
-	int pfd;
-	int what;
-	int ioctl_result = 0, ioctl_errno = 0;
-	long arg;
-
-	for (;;) {
-		if (interactive)
-			sigprocmask(SIG_SETMASK, &empty_set, NULL);
-
-		if (nprocs == 0)
-			break;
-
-		switch (nprocs) {
-		case 1:
-#ifndef HAVE_POLLABLE_PROCFS
-			if (proc_poll_pipe[0] == -1) {
-#endif
-				tcp = first_used_tcb();
-				if (!tcp)
-					continue;
-				pfd = tcp->pfd;
-				if (pfd == -1)
-					continue;
-				break;
-#ifndef HAVE_POLLABLE_PROCFS
-			}
-			/* fall through ... */
-#endif /* !HAVE_POLLABLE_PROCFS */
-		default:
-#ifdef HAVE_POLLABLE_PROCFS
-#ifdef POLL_HACK
-		        /* On some systems (e.g. UnixWare) we get too much ugly
-			   "unfinished..." stuff when multiple proceses are in
-			   syscalls.  Here's a nasty hack */
-
-			if (in_syscall) {
-				struct pollfd pv;
-				tcp = in_syscall;
-				in_syscall = NULL;
-				pv.fd = tcp->pfd;
-				pv.events = POLLWANT;
-				if ((what = poll (&pv, 1, 1)) < 0) {
-					if (interrupted)
-						return 0;
-					continue;
-				}
-				else if (what == 1 && pv.revents & POLLWANT) {
-					goto FOUND;
-				}
-			}
-#endif
-
-			if (poll(pollv, nprocs, INFTIM) < 0) {
-				if (interrupted)
-					return 0;
-				continue;
-			}
-#else /* !HAVE_POLLABLE_PROCFS */
-			if (proc_poll(pollv, nprocs, INFTIM) < 0) {
-				if (interrupted)
-					return 0;
-				continue;
-			}
-#endif /* !HAVE_POLLABLE_PROCFS */
-			pfd = choose_pfd();
-			if (pfd == -1)
-				continue;
-			break;
-		}
-
-		/* Look up `pfd' in our table. */
-		if ((tcp = pfd2tcb(pfd)) == NULL) {
-			fprintf(stderr, "unknown pfd: %u\n", pfd);
-			exit(1);
-		}
-#ifdef POLL_HACK
-	FOUND:
-#endif
-		/* Get the status of the process. */
-		if (!interrupted) {
-#ifndef FREEBSD
-			ioctl_result = IOCTL_WSTOP (tcp);
-#else /* FREEBSD */
-			/* Thanks to some scheduling mystery, the first poller
-			   sometimes waits for the already processed end of fork
-			   event. Doing a non blocking poll here solves the problem. */
-			if (proc_poll_pipe[0] != -1)
-				ioctl_result = IOCTL_STATUS (tcp);
-			else
-				ioctl_result = IOCTL_WSTOP (tcp);
-#endif /* FREEBSD */
-			ioctl_errno = errno;
-#ifndef HAVE_POLLABLE_PROCFS
-			if (proc_poll_pipe[0] != -1) {
-				if (ioctl_result < 0)
-					kill(poller_pid, SIGKILL);
-				else
-					kill(poller_pid, SIGUSR1);
-			}
-#endif /* !HAVE_POLLABLE_PROCFS */
-		}
-		if (interrupted)
-			return 0;
-
-		if (interactive)
-			sigprocmask(SIG_BLOCK, &blocked_set, NULL);
-
-		if (ioctl_result < 0) {
-			/* Find out what happened if it failed. */
-			switch (ioctl_errno) {
-			case EINTR:
-			case EBADF:
-				continue;
-#ifdef FREEBSD
-			case ENOTTY:
-#endif
-			case ENOENT:
-				droptcb(tcp);
-				continue;
-			default:
-				perror("PIOCWSTOP");
-				exit(1);
-			}
-		}
-
-#ifdef FREEBSD
-		if ((tcp->flags & TCB_STARTUP) && (tcp->status.PR_WHY == PR_SYSEXIT)) {
-			/* discard first event for a syscall we never entered */
-			IOCTL (tcp->pfd, PIOCRUN, 0);
-			continue;
-		}
-#endif
-
-		/* clear the just started flag */
-		tcp->flags &= ~TCB_STARTUP;
-
-		/* set current output file */
-		outf = tcp->outf;
-		curcol = tcp->curcol;
-
-		if (cflag) {
-			struct timeval stime;
-#ifdef FREEBSD
-			char buf[1024];
-			int len;
-
-			if ((len = pread(tcp->pfd_status, buf, sizeof(buf) - 1, 0)) > 0) {
-				buf[len] = '\0';
-				sscanf(buf,
-				       "%*s %*d %*d %*d %*d %*d,%*d %*s %*d,%*d %*d,%*d %ld,%ld",
-				       &stime.tv_sec, &stime.tv_usec);
-			} else
-				stime.tv_sec = stime.tv_usec = 0;
-#else /* !FREEBSD */
-			stime.tv_sec = tcp->status.pr_stime.tv_sec;
-			stime.tv_usec = tcp->status.pr_stime.tv_nsec/1000;
-#endif /* !FREEBSD */
-			tv_sub(&tcp->dtime, &stime, &tcp->stime);
-			tcp->stime = stime;
-		}
-		what = tcp->status.PR_WHAT;
-		switch (tcp->status.PR_WHY) {
-#ifndef FREEBSD
-		case PR_REQUESTED:
-			if (tcp->status.PR_FLAGS & PR_ASLEEP) {
-				tcp->status.PR_WHY = PR_SYSENTRY;
-				if (trace_syscall(tcp) < 0) {
-					fprintf(stderr, "syscall trouble\n");
-					exit(1);
-				}
-			}
-			break;
-#endif /* !FREEBSD */
-		case PR_SYSENTRY:
-#ifdef POLL_HACK
-		        in_syscall = tcp;
-#endif
-		case PR_SYSEXIT:
-			if (trace_syscall(tcp) < 0) {
-				fprintf(stderr, "syscall trouble\n");
-				exit(1);
-			}
-			break;
-		case PR_SIGNALLED:
-			if (cflag != CFLAG_ONLY_STATS
-			    && (qual_flags[what] & QUAL_SIGNAL)) {
-				printleader(tcp);
-				tprintf("--- %s (%s) ---",
-					signame(what), strsignal(what));
-				printtrailer();
-#ifdef PR_INFO
-				if (tcp->status.PR_INFO.si_signo == what) {
-					printleader(tcp);
-					tprintf("    siginfo=");
-					printsiginfo(&tcp->status.PR_INFO, 1);
-					printtrailer();
-				}
-#endif
-			}
-			break;
-		case PR_FAULTED:
-			if (cflag != CFLAGS_ONLY_STATS
-			    && (qual_flags[what] & QUAL_FAULT)) {
-				printleader(tcp);
-				tprintf("=== FAULT %d ===", what);
-				printtrailer();
-			}
-			break;
-#ifdef FREEBSD
-		case 0: /* handle case we polled for nothing */
-			continue;
-#endif
-		default:
-			fprintf(stderr, "odd stop %d\n", tcp->status.PR_WHY);
-			exit(1);
-			break;
-		}
-		/* Remember current print column before continuing. */
-		tcp->curcol = curcol;
-		arg = 0;
-#ifndef FREEBSD
-		if (IOCTL (tcp->pfd, PIOCRUN, &arg) < 0)
-#else
-		if (IOCTL (tcp->pfd, PIOCRUN, 0) < 0)
-#endif
-		{
-			perror("PIOCRUN");
-			exit(1);
-		}
-	}
-	return 0;
-}
-
-#else /* !USE_PROCFS */
-
-#ifdef TCB_GROUP_EXITING
-/* Handle an exit detach or death signal that is taking all the
-   related clone threads with it.  This is called in three circumstances:
-   SIG == -1	TCP has already died (TCB_ATTACHED is clear, strace is parent).
-   SIG == 0	Continuing TCP will perform an exit_group syscall.
-   SIG == other	Continuing TCP with SIG will kill the process.
-*/
-static int
-handle_group_exit(struct tcb *tcp, int sig)
-{
-	/* We need to locate our records of all the clone threads
-	   related to TCP, either its children or siblings.  */
-	struct tcb *leader = NULL;
-
-	if (tcp->flags & TCB_CLONE_THREAD)
-		leader = tcp->parent;
-
-	if (sig < 0) {
-		if (leader != NULL && leader != tcp
-		 && !(leader->flags & TCB_GROUP_EXITING)
-		 && !(tcp->flags & TCB_STARTUP)
-		) {
-			fprintf(stderr,
-				"PANIC: handle_group_exit: %d leader %d\n",
-				tcp->pid, leader ? leader->pid : -1);
-		}
-		/* TCP no longer exists therefore you must not detach() it.  */
-#ifndef USE_PROCFS
-		resume_from_tcp(tcp);
-#endif
-		droptcb(tcp);	/* Already died.  */
-	}
-	else {
-		/* Mark that we are taking the process down.  */
-		tcp->flags |= TCB_EXITING | TCB_GROUP_EXITING;
-		if (tcp->flags & TCB_ATTACHED) {
-			detach(tcp, sig);
-			if (leader != NULL && leader != tcp)
-				leader->flags |= TCB_GROUP_EXITING;
-		} else {
-			if (ptrace_restart(PTRACE_CONT, tcp, sig) < 0) {
-				cleanup();
-				return -1;
-			}
-			if (leader != NULL) {
-				leader->flags |= TCB_GROUP_EXITING;
-				if (leader != tcp)
-					droptcb(tcp);
-			}
-			/* The leader will report to us as parent now,
-			   and then we'll get to the SIG==-1 case.  */
-			return 0;
-		}
-	}
-
-	return 0;
-}
-#endif
-
-#ifdef LINUX
-static int
-handle_ptrace_event(int status, struct tcb *tcp)
-{
-	if (status >> 16 == PTRACE_EVENT_VFORK ||
-	    status >> 16 == PTRACE_EVENT_CLONE ||
-	    status >> 16 == PTRACE_EVENT_FORK) {
-		long childpid;
-
-		if (do_ptrace(PTRACE_GETEVENTMSG, tcp, NULL, &childpid) < 0) {
-			if (errno != ESRCH) {
-				fprintf(stderr, "\
-%s: handle_ptrace_event: ptrace cannot get new child's pid\n",
-					progname);
-				cleanup();
-				exit(1);
-			}
-			return -1;
-		}
-		return handle_new_child(tcp, childpid, 0);
-	}
-	return 1;
-}
-#endif
-
-static int
-trace()
-{
-	int pid;
-	int wait_errno;
-	int status;
-	struct tcb *tcp;
-#ifdef LINUX
-	struct rusage ru;
-#ifdef __WALL
-	static int wait4_options = __WALL;
-#endif
-#endif /* LINUX */
-
-	while (nprocs != 0) {
-		if (interrupted)
-			return 0;
-		if (interactive)
-			sigprocmask(SIG_SETMASK, &empty_set, NULL);
-#ifdef LINUX
-#ifdef __WALL
-		pid = wait4(-1, &status, wait4_options, cflag ? &ru : NULL);
-		if (pid < 0 && (wait4_options & __WALL) && errno == EINVAL) {
-			/* this kernel does not support __WALL */
-			wait4_options &= ~__WALL;
-			errno = 0;
-			pid = wait4(-1, &status, wait4_options,
-					cflag ? &ru : NULL);
-		}
-		if (pid < 0 && !(wait4_options & __WALL) && errno == ECHILD) {
-			/* most likely a "cloned" process */
-			pid = wait4(-1, &status, __WCLONE,
-					cflag ? &ru : NULL);
-			if (pid == -1) {
-				fprintf(stderr, "strace: clone wait4 "
-						"failed: %s\n", strerror(errno));
-			}
-		}
-#else
-		pid = wait4(-1, &status, 0, cflag ? &ru : NULL);
-#endif /* __WALL */
-#endif /* LINUX */
-#ifdef SUNOS4
-		pid = wait(&status);
-#endif /* SUNOS4 */
-		wait_errno = errno;
-		if (interactive)
-			sigprocmask(SIG_BLOCK, &blocked_set, NULL);
-
-		if (pid == -1) {
-			switch (wait_errno) {
-			case EINTR:
-				continue;
-			case ECHILD:
-				/*
-				 * We would like to verify this case
-				 * but sometimes a race in Solbourne's
-				 * version of SunOS sometimes reports
-				 * ECHILD before sending us SIGCHILD.
-				 */
-				return 0;
-			default:
-				errno = wait_errno;
-				perror("strace: wait");
-				return -1;
-			}
-		}
-		if (pid == popen_pid) {
-			if (WIFEXITED(status) || WIFSIGNALED(status))
-				popen_pid = -1;
-			continue;
-		}
-		if (debug)
-			fprintf(stderr, " [wait(%#x) = %u]\n", status, pid);
-
-		/* Look up `pid' in our table. */
-		if ((tcp = pid2tcb(pid)) == NULL) {
-#ifdef LINUX
-			if (followfork) {
-				/* This is needed to go with the CLONE_PTRACE
-				   changes in process.c/util.c: we might see
-				   the child's initial trap before we see the
-				   parent return from the clone syscall.
-				   Leave the child suspended until the parent
-				   returns from its system call.  Only then
-				   will we have the association of parent and
-				   child so that we know how to do clearbpt
-				   in the child.  */
-				tcp = alloctcb(pid);
-				tcp->flags |= TCB_ATTACHED | TCB_SUSPENDED;
-				if (!qflag)
-					fprintf(stderr, "\
-Process %d attached (waiting for parent)\n",
-						pid);
-			}
-			else
-				/* This can happen if a clone call used
-				   CLONE_PTRACE itself.  */
-#endif
-			{
-				fprintf(stderr, "unknown pid: %u\n", pid);
-				if (WIFSTOPPED(status))
-					ptrace(PTRACE_CONT, pid, (char *) 1, 0);
-				exit(1);
-			}
-		}
-		/* set current output file */
-		outf = tcp->outf;
-		curcol = tcp->curcol;
-		if (cflag) {
-#ifdef LINUX
-			tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
-			tcp->stime = ru.ru_stime;
-#endif /* !LINUX */
-		}
-
-		if (tcp->flags & TCB_SUSPENDED) {
-			/*
-			 * Apparently, doing any ptrace() call on a stopped
-			 * process, provokes the kernel to report the process
-			 * status again on a subsequent wait(), even if the
-			 * process has not been actually restarted.
-			 * Since we have inspected the arguments of suspended
-			 * processes we end up here testing for this case.
-			 */
-			continue;
-		}
-		if (WIFSIGNALED(status)) {
-			if (pid == strace_child)
-				exit_code = 0x100 | WTERMSIG(status);
-			if (cflag != CFLAG_ONLY_STATS
-			    && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)) {
-				printleader(tcp);
-				tprintf("+++ killed by %s %s+++",
-					signame(WTERMSIG(status)),
-#ifdef WCOREDUMP
-					WCOREDUMP(status) ? "(core dumped) " :
-#endif
-					"");
-				printtrailer();
-			}
-#ifdef TCB_GROUP_EXITING
-			handle_group_exit(tcp, -1);
-#else
-			droptcb(tcp);
-#endif
-			continue;
-		}
-		if (WIFEXITED(status)) {
-			if (pid == strace_child)
-				exit_code = WEXITSTATUS(status);
-			if (debug)
-				fprintf(stderr, "pid %u exited with %d\n", pid, WEXITSTATUS(status));
-			if ((tcp->flags & (TCB_ATTACHED|TCB_STARTUP)) == TCB_ATTACHED
-#ifdef TCB_GROUP_EXITING
-			    && !(tcp->parent && (tcp->parent->flags & TCB_GROUP_EXITING))
-			    && !(tcp->flags & TCB_GROUP_EXITING)
-#endif
-			) {
-				fprintf(stderr,
-					"PANIC: attached pid %u exited with %d\n",
-					pid, WEXITSTATUS(status));
-			}
-			if (tcp == tcp_last) {
-				if ((tcp->flags & (TCB_INSYSCALL|TCB_REPRINT)) == TCB_INSYSCALL)
-					tprintf(" <unfinished ... exit status %d>\n",
-						WEXITSTATUS(status));
-				tcp_last = NULL;
-			}
-#ifdef TCB_GROUP_EXITING
-			handle_group_exit(tcp, -1);
-#else
-			droptcb(tcp);
-#endif
-			continue;
-		}
-		if (!WIFSTOPPED(status)) {
-			fprintf(stderr, "PANIC: pid %u not stopped\n", pid);
-			droptcb(tcp);
-			continue;
-		}
-		if (debug)
-			fprintf(stderr, "pid %u stopped, [%s]\n",
-				pid, signame(WSTOPSIG(status)));
-
-		if (ptrace_setoptions && (status >> 16)) {
-			if (handle_ptrace_event(status, tcp) != 1)
-				goto tracing;
-		}
-
-		/*
-		 * Interestingly, the process may stop
-		 * with STOPSIG equal to some other signal
-		 * than SIGSTOP if we happend to attach
-		 * just before the process takes a signal.
-		 * A no-MMU vforked child won't send up a signal,
-		 * so skip the first (lost) execve notification.
-		 */
-		if ((tcp->flags & TCB_STARTUP) &&
-		    (WSTOPSIG(status) == SIGSTOP || strace_vforked)) {
-			/*
-			 * This flag is there to keep us in sync.
-			 * Next time this process stops it should
-			 * really be entering a system call.
-			 */
-			tcp->flags &= ~TCB_STARTUP;
-			if (tcp->flags & TCB_BPTSET) {
-				/*
-				 * One example is a breakpoint inherited from
-				 * parent through fork ().
-				 */
-				if (clearbpt(tcp) < 0) /* Pretty fatal */ {
-					droptcb(tcp);
-					cleanup();
-					return -1;
-				}
-			}
-#ifdef LINUX
-			if (followfork && (tcp->parent == NULL) && ptrace_setoptions)
-				if (ptrace(PTRACE_SETOPTIONS, tcp->pid,
-					   NULL, ptrace_setoptions) < 0 &&
-				    errno != ESRCH)
-					ptrace_setoptions = 0;
-#endif
-			goto tracing;
-		}
-
-		if (WSTOPSIG(status) != SIGTRAP) {
-			if (WSTOPSIG(status) == SIGSTOP &&
-					(tcp->flags & TCB_SIGTRAPPED)) {
-				/*
-				 * Trapped attempt to block SIGTRAP
-				 * Hope we are back in control now.
-				 */
-				tcp->flags &= ~(TCB_INSYSCALL | TCB_SIGTRAPPED);
-				if (ptrace_restart(PTRACE_SYSCALL, tcp, 0) < 0) {
-					cleanup();
-					return -1;
-				}
-				continue;
-			}
-			if (cflag != CFLAG_ONLY_STATS
-			    && (qual_flags[WSTOPSIG(status)] & QUAL_SIGNAL)) {
-				siginfo_t si;
-#if defined(PT_CR_IPSR) && defined(PT_CR_IIP)
-				long pc = 0;
-				long psr = 0;
-
-				upeek(tcp, PT_CR_IPSR, &psr);
-				upeek(tcp, PT_CR_IIP, &pc);
-
-# define PSR_RI	41
-				pc += (psr >> PSR_RI) & 0x3;
-# define PC_FORMAT_STR	" @ %lx"
-# define PC_FORMAT_ARG	pc
-#else
-# define PC_FORMAT_STR	"%s"
-# define PC_FORMAT_ARG	""
-#endif
-				printleader(tcp);
-				if (ptrace(PTRACE_GETSIGINFO, pid, 0, &si) == 0) {
-					tprintf("--- ");
-					printsiginfo(&si, verbose(tcp));
-					tprintf(" (%s)" PC_FORMAT_STR " ---",
-						strsignal(WSTOPSIG(status)),
-						PC_FORMAT_ARG);
-				} else
-					tprintf("--- %s by %s" PC_FORMAT_STR " ---",
-						strsignal(WSTOPSIG(status)),
-						signame(WSTOPSIG(status)),
-						PC_FORMAT_ARG);
-				printtrailer();
-			}
-			if (((tcp->flags & TCB_ATTACHED) ||
-			     tcp->nclone_threads > 0) &&
-				!sigishandled(tcp, WSTOPSIG(status))) {
-#ifdef TCB_GROUP_EXITING
-				handle_group_exit(tcp, WSTOPSIG(status));
-#else
-				detach(tcp, WSTOPSIG(status));
-#endif
-				continue;
-			}
-			if (ptrace_restart(PTRACE_SYSCALL, tcp, WSTOPSIG(status)) < 0) {
-				cleanup();
-				return -1;
-			}
-			tcp->flags &= ~TCB_SUSPENDED;
-			continue;
-		}
-		/* we handled the STATUS, we are permitted to interrupt now. */
-		if (interrupted)
-			return 0;
-		if (trace_syscall(tcp) < 0 && !tcp->ptrace_errno) {
-			/* ptrace() failed in trace_syscall() with ESRCH.
-			 * Likely a result of process disappearing mid-flight.
-			 * Observed case: exit_group() terminating
-			 * all processes in thread group. In this case, threads
-			 * "disappear" in an unpredictable moment without any
-			 * notification to strace via wait().
-			 */
-			if (tcp->flags & TCB_ATTACHED) {
-				if (tcp_last) {
-					/* Do we have dangling line "syscall(param, param"?
-					 * Finish the line then. We cannot
-					 */
-					tcp_last->flags |= TCB_REPRINT;
-					tprintf(" <unfinished ...>");
-					printtrailer();
-				}
-				detach(tcp, 0);
-			} else {
-				ptrace(PTRACE_KILL,
-					tcp->pid, (char *) 1, SIGTERM);
-				droptcb(tcp);
-			}
-			continue;
-		}
-		if (tcp->flags & TCB_EXITING) {
-#ifdef TCB_GROUP_EXITING
-			if (tcp->flags & TCB_GROUP_EXITING) {
-				if (handle_group_exit(tcp, 0) < 0)
-					return -1;
-				continue;
-			}
-#endif
-			if (tcp->flags & TCB_ATTACHED)
-				detach(tcp, 0);
-			else if (ptrace_restart(PTRACE_CONT, tcp, 0) < 0) {
-				cleanup();
-				return -1;
-			}
-			continue;
-		}
-		if (tcp->flags & TCB_SUSPENDED) {
-			if (!qflag)
-				fprintf(stderr, "Process %u suspended\n", pid);
-			continue;
-		}
-	tracing:
-		/* Remember current print column before continuing. */
-		tcp->curcol = curcol;
-		if (ptrace_restart(PTRACE_SYSCALL, tcp, 0) < 0) {
-			cleanup();
-			return -1;
-		}
-	}
-	return 0;
-}
-
-#endif /* !USE_PROCFS */
-
-#include <stdarg.h>
-
 void
 tprintf(const char *fmt, ...)
 {
 	va_list args;
 
 	va_start(args, fmt);
-	if (outf) {
-		int n = vfprintf(outf, fmt, args);
+	if (current_tcp) {
+		int n = strace_vfprintf(current_tcp->outf, fmt, args);
 		if (n < 0) {
-			if (outf != stderr)
+			if (current_tcp->outf != stderr)
 				perror(outfname == NULL
 				       ? "<writing to pipe>" : outfname);
 		} else
-			curcol += n;
+			current_tcp->curcol += n;
 	}
 	va_end(args);
-	return;
 }
 
 void
-printleader(tcp)
-struct tcb *tcp;
+tprints(const char *str)
 {
-	if (tcp_last) {
-		if (tcp_last->ptrace_errno) {
-			if (tcp_last->flags & TCB_INSYSCALL) {
-				tprintf(" <unavailable>)");
-				tabto(acolumn);
-			}
-			tprintf("= ? <unavailable>\n");
-			tcp_last->ptrace_errno = 0;
-		} else if (!outfname || followfork < 2 || tcp_last == tcp) {
-			tcp_last->flags |= TCB_REPRINT;
-			tprintf(" <unfinished ...>\n");
+	if (current_tcp) {
+		int n = fputs_unlocked(str, current_tcp->outf);
+		if (n >= 0) {
+			current_tcp->curcol += strlen(str);
+			return;
+		}
+		if (current_tcp->outf != stderr)
+			perror(!outfname ? "<writing to pipe>" : outfname);
+	}
+}
+
+void
+line_ended(void)
+{
+	if (current_tcp) {
+		current_tcp->curcol = 0;
+		fflush(current_tcp->outf);
+	}
+	if (printing_tcp) {
+		printing_tcp->curcol = 0;
+		printing_tcp = NULL;
+	}
+}
+
+void
+printleader(struct tcb *tcp)
+{
+	/* If -ff, "previous tcb we printed" is always the same as current,
+	 * because we have per-tcb output files.
+	 */
+	if (followfork >= 2)
+		printing_tcp = tcp;
+
+	if (printing_tcp) {
+		current_tcp = printing_tcp;
+		if (printing_tcp->curcol != 0 && (followfork < 2 || printing_tcp == tcp)) {
+			/*
+			 * case 1: we have a shared log (i.e. not -ff), and last line
+			 * wasn't finished (same or different tcb, doesn't matter).
+			 * case 2: split log, we are the same tcb, but our last line
+			 * didn't finish ("SIGKILL nuked us after syscall entry" etc).
+			 */
+			tprints(" <unfinished ...>\n");
+			printing_tcp->curcol = 0;
 		}
 	}
-	curcol = 0;
-	if ((followfork == 1 || pflag_seen > 1) && outfname)
+
+	printing_tcp = tcp;
+	current_tcp = tcp;
+	current_tcp->curcol = 0;
+
+	if (print_pid_pfx)
 		tprintf("%-5d ", tcp->pid);
 	else if (nprocs > 1 && !outfname)
 		tprintf("[pid %5u] ", tcp->pid);
+
 	if (tflag) {
 		char str[sizeof("HH:MM:SS")];
 		struct timeval tv, dtv;
@@ -2821,37 +614,1622 @@
 }
 
 void
-tabto(col)
-int col;
+tabto(void)
 {
-	if (curcol < col)
-		tprintf("%*s", col - curcol, "");
+	if (current_tcp->curcol < acolumn)
+		tprints(acolumn_spaces + current_tcp->curcol);
 }
 
-void
-printtrailer(void)
+/* Should be only called directly *after successful attach* to a tracee.
+ * Otherwise, "strace -oFILE -ff -p<nonexistant_pid>"
+ * may create bogus empty FILE.<nonexistant_pid>, and then die.
+ */
+static void
+newoutf(struct tcb *tcp)
 {
-	tprintf("\n");
-	tcp_last = NULL;
+	tcp->outf = shared_log; /* if not -ff mode, the same file is for all */
+	if (followfork >= 2) {
+		char name[520 + sizeof(int) * 3];
+		sprintf(name, "%.512s.%u", outfname, tcp->pid);
+		tcp->outf = strace_fopen(name);
+	}
 }
 
-#ifdef HAVE_MP_PROCFS
-
-int
-mp_ioctl(int fd, int cmd, void *arg, int size)
+static void
+expand_tcbtab(void)
 {
-	struct iovec iov[2];
-	int n = 1;
+	/* Allocate some more TCBs and expand the table.
+	   We don't want to relocate the TCBs because our
+	   callers have pointers and it would be a pain.
+	   So tcbtab is a table of pointers.  Since we never
+	   free the TCBs, we allocate a single chunk of many.  */
+	int i = tcbtabsize;
+	struct tcb *newtcbs = calloc(tcbtabsize, sizeof(newtcbs[0]));
+	struct tcb **newtab = realloc(tcbtab, tcbtabsize * 2 * sizeof(tcbtab[0]));
+	if (!newtab || !newtcbs)
+		die_out_of_memory();
+	tcbtabsize *= 2;
+	tcbtab = newtab;
+	while (i < tcbtabsize)
+		tcbtab[i++] = newtcbs++;
+}
 
-	iov[0].iov_base = &cmd;
-	iov[0].iov_len = sizeof cmd;
-	if (arg) {
-		++n;
-		iov[1].iov_base = arg;
-		iov[1].iov_len = size;
+static struct tcb *
+alloctcb(int pid)
+{
+	int i;
+	struct tcb *tcp;
+
+	if (nprocs == tcbtabsize)
+		expand_tcbtab();
+
+	for (i = 0; i < tcbtabsize; i++) {
+		tcp = tcbtab[i];
+		if ((tcp->flags & TCB_INUSE) == 0) {
+			memset(tcp, 0, sizeof(*tcp));
+			tcp->pid = pid;
+			tcp->flags = TCB_INUSE;
+#if SUPPORTED_PERSONALITIES > 1
+			tcp->currpers = current_personality;
+#endif
+			nprocs++;
+			if (debug_flag)
+				fprintf(stderr, "new tcb for pid %d, active tcbs:%d\n", tcp->pid, nprocs);
+			return tcp;
+		}
+	}
+	error_msg_and_die("bug in alloctcb");
+}
+
+static void
+droptcb(struct tcb *tcp)
+{
+	if (tcp->pid == 0)
+		return;
+
+	nprocs--;
+	if (debug_flag)
+		fprintf(stderr, "dropped tcb for pid %d, %d remain\n", tcp->pid, nprocs);
+
+	if (tcp->outf) {
+		if (followfork >= 2) {
+			if (tcp->curcol != 0)
+				fprintf(tcp->outf, " <detached ...>\n");
+			fclose(tcp->outf);
+		} else {
+			if (printing_tcp == tcp && tcp->curcol != 0)
+				fprintf(tcp->outf, " <detached ...>\n");
+			fflush(tcp->outf);
+		}
 	}
 
-	return writev(fd, iov, n);
+	if (current_tcp == tcp)
+		current_tcp = NULL;
+	if (printing_tcp == tcp)
+		printing_tcp = NULL;
+
+	memset(tcp, 0, sizeof(*tcp));
 }
 
+/* detach traced process; continue with sig
+ * Never call DETACH twice on the same process as both unattached and
+ * attached-unstopped processes give the same ESRCH.  For unattached process we
+ * would SIGSTOP it and wait for its SIGSTOP notification forever.
+ */
+static int
+detach(struct tcb *tcp)
+{
+	int error;
+	int status, sigstop_expected;
+
+	if (tcp->flags & TCB_BPTSET)
+		clearbpt(tcp);
+
+	/*
+	 * Linux wrongly insists the child be stopped
+	 * before detaching.  Arghh.  We go through hoops
+	 * to make a clean break of things.
+	 */
+#if defined(SPARC)
+#undef PTRACE_DETACH
+#define PTRACE_DETACH PTRACE_SUNDETACH
 #endif
+
+	error = 0;
+	sigstop_expected = 0;
+	if (tcp->flags & TCB_ATTACHED) {
+		/*
+		 * We attached but possibly didn't see the expected SIGSTOP.
+		 * We must catch exactly one as otherwise the detached process
+		 * would be left stopped (process state T).
+		 */
+		sigstop_expected = (tcp->flags & TCB_IGNORE_ONE_SIGSTOP);
+		error = ptrace(PTRACE_DETACH, tcp->pid, (char *) 1, 0);
+		if (error == 0) {
+			/* On a clear day, you can see forever. */
+		}
+		else if (errno != ESRCH) {
+			/* Shouldn't happen. */
+			perror("detach: ptrace(PTRACE_DETACH, ...)");
+		}
+		else if (my_tkill(tcp->pid, 0) < 0) {
+			if (errno != ESRCH)
+				perror("detach: checking sanity");
+		}
+		else if (!sigstop_expected && my_tkill(tcp->pid, SIGSTOP) < 0) {
+			if (errno != ESRCH)
+				perror("detach: stopping child");
+		}
+		else
+			sigstop_expected = 1;
+	}
+
+	if (sigstop_expected) {
+		for (;;) {
+#ifdef __WALL
+			if (waitpid(tcp->pid, &status, __WALL) < 0) {
+				if (errno == ECHILD) /* Already gone.  */
+					break;
+				if (errno != EINVAL) {
+					perror("detach: waiting");
+					break;
+				}
+#endif /* __WALL */
+				/* No __WALL here.  */
+				if (waitpid(tcp->pid, &status, 0) < 0) {
+					if (errno != ECHILD) {
+						perror("detach: waiting");
+						break;
+					}
+#ifdef __WCLONE
+					/* If no processes, try clones.  */
+					if (waitpid(tcp->pid, &status, __WCLONE) < 0) {
+						if (errno != ECHILD)
+							perror("detach: waiting");
+						break;
+					}
+#endif /* __WCLONE */
+				}
+#ifdef __WALL
+			}
+#endif
+			if (!WIFSTOPPED(status)) {
+				/* Au revoir, mon ami. */
+				break;
+			}
+			if (WSTOPSIG(status) == SIGSTOP) {
+				ptrace_restart(PTRACE_DETACH, tcp, 0);
+				break;
+			}
+			error = ptrace_restart(PTRACE_CONT, tcp,
+					WSTOPSIG(status) == syscall_trap_sig ? 0
+					: WSTOPSIG(status));
+			if (error < 0)
+				break;
+		}
+	}
+
+	if (!qflag && (tcp->flags & TCB_ATTACHED))
+		fprintf(stderr, "Process %u detached\n", tcp->pid);
+
+	droptcb(tcp);
+
+	return error;
+}
+
+static void
+process_opt_p_list(char *opt)
+{
+	while (*opt) {
+		/*
+		 * We accept -p PID,PID; -p "`pidof PROG`"; -p "`pgrep PROG`".
+		 * pidof uses space as delim, pgrep uses newline. :(
+		 */
+		int pid;
+		char *delim = opt + strcspn(opt, ", \n\t");
+		char c = *delim;
+
+		*delim = '\0';
+		pid = string_to_uint(opt);
+		if (pid <= 0) {
+			error_msg_and_die("Invalid process id: '%s'", opt);
+		}
+		if (pid == strace_tracer_pid) {
+			error_msg_and_die("I'm sorry, I can't let you do that, Dave.");
+		}
+		*delim = c;
+		alloctcb(pid);
+		if (c == '\0')
+			break;
+		opt = delim + 1;
+	}
+}
+
+static void
+startup_attach(void)
+{
+	int tcbi;
+	struct tcb *tcp;
+
+	/*
+	 * Block user interruptions as we would leave the traced
+	 * process stopped (process state T) if we would terminate in
+	 * between PTRACE_ATTACH and wait4() on SIGSTOP.
+	 * We rely on cleanup() from this point on.
+	 */
+	if (interactive)
+		sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+
+	if (daemonized_tracer) {
+		pid_t pid = fork();
+		if (pid < 0) {
+			perror_msg_and_die("fork");
+		}
+		if (pid) { /* parent */
+			/*
+			 * Wait for grandchild to attach to straced process
+			 * (grandparent). Grandchild SIGKILLs us after it attached.
+			 * Grandparent's wait() is unblocked by our death,
+			 * it proceeds to exec the straced program.
+			 */
+			pause();
+			_exit(0); /* paranoia */
+		}
+		/* grandchild */
+		/* We will be the tracer process. Remember our new pid: */
+		strace_tracer_pid = getpid();
+	}
+
+	for (tcbi = 0; tcbi < tcbtabsize; tcbi++) {
+		tcp = tcbtab[tcbi];
+
+		if (!(tcp->flags & TCB_INUSE))
+			continue;
+
+		/* Is this a process we should attach to, but not yet attached? */
+		if (tcp->flags & TCB_ATTACHED)
+			continue; /* no, we already attached it */
+
+		if (followfork && !daemonized_tracer) {
+			char procdir[sizeof("/proc/%d/task") + sizeof(int) * 3];
+			DIR *dir;
+
+			sprintf(procdir, "/proc/%d/task", tcp->pid);
+			dir = opendir(procdir);
+			if (dir != NULL) {
+				unsigned int ntid = 0, nerr = 0;
+				struct dirent *de;
+
+				while ((de = readdir(dir)) != NULL) {
+					struct tcb *cur_tcp;
+					int tid;
+
+					if (de->d_fileno == 0)
+						continue;
+					/* we trust /proc filesystem */
+					tid = atoi(de->d_name);
+					if (tid <= 0)
+						continue;
+					++ntid;
+					if (ptrace_attach_or_seize(tid) < 0) {
+						++nerr;
+						if (debug_flag)
+							fprintf(stderr, "attach to pid %d failed\n", tid);
+						continue;
+					}
+					if (debug_flag)
+						fprintf(stderr, "attach to pid %d succeeded\n", tid);
+					cur_tcp = tcp;
+					if (tid != tcp->pid)
+						cur_tcp = alloctcb(tid);
+					cur_tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop;
+					newoutf(cur_tcp);
+				}
+				closedir(dir);
+				if (interactive) {
+					sigprocmask(SIG_SETMASK, &empty_set, NULL);
+					if (interrupted)
+						goto ret;
+					sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+				}
+				ntid -= nerr;
+				if (ntid == 0) {
+					perror("attach: ptrace(PTRACE_ATTACH, ...)");
+					droptcb(tcp);
+					continue;
+				}
+				if (!qflag) {
+					fprintf(stderr, ntid > 1
+? "Process %u attached with %u threads\n"
+: "Process %u attached\n",
+						tcp->pid, ntid);
+				}
+				if (!(tcp->flags & TCB_ATTACHED)) {
+					/* -p PID, we failed to attach to PID itself
+					 * but did attach to some of its sibling threads.
+					 * Drop PID's tcp.
+					 */
+					droptcb(tcp);
+				}
+				continue;
+			} /* if (opendir worked) */
+		} /* if (-f) */
+		if (ptrace_attach_or_seize(tcp->pid) < 0) {
+			perror("attach: ptrace(PTRACE_ATTACH, ...)");
+			droptcb(tcp);
+			continue;
+		}
+		tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop;
+		newoutf(tcp);
+		if (debug_flag)
+			fprintf(stderr, "attach to pid %d (main) succeeded\n", tcp->pid);
+
+		if (daemonized_tracer) {
+			/*
+			 * Make parent go away.
+			 * Also makes grandparent's wait() unblock.
+			 */
+			kill(getppid(), SIGKILL);
+		}
+
+		if (!qflag)
+			fprintf(stderr,
+				"Process %u attached\n",
+				tcp->pid);
+	} /* for each tcbtab[] */
+
+ ret:
+	if (interactive)
+		sigprocmask(SIG_SETMASK, &empty_set, NULL);
+}
+
+static void
+startup_child(char **argv)
+{
+	struct stat statbuf;
+	const char *filename;
+	char pathname[MAXPATHLEN];
+	int pid = 0;
+	struct tcb *tcp;
+
+	filename = argv[0];
+	if (strchr(filename, '/')) {
+		if (strlen(filename) > sizeof pathname - 1) {
+			errno = ENAMETOOLONG;
+			perror_msg_and_die("exec");
+		}
+		strcpy(pathname, filename);
+	}
+#ifdef USE_DEBUGGING_EXEC
+	/*
+	 * Debuggers customarily check the current directory
+	 * first regardless of the path but doing that gives
+	 * security geeks a panic attack.
+	 */
+	else if (stat(filename, &statbuf) == 0)
+		strcpy(pathname, filename);
+#endif /* USE_DEBUGGING_EXEC */
+	else {
+		const char *path;
+		int m, n, len;
+
+		for (path = getenv("PATH"); path && *path; path += m) {
+			const char *colon = strchr(path, ':');
+			if (colon) {
+				n = colon - path;
+				m = n + 1;
+			}
+			else
+				m = n = strlen(path);
+			if (n == 0) {
+				if (!getcwd(pathname, MAXPATHLEN))
+					continue;
+				len = strlen(pathname);
+			}
+			else if (n > sizeof pathname - 1)
+				continue;
+			else {
+				strncpy(pathname, path, n);
+				len = n;
+			}
+			if (len && pathname[len - 1] != '/')
+				pathname[len++] = '/';
+			strcpy(pathname + len, filename);
+			if (stat(pathname, &statbuf) == 0 &&
+			    /* Accept only regular files
+			       with some execute bits set.
+			       XXX not perfect, might still fail */
+			    S_ISREG(statbuf.st_mode) &&
+			    (statbuf.st_mode & 0111))
+				break;
+		}
+	}
+	if (stat(pathname, &statbuf) < 0) {
+		perror_msg_and_die("Can't stat '%s'", filename);
+	}
+	strace_child = pid = fork();
+	if (pid < 0) {
+		perror_msg_and_die("fork");
+	}
+	if ((pid != 0 && daemonized_tracer) /* -D: parent to become a traced process */
+	 || (pid == 0 && !daemonized_tracer) /* not -D: child to become a traced process */
+	) {
+		pid = getpid();
+		if (shared_log != stderr)
+			close(fileno(shared_log));
+		if (!daemonized_tracer && !use_seize) {
+			if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0) {
+				perror_msg_and_die("ptrace(PTRACE_TRACEME, ...)");
+			}
+		}
+
+		if (username != NULL) {
+			uid_t run_euid = run_uid;
+			gid_t run_egid = run_gid;
+
+			if (statbuf.st_mode & S_ISUID)
+				run_euid = statbuf.st_uid;
+			if (statbuf.st_mode & S_ISGID)
+				run_egid = statbuf.st_gid;
+			/*
+			 * It is important to set groups before we
+			 * lose privileges on setuid.
+			 */
+			if (initgroups(username, run_gid) < 0) {
+				perror_msg_and_die("initgroups");
+			}
+			if (setregid(run_gid, run_egid) < 0) {
+				perror_msg_and_die("setregid");
+			}
+			if (setreuid(run_uid, run_euid) < 0) {
+				perror_msg_and_die("setreuid");
+			}
+		}
+		else if (geteuid() != 0)
+			setreuid(run_uid, run_uid);
+
+		if (!daemonized_tracer) {
+			/*
+			 * Induce a ptrace stop. Tracer (our parent)
+			 * will resume us with PTRACE_SYSCALL and display
+			 * the immediately following execve syscall.
+			 * Can't do this on NOMMU systems, we are after
+			 * vfork: parent is blocked, stopping would deadlock.
+			 */
+			if (!strace_vforked)
+				kill(pid, SIGSTOP);
+		} else {
+			alarm(3);
+			/* we depend on SIGCHLD set to SIG_DFL by init code */
+			/* if it happens to be SIG_IGN'ed, wait won't block */
+			wait(NULL);
+			alarm(0);
+		}
+
+		execv(pathname, argv);
+		perror_msg_and_die("exec");
+	}
+
+	/* We are the tracer */
+
+	if (!daemonized_tracer) {
+		if (!use_seize) {
+			/* child did PTRACE_TRACEME, nothing to do in parent */
+		} else {
+			if (!strace_vforked) {
+				/* Wait until child stopped itself */
+				int status;
+				while (waitpid(pid, &status, WSTOPPED) < 0) {
+					if (errno == EINTR)
+						continue;
+					perror_msg_and_die("waitpid");
+				}
+				if (!WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) {
+					kill_save_errno(pid, SIGKILL);
+					perror_msg_and_die("Unexpected wait status %x", status);
+				}
+			}
+			/* Else: vforked case, we have no way to sync.
+			 * Just attach to it as soon as possible.
+			 * This means that we may miss a few first syscalls...
+			 */
+
+			if (ptrace_attach_or_seize(pid)) {
+				kill_save_errno(pid, SIGKILL);
+				perror_msg_and_die("Can't attach to %d", pid);
+			}
+			if (!strace_vforked)
+				kill(pid, SIGCONT);
+		}
+		tcp = alloctcb(pid);
+		if (!strace_vforked)
+			tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP | post_attach_sigstop;
+		else
+			tcp->flags |= TCB_ATTACHED | TCB_STRACE_CHILD | TCB_STARTUP;
+		newoutf(tcp);
+	}
+	else {
+		/* With -D, *we* are child here, IOW: different pid. Fetch it: */
+		strace_tracer_pid = getpid();
+		/* The tracee is our parent: */
+		pid = getppid();
+		alloctcb(pid);
+		/* attaching will be done later, by startup_attach */
+		/* note: we don't do newoutf(tcp) here either! */
+	}
+}
+
+/*
+ * Test whether the kernel support PTRACE_O_TRACECLONE et al options.
+ * First fork a new child, call ptrace with PTRACE_SETOPTIONS on it,
+ * and then see which options are supported by the kernel.
+ */
+static void
+test_ptrace_setoptions_followfork(void)
+{
+	int pid, expected_grandchild = 0, found_grandchild = 0;
+	const unsigned int test_options = PTRACE_O_TRACECLONE |
+					  PTRACE_O_TRACEFORK |
+					  PTRACE_O_TRACEVFORK;
+
+	pid = fork();
+	if (pid < 0)
+		perror_msg_and_die("fork");
+	if (pid == 0) {
+		pid = getpid();
+		if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0)
+			perror_msg_and_die("%s: PTRACE_TRACEME doesn't work",
+					   __func__);
+		kill_save_errno(pid, SIGSTOP);
+		if (fork() < 0)
+			perror_msg_and_die("fork");
+		_exit(0);
+	}
+
+	while (1) {
+		int status, tracee_pid;
+
+		errno = 0;
+		tracee_pid = wait(&status);
+		if (tracee_pid <= 0) {
+			if (errno == EINTR)
+				continue;
+			if (errno == ECHILD)
+				break;
+			kill_save_errno(pid, SIGKILL);
+			perror_msg_and_die("%s: unexpected wait result %d",
+					   __func__, tracee_pid);
+		}
+		if (WIFEXITED(status)) {
+			if (WEXITSTATUS(status)) {
+				if (tracee_pid != pid)
+					kill_save_errno(pid, SIGKILL);
+				error_msg_and_die("%s: unexpected exit status %u",
+						  __func__, WEXITSTATUS(status));
+			}
+			continue;
+		}
+		if (WIFSIGNALED(status)) {
+			if (tracee_pid != pid)
+				kill_save_errno(pid, SIGKILL);
+			error_msg_and_die("%s: unexpected signal %u",
+					  __func__, WTERMSIG(status));
+		}
+		if (!WIFSTOPPED(status)) {
+			if (tracee_pid != pid)
+				kill_save_errno(tracee_pid, SIGKILL);
+			kill_save_errno(pid, SIGKILL);
+			error_msg_and_die("%s: unexpected wait status %x",
+					  __func__, status);
+		}
+		if (tracee_pid != pid) {
+			found_grandchild = tracee_pid;
+			if (ptrace(PTRACE_CONT, tracee_pid, 0, 0) < 0) {
+				kill_save_errno(tracee_pid, SIGKILL);
+				kill_save_errno(pid, SIGKILL);
+				perror_msg_and_die("PTRACE_CONT doesn't work");
+			}
+			continue;
+		}
+		switch (WSTOPSIG(status)) {
+		case SIGSTOP:
+			if (ptrace(PTRACE_SETOPTIONS, pid, 0, test_options) < 0
+			    && errno != EINVAL && errno != EIO)
+				perror_msg("PTRACE_SETOPTIONS");
+			break;
+		case SIGTRAP:
+			if (status >> 16 == PTRACE_EVENT_FORK) {
+				long msg = 0;
+
+				if (ptrace(PTRACE_GETEVENTMSG, pid,
+					   NULL, (long) &msg) == 0)
+					expected_grandchild = msg;
+			}
+			break;
+		}
+		if (ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) {
+			kill_save_errno(pid, SIGKILL);
+			perror_msg_and_die("PTRACE_SYSCALL doesn't work");
+		}
+	}
+	if (expected_grandchild && expected_grandchild == found_grandchild) {
+		ptrace_setoptions |= test_options;
+		if (debug_flag)
+			fprintf(stderr, "ptrace_setoptions = %#x\n",
+				ptrace_setoptions);
+		return;
+	}
+	error_msg("Test for PTRACE_O_TRACECLONE failed, "
+		  "giving up using this feature.");
+}
+
+/*
+ * Test whether the kernel support PTRACE_O_TRACESYSGOOD.
+ * First fork a new child, call ptrace(PTRACE_SETOPTIONS) on it,
+ * and then see whether it will stop with (SIGTRAP | 0x80).
+ *
+ * Use of this option enables correct handling of user-generated SIGTRAPs,
+ * and SIGTRAPs generated by special instructions such as int3 on x86:
+ * _start:	.globl	_start
+ *		int3
+ *		movl	$42, %ebx
+ *		movl	$1, %eax
+ *		int	$0x80
+ * (compile with: "gcc -nostartfiles -nostdlib -o int3 int3.S")
+ */
+static void
+test_ptrace_setoptions_for_all(void)
+{
+	const unsigned int test_options = PTRACE_O_TRACESYSGOOD |
+					  PTRACE_O_TRACEEXEC;
+	int pid;
+	int it_worked = 0;
+
+	/* this fork test doesn't work on no-mmu systems */
+	if (strace_vforked)
+		return;
+
+	pid = fork();
+	if (pid < 0)
+		perror_msg_and_die("fork");
+
+	if (pid == 0) {
+		pid = getpid();
+		if (ptrace(PTRACE_TRACEME, 0L, 0L, 0L) < 0)
+			/* Note: exits with exitcode 1 */
+			perror_msg_and_die("%s: PTRACE_TRACEME doesn't work",
+					   __func__);
+		kill(pid, SIGSTOP);
+		_exit(0); /* parent should see entry into this syscall */
+	}
+
+	while (1) {
+		int status, tracee_pid;
+
+		errno = 0;
+		tracee_pid = wait(&status);
+		if (tracee_pid <= 0) {
+			if (errno == EINTR)
+				continue;
+			kill_save_errno(pid, SIGKILL);
+			perror_msg_and_die("%s: unexpected wait result %d",
+					   __func__, tracee_pid);
+		}
+		if (WIFEXITED(status)) {
+			if (WEXITSTATUS(status) == 0)
+				break;
+			error_msg_and_die("%s: unexpected exit status %u",
+					  __func__, WEXITSTATUS(status));
+		}
+		if (WIFSIGNALED(status)) {
+			error_msg_and_die("%s: unexpected signal %u",
+					  __func__, WTERMSIG(status));
+		}
+		if (!WIFSTOPPED(status)) {
+			kill(pid, SIGKILL);
+			error_msg_and_die("%s: unexpected wait status %x",
+					  __func__, status);
+		}
+		if (WSTOPSIG(status) == SIGSTOP) {
+			/*
+			 * We don't check "options aren't accepted" error.
+			 * If it happens, we'll never get (SIGTRAP | 0x80),
+			 * and thus will decide to not use the option.
+			 * IOW: the outcome of the test will be correct.
+			 */
+			if (ptrace(PTRACE_SETOPTIONS, pid, 0L, test_options) < 0
+			    && errno != EINVAL && errno != EIO)
+				perror_msg("PTRACE_SETOPTIONS");
+		}
+		if (WSTOPSIG(status) == (SIGTRAP | 0x80)) {
+			it_worked = 1;
+		}
+		if (ptrace(PTRACE_SYSCALL, pid, 0L, 0L) < 0) {
+			kill_save_errno(pid, SIGKILL);
+			perror_msg_and_die("PTRACE_SYSCALL doesn't work");
+		}
+	}
+
+	if (it_worked) {
+		syscall_trap_sig = (SIGTRAP | 0x80);
+		ptrace_setoptions |= test_options;
+		if (debug_flag)
+			fprintf(stderr, "ptrace_setoptions = %#x\n",
+				ptrace_setoptions);
+		return;
+	}
+
+	error_msg("Test for PTRACE_O_TRACESYSGOOD failed, "
+		  "giving up using this feature.");
+}
+
+# ifdef USE_SEIZE
+static void
+test_ptrace_seize(void)
+{
+	int pid;
+
+	pid = fork();
+	if (pid < 0)
+		perror_msg_and_die("fork");
+
+	if (pid == 0) {
+		pause();
+		_exit(0);
+	}
+
+	/* PTRACE_SEIZE, unlike ATTACH, doesn't force tracee to trap.  After
+	 * attaching tracee continues to run unless a trap condition occurs.
+	 * PTRACE_SEIZE doesn't affect signal or group stop state.
+	 */
+	if (ptrace(PTRACE_SEIZE, pid, 0, PTRACE_SEIZE_DEVEL) == 0) {
+		post_attach_sigstop = 0; /* this sets use_seize to 1 */
+	} else if (debug_flag) {
+		fprintf(stderr, "PTRACE_SEIZE doesn't work\n");
+	}
+
+	kill(pid, SIGKILL);
+
+	while (1) {
+		int status, tracee_pid;
+
+		errno = 0;
+		tracee_pid = waitpid(pid, &status, 0);
+		if (tracee_pid <= 0) {
+			if (errno == EINTR)
+				continue;
+			perror_msg_and_die("%s: unexpected wait result %d",
+					 __func__, tracee_pid);
+		}
+		if (WIFSIGNALED(status)) {
+			return;
+		}
+		error_msg_and_die("%s: unexpected wait status %x",
+				__func__, status);
+	}
+}
+# else /* !USE_SEIZE */
+#  define test_ptrace_seize() ((void)0)
+# endif
+
+static unsigned
+get_os_release(void)
+{
+	unsigned rel;
+	const char *p;
+	struct utsname u;
+	if (uname(&u) < 0)
+		perror_msg_and_die("uname");
+	/* u.release has this form: "3.2.9[-some-garbage]" */
+	rel = 0;
+	p = u.release;
+	for (;;) {
+		if (!(*p >= '0' && *p <= '9'))
+			error_msg_and_die("Bad OS release string: '%s'", u.release);
+		/* Note: this open-codes KERNEL_VERSION(): */
+		rel = (rel << 8) | atoi(p);
+		if (rel >= KERNEL_VERSION(1,0,0))
+			break;
+		while (*p >= '0' && *p <= '9')
+			p++;
+		if (*p != '.')
+			error_msg_and_die("Bad OS release string: '%s'", u.release);
+		p++;
+	}
+	return rel;
+}
+
+/*
+ * Initialization part of main() was eating much stack (~0.5k),
+ * which was unused after init.
+ * We can reuse it if we move init code into a separate function.
+ *
+ * Don't want main() to inline us and defeat the reason
+ * we have a separate function.
+ */
+static void __attribute__ ((noinline))
+init(int argc, char *argv[])
+{
+	struct tcb *tcp;
+	int c, i;
+	int optF = 0;
+	struct sigaction sa;
+
+	progname = argv[0] ? argv[0] : "strace";
+
+	/* Make sure SIGCHLD has the default action so that waitpid
+	   definitely works without losing track of children.  The user
+	   should not have given us a bogus state to inherit, but he might
+	   have.  Arguably we should detect SIG_IGN here and pass it on
+	   to children, but probably noone really needs that.  */
+	signal(SIGCHLD, SIG_DFL);
+
+	strace_tracer_pid = getpid();
+
+	os_release = get_os_release();
+
+	/* Allocate the initial tcbtab.  */
+	tcbtabsize = argc;	/* Surely enough for all -p args.  */
+	tcbtab = calloc(tcbtabsize, sizeof(tcbtab[0]));
+	if (!tcbtab)
+		die_out_of_memory();
+	tcp = calloc(tcbtabsize, sizeof(*tcp));
+	if (!tcp)
+		die_out_of_memory();
+	for (c = 0; c < tcbtabsize; c++)
+		tcbtab[c] = tcp++;
+
+	shared_log = stderr;
+	set_sortby(DEFAULT_SORTBY);
+	set_personality(DEFAULT_PERSONALITY);
+	qualify("trace=all");
+	qualify("abbrev=all");
+	qualify("verbose=all");
+	qualify("signal=all");
+	while ((c = getopt(argc, argv,
+		"+bcCdfFhiqrtTvVxyz"
+		"D"
+		"a:e:o:O:p:s:S:u:E:P:I:")) != EOF) {
+		switch (c) {
+		case 'b':
+			detach_on_execve = 1;
+			break;
+		case 'c':
+			if (cflag == CFLAG_BOTH) {
+				error_msg_and_die("-c and -C are mutually exclusive");
+			}
+			cflag = CFLAG_ONLY_STATS;
+			break;
+		case 'C':
+			if (cflag == CFLAG_ONLY_STATS) {
+				error_msg_and_die("-c and -C are mutually exclusive");
+			}
+			cflag = CFLAG_BOTH;
+			break;
+		case 'd':
+			debug_flag = 1;
+			break;
+		case 'D':
+			daemonized_tracer = 1;
+			break;
+		case 'F':
+			optF = 1;
+			break;
+		case 'f':
+			followfork++;
+			break;
+		case 'h':
+			usage(stdout, 0);
+			break;
+		case 'i':
+			iflag = 1;
+			break;
+		case 'q':
+			qflag = 1;
+			break;
+		case 'r':
+			rflag = 1;
+			/* fall through to tflag++ */
+		case 't':
+			tflag++;
+			break;
+		case 'T':
+			Tflag = 1;
+			break;
+		case 'x':
+			xflag++;
+			break;
+		case 'y':
+			show_fd_path = 1;
+			break;
+		case 'v':
+			qualify("abbrev=none");
+			break;
+		case 'V':
+			printf("%s -- version %s\n", PACKAGE_NAME, VERSION);
+			exit(0);
+			break;
+		case 'z':
+			not_failing_only = 1;
+			break;
+		case 'a':
+			acolumn = string_to_uint(optarg);
+			if (acolumn < 0)
+				error_opt_arg(c, optarg);
+			break;
+		case 'e':
+			qualify(optarg);
+			break;
+		case 'o':
+			outfname = strdup(optarg);
+			break;
+		case 'O':
+			i = string_to_uint(optarg);
+			if (i < 0)
+				error_opt_arg(c, optarg);
+			set_overhead(i);
+			break;
+		case 'p':
+			process_opt_p_list(optarg);
+			break;
+		case 'P':
+			tracing_paths = 1;
+			if (pathtrace_select(optarg)) {
+				error_msg_and_die("Failed to select path '%s'", optarg);
+			}
+			break;
+		case 's':
+			i = string_to_uint(optarg);
+			if (i < 0)
+				error_opt_arg(c, optarg);
+			max_strlen = i;
+			break;
+		case 'S':
+			set_sortby(optarg);
+			break;
+		case 'u':
+			username = strdup(optarg);
+			break;
+		case 'E':
+			if (putenv(optarg) < 0)
+				die_out_of_memory();
+			break;
+		case 'I':
+			opt_intr = string_to_uint(optarg);
+			if (opt_intr <= 0 || opt_intr >= NUM_INTR_OPTS)
+				error_opt_arg(c, optarg);
+			break;
+		default:
+			usage(stderr, 1);
+			break;
+		}
+	}
+	argv += optind;
+	/* argc -= optind; - no need, argc is not used below */
+
+	acolumn_spaces = malloc(acolumn + 1);
+	if (!acolumn_spaces)
+		die_out_of_memory();
+	memset(acolumn_spaces, ' ', acolumn);
+	acolumn_spaces[acolumn] = '\0';
+
+	/* Must have PROG [ARGS], or -p PID. Not both. */
+	if (!argv[0] == !nprocs)
+		usage(stderr, 1);
+
+	if (nprocs != 0 && daemonized_tracer) {
+		error_msg_and_die("-D and -p are mutually exclusive");
+	}
+
+	if (!followfork)
+		followfork = optF;
+
+	if (followfork >= 2 && cflag) {
+		error_msg_and_die("(-c or -C) and -ff are mutually exclusive");
+	}
+
+	/* See if they want to run as another user. */
+	if (username != NULL) {
+		struct passwd *pent;
+
+		if (getuid() != 0 || geteuid() != 0) {
+			error_msg_and_die("You must be root to use the -u option");
+		}
+		pent = getpwnam(username);
+		if (pent == NULL) {
+			error_msg_and_die("Cannot find user '%s'", username);
+		}
+		run_uid = pent->pw_uid;
+		run_gid = pent->pw_gid;
+	}
+	else {
+		run_uid = getuid();
+		run_gid = getgid();
+	}
+
+	if (followfork)
+		test_ptrace_setoptions_followfork();
+	test_ptrace_setoptions_for_all();
+	test_ptrace_seize();
+
+	/* Check if they want to redirect the output. */
+	if (outfname) {
+		/* See if they want to pipe the output. */
+		if (outfname[0] == '|' || outfname[0] == '!') {
+			/*
+			 * We can't do the <outfname>.PID funny business
+			 * when using popen, so prohibit it.
+			 */
+			if (followfork >= 2)
+				error_msg_and_die("Piping the output and -ff are mutually exclusive");
+			shared_log = strace_popen(outfname + 1);
+		}
+		else if (followfork < 2)
+			shared_log = strace_fopen(outfname);
+	} else {
+		/* -ff without -o FILE is the same as single -f */
+		if (followfork >= 2)
+			followfork = 1;
+	}
+
+	if (!outfname || outfname[0] == '|' || outfname[0] == '!') {
+		char *buf = malloc(BUFSIZ);
+		if (!buf)
+			die_out_of_memory();
+		setvbuf(shared_log, buf, _IOLBF, BUFSIZ);
+	}
+	if (outfname && argv[0]) {
+		if (!opt_intr)
+			opt_intr = INTR_NEVER;
+		qflag = 1;
+	}
+	if (!opt_intr)
+		opt_intr = INTR_WHILE_WAIT;
+
+	/* argv[0]	-pPID	-oFILE	Default interactive setting
+	 * yes		0	0	INTR_WHILE_WAIT
+	 * no		1	0	INTR_WHILE_WAIT
+	 * yes		0	1	INTR_NEVER
+	 * no		1	1	INTR_WHILE_WAIT
+	 */
+
+	/* STARTUP_CHILD must be called before the signal handlers get
+	   installed below as they are inherited into the spawned process.
+	   Also we do not need to be protected by them as during interruption
+	   in the STARTUP_CHILD mode we kill the spawned process anyway.  */
+	if (argv[0]) {
+		skip_startup_execve = 1;
+		startup_child(argv);
+	}
+
+	sigemptyset(&empty_set);
+	sigemptyset(&blocked_set);
+	sa.sa_handler = SIG_IGN;
+	sigemptyset(&sa.sa_mask);
+	sa.sa_flags = 0;
+	sigaction(SIGTTOU, &sa, NULL); /* SIG_IGN */
+	sigaction(SIGTTIN, &sa, NULL); /* SIG_IGN */
+	if (opt_intr != INTR_ANYWHERE) {
+		if (opt_intr == INTR_BLOCK_TSTP_TOO)
+			sigaction(SIGTSTP, &sa, NULL); /* SIG_IGN */
+		/*
+		 * In interactive mode (if no -o OUTFILE, or -p PID is used),
+		 * fatal signals are blocked while syscall stop is processed,
+		 * and acted on in between, when waiting for new syscall stops.
+		 * In non-interactive mode, signals are ignored.
+		 */
+		if (opt_intr == INTR_WHILE_WAIT) {
+			sigaddset(&blocked_set, SIGHUP);
+			sigaddset(&blocked_set, SIGINT);
+			sigaddset(&blocked_set, SIGQUIT);
+			sigaddset(&blocked_set, SIGPIPE);
+			sigaddset(&blocked_set, SIGTERM);
+			sa.sa_handler = interrupt;
+		}
+		/* SIG_IGN, or set handler for these */
+		sigaction(SIGHUP, &sa, NULL);
+		sigaction(SIGINT, &sa, NULL);
+		sigaction(SIGQUIT, &sa, NULL);
+		sigaction(SIGPIPE, &sa, NULL);
+		sigaction(SIGTERM, &sa, NULL);
+	}
+	if (nprocs != 0 || daemonized_tracer)
+		startup_attach();
+
+	/* Do we want pids printed in our -o OUTFILE?
+	 * -ff: no (every pid has its own file); or
+	 * -f: yes (there can be more pids in the future); or
+	 * -p PID1,PID2: yes (there are already more than one pid)
+	 */
+	print_pid_pfx = (outfname && followfork < 2 && (followfork == 1 || nprocs > 1));
+}
+
+static struct tcb *
+pid2tcb(int pid)
+{
+	int i;
+
+	if (pid <= 0)
+		return NULL;
+
+	for (i = 0; i < tcbtabsize; i++) {
+		struct tcb *tcp = tcbtab[i];
+		if (tcp->pid == pid && (tcp->flags & TCB_INUSE))
+			return tcp;
+	}
+
+	return NULL;
+}
+
+static void
+cleanup(void)
+{
+	int i;
+	struct tcb *tcp;
+	int fatal_sig;
+
+	/* 'interrupted' is a volatile object, fetch it only once */
+	fatal_sig = interrupted;
+	if (!fatal_sig)
+		fatal_sig = SIGTERM;
+
+	for (i = 0; i < tcbtabsize; i++) {
+		tcp = tcbtab[i];
+		if (!(tcp->flags & TCB_INUSE))
+			continue;
+		if (debug_flag)
+			fprintf(stderr,
+				"cleanup: looking at pid %u\n", tcp->pid);
+		if (tcp->flags & TCB_STRACE_CHILD) {
+			kill(tcp->pid, SIGCONT);
+			kill(tcp->pid, fatal_sig);
+		}
+		detach(tcp);
+	}
+	if (cflag)
+		call_summary(shared_log);
+}
+
+static void
+interrupt(int sig)
+{
+	interrupted = sig;
+}
+
+static int
+trace(void)
+{
+	struct rusage ru;
+	struct rusage *rup = cflag ? &ru : NULL;
+# ifdef __WALL
+	static int wait4_options = __WALL;
+# endif
+
+	while (nprocs != 0) {
+		int pid;
+		int wait_errno;
+		int status, sig;
+		int stopped;
+		struct tcb *tcp;
+		unsigned event;
+
+		if (interrupted)
+			return 0;
+		if (interactive)
+			sigprocmask(SIG_SETMASK, &empty_set, NULL);
+# ifdef __WALL
+		pid = wait4(-1, &status, wait4_options, rup);
+		if (pid < 0 && (wait4_options & __WALL) && errno == EINVAL) {
+			/* this kernel does not support __WALL */
+			wait4_options &= ~__WALL;
+			pid = wait4(-1, &status, wait4_options, rup);
+		}
+		if (pid < 0 && !(wait4_options & __WALL) && errno == ECHILD) {
+			/* most likely a "cloned" process */
+			pid = wait4(-1, &status, __WCLONE, rup);
+			if (pid < 0) {
+				perror_msg("wait4(__WCLONE) failed");
+			}
+		}
+# else
+		pid = wait4(-1, &status, 0, rup);
+# endif /* __WALL */
+		wait_errno = errno;
+		if (interactive)
+			sigprocmask(SIG_BLOCK, &blocked_set, NULL);
+
+		if (pid < 0) {
+			switch (wait_errno) {
+			case EINTR:
+				continue;
+			case ECHILD:
+				/*
+				 * We would like to verify this case
+				 * but sometimes a race in Solbourne's
+				 * version of SunOS sometimes reports
+				 * ECHILD before sending us SIGCHILD.
+				 */
+				return 0;
+			default:
+				errno = wait_errno;
+				perror_msg("wait");
+				return -1;
+			}
+		}
+		if (pid == popen_pid) {
+			if (WIFEXITED(status) || WIFSIGNALED(status))
+				popen_pid = 0;
+			continue;
+		}
+
+		event = ((unsigned)status >> 16);
+		if (debug_flag) {
+			char buf[sizeof("WIFEXITED,exitcode=%u") + sizeof(int)*3 /*paranoia:*/ + 16];
+			char evbuf[sizeof(",PTRACE_EVENT_?? (%u)") + sizeof(int)*3 /*paranoia:*/ + 16];
+			strcpy(buf, "???");
+			if (WIFSIGNALED(status))
+#ifdef WCOREDUMP
+				sprintf(buf, "WIFSIGNALED,%ssig=%s",
+						WCOREDUMP(status) ? "core," : "",
+						signame(WTERMSIG(status)));
+#else
+				sprintf(buf, "WIFSIGNALED,sig=%s",
+						signame(WTERMSIG(status)));
+#endif
+			if (WIFEXITED(status))
+				sprintf(buf, "WIFEXITED,exitcode=%u", WEXITSTATUS(status));
+			if (WIFSTOPPED(status))
+				sprintf(buf, "WIFSTOPPED,sig=%s", signame(WSTOPSIG(status)));
+#ifdef WIFCONTINUED
+			if (WIFCONTINUED(status))
+				strcpy(buf, "WIFCONTINUED");
+#endif
+			evbuf[0] = '\0';
+			if (event != 0) {
+				static const char *const event_names[] = {
+					[PTRACE_EVENT_CLONE] = "CLONE",
+					[PTRACE_EVENT_FORK]  = "FORK",
+					[PTRACE_EVENT_VFORK] = "VFORK",
+					[PTRACE_EVENT_VFORK_DONE] = "VFORK_DONE",
+					[PTRACE_EVENT_EXEC]  = "EXEC",
+					[PTRACE_EVENT_EXIT]  = "EXIT",
+				};
+				const char *e;
+				if (event < ARRAY_SIZE(event_names))
+					e = event_names[event];
+				else {
+					sprintf(buf, "?? (%u)", event);
+					e = buf;
+				}
+				sprintf(evbuf, ",PTRACE_EVENT_%s", e);
+			}
+			fprintf(stderr, " [wait(0x%04x) = %u] %s%s\n", status, pid, buf, evbuf);
+		}
+
+		/* Look up 'pid' in our table. */
+		tcp = pid2tcb(pid);
+
+		if (!tcp) {
+			if (followfork) {
+				/* This is needed to go with the CLONE_PTRACE
+				   changes in process.c/util.c: we might see
+				   the child's initial trap before we see the
+				   parent return from the clone syscall.
+				   Leave the child suspended until the parent
+				   returns from its system call.  Only then
+				   will we have the association of parent and
+				   child so that we know how to do clearbpt
+				   in the child.  */
+				tcp = alloctcb(pid);
+				tcp->flags |= TCB_ATTACHED | TCB_STARTUP | post_attach_sigstop;
+				newoutf(tcp);
+				if (!qflag)
+					fprintf(stderr, "Process %d attached\n",
+						pid);
+			} else {
+				/* This can happen if a clone call used
+				   CLONE_PTRACE itself.  */
+				if (WIFSTOPPED(status))
+					ptrace(PTRACE_CONT, pid, (char *) 0, 0);
+				error_msg_and_die("Unknown pid: %u", pid);
+			}
+		}
+
+		/* Under Linux, execve changes pid to thread leader's pid,
+		 * and we see this changed pid on EVENT_EXEC and later,
+		 * execve sysexit. Leader "disappears" without exit
+		 * notification. Let user know that, drop leader's tcb,
+		 * and fix up pid in execve thread's tcb.
+		 * Effectively, execve thread's tcb replaces leader's tcb.
+		 *
+		 * BTW, leader is 'stuck undead' (doesn't report WIFEXITED
+		 * on exit syscall) in multithreaded programs exactly
+		 * in order to handle this case.
+		 *
+		 * PTRACE_GETEVENTMSG returns old pid starting from Linux 3.0.
+		 * On 2.6 and earlier, it can return garbage.
+		 */
+		if (event == PTRACE_EVENT_EXEC && os_release >= KERNEL_VERSION(3,0,0)) {
+			FILE *fp;
+			struct tcb *execve_thread;
+			long old_pid = 0;
+
+			if (ptrace(PTRACE_GETEVENTMSG, pid, NULL, (long) &old_pid) < 0)
+				goto dont_switch_tcbs;
+			if (old_pid <= 0 || old_pid == pid)
+				goto dont_switch_tcbs;
+			execve_thread = pid2tcb(old_pid);
+			/* It should be !NULL, but I feel paranoid */
+			if (!execve_thread)
+				goto dont_switch_tcbs;
+
+			if (execve_thread->curcol != 0) {
+				/*
+				 * One case we are here is -ff:
+				 * try "strace -oLOG -ff test/threaded_execve"
+				 */
+				fprintf(execve_thread->outf, " <pid changed to %d ...>\n", pid);
+				/*execve_thread->curcol = 0; - no need, see code below */
+			}
+			/* Swap output FILEs (needed for -ff) */
+			fp = execve_thread->outf;
+			execve_thread->outf = tcp->outf;
+			tcp->outf = fp;
+			/* And their column positions */
+			execve_thread->curcol = tcp->curcol;
+			tcp->curcol = 0;
+			/* Drop leader, but close execve'd thread outfile (if -ff) */
+			droptcb(tcp);
+			/* Switch to the thread, reusing leader's outfile and pid */
+			tcp = execve_thread;
+			tcp->pid = pid;
+			if (cflag != CFLAG_ONLY_STATS) {
+				printleader(tcp);
+				tprintf("+++ superseded by execve in pid %lu +++\n", old_pid);
+				line_ended();
+				tcp->flags |= TCB_REPRINT;
+			}
+		}
+ dont_switch_tcbs:
+
+		if (event == PTRACE_EVENT_EXEC && detach_on_execve) {
+			if (!skip_startup_execve)
+				detach(tcp);
+			/* This was initial execve for "strace PROG". Skip. */
+			skip_startup_execve = 0;
+		}
+
+		/* Set current output file */
+		current_tcp = tcp;
+
+		if (cflag) {
+			tv_sub(&tcp->dtime, &ru.ru_stime, &tcp->stime);
+			tcp->stime = ru.ru_stime;
+		}
+
+		if (WIFSIGNALED(status)) {
+			if (pid == strace_child)
+				exit_code = 0x100 | WTERMSIG(status);
+			if (cflag != CFLAG_ONLY_STATS
+			    && (qual_flags[WTERMSIG(status)] & QUAL_SIGNAL)) {
+				printleader(tcp);
+#ifdef WCOREDUMP
+				tprintf("+++ killed by %s %s+++\n",
+					signame(WTERMSIG(status)),
+					WCOREDUMP(status) ? "(core dumped) " : "");
+#else
+				tprintf("+++ killed by %s +++\n",
+					signame(WTERMSIG(status)));
+#endif
+				line_ended();
+			}
+			droptcb(tcp);
+			continue;
+		}
+		if (WIFEXITED(status)) {
+			if (pid == strace_child)
+				exit_code = WEXITSTATUS(status);
+			if (cflag != CFLAG_ONLY_STATS) {
+				printleader(tcp);
+				tprintf("+++ exited with %d +++\n", WEXITSTATUS(status));
+				line_ended();
+			}
+			droptcb(tcp);
+			continue;
+		}
+		if (!WIFSTOPPED(status)) {
+			fprintf(stderr, "PANIC: pid %u not stopped\n", pid);
+			droptcb(tcp);
+			continue;
+		}
+
+		/* Is this the very first time we see this tracee stopped? */
+		if (tcp->flags & TCB_STARTUP) {
+			if (debug_flag)
+				fprintf(stderr, "pid %d has TCB_STARTUP, initializing it\n", tcp->pid);
+			tcp->flags &= ~TCB_STARTUP;
+			if (tcp->flags & TCB_BPTSET) {
+				/*
+				 * One example is a breakpoint inherited from
+				 * parent through fork().
+				 */
+				if (clearbpt(tcp) < 0) {
+					/* Pretty fatal */
+					droptcb(tcp);
+					cleanup();
+					return -1;
+				}
+			}
+			if (ptrace_setoptions) {
+				if (debug_flag)
+					fprintf(stderr, "setting opts %x on pid %d\n", ptrace_setoptions, tcp->pid);
+				if (ptrace(PTRACE_SETOPTIONS, tcp->pid, NULL, ptrace_setoptions) < 0) {
+					if (errno != ESRCH) {
+						/* Should never happen, really */
+						perror_msg_and_die("PTRACE_SETOPTIONS");
+					}
+				}
+			}
+		}
+
+		sig = WSTOPSIG(status);
+
+		if (event != 0) {
+			/* Ptrace event */
+#ifdef USE_SEIZE
+			if (event == PTRACE_EVENT_STOP || event == PTRACE_EVENT_STOP1) {
+				/*
+				 * PTRACE_INTERRUPT-stop or group-stop.
+				 * PTRACE_INTERRUPT-stop has sig == SIGTRAP here.
+				 */
+				if (sig == SIGSTOP
+				 || sig == SIGTSTP
+				 || sig == SIGTTIN
+				 || sig == SIGTTOU
+				) {
+					stopped = 1;
+					goto show_stopsig;
+				}
+			}
+#endif
+			goto restart_tracee_with_sig_0;
+		}
+
+		/* Is this post-attach SIGSTOP?
+		 * Interestingly, the process may stop
+		 * with STOPSIG equal to some other signal
+		 * than SIGSTOP if we happend to attach
+		 * just before the process takes a signal.
+		 */
+		if (sig == SIGSTOP && (tcp->flags & TCB_IGNORE_ONE_SIGSTOP)) {
+			if (debug_flag)
+				fprintf(stderr, "ignored SIGSTOP on pid %d\n", tcp->pid);
+			tcp->flags &= ~TCB_IGNORE_ONE_SIGSTOP;
+			goto restart_tracee_with_sig_0;
+		}
+
+		if (sig != syscall_trap_sig) {
+			siginfo_t si;
+
+			/* Nonzero (true) if tracee is stopped by signal
+			 * (as opposed to "tracee received signal").
+			 * TODO: shouldn't we check for errno == EINVAL too?
+			 * We can get ESRCH instead, you know...
+			 */
+			stopped = (ptrace(PTRACE_GETSIGINFO, pid, 0, (long) &si) < 0);
+#ifdef USE_SEIZE
+ show_stopsig:
+#endif
+			if (cflag != CFLAG_ONLY_STATS
+			    && (qual_flags[sig] & QUAL_SIGNAL)) {
+#if defined(PT_CR_IPSR) && defined(PT_CR_IIP)
+				long pc = 0;
+				long psr = 0;
+
+				upeek(tcp, PT_CR_IPSR, &psr);
+				upeek(tcp, PT_CR_IIP, &pc);
+
+# define PSR_RI	41
+				pc += (psr >> PSR_RI) & 0x3;
+# define PC_FORMAT_STR	" @ %lx"
+# define PC_FORMAT_ARG	, pc
+#else
+# define PC_FORMAT_STR	""
+# define PC_FORMAT_ARG	/* nothing */
+#endif
+				printleader(tcp);
+				if (!stopped) {
+					tprintf("--- %s ", signame(sig));
+					printsiginfo(&si, verbose(tcp));
+					tprintf(PC_FORMAT_STR " ---\n"
+						PC_FORMAT_ARG);
+				} else
+					tprintf("--- stopped by %s" PC_FORMAT_STR " ---\n",
+						signame(sig)
+						PC_FORMAT_ARG);
+				line_ended();
+			}
+
+			if (!stopped)
+				/* It's signal-delivery-stop. Inject the signal */
+				goto restart_tracee;
+
+			/* It's group-stop */
+#ifdef USE_SEIZE
+			if (use_seize) {
+				/*
+				 * This ends ptrace-stop, but does *not* end group-stop.
+				 * This makes stopping signals work properly on straced process
+				 * (that is, process really stops. It used to continue to run).
+				 */
+				if (ptrace_restart(PTRACE_LISTEN, tcp, 0) < 0) {
+					cleanup();
+					return -1;
+				}
+				continue;
+			}
+			/* We don't have PTRACE_LISTEN support... */
+#endif
+			goto restart_tracee;
+		}
+
+		/* We handled quick cases, we are permitted to interrupt now. */
+		if (interrupted)
+			return 0;
+
+		/* This should be syscall entry or exit.
+		 * (Or it still can be that pesky post-execve SIGTRAP!)
+		 * Handle it.
+		 */
+		if (trace_syscall(tcp) < 0) {
+			/* ptrace() failed in trace_syscall().
+			 * Likely a result of process disappearing mid-flight.
+			 * Observed case: exit_group() or SIGKILL terminating
+			 * all processes in thread group.
+			 * We assume that ptrace error was caused by process death.
+			 * We used to detach(tcp) here, but since we no longer
+			 * implement "detach before death" policy/hack,
+			 * we can let this process to report its death to us
+			 * normally, via WIFEXITED or WIFSIGNALED wait status.
+			 */
+			continue;
+		}
+ restart_tracee_with_sig_0:
+		sig = 0;
+ restart_tracee:
+		/* Remember current print column before continuing. */
+		if (ptrace_restart(PTRACE_SYSCALL, tcp, sig) < 0) {
+			cleanup();
+			return -1;
+		}
+	}
+	return 0;
+}
+
+int
+main(int argc, char *argv[])
+{
+	init(argc, argv);
+
+	/* Run main tracing loop */
+	if (trace() < 0)
+		return 1;
+
+	cleanup();
+	fflush(NULL);
+	if (exit_code > 0xff) {
+		/* Avoid potential core file clobbering.  */
+		struct rlimit rlim = {0, 0};
+		setrlimit(RLIMIT_CORE, &rlim);
+
+		/* Child was killed by a signal, mimic that.  */
+		exit_code &= 0xff;
+		signal(exit_code, SIG_DFL);
+		raise(exit_code);
+		/* Paranoia - what if this signal is not fatal?
+		   Exit with 128 + signo then.  */
+		exit_code += 128;
+	}
+
+	return exit_code;
+}
diff --git a/strace.spec b/strace.spec
index 51333ab..1bb7d3b 100644
--- a/strace.spec
+++ b/strace.spec
@@ -1,6 +1,6 @@
 Summary: Tracks and displays system calls associated with a running process
 Name: strace
-Version: 4.6
+Version: 4.7
 Release: 1%{?dist}
 License: BSD
 Group: Development/Debuggers
@@ -74,8 +74,9 @@
 
 %files
 %defattr(-,root,root)
-%doc CREDITS ChangeLog ChangeLog-CVS COPYRIGHT NEWS PORTING README
+%doc CREDITS ChangeLog ChangeLog-CVS COPYRIGHT NEWS README
 %{_bindir}/strace
+%{_bindir}/strace-log-merge
 %{_mandir}/man1/*
 
 %ifarch %{strace64_arches}
@@ -85,6 +86,13 @@
 %endif
 
 %changelog
+* Wed May 02 2012 Dmitry V. Levin <ldv@altlinux.org> 4.7-1
+- New upstream release.
+  + implemented proper handling of real SIGTRAPs (#162774).
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.6-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
 * Mon Mar 14 2011 Dmitry V. Levin <ldv@altlinux.org> - 4.6-1
 - New upstream release.
   + fixed a corner case in waitpid handling (#663547).
diff --git a/stream.c b/stream.c
index eb4e396..8656fc0 100644
--- a/stream.c
+++ b/stream.c
@@ -24,33 +24,21 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-#include <sys/syscall.h>
-
 #ifdef HAVE_POLL_H
-#include <poll.h>
+# include <poll.h>
 #endif
 #ifdef HAVE_SYS_POLL_H
-#include <sys/poll.h>
+# include <sys/poll.h>
 #endif
 #ifdef HAVE_STROPTS_H
-#include <stropts.h>
+# include <stropts.h>
 #endif
 #ifdef HAVE_SYS_CONF_H
-#include <sys/conf.h>
+# include <sys/conf.h>
 #endif
-#ifdef HAVE_SYS_STREAM_H
-#include <sys/stream.h>
-#endif
-#ifdef HAVE_SYS_TIHDR_H
-#include <sys/tihdr.h>
-#endif
-
-#if defined(HAVE_SYS_STREAM_H) || defined(LINUX) || defined(FREEBSD)
 
 #ifndef HAVE_STROPTS_H
 #define RS_HIPRI 1
@@ -63,57 +51,42 @@
 #define MOREDATA 2
 #endif /* !HAVE_STROPTS_H */
 
-#ifdef HAVE_SYS_TIUSER_H
-#include <sys/tiuser.h>
-#include <sys/sockmod.h>
-#include <sys/timod.h>
-#endif /* HAVE_SYS_TIUSER_H */
-
-#ifndef FREEBSD
 static const struct xlat msgflags[] = {
 	{ RS_HIPRI,	"RS_HIPRI"	},
 	{ 0,		NULL		},
 };
 
-
 static void
-printstrbuf(tcp, sbp, getting)
-struct tcb *tcp;
-struct strbuf *sbp;
-int getting;
+printstrbuf(struct tcb *tcp, struct strbuf *sbp, int getting)
 {
 	if (sbp->maxlen == -1 && getting)
-		tprintf("{maxlen=-1}");
+		tprints("{maxlen=-1}");
 	else {
-		tprintf("{");
+		tprints("{");
 		if (getting)
 			tprintf("maxlen=%d, ", sbp->maxlen);
 		tprintf("len=%d, buf=", sbp->len);
 		printstr(tcp, (unsigned long) sbp->buf, sbp->len);
-		tprintf("}");
+		tprints("}");
 	}
 }
 
 static void
-printstrbufarg(tcp, arg, getting)
-struct tcb *tcp;
-int arg;
-int getting;
+printstrbufarg(struct tcb *tcp, int arg, int getting)
 {
 	struct strbuf buf;
 
 	if (arg == 0)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (umove(tcp, arg, &buf) < 0)
-		tprintf("{...}");
+		tprints("{...}");
 	else
 		printstrbuf(tcp, &buf, getting);
-	tprintf(", ");
+	tprints(", ");
 }
 
 int
-sys_putmsg(tcp)
-struct tcb *tcp;
+sys_putmsg(struct tcb *tcp)
 {
 	int i;
 
@@ -129,10 +102,9 @@
 	return 0;
 }
 
-#if defined(SPARC) || defined(SPARC64) || defined(SUNOS4) || defined(SVR4)
+#if defined(SPARC) || defined(SPARC64)
 int
-sys_getmsg(tcp)
-struct tcb *tcp;
+sys_getmsg(struct tcb *tcp)
 {
 	int i, flags;
 
@@ -150,13 +122,13 @@
 			printstrbufarg(tcp, tcp->u_arg[i], 1);
 		/* pointer to flags */
 		if (tcp->u_arg[3] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (umove(tcp, tcp->u_arg[3], &flags) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else {
-			tprintf("[");
+			tprints("[");
 			printflags(msgflags, flags, "RS_???");
-			tprintf("]");
+			tprints("]");
 		}
 		/* decode return value */
 		switch (tcp->u_rval) {
@@ -176,7 +148,7 @@
 	}
 	return RVAL_HEX | RVAL_STR;
 }
-#endif /* SPARC || SPARC64 || SUNOS4 || SVR4 */
+#endif
 
 #if defined SYS_putpmsg || defined SYS_getpmsg
 static const struct xlat pmsgflags[] = {
@@ -195,8 +167,7 @@
 
 #ifdef SYS_putpmsg
 int
-sys_putpmsg(tcp)
-struct tcb *tcp;
+sys_putpmsg(struct tcb *tcp)
 {
 	int i;
 
@@ -217,8 +188,7 @@
 
 #ifdef SYS_getpmsg
 int
-sys_getpmsg(tcp)
-struct tcb *tcp;
+sys_getpmsg(struct tcb *tcp)
 {
 	int i, flags;
 
@@ -236,16 +206,16 @@
 			printstrbufarg(tcp, tcp->u_arg[i], 1);
 		/* pointer to band */
 		printnum(tcp, tcp->u_arg[3], "%d");
-		tprintf(", ");
+		tprints(", ");
 		/* pointer to flags */
 		if (tcp->u_arg[4] == 0)
-			tprintf("NULL");
+			tprints("NULL");
 		else if (umove(tcp, tcp->u_arg[4], &flags) < 0)
-			tprintf("[?]");
+			tprints("[?]");
 		else {
-			tprintf("[");
+			tprints("[");
 			printflags(pmsgflags, flags, "MSG_???");
-			tprintf("]");
+			tprints("]");
 		}
 		/* decode return value */
 		switch (tcp->u_rval) {
@@ -267,9 +237,6 @@
 }
 #endif /* SYS_getpmsg */
 
-#endif /* !FREEBSD */
-
-
 #ifdef HAVE_SYS_POLL_H
 
 static const struct xlat pollflags[] = {
@@ -321,16 +288,16 @@
 		} else {
 			abbrev_end = end;
 		}
-		tprintf("[");
+		tprints("[");
 		for (cur = start; cur < end; cur += sizeof(fds)) {
 			if (cur > start)
-				tprintf(", ");
+				tprints(", ");
 			if (cur >= abbrev_end) {
-				tprintf("...");
+				tprints("...");
 				break;
 			}
 			if (umoven(tcp, cur, sizeof fds, (char *) &fds) < 0) {
-				tprintf("?");
+				tprints("?");
 				failed = 1;
 				break;
 			}
@@ -338,22 +305,22 @@
 				tprintf("{fd=%d}", fds.fd);
 				continue;
 			}
-			tprintf("{fd=");
+			tprints("{fd=");
 			printfd(tcp, fds.fd);
-			tprintf(", events=");
+			tprints(", events=");
 			printflags(pollflags, fds.events, "POLL???");
-			tprintf("}");
+			tprints("}");
 		}
-		tprintf("]");
+		tprints("]");
 		if (failed)
 			tprintf(" %#lx", start);
 		tprintf(", %d, ", nfds);
 		return 0;
 	} else {
 		static char outstr[1024];
-		char str[64];
+		char *outptr;
+#define end_outstr (outstr + sizeof(outstr))
 		const char *flagstr;
-		unsigned int cumlen;
 
 		if (syserror(tcp))
 			return 0;
@@ -376,62 +343,56 @@
 			abbrev_end = end;
 		}
 
-		outstr[0] = '\0';
-		cumlen = 0;
+		outptr = outstr;
 
 		for (cur = start; cur < end; cur += sizeof(fds)) {
 			if (umoven(tcp, cur, sizeof fds, (char *) &fds) < 0) {
-				++cumlen;
-				if (cumlen < sizeof(outstr))
-					strcat(outstr, "?");
+				if (outptr < end_outstr - 2)
+					*outptr++ = '?';
 				failed = 1;
 				break;
 			}
 			if (!fds.revents)
 				continue;
-			if (!cumlen) {
-				++cumlen;
-				strcat(outstr, "[");
+			if (outptr == outstr) {
+				*outptr++ = '[';
 			} else {
-				cumlen += 2;
-				if (cumlen < sizeof(outstr))
-					strcat(outstr, ", ");
+				if (outptr < end_outstr - 3)
+					outptr = stpcpy(outptr, ", ");
 			}
 			if (cur >= abbrev_end) {
-				cumlen += 3;
-				if (cumlen < sizeof(outstr))
-					strcat(outstr, "...");
+				if (outptr < end_outstr - 4)
+					outptr = stpcpy(outptr, "...");
 				break;
 			}
-			sprintf(str, "{fd=%d, revents=", fds.fd);
-			flagstr=sprintflags("", pollflags, fds.revents);
-			cumlen += strlen(str) + strlen(flagstr) + 1;
-			if (cumlen < sizeof(outstr)) {
-				strcat(outstr, str);
-				strcat(outstr, flagstr);
-				strcat(outstr, "}");
+			if (outptr < end_outstr - (sizeof("{fd=%d, revents=") + sizeof(int)*3) + 1)
+				outptr += sprintf(outptr, "{fd=%d, revents=", fds.fd);
+			flagstr = sprintflags("", pollflags, fds.revents);
+			if (outptr < end_outstr - (strlen(flagstr) + 2)) {
+				outptr = stpcpy(outptr, flagstr);
+				*outptr++ = '}';
 			}
 		}
 		if (failed)
 			return 0;
 
-		if (cumlen && ++cumlen < sizeof(outstr))
-			strcat(outstr, "]");
+		if (outptr != outstr /* && outptr < end_outstr - 1 (always true)*/)
+			*outptr++ = ']';
 
+		*outptr = '\0';
 		if (pts) {
-			char str[128];
-
-			sprintf(str, "%sleft ", cumlen ? ", " : "");
-			sprint_timespec(str + strlen(str), tcp, pts);
-			if ((cumlen += strlen(str)) < sizeof(outstr))
-				strcat(outstr, str);
+			if (outptr < end_outstr - (10 + TIMESPEC_TEXT_BUFSIZE)) {
+				outptr = stpcpy(outptr, outptr == outstr ? "left " : ", left ");
+				sprint_timespec(outptr, tcp, pts);
+			}
 		}
 
-		if (!outstr[0])
+		if (outptr == outstr)
 			return 0;
 
 		tcp->auxstr = outstr;
 		return RVAL_STR;
+#undef end_outstr
 	}
 }
 
@@ -442,7 +403,7 @@
 	if (entering(tcp)) {
 #ifdef INFTIM
 		if (tcp->u_arg[2] == INFTIM)
-			tprintf("INFTIM");
+			tprints("INFTIM");
 		else
 #endif
 			tprintf("%ld", tcp->u_arg[2]);
@@ -450,949 +411,23 @@
 	return rc;
 }
 
-#ifdef LINUX
 int
 sys_ppoll(struct tcb *tcp)
 {
 	int rc = decode_poll(tcp, tcp->u_arg[2]);
 	if (entering(tcp)) {
 		print_timespec(tcp, tcp->u_arg[2]);
-		tprintf(", ");
+		tprints(", ");
 		print_sigset(tcp, tcp->u_arg[3], 0);
 		tprintf(", %lu", tcp->u_arg[4]);
 	}
 	return rc;
 }
-#endif
 
 #else /* !HAVE_SYS_POLL_H */
 int
-sys_poll(tcp)
-struct tcb *tcp;
+sys_poll(struct tcb *tcp)
 {
 	return 0;
 }
 #endif
-
-#if !defined(LINUX) && !defined(FREEBSD)
-
-static const struct xlat stream_flush_options[] = {
-	{ FLUSHR,	"FLUSHR"	},
-	{ FLUSHW,	"FLUSHW"	},
-	{ FLUSHRW,	"FLUSHRW"	},
-#ifdef FLUSHBAND
-	{ FLUSHBAND,	"FLUSHBAND"	},
-#endif
-	{ 0,		NULL		},
-};
-
-static const struct xlat stream_setsig_flags[] = {
-	{ S_INPUT,	"S_INPUT"	},
-	{ S_HIPRI,	"S_HIPRI"	},
-	{ S_OUTPUT,	"S_OUTPUT"	},
-	{ S_MSG,	"S_MSG"		},
-#ifdef S_ERROR
-	{ S_ERROR,	"S_ERROR"	},
-#endif
-#ifdef S_HANGUP
-	{ S_HANGUP,	"S_HANGUP"	},
-#endif
-#ifdef S_RDNORM
-	{ S_RDNORM,	"S_RDNORM"	},
-#endif
-#ifdef S_WRNORM
-	{ S_WRNORM,	"S_WRNORM"	},
-#endif
-#ifdef S_RDBAND
-	{ S_RDBAND,	"S_RDBAND"	},
-#endif
-#ifdef S_WRBAND
-	{ S_WRBAND,	"S_WRBAND"	},
-#endif
-#ifdef S_BANDURG
-	{ S_BANDURG,	"S_BANDURG"	},
-#endif
-	{ 0,		NULL		},
-};
-
-static const struct xlat stream_read_options[] = {
-	{ RNORM,	"RNORM"		},
-	{ RMSGD,	"RMSGD"		},
-	{ RMSGN,	"RMSGN"		},
-	{ 0,		NULL		},
-};
-
-static const struct xlat stream_read_flags[] = {
-#ifdef RPROTDAT
-	{ RPROTDAT,	"RPROTDAT"	},
-#endif
-#ifdef RPROTDIS
-	{ RPROTDIS,	"RPROTDIS"	},
-#endif
-#ifdef RPROTNORM
-	{ RPROTNORM,	"RPROTNORM"	},
-#endif
-	{ 0,		NULL		},
-};
-
-#ifndef RMODEMASK
-#define RMODEMASK (~0)
-#endif
-
-#ifdef I_SWROPT
-static const struct xlat stream_write_flags[] = {
-	{ SNDZERO,	"SNDZERO"	},
-	{ SNDPIPE,	"SNDPIPE"	},
-	{ 0,		NULL		},
-};
-#endif /* I_SWROPT */
-
-#ifdef I_ATMARK
-static const struct xlat stream_atmark_options[] = {
-	{ ANYMARK,	"ANYMARK"	},
-	{ LASTMARK,	"LASTMARK"	},
-	{ 0,		NULL		},
-};
-#endif /* I_ATMARK */
-
-#ifdef TI_BIND
-static const struct xlat transport_user_options[] = {
-	{ T_CONN_REQ,	"T_CONN_REQ"	},
-	{ T_CONN_RES,	"T_CONN_RES"	},
-	{ T_DISCON_REQ,	"T_DISCON_REQ"	},
-	{ T_DATA_REQ,	"T_DATA_REQ"	},
-	{ T_EXDATA_REQ,	"T_EXDATA_REQ"	},
-	{ T_INFO_REQ,	"T_INFO_REQ"	},
-	{ T_BIND_REQ,	"T_BIND_REQ"	},
-	{ T_UNBIND_REQ,	"T_UNBIND_REQ"	},
-	{ T_UNITDATA_REQ,"T_UNITDATA_REQ"},
-	{ T_OPTMGMT_REQ,"T_OPTMGMT_REQ"	},
-	{ T_ORDREL_REQ,	"T_ORDREL_REQ"	},
-	{ 0,		NULL		},
-};
-
-static const struct xlat transport_user_flags [] = {
-	{ 0,		"0"		},
-	{ T_MORE,	"T_MORE"	},
-	{ T_EXPEDITED,	"T_EXPEDITED"	},
-	{ T_NEGOTIATE,	"T_NEGOTIATE"	},
-	{ T_CHECK,	"T_CHECK"	},
-	{ T_DEFAULT,	"T_DEFAULT"	},
-	{ T_SUCCESS,	"T_SUCCESS"	},
-	{ T_FAILURE,	"T_FAILURE"	},
-	{ T_CURRENT,	"T_CURRENT"	},
-	{ T_PARTSUCCESS,"T_PARTSUCCESS"	},
-	{ T_READONLY,	"T_READONLY"	},
-	{ T_NOTSUPPORT,	"T_NOTSUPPORT"	},
-	{ 0,		NULL		},
-};
-
-
-#ifdef HAVE_STRUCT_T_OPTHDR
-
-static const struct xlat xti_level [] = {
-	{ XTI_GENERIC,	"XTI_GENERIC"	},
-	{ 0,		NULL		},
-};
-
-static const struct xlat xti_generic [] = {
-	{ XTI_DEBUG,	"XTI_DEBUG"	},
-	{ XTI_LINGER,	"XTI_LINGER"	},
-	{ XTI_RCVBUF,	"XTI_RCVBUF"	},
-	{ XTI_RCVLOWAT,	"XTI_RCVLOWAT"	},
-	{ XTI_SNDBUF,	"XTI_SNDBUF"	},
-	{ XTI_SNDLOWAT,	"XTI_SNDLOWAT"	},
-	{ 0,		NULL		},
-};
-
-
-
-void
-print_xti_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
-{
-	int c = 0;
-	struct t_opthdr hdr;
-
-	while (len >= (int) sizeof hdr) {
-		if (umove(tcp, addr, &hdr) < 0) break;
-		if (c++) {
-			tprintf (", ");
-		}
-		else if (len > hdr.len + sizeof hdr) {
-			tprintf ("[");
-		}
-		tprintf ("{level=");
-		printxval (xti_level, hdr.level, "???");
-		tprintf (", name=");
-		switch (hdr.level) {
-		    case XTI_GENERIC:
-			printxval (xti_generic, hdr.name, "XTI_???");
-			break;
-		    default:
-			tprintf ("%ld", hdr.name);
-			break;
-		}
-		tprintf (", status=");
-		printxval (transport_user_flags,  hdr.status, "T_???");
-		addr += sizeof hdr;
-		len -= sizeof hdr;
-		if ((hdr.len -= sizeof hdr) > 0) {
-			if (hdr.len > len) break;
-			tprintf (", val=");
-			if (len == sizeof (int))
-				printnum (tcp, addr, "%d");
-			else
-				printstr (tcp, addr, hdr.len);
-			addr += hdr.len;
-			len -= hdr.len;
-		}
-		tprintf ("}");
-	}
-	if (len > 0) {
-		if (c++) tprintf (", ");
-		printstr (tcp, addr, len);
-	}
-	if (c > 1) tprintf ("]");
-}
-
-#endif
-
-
-static void
-print_optmgmt (tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
-{
-	/* We don't know how to tell if TLI (socket) or XTI
-	   optmgmt is being used yet, assume TLI. */
-#if defined (HAVE_STRUCT_OPTHDR)
-	print_sock_optmgmt (tcp, addr, len);
-#elif defined (HAVE_STRUCT_T_OPTHDR)
-	print_xti_optmgmt (tcp, addr, len);
-#else
-	printstr (tcp, addr, len);
-#endif
-}
-
-
-
-
-static const struct xlat service_type [] = {
-	{ T_COTS,	"T_COTS"	},
-	{ T_COTS_ORD,	"T_COTS_ORD"	},
-	{ T_CLTS,	"T_CLTS"	},
-	{ 0,		NULL		},
-};
-
-static const struct xlat ts_state [] = {
-	{ TS_UNBND,	"TS_UNBND"	},
-	{ TS_WACK_BREQ,	"TS_WACK_BREQ"	},
-	{ TS_WACK_UREQ,	"TS_WACK_UREQ"	},
-	{ TS_IDLE,	"TS_IDLE"	},
-	{ TS_WACK_OPTREQ,"TS_WACK_OPTREQ"},
-	{ TS_WACK_CREQ,	"TS_WACK_CREQ"	},
-	{ TS_WCON_CREQ,	"TS_WCON_CREQ"	},
-	{ TS_WRES_CIND,	"TS_WRES_CIND"	},
-	{ TS_WACK_CRES,	"TS_WACK_CRES"	},
-	{ TS_DATA_XFER,	"TS_DATA_XFER"	},
-	{ TS_WIND_ORDREL,"TS_WIND_ORDREL"},
-	{ TS_WREQ_ORDREL,"TS_WREQ_ORDREL"},
-	{ TS_WACK_DREQ6,"TS_WACK_DREQ6"	},
-	{ TS_WACK_DREQ7,"TS_WACK_DREQ7"	},
-	{ TS_WACK_DREQ9,"TS_WACK_DREQ9"	},
-	{ TS_WACK_DREQ10,"TS_WACK_DREQ10"},
-	{ TS_WACK_DREQ11,"TS_WACK_DREQ11"},
-	{ 0,		NULL		},
-};
-
-static const struct xlat provider_flags [] = {
-	{ 0,		"0"		},
-	{ SENDZERO,	"SENDZERO"	},
-	{ EXPINLINE,	"EXPINLINE"	},
-	{ XPG4_1,	"XPG4_1"	},
-	{ 0,		NULL		},
-};
-
-
-static const struct xlat tli_errors [] = {
-	{ TBADADDR,	"TBADADDR"	},
-	{ TBADOPT,	"TBADOPT"	},
-	{ TACCES,	"TACCES"	},
-	{ TBADF,	"TBADF"		},
-	{ TNOADDR,	"TNOADDR"	},
-	{ TOUTSTATE,	"TOUTSTATE"	},
-	{ TBADSEQ,	"TBADSEQ"	},
-	{ TSYSERR,	"TSYSERR"	},
-	{ TLOOK,	"TLOOK"		},
-	{ TBADDATA,	"TBADDATA"	},
-	{ TBUFOVFLW,	"TBUFOVFLW"	},
-	{ TFLOW,	"TFLOW"		},
-	{ TNODATA,	"TNODATA"	},
-	{ TNODIS,	"TNODIS"	},
-	{ TNOUDERR,	"TNOUDERR"	},
-	{ TBADFLAG,	"TBADFLAG"	},
-	{ TNOREL,	"TNOREL"	},
-	{ TNOTSUPPORT,	"TNOTSUPPORT"	},
-	{ TSTATECHNG,	"TSTATECHNG"	},
-	{ TNOSTRUCTYPE,	"TNOSTRUCTYPE"	},
-	{ TBADNAME,	"TBADNAME"	},
-	{ TBADQLEN,	"TBADQLEN"	},
-	{ TADDRBUSY,	"TADDRBUSY"	},
-	{ TINDOUT,	"TINDOUT"	},
-	{ TPROVMISMATCH,"TPROVMISMATCH"	},
-	{ TRESQLEN,	"TRESQLEN"	},
-	{ TRESADDR,	"TRESADDR"	},
-	{ TQFULL,	"TQFULL"	},
-	{ TPROTO,	"TPROTO"	},
-	{ 0,		NULL		},
-};
-
-
-static int
-print_transport_message (tcp, expect, addr, len)
-struct tcb *tcp;
-int expect;
-long addr;
-int len;
-{
-	union T_primitives m;
-	int c = 0;
-
-	if (len < sizeof m.type) goto dump;
-
-	if (umove (tcp, addr, &m.type) < 0) goto dump;
-
-#define GET(type, struct)	\
-	do {							\
-		if (len < sizeof m.struct) goto dump;		\
-		if (umove (tcp, addr, &m.struct) < 0) goto dump;\
-		tprintf ("{");					\
-		if (expect != type) {				\
-			++c;					\
-			tprintf (#type);			\
-		}						\
-	}							\
-	while (0)
-
-#define COMMA() \
-	do { if (c++) tprintf (", "); } while (0)
-
-
-#define STRUCT(struct, elem, print)					\
-	do {								\
-		COMMA ();						\
-		if (m.struct.elem##_length < 0 ||			\
-		    m.struct.elem##_offset < sizeof m.struct ||		\
-		    m.struct.elem##_offset + m.struct.elem##_length > len) \
-		{							\
-			tprintf (#elem "_length=%ld, " #elem "_offset=%ld",\
-				m.struct.elem##_length,			\
-				m.struct.elem##_offset);		\
-		}							\
-		else {							\
-			tprintf (#elem "=");				\
-			print (tcp,					\
-				 addr + m.struct.elem##_offset,		\
-				 m.struct.elem##_length);		\
-		}							\
-	}								\
-	while (0)
-
-#define ADDR(struct, elem) STRUCT (struct, elem, printstr)
-
-	switch (m.type) {
-#ifdef T_CONN_REQ
-	    case T_CONN_REQ:	/* connect request   */
-		GET (T_CONN_REQ, conn_req);
-		ADDR (conn_req, DEST);
-		ADDR (conn_req, OPT);
-		break;
-#endif
-#ifdef T_CONN_RES
-	    case T_CONN_RES:	/* connect response   */
-		GET (T_CONN_RES, conn_res);
-#ifdef HAVE_STRUCT_T_CONN_RES_QUEUE_PTR
-		COMMA ();
-		tprintf ("QUEUE=%p", m.conn_res.QUEUE_ptr);
-#elif defined HAVE_STRUCT_T_CONN_RES_ACCEPTOR_ID
-		COMMA ();
-		tprintf ("ACCEPTOR=%#lx", m.conn_res.ACCEPTOR_id);
-#endif
-		ADDR (conn_res, OPT);
-		COMMA ();
-		tprintf ("SEQ=%ld", m.conn_res.SEQ_number);
-		break;
-#endif
-#ifdef T_DISCON_REQ
-	    case T_DISCON_REQ:	/* disconnect request */
-		GET (T_DISCON_REQ, discon_req);
-		COMMA ();
-		tprintf ("SEQ=%ld", m.discon_req.SEQ_number);
-		break;
-#endif
-#ifdef T_DATA_REQ
-	    case T_DATA_REQ:	/* data request       */
-		GET (T_DATA_REQ, data_req);
-		COMMA ();
-		tprintf ("MORE=%ld", m.data_req.MORE_flag);
-		break;
-#endif
-#ifdef T_EXDATA_REQ
-	    case T_EXDATA_REQ:	/* expedited data req */
-		GET (T_EXDATA_REQ, exdata_req);
-		COMMA ();
-		tprintf ("MORE=%ld", m.exdata_req.MORE_flag);
-		break;
-#endif
-#ifdef T_INFO_REQ
-	    case T_INFO_REQ:	/* information req    */
-		GET (T_INFO_REQ, info_req);
-		break;
-#endif
-#ifdef T_BIND_REQ
-	    case T_BIND_REQ:	/* bind request       */
-#ifdef O_T_BIND_REQ
-	    case O_T_BIND_REQ:	/* Ugly xti/tli hack */
-#endif
-		GET (T_BIND_REQ, bind_req);
-		ADDR (bind_req, ADDR);
-		COMMA ();
-		tprintf ("CONIND=%ld", m.bind_req.CONIND_number);
-		break;
-#endif
-#ifdef T_UNBIND_REQ
-	    case T_UNBIND_REQ:	/* unbind request     */
-		GET (T_UNBIND_REQ, unbind_req);
-		break;
-#endif
-#ifdef T_UNITDATA_REQ
-	    case T_UNITDATA_REQ:	/* unitdata requset   */
-		GET (T_UNITDATA_REQ, unitdata_req);
-		ADDR (unitdata_req, DEST);
-		ADDR (unitdata_req, OPT);
-		break;
-#endif
-#ifdef T_OPTMGMT_REQ
-	    case T_OPTMGMT_REQ:	/* manage opt req     */
-		GET (T_OPTMGMT_REQ, optmgmt_req);
-		COMMA ();
-		tprintf ("MGMT=");
-		printflags (transport_user_flags, m.optmgmt_req.MGMT_flags,
-			    "T_???");
-		STRUCT (optmgmt_req, OPT, print_optmgmt);
-		break;
-#endif
-#ifdef T_ORDREL_REQ
-	    case T_ORDREL_REQ:	/* orderly rel req    */
-		GET (T_ORDREL_REQ, ordrel_req);
-		break;
-#endif
-#ifdef T_CONN_IND
-	    case T_CONN_IND:	/* connect indication */
-		GET (T_CONN_IND, conn_ind);
-		ADDR (conn_ind, SRC);
-		ADDR (conn_ind, OPT);
-		tprintf (", SEQ=%ld", m.conn_ind.SEQ_number);
-		break;
-#endif
-#ifdef T_CONN_CON
-	    case T_CONN_CON:	/* connect corfirm    */
-		GET (T_CONN_CON, conn_con);
-		ADDR (conn_con, RES);
-		ADDR (conn_con, OPT);
-		break;
-#endif
-#ifdef T_DISCON_IND
-	    case T_DISCON_IND:	/* discon indication  */
-		GET (T_DISCON_IND, discon_ind);
-		COMMA ();
-		tprintf ("DISCON=%ld, SEQ=%ld",
-			 m.discon_ind.DISCON_reason, m.discon_ind.SEQ_number);
-		break;
-#endif
-#ifdef T_DATA_IND
-	    case T_DATA_IND:	/* data indication    */
-		GET (T_DATA_IND, data_ind);
-		COMMA ();
-		tprintf ("MORE=%ld", m.data_ind.MORE_flag);
-		break;
-#endif
-#ifdef T_EXDATA_IND
-	    case T_EXDATA_IND:	/* expedited data ind */
-		GET (T_EXDATA_IND, exdata_ind);
-		COMMA ();
-		tprintf ("MORE=%ld", m.exdata_ind.MORE_flag);
-		break;
-#endif
-#ifdef T_INFO_ACK
-	    case T_INFO_ACK:	/* info ack           */
-		GET (T_INFO_ACK, info_ack);
-		COMMA ();
-		tprintf ("TSDU=%ld, ETSDU=%ld, CDATA=%ld, DDATA=%ld, "
-			 "ADDR=%ld, OPT=%ld, TIDU=%ld, SERV=",
-			 m.info_ack.TSDU_size, m.info_ack.ETSDU_size,
-			 m.info_ack.CDATA_size, m.info_ack.DDATA_size,
-			 m.info_ack.ADDR_size, m.info_ack.OPT_size,
-			 m.info_ack.TIDU_size);
-		printxval (service_type, m.info_ack.SERV_type, "T_???");
-		tprintf (", CURRENT=");
-		printxval (ts_state, m.info_ack.CURRENT_state, "TS_???");
-		tprintf (", PROVIDER=");
-		printflags (provider_flags, m.info_ack.PROVIDER_flag, "???");
-		break;
-#endif
-#ifdef T_BIND_ACK
-	    case T_BIND_ACK:	/* bind ack           */
-		GET (T_BIND_ACK, bind_ack);
-		ADDR (bind_ack, ADDR);
-		tprintf (", CONIND=%ld", m.bind_ack.CONIND_number);
-		break;
-#endif
-#ifdef T_ERROR_ACK
-	    case T_ERROR_ACK:	/* error ack          */
-		GET (T_ERROR_ACK, error_ack);
-		COMMA ();
-		tprintf ("ERROR=");
-		printxval (transport_user_options,
-			   m.error_ack.ERROR_prim, "TI_???");
-		tprintf (", TLI=");
-		printxval (tli_errors, m.error_ack.TLI_error, "T???");
-		tprintf ("UNIX=%s", strerror (m.error_ack.UNIX_error));
-		break;
-#endif
-#ifdef T_OK_ACK
-	    case T_OK_ACK:	/* ok ack             */
-		GET (T_OK_ACK, ok_ack);
-		COMMA ();
-		tprintf ("CORRECT=");
-		printxval (transport_user_options,
-			   m.ok_ack.CORRECT_prim, "TI_???");
-		break;
-#endif
-#ifdef T_UNITDATA_IND
-	    case T_UNITDATA_IND:	/* unitdata ind       */
-		GET (T_UNITDATA_IND, unitdata_ind);
-		ADDR (unitdata_ind, SRC);
-		ADDR (unitdata_ind, OPT);
-		break;
-#endif
-#ifdef T_UDERROR_IND
-	    case T_UDERROR_IND:	/* unitdata error ind */
-		GET (T_UDERROR_IND, uderror_ind);
-		ADDR (uderror_ind, DEST);
-		ADDR (uderror_ind, OPT);
-		tprintf (", ERROR=%ld", m.uderror_ind.ERROR_type);
-		break;
-#endif
-#ifdef T_OPTMGMT_ACK
-	    case T_OPTMGMT_ACK:	/* manage opt ack     */
-		GET (T_OPTMGMT_ACK, optmgmt_ack);
-		COMMA ();
-		tprintf ("MGMT=");
-		printflags (transport_user_flags, m.optmgmt_ack.MGMT_flags,
-			    "T_???");
-		STRUCT (optmgmt_ack, OPT, print_optmgmt);
-		break;
-#endif
-#ifdef T_ORDREL_IND
-	case T_ORDREL_IND:	/* orderly rel ind    */
-		GET (T_ORDREL_IND, ordrel_ind);
-		break;
-#endif
-#ifdef T_ADDR_REQ
-	    case T_ADDR_REQ:	/* address req        */
-		GET (T_ADDR_REQ, addr_req);
-		break;
-#endif
-#ifdef T_ADDR_ACK
-	    case T_ADDR_ACK:	/* address response   */
-		GET (T_ADDR_ACK, addr_ack);
-		ADDR (addr_ack, LOCADDR);
-		ADDR (addr_ack, REMADDR);
-		break;
-#endif
-	    default:
-	    dump:
-		c = -1;
-		printstr(tcp, addr, len);
-		break;
-	}
-
-	if (c >= 0) tprintf ("}");
-
-#undef ADDR
-#undef COMMA
-#undef STRUCT
-
-	return 0;
-}
-
-
-#endif /* TI_BIND */
-
-
-static int internal_stream_ioctl(struct tcb *tcp, int arg)
-{
-	struct strioctl si;
-	struct ioctlent *iop;
-	int in_and_out;
-	int timod = 0;
-#ifdef SI_GETUDATA
-	struct si_udata udata;
-#endif /* SI_GETUDATA */
-
-	if (!arg)
-		return 0;
-	if (umove(tcp, arg, &si) < 0) {
-		if (entering(tcp))
-			tprintf(", {...}");
-		return 1;
-	}
-	if (entering(tcp)) {
-		iop = ioctl_lookup(si.ic_cmd);
-		if (iop) {
-			tprintf(", {ic_cmd=%s", iop->symbol);
-			while ((iop = ioctl_next_match(iop)))
-				tprintf(" or %s", iop->symbol);
-		} else
-			tprintf(", {ic_cmd=%#x", si.ic_cmd);
-		if (si.ic_timout == INFTIM)
-			tprintf(", ic_timout=INFTIM, ");
-		else
-			tprintf(" ic_timout=%d, ", si.ic_timout);
-	}
-	in_and_out = 1;
-	switch (si.ic_cmd) {
-#ifdef SI_GETUDATA
-	case SI_GETUDATA:
-		in_and_out = 0;
-		break;
-#endif /* SI_GETUDATA */
-	}
-	if (in_and_out) {
-		if (entering(tcp))
-			tprintf("/* in */ ");
-		else
-			tprintf(", /* out */ ");
-	}
-	if (in_and_out || entering(tcp))
-		tprintf("ic_len=%d, ic_dp=", si.ic_len);
-	switch (si.ic_cmd) {
-#ifdef TI_BIND
-	case TI_BIND:
-		/* in T_BIND_REQ, out T_BIND_ACK */
-		++timod;
-		if (entering(tcp)) {
-			print_transport_message (tcp,
-						 T_BIND_REQ,
-						 si.ic_dp, si.ic_len);
-		}
-		else {
-			print_transport_message (tcp,
-						 T_BIND_ACK,
-						 si.ic_dp, si.ic_len);
-		}
-		break;
-#endif /* TI_BIND */
-#ifdef TI_UNBIND
-	case TI_UNBIND:
-		/* in T_UNBIND_REQ, out T_OK_ACK */
-		++timod;
-		if (entering(tcp)) {
-			print_transport_message (tcp,
-						 T_UNBIND_REQ,
-						 si.ic_dp, si.ic_len);
-		}
-		else {
-			print_transport_message (tcp,
-						 T_OK_ACK,
-						 si.ic_dp, si.ic_len);
-		}
-		break;
-#endif /* TI_UNBIND */
-#ifdef TI_GETINFO
-	case TI_GETINFO:
-		/* in T_INFO_REQ, out T_INFO_ACK */
-		++timod;
-		if (entering(tcp)) {
-			print_transport_message (tcp,
-						 T_INFO_REQ,
-						 si.ic_dp, si.ic_len);
-		}
-		else {
-			print_transport_message (tcp,
-						 T_INFO_ACK,
-						 si.ic_dp, si.ic_len);
-		}
-		break;
-#endif /* TI_GETINFO */
-#ifdef TI_OPTMGMT
-	case TI_OPTMGMT:
-		/* in T_OPTMGMT_REQ, out T_OPTMGMT_ACK */
-		++timod;
-		if (entering(tcp)) {
-			print_transport_message (tcp,
-						 T_OPTMGMT_REQ,
-						 si.ic_dp, si.ic_len);
-		}
-		else {
-			print_transport_message (tcp,
-						 T_OPTMGMT_ACK,
-						 si.ic_dp, si.ic_len);
-		}
-		break;
-#endif /* TI_OPTMGMT */
-#ifdef SI_GETUDATA
-	case SI_GETUDATA:
-		if (entering(tcp))
-			break;
-		if (umove(tcp, (int) si.ic_dp, &udata) < 0)
-			tprintf("{...}");
-		else {
-			tprintf("{tidusize=%d, addrsize=%d, ",
-				udata.tidusize, udata.addrsize);
-			tprintf("optsize=%d, etsdusize=%d, ",
-				udata.optsize, udata.etsdusize);
-			tprintf("servtype=%d, so_state=%d, ",
-				udata.servtype, udata.so_state);
-			tprintf("so_options=%d", udata.so_options);
-			tprintf("}");
-		}
-		break;
-#endif /* SI_GETUDATA */
-	default:
-		printstr(tcp, (long) si.ic_dp, si.ic_len);
-		break;
-	}
-	if (exiting(tcp)) {
-		tprintf("}");
-		if (timod && tcp->u_rval && !syserror(tcp)) {
-			tcp->auxstr = xlookup (tli_errors, tcp->u_rval);
-			return RVAL_STR + 1;
-		}
-	}
-
-	return 1;
-}
-
-int
-stream_ioctl(tcp, code, arg)
-struct tcb *tcp;
-int code, arg;
-{
-#ifdef I_LIST
-	int i;
-#endif
-	int val;
-#ifdef I_FLUSHBAND
-	struct bandinfo bi;
-#endif
-	struct strpeek sp;
-	struct strfdinsert sfi;
-	struct strrecvfd srf;
-#ifdef I_LIST
-	struct str_list sl;
-#endif
-
-	/* I_STR is a special case because the data is read & written. */
-	if (code == I_STR)
-		return internal_stream_ioctl(tcp, arg);
-	if (entering(tcp))
-		return 0;
-
-	switch (code) {
-	case I_PUSH:
-	case I_LOOK:
-	case I_FIND:
-		/* arg is a string */
-		tprintf(", ");
-		printpath(tcp, arg);
-		return 1;
-	case I_POP:
-		/* doesn't take an argument */
-		return 1;
-	case I_FLUSH:
-		/* argument is an option */
-		tprintf(", ");
-		printxval(stream_flush_options, arg, "FLUSH???");
-		return 1;
-#ifdef I_FLUSHBAND
-	case I_FLUSHBAND:
-		/* argument is a pointer to a bandinfo struct */
-		if (umove(tcp, arg, &bi) < 0)
-			tprintf(", {...}");
-		else {
-			tprintf(", {bi_pri=%d, bi_flag=", bi.bi_pri);
-			printflags(stream_flush_options, bi.bi_flag, "FLUSH???");
-			tprintf("}");
-		}
-		return 1;
-#endif /* I_FLUSHBAND */
-	case I_SETSIG:
-		/* argument is a set of flags */
-		tprintf(", ");
-		printflags(stream_setsig_flags, arg, "S_???");
-		return 1;
-	case I_GETSIG:
-		/* argument is a pointer to a set of flags */
-		if (syserror(tcp))
-			return 0;
-		tprintf(", [");
-		if (umove(tcp, arg, &val) < 0)
-			tprintf("?");
-		else
-			printflags(stream_setsig_flags, val, "S_???");
-		tprintf("]");
-		return 1;
-	case I_PEEK:
-		/* argument is a pointer to a strpeek structure */
-		if (syserror(tcp) || !arg)
-			return 0;
-		if (umove(tcp, arg, &sp) < 0) {
-			tprintf(", {...}");
-			return 1;
-		}
-		tprintf(", {ctlbuf=");
-		printstrbuf(tcp, &sp.ctlbuf, 1);
-		tprintf(", databuf=");
-		printstrbuf(tcp, &sp.databuf, 1);
-		tprintf(", flags=");
-		printflags(msgflags, sp.flags, "RS_???");
-		tprintf("}");
-		return 1;
-	case I_SRDOPT:
-		/* argument is an option with flags */
-		tprintf(", ");
-		printxval(stream_read_options, arg & RMODEMASK, "R???");
-		addflags(stream_read_flags, arg & ~RMODEMASK);
-		return 1;
-	case I_GRDOPT:
-		/* argument is an pointer to an option with flags */
-		if (syserror(tcp))
-			return 0;
-		tprintf(", [");
-		if (umove(tcp, arg, &val) < 0)
-			tprintf("?");
-		else {
-			printxval(stream_read_options,
-				  arg & RMODEMASK, "R???");
-			addflags(stream_read_flags, arg & ~RMODEMASK);
-		}
-		tprintf("]");
-		return 1;
-	case I_NREAD:
-#ifdef I_GETBAND
-	case I_GETBAND:
-#endif
-#ifdef I_SETCLTIME
-	case I_SETCLTIME:
-#endif
-#ifdef I_GETCLTIME
-	case I_GETCLTIME:
-#endif
-		/* argument is a pointer to a decimal integer */
-		if (syserror(tcp))
-			return 0;
-		tprintf(", ");
-		printnum(tcp, arg, "%d");
-		return 1;
-	case I_FDINSERT:
-		/* argument is a pointer to a strfdinsert structure */
-		if (syserror(tcp) || !arg)
-			return 0;
-		if (umove(tcp, arg, &sfi) < 0) {
-			tprintf(", {...}");
-			return 1;
-		}
-		tprintf(", {ctlbuf=");
-		printstrbuf(tcp, &sfi.ctlbuf, 1);
-		tprintf(", databuf=");
-		printstrbuf(tcp, &sfi.databuf, 1);
-		tprintf(", flags=");
-		printflags(msgflags, sfi.flags, "RS_???");
-		tprintf(", filedes=%d, offset=%d}", sfi.fildes, sfi.offset);
-		return 1;
-#ifdef I_SWROPT
-	case I_SWROPT:
-		/* argument is a set of flags */
-		tprintf(", ");
-		printflags(stream_write_flags, arg, "SND???");
-		return 1;
-#endif /* I_SWROPT */
-#ifdef I_GWROPT
-	case I_GWROPT:
-		/* argument is an pointer to an option with flags */
-		if (syserror(tcp))
-			return 0;
-		tprintf(", [");
-		if (umove(tcp, arg, &val) < 0)
-			tprintf("?");
-		else
-			printflags(stream_write_flags, arg, "SND???");
-		tprintf("]");
-		return 1;
-#endif /* I_GWROPT */
-	case I_SENDFD:
-#ifdef I_CKBAND
-	case I_CKBAND:
-#endif
-#ifdef I_CANPUT
-	case I_CANPUT:
-#endif
-	case I_LINK:
-	case I_UNLINK:
-	case I_PLINK:
-	case I_PUNLINK:
-		/* argument is a decimal integer */
-		tprintf(", %d", arg);
-		return 1;
-	case I_RECVFD:
-		/* argument is a pointer to a strrecvfd structure */
-		if (syserror(tcp) || !arg)
-			return 0;
-		if (umove(tcp, arg, &srf) < 0) {
-			tprintf(", {...}");
-			return 1;
-		}
-		tprintf(", {fd=%d, uid=%lu, gid=%lu}", srf.fd,
-			(unsigned long) srf.uid, (unsigned long) srf.gid);
-		return 1;
-#ifdef I_LIST
-	case I_LIST:
-		if (syserror(tcp))
-			return 0;
-		if (arg == 0) {
-			tprintf(", NULL");
-			return 1;
-		}
-		if (umove(tcp, arg, &sl) < 0) {
-			tprintf(", {...}");
-			return 1;
-		}
-		tprintf(", {sl_nmods=%d, sl_modlist=[", sl.sl_nmods);
-		for (i = 0; i < tcp->u_rval; i++) {
-			if (i)
-				tprintf(", ");
-			printpath(tcp, (int) sl.sl_modlist[i].l_name);
-		}
-		tprintf("]}");
-		return 1;
-#endif /* I_LIST */
-#ifdef I_ATMARK
-	case I_ATMARK:
-		tprintf(", ");
-		printxval(stream_atmark_options, arg, "???MARK");
-		return 1;
-#endif /* I_ATMARK */
-	default:
-		return 0;
-	}
-}
-
-#endif /* !LINUX && !FREEBSD */
-
-#endif /* HAVE_SYS_STREAM_H || LINUX || FREEBSD */
diff --git a/syscall.c b/syscall.c
index 422f050..52d742f 100644
--- a/syscall.c
+++ b/syscall.c
@@ -29,76 +29,64 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#include <signal.h>
-#include <time.h>
-#include <errno.h>
 #include <sys/user.h>
-#include <sys/syscall.h>
 #include <sys/param.h>
 
 #ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
-#ifndef PTRACE_PEEKUSR
-# define PTRACE_PEEKUSR PTRACE_PEEKUSER
-#endif
+# include <sys/reg.h>
+# ifndef PTRACE_PEEKUSR
+#  define PTRACE_PEEKUSR PTRACE_PEEKUSER
+# endif
 #elif defined(HAVE_LINUX_PTRACE_H)
-#undef PTRACE_SYSCALL
+# undef PTRACE_SYSCALL
 # ifdef HAVE_STRUCT_IA64_FPREG
 #  define ia64_fpreg XXX_ia64_fpreg
 # endif
 # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
 #  define pt_all_user_regs XXX_pt_all_user_regs
 # endif
-#include <linux/ptrace.h>
+# include <linux/ptrace.h>
 # undef ia64_fpreg
 # undef pt_all_user_regs
 #endif
 
-#if defined (LINUX) && defined (SPARC64)
+#if defined(SPARC64)
 # undef PTRACE_GETREGS
 # define PTRACE_GETREGS PTRACE_GETREGS64
 # undef PTRACE_SETREGS
 # define PTRACE_SETREGS PTRACE_SETREGS64
-#endif /* LINUX && SPARC64 */
+#endif
 
-#if defined(LINUX) && defined(IA64)
+#if defined(IA64)
 # include <asm/ptrace_offsets.h>
 # include <asm/rse.h>
 #endif
 
-#define NR_SYSCALL_BASE 0
-#ifdef LINUX
 #ifndef ERESTARTSYS
-#define ERESTARTSYS	512
+# define ERESTARTSYS	512
 #endif
 #ifndef ERESTARTNOINTR
-#define ERESTARTNOINTR	513
+# define ERESTARTNOINTR	513
 #endif
 #ifndef ERESTARTNOHAND
-#define ERESTARTNOHAND	514	/* restart if no handler.. */
-#endif
-#ifndef ENOIOCTLCMD
-#define ENOIOCTLCMD	515	/* No ioctl command */
+# define ERESTARTNOHAND	514	/* restart if no handler */
 #endif
 #ifndef ERESTART_RESTARTBLOCK
-#define ERESTART_RESTARTBLOCK 516	/* restart by calling sys_restart_syscall */
+# define ERESTART_RESTARTBLOCK 516	/* restart by calling sys_restart_syscall */
 #endif
+
 #ifndef NSIG
-#define NSIG 32
+# warning: NSIG is not defined, using 32
+# define NSIG 32
 #endif
 #ifdef ARM
-#undef NSIG
-#define NSIG 32
-#undef NR_SYSCALL_BASE
-#define NR_SYSCALL_BASE __NR_SYSCALL_BASE
+/* Ugh. Is this really correct? ARM has no RT signals?! */
+# undef NSIG
+# define NSIG 32
 #endif
-#endif /* LINUX */
 
 #include "syscall.h"
 
@@ -110,32 +98,23 @@
 #define TP TRACE_PROCESS
 #define TS TRACE_SIGNAL
 #define NF SYSCALL_NEVER_FAILS
+#define MA MAX_ARGS
 
 static const struct sysent sysent0[] = {
 #include "syscallent.h"
 };
-static const int nsyscalls0 = sizeof sysent0 / sizeof sysent0[0];
-int qual_flags0[MAX_QUALS];
 
 #if SUPPORTED_PERSONALITIES >= 2
 static const struct sysent sysent1[] = {
-#include "syscallent1.h"
+# include "syscallent1.h"
 };
-static const int nsyscalls1 = sizeof sysent1 / sizeof sysent1[0];
-int qual_flags1[MAX_QUALS];
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
+#endif
 
 #if SUPPORTED_PERSONALITIES >= 3
 static const struct sysent sysent2[] = {
-#include "syscallent2.h"
+# include "syscallent2.h"
 };
-static const int nsyscalls2 = sizeof sysent2 / sizeof sysent2[0];
-int qual_flags2[MAX_QUALS];
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
-
-const struct sysent *sysent;
-int *qual_flags;
-int nsyscalls;
+#endif
 
 /* Now undef them since short defines cause wicked namespace pollution. */
 #undef TD
@@ -145,45 +124,87 @@
 #undef TP
 #undef TS
 #undef NF
+#undef MA
+
+/*
+ * `ioctlent.h' may be generated from `ioctlent.raw' by the auxiliary
+ * program `ioctlsort', such that the list is sorted by the `code' field.
+ * This has the side-effect of resolving the _IO.. macros into
+ * plain integers, eliminating the need to include here everything
+ * in "/usr/include".
+ */
 
 static const char *const errnoent0[] = {
 #include "errnoent.h"
 };
-static const int nerrnos0 = sizeof errnoent0 / sizeof errnoent0[0];
+static const char *const signalent0[] = {
+#include "signalent.h"
+};
+static const struct ioctlent ioctlent0[] = {
+#include "ioctlent.h"
+};
+enum { nsyscalls0 = ARRAY_SIZE(sysent0) };
+enum { nerrnos0 = ARRAY_SIZE(errnoent0) };
+enum { nsignals0 = ARRAY_SIZE(signalent0) };
+enum { nioctlents0 = ARRAY_SIZE(ioctlent0) };
+int qual_flags0[MAX_QUALS];
 
 #if SUPPORTED_PERSONALITIES >= 2
 static const char *const errnoent1[] = {
-#include "errnoent1.h"
+# include "errnoent1.h"
 };
-static const int nerrnos1 = sizeof errnoent1 / sizeof errnoent1[0];
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
+static const char *const signalent1[] = {
+# include "signalent1.h"
+};
+static const struct ioctlent ioctlent1[] = {
+# include "ioctlent1.h"
+};
+enum { nsyscalls1 = ARRAY_SIZE(sysent1) };
+enum { nerrnos1 = ARRAY_SIZE(errnoent1) };
+enum { nsignals1 = ARRAY_SIZE(signalent1) };
+enum { nioctlents1 = ARRAY_SIZE(ioctlent1) };
+int qual_flags1[MAX_QUALS];
+#endif
 
 #if SUPPORTED_PERSONALITIES >= 3
 static const char *const errnoent2[] = {
-#include "errnoent2.h"
+# include "errnoent2.h"
 };
-static const int nerrnos2 = sizeof errnoent2 / sizeof errnoent2[0];
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
+static const char *const signalent2[] = {
+# include "signalent2.h"
+};
+static const struct ioctlent ioctlent2[] = {
+# include "ioctlent2.h"
+};
+enum { nsyscalls2 = ARRAY_SIZE(sysent2) };
+enum { nerrnos2 = ARRAY_SIZE(errnoent2) };
+enum { nsignals2 = ARRAY_SIZE(signalent2) };
+enum { nioctlents2 = ARRAY_SIZE(ioctlent2) };
+int qual_flags2[MAX_QUALS];
+#endif
 
-const char *const *errnoent;
-int nerrnos;
+const struct sysent *sysent = sysent0;
+const char *const *errnoent = errnoent0;
+const char *const *signalent = signalent0;
+const struct ioctlent *ioctlent = ioctlent0;
+unsigned nsyscalls = nsyscalls0;
+unsigned nerrnos = nerrnos0;
+unsigned nsignals = nsignals0;
+unsigned nioctlents = nioctlents0;
+int *qual_flags = qual_flags0;
 
+#if SUPPORTED_PERSONALITIES > 1
 int current_personality;
 
-#ifndef PERSONALITY0_WORDSIZE
-# define PERSONALITY0_WORDSIZE sizeof(long)
-#endif
 const int personality_wordsize[SUPPORTED_PERSONALITIES] = {
 	PERSONALITY0_WORDSIZE,
-#if SUPPORTED_PERSONALITIES > 1
 	PERSONALITY1_WORDSIZE,
-#endif
-#if SUPPORTED_PERSONALITIES > 2
+# if SUPPORTED_PERSONALITIES > 2
 	PERSONALITY2_WORDSIZE,
-#endif
-};;
+# endif
+};
 
-int
+void
 set_personality(int personality)
 {
 	switch (personality) {
@@ -199,7 +220,6 @@
 		qual_flags = qual_flags0;
 		break;
 
-#if SUPPORTED_PERSONALITIES >= 2
 	case 1:
 		errnoent = errnoent1;
 		nerrnos = nerrnos1;
@@ -211,9 +231,8 @@
 		nsignals = nsignals1;
 		qual_flags = qual_flags1;
 		break;
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
 
-#if SUPPORTED_PERSONALITIES >= 3
+# if SUPPORTED_PERSONALITIES >= 3
 	case 2:
 		errnoent = errnoent2;
 		nerrnos = nerrnos2;
@@ -225,16 +244,44 @@
 		nsignals = nsignals2;
 		qual_flags = qual_flags2;
 		break;
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
-
-	default:
-		return -1;
+# endif
 	}
 
 	current_personality = personality;
-	return 0;
 }
 
+static void
+update_personality(struct tcb *tcp, int personality)
+{
+	if (personality == current_personality)
+		return;
+	set_personality(personality);
+
+	if (personality == tcp->currpers)
+		return;
+	tcp->currpers = personality;
+
+# if defined(POWERPC64)
+	if (!qflag) {
+		static const char *const names[] = {"64 bit", "32 bit"};
+		fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
+			tcp->pid, names[personality]);
+	}
+# elif defined(X86_64)
+	if (!qflag) {
+		static const char *const names[] = {"64 bit", "32 bit", "x32"};
+		fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
+			tcp->pid, names[personality]);
+	}
+# elif defined(X32)
+	if (!qflag) {
+		static const char *const names[] = {"x32", "32 bit"};
+		fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
+			tcp->pid, names[personality]);
+	}
+# endif
+}
+#endif
 
 static int qual_syscall(), qual_signal(), qual_fault(), qual_desc();
 
@@ -284,7 +331,7 @@
 		else
 			qual_flags1[n] |= bitflag;
 	}
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
+#endif
 
 #if SUPPORTED_PERSONALITIES >= 3
 	if (pers == 2 || pers < 0) {
@@ -293,7 +340,7 @@
 		else
 			qual_flags2[n] |= bitflag;
 	}
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
+#endif
 }
 
 static int
@@ -302,34 +349,37 @@
 	int i;
 	int rc = -1;
 
-	if (isdigit((unsigned char)*s)) {
-		int i = atoi(s);
+	if (*s >= '0' && *s <= '9') {
+		int i = string_to_uint(s);
 		if (i < 0 || i >= MAX_QUALS)
 			return -1;
 		qualify_one(i, bitflag, not, -1);
 		return 0;
 	}
 	for (i = 0; i < nsyscalls0; i++)
-		if (strcmp(s, sysent0[i].sys_name) == 0) {
+		if (sysent0[i].sys_name &&
+		    strcmp(s, sysent0[i].sys_name) == 0) {
 			qualify_one(i, bitflag, not, 0);
 			rc = 0;
 		}
 
 #if SUPPORTED_PERSONALITIES >= 2
 	for (i = 0; i < nsyscalls1; i++)
-		if (strcmp(s, sysent1[i].sys_name) == 0) {
+		if (sysent1[i].sys_name &&
+		    strcmp(s, sysent1[i].sys_name) == 0) {
 			qualify_one(i, bitflag, not, 1);
 			rc = 0;
 		}
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
+#endif
 
 #if SUPPORTED_PERSONALITIES >= 3
 	for (i = 0; i < nsyscalls2; i++)
-		if (strcmp(s, sysent2[i].sys_name) == 0) {
+		if (sysent2[i].sys_name &&
+		    strcmp(s, sysent2[i].sys_name) == 0) {
 			qualify_one(i, bitflag, not, 2);
 			rc = 0;
 		}
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
+#endif
 
 	return rc;
 }
@@ -338,26 +388,22 @@
 qual_signal(const char *s, int bitflag, int not)
 {
 	int i;
-	char buf[32];
 
-	if (isdigit((unsigned char)*s)) {
-		int signo = atoi(s);
+	if (*s >= '0' && *s <= '9') {
+		int signo = string_to_uint(s);
 		if (signo < 0 || signo >= MAX_QUALS)
 			return -1;
 		qualify_one(signo, bitflag, not, -1);
 		return 0;
 	}
-	if (strlen(s) >= sizeof buf)
-		return -1;
-	strcpy(buf, s);
-	s = buf;
 	if (strncasecmp(s, "SIG", 3) == 0)
 		s += 3;
-	for (i = 0; i <= NSIG; i++)
+	for (i = 0; i <= NSIG; i++) {
 		if (strcasecmp(s, signame(i) + 3) == 0) {
 			qualify_one(i, bitflag, not, -1);
 			return 0;
 		}
+	}
 	return -1;
 }
 
@@ -370,8 +416,8 @@
 static int
 qual_desc(const char *s, int bitflag, int not)
 {
-	if (isdigit((unsigned char)*s)) {
-		int desc = atoi(s);
+	if (*s >= '0' && *s <= '9') {
+		int desc = string_to_uint(s);
 		if (desc < 0 || desc >= MAX_QUALS)
 			return -1;
 		qualify_one(desc, bitflag, not, -1);
@@ -434,10 +480,9 @@
 	for (i = 0; i < MAX_QUALS; i++) {
 		qualify_one(i, opt->bitflag, !not, -1);
 	}
-	if (!(copy = strdup(s))) {
-		fprintf(stderr, "out of memory\n");
-		exit(1);
-	}
+	copy = strdup(s);
+	if (!copy)
+		die_out_of_memory();
 	for (p = strtok(copy, ","); p; p = strtok(NULL, ",")) {
 		if (opt->bitflag == QUAL_TRACE && (n = lookup_class(p)) > 0) {
 			for (i = 0; i < nsyscalls0; i++)
@@ -448,314 +493,210 @@
 			for (i = 0; i < nsyscalls1; i++)
 				if (sysent1[i].sys_flags & n)
 					qualify_one(i, opt->bitflag, not, 1);
-#endif /* SUPPORTED_PERSONALITIES >= 2 */
+#endif
 
 #if SUPPORTED_PERSONALITIES >= 3
 			for (i = 0; i < nsyscalls2; i++)
 				if (sysent2[i].sys_flags & n)
 					qualify_one(i, opt->bitflag, not, 2);
-#endif /* SUPPORTED_PERSONALITIES >= 3 */
+#endif
 
 			continue;
 		}
 		if (opt->qualify(p, opt->bitflag, not)) {
-			fprintf(stderr, "strace: invalid %s `%s'\n",
+			error_msg_and_die("invalid %s '%s'",
 				opt->argument_name, p);
-			exit(1);
 		}
 	}
 	free(copy);
 	return;
 }
 
+#ifdef SYS_socket_subcall
 static void
-dumpio(struct tcb *tcp)
+decode_socket_subcall(struct tcb *tcp)
 {
-	if (syserror(tcp))
+	unsigned long addr;
+	unsigned int i, size;
+
+	if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= SYS_socket_nsubcalls)
 		return;
-	if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= MAX_QUALS)
-		return;
-	if (tcp->scno < 0 || tcp->scno >= nsyscalls)
-		return;
-	if (sysent[tcp->scno].sys_func == printargs)
-		return;
-	if (qual_flags[tcp->u_arg[0]] & QUAL_READ) {
-		if (sysent[tcp->scno].sys_func == sys_read ||
-		    sysent[tcp->scno].sys_func == sys_pread ||
-		    sysent[tcp->scno].sys_func == sys_pread64 ||
-		    sysent[tcp->scno].sys_func == sys_recv ||
-		    sysent[tcp->scno].sys_func == sys_recvfrom)
-			dumpstr(tcp, tcp->u_arg[1], tcp->u_rval);
-		else if (sysent[tcp->scno].sys_func == sys_readv)
-			dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
-		return;
-	}
-	if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) {
-		if (sysent[tcp->scno].sys_func == sys_write ||
-		    sysent[tcp->scno].sys_func == sys_pwrite ||
-		    sysent[tcp->scno].sys_func == sys_pwrite64 ||
-		    sysent[tcp->scno].sys_func == sys_send ||
-		    sysent[tcp->scno].sys_func == sys_sendto)
-			dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
-		else if (sysent[tcp->scno].sys_func == sys_writev)
-			dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
-		return;
+
+	tcp->scno = SYS_socket_subcall + tcp->u_arg[0];
+	addr = tcp->u_arg[1];
+	tcp->u_nargs = sysent[tcp->scno].nargs;
+	size = current_wordsize;
+	for (i = 0; i < tcp->u_nargs; ++i) {
+		if (size == sizeof(int)) {
+			unsigned int arg;
+			if (umove(tcp, addr, &arg) < 0)
+				arg = 0;
+			tcp->u_arg[i] = arg;
+		}
+		else {
+			unsigned long arg;
+			if (umove(tcp, addr, &arg) < 0)
+				arg = 0;
+			tcp->u_arg[i] = arg;
+		}
+		addr += size;
 	}
 }
-
-#ifndef FREEBSD
-enum subcall_style { shift_style, deref_style, mask_style, door_style };
-#else /* FREEBSD */
-enum subcall_style { shift_style, deref_style, mask_style, door_style, table_style };
-
-struct subcall {
-  int call;
-  int nsubcalls;
-  int subcalls[5];
-};
-
-static const struct subcall subcalls_table[] = {
-  { SYS_shmsys, 5, { SYS_shmat, SYS_shmctl, SYS_shmdt, SYS_shmget, SYS_shmctl } },
-#ifdef SYS_semconfig
-  { SYS_semsys, 4, { SYS___semctl, SYS_semget, SYS_semop, SYS_semconfig } },
-#else
-  { SYS_semsys, 3, { SYS___semctl, SYS_semget, SYS_semop } },
 #endif
-  { SYS_msgsys, 4, { SYS_msgctl, SYS_msgget, SYS_msgsnd, SYS_msgrcv } },
-};
-#endif /* FREEBSD */
 
-#if !(defined(LINUX) && ( defined(ALPHA) || defined(MIPS) || defined(__ARM_EABI__) ))
-
+#ifdef SYS_ipc_subcall
 static void
-decode_subcall(tcp, subcall, nsubcalls, style)
-struct tcb *tcp;
-int subcall;
-int nsubcalls;
-enum subcall_style style;
+decode_ipc_subcall(struct tcb *tcp)
 {
-	unsigned long addr, mask;
-	int i;
-	int size = personality_wordsize[current_personality];
+	unsigned int i;
 
-	switch (style) {
-	case shift_style:
-		if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= nsubcalls)
-			return;
-		tcp->scno = subcall + tcp->u_arg[0];
-		if (sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs--;
+	if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= SYS_ipc_nsubcalls)
+		return;
+
+	tcp->scno = SYS_ipc_subcall + tcp->u_arg[0];
+	tcp->u_nargs = sysent[tcp->scno].nargs;
+	for (i = 0; i < tcp->u_nargs; i++)
+		tcp->u_arg[i] = tcp->u_arg[i + 1];
+}
+#endif
+
+int
+printargs(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		int i;
+
 		for (i = 0; i < tcp->u_nargs; i++)
-			tcp->u_arg[i] = tcp->u_arg[i + 1];
-		break;
-	case deref_style:
-		if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= nsubcalls)
-			return;
-		tcp->scno = subcall + tcp->u_arg[0];
-		addr = tcp->u_arg[1];
-		for (i = 0; i < sysent[tcp->scno].nargs; i++) {
-			if (size == sizeof(int)) {
-				unsigned int arg;
-				if (umove(tcp, addr, &arg) < 0)
-					arg = 0;
-				tcp->u_arg[i] = arg;
-			}
-			else if (size == sizeof(long)) {
-				unsigned long arg;
-				if (umove(tcp, addr, &arg) < 0)
-					arg = 0;
-				tcp->u_arg[i] = arg;
-			}
-			else
-				abort();
-			addr += size;
-		}
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-		break;
-	case mask_style:
-		mask = (tcp->u_arg[0] >> 8) & 0xff;
-		for (i = 0; mask; i++)
-			mask >>= 1;
-		if (i >= nsubcalls)
-			return;
-		tcp->u_arg[0] &= 0xff;
-		tcp->scno = subcall + i;
-		if (sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		break;
-	case door_style:
-		/*
-		 * Oh, yuck.  The call code is the *sixth* argument.
-		 * (don't you mean the *last* argument? - JH)
-		 */
-		if (tcp->u_arg[5] < 0 || tcp->u_arg[5] >= nsubcalls)
-			return;
-		tcp->scno = subcall + tcp->u_arg[5];
-		if (sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs--;
-		break;
-#ifdef FREEBSD
-	case table_style:
-		for (i = 0; i < sizeof(subcalls_table) / sizeof(struct subcall); i++)
-			if (subcalls_table[i].call == tcp->scno) break;
-		if (i < sizeof(subcalls_table) / sizeof(struct subcall) &&
-		    tcp->u_arg[0] >= 0 && tcp->u_arg[0] < subcalls_table[i].nsubcalls) {
-			tcp->scno = subcalls_table[i].subcalls[tcp->u_arg[0]];
-			for (i = 0; i < tcp->u_nargs; i++)
-				tcp->u_arg[i] = tcp->u_arg[i + 1];
-		}
-		break;
-#endif /* FREEBSD */
+			tprintf("%s%#lx", i ? ", " : "", tcp->u_arg[i]);
 	}
-}
-#endif
-
-struct tcb *tcp_last = NULL;
-
-static int
-internal_syscall(struct tcb *tcp)
-{
-	/*
-	 * We must always trace a few critical system calls in order to
-	 * correctly support following forks in the presence of tracing
-	 * qualifiers.
-	 */
-	int	(*func)();
-
-	if (tcp->scno < 0 || tcp->scno >= nsyscalls)
-		return 0;
-
-	func = sysent[tcp->scno].sys_func;
-
-	if (sys_exit == func)
-		return internal_exit(tcp);
-
-	if (   sys_fork == func
-#if defined(FREEBSD) || defined(LINUX) || defined(SUNOS4)
-	    || sys_vfork == func
-#endif
-#ifdef LINUX
-	    || sys_clone == func
-#endif
-#if UNIXWARE > 2
-	    || sys_rfork == func
-#endif
-	   )
-		return internal_fork(tcp);
-
-	if (   sys_execve == func
-#if defined(SPARC) || defined(SPARC64) || defined(SUNOS4)
-	    || sys_execv == func
-#endif
-#if UNIXWARE > 2
-	    || sys_rexecve == func
-#endif
-	   )
-		return internal_exec(tcp);
-
-	if (   sys_waitpid == func
-	    || sys_wait4 == func
-#if defined(SVR4) || defined(FREEBSD) || defined(SUNOS4)
-	    || sys_wait == func
-#endif
-#ifdef ALPHA
-	    || sys_osf_wait4 == func
-#endif
-	   )
-		return internal_wait(tcp, 2);
-
-#if defined(LINUX) || defined(SVR4)
-	if (sys_waitid == func)
-		return internal_wait(tcp, 3);
-#endif
-
 	return 0;
 }
 
+int
+printargs_lu(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		int i;
 
-#ifdef LINUX
-#if defined (I386)
-	static long eax;
-#elif defined (IA64)
-	long r8, r10, psr;
-	long ia32 = 0;
-#elif defined (POWERPC)
-	static long result,flags;
-#elif defined (M68K)
-	static long d0;
-#elif defined(BFIN)
-	static long r0;
-#elif defined (ARM)
-	static struct pt_regs regs;
-#elif defined (ALPHA)
-	static long r0;
-	static long a3;
-#elif defined(AVR32)
-	static struct pt_regs regs;
-#elif defined (SPARC) || defined (SPARC64)
-	static struct pt_regs regs;
-	static unsigned long trap;
-#elif defined(LINUX_MIPSN32)
-	static long long a3;
-	static long long r2;
-#elif defined(MIPS)
-	static long a3;
-	static long r2;
-#elif defined(S390) || defined(S390X)
-	static long gpr2;
-	static long pc;
-	static long syscall_mode;
-#elif defined(HPPA)
-	static long r28;
-#elif defined(SH)
-	static long r0;
-#elif defined(SH64)
-	static long r9;
-#elif defined(X86_64)
-	static long rax;
-#elif defined(CRISV10) || defined(CRISV32)
-	static long r10;
-#elif defined(MICROBLAZE)
-	static long r3;
-#endif
-#endif /* LINUX */
-#ifdef FREEBSD
-	struct reg regs;
-#endif /* FREEBSD */
+		for (i = 0; i < tcp->u_nargs; i++)
+			tprintf("%s%lu", i ? ", " : "", tcp->u_arg[i]);
+	}
+	return 0;
+}
 
 int
+printargs_ld(struct tcb *tcp)
+{
+	if (entering(tcp)) {
+		int i;
+
+		for (i = 0; i < tcp->u_nargs; i++)
+			tprintf("%s%ld", i ? ", " : "", tcp->u_arg[i]);
+	}
+	return 0;
+}
+
+long
+getrval2(struct tcb *tcp)
+{
+	long val = -1;
+
+#if defined(SPARC) || defined(SPARC64)
+	struct pt_regs regs;
+	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0)
+		return -1;
+	val = regs.u_regs[U_REG_O1];
+#elif defined(SH)
+	if (upeek(tcp, 4*(REG_REG0+1), &val) < 0)
+		return -1;
+#elif defined(IA64)
+	if (upeek(tcp, PT_R9, &val) < 0)
+		return -1;
+#endif
+
+	return val;
+}
+
+int
+is_restart_error(struct tcb *tcp)
+{
+	switch (tcp->u_error) {
+		case ERESTARTSYS:
+		case ERESTARTNOINTR:
+		case ERESTARTNOHAND:
+		case ERESTART_RESTARTBLOCK:
+			return 1;
+		default:
+			break;
+	}
+	return 0;
+}
+
+#if defined(I386)
+struct pt_regs i386_regs;
+#elif defined(X86_64) || defined(X32)
+/*
+ * On 32 bits, pt_regs and user_regs_struct are the same,
+ * but on 64 bits, user_regs_struct has six more fields:
+ * fs_base, gs_base, ds, es, fs, gs.
+ * PTRACE_GETREGS fills them too, so struct pt_regs would overflow.
+ */
+static struct user_regs_struct x86_64_regs;
+#elif defined(IA64)
+long r8, r10, psr; /* TODO: make static? */
+long ia32 = 0; /* not static */
+#elif defined(POWERPC)
+static long ppc_result;
+#elif defined(M68K)
+static long d0;
+#elif defined(BFIN)
+static long r0;
+#elif defined(ARM)
+static struct pt_regs regs;
+#elif defined(ALPHA)
+static long r0;
+static long a3;
+#elif defined(AVR32)
+static struct pt_regs regs;
+#elif defined(SPARC) || defined(SPARC64)
+static struct pt_regs regs;
+static unsigned long trap;
+#elif defined(LINUX_MIPSN32)
+static long long a3;
+static long long r2;
+#elif defined(MIPS)
+static long a3;
+static long r2;
+#elif defined(S390) || defined(S390X)
+static long gpr2;
+static long pc;
+static long syscall_mode;
+#elif defined(HPPA)
+static long r28;
+#elif defined(SH)
+static long r0;
+#elif defined(SH64)
+static long r9;
+#elif defined(CRISV10) || defined(CRISV32)
+static long r10;
+#elif defined(MICROBLAZE)
+static long r3;
+#endif
+
+/* Returns:
+ * 0: "ignore this ptrace stop", bail out of trace_syscall_entering() silently.
+ * 1: ok, continue in trace_syscall_entering().
+ * other: error, trace_syscall_entering() should print error indicator
+ *    ("????" etc) and bail out.
+ */
+static int
 get_scno(struct tcb *tcp)
 {
 	long scno = 0;
 
-#ifdef LINUX
-# if defined(S390) || defined(S390X)
-	if (tcp->flags & TCB_WAITEXECVE) {
-		/*
-		 * When the execve system call completes successfully, the
-		 * new process still has -ENOSYS (old style) or __NR_execve
-		 * (new style) in gpr2.  We cannot recover the scno again
-		 * by disassembly, because the image that executed the
-		 * syscall is gone now.  Fortunately, we don't want it.  We
-		 * leave the flag set so that syscall_fixup can fake the
-		 * result.
-		 */
-		if (tcp->flags & TCB_INSYSCALL)
-			return 1;
-		/*
-		 * This is the SIGTRAP after execve.  We cannot try to read
-		 * the system call here either.
-		 */
-		tcp->flags &= ~TCB_WAITEXECVE;
-		return 0;
-	}
-
+#if defined(S390) || defined(S390X)
 	if (upeek(tcp, PT_GPR2, &syscall_mode) < 0)
-			return -1;
+		return -1;
 
 	if (syscall_mode != -ENOSYS) {
 		/*
@@ -766,13 +707,14 @@
 		/*
 		 * Old style of "passing" the scno via the SVC instruction.
 		 */
-
 		long opcode, offset_reg, tmp;
-		void * svc_addr;
-		int gpr_offset[16] = {PT_GPR0,  PT_GPR1,  PT_ORIGGPR2, PT_GPR3,
-				      PT_GPR4,  PT_GPR5,  PT_GPR6,     PT_GPR7,
-				      PT_GPR8,  PT_GPR9,  PT_GPR10,    PT_GPR11,
-				      PT_GPR12, PT_GPR13, PT_GPR14,    PT_GPR15};
+		void *svc_addr;
+		static const int gpr_offset[16] = {
+				PT_GPR0,  PT_GPR1,  PT_ORIGGPR2, PT_GPR3,
+				PT_GPR4,  PT_GPR5,  PT_GPR6,     PT_GPR7,
+				PT_GPR8,  PT_GPR9,  PT_GPR10,    PT_GPR11,
+				PT_GPR12, PT_GPR13, PT_GPR14,    PT_GPR15
+		};
 
 		if (upeek(tcp, PT_PSWADDR, &pc) < 0)
 			return -1;
@@ -792,7 +734,6 @@
 		 *  opcode. Since there is no way to find out the opcode size this
 		 *  is the best we can do...
 		 */
-
 		if ((opcode & 0xff00) == 0x0a00) {
 			/* SVC opcode */
 			scno = opcode & 0xff;
@@ -821,11 +762,11 @@
 			scno = ptrace(PTRACE_PEEKTEXT, tcp->pid, svc_addr, 0);
 			if (errno)
 				return -1;
-#  if defined(S390X)
+# if defined(S390X)
 			scno >>= 48;
-#  else
+# else
 			scno >>= 16;
-#  endif
+# endif
 			tmp = 0;
 			offset_reg = (opcode & 0x00f00000) >> 20;
 			if (offset_reg && (upeek(tcp, gpr_offset[offset_reg], &tmp) < 0))
@@ -834,158 +775,137 @@
 			scno = (scno | tmp) & 0xff;
 		}
 	}
-# elif defined (POWERPC)
+#elif defined(POWERPC)
 	if (upeek(tcp, sizeof(unsigned long)*PT_R0, &scno) < 0)
 		return -1;
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Check if we return from execve. */
-		if (scno == 0 && (tcp->flags & TCB_WAITEXECVE)) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-
-#  ifdef POWERPC64
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		static int currpers = -1;
-		long val;
-		int pid = tcp->pid;
-
-		/* Check for 64/32 bit mode. */
-		if (upeek(tcp, sizeof (unsigned long)*PT_MSR, &val) < 0)
-			return -1;
-		/* SF is bit 0 of MSR */
-		if (val < 0)
-			currpers = 0;
-		else
-			currpers = 1;
-		if (currpers != current_personality) {
-			static const char *const names[] = {"64 bit", "32 bit"};
-			set_personality(currpers);
-			fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
-					pid, names[current_personality]);
-		}
-	}
-#  endif
-# elif defined(AVR32)
-	/*
-	 * Read complete register set in one go.
+# ifdef POWERPC64
+	/* TODO: speed up strace by not doing this at every syscall.
+	 * We only need to do it after execve.
 	 */
+	int currpers;
+	long val;
+
+	/* Check for 64/32 bit mode. */
+	if (upeek(tcp, sizeof(unsigned long)*PT_MSR, &val) < 0)
+		return -1;
+	/* SF is bit 0 of MSR */
+	if (val < 0)
+		currpers = 0;
+	else
+		currpers = 1;
+	update_personality(tcp, currpers);
+# endif
+#elif defined(AVR32)
+	/* Read complete register set in one go. */
 	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, &regs) < 0)
 		return -1;
-
-	/*
-	 * We only need to grab the syscall number on syscall entry.
-	 */
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		scno = regs.r8;
-
-		/* Check if we return from execve. */
-		if (tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-# elif defined(BFIN)
+	scno = regs.r8;
+#elif defined(BFIN)
 	if (upeek(tcp, PT_ORIG_P0, &scno))
 		return -1;
-# elif defined (I386)
-	if (upeek(tcp, 4*ORIG_EAX, &scno) < 0)
+#elif defined(I386)
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &i386_regs) < 0)
 		return -1;
-# elif defined (X86_64)
-	if (upeek(tcp, 8*ORIG_RAX, &scno) < 0)
+	scno = i386_regs.orig_eax;
+#elif defined(X86_64) || defined(X32)
+# ifndef __X32_SYSCALL_BIT
+#  define __X32_SYSCALL_BIT	0x40000000
+# endif
+# ifndef __X32_SYSCALL_MASK
+#  define __X32_SYSCALL_MASK	__X32_SYSCALL_BIT
+# endif
+
+	int currpers;
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &x86_64_regs) < 0)
 		return -1;
+	scno = x86_64_regs.orig_rax;
 
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		static int currpers = -1;
-		long val;
-		int pid = tcp->pid;
-
-		/* Check CS register value. On x86-64 linux it is:
-		 * 	0x33	for long mode (64 bit)
-		 * 	0x23	for compatibility mode (32 bit)
-		 * It takes only one ptrace and thus doesn't need
-		 * to be cached.
-		 */
-		if (upeek(tcp, 8*CS, &val) < 0)
-			return -1;
-		switch (val) {
-			case 0x23: currpers = 1; break;
-			case 0x33: currpers = 0; break;
-			default:
-				fprintf(stderr, "Unknown value CS=0x%02X while "
-					 "detecting personality of process "
-					 "PID=%d\n", (int)val, pid);
-				currpers = current_personality;
-				break;
-		}
-#  if 0
-		/* This version analyzes the opcode of a syscall instruction.
-		 * (int 0x80 on i386 vs. syscall on x86-64)
-		 * It works, but is too complicated.
-		 */
-		unsigned long val, rip, i;
-
-		if (upeek(tcp, 8*RIP, &rip) < 0)
-			perror("upeek(RIP)");
-
-		/* sizeof(syscall) == sizeof(int 0x80) == 2 */
-		rip -= 2;
-		errno = 0;
-
-		call = ptrace(PTRACE_PEEKTEXT, pid, (char *)rip, (char *)0);
-		if (errno)
-			fprintf(stderr, "ptrace_peektext failed: %s\n",
-					strerror(errno));
-		switch (call & 0xffff) {
-			/* x86-64: syscall = 0x0f 0x05 */
-			case 0x050f: currpers = 0; break;
-			/* i386: int 0x80 = 0xcd 0x80 */
-			case 0x80cd: currpers = 1; break;
-			default:
-				currpers = current_personality;
-				fprintf(stderr,
-					"Unknown syscall opcode (0x%04X) while "
-					"detecting personality of process "
-					"PID=%d\n", (int)call, pid);
-				break;
-		}
-#  endif
-		if (currpers != current_personality) {
-			static const char *const names[] = {"64 bit", "32 bit"};
-			set_personality(currpers);
-			fprintf(stderr, "[ Process PID=%d runs in %s mode. ]\n",
-					pid, names[current_personality]);
-		}
-	}
-# elif defined(IA64)
-#	define IA64_PSR_IS	((long)1 << 34)
-	if (upeek (tcp, PT_CR_IPSR, &psr) >= 0)
-		ia32 = (psr & IA64_PSR_IS) != 0;
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		if (ia32) {
-			if (upeek(tcp, PT_R1, &scno) < 0)	/* orig eax */
-				return -1;
-		} else {
-			if (upeek (tcp, PT_R15, &scno) < 0)
-				return -1;
-		}
-		/* Check if we return from execve. */
-		if (tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	} else {
-		/* syscall in progress */
-		if (upeek (tcp, PT_R8, &r8) < 0)
-			return -1;
-		if (upeek (tcp, PT_R10, &r10) < 0)
-			return -1;
-	}
-# elif defined (ARM)
-	/*
-	 * Read complete register set in one go.
+	/* Check CS register value. On x86-64 linux it is:
+	 *	0x33	for long mode (64 bit)
+	 *	0x23	for compatibility mode (32 bit)
+	 * Check DS register value. On x86-64 linux it is:
+	 *	0x2b	for x32 mode (x86-64 in 32 bit)
 	 */
+	switch (x86_64_regs.cs) {
+		case 0x23: currpers = 1; break;
+		case 0x33:
+			if (x86_64_regs.ds == 0x2b) {
+				currpers = 2;
+				scno &= ~__X32_SYSCALL_MASK;
+			} else
+				currpers = 0;
+			break;
+		default:
+			fprintf(stderr, "Unknown value CS=0x%08X while "
+				 "detecting personality of process "
+				 "PID=%d\n", (int)x86_64_regs.cs, tcp->pid);
+			currpers = current_personality;
+			break;
+	}
+# if 0
+	/* This version analyzes the opcode of a syscall instruction.
+	 * (int 0x80 on i386 vs. syscall on x86-64)
+	 * It works, but is too complicated.
+	 */
+	unsigned long val, rip, i;
+
+	rip = x86_64_regs.rip;
+
+	/* sizeof(syscall) == sizeof(int 0x80) == 2 */
+	rip -= 2;
+	errno = 0;
+
+	call = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)rip, (char *)0);
+	if (errno)
+		fprintf(stderr, "ptrace_peektext failed: %s\n",
+				strerror(errno));
+	switch (call & 0xffff) {
+		/* x86-64: syscall = 0x0f 0x05 */
+		case 0x050f: currpers = 0; break;
+		/* i386: int 0x80 = 0xcd 0x80 */
+		case 0x80cd: currpers = 1; break;
+		default:
+			currpers = current_personality;
+			fprintf(stderr,
+				"Unknown syscall opcode (0x%04X) while "
+				"detecting personality of process "
+				"PID=%d\n", (int)call, tcp->pid);
+			break;
+	}
+# endif
+# ifdef X32
+	/* Value of currpers:
+	 *   0: 64 bit
+	 *   1: 32 bit
+	 *   2: X32
+	 * Value of current_personality:
+	 *   0: X32
+	 *   1: 32 bit
+	 */
+	switch (currpers) {
+		case 0:
+			fprintf(stderr, "syscall_%lu (...) in unsupported "
+					"64-bit mode of process PID=%d\n",
+				scno, tcp->pid);
+			return 0;
+		case 2:
+			currpers = 0;
+	}
+# endif
+	update_personality(tcp, currpers);
+#elif defined(IA64)
+#	define IA64_PSR_IS	((long)1 << 34)
+	if (upeek(tcp, PT_CR_IPSR, &psr) >= 0)
+		ia32 = (psr & IA64_PSR_IS) != 0;
+	if (ia32) {
+		if (upeek(tcp, PT_R1, &scno) < 0)
+			return -1;
+	} else {
+		if (upeek(tcp, PT_R15, &scno) < 0)
+			return -1;
+	}
+#elif defined(ARM)
+	/* Read complete register set in one go. */
 	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
 		return -1;
 
@@ -993,14 +913,6 @@
 	 * We only need to grab the syscall number on syscall entry.
 	 */
 	if (regs.ARM_ip == 0) {
-		if (!(tcp->flags & TCB_INSYSCALL)) {
-			/* Check if we return from execve. */
-			if (tcp->flags & TCB_WAITEXECVE) {
-				tcp->flags &= ~TCB_WAITEXECVE;
-				return 0;
-			}
-		}
-
 		/*
 		 * Note: we only deal with only 32-bit CPUs here.
 		 */
@@ -1018,11 +930,6 @@
 			if (errno)
 				return -1;
 
-			if (scno == 0 && (tcp->flags & TCB_WAITEXECVE)) {
-				tcp->flags &= ~TCB_WAITEXECVE;
-				return 0;
-			}
-
 			/* Handle the EABI syscall convention.  We do not
 			   bother converting structures between the two
 			   ABIs, but basic functionality should work even
@@ -1047,182 +954,129 @@
 			/*
 			 * Handle ARM specific syscall
 			 */
-			set_personality(1);
+			update_personality(tcp, 1);
 			scno &= 0x0000ffff;
 		} else
-			set_personality(0);
+			update_personality(tcp, 0);
 
-		if (tcp->flags & TCB_INSYSCALL) {
-			fprintf(stderr, "pid %d stray syscall entry\n", tcp->pid);
-			tcp->flags &= ~TCB_INSYSCALL;
-		}
 	} else {
-		if (!(tcp->flags & TCB_INSYSCALL)) {
-			fprintf(stderr, "pid %d stray syscall exit\n", tcp->pid);
-			tcp->flags |= TCB_INSYSCALL;
-		}
+		fprintf(stderr, "pid %d stray syscall entry\n", tcp->pid);
+		tcp->flags |= TCB_INSYSCALL;
 	}
-# elif defined (M68K)
+#elif defined(M68K)
 	if (upeek(tcp, 4*PT_ORIG_D0, &scno) < 0)
 		return -1;
-# elif defined (LINUX_MIPSN32)
+#elif defined(LINUX_MIPSN32)
 	unsigned long long regs[38];
 
-	if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
 		return -1;
 	a3 = regs[REG_A3];
 	r2 = regs[REG_V0];
 
-	if(!(tcp->flags & TCB_INSYSCALL)) {
-		scno = r2;
-
-		/* Check if we return from execve. */
-		if (scno == 0 && tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
+	scno = r2;
+	if (!SCNO_IN_RANGE(scno)) {
+		if (a3 == 0 || a3 == -1) {
+			if (debug_flag)
+				fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno);
 			return 0;
 		}
-
-		if (scno < 0 || scno > nsyscalls) {
-			if(a3 == 0 || a3 == -1) {
-				if(debug)
-					fprintf (stderr, "stray syscall exit: v0 = %ld\n", scno);
-				return 0;
-			}
-		}
 	}
-# elif defined (MIPS)
+#elif defined(MIPS)
 	if (upeek(tcp, REG_A3, &a3) < 0)
 		return -1;
-	if(!(tcp->flags & TCB_INSYSCALL)) {
-		if (upeek(tcp, REG_V0, &scno) < 0)
-			return -1;
-
-		/* Check if we return from execve. */
-		if (scno == 0 && tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-
-		if (scno < 0 || scno > nsyscalls) {
-			if(a3 == 0 || a3 == -1) {
-				if(debug)
-					fprintf (stderr, "stray syscall exit: v0 = %ld\n", scno);
-				return 0;
-			}
-		}
-	} else {
-		if (upeek(tcp, REG_V0, &r2) < 0)
-			return -1;
-	}
-# elif defined (ALPHA)
-	if (upeek(tcp, REG_A3, &a3) < 0)
+	if (upeek(tcp, REG_V0, &scno) < 0)
 		return -1;
 
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		if (upeek(tcp, REG_R0, &scno) < 0)
-			return -1;
-
-		/* Check if we return from execve. */
-		if (scno == 0 && tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
+	if (!SCNO_IN_RANGE(scno)) {
+		if (a3 == 0 || a3 == -1) {
+			if (debug_flag)
+				fprintf(stderr, "stray syscall exit: v0 = %ld\n", scno);
 			return 0;
 		}
+	}
+#elif defined(ALPHA)
+	if (upeek(tcp, REG_A3, &a3) < 0)
+		return -1;
+	if (upeek(tcp, REG_R0, &scno) < 0)
+		return -1;
 
-		/*
-		 * Do some sanity checks to figure out if it's
-		 * really a syscall entry
-		 */
-		if (scno < 0 || scno > nsyscalls) {
-			if (a3 == 0 || a3 == -1) {
-				if (debug)
-					fprintf (stderr, "stray syscall exit: r0 = %ld\n", scno);
-				return 0;
-			}
+	/*
+	 * Do some sanity checks to figure out if it's
+	 * really a syscall entry
+	 */
+	if (!SCNO_IN_RANGE(scno)) {
+		if (a3 == 0 || a3 == -1) {
+			if (debug_flag)
+				fprintf(stderr, "stray syscall exit: r0 = %ld\n", scno);
+			return 0;
 		}
 	}
-	else {
-		if (upeek(tcp, REG_R0, &r0) < 0)
-			return -1;
-	}
-# elif defined (SPARC) || defined (SPARC64)
+#elif defined(SPARC) || defined(SPARC64)
 	/* Everything we need is in the current register set. */
 	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0)
 		return -1;
 
-	/* If we are entering, then disassemble the syscall trap. */
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Retrieve the syscall trap instruction. */
-		errno = 0;
-#  if defined(SPARC64)
-		trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)regs.tpc, 0);
-		trap >>= 32;
-#  else
-		trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)regs.pc, 0);
-#  endif
-		if (errno)
-			return -1;
+	/* Disassemble the syscall trap. */
+	/* Retrieve the syscall trap instruction. */
+	errno = 0;
+# if defined(SPARC64)
+	trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)regs.tpc, 0);
+	trap >>= 32;
+# else
+	trap = ptrace(PTRACE_PEEKTEXT, tcp->pid, (char *)regs.pc, 0);
+# endif
+	if (errno)
+		return -1;
 
-		/* Disassemble the trap to see what personality to use. */
-		switch (trap) {
-		case 0x91d02010:
-			/* Linux/SPARC syscall trap. */
-			set_personality(0);
-			break;
-		case 0x91d0206d:
-			/* Linux/SPARC64 syscall trap. */
-			set_personality(2);
-			break;
-		case 0x91d02000:
-			/* SunOS syscall trap. (pers 1) */
-			fprintf(stderr,"syscall: SunOS no support\n");
-			return -1;
-		case 0x91d02008:
-			/* Solaris 2.x syscall trap. (per 2) */
-			set_personality(1);
-			break;
-		case 0x91d02009:
-			/* NetBSD/FreeBSD syscall trap. */
-			fprintf(stderr,"syscall: NetBSD/FreeBSD not supported\n");
-			return -1;
-		case 0x91d02027:
-			/* Solaris 2.x gettimeofday */
-			set_personality(1);
-			break;
-		default:
-			/* Unknown syscall trap. */
-			if(tcp->flags & TCB_WAITEXECVE) {
-				tcp->flags &= ~TCB_WAITEXECVE;
-				return 0;
-			}
-#  if defined (SPARC64)
-			fprintf(stderr,"syscall: unknown syscall trap %08lx %016lx\n", trap, regs.tpc);
-#  else
-			fprintf(stderr,"syscall: unknown syscall trap %08lx %08lx\n", trap, regs.pc);
-#  endif
-			return -1;
-		}
-
-		/* Extract the system call number from the registers. */
-		if (trap == 0x91d02027)
-			scno = 156;
-		else
-			scno = regs.u_regs[U_REG_G1];
-		if (scno == 0) {
-			scno = regs.u_regs[U_REG_O0];
-			memmove (&regs.u_regs[U_REG_O0], &regs.u_regs[U_REG_O1], 7*sizeof(regs.u_regs[0]));
-		}
+	/* Disassemble the trap to see what personality to use. */
+	switch (trap) {
+	case 0x91d02010:
+		/* Linux/SPARC syscall trap. */
+		update_personality(tcp, 0);
+		break;
+	case 0x91d0206d:
+		/* Linux/SPARC64 syscall trap. */
+		update_personality(tcp, 2);
+		break;
+	case 0x91d02000:
+		/* SunOS syscall trap. (pers 1) */
+		fprintf(stderr, "syscall: SunOS no support\n");
+		return -1;
+	case 0x91d02008:
+		/* Solaris 2.x syscall trap. (per 2) */
+		update_personality(tcp, 1);
+		break;
+	case 0x91d02009:
+		/* NetBSD/FreeBSD syscall trap. */
+		fprintf(stderr, "syscall: NetBSD/FreeBSD not supported\n");
+		return -1;
+	case 0x91d02027:
+		/* Solaris 2.x gettimeofday */
+		update_personality(tcp, 1);
+		break;
+	default:
+# if defined(SPARC64)
+		fprintf(stderr, "syscall: unknown syscall trap %08lx %016lx\n", trap, regs.tpc);
+# else
+		fprintf(stderr, "syscall: unknown syscall trap %08lx %08lx\n", trap, regs.pc);
+# endif
+		return -1;
 	}
-# elif defined(HPPA)
+
+	/* Extract the system call number from the registers. */
+	if (trap == 0x91d02027)
+		scno = 156;
+	else
+		scno = regs.u_regs[U_REG_G1];
+	if (scno == 0) {
+		scno = regs.u_regs[U_REG_O0];
+		memmove(&regs.u_regs[U_REG_O0], &regs.u_regs[U_REG_O1], 7*sizeof(regs.u_regs[0]));
+	}
+#elif defined(HPPA)
 	if (upeek(tcp, PT_GR20, &scno) < 0)
 		return -1;
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Check if we return from execve. */
-		if ((tcp->flags & TCB_WAITEXECVE)) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-# elif defined(SH)
+#elif defined(SH)
 	/*
 	 * In the new syscall ABI, the system call number is in R3.
 	 */
@@ -1234,7 +1088,7 @@
 		   glibc to issue bogus negative syscall numbers.  So for
 		   our purposes, make strace print what it *should* have been */
 		long correct_scno = (scno & 0xff);
-		if (debug)
+		if (debug_flag)
 			fprintf(stderr,
 				"Detected glibc bug: bogus system call"
 				" number = %ld, correcting to %ld\n",
@@ -1242,50 +1096,22 @@
 				correct_scno);
 		scno = correct_scno;
 	}
-
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Check if we return from execve. */
-		if (scno == 0 && tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-# elif defined(SH64)
+#elif defined(SH64)
 	if (upeek(tcp, REG_SYSCALL, &scno) < 0)
 		return -1;
 	scno &= 0xFFFF;
-
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Check if we return from execve. */
-		if (tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-# elif defined(CRISV10) || defined(CRISV32)
+#elif defined(CRISV10) || defined(CRISV32)
 	if (upeek(tcp, 4*PT_R9, &scno) < 0)
 		return -1;
-# elif defined(TILE)
+#elif defined(TILE)
 	if (upeek(tcp, PTREGS_OFFSET_REG(10), &scno) < 0)
 		return -1;
-
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		/* Check if we return from execve. */
-		if (tcp->flags & TCB_WAITEXECVE) {
-			tcp->flags &= ~TCB_WAITEXECVE;
-			return 0;
-		}
-	}
-# elif defined(MICROBLAZE)
+#elif defined(MICROBLAZE)
 	if (upeek(tcp, 0, &scno) < 0)
 		return -1;
-# endif
-#endif /* LINUX */
+#endif
 
-#ifdef SUNOS4
-	if (upeek(tcp, uoff(u_arg[7]), &scno) < 0)
-		return -1;
-#elif defined(SH)
+#if defined(SH)
 	/* new syscall ABI returns result in R0 */
 	if (upeek(tcp, 4*REG_REG0, (long *)&r0) < 0)
 		return -1;
@@ -1295,217 +1121,593 @@
 		return -1;
 #endif
 
-#ifdef USE_PROCFS
-# ifdef HAVE_PR_SYSCALL
-	scno = tcp->status.PR_SYSCALL;
-# else
-#  ifndef FREEBSD
-	scno = tcp->status.PR_WHAT;
-#  else
-	if (pread(tcp->pfd_reg, &regs, sizeof(regs), 0) < 0) {
-		perror("pread");
-		return -1;
-	}
-	switch (regs.r_eax) {
-	case SYS_syscall:
-	case SYS___syscall:
-		pread(tcp->pfd, &scno, sizeof(scno), regs.r_esp + sizeof(int));
-		break;
-	default:
-		scno = regs.r_eax;
-		break;
-	}
-#  endif /* FREEBSD */
-# endif /* !HAVE_PR_SYSCALL */
-#endif /* USE_PROCFS */
-
-	if (!(tcp->flags & TCB_INSYSCALL))
-		tcp->scno = scno;
+	tcp->scno = scno;
 	return 1;
 }
 
-
-long
-known_scno(struct tcb *tcp)
-{
-	long scno = tcp->scno;
-#if SUPPORTED_PERSONALITIES > 1
-	if (scno >= 0 && scno < nsyscalls && sysent[scno].native_scno != 0)
-		scno = sysent[scno].native_scno;
-	else
-#endif
-		scno += NR_SYSCALL_BASE;
-	return scno;
-}
-
-/* Called in trace_syscall() at each syscall entry and exit.
+/* Called at each syscall entry.
  * Returns:
- * 0: "ignore this syscall", bail out of trace_syscall() silently.
- * 1: ok, continue in trace_syscall().
- * other: error, trace_syscall() should print error indicator
+ * 0: "ignore this ptrace stop", bail out of trace_syscall_entering() silently.
+ * 1: ok, continue in trace_syscall_entering().
+ * other: error, trace_syscall_entering() should print error indicator
  *    ("????" etc) and bail out.
  */
 static int
-syscall_fixup(struct tcb *tcp)
+syscall_fixup_on_sysenter(struct tcb *tcp)
 {
-#ifdef USE_PROCFS
-	int scno = known_scno(tcp);
-
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		if (tcp->status.PR_WHY != PR_SYSENTRY) {
-			if (
-			    scno == SYS_fork
-#ifdef SYS_vfork
-			    || scno == SYS_vfork
-#endif /* SYS_vfork */
-#ifdef SYS_fork1
-			    || scno == SYS_fork1
-#endif /* SYS_fork1 */
-#ifdef SYS_forkall
-			    || scno == SYS_forkall
-#endif /* SYS_forkall */
-#ifdef SYS_rfork1
-			    || scno == SYS_rfork1
-#endif /* SYS_fork1 */
-#ifdef SYS_rforkall
-			    || scno == SYS_rforkall
-#endif /* SYS_rforkall */
-			    ) {
-				/* We are returning in the child, fake it. */
-				tcp->status.PR_WHY = PR_SYSENTRY;
-				trace_syscall(tcp);
-				tcp->status.PR_WHY = PR_SYSEXIT;
-			}
-			else {
-				fprintf(stderr, "syscall: missing entry\n");
-				tcp->flags |= TCB_INSYSCALL;
-			}
-		}
-	}
-	else {
-		if (tcp->status.PR_WHY != PR_SYSEXIT) {
-			fprintf(stderr, "syscall: missing exit\n");
-			tcp->flags &= ~TCB_INSYSCALL;
-		}
-	}
-#endif /* USE_PROCFS */
-#ifdef SUNOS4
-	if (!(tcp->flags & TCB_INSYSCALL)) {
-		if (scno == 0) {
-			fprintf(stderr, "syscall: missing entry\n");
-			tcp->flags |= TCB_INSYSCALL;
-		}
-	}
-	else {
-		if (scno != 0) {
-			if (debug) {
-				/*
-				 * This happens when a signal handler
-				 * for a signal which interrupted a
-				 * a system call makes another system call.
-				 */
-				fprintf(stderr, "syscall: missing exit\n");
-			}
-			tcp->flags &= ~TCB_INSYSCALL;
-		}
-	}
-#endif /* SUNOS4 */
-#ifdef LINUX
-#if defined (I386)
-	if (upeek(tcp, 4*EAX, &eax) < 0)
-		return -1;
-	if (eax != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: eax = %ld\n", eax);
+	/* A common case of "not a syscall entry" is post-execve SIGTRAP */
+#if defined(I386)
+	if (i386_regs.eax != -ENOSYS) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (eax = %ld)\n", i386_regs.eax);
 		return 0;
 	}
-#elif defined (X86_64)
-	if (upeek(tcp, 8*RAX, &rax) < 0)
-		return -1;
-	if (current_personality == 1)
-		rax = (long int)(int)rax; /* sign extend from 32 bits */
-	if (rax != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: rax = %ld\n", rax);
-		return 0;
+#elif defined(X86_64) || defined(X32)
+	{
+		long rax = x86_64_regs.rax;
+		if (current_personality == 1)
+			rax = (int)rax; /* sign extend from 32 bits */
+		if (rax != -ENOSYS) {
+			if (debug_flag)
+				fprintf(stderr, "not a syscall entry (rax = %ld)\n", rax);
+			return 0;
+		}
 	}
-#elif defined (S390) || defined (S390X)
+#elif defined(S390) || defined(S390X)
+	/* TODO: we already fetched PT_GPR2 in get_scno
+	 * and stored it in syscall_mode, reuse it here
+	 * instead of re-fetching?
+	 */
 	if (upeek(tcp, PT_GPR2, &gpr2) < 0)
 		return -1;
 	if (syscall_mode != -ENOSYS)
 		syscall_mode = tcp->scno;
-	if (gpr2 != syscall_mode && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: gpr2 = %ld\n", gpr2);
+	if (gpr2 != syscall_mode) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (gpr2 = %ld)\n", gpr2);
 		return 0;
 	}
-	else if (((tcp->flags & (TCB_INSYSCALL|TCB_WAITEXECVE))
-		  == (TCB_INSYSCALL|TCB_WAITEXECVE))
-		 && (gpr2 == -ENOSYS || gpr2 == tcp->scno)) {
-		/*
-		 * Fake a return value of zero.  We leave the TCB_WAITEXECVE
-		 * flag set for the post-execve SIGTRAP to see and reset.
-		 */
-		gpr2 = 0;
-	}
-#elif defined (POWERPC)
-# define SO_MASK 0x10000000
-	if (upeek(tcp, sizeof(unsigned long)*PT_CCR, &flags) < 0)
-		return -1;
-	if (upeek(tcp, sizeof(unsigned long)*PT_R3, &result) < 0)
-		return -1;
-	if (flags & SO_MASK)
-		result = -result;
-#elif defined (M68K)
+#elif defined(M68K)
+	/* TODO? Eliminate upeek's in arches below like we did in x86 */
 	if (upeek(tcp, 4*PT_D0, &d0) < 0)
 		return -1;
-	if (d0 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: d0 = %ld\n", d0);
+	if (d0 != -ENOSYS) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (d0 = %ld)\n", d0);
 		return 0;
 	}
-#elif defined (ARM)
-	/*
-	 * Nothing required
-	 */
-#elif defined(BFIN)
-	if (upeek(tcp, PT_R0, &r0) < 0)
-		return -1;
-#elif defined (HPPA)
-	if (upeek(tcp, PT_GR28, &r28) < 0)
-		return -1;
 #elif defined(IA64)
 	if (upeek(tcp, PT_R10, &r10) < 0)
 		return -1;
 	if (upeek(tcp, PT_R8, &r8) < 0)
 		return -1;
-	if (ia32 && r8 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: r8 = %ld\n", r8);
+	if (ia32 && r8 != -ENOSYS) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (r8 = %ld)\n", r8);
 		return 0;
 	}
 #elif defined(CRISV10) || defined(CRISV32)
 	if (upeek(tcp, 4*PT_R10, &r10) < 0)
 		return -1;
-	if (r10 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: r10 = %ld\n", r10);
+	if (r10 != -ENOSYS) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (r10 = %ld)\n", r10);
 		return 0;
 	}
 #elif defined(MICROBLAZE)
 	if (upeek(tcp, 3 * 4, &r3) < 0)
 		return -1;
-	if (r3 != -ENOSYS && !(tcp->flags & TCB_INSYSCALL)) {
-		if (debug)
-			fprintf(stderr, "stray syscall exit: r3 = %ld\n", r3);
+	if (r3 != -ENOSYS) {
+		if (debug_flag)
+			fprintf(stderr, "not a syscall entry (r3 = %ld)\n", r3);
 		return 0;
 	}
 #endif
-#endif /* LINUX */
 	return 1;
 }
 
-#ifdef LINUX
+static void
+internal_fork(struct tcb *tcp)
+{
+#if defined S390 || defined S390X || defined CRISV10 || defined CRISV32
+# define ARG_FLAGS	1
+#else
+# define ARG_FLAGS	0
+#endif
+#ifndef CLONE_UNTRACED
+# define CLONE_UNTRACED	0x00800000
+#endif
+	if ((ptrace_setoptions
+	    & (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
+	   == (PTRACE_O_TRACECLONE | PTRACE_O_TRACEFORK | PTRACE_O_TRACEVFORK))
+		return;
+
+	if (!followfork)
+		return;
+
+	if (entering(tcp)) {
+		/*
+		 * We won't see the new child if clone is called with
+		 * CLONE_UNTRACED, so we keep the same logic with that option
+		 * and don't trace it.
+		 */
+		if ((sysent[tcp->scno].sys_func == sys_clone) &&
+		    (tcp->u_arg[ARG_FLAGS] & CLONE_UNTRACED))
+			return;
+		setbpt(tcp);
+	} else {
+		if (tcp->flags & TCB_BPTSET)
+			clearbpt(tcp);
+	}
+}
+
+#if defined(TCB_WAITEXECVE)
+static void
+internal_exec(struct tcb *tcp)
+{
+	/* Maybe we have post-execve SIGTRAP suppressed? */
+	if (ptrace_setoptions & PTRACE_O_TRACEEXEC)
+		return; /* yes, no need to do anything */
+
+	if (exiting(tcp) && syserror(tcp))
+		/* Error in execve, no post-execve SIGTRAP expected */
+		tcp->flags &= ~TCB_WAITEXECVE;
+	else
+		tcp->flags |= TCB_WAITEXECVE;
+}
+#endif
+
+static void
+internal_syscall(struct tcb *tcp)
+{
+	/*
+	 * We must always trace a few critical system calls in order to
+	 * correctly support following forks in the presence of tracing
+	 * qualifiers.
+	 */
+	int (*func)();
+
+	if (!SCNO_IN_RANGE(tcp->scno))
+		return;
+
+	func = sysent[tcp->scno].sys_func;
+
+	if (   sys_fork == func
+	    || sys_vfork == func
+	    || sys_clone == func
+	   ) {
+		internal_fork(tcp);
+		return;
+	}
+
+#if defined(TCB_WAITEXECVE)
+	if (   sys_execve == func
+# if defined(SPARC) || defined(SPARC64)
+	    || sys_execv == func
+# endif
+	   ) {
+		internal_exec(tcp);
+		return;
+	}
+#endif
+}
+
+/* Return -1 on error or 1 on success (never 0!) */
+static int
+get_syscall_args(struct tcb *tcp)
+{
+	int i, nargs;
+
+	if (SCNO_IN_RANGE(tcp->scno))
+		nargs = tcp->u_nargs = sysent[tcp->scno].nargs;
+	else
+		nargs = tcp->u_nargs = MAX_ARGS;
+
+#if defined(S390) || defined(S390X)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, i==0 ? PT_ORIGGPR2 : PT_GPR2 + i*sizeof(long), &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(ALPHA)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(IA64)
+	if (!ia32) {
+		unsigned long *out0, cfm, sof, sol;
+		long rbs_end;
+		/* be backwards compatible with kernel < 2.4.4... */
+#		ifndef PT_RBS_END
+#		  define PT_RBS_END	PT_AR_BSP
+#		endif
+
+		if (upeek(tcp, PT_RBS_END, &rbs_end) < 0)
+			return -1;
+		if (upeek(tcp, PT_CFM, (long *) &cfm) < 0)
+			return -1;
+
+		sof = (cfm >> 0) & 0x7f;
+		sol = (cfm >> 7) & 0x7f;
+		out0 = ia64_rse_skip_regs((unsigned long *) rbs_end, -sof + sol);
+
+		for (i = 0; i < nargs; ++i) {
+			if (umoven(tcp, (unsigned long) ia64_rse_skip_regs(out0, i),
+				   sizeof(long), (char *) &tcp->u_arg[i]) < 0)
+				return -1;
+		}
+	} else {
+		static const int argreg[MAX_ARGS] = { PT_R11 /* EBX = out0 */,
+						      PT_R9  /* ECX = out1 */,
+						      PT_R10 /* EDX = out2 */,
+						      PT_R14 /* ESI = out3 */,
+						      PT_R15 /* EDI = out4 */,
+						      PT_R13 /* EBP = out5 */};
+
+		for (i = 0; i < nargs; ++i) {
+			if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
+				return -1;
+			/* truncate away IVE sign-extension */
+			tcp->u_arg[i] &= 0xffffffff;
+		}
+	}
+#elif defined(LINUX_MIPSN32) || defined(LINUX_MIPSN64)
+	/* N32 and N64 both use up to six registers.  */
+	unsigned long long regs[38];
+
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
+		return -1;
+
+	for (i = 0; i < nargs; ++i) {
+		tcp->u_arg[i] = regs[REG_A0 + i];
+# if defined(LINUX_MIPSN32)
+		tcp->ext_arg[i] = regs[REG_A0 + i];
+# endif
+	}
+#elif defined(MIPS)
+	if (nargs > 4) {
+		long sp;
+
+		if (upeek(tcp, REG_SP, &sp) < 0)
+			return -1;
+		for (i = 0; i < 4; ++i)
+			if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0)
+				return -1;
+		umoven(tcp, sp + 16, (nargs - 4) * sizeof(tcp->u_arg[0]),
+		       (char *)(tcp->u_arg + 4));
+	} else {
+		for (i = 0; i < nargs; ++i)
+			if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0)
+				return -1;
+	}
+#elif defined(POWERPC)
+# ifndef PT_ORIG_R3
+#  define PT_ORIG_R3 34
+# endif
+	for (i = 0; i < nargs; ++i) {
+		if (upeek(tcp, (i==0) ?
+			(sizeof(unsigned long) * PT_ORIG_R3) :
+			((i+PT_R3) * sizeof(unsigned long)),
+				&tcp->u_arg[i]) < 0)
+			return -1;
+	}
+#elif defined(SPARC) || defined(SPARC64)
+	for (i = 0; i < nargs; ++i)
+		tcp->u_arg[i] = regs.u_regs[U_REG_O0 + i];
+#elif defined(HPPA)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(ARM)
+	for (i = 0; i < nargs; ++i)
+		tcp->u_arg[i] = regs.uregs[i];
+#elif defined(AVR32)
+	(void)i;
+	(void)nargs;
+	tcp->u_arg[0] = regs.r12;
+	tcp->u_arg[1] = regs.r11;
+	tcp->u_arg[2] = regs.r10;
+	tcp->u_arg[3] = regs.r9;
+	tcp->u_arg[4] = regs.r5;
+	tcp->u_arg[5] = regs.r3;
+#elif defined(BFIN)
+	static const int argreg[MAX_ARGS] = { PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5 };
+
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(SH)
+	static const int syscall_regs[MAX_ARGS] = {
+		4 * (REG_REG0+4), 4 * (REG_REG0+5), 4 * (REG_REG0+6),
+		4 * (REG_REG0+7), 4 * (REG_REG0  ), 4 * (REG_REG0+1)
+	};
+
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, syscall_regs[i], &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(SH64)
+	int i;
+	/* Registers used by SH5 Linux system calls for parameters */
+	static const int syscall_regs[MAX_ARGS] = { 2, 3, 4, 5, 6, 7 };
+
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, REG_GENERAL(syscall_regs[i]), &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(X86_64) || defined(X32)
+	(void)i;
+	(void)nargs;
+	if (current_personality != 1) { /* x86-64 or x32 ABI */
+		tcp->u_arg[0] = x86_64_regs.rdi;
+		tcp->u_arg[1] = x86_64_regs.rsi;
+		tcp->u_arg[2] = x86_64_regs.rdx;
+		tcp->u_arg[3] = x86_64_regs.r10;
+		tcp->u_arg[4] = x86_64_regs.r8;
+		tcp->u_arg[5] = x86_64_regs.r9;
+#  ifdef X32
+		tcp->ext_arg[0] = x86_64_regs.rdi;
+		tcp->ext_arg[1] = x86_64_regs.rsi;
+		tcp->ext_arg[2] = x86_64_regs.rdx;
+		tcp->ext_arg[3] = x86_64_regs.r10;
+		tcp->ext_arg[4] = x86_64_regs.r8;
+		tcp->ext_arg[5] = x86_64_regs.r9;
+#  endif
+	} else { /* i386 ABI */
+		/* Sign-extend lower 32 bits */
+		tcp->u_arg[0] = (long)(int)x86_64_regs.rbx;
+		tcp->u_arg[1] = (long)(int)x86_64_regs.rcx;
+		tcp->u_arg[2] = (long)(int)x86_64_regs.rdx;
+		tcp->u_arg[3] = (long)(int)x86_64_regs.rsi;
+		tcp->u_arg[4] = (long)(int)x86_64_regs.rdi;
+		tcp->u_arg[5] = (long)(int)x86_64_regs.rbp;
+	}
+#elif defined(MICROBLAZE)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(CRISV10) || defined(CRISV32)
+	static const int crisregs[MAX_ARGS] = {
+		4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12,
+		4*PT_R13     , 4*PT_MOF, 4*PT_SRP
+	};
+
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, crisregs[i], &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(TILE)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, PTREGS_OFFSET_REG(i), &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(M68K)
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0)
+			return -1;
+#elif defined(I386)
+	(void)i;
+	(void)nargs;
+	tcp->u_arg[0] = i386_regs.ebx;
+	tcp->u_arg[1] = i386_regs.ecx;
+	tcp->u_arg[2] = i386_regs.edx;
+	tcp->u_arg[3] = i386_regs.esi;
+	tcp->u_arg[4] = i386_regs.edi;
+	tcp->u_arg[5] = i386_regs.ebp;
+#else /* Other architecture (32bits specific) */
+	for (i = 0; i < nargs; ++i)
+		if (upeek(tcp, i*4, &tcp->u_arg[i]) < 0)
+			return -1;
+#endif
+	return 1;
+}
+
+static int
+trace_syscall_entering(struct tcb *tcp)
+{
+	int res, scno_good;
+
+#if defined TCB_WAITEXECVE
+	if (tcp->flags & TCB_WAITEXECVE) {
+		/* This is the post-execve SIGTRAP. */
+		tcp->flags &= ~TCB_WAITEXECVE;
+		return 0;
+	}
+#endif
+
+	scno_good = res = get_scno(tcp);
+	if (res == 0)
+		return res;
+	if (res == 1) {
+		res = syscall_fixup_on_sysenter(tcp);
+		if (res == 0)
+			return res;
+		if (res == 1)
+			res = get_syscall_args(tcp);
+	}
+
+	if (res != 1) {
+		printleader(tcp);
+		if (scno_good != 1)
+			tprints("????" /* anti-trigraph gap */ "(");
+		else if (!SCNO_IN_RANGE(tcp->scno))
+			tprintf("syscall_%lu(", tcp->scno);
+		else
+			tprintf("%s(", sysent[tcp->scno].sys_name);
+		/*
+		 * " <unavailable>" will be added later by the code which
+		 * detects ptrace errors.
+		 */
+		goto ret;
+	}
+
+#if defined(SYS_socket_subcall) || defined(SYS_ipc_subcall)
+	while (SCNO_IN_RANGE(tcp->scno)) {
+# ifdef SYS_socket_subcall
+		if (sysent[tcp->scno].sys_func == sys_socketcall) {
+			decode_socket_subcall(tcp);
+			break;
+		}
+# endif
+# ifdef SYS_ipc_subcall
+		if (sysent[tcp->scno].sys_func == sys_ipc) {
+			decode_ipc_subcall(tcp);
+			break;
+		}
+# endif
+		break;
+	}
+#endif /* SYS_socket_subcall || SYS_ipc_subcall */
+
+	internal_syscall(tcp);
+
+	if ((SCNO_IN_RANGE(tcp->scno) &&
+	     !(qual_flags[tcp->scno] & QUAL_TRACE)) ||
+	    (tracing_paths && !pathtrace_match(tcp))) {
+		tcp->flags |= TCB_INSYSCALL | TCB_FILTERED;
+		return 0;
+	}
+
+	tcp->flags &= ~TCB_FILTERED;
+
+	if (cflag == CFLAG_ONLY_STATS) {
+		res = 0;
+		goto ret;
+	}
+
+	printleader(tcp);
+	if (!SCNO_IN_RANGE(tcp->scno))
+		tprintf("syscall_%lu(", tcp->scno);
+	else
+		tprintf("%s(", sysent[tcp->scno].sys_name);
+	if (!SCNO_IN_RANGE(tcp->scno) ||
+	    ((qual_flags[tcp->scno] & QUAL_RAW) &&
+	     sysent[tcp->scno].sys_func != sys_exit))
+		res = printargs(tcp);
+	else
+		res = (*sysent[tcp->scno].sys_func)(tcp);
+
+	if (fflush(tcp->outf) == EOF)
+		return -1;
+ ret:
+	tcp->flags |= TCB_INSYSCALL;
+	/* Measure the entrance time as late as possible to avoid errors. */
+	if (Tflag || cflag)
+		gettimeofday(&tcp->etime, NULL);
+	return res;
+}
+
+/* Returns:
+ * 1: ok, continue in trace_syscall_exiting().
+ * -1: error, trace_syscall_exiting() should print error indicator
+ *    ("????" etc) and bail out.
+ */
+static int
+get_syscall_result(struct tcb *tcp)
+{
+#if defined(S390) || defined(S390X)
+	if (upeek(tcp, PT_GPR2, &gpr2) < 0)
+		return -1;
+#elif defined(POWERPC)
+# define SO_MASK 0x10000000
+	{
+		long flags;
+		if (upeek(tcp, sizeof(unsigned long)*PT_CCR, &flags) < 0)
+			return -1;
+		if (upeek(tcp, sizeof(unsigned long)*PT_R3, &ppc_result) < 0)
+			return -1;
+		if (flags & SO_MASK)
+			ppc_result = -ppc_result;
+	}
+#elif defined(AVR32)
+	/* Read complete register set in one go. */
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, &regs) < 0)
+		return -1;
+#elif defined(BFIN)
+	if (upeek(tcp, PT_R0, &r0) < 0)
+		return -1;
+#elif defined(I386)
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &i386_regs) < 0)
+		return -1;
+#elif defined(X86_64) || defined(X32)
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &x86_64_regs) < 0)
+		return -1;
+#elif defined(IA64)
+#	define IA64_PSR_IS	((long)1 << 34)
+	if (upeek(tcp, PT_CR_IPSR, &psr) >= 0)
+		ia32 = (psr & IA64_PSR_IS) != 0;
+	if (upeek(tcp, PT_R8, &r8) < 0)
+		return -1;
+	if (upeek(tcp, PT_R10, &r10) < 0)
+		return -1;
+#elif defined(ARM)
+	/* Read complete register set in one go. */
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (void *)&regs) == -1)
+		return -1;
+#elif defined(M68K)
+	if (upeek(tcp, 4*PT_D0, &d0) < 0)
+		return -1;
+#elif defined(LINUX_MIPSN32)
+	unsigned long long regs[38];
+
+	if (ptrace(PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
+		return -1;
+	a3 = regs[REG_A3];
+	r2 = regs[REG_V0];
+#elif defined(MIPS)
+	if (upeek(tcp, REG_A3, &a3) < 0)
+		return -1;
+	if (upeek(tcp, REG_V0, &r2) < 0)
+		return -1;
+#elif defined(ALPHA)
+	if (upeek(tcp, REG_A3, &a3) < 0)
+		return -1;
+	if (upeek(tcp, REG_R0, &r0) < 0)
+		return -1;
+#elif defined(SPARC) || defined(SPARC64)
+	/* Everything we need is in the current register set. */
+	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0)
+		return -1;
+#elif defined(HPPA)
+	if (upeek(tcp, PT_GR28, &r28) < 0)
+		return -1;
+#elif defined(SH)
+#elif defined(SH64)
+#elif defined(CRISV10) || defined(CRISV32)
+	if (upeek(tcp, 4*PT_R10, &r10) < 0)
+		return -1;
+#elif defined(TILE)
+#elif defined(MICROBLAZE)
+	if (upeek(tcp, 3 * 4, &r3) < 0)
+		return -1;
+#endif
+
+#if defined(SH)
+	/* new syscall ABI returns result in R0 */
+	if (upeek(tcp, 4*REG_REG0, (long *)&r0) < 0)
+		return -1;
+#elif defined(SH64)
+	/* ABI defines result returned in r9 */
+	if (upeek(tcp, REG_GENERAL(9), (long *)&r9) < 0)
+		return -1;
+#endif
+
+	return 1;
+}
+
+/* Called at each syscall exit */
+static void
+syscall_fixup_on_sysexit(struct tcb *tcp)
+{
+#if defined(S390) || defined(S390X)
+	if (syscall_mode != -ENOSYS)
+		syscall_mode = tcp->scno;
+	if ((tcp->flags & TCB_WAITEXECVE)
+		 && (gpr2 == -ENOSYS || gpr2 == tcp->scno)) {
+		/*
+		 * Return from execve.
+		 * Fake a return value of zero.  We leave the TCB_WAITEXECVE
+		 * flag set for the post-execve SIGTRAP to see and reset.
+		 */
+		gpr2 = 0;
+	}
+#endif
+}
+
 /*
  * Check the syscall return value register value for whether it is
  * a negated errno code indicating an error, or a success return value.
@@ -1514,52 +1716,57 @@
 is_negated_errno(unsigned long int val)
 {
 	unsigned long int max = -(long int) nerrnos;
-	if (personality_wordsize[current_personality] < sizeof(val)) {
+#if SUPPORTED_PERSONALITIES > 1
+	if (current_wordsize < sizeof(val)) {
 		val = (unsigned int) val;
 		max = (unsigned int) max;
 	}
+#endif
 	return val > max;
 }
-#endif
 
+/* Returns:
+ * 1: ok, continue in trace_syscall_exiting().
+ * -1: error, trace_syscall_exiting() should print error indicator
+ *    ("????" etc) and bail out.
+ */
 static int
 get_error(struct tcb *tcp)
 {
 	int u_error = 0;
-#ifdef LINUX
 	int check_errno = 1;
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls &&
+	if (SCNO_IN_RANGE(tcp->scno) &&
 	    sysent[tcp->scno].sys_flags & SYSCALL_NEVER_FAILS) {
 		check_errno = 0;
 	}
-# if defined(S390) || defined(S390X)
+#if defined(S390) || defined(S390X)
 	if (check_errno && is_negated_errno(gpr2)) {
 		tcp->u_rval = -1;
 		u_error = -gpr2;
 	}
 	else {
 		tcp->u_rval = gpr2;
-		u_error = 0;
 	}
-# elif defined(I386)
-	if (check_errno && is_negated_errno(eax)) {
+#elif defined(I386)
+	if (check_errno && is_negated_errno(i386_regs.eax)) {
 		tcp->u_rval = -1;
-		u_error = -eax;
+		u_error = -i386_regs.eax;
 	}
 	else {
-		tcp->u_rval = eax;
-		u_error = 0;
+		tcp->u_rval = i386_regs.eax;
 	}
-# elif defined(X86_64)
-	if (check_errno && is_negated_errno(rax)) {
+#elif defined(X86_64) || defined(X32)
+	if (check_errno && is_negated_errno(x86_64_regs.rax)) {
 		tcp->u_rval = -1;
-		u_error = -rax;
+		u_error = -x86_64_regs.rax;
 	}
 	else {
-		tcp->u_rval = rax;
-		u_error = 0;
+		tcp->u_rval = x86_64_regs.rax;
+# if defined(X32)
+		tcp->u_lrval = x86_64_regs.rax;
+# endif
 	}
-# elif defined(IA64)
+#elif defined(IA64)
 	if (ia32) {
 		int err;
 
@@ -1570,7 +1777,6 @@
 		}
 		else {
 			tcp->u_rval = err;
-			u_error = 0;
 		}
 	} else {
 		if (check_errno && r10) {
@@ -1578,819 +1784,168 @@
 			u_error = r8;
 		} else {
 			tcp->u_rval = r8;
-			u_error = 0;
 		}
 	}
-# elif defined(MIPS)
-		if (check_errno && a3) {
-			tcp->u_rval = -1;
-			u_error = r2;
-		} else {
-			tcp->u_rval = r2;
-			u_error = 0;
-		}
-# elif defined(POWERPC)
-		if (check_errno && is_negated_errno(result)) {
-			tcp->u_rval = -1;
-			u_error = -result;
-		}
-		else {
-			tcp->u_rval = result;
-			u_error = 0;
-		}
-# elif defined(M68K)
-		if (check_errno && is_negated_errno(d0)) {
-			tcp->u_rval = -1;
-			u_error = -d0;
-		}
-		else {
-			tcp->u_rval = d0;
-			u_error = 0;
-		}
-# elif defined(ARM)
-		if (check_errno && is_negated_errno(regs.ARM_r0)) {
-			tcp->u_rval = -1;
-			u_error = -regs.ARM_r0;
-		}
-		else {
-			tcp->u_rval = regs.ARM_r0;
-			u_error = 0;
-		}
-# elif defined(AVR32)
-		if (check_errno && regs.r12 && (unsigned) -regs.r12 < nerrnos) {
-			tcp->u_rval = -1;
-			u_error = -regs.r12;
-		}
-		else {
-			tcp->u_rval = regs.r12;
-			u_error = 0;
-		}
-# elif defined(BFIN)
-		if (check_errno && is_negated_errno(r0)) {
-			tcp->u_rval = -1;
-			u_error = -r0;
-		} else {
-			tcp->u_rval = r0;
-			u_error = 0;
-		}
-# elif defined(ALPHA)
-		if (check_errno && a3) {
-			tcp->u_rval = -1;
-			u_error = r0;
-		}
-		else {
-			tcp->u_rval = r0;
-			u_error = 0;
-		}
-# elif defined(SPARC)
-		if (check_errno && regs.psr & PSR_C) {
-			tcp->u_rval = -1;
-			u_error = regs.u_regs[U_REG_O0];
-		}
-		else {
-			tcp->u_rval = regs.u_regs[U_REG_O0];
-			u_error = 0;
-		}
-# elif defined(SPARC64)
-		if (check_errno && regs.tstate & 0x1100000000UL) {
-			tcp->u_rval = -1;
-			u_error = regs.u_regs[U_REG_O0];
-		}
-		else {
-			tcp->u_rval = regs.u_regs[U_REG_O0];
-			u_error = 0;
-		}
-# elif defined(HPPA)
-		if (check_errno && is_negated_errno(r28)) {
-			tcp->u_rval = -1;
-			u_error = -r28;
-		}
-		else {
-			tcp->u_rval = r28;
-			u_error = 0;
-		}
-# elif defined(SH)
-		/* interpret R0 as return value or error number */
-		if (check_errno && is_negated_errno(r0)) {
-			tcp->u_rval = -1;
-			u_error = -r0;
-		}
-		else {
-			tcp->u_rval = r0;
-			u_error = 0;
-		}
-# elif defined(SH64)
-		/* interpret result as return value or error number */
-		if (check_errno && is_negated_errno(r9)) {
-			tcp->u_rval = -1;
-			u_error = -r9;
-		}
-		else {
-			tcp->u_rval = r9;
-			u_error = 0;
-		}
-# elif defined(CRISV10) || defined(CRISV32)
-		if (check_errno && r10 && (unsigned) -r10 < nerrnos) {
-			tcp->u_rval = -1;
-			u_error = -r10;
-		}
-		else {
-			tcp->u_rval = r10;
-			u_error = 0;
-		}
-# elif defined(TILE)
-		long rval;
-		/* interpret result as return value or error number */
-		if (upeek(tcp, PTREGS_OFFSET_REG(0), &rval) < 0)
-			return -1;
-		if (check_errno && rval < 0 && rval > -nerrnos) {
-			tcp->u_rval = -1;
-			u_error = -rval;
-		}
-		else {
-			tcp->u_rval = rval;
-			u_error = 0;
-		}
-# elif defined(MICROBLAZE)
-		/* interpret result as return value or error number */
-		if (check_errno && is_negated_errno(r3)) {
-			tcp->u_rval = -1;
-			u_error = -r3;
-		}
-		else {
-			tcp->u_rval = r3;
-			u_error = 0;
-		}
+#elif defined(MIPS)
+	if (check_errno && a3) {
+		tcp->u_rval = -1;
+		u_error = r2;
+	} else {
+		tcp->u_rval = r2;
+# if defined(LINUX_MIPSN32)
+		tcp->u_lrval = r2;
 # endif
-#endif /* LINUX */
-#ifdef SUNOS4
-		/* get error code from user struct */
-		if (upeek(tcp, uoff(u_error), &u_error) < 0)
-			return -1;
-		u_error >>= 24; /* u_error is a char */
-
-		/* get system call return value */
-		if (upeek(tcp, uoff(u_rval1), &tcp->u_rval) < 0)
-			return -1;
-#endif /* SUNOS4 */
-#ifdef SVR4
-#ifdef SPARC
-		/* Judicious guessing goes a long way. */
-		if (tcp->status.pr_reg[R_PSR] & 0x100000) {
-			tcp->u_rval = -1;
-			u_error = tcp->status.pr_reg[R_O0];
-		}
-		else {
-			tcp->u_rval = tcp->status.pr_reg[R_O0];
-			u_error = 0;
-		}
-#endif /* SPARC */
-#ifdef I386
-		/* Wanna know how to kill an hour single-stepping? */
-		if (tcp->status.PR_REG[EFL] & 0x1) {
-			tcp->u_rval = -1;
-			u_error = tcp->status.PR_REG[EAX];
-		}
-		else {
-			tcp->u_rval = tcp->status.PR_REG[EAX];
-#ifdef HAVE_LONG_LONG
-			tcp->u_lrval =
-				((unsigned long long) tcp->status.PR_REG[EDX] << 32) +
-				tcp->status.PR_REG[EAX];
+	}
+#elif defined(POWERPC)
+	if (check_errno && is_negated_errno(ppc_result)) {
+		tcp->u_rval = -1;
+		u_error = -ppc_result;
+	}
+	else {
+		tcp->u_rval = ppc_result;
+	}
+#elif defined(M68K)
+	if (check_errno && is_negated_errno(d0)) {
+		tcp->u_rval = -1;
+		u_error = -d0;
+	}
+	else {
+		tcp->u_rval = d0;
+	}
+#elif defined(ARM)
+	if (check_errno && is_negated_errno(regs.ARM_r0)) {
+		tcp->u_rval = -1;
+		u_error = -regs.ARM_r0;
+	}
+	else {
+		tcp->u_rval = regs.ARM_r0;
+	}
+#elif defined(AVR32)
+	if (check_errno && regs.r12 && (unsigned) -regs.r12 < nerrnos) {
+		tcp->u_rval = -1;
+		u_error = -regs.r12;
+	}
+	else {
+		tcp->u_rval = regs.r12;
+	}
+#elif defined(BFIN)
+	if (check_errno && is_negated_errno(r0)) {
+		tcp->u_rval = -1;
+		u_error = -r0;
+	} else {
+		tcp->u_rval = r0;
+	}
+#elif defined(ALPHA)
+	if (check_errno && a3) {
+		tcp->u_rval = -1;
+		u_error = r0;
+	}
+	else {
+		tcp->u_rval = r0;
+	}
+#elif defined(SPARC)
+	if (check_errno && regs.psr & PSR_C) {
+		tcp->u_rval = -1;
+		u_error = regs.u_regs[U_REG_O0];
+	}
+	else {
+		tcp->u_rval = regs.u_regs[U_REG_O0];
+	}
+#elif defined(SPARC64)
+	if (check_errno && regs.tstate & 0x1100000000UL) {
+		tcp->u_rval = -1;
+		u_error = regs.u_regs[U_REG_O0];
+	}
+	else {
+		tcp->u_rval = regs.u_regs[U_REG_O0];
+	}
+#elif defined(HPPA)
+	if (check_errno && is_negated_errno(r28)) {
+		tcp->u_rval = -1;
+		u_error = -r28;
+	}
+	else {
+		tcp->u_rval = r28;
+	}
+#elif defined(SH)
+	if (check_errno && is_negated_errno(r0)) {
+		tcp->u_rval = -1;
+		u_error = -r0;
+	}
+	else {
+		tcp->u_rval = r0;
+	}
+#elif defined(SH64)
+	if (check_errno && is_negated_errno(r9)) {
+		tcp->u_rval = -1;
+		u_error = -r9;
+	}
+	else {
+		tcp->u_rval = r9;
+	}
+#elif defined(CRISV10) || defined(CRISV32)
+	if (check_errno && r10 && (unsigned) -r10 < nerrnos) {
+		tcp->u_rval = -1;
+		u_error = -r10;
+	}
+	else {
+		tcp->u_rval = r10;
+	}
+#elif defined(TILE)
+	long rval;
+	if (upeek(tcp, PTREGS_OFFSET_REG(0), &rval) < 0)
+		return -1;
+	if (check_errno && rval < 0 && rval > -nerrnos) {
+		tcp->u_rval = -1;
+		u_error = -rval;
+	}
+	else {
+		tcp->u_rval = rval;
+	}
+#elif defined(MICROBLAZE)
+	if (check_errno && is_negated_errno(r3)) {
+		tcp->u_rval = -1;
+		u_error = -r3;
+	}
+	else {
+		tcp->u_rval = r3;
+	}
 #endif
-			u_error = 0;
-		}
-#endif /* I386 */
-#ifdef X86_64
-		/* Wanna know how to kill an hour single-stepping? */
-		if (tcp->status.PR_REG[EFLAGS] & 0x1) {
-			tcp->u_rval = -1;
-			u_error = tcp->status.PR_REG[RAX];
-		}
-		else {
-			tcp->u_rval = tcp->status.PR_REG[RAX];
-			u_error = 0;
-		}
-#endif /* X86_64 */
-#ifdef MIPS
-		if (tcp->status.pr_reg[CTX_A3]) {
-			tcp->u_rval = -1;
-			u_error = tcp->status.pr_reg[CTX_V0];
-		}
-		else {
-			tcp->u_rval = tcp->status.pr_reg[CTX_V0];
-			u_error = 0;
-		}
-#endif /* MIPS */
-#endif /* SVR4 */
-#ifdef FREEBSD
-		if (regs.r_eflags & PSL_C) {
-			tcp->u_rval = -1;
-		        u_error = regs.r_eax;
-		} else {
-			tcp->u_rval = regs.r_eax;
-			tcp->u_lrval =
-			  ((unsigned long long) regs.r_edx << 32) +  regs.r_eax;
-		        u_error = 0;
-		}
-#endif /* FREEBSD */
 	tcp->u_error = u_error;
 	return 1;
 }
 
-int
-force_result(tcp, error, rval)
-	struct tcb *tcp;
-	int error;
-	long rval;
+static void
+dumpio(struct tcb *tcp)
 {
-#ifdef LINUX
-# if defined(S390) || defined(S390X)
-	gpr2 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)PT_GPR2, gpr2) < 0)
-		return -1;
-# elif defined(I386)
-	eax = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(EAX * 4), eax) < 0)
-		return -1;
-# elif defined(X86_64)
-	rax = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(RAX * 8), rax) < 0)
-		return -1;
-# elif defined(IA64)
-	if (ia32) {
-		r8 = error ? -error : rval;
-		if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R8), r8) < 0)
-			return -1;
+	if (syserror(tcp))
+		return;
+	if (tcp->u_arg[0] < 0 || tcp->u_arg[0] >= MAX_QUALS)
+		return;
+	if (!SCNO_IN_RANGE(tcp->scno))
+		return;
+	if (sysent[tcp->scno].sys_func == printargs)
+		return;
+	if (qual_flags[tcp->u_arg[0]] & QUAL_READ) {
+		if (sysent[tcp->scno].sys_func == sys_read ||
+		    sysent[tcp->scno].sys_func == sys_pread ||
+		    sysent[tcp->scno].sys_func == sys_recv ||
+		    sysent[tcp->scno].sys_func == sys_recvfrom)
+			dumpstr(tcp, tcp->u_arg[1], tcp->u_rval);
+		else if (sysent[tcp->scno].sys_func == sys_readv)
+			dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
+		return;
 	}
-	else {
-		if (error) {
-			r8 = error;
-			r10 = -1;
-		}
-		else {
-			r8 = rval;
-			r10 = 0;
-		}
-		if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R8), r8) < 0 ||
-		    ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R10), r10) < 0)
-			return -1;
+	if (qual_flags[tcp->u_arg[0]] & QUAL_WRITE) {
+		if (sysent[tcp->scno].sys_func == sys_write ||
+		    sysent[tcp->scno].sys_func == sys_pwrite ||
+		    sysent[tcp->scno].sys_func == sys_send ||
+		    sysent[tcp->scno].sys_func == sys_sendto)
+			dumpstr(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+		else if (sysent[tcp->scno].sys_func == sys_writev)
+			dumpiov(tcp, tcp->u_arg[2], tcp->u_arg[1]);
+		return;
 	}
-# elif defined(BFIN)
-	r0 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)PT_R0, r0) < 0)
-		return -1;
-# elif defined(MIPS)
-	if (error) {
-		r2 = error;
-		a3 = -1;
-	}
-	else {
-		r2 = rval;
-		a3 = 0;
-	}
-	/* PTRACE_POKEUSER is OK even for n32 since rval is only a long.  */
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), a3) < 0 ||
-	    ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), r2) < 0)
-		return -1;
-# elif defined(POWERPC)
-	if (upeek(tcp, sizeof(unsigned long)*PT_CCR, &flags) < 0)
-		return -1;
-	if (error) {
-		flags |= SO_MASK;
-		result = error;
-	}
-	else {
-		flags &= ~SO_MASK;
-		result = rval;
-	}
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(sizeof(unsigned long)*PT_CCR), flags) < 0 ||
-	    ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(sizeof(unsigned long)*PT_R3), result) < 0)
-		return -1;
-# elif defined(M68K)
-	d0 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_D0), d0) < 0)
-		return -1;
-# elif defined(ARM)
-	regs.ARM_r0 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*0), regs.ARM_r0) < 0)
-		return -1;
-# elif defined(AVR32)
-	regs.r12 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_R12, regs.r12) < 0)
-		return -1;
-# elif defined(ALPHA)
-	if (error) {
-		a3 = -1;
-		r0 = error;
-	}
-	else {
-		a3 = 0;
-		r0 = rval;
-	}
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), a3) < 0 ||
-	    ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R0), r0) < 0)
-		return -1;
-# elif defined(SPARC)
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0)
-		return -1;
-	if (error) {
-		regs.psr |= PSR_C;
-		regs.u_regs[U_REG_O0] = error;
-	}
-	else {
-		regs.psr &= ~PSR_C;
-		regs.u_regs[U_REG_O0] = rval;
-	}
-	if (ptrace(PTRACE_SETREGS, tcp->pid, (char *)&regs, 0) < 0)
-		return -1;
-# elif defined(SPARC64)
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0)
-		return -1;
-	if (error) {
-		regs.tstate |= 0x1100000000UL;
-		regs.u_regs[U_REG_O0] = error;
-	}
-	else {
-		regs.tstate &= ~0x1100000000UL;
-		regs.u_regs[U_REG_O0] = rval;
-	}
-	if (ptrace(PTRACE_SETREGS, tcp->pid, (char *)&regs, 0) < 0)
-		return -1;
-# elif defined(HPPA)
-	r28 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GR28), r28) < 0)
-		return -1;
-# elif defined(SH)
-	r0 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*REG_REG0), r0) < 0)
-		return -1;
-# elif defined(SH64)
-	r9 = error ? -error : rval;
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)REG_GENERAL(9), r9) < 0)
-		return -1;
-# endif
-#endif /* LINUX */
-
-#ifdef SUNOS4
-	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)uoff(u_error),
-		   error << 24) < 0 ||
-	    ptrace(PTRACE_POKEUSER, tcp->pid, (char*)uoff(u_rval1), rval) < 0)
-		return -1;
-#endif /* SUNOS4 */
-
-#ifdef SVR4
-	/* XXX no clue */
-	return -1;
-#endif /* SVR4 */
-
-#ifdef FREEBSD
-	if (pread(tcp->pfd_reg, &regs, sizeof(regs), 0) < 0) {
-		perror("pread");
-		return -1;
-	}
-	if (error) {
-		regs.r_eflags |= PSL_C;
-		regs.r_eax = error;
-	}
-	else {
-		regs.r_eflags &= ~PSL_C;
-		regs.r_eax = rval;
-	}
-	if (pwrite(tcp->pfd_reg, &regs, sizeof(regs), 0) < 0) {
-		perror("pwrite");
-		return -1;
-	}
-#endif /* FREEBSD */
-
-	/* All branches reach here on success (only).  */
-	tcp->u_error = error;
-	tcp->u_rval = rval;
-	return 0;
-}
-
-static int
-syscall_enter(struct tcb *tcp)
-{
-#ifdef LINUX
-#if defined(S390) || defined(S390X)
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp,i==0 ? PT_ORIGGPR2:PT_GPR2+i*sizeof(long), &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined (ALPHA)
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			/* WTA: if scno is out-of-bounds this will bomb. Add range-check
-			 * for scno somewhere above here!
-			 */
-			if (upeek(tcp, REG_A0+i, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined (IA64)
-	{
-		if (!ia32) {
-			unsigned long *out0, cfm, sof, sol, i;
-			long rbs_end;
-			/* be backwards compatible with kernel < 2.4.4... */
-#			ifndef PT_RBS_END
-#			  define PT_RBS_END	PT_AR_BSP
-#			endif
-
-			if (upeek(tcp, PT_RBS_END, &rbs_end) < 0)
-				return -1;
-			if (upeek(tcp, PT_CFM, (long *) &cfm) < 0)
-				return -1;
-
-			sof = (cfm >> 0) & 0x7f;
-			sol = (cfm >> 7) & 0x7f;
-			out0 = ia64_rse_skip_regs((unsigned long *) rbs_end, -sof + sol);
-
-			if (tcp->scno >= 0 && tcp->scno < nsyscalls
-			    && sysent[tcp->scno].nargs != -1)
-				tcp->u_nargs = sysent[tcp->scno].nargs;
-			else
-				tcp->u_nargs = MAX_ARGS;
-			for (i = 0; i < tcp->u_nargs; ++i) {
-				if (umoven(tcp, (unsigned long) ia64_rse_skip_regs(out0, i),
-					   sizeof(long), (char *) &tcp->u_arg[i]) < 0)
-					return -1;
-			}
-		} else {
-			int i;
-
-			if (/* EBX = out0 */
-			    upeek(tcp, PT_R11, (long *) &tcp->u_arg[0]) < 0
-			    /* ECX = out1 */
-			    || upeek(tcp, PT_R9,  (long *) &tcp->u_arg[1]) < 0
-			    /* EDX = out2 */
-			    || upeek(tcp, PT_R10, (long *) &tcp->u_arg[2]) < 0
-			    /* ESI = out3 */
-			    || upeek(tcp, PT_R14, (long *) &tcp->u_arg[3]) < 0
-			    /* EDI = out4 */
-			    || upeek(tcp, PT_R15, (long *) &tcp->u_arg[4]) < 0
-			    /* EBP = out5 */
-			    || upeek(tcp, PT_R13, (long *) &tcp->u_arg[5]) < 0)
-				return -1;
-
-			for (i = 0; i < 6; ++i)
-				/* truncate away IVE sign-extension */
-				tcp->u_arg[i] &= 0xffffffff;
-
-			if (tcp->scno >= 0 && tcp->scno < nsyscalls
-			    && sysent[tcp->scno].nargs != -1)
-				tcp->u_nargs = sysent[tcp->scno].nargs;
-			else
-				tcp->u_nargs = 5;
-		}
-	}
-#elif defined (LINUX_MIPSN32) || defined (LINUX_MIPSN64)
-	/* N32 and N64 both use up to six registers.  */
-	{
-		unsigned long long regs[38];
-		int i, nargs;
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			nargs = tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			nargs = tcp->u_nargs = MAX_ARGS;
-
-		if (ptrace (PTRACE_GETREGS, tcp->pid, NULL, (long) &regs) < 0)
-			return -1;
-
-		for(i = 0; i < nargs; i++) {
-			tcp->u_arg[i] = regs[REG_A0 + i];
-# if defined (LINUX_MIPSN32)
-			tcp->ext_arg[i] = regs[REG_A0 + i];
-# endif
-		}
-	}
-#elif defined (MIPS)
-	{
-		long sp;
-		int i, nargs;
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			nargs = tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			nargs = tcp->u_nargs = MAX_ARGS;
-		if(nargs > 4) {
-			if(upeek(tcp, REG_SP, &sp) < 0)
-				return -1;
-			for(i = 0; i < 4; i++) {
-				if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i])<0)
-					return -1;
-			}
-			umoven(tcp, sp+16, (nargs-4) * sizeof(tcp->u_arg[0]),
-			       (char *)(tcp->u_arg + 4));
-		} else {
-			for(i = 0; i < nargs; i++) {
-				if (upeek(tcp, REG_A0 + i, &tcp->u_arg[i]) < 0)
-					return -1;
-			}
-		}
-	}
-#elif defined (POWERPC)
-# ifndef PT_ORIG_R3
-#  define PT_ORIG_R3 34
-# endif
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, (i==0) ?
-				(sizeof(unsigned long)*PT_ORIG_R3) :
-				((i+PT_R3)*sizeof(unsigned long)),
-					&tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined (SPARC) || defined (SPARC64)
-	{
-		int i;
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++)
-			tcp->u_arg[i] = regs.u_regs[U_REG_O0 + i];
-	}
-#elif defined (HPPA)
-	{
-		int i;
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, PT_GR26-4*i, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined(ARM)
-	{
-		int i;
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++)
-			tcp->u_arg[i] = regs.uregs[i];
-	}
-#elif defined(AVR32)
-	tcp->u_nargs = sysent[tcp->scno].nargs;
-	tcp->u_arg[0] = regs.r12;
-	tcp->u_arg[1] = regs.r11;
-	tcp->u_arg[2] = regs.r10;
-	tcp->u_arg[3] = regs.r9;
-	tcp->u_arg[4] = regs.r5;
-	tcp->u_arg[5] = regs.r3;
-#elif defined(BFIN)
-	{
-		int i;
-		int argreg[] = {PT_R0, PT_R1, PT_R2, PT_R3, PT_R4, PT_R5};
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = sizeof(argreg) / sizeof(argreg[0]);
-
-		for (i = 0; i < tcp->u_nargs; ++i)
-			if (upeek(tcp, argreg[i], &tcp->u_arg[i]) < 0)
-				return -1;
-	}
-#elif defined(SH)
-	{
-		int i;
-		static int syscall_regs[] = {
-			REG_REG0+4, REG_REG0+5, REG_REG0+6, REG_REG0+7,
-			REG_REG0, REG_REG0+1, REG_REG0+2
-		};
-
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, 4*syscall_regs[i], &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined(SH64)
-	{
-		int i;
-		/* Registers used by SH5 Linux system calls for parameters */
-		static int syscall_regs[] = { 2, 3, 4, 5, 6, 7 };
-
-		/*
-		 * TODO: should also check that the number of arguments encoded
-		 *       in the trap number matches the number strace expects.
-		 */
-		/*
-		assert(sysent[tcp->scno].nargs <
-		       sizeof(syscall_regs)/sizeof(syscall_regs[0]));
-		 */
-
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, REG_GENERAL(syscall_regs[i]), &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-
-#elif defined(X86_64)
-	{
-		int i;
-		static int argreg[SUPPORTED_PERSONALITIES][MAX_ARGS] = {
-			{RDI,RSI,RDX,R10,R8,R9},	/* x86-64 ABI */
-			{RBX,RCX,RDX,RSI,RDI,RBP}	/* i386 ABI */
-		};
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, argreg[current_personality][i]*8, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined(MICROBLAZE)
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = 0;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, (5 + i) * 4, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined(CRISV10) || defined(CRISV32)
-	{
-		int i;
-		static const int crisregs[] = {
-			4*PT_ORIG_R10, 4*PT_R11, 4*PT_R12,
-			4*PT_R13, 4*PT_MOF, 4*PT_SRP
-		};
-
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = 0;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, crisregs[i], &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined(TILE)
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; ++i) {
-			if (upeek(tcp, PTREGS_OFFSET_REG(i), &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#elif defined (M68K)
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, (i < 5 ? i : i + 2)*4, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#else /* Other architecture (like i386) (32bits specific) */
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			if (upeek(tcp, i*4, &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#endif
-#endif /* LINUX */
-#ifdef SUNOS4
-	{
-		int i;
-		if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-			tcp->u_nargs = sysent[tcp->scno].nargs;
-		else
-			tcp->u_nargs = MAX_ARGS;
-		for (i = 0; i < tcp->u_nargs; i++) {
-			struct user *u;
-
-			if (upeek(tcp, uoff(u_arg[0]) +
-			    (i*sizeof(u->u_arg[0])), &tcp->u_arg[i]) < 0)
-				return -1;
-		}
-	}
-#endif /* SUNOS4 */
-#ifdef SVR4
-#ifdef MIPS
-	/*
-	 * SGI is broken: even though it has pr_sysarg, it doesn't
-	 * set them on system call entry.  Get a clue.
-	 */
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-	else
-		tcp->u_nargs = tcp->status.pr_nsysarg;
-	if (tcp->u_nargs > 4) {
-		memcpy(tcp->u_arg, &tcp->status.pr_reg[CTX_A0],
-			4*sizeof(tcp->u_arg[0]));
-		umoven(tcp, tcp->status.pr_reg[CTX_SP] + 16,
-			(tcp->u_nargs - 4)*sizeof(tcp->u_arg[0]), (char *) (tcp->u_arg + 4));
-	}
-	else {
-		memcpy(tcp->u_arg, &tcp->status.pr_reg[CTX_A0],
-			tcp->u_nargs*sizeof(tcp->u_arg[0]));
-	}
-#elif UNIXWARE >= 2
-	/*
-	 * Like SGI, UnixWare doesn't set pr_sysarg until system call exit
-	 */
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-	else
-		tcp->u_nargs = tcp->status.pr_lwp.pr_nsysarg;
-	umoven(tcp, tcp->status.PR_REG[UESP] + 4,
-		tcp->u_nargs*sizeof(tcp->u_arg[0]), (char *) tcp->u_arg);
-#elif defined (HAVE_PR_SYSCALL)
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-	else
-		tcp->u_nargs = tcp->status.pr_nsysarg;
-	{
-		int i;
-		for (i = 0; i < tcp->u_nargs; i++)
-			tcp->u_arg[i] = tcp->status.pr_sysarg[i];
-	}
-#elif defined (I386)
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls && sysent[tcp->scno].nargs != -1)
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-	else
-		tcp->u_nargs = 5;
-	umoven(tcp, tcp->status.PR_REG[UESP] + 4,
-		tcp->u_nargs*sizeof(tcp->u_arg[0]), (char *) tcp->u_arg);
-#else
-	I DONT KNOW WHAT TO DO
-#endif /* !HAVE_PR_SYSCALL */
-#endif /* SVR4 */
-#ifdef FREEBSD
-	if (tcp->scno >= 0 && tcp->scno < nsyscalls &&
-	    sysent[tcp->scno].nargs > tcp->status.val)
-		tcp->u_nargs = sysent[tcp->scno].nargs;
-	else
-		tcp->u_nargs = tcp->status.val;
-	if (tcp->u_nargs < 0)
-		tcp->u_nargs = 0;
-	if (tcp->u_nargs > MAX_ARGS)
-		tcp->u_nargs = MAX_ARGS;
-	switch(regs.r_eax) {
-	case SYS___syscall:
-		pread(tcp->pfd, &tcp->u_arg, tcp->u_nargs * sizeof(unsigned long),
-		      regs.r_esp + sizeof(int) + sizeof(quad_t));
-		break;
-	case SYS_syscall:
-		pread(tcp->pfd, &tcp->u_arg, tcp->u_nargs * sizeof(unsigned long),
-		      regs.r_esp + 2 * sizeof(int));
-		break;
-	default:
-		pread(tcp->pfd, &tcp->u_arg, tcp->u_nargs * sizeof(unsigned long),
-		      regs.r_esp + sizeof(int));
-		break;
-	}
-#endif /* FREEBSD */
-	return 1;
 }
 
 static int
@@ -2398,80 +1953,87 @@
 {
 	int sys_res;
 	struct timeval tv;
-	int res, scno_good;
+	int res;
 	long u_error;
 
 	/* Measure the exit time as early as possible to avoid errors. */
-	if (dtime || cflag)
+	if (Tflag || cflag)
 		gettimeofday(&tv, NULL);
 
-	/* BTW, why we don't just memorize syscall no. on entry
-	 * in tcp->something?
-	 */
-	scno_good = res = get_scno(tcp);
-	if (res == 0)
-		return res;
-	if (res == 1)
-		res = syscall_fixup(tcp);
-	if (res == 0)
-		return res;
-	if (res == 1)
-		res = get_error(tcp);
-	if (res == 0)
-		return res;
-	if (res == 1)
-		internal_syscall(tcp);
-
-	if (res == 1 && tcp->scno >= 0 && tcp->scno < nsyscalls &&
-	    !(qual_flags[tcp->scno] & QUAL_TRACE)) {
-		tcp->flags &= ~TCB_INSYSCALL;
-		return 0;
-	}
-
-	if (tcp->flags & TCB_REPRINT) {
-		printleader(tcp);
-		tprintf("<... ");
-		if (scno_good != 1)
-			tprintf("????");
-		else if (tcp->scno >= nsyscalls || tcp->scno < 0)
-			tprintf("syscall_%lu", tcp->scno);
-		else
-			tprintf("%s", sysent[tcp->scno].sys_name);
-		tprintf(" resumed> ");
+#if SUPPORTED_PERSONALITIES > 1
+	update_personality(tcp, tcp->currpers);
+#endif
+	res = get_syscall_result(tcp);
+	if (res == 1) {
+		syscall_fixup_on_sysexit(tcp); /* never fails */
+		res = get_error(tcp); /* returns 1 or -1 */
+		if (res == 1) {
+			internal_syscall(tcp);
+			if (filtered(tcp)) {
+				goto ret;
+			}
+		}
 	}
 
 	if (cflag) {
 		struct timeval t = tv;
-		int rc = count_syscall(tcp, &t);
-		if (cflag == CFLAG_ONLY_STATS)
-		{
-			tcp->flags &= ~TCB_INSYSCALL;
-			return rc;
+		count_syscall(tcp, &t);
+		if (cflag == CFLAG_ONLY_STATS) {
+			goto ret;
 		}
 	}
 
+	/* If not in -ff mode, and printing_tcp != tcp,
+	 * then the log currently does not end with output
+	 * of _our syscall entry_, but with something else.
+	 * We need to say which syscall's return is this.
+	 *
+	 * Forced reprinting via TCB_REPRINT is used only by
+	 * "strace -ff -oLOG test/threaded_execve" corner case.
+	 * It's the only case when -ff mode needs reprinting.
+	 */
+	if ((followfork < 2 && printing_tcp != tcp) || (tcp->flags & TCB_REPRINT)) {
+		tcp->flags &= ~TCB_REPRINT;
+		printleader(tcp);
+		if (!SCNO_IN_RANGE(tcp->scno))
+			tprintf("<... syscall_%lu resumed> ", tcp->scno);
+		else
+			tprintf("<... %s resumed> ", sysent[tcp->scno].sys_name);
+	}
+	printing_tcp = tcp;
+
 	if (res != 1) {
-		tprintf(") ");
-		tabto(acolumn);
-		tprintf("= ? <unavailable>");
-		printtrailer();
+		/* There was error in one of prior ptrace ops */
+		tprints(") ");
+		tabto();
+		tprints("= ? <unavailable>\n");
+		line_ended();
 		tcp->flags &= ~TCB_INSYSCALL;
 		return res;
 	}
 
-	if (tcp->scno >= nsyscalls || tcp->scno < 0
-	    || (qual_flags[tcp->scno] & QUAL_RAW))
-		sys_res = printargs(tcp);
-	else {
+	sys_res = 0;
+	if (!SCNO_IN_RANGE(tcp->scno)
+	    || (qual_flags[tcp->scno] & QUAL_RAW)) {
+		/* sys_res = printargs(tcp); - but it's nop on sysexit */
+	} else {
+	/* FIXME: not_failing_only (IOW, option -z) is broken:
+	 * failure of syscall is known only after syscall return.
+	 * Thus we end up with something like this on, say, ENOENT:
+	 *     open("doesnt_exist", O_RDONLY <unfinished ...>
+	 *     {next syscall decode}
+	 * whereas the intended result is that open(...) line
+	 * is not shown at all.
+	 */
 		if (not_failing_only && tcp->u_error)
-			return 0;	/* ignore failed syscalls */
+			goto ret;	/* ignore failed syscalls */
 		sys_res = (*sysent[tcp->scno].sys_func)(tcp);
 	}
 
+	tprints(") ");
+	tabto();
 	u_error = tcp->u_error;
-	tprintf(") ");
-	tabto(acolumn);
-	if (tcp->scno >= nsyscalls || tcp->scno < 0 ||
+	if (!SCNO_IN_RANGE(tcp->scno) ||
 	    qual_flags[tcp->scno] & QUAL_RAW) {
 		if (u_error)
 			tprintf("= -1 (errno %ld)", u_error);
@@ -2480,29 +2042,66 @@
 	}
 	else if (!(sys_res & RVAL_NONE) && u_error) {
 		switch (u_error) {
-#ifdef LINUX
+		/* Blocked signals do not interrupt any syscalls.
+		 * In this case syscalls don't return ERESTARTfoo codes.
+		 *
+		 * Deadly signals set to SIG_DFL interrupt syscalls
+		 * and kill the process regardless of which of the codes below
+		 * is returned by the interrupted syscall.
+		 * In some cases, kernel forces a kernel-generated deadly
+		 * signal to be unblocked and set to SIG_DFL (and thus cause
+		 * death) if it is blocked or SIG_IGNed: for example, SIGSEGV
+		 * or SIGILL. (The alternative is to leave process spinning
+		 * forever on the faulty instruction - not useful).
+		 *
+		 * SIG_IGNed signals and non-deadly signals set to SIG_DFL
+		 * (for example, SIGCHLD, SIGWINCH) interrupt syscalls,
+		 * but kernel will always restart them.
+		 */
 		case ERESTARTSYS:
-			tprintf("= ? ERESTARTSYS (To be restarted)");
+			/* Most common type of signal-interrupted syscall exit code.
+			 * The system call will be restarted with the same arguments
+			 * if SA_RESTART is set; otherwise, it will fail with EINTR.
+			 */
+			tprints("= ? ERESTARTSYS (To be restarted if SA_RESTART is set)");
 			break;
 		case ERESTARTNOINTR:
-			tprintf("= ? ERESTARTNOINTR (To be restarted)");
+			/* Rare. For example, fork() returns this if interrupted.
+			 * SA_RESTART is ignored (assumed set): the restart is unconditional.
+			 */
+			tprints("= ? ERESTARTNOINTR (To be restarted)");
 			break;
 		case ERESTARTNOHAND:
-			tprintf("= ? ERESTARTNOHAND (To be restarted)");
+			/* pause(), rt_sigsuspend() etc use this code.
+			 * SA_RESTART is ignored (assumed not set):
+			 * syscall won't restart (will return EINTR instead)
+			 * even after signal with SA_RESTART set.
+			 * However, after SIG_IGN or SIG_DFL signal it will.
+			 */
+			tprints("= ? ERESTARTNOHAND (Interrupted by signal)");
 			break;
 		case ERESTART_RESTARTBLOCK:
-			tprintf("= ? ERESTART_RESTARTBLOCK (To be restarted)");
+			/* Syscalls like nanosleep(), poll() which can't be
+			 * restarted with their original arguments use this
+			 * code. Kernel will execute restart_syscall() instead,
+			 * which changes arguments before restarting syscall.
+			 * SA_RESTART is ignored (assumed not set) similarly
+			 * to ERESTARTNOHAND. (Kernel can't honor SA_RESTART
+			 * since restart data is saved in "restart block"
+			 * in task struct, and if signal handler uses a syscall
+			 * which in turn saves another such restart block,
+			 * old data is lost and restart becomes impossible)
+			 */
+			tprints("= ? ERESTART_RESTARTBLOCK (Interrupted by signal)");
 			break;
-#endif /* LINUX */
 		default:
-			tprintf("= -1 ");
 			if (u_error < 0)
-				tprintf("E??? (errno %ld)", u_error);
+				tprintf("= -1 E??? (errno %ld)", u_error);
 			else if (u_error < nerrnos)
-				tprintf("%s (%s)", errnoent[u_error],
+				tprintf("= -1 %s (%s)", errnoent[u_error],
 					strerror(u_error));
 			else
-				tprintf("ERRNO_%ld (%s)", u_error,
+				tprintf("= -1 ERRNO_%ld (%s)", u_error,
 					strerror(u_error));
 			break;
 		}
@@ -2511,7 +2110,7 @@
 	}
 	else {
 		if (sys_res & RVAL_NONE)
-			tprintf("= ?");
+			tprints("= ?");
 		else {
 			switch (sys_res & RVAL_MASK) {
 			case RVAL_HEX:
@@ -2526,19 +2125,23 @@
 			case RVAL_DECIMAL:
 				tprintf("= %ld", tcp->u_rval);
 				break;
-#ifdef HAVE_LONG_LONG
+#if defined(LINUX_MIPSN32) || defined(X32)
+			/*
 			case RVAL_LHEX:
 				tprintf("= %#llx", tcp->u_lrval);
 				break;
 			case RVAL_LOCTAL:
 				tprintf("= %#llo", tcp->u_lrval);
 				break;
+			*/
 			case RVAL_LUDECIMAL:
 				tprintf("= %llu", tcp->u_lrval);
 				break;
+			/*
 			case RVAL_LDECIMAL:
 				tprintf("= %lld", tcp->u_lrval);
 				break;
+			*/
 #endif
 			default:
 				fprintf(stderr,
@@ -2549,289 +2152,23 @@
 		if ((sys_res & RVAL_STR) && tcp->auxstr)
 			tprintf(" (%s)", tcp->auxstr);
 	}
-	if (dtime) {
+	if (Tflag) {
 		tv_sub(&tv, &tv, &tcp->etime);
 		tprintf(" <%ld.%06ld>",
 			(long) tv.tv_sec, (long) tv.tv_usec);
 	}
-	printtrailer();
-
+	tprints("\n");
 	dumpio(tcp);
-	if (fflush(tcp->outf) == EOF)
-		return -1;
+	line_ended();
+
+ ret:
 	tcp->flags &= ~TCB_INSYSCALL;
 	return 0;
 }
 
-static int
-trace_syscall_entering(struct tcb *tcp)
-{
-	int sys_res;
-	int res, scno_good;
-
-	scno_good = res = get_scno(tcp);
-	if (res == 0)
-		return res;
-	if (res == 1)
-		res = syscall_fixup(tcp);
-	if (res == 0)
-		return res;
-	if (res == 1)
-		res = syscall_enter(tcp);
-	if (res == 0)
-		return res;
-
-	if (res != 1) {
-		printleader(tcp);
-		tcp->flags &= ~TCB_REPRINT;
-		tcp_last = tcp;
-		if (scno_good != 1)
-			tprintf("????" /* anti-trigraph gap */ "(");
-		else if (tcp->scno >= nsyscalls || tcp->scno < 0)
-			tprintf("syscall_%lu(", tcp->scno);
-		else
-			tprintf("%s(", sysent[tcp->scno].sys_name);
-		/*
-		 * " <unavailable>" will be added later by the code which
-		 * detects ptrace errors.
-		 */
-		tcp->flags |= TCB_INSYSCALL;
-		return res;
-	}
-
-	switch (known_scno(tcp)) {
-#ifndef __ARM_EABI__
-#ifdef SYS_socket_subcall
-	case SYS_socketcall:
-		decode_subcall(tcp, SYS_socket_subcall,
-			SYS_socket_nsubcalls, deref_style);
-		break;
-#endif
-#ifdef SYS_ipc_subcall
-	case SYS_ipc:
-		decode_subcall(tcp, SYS_ipc_subcall,
-			SYS_ipc_nsubcalls, shift_style);
-		break;
-#endif
-#endif
-#ifdef SVR4
-#ifdef SYS_pgrpsys_subcall
-	case SYS_pgrpsys:
-		decode_subcall(tcp, SYS_pgrpsys_subcall,
-			SYS_pgrpsys_nsubcalls, shift_style);
-		break;
-#endif /* SYS_pgrpsys_subcall */
-#ifdef SYS_sigcall_subcall
-	case SYS_sigcall:
-		decode_subcall(tcp, SYS_sigcall_subcall,
-			SYS_sigcall_nsubcalls, mask_style);
-		break;
-#endif /* SYS_sigcall_subcall */
-	case SYS_msgsys:
-		decode_subcall(tcp, SYS_msgsys_subcall,
-			SYS_msgsys_nsubcalls, shift_style);
-		break;
-	case SYS_shmsys:
-		decode_subcall(tcp, SYS_shmsys_subcall,
-			SYS_shmsys_nsubcalls, shift_style);
-		break;
-	case SYS_semsys:
-		decode_subcall(tcp, SYS_semsys_subcall,
-			SYS_semsys_nsubcalls, shift_style);
-		break;
-	case SYS_sysfs:
-		decode_subcall(tcp, SYS_sysfs_subcall,
-			SYS_sysfs_nsubcalls, shift_style);
-		break;
-	case SYS_spcall:
-		decode_subcall(tcp, SYS_spcall_subcall,
-			SYS_spcall_nsubcalls, shift_style);
-		break;
-#ifdef SYS_context_subcall
-	case SYS_context:
-		decode_subcall(tcp, SYS_context_subcall,
-			SYS_context_nsubcalls, shift_style);
-		break;
-#endif /* SYS_context_subcall */
-#ifdef SYS_door_subcall
-	case SYS_door:
-		decode_subcall(tcp, SYS_door_subcall,
-			SYS_door_nsubcalls, door_style);
-		break;
-#endif /* SYS_door_subcall */
-#ifdef SYS_kaio_subcall
-	case SYS_kaio:
-		decode_subcall(tcp, SYS_kaio_subcall,
-			SYS_kaio_nsubcalls, shift_style);
-		break;
-#endif
-#endif /* SVR4 */
-#ifdef FREEBSD
-	case SYS_msgsys:
-	case SYS_shmsys:
-	case SYS_semsys:
-		decode_subcall(tcp, 0, 0, table_style);
-		break;
-#endif
-#ifdef SUNOS4
-	case SYS_semsys:
-		decode_subcall(tcp, SYS_semsys_subcall,
-			SYS_semsys_nsubcalls, shift_style);
-		break;
-	case SYS_msgsys:
-		decode_subcall(tcp, SYS_msgsys_subcall,
-			SYS_msgsys_nsubcalls, shift_style);
-		break;
-	case SYS_shmsys:
-		decode_subcall(tcp, SYS_shmsys_subcall,
-			SYS_shmsys_nsubcalls, shift_style);
-		break;
-#endif
-	}
-
-	internal_syscall(tcp);
-	if (tcp->scno >=0 && tcp->scno < nsyscalls && !(qual_flags[tcp->scno] & QUAL_TRACE)) {
-		tcp->flags |= TCB_INSYSCALL;
-		return 0;
-	}
-
-	if (cflag == CFLAG_ONLY_STATS) {
-		tcp->flags |= TCB_INSYSCALL;
-		gettimeofday(&tcp->etime, NULL);
-		return 0;
-	}
-
-	printleader(tcp);
-	tcp->flags &= ~TCB_REPRINT;
-	tcp_last = tcp;
-	if (tcp->scno >= nsyscalls || tcp->scno < 0)
-		tprintf("syscall_%lu(", tcp->scno);
-	else
-		tprintf("%s(", sysent[tcp->scno].sys_name);
-	if (tcp->scno >= nsyscalls || tcp->scno < 0 ||
-	    ((qual_flags[tcp->scno] & QUAL_RAW) &&
-	     sysent[tcp->scno].sys_func != sys_exit))
-		sys_res = printargs(tcp);
-	else
-		sys_res = (*sysent[tcp->scno].sys_func)(tcp);
-	if (fflush(tcp->outf) == EOF)
-		return -1;
-	tcp->flags |= TCB_INSYSCALL;
-	/* Measure the entrance time as late as possible to avoid errors. */
-	if (dtime || cflag)
-		gettimeofday(&tcp->etime, NULL);
-	return sys_res;
-}
-
 int
 trace_syscall(struct tcb *tcp)
 {
 	return exiting(tcp) ?
 		trace_syscall_exiting(tcp) : trace_syscall_entering(tcp);
 }
-
-int
-printargs(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		int i;
-
-		for (i = 0; i < tcp->u_nargs; i++)
-			tprintf("%s%#lx", i ? ", " : "", tcp->u_arg[i]);
-	}
-	return 0;
-}
-
-long
-getrval2(tcp)
-struct tcb *tcp;
-{
-	long val = -1;
-
-#ifdef LINUX
-#if defined (SPARC) || defined (SPARC64)
-	struct pt_regs regs;
-	if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)&regs,0) < 0)
-		return -1;
-	val = regs.u_regs[U_REG_O1];
-#elif defined(SH)
-	if (upeek(tcp, 4*(REG_REG0+1), &val) < 0)
-		return -1;
-#elif defined(IA64)
-	if (upeek(tcp, PT_R9, &val) < 0)
-		return -1;
-#endif
-#endif /* LINUX */
-
-#ifdef SUNOS4
-	if (upeek(tcp, uoff(u_rval2), &val) < 0)
-		return -1;
-#endif /* SUNOS4 */
-
-#ifdef SVR4
-#ifdef SPARC
-	val = tcp->status.PR_REG[R_O1];
-#endif /* SPARC */
-#ifdef I386
-	val = tcp->status.PR_REG[EDX];
-#endif /* I386 */
-#ifdef X86_64
-	val = tcp->status.PR_REG[RDX];
-#endif /* X86_64 */
-#ifdef MIPS
-	val = tcp->status.PR_REG[CTX_V1];
-#endif /* MIPS */
-#endif /* SVR4 */
-
-#ifdef FREEBSD
-	struct reg regs;
-	pread(tcp->pfd_reg, &regs, sizeof(regs), 0);
-	val = regs.r_edx;
-#endif
-	return val;
-}
-
-#ifdef SUNOS4
-/*
- * Apparently, indirect system calls have already be converted by ptrace(2),
- * so if you see "indir" this program has gone astray.
- */
-int
-sys_indir(tcp)
-struct tcb *tcp;
-{
-	int i, scno, nargs;
-
-	if (entering(tcp)) {
-		if ((scno = tcp->u_arg[0]) > nsyscalls) {
-			fprintf(stderr, "Bogus syscall: %u\n", scno);
-			return 0;
-		}
-		nargs = sysent[scno].nargs;
-		tprintf("%s", sysent[scno].sys_name);
-		for (i = 0; i < nargs; i++)
-			tprintf(", %#lx", tcp->u_arg[i+1]);
-	}
-	return 0;
-}
-#endif /* SUNOS4 */
-
-int
-is_restart_error(struct tcb *tcp)
-{
-#ifdef LINUX
-	if (!syserror(tcp))
-		return 0;
-	switch (tcp->u_error) {
-		case ERESTARTSYS:
-		case ERESTARTNOINTR:
-		case ERESTARTNOHAND:
-		case ERESTART_RESTARTBLOCK:
-			return 1;
-		default:
-			break;
-	}
-#endif /* LINUX */
-	return 0;
-}
diff --git a/system.c b/system.c
index c0d300e..a776492 100644
--- a/system.c
+++ b/system.c
@@ -26,18 +26,10 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
 
-#ifdef HAVE_ANDROID_OS
-#undef __unused
-#include <linux/socket.h>
-#endif
-
-#ifdef LINUX
 #define _LINUX_SOCKET_H
 #define _LINUX_FS_H
 
@@ -73,25 +65,18 @@
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
-
-#include <sys/syscall.h>
-
 #ifdef HAVE_LINUX_CAPABILITY_H
-#include <linux/capability.h>
+# include <linux/capability.h>
 #endif
-
 #ifdef HAVE_ASM_CACHECTL_H
-#include <asm/cachectl.h>
+# include <asm/cachectl.h>
 #endif
-
 #ifdef HAVE_LINUX_USTNAME_H
-#include <linux/utsname.h>
+# include <linux/utsname.h>
 #endif
-
-#ifdef MIPS
-#include <asm/sysmips.h>
+#ifdef HAVE_ASM_SYSMIPS_H
+# include <asm/sysmips.h>
 #endif
-
 #include <linux/sysctl.h>
 
 static const struct xlat mount_flags[] = {
@@ -141,19 +126,19 @@
 			ignore_type = ignore_data = 1;
 
 		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 
 		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 
 		if (ignore_type && tcp->u_arg[2])
 			tprintf("%#lx", tcp->u_arg[2]);
 		else
 			printstr(tcp, tcp->u_arg[2], -1);
-		tprintf(", ");
+		tprints(", ");
 
 		printflags(mount_flags, tcp->u_arg[3], "MS_???");
-		tprintf(", ");
+		tprints(", ");
 
 		if (ignore_data && tcp->u_arg[4])
 			tprintf("%#lx", tcp->u_arg[4]);
@@ -179,7 +164,7 @@
 {
 	if (entering(tcp)) {
 		printstr(tcp, tcp->u_arg[0], -1);
-		tprintf(", ");
+		tprints(", ");
 		printflags(umount_flags, tcp->u_arg[1], "MNT_???");
 	}
 	return 0;
@@ -213,14 +198,79 @@
 };
 
 int
-sys_personality(tcp)
-struct tcb *tcp;
+sys_personality(struct tcb *tcp)
 {
 	if (entering(tcp))
 		printxval(personality_options, tcp->u_arg[0], "PER_???");
 	return 0;
 }
 
+enum {
+	SYSLOG_ACTION_CLOSE = 0,
+	SYSLOG_ACTION_OPEN,
+	SYSLOG_ACTION_READ,
+	SYSLOG_ACTION_READ_ALL,
+	SYSLOG_ACTION_READ_CLEAR,
+	SYSLOG_ACTION_CLEAR,
+	SYSLOG_ACTION_CONSOLE_OFF,
+	SYSLOG_ACTION_CONSOLE_ON,
+	SYSLOG_ACTION_CONSOLE_LEVEL,
+	SYSLOG_ACTION_SIZE_UNREAD,
+	SYSLOG_ACTION_SIZE_BUFFER
+};
+
+static const struct xlat syslog_action_type[] = {
+	{ SYSLOG_ACTION_CLOSE,		"SYSLOG_ACTION_CLOSE"		},
+	{ SYSLOG_ACTION_OPEN,		"SYSLOG_ACTION_OPEN"		},
+	{ SYSLOG_ACTION_READ,		"SYSLOG_ACTION_READ"		},
+	{ SYSLOG_ACTION_READ_ALL,	"SYSLOG_ACTION_READ_ALL"	},
+	{ SYSLOG_ACTION_READ_CLEAR,	"SYSLOG_ACTION_READ_CLEAR"	},
+	{ SYSLOG_ACTION_CLEAR,		"SYSLOG_ACTION_CLEAR"		},
+	{ SYSLOG_ACTION_CONSOLE_OFF,	"SYSLOG_ACTION_CONSOLE_OFF"	},
+	{ SYSLOG_ACTION_CONSOLE_ON,	"SYSLOG_ACTION_CONSOLE_ON"	},
+	{ SYSLOG_ACTION_CONSOLE_LEVEL,	"SYSLOG_ACTION_CONSOLE_LEVEL"	},
+	{ SYSLOG_ACTION_SIZE_UNREAD,	"SYSLOG_ACTION_SIZE_UNREAD"	},
+	{ SYSLOG_ACTION_SIZE_BUFFER,	"SYSLOG_ACTION_SIZE_BUFFER"	},
+	{ 0,				NULL				}
+};
+
+int
+sys_syslog(struct tcb *tcp)
+{
+	int type = tcp->u_arg[0];
+
+	if (entering(tcp)) {
+		/* type */
+		printxval(syslog_action_type, type, "SYSLOG_ACTION_???");
+		tprints(", ");
+	}
+
+	switch (type) {
+		case SYSLOG_ACTION_READ:
+		case SYSLOG_ACTION_READ_ALL:
+		case SYSLOG_ACTION_READ_CLEAR:
+			if (entering(tcp))
+				return 0;
+			break;
+		default:
+			if (entering(tcp)) {
+				tprintf("%#lx, %lu",
+					tcp->u_arg[1], tcp->u_arg[2]);
+			}
+			return 0;
+	}
+
+	/* bufp */
+	if (syserror(tcp))
+		tprintf("%#lx", tcp->u_arg[1]);
+	else
+		printstr(tcp, tcp->u_arg[1], tcp->u_rval);
+	/* len */
+	tprintf(", %d", (int) tcp->u_arg[2]);
+
+	return 0;
+}
+
 #include <linux/reboot.h>
 static const struct xlat bootflags1[] = {
 	{ LINUX_REBOOT_MAGIC1,	"LINUX_REBOOT_MAGIC1"	},
@@ -245,17 +295,16 @@
 };
 
 int
-sys_reboot(tcp)
-struct tcb *tcp;
+sys_reboot(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printflags(bootflags1, tcp->u_arg[0], "LINUX_REBOOT_MAGIC_???");
-		tprintf(", ");
+		tprints(", ");
 		printflags(bootflags2, tcp->u_arg[1], "LINUX_REBOOT_MAGIC_???");
-		tprintf(", ");
+		tprints(", ");
 		printflags(bootflags3, tcp->u_arg[2], "LINUX_REBOOT_CMD_???");
 		if (tcp->u_arg[2] == LINUX_REBOOT_CMD_RESTART2) {
-			tprintf(", ");
+			tprints(", ");
 			printstr(tcp, tcp->u_arg[3], -1);
 		}
 	}
@@ -290,15 +339,14 @@
 };
 
 int
-sys_cacheflush(tcp)
-struct tcb *tcp;
+sys_cacheflush(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		/* addr */
 		tprintf("%#lx, ", tcp->u_arg[0]);
 		/* scope */
 		printxval(cacheflush_scope, tcp->u_arg[1], "FLUSH_SCOPE_???");
-		tprintf(", ");
+		tprints(", ");
 		/* flags */
 		printflags(cacheflush_flags, tcp->u_arg[2], "FLUSH_CACHE_???");
 		/* len */
@@ -390,1163 +438,6 @@
 }
 #endif /* SH */
 
-#endif /* LINUX */
-
-#ifdef SUNOS4
-
-#include <sys/reboot.h>
-#define NFSCLIENT
-#define LOFS
-#define RFS
-#define PCFS
-#include <sys/mount.h>
-#include <sys/socket.h>
-#include <nfs/export.h>
-#include <rpc/types.h>
-#include <rpc/auth.h>
-
-/*ARGSUSED*/
-int
-sys_sync(tcp)
-struct tcb *tcp;
-{
-	return 0;
-}
-
-static const struct xlat bootflags[] = {
-	{ RB_AUTOBOOT,	"RB_AUTOBOOT"	},	/* for system auto-booting itself */
-	{ RB_ASKNAME,	"RB_ASKNAME"	},	/* ask for file name to reboot from */
-	{ RB_SINGLE,	"RB_SINGLE"	},	/* reboot to single user only */
-	{ RB_NOSYNC,	"RB_NOSYNC"	},	/* dont sync before reboot */
-	{ RB_HALT,	"RB_HALT"	},	/* don't reboot, just halt */
-	{ RB_INITNAME,	"RB_INITNAME"	},	/* name given for /etc/init */
-	{ RB_NOBOOTRC,	"RB_NOBOOTRC"	},	/* don't run /etc/rc.boot */
-	{ RB_DEBUG,	"RB_DEBUG"	},	/* being run under debugger */
-	{ RB_DUMP,	"RB_DUMP"	},	/* dump system core */
-	{ RB_WRITABLE,	"RB_WRITABLE"	},	/* mount root read/write */
-	{ RB_STRING,	"RB_STRING"	},	/* pass boot args to prom monitor */
-	{ 0,		NULL		},
-};
-
-int
-sys_reboot(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printflags(bootflags, tcp->u_arg[0], "RB_???");
-		if (tcp->u_arg[0] & RB_STRING) {
-			printstr(tcp, tcp->u_arg[1], -1);
-		}
-	}
-	return 0;
-}
-
-int
-sys_sysacct(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-	}
-	return 0;
-}
-
-int
-sys_swapon(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-	}
-	return 0;
-}
-
-int
-sys_nfs_svc(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printsock(tcp, tcp->u_arg[0]);
-	}
-	return 0;
-}
-
-static const struct xlat mountflags[] = {
-	{ M_RDONLY,	"M_RDONLY"	},
-	{ M_NOSUID,	"M_NOSUID"	},
-	{ M_NEWTYPE,	"M_NEWTYPE"	},
-	{ M_GRPID,	"M_GRPID"	},
-#ifdef	M_REMOUNT
-	{ M_REMOUNT,	"M_REMOUNT"	},
-#endif
-#ifdef	M_NOSUB
-	{ M_NOSUB,	"M_NOSUB"	},
-#endif
-#ifdef	M_MULTI
-	{ M_MULTI,	"M_MULTI"	},
-#endif
-#ifdef	M_SYS5
-	{ M_SYS5,	"M_SYS5"	},
-#endif
-	{ 0,		NULL		},
-};
-
-static const struct xlat nfsflags[] = {
-	{ NFSMNT_SOFT,		"NFSMNT_SOFT"		},
-	{ NFSMNT_WSIZE,		"NFSMNT_WSIZE"		},
-	{ NFSMNT_RSIZE,		"NFSMNT_RSIZE"		},
-	{ NFSMNT_TIMEO,		"NFSMNT_TIMEO"		},
-	{ NFSMNT_RETRANS,	"NFSMNT_RETRANS"	},
-	{ NFSMNT_HOSTNAME,	"NFSMNT_HOSTNAME"	},
-	{ NFSMNT_INT,		"NFSMNT_INT"		},
-	{ NFSMNT_NOAC,		"NFSMNT_NOAC"		},
-	{ NFSMNT_ACREGMIN,	"NFSMNT_ACREGMIN"	},
-	{ NFSMNT_ACREGMAX,	"NFSMNT_ACREGMAX"	},
-	{ NFSMNT_ACDIRMIN,	"NFSMNT_ACDIRMIN"	},
-	{ NFSMNT_ACDIRMAX,	"NFSMNT_ACDIRMAX"	},
-#ifdef	NFSMNT_SECURE
-	{ NFSMNT_SECURE,	"NFSMNT_SECURE"		},
-#endif
-#ifdef	NFSMNT_NOCTO
-	{ NFSMNT_NOCTO,		"NFSMNT_NOCTO"		},
-#endif
-#ifdef	NFSMNT_POSIX
-	{ NFSMNT_POSIX,		"NFSMNT_POSIX"		},
-#endif
-	{ 0,			NULL			},
-};
-
-int
-sys_mount(tcp)
-struct tcb *tcp;
-{
-	char type[4];
-
-	if (entering(tcp)) {
-		if (!(tcp->u_arg[2] & M_NEWTYPE) || umovestr(tcp,
-				tcp->u_arg[0],  sizeof type, type) < 0) {
-			tprintf("OLDTYPE:#%lx", tcp->u_arg[0]);
-		} else {
-			tprintf("\"%s\", ", type);
-		}
-		printstr(tcp, tcp->u_arg[1], -1);
-		tprintf(", ");
-		printflags(mountflags, tcp->u_arg[2] & ~M_NEWTYPE, "M_???");
-		tprintf(", ");
-
-		if (strcmp(type, "4.2") == 0) {
-			struct ufs_args a;
-			if (umove(tcp, tcp->u_arg[3], &a) < 0)
-				return 0;
-			printstr(tcp, (int)a.fspec, -1);
-		} else if (strcmp(type, "lo") == 0) {
-			struct lo_args a;
-			if (umove(tcp, tcp->u_arg[3], &a) < 0)
-				return 0;
-			printstr(tcp, (int)a.fsdir, -1);
-		} else if (strcmp(type, "nfs") == 0) {
-			struct nfs_args a;
-			if (umove(tcp, tcp->u_arg[3], &a) < 0)
-				return 0;
-			tprintf("[");
-			printsock(tcp, (int) a.addr);
-			tprintf(", ");
-			printflags(nfsflags, a.flags, "NFSMNT_???");
-			tprintf(", ws:%u,rs:%u,to:%u,re:%u,",
-				a.wsize, a.rsize, a.timeo, a.retrans);
-			if (a.flags & NFSMNT_HOSTNAME && a.hostname)
-				printstr(tcp, (int)a.hostname, -1);
-			else
-				tprintf("%#lx", (unsigned long) a.hostname);
-			tprintf(",reg-min:%u,max:%u,dir-min:%u,max:%u,",
-				a.acregmin, a.acregmax, a.acdirmin, a.acdirmax);
-			if ((a.flags & NFSMNT_SECURE) && a.netname)
-				printstr(tcp, (int) a.netname, -1);
-			else
-				tprintf("%#lx", (unsigned long) a.netname);
-			tprintf("]");
-		} else if (strcmp(type, "rfs") == 0) {
-			struct rfs_args a;
-			struct token t;
-			if (umove(tcp, tcp->u_arg[3], &a) < 0)
-				return 0;
-			tprintf("[");
-			printstr(tcp, (int)a.rmtfs, -1);
-			if (umove(tcp, (int)a.token, &t) < 0)
-				return 0;
-			tprintf(", %u, %s]", t.t_id, t.t_uname);
-		} else if (strcmp(type, "pcfs") == 0) {
-			struct pc_args a;
-			if (umove(tcp, tcp->u_arg[3], &a) < 0)
-				return 0;
-			printstr(tcp, (int)a.fspec, -1);
-		}
-	}
-	return 0;
-}
-
-int
-sys_unmount(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-	}
-	return 0;
-}
-
-int
-sys_umount(tcp)
-struct tcb *tcp;
-{
-	return sys_unmount(tcp);
-}
-
-int
-sys_auditsys(tcp)
-struct tcb *tcp;
-{
-	/* XXX - no information available */
-	return printargs(tcp);
-}
-
-static const struct xlat ex_auth_flags[] = {
-	{ AUTH_UNIX,	"AUTH_UNIX"	},
-	{ AUTH_DES,	"AUTH_DES"	},
-	{ 0,		NULL		},
-};
-
-int
-sys_exportfs(tcp)
-struct tcb *tcp;
-{
-	struct export e;
-	int i;
-
-	if (entering(tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-		if (umove(tcp, tcp->u_arg[1], &e) < 0) {
-			tprintf("%#lx", tcp->u_arg[1]);
-			return 0;
-		}
-		tprintf("{fl:%u, anon:%u, ", e.ex_flags, e.ex_anon);
-		printxval(ex_auth_flags, e.ex_auth, "AUTH_???");
-		tprintf(", roots:[");
-		if (e.ex_auth == AUTH_UNIX) {
-			for (i=0; i<e.ex_u.exunix.rootaddrs.naddrs; i++) {
-				printsock(tcp,
-					(int)&e.ex_u.exunix.rootaddrs.addrvec[i]);
-			}
-			tprintf("], writers:[");
-			for (i=0; i<e.ex_writeaddrs.naddrs; i++) {
-				printsock(tcp,
-					(int)&e.ex_writeaddrs.addrvec[i]);
-			}
-			tprintf("]");
-		} else {
-			for (i=0; i<e.ex_u.exdes.nnames; i++) {
-				printsock(tcp,
-					(int)&e.ex_u.exdes.rootnames[i]);
-				tprintf(", ");
-			}
-			tprintf("], window:%u", e.ex_u.exdes.window);
-		}
-		tprintf("}");
-	}
-	return 0;
-}
-
-static const struct xlat sysconflimits[] = {
-#ifdef	_SC_ARG_MAX
-	{ _SC_ARG_MAX,	"_SC_ARG_MAX"	},	/* space for argv & envp */
-#endif
-#ifdef	_SC_CHILD_MAX
-	{ _SC_CHILD_MAX,	"_SC_CHILD_MAX"	},	/* maximum children per process??? */
-#endif
-#ifdef	_SC_CLK_TCK
-	{ _SC_CLK_TCK,	"_SC_CLK_TCK"	},	/* clock ticks/sec */
-#endif
-#ifdef	_SC_NGROUPS_MAX
-	{ _SC_NGROUPS_MAX,	"_SC_NGROUPS_MAX"	},	/* number of groups if multple supp. */
-#endif
-#ifdef	_SC_OPEN_MAX
-	{ _SC_OPEN_MAX,	"_SC_OPEN_MAX"	},	/* max open files per process */
-#endif
-#ifdef	_SC_JOB_CONTROL
-	{ _SC_JOB_CONTROL,	"_SC_JOB_CONTROL"	},	/* do we have job control */
-#endif
-#ifdef	_SC_SAVED_IDS
-	{ _SC_SAVED_IDS,	"_SC_SAVED_IDS"	},	/* do we have saved uid/gids */
-#endif
-#ifdef	_SC_VERSION
-	{ _SC_VERSION,	"_SC_VERSION"	},	/* POSIX version supported */
-#endif
-	{ 0,		NULL		},
-};
-
-int
-sys_sysconf(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printxval(sysconflimits, tcp->u_arg[0], "_SC_???");
-	}
-	return 0;
-}
-
-#endif /* SUNOS4 */
-
-#if defined(SUNOS4) || defined(FREEBSD)
-static const struct xlat pathconflimits[] = {
-#ifdef	_PC_LINK_MAX
-	{ _PC_LINK_MAX,	"_PC_LINK_MAX"	},	/* max links to file/dir */
-#endif
-#ifdef	_PC_MAX_CANON
-	{ _PC_MAX_CANON,	"_PC_MAX_CANON"	},	/* max line length */
-#endif
-#ifdef	_PC_MAX_INPUT
-	{ _PC_MAX_INPUT,	"_PC_MAX_INPUT"	},	/* max "packet" to a tty device */
-#endif
-#ifdef	_PC_NAME_MAX
-	{ _PC_NAME_MAX,	"_PC_NAME_MAX"	},	/* max pathname component length */
-#endif
-#ifdef	_PC_PATH_MAX
-	{ _PC_PATH_MAX,	"_PC_PATH_MAX"	},	/* max pathname length */
-#endif
-#ifdef	_PC_PIPE_BUF
-	{ _PC_PIPE_BUF,	"_PC_PIPE_BUF"	},	/* size of a pipe */
-#endif
-#ifdef	_PC_CHOWN_RESTRICTED
-	{ _PC_CHOWN_RESTRICTED,	"_PC_CHOWN_RESTRICTED"	},	/* can we give away files */
-#endif
-#ifdef	_PC_NO_TRUNC
-	{ _PC_NO_TRUNC,	"_PC_NO_TRUNC"	},	/* trunc or error on >NAME_MAX */
-#endif
-#ifdef	_PC_VDISABLE
-	{ _PC_VDISABLE,	"_PC_VDISABLE"	},	/* best char to shut off tty c_cc */
-#endif
-	{ 0,		NULL		},
-};
-
-
-int
-sys_pathconf(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-		tprintf(", ");
-		printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
-	}
-	return 0;
-}
-
-int
-sys_fpathconf(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		tprintf("%lu, ", tcp->u_arg[0]);
-		printxval(pathconflimits, tcp->u_arg[1], "_PC_???");
-	}
-	return 0;
-}
-
-#endif /* SUNOS4 || FREEBSD */
-
-#ifdef SVR4
-
-#ifdef HAVE_SYS_SYSCONFIG_H
-#include <sys/sysconfig.h>
-#endif /* HAVE_SYS_SYSCONFIG_H */
-
-#include <sys/mount.h>
-#include <sys/systeminfo.h>
-#include <sys/utsname.h>
-
-static const struct xlat sysconfig_options[] = {
-#ifdef _CONFIG_NGROUPS
-	{ _CONFIG_NGROUPS,		"_CONFIG_NGROUPS"		},
-#endif
-#ifdef _CONFIG_CHILD_MAX
-	{ _CONFIG_CHILD_MAX,		"_CONFIG_CHILD_MAX"		},
-#endif
-#ifdef _CONFIG_OPEN_FILES
-	{ _CONFIG_OPEN_FILES,		"_CONFIG_OPEN_FILES"		},
-#endif
-#ifdef _CONFIG_POSIX_VER
-	{ _CONFIG_POSIX_VER,		"_CONFIG_POSIX_VER"		},
-#endif
-#ifdef _CONFIG_PAGESIZE
-	{ _CONFIG_PAGESIZE,		"_CONFIG_PAGESIZE"		},
-#endif
-#ifdef _CONFIG_CLK_TCK
-	{ _CONFIG_CLK_TCK,		"_CONFIG_CLK_TCK"		},
-#endif
-#ifdef _CONFIG_XOPEN_VER
-	{ _CONFIG_XOPEN_VER,		"_CONFIG_XOPEN_VER"		},
-#endif
-#ifdef _CONFIG_PROF_TCK
-	{ _CONFIG_PROF_TCK,		"_CONFIG_PROF_TCK"		},
-#endif
-#ifdef _CONFIG_NPROC_CONF
-	{ _CONFIG_NPROC_CONF,		"_CONFIG_NPROC_CONF"		},
-#endif
-#ifdef _CONFIG_NPROC_ONLN
-	{ _CONFIG_NPROC_ONLN,		"_CONFIG_NPROC_ONLN"		},
-#endif
-#ifdef _CONFIG_AIO_LISTIO_MAX
-	{ _CONFIG_AIO_LISTIO_MAX,	"_CONFIG_AIO_LISTIO_MAX"	},
-#endif
-#ifdef _CONFIG_AIO_MAX
-	{ _CONFIG_AIO_MAX,		"_CONFIG_AIO_MAX"		},
-#endif
-#ifdef _CONFIG_AIO_PRIO_DELTA_MAX
-	{ _CONFIG_AIO_PRIO_DELTA_MAX,	"_CONFIG_AIO_PRIO_DELTA_MAX"	},
-#endif
-#ifdef _CONFIG_CONFIG_DELAYTIMER_MAX
-	{ _CONFIG_DELAYTIMER_MAX,	"_CONFIG_DELAYTIMER_MAX"	},
-#endif
-#ifdef _CONFIG_MQ_OPEN_MAX
-	{ _CONFIG_MQ_OPEN_MAX,		"_CONFIG_MQ_OPEN_MAX"		},
-#endif
-#ifdef _CONFIG_MQ_PRIO_MAX
-	{ _CONFIG_MQ_PRIO_MAX,		"_CONFIG_MQ_PRIO_MAX"		},
-#endif
-#ifdef _CONFIG_RTSIG_MAX
-	{ _CONFIG_RTSIG_MAX,		"_CONFIG_RTSIG_MAX"		},
-#endif
-#ifdef _CONFIG_SEM_NSEMS_MAX
-	{ _CONFIG_SEM_NSEMS_MAX,	"_CONFIG_SEM_NSEMS_MAX"		},
-#endif
-#ifdef _CONFIG_SEM_VALUE_MAX
-	{ _CONFIG_SEM_VALUE_MAX,	"_CONFIG_SEM_VALUE_MAX"		},
-#endif
-#ifdef _CONFIG_SIGQUEUE_MAX
-	{ _CONFIG_SIGQUEUE_MAX,		"_CONFIG_SIGQUEUE_MAX"		},
-#endif
-#ifdef _CONFIG_SIGRT_MIN
-	{ _CONFIG_SIGRT_MIN,		"_CONFIG_SIGRT_MIN"		},
-#endif
-#ifdef _CONFIG_SIGRT_MAX
-	{ _CONFIG_SIGRT_MAX,		"_CONFIG_SIGRT_MAX"		},
-#endif
-#ifdef _CONFIG_TIMER_MAX
-	{ _CONFIG_TIMER_MAX,		"_CONFIG_TIMER_MAX"		},
-#endif
-#ifdef _CONFIG_CONFIG_PHYS_PAGES
-	{ _CONFIG_PHYS_PAGES,		"_CONFIG_PHYS_PAGES"		},
-#endif
-#ifdef _CONFIG_AVPHYS_PAGES
-	{ _CONFIG_AVPHYS_PAGES,		"_CONFIG_AVPHYS_PAGES"		},
-#endif
-	{ 0,				NULL				},
-};
-
-int
-sys_sysconfig(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp))
-		printxval(sysconfig_options, tcp->u_arg[0], "_CONFIG_???");
-	return 0;
-}
-
-static const struct xlat sysinfo_options[] = {
-	{ SI_SYSNAME,		"SI_SYSNAME"		},
-	{ SI_HOSTNAME,		"SI_HOSTNAME"		},
-	{ SI_RELEASE,		"SI_RELEASE"		},
-	{ SI_VERSION,		"SI_VERSION"		},
-	{ SI_MACHINE,		"SI_MACHINE"		},
-	{ SI_ARCHITECTURE,	"SI_ARCHITECTURE"	},
-	{ SI_HW_SERIAL,		"SI_HW_SERIAL"		},
-	{ SI_HW_PROVIDER,	"SI_HW_PROVIDER"	},
-	{ SI_SRPC_DOMAIN,	"SI_SRPC_DOMAIN"	},
-#ifdef SI_SET_HOSTNAME
-	{ SI_SET_HOSTNAME,	"SI_SET_HOSTNAME"	},
-#endif
-#ifdef SI_SET_SRPC_DOMAIN
-	{ SI_SET_SRPC_DOMAIN,	"SI_SET_SRPC_DOMAIN"	},
-#endif
-#ifdef SI_SET_KERB_REALM
-	{ SI_SET_KERB_REALM,	"SI_SET_KERB_REALM"	},
-#endif
-#ifdef 	SI_KERB_REALM
-	{ SI_KERB_REALM,	"SI_KERB_REALM"		},
-#endif
-	{ 0,			NULL			},
-};
-
-int
-sys_sysinfo(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printxval(sysinfo_options, tcp->u_arg[0], "SI_???");
-		tprintf(", ");
-	}
-	else {
-		/* Technically some calls write values.  So what. */
-		if (syserror(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else
-			printpath(tcp, tcp->u_arg[1]);
-		tprintf(", %lu", tcp->u_arg[2]);
-	}
-	return 0;
-}
-
-#ifdef MIPS
-
-#include <sys/syssgi.h>
-
-static const struct xlat syssgi_options[] = {
-	{ SGI_SYSID,		"SGI_SYSID"		},
-#ifdef SGI_RDUBLK
-	{ SGI_RDUBLK,		"SGI_RDUBLK"		},
-#endif
-	{ SGI_TUNE,		"SGI_TUNE"		},
-	{ SGI_IDBG,		"SGI_IDBG"		},
-	{ SGI_INVENT,		"SGI_INVENT"		},
-	{ SGI_RDNAME,		"SGI_RDNAME"		},
-	{ SGI_SETLED,		"SGI_SETLED"		},
-	{ SGI_SETNVRAM,		"SGI_SETNVRAM"		},
-	{ SGI_GETNVRAM,		"SGI_GETNVRAM"		},
-	{ SGI_QUERY_FTIMER,	"SGI_QUERY_FTIMER"	},
-	{ SGI_QUERY_CYCLECNTR,	"SGI_QUERY_CYCLECNTR"	},
-	{ SGI_PROCSZ,		"SGI_PROCSZ"		},
-	{ SGI_SIGACTION,	"SGI_SIGACTION"		},
-	{ SGI_SIGPENDING,	"SGI_SIGPENDING"	},
-	{ SGI_SIGPROCMASK,	"SGI_SIGPROCMASK"	},
-	{ SGI_SIGSUSPEND,	"SGI_SIGSUSPEND"	},
-	{ SGI_SETSID,		"SGI_SETSID"		},
-	{ SGI_SETPGID,		"SGI_SETPGID"		},
-	{ SGI_SYSCONF,		"SGI_SYSCONF"		},
-	{ SGI_WAIT4,		"SGI_WAIT4"		},
-	{ SGI_PATHCONF,		"SGI_PATHCONF"		},
-	{ SGI_READB,		"SGI_READB"		},
-	{ SGI_WRITEB,		"SGI_WRITEB"		},
-	{ SGI_SETGROUPS,	"SGI_SETGROUPS"		},
-	{ SGI_GETGROUPS,	"SGI_GETGROUPS"		},
-	{ SGI_SETTIMEOFDAY,	"SGI_SETTIMEOFDAY"	},
-	{ SGI_SETTIMETRIM,	"SGI_SETTIMETRIM"	},
-	{ SGI_GETTIMETRIM,	"SGI_GETTIMETRIM"	},
-	{ SGI_SPROFIL,		"SGI_SPROFIL"		},
-	{ SGI_RUSAGE,		"SGI_RUSAGE"		},
-	{ SGI_SIGSTACK,		"SGI_SIGSTACK"		},
-	{ SGI_SIGSTATUS,	"SGI_SIGSTATUS"		},
-	{ SGI_NETPROC,		"SGI_NETPROC"		},
-	{ SGI_SIGALTSTACK,	"SGI_SIGALTSTACK"	},
-	{ SGI_BDFLUSHCNT,	"SGI_BDFLUSHCNT"	},
-	{ SGI_SSYNC,		"SGI_SSYNC"		},
-	{ SGI_NFSCNVT,		"SGI_NFSCNVT"		},
-	{ SGI_GETPGID,		"SGI_GETPGID"		},
-	{ SGI_GETSID,		"SGI_GETSID"		},
-	{ SGI_IOPROBE,		"SGI_IOPROBE"		},
-	{ SGI_CONFIG,		"SGI_CONFIG"		},
-	{ SGI_ELFMAP,		"SGI_ELFMAP"		},
-	{ SGI_MCONFIG,		"SGI_MCONFIG"		},
-	{ SGI_GETPLABEL,	"SGI_GETPLABEL"		},
-	{ SGI_SETPLABEL,	"SGI_SETPLABEL"		},
-	{ SGI_GETLABEL,		"SGI_GETLABEL"		},
-	{ SGI_SETLABEL,		"SGI_SETLABEL"		},
-	{ SGI_SATREAD,		"SGI_SATREAD"		},
-	{ SGI_SATWRITE,		"SGI_SATWRITE"		},
-	{ SGI_SATCTL,		"SGI_SATCTL"		},
-	{ SGI_LOADATTR,		"SGI_LOADATTR"		},
-	{ SGI_UNLOADATTR,	"SGI_UNLOADATTR"	},
-#ifdef SGI_RECVLMSG
-	{ SGI_RECVLMSG,		"SGI_RECVLMSG"		},
-#endif
-	{ SGI_PLANGMOUNT,	"SGI_PLANGMOUNT"	},
-	{ SGI_GETPSOACL,	"SGI_GETPSOACL"		},
-	{ SGI_SETPSOACL,	"SGI_SETPSOACL"		},
-#ifdef SGI_EAG_GET_ATTR
-	{ SGI_EAG_GET_ATTR,	"SGI_EAG_GET_ATTR"	},
-#endif
-#ifdef SGI_EAG_SET_ATTR
-	{ SGI_EAG_SET_ATTR,	"SGI_EAG_SET_ATTR"	},
-#endif
-#ifdef SGI_EAG_GET_PROCATTR
-	{ SGI_EAG_GET_PROCATTR,	"SGI_EAG_GET_PROCATTR"	},
-#endif
-#ifdef SGI_EAG_SET_PROCATTR
-	{ SGI_EAG_SET_PROCATTR,	"SGI_EAG_SET_PROCATTR"	},
-#endif
-#ifdef SGI_FREVOKE
-	{ SGI_FREVOKE,		"SGI_FREVOKE"		},
-#endif
-#ifdef SGI_SBE_GET_INFO
-	{ SGI_SBE_GET_INFO,	"SGI_SBE_GET_INFO"	},
-#endif
-#ifdef SGI_SBE_CLR_INFO
-	{ SGI_SBE_CLR_INFO,	"SGI_SBE_CLR_INFO"	},
-#endif
-	{ SGI_RMI_FIXECC,	"SGI_RMI_FIXECC"	},
-	{ SGI_R4K_CERRS,	"SGI_R4K_CERRS"		},
-	{ SGI_GET_EVCONF,	"SGI_GET_EVCONF"	},
-	{ SGI_MPCWAROFF,	"SGI_MPCWAROFF"		},
-	{ SGI_SET_AUTOPWRON,	"SGI_SET_AUTOPWRON"	},
-	{ SGI_SPIPE,		"SGI_SPIPE"		},
-	{ SGI_SYMTAB,		"SGI_SYMTAB"		},
-#ifdef SGI_SET_FPDEBUG
-	{ SGI_SET_FPDEBUG,	"SGI_SET_FPDEBUG"	},
-#endif
-#ifdef SGI_SET_FP_PRECISE
-	{ SGI_SET_FP_PRECISE,	"SGI_SET_FP_PRECISE"	},
-#endif
-	{ SGI_TOSSTSAVE,	"SGI_TOSSTSAVE"		},
-	{ SGI_FDHI,		"SGI_FDHI"		},
-#ifdef SGI_SET_CONFIG_SMM
-	{ SGI_SET_CONFIG_SMM,	"SGI_SET_CONFIG_SMM"	},
-#endif
-#ifdef SGI_SET_FP_PRESERVE
-	{ SGI_SET_FP_PRESERVE,	"SGI_SET_FP_PRESERVE"	},
-#endif
-	{ SGI_MINRSS,		"SGI_MINRSS"		},
-#ifdef SGI_GRIO
-	{ SGI_GRIO,		"SGI_GRIO"		},
-#endif
-#ifdef SGI_XLV_SET_TAB
-	{ SGI_XLV_SET_TAB,	"SGI_XLV_SET_TAB"	},
-#endif
-#ifdef SGI_XLV_GET_TAB
-	{ SGI_XLV_GET_TAB,	"SGI_XLV_GET_TAB"	},
-#endif
-#ifdef SGI_GET_FP_PRECISE
-	{ SGI_GET_FP_PRECISE,	"SGI_GET_FP_PRECISE"	},
-#endif
-#ifdef SGI_GET_CONFIG_SMM
-	{ SGI_GET_CONFIG_SMM,	"SGI_GET_CONFIG_SMM"	},
-#endif
-#ifdef SGI_FP_IMPRECISE_SUPP
-	{ SGI_FP_IMPRECISE_SUPP,"SGI_FP_IMPRECISE_SUPP"	},
-#endif
-#ifdef SGI_CONFIG_NSMM_SUPP
-	{ SGI_CONFIG_NSMM_SUPP,	"SGI_CONFIG_NSMM_SUPP"	},
-#endif
-#ifdef SGI_RT_TSTAMP_CREATE
-	{ SGI_RT_TSTAMP_CREATE,	"SGI_RT_TSTAMP_CREATE"	},
-#endif
-#ifdef SGI_RT_TSTAMP_DELETE
-	{ SGI_RT_TSTAMP_DELETE,	"SGI_RT_TSTAMP_DELETE"	},
-#endif
-#ifdef SGI_RT_TSTAMP_START
-	{ SGI_RT_TSTAMP_START,	"SGI_RT_TSTAMP_START"	},
-#endif
-#ifdef SGI_RT_TSTAMP_STOP
-	{ SGI_RT_TSTAMP_STOP,	"SGI_RT_TSTAMP_STOP"	},
-#endif
-#ifdef SGI_RT_TSTAMP_ADDR
-	{ SGI_RT_TSTAMP_ADDR,	"SGI_RT_TSTAMP_ADDR"	},
-#endif
-#ifdef SGI_RT_TSTAMP_MASK
-	{ SGI_RT_TSTAMP_MASK,	"SGI_RT_TSTAMP_MASK"	},
-#endif
-#ifdef SGI_RT_TSTAMP_EOB_MODE
-	{ SGI_RT_TSTAMP_EOB_MODE,"SGI_RT_TSTAMP_EOB_MODE"},
-#endif
-#ifdef SGI_USE_FP_BCOPY
-	{ SGI_USE_FP_BCOPY,	"SGI_USE_FP_BCOPY"	},
-#endif
-#ifdef SGI_GET_UST
-	{ SGI_GET_UST,		"SGI_GET_UST"		},
-#endif
-#ifdef SGI_SPECULATIVE_EXEC
-	{ SGI_SPECULATIVE_EXEC,	"SGI_SPECULATIVE_EXEC"	},
-#endif
-#ifdef SGI_XLV_NEXT_RQST
-	{ SGI_XLV_NEXT_RQST,	"SGI_XLV_NEXT_RQST"	},
-#endif
-#ifdef SGI_XLV_ATTR_CURSOR
-	{ SGI_XLV_ATTR_CURSOR,	"SGI_XLV_ATTR_CURSOR"	},
-#endif
-#ifdef SGI_XLV_ATTR_GET
-	{ SGI_XLV_ATTR_GET,	"SGI_XLV_ATTR_GET"	},
-#endif
-#ifdef SGI_XLV_ATTR_SET
-	{ SGI_XLV_ATTR_SET,	"SGI_XLV_ATTR_SET"	},
-#endif
-#ifdef SGI_BTOOLSIZE
-	{ SGI_BTOOLSIZE,	"SGI_BTOOLSIZE"		},
-#endif
-#ifdef SGI_BTOOLGET
-	{ SGI_BTOOLGET,		"SGI_BTOOLGET"		},
-#endif
-#ifdef SGI_BTOOLREINIT
-	{ SGI_BTOOLREINIT,	"SGI_BTOOLREINIT"	},
-#endif
-#ifdef SGI_CREATE_UUID
-	{ SGI_CREATE_UUID,	"SGI_CREATE_UUID"	},
-#endif
-#ifdef SGI_NOFPE
-	{ SGI_NOFPE,		"SGI_NOFPE"		},
-#endif
-#ifdef SGI_OLD_SOFTFP
-	{ SGI_OLD_SOFTFP,	"SGI_OLD_SOFTFP"	},
-#endif
-#ifdef SGI_FS_INUMBERS
-	{ SGI_FS_INUMBERS,	"SGI_FS_INUMBERS"	},
-#endif
-#ifdef SGI_FS_BULKSTAT
-	{ SGI_FS_BULKSTAT,	"SGI_FS_BULKSTAT"	},
-#endif
-#ifdef SGI_RT_TSTAMP_WAIT
-	{ SGI_RT_TSTAMP_WAIT,	"SGI_RT_TSTAMP_WAIT"	},
-#endif
-#ifdef SGI_RT_TSTAMP_UPDATE
-	{ SGI_RT_TSTAMP_UPDATE,	"SGI_RT_TSTAMP_UPDATE"	},
-#endif
-#ifdef SGI_PATH_TO_HANDLE
-	{ SGI_PATH_TO_HANDLE,	"SGI_PATH_TO_HANDLE"	},
-#endif
-#ifdef SGI_PATH_TO_FSHANDLE
-	{ SGI_PATH_TO_FSHANDLE,	"SGI_PATH_TO_FSHANDLE"	},
-#endif
-#ifdef SGI_FD_TO_HANDLE
-	{ SGI_FD_TO_HANDLE,	"SGI_FD_TO_HANDLE"	},
-#endif
-#ifdef SGI_OPEN_BY_HANDLE
-	{ SGI_OPEN_BY_HANDLE,	"SGI_OPEN_BY_HANDLE"	},
-#endif
-#ifdef SGI_READLINK_BY_HANDLE
-	{ SGI_READLINK_BY_HANDLE,"SGI_READLINK_BY_HANDLE"},
-#endif
-#ifdef SGI_READ_DANGID
-	{ SGI_READ_DANGID,	"SGI_READ_DANGID"	},
-#endif
-#ifdef SGI_CONST
-	{ SGI_CONST,		"SGI_CONST"		},
-#endif
-#ifdef SGI_XFS_FSOPERATIONS
-	{ SGI_XFS_FSOPERATIONS,	"SGI_XFS_FSOPERATIONS"	},
-#endif
-#ifdef SGI_SETASH
-	{ SGI_SETASH,		"SGI_SETASH"		},
-#endif
-#ifdef SGI_GETASH
-	{ SGI_GETASH,		"SGI_GETASH"		},
-#endif
-#ifdef SGI_SETPRID
-	{ SGI_SETPRID,		"SGI_SETPRID"		},
-#endif
-#ifdef SGI_GETPRID
-	{ SGI_GETPRID,		"SGI_GETPRID"		},
-#endif
-#ifdef SGI_SETSPINFO
-	{ SGI_SETSPINFO,	"SGI_SETSPINFO"		},
-#endif
-#ifdef SGI_GETSPINFO
-	{ SGI_GETSPINFO,	"SGI_GETSPINFO"		},
-#endif
-#ifdef SGI_SHAREII
-	{ SGI_SHAREII,		"SGI_SHAREII"		},
-#endif
-#ifdef SGI_NEWARRAYSESS
-	{ SGI_NEWARRAYSESS,	"SGI_NEWARRAYSESS"	},
-#endif
-#ifdef SGI_GETDFLTPRID
-	{ SGI_GETDFLTPRID,	"SGI_GETDFLTPRID"	},
-#endif
-#ifdef SGI_SET_DISMISSED_EXC_CNT
-	{ SGI_SET_DISMISSED_EXC_CNT,"SGI_SET_DISMISSED_EXC_CNT"	},
-#endif
-#ifdef SGI_GET_DISMISSED_EXC_CNT
-	{ SGI_GET_DISMISSED_EXC_CNT,"SGI_GET_DISMISSED_EXC_CNT"	},
-#endif
-#ifdef SGI_CYCLECNTR_SIZE
-	{ SGI_CYCLECNTR_SIZE,	"SGI_CYCLECNTR_SIZE"	},
-#endif
-#ifdef SGI_QUERY_FASTTIMER
-	{ SGI_QUERY_FASTTIMER,	"SGI_QUERY_FASTTIMER"	},
-#endif
-#ifdef SGI_PIDSINASH
-	{ SGI_PIDSINASH,	"SGI_PIDSINASH"		},
-#endif
-#ifdef SGI_ULI
-	{ SGI_ULI,		"SGI_ULI"		},
-#endif
-#ifdef SGI_LPG_SHMGET
-	{ SGI_LPG_SHMGET,	"SGI_LPG_SHMGET"	},
-#endif
-#ifdef SGI_LPG_MAP
-	{ SGI_LPG_MAP,		"SGI_LPG_MAP"		},
-#endif
-#ifdef SGI_CACHEFS_SYS
-	{ SGI_CACHEFS_SYS,	"SGI_CACHEFS_SYS"	},
-#endif
-#ifdef SGI_NFSNOTIFY
-	{ SGI_NFSNOTIFY,	"SGI_NFSNOTIFY"		},
-#endif
-#ifdef SGI_LOCKDSYS
-	{ SGI_LOCKDSYS,		"SGI_LOCKDSYS"		},
-#endif
-#ifdef SGI_EVENTCTR
-	{ SGI_EVENTCTR,		"SGI_EVENTCTR"		},
-#endif
-#ifdef SGI_GETPRUSAGE
-	{ SGI_GETPRUSAGE,	"SGI_GETPRUSAGE"	},
-#endif
-#ifdef SGI_PROCMASK_LOCATION
-	{ SGI_PROCMASK_LOCATION,"SGI_PROCMASK_LOCATION"	},
-#endif
-#ifdef SGI_UNUSED
-	{ SGI_UNUSED,		"SGI_UNUSED"		},
-#endif
-#ifdef SGI_CKPT_SYS
-	{ SGI_CKPT_SYS,		"SGI_CKPT_SYS"		},
-#endif
-#ifdef SGI_CKPT_SYS
-	{ SGI_CKPT_SYS,		"SGI_CKPT_SYS"		},
-#endif
-#ifdef SGI_GETGRPPID
-	{ SGI_GETGRPPID,	"SGI_GETGRPPID"		},
-#endif
-#ifdef SGI_GETSESPID
-	{ SGI_GETSESPID,	"SGI_GETSESPID"		},
-#endif
-#ifdef SGI_ENUMASHS
-	{ SGI_ENUMASHS,		"SGI_ENUMASHS"		},
-#endif
-#ifdef SGI_SETASMACHID
-	{ SGI_SETASMACHID,	"SGI_SETASMACHID"	},
-#endif
-#ifdef SGI_GETASMACHID
-	{ SGI_GETASMACHID,	"SGI_GETASMACHID"	},
-#endif
-#ifdef SGI_GETARSESS
-	{ SGI_GETARSESS,	"SGI_GETARSESS"		},
-#endif
-#ifdef SGI_JOINARRAYSESS
-	{ SGI_JOINARRAYSESS,	"SGI_JOINARRAYSESS"	},
-#endif
-#ifdef SGI_SPROC_KILL
-	{ SGI_SPROC_KILL,	"SGI_SPROC_KILL"	},
-#endif
-#ifdef SGI_DBA_CONFIG
-	{ SGI_DBA_CONFIG,	"SGI_DBA_CONFIG"	},
-#endif
-#ifdef SGI_RELEASE_NAME
-	{ SGI_RELEASE_NAME,	"SGI_RELEASE_NAME"	},
-#endif
-#ifdef SGI_SYNCH_CACHE_HANDLER
-	{ SGI_SYNCH_CACHE_HANDLER,"SGI_SYNCH_CACHE_HANDLER"},
-#endif
-#ifdef SGI_SWASH_INIT
-	{ SGI_SWASH_INIT,	"SGI_SWASH_INIT"	},
-#endif
-#ifdef SGI_NUMA_MIGR_PAGE
-	{ SGI_NUMA_MIGR_PAGE,	"SGI_NUMA_MIGR_PAGE"	},
-#endif
-#ifdef SGI_NUMA_MIGR_PAGE_ALT
-	{ SGI_NUMA_MIGR_PAGE_ALT,"SGI_NUMA_MIGR_PAGE_ALT"},
-#endif
-#ifdef SGI_KAIO_USERINIT
-	{ SGI_KAIO_USERINIT,	"SGI_KAIO_USERINIT"	},
-#endif
-#ifdef SGI_KAIO_READ
-	{ SGI_KAIO_READ,	"SGI_KAIO_READ"		},
-#endif
-#ifdef SGI_KAIO_WRITE
-	{ SGI_KAIO_WRITE,	"SGI_KAIO_WRITE"	},
-#endif
-#ifdef SGI_KAIO_SUSPEND
-	{ SGI_KAIO_SUSPEND,	"SGI_KAIO_SUSPEND"	},
-#endif
-#ifdef SGI_KAIO_STATS
-	{ SGI_KAIO_STATS,	"SGI_KAIO_STATS"	},
-#endif
-#ifdef SGI_INITIAL_PT_SPROC
-	{ SGI_INITIAL_PT_SPROC,	"SGI_INITIAL_PT_SPROC"	},
-#endif
-	{ 0,			NULL			},
-};
-
-int
-sys_syssgi(tcp)
-struct tcb *tcp;
-{
-	int i;
-
-	if (entering(tcp)) {
-		printxval(syssgi_options, tcp->u_arg[0], "SGI_???");
-		switch (tcp->u_arg[0]) {
-		default:
-			for (i = 1; i < tcp->u_nargs; i++)
-				tprintf(", %#lx", tcp->u_arg[i]);
-			break;
-		}
-	}
-	return 0;
-}
-
-#include <sys/types.h>
-#include <rpc/rpc.h>
-struct cred;
-struct uio;
-#include <sys/fsid.h>
-#include <sys/vnode.h>
-#include <sys/fs/nfs.h>
-#include <sys/fs/nfs_clnt.h>
-
-static const struct xlat mount_flags[] = {
-	{ MS_RDONLY,	"MS_RDONLY"	},
-	{ MS_FSS,	"MS_FSS"	},
-	{ MS_DATA,	"MS_DATA"	},
-	{ MS_NOSUID,	"MS_NOSUID"	},
-	{ MS_REMOUNT,	"MS_REMOUNT"	},
-	{ MS_NOTRUNC,	"MS_NOTRUNC"	},
-	{ MS_GRPID,	"MS_GRPID"	},
-	{ MS_NODEV,	"MS_NODEV"	},
-	{ MS_BEFORE,	"MS_BEFORE"	},
-	{ MS_AFTER,	"MS_AFTER"	},
-	{ 0,		NULL		},
-};
-
-static const struct xlat nfs_flags[] = {
-	{ NFSMNT_SOFT,		"NFSMNT_SOFT"		},
-	{ NFSMNT_WSIZE,		"NFSMNT_WSIZE"		},
-	{ NFSMNT_RSIZE,		"NFSMNT_RSIZE"		},
-	{ NFSMNT_TIMEO,		"NFSMNT_TIMEO"		},
-	{ NFSMNT_RETRANS,	"NFSMNT_RETRANS"	},
-	{ NFSMNT_HOSTNAME,	"NFSMNT_HOSTNAME"	},
-#ifdef NFSMNT_NOINT	/* IRIX 6 */
-	{ NFSMNT_NOINT,		"NFSMNT_NOINT"		},
-#endif
-#ifdef NFSMNT_INT	/* IRIX 5 */
-	{ NFSMNT_INT,		"NFSMNT_INT"		},
-#endif
-	{ NFSMNT_NOAC,		"NFSMNT_NOAC"		},
-	{ NFSMNT_ACREGMIN,	"NFSMNT_ACREGMIN"	},
-	{ NFSMNT_ACREGMAX,	"NFSMNT_ACREGMAX"	},
-	{ NFSMNT_ACDIRMIN,	"NFSMNT_ACDIRMIN"	},
-	{ NFSMNT_ACDIRMAX,	"NFSMNT_ACDIRMAX"	},
-	{ NFSMNT_PRIVATE,	"NFSMNT_PRIVATE"	},
-	{ NFSMNT_SYMTTL,	"NFSMNT_SYMTTL"		},
-	{ NFSMNT_LOOPBACK,	"NFSMNT_LOOPBACK"	},
-	{ NFSMNT_BASETYPE,	"NFSMNT_BASETYPE"	},
-	{ NFSMNT_NAMEMAX,	"NFSMNT_NAMEMAX"	},
-#ifdef NFSMNT_SHORTUID	/* IRIX 6 */
-	{ NFSMNT_SHORTUID,	"NFSMNT_SHORTUID"	},
-#endif
-#ifdef NFSMNT_ASYNCNLM	/* IRIX 6 */
-	{ NFSMNT_ASYNCNLM,	"NFSMNT_ASYNCNLM"	},
-#endif
-	{ 0,			NULL			},
-};
-
-int
-sys_mount(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
-		printflags(mount_flags, tcp->u_arg[2], "MS_???");
-		if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
-			tprintf(", ");
-			tprintf("%ld", tcp->u_arg[3]);
-		}
-		if (tcp->u_arg[2] & MS_DATA) {
-			int nfs_type = sysfs(GETFSIND, FSID_NFS);
-
-			tprintf(", ");
-			if (tcp->u_arg[3] == nfs_type) {
-				struct nfs_args args;
-				if (umove(tcp, tcp->u_arg[4], &args) < 0)
-					tprintf("%#lx", tcp->u_arg[4]);
-				else {
-					tprintf("addr=");
-					printsock(tcp, (int) args.addr);
-					tprintf(", flags=");
-					printflags(nfs_flags, args.flags, "NFSMNT_???");
-					tprintf(", hostname=");
-					printstr(tcp, (int) args.hostname, -1);
-					tprintf(", ...}");
-				}
-			}
-			else
-				tprintf("%#lx", tcp->u_arg[4]);
-			tprintf(", %ld", tcp->u_arg[5]);
-		}
-	}
-	return 0;
-}
-
-#else /* !MIPS */
-
-#if UNIXWARE
-
-#include <sys/types.h>
-#include <sys/fstyp.h>
-#include <sys/mount.h>
-#include <sys/xti.h>
-
-#define NFSCLIENT	1
-#include <nfs/mount.h>
-
-#include <sys/fs/vx_ioctl.h>
-
-static const struct xlat mount_flags[] = {
-	{ MS_RDONLY,	"MS_RDONLY"	},
-	{ MS_FSS,	"MS_FSS"	},
-	{ MS_DATA,	"MS_DATA"	},
-	{ MS_HADBAD,	"MS_HADBAD"	},
-	{ MS_NOSUID,	"MS_NOSUID"	},
-	{ MS_REMOUNT,	"MS_REMOUNT"	},
-	{ MS_NOTRUNC,	"MS_NOTRUNC"	},
-	{ MS_SOFTMNT,	"MS_SOFTMNT"	},
-	{ MS_SYSSPACE,	"MS_SYSSPACE"	},
-	{ 0,		NULL		},
-};
-
-#ifdef VX_MS_MASK
-static const struct xlat vxfs_flags[] = {
-	{ VX_MS_NOLOG,		"VX_MS_NOLOG"		},
-	{ VX_MS_BLKCLEAR,	"VX_MS_BLKCLEAR"	},
-	{ VX_MS_SNAPSHOT,	"VX_MS_SNAPSHOT"	},
-	{ VX_MS_NODATAINLOG,	"VX_MS_NODATAINLOG"	},
-	{ VX_MS_DELAYLOG,	"VX_MS_DELAYLOG"	},
-	{ VX_MS_TMPLOG,		"VX_MS_TMPLOG"		},
-	{ VX_MS_FILESET,	"VX_MS_FILESET"		},
-
-	{ VX_MS_CACHE_DIRECT,	"VX_MS_CACHE_DIRECT"	},
-	{ VX_MS_CACHE_DSYNC,	"VX_MS_CACHE_DSYNC"	},
-	{ VX_MS_CACHE_CLOSESYNC,"VX_MS_CACHE_CLOSESYNC"	},
-	{ VX_MS_CACHE_TMPCACHE,	"VX_MS_CACHE_TMPCACHE"	},
-
-	{ VX_MS_OSYNC_DIRECT,	"VX_MS_OSYNC_DIRECT"	},
-	{ VX_MS_OSYNC_DSYNC,	"VX_MS_OSYNC_DSYNC"	},
-	{ VX_MS_OSYNC_CLOSESYNC,"VX_MS_OSYNC_CLOSESYNC"	},
-	{ VX_MS_OSYNC_DELAY,	"VX_MS_OSYNC_DELAY"	},
-	{ 0,			NULL,			},
-};
-#endif
-
-static const struct xlat nfs_flags[] = {
-	{ NFSMNT_SOFT,		"NFSMNT_SOFT"		},
-	{ NFSMNT_WSIZE,		"NFSMNT_WSIZE"		},
-	{ NFSMNT_RSIZE,		"NFSMNT_RSIZE"		},
-	{ NFSMNT_TIMEO,		"NFSMNT_TIMEO"		},
-	{ NFSMNT_RETRANS,	"NFSMNT_RETRANS"	},
-	{ NFSMNT_HOSTNAME,	"NFSMNT_HOSTNAME"	},
-	{ NFSMNT_INT,		"NFSMNT_INT"		},
-	{ NFSMNT_NOAC,		"NFSMNT_NOAC"		},
-	{ NFSMNT_ACREGMIN,	"NFSMNT_ACREGMIN"	},
-	{ NFSMNT_ACREGMAX,	"NFSMNT_ACREGMAX"	},
-	{ NFSMNT_ACDIRMIN,	"NFSMNT_ACDIRMIN"	},
-	{ NFSMNT_ACDIRMAX,	"NFSMNT_ACDIRMAX"	},
-	{ NFSMNT_SECURE,	"NFSMNT_SECURE"		},
-	{ NFSMNT_NOCTO,		"NFSMNT_NOCTO"		},
-	{ NFSMNT_GRPID,		"NFSMNT_GRPID"		},
-	{ NFSMNT_RPCTIMESYNC,	"NFSMNT_RPCTIMESYNC"	},
-	{ NFSMNT_LWPSMAX,	"NFSMNT_LWPSMAX"	},
-	{ 0,			NULL			},
-};
-
-int
-sys_mount(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		char fstyp [FSTYPSZ];
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ");
-		printflags(mount_flags, tcp->u_arg[2], "MS_???");
-		/* The doc sez that the file system type is given as a
-		   fsindex, and we should use sysfs to work out the name.
-		   This appears to be untrue for UW.  Maybe it's untrue
-		   for all SVR4's? */
-		if (tcp->u_arg[2] & (MS_FSS | MS_DATA)) {
-			if (umovestr(tcp, tcp->u_arg[3], FSTYPSZ, fstyp) < 0) {
-				*fstyp = 0;
-				tprintf(", %ld", tcp->u_arg[3]);
-			}
-			else
-				tprintf(", \"%s\"", fstyp);
-		}
-		if (tcp->u_arg[2] & MS_DATA) {
-			tprintf(", ");
-#ifdef VX_MS_MASK
-			/* On UW7 they don't give us the defines and structs
-			   we need to see what is going on.  Bummer. */
-			if (strcmp (fstyp, "vxfs") == 0) {
-				struct vx_mountargs5 args;
-				if (umove(tcp, tcp->u_arg[4], &args) < 0)
-					tprintf("%#lx", tcp->u_arg[4]);
-				else {
-					tprintf("{ flags=");
-					printflags(vxfs_flags, args.mflags, "VX_MS_???");
-					if (args.mflags & VX_MS_SNAPSHOT) {
-						tprintf (", snapof=");
-						printstr (tcp,
-							  (long) args.primaryspec,
-							  -1);
-						if (args.snapsize > 0)
-							tprintf (", snapsize=%ld", args.snapsize);
-					}
-					tprintf(" }");
-				}
-			}
-			else
-#endif
-			if (strcmp (fstyp, "specfs") == 0) {
-				tprintf ("dev=");
-				printstr (tcp, tcp->u_arg[4], -1);
-			}
-			else
-			if (strcmp (fstyp, "nfs") == 0) {
-				struct nfs_args args;
-				if (umove(tcp, tcp->u_arg[4], &args) < 0)
-					tprintf("%#lx", tcp->u_arg[4]);
-				else {
-					struct netbuf addr;
-					tprintf("{ addr=");
-					if (umove (tcp, (int) args.addr, &addr) < 0) {
-						tprintf ("%#lx", (long) args.addr);
-					}
-					else {
-						printsock(tcp, (int) addr.buf, addr.len);
-					}
-					tprintf(", flags=");
-					printflags(nfs_flags, args.flags, "NFSMNT_???");
-					tprintf(", hostname=");
-					printstr(tcp, (int) args.hostname, -1);
-					tprintf(", ...}");
-				}
-			}
-			else
-				tprintf("%#lx", tcp->u_arg[4]);
-			tprintf(", %ld", tcp->u_arg[5]);
-		}
-	}
-	return 0;
-}
-
-#else /* !UNIXWARE */
-
-int
-sys_mount(tcp)
-struct tcb *tcp;
-{
-	if (entering(tcp)) {
-		printpath(tcp, tcp->u_arg[0]);
-		tprintf(", ");
-		printpath(tcp, tcp->u_arg[1]);
-		tprintf(", ...");
-	}
-	return 0;
-}
-#endif /* !UNIXWARE */
-
-#endif /* !MIPS */
-
-#endif /* SVR4 */
-
 #ifdef SYS_capget
 
 static const struct xlat capabilities[] = {
@@ -1592,131 +483,107 @@
 #ifdef CAP_SETFCAP
 	{ 1<<CAP_SETFCAP,	"CAP_SETFCAP"	},
 #endif
-	{ 0,                    NULL            },
+	{ 0,		NULL		},
 };
 
+#ifndef _LINUX_CAPABILITY_VERSION_1
+# define _LINUX_CAPABILITY_VERSION_1 0x19980330
+#endif
+#ifndef _LINUX_CAPABILITY_VERSION_2
+# define _LINUX_CAPABILITY_VERSION_2 0x20071026
+#endif
+#ifndef _LINUX_CAPABILITY_VERSION_3
+# define _LINUX_CAPABILITY_VERSION_3 0x20080522
+#endif
+
+static const struct xlat cap_version[] = {
+	{ _LINUX_CAPABILITY_VERSION_1,	"_LINUX_CAPABILITY_VERSION_1"	},
+	{ _LINUX_CAPABILITY_VERSION_2,	"_LINUX_CAPABILITY_VERSION_3"	},
+	{ _LINUX_CAPABILITY_VERSION_3,	"_LINUX_CAPABILITY_VERSION_3"	},
+	{ 0,				NULL				}
+};
+
+static void
+print_cap_header(struct tcb *tcp, unsigned long addr)
+{
+	union { cap_user_header_t p; long *a; char *c; } arg;
+	long a[sizeof(*arg.p) / sizeof(long) + 1];
+	arg.a = a;
+
+	if (!addr)
+		tprints("NULL");
+	else if (!verbose(tcp) ||
+		 umoven(tcp, addr, sizeof(*arg.p), arg.c) < 0)
+		tprintf("%#lx", addr);
+	else {
+		tprints("{");
+		printxval(cap_version, arg.p->version,
+			  "_LINUX_CAPABILITY_VERSION_???");
+		tprintf(", %d}", arg.p->pid);
+	}
+}
+
+static void
+print_cap_data(struct tcb *tcp, unsigned long addr)
+{
+	union { cap_user_data_t p; long *a; char *c; } arg;
+	long a[sizeof(*arg.p) / sizeof(long) + 1];
+	arg.a = a;
+
+	if (!addr)
+		tprints("NULL");
+	else if (!verbose(tcp) ||
+		 (exiting(tcp) && syserror(tcp)) ||
+		 umoven(tcp, addr, sizeof(*arg.p), arg.c) < 0)
+		tprintf("%#lx", addr);
+	else {
+		tprints("{");
+		printflags(capabilities, arg.p->effective, "CAP_???");
+		tprints(", ");
+		printflags(capabilities, arg.p->permitted, "CAP_???");
+		tprints(", ");
+		printflags(capabilities, arg.p->inheritable, "CAP_???");
+		tprints("}");
+	}
+}
 
 int
-sys_capget(tcp)
-struct tcb *tcp;
+sys_capget(struct tcb *tcp)
 {
-	static cap_user_header_t       arg0 = NULL;
-	static cap_user_data_t         arg1 = NULL;
-
-	if(!entering(tcp)) {
-		if (!arg0) {
-			if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
-				fprintf(stderr, "out of memory\n");
-				tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-				return -1;
-			}
-		}
-		if (!arg1) {
-			if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
-				fprintf(stderr, "out of memory\n");
-				tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-				return -1;
-			}
-		}
-
-		if (!tcp->u_arg[0])
-			tprintf("NULL");
-		else if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
-			tprintf("???");
-		else {
-			tprintf("%#x, %d", arg0->version, arg0->pid);
-		}
-		tprintf(", ");
-		if (!tcp->u_arg[1])
-			tprintf("NULL");
-		else if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
-			tprintf("???");
-		else {
-			tprintf("{");
-			printflags(capabilities, arg1->effective, "CAP_???");
-			tprintf(", ");
-			printflags(capabilities, arg1->permitted, "CAP_???");
-			tprintf(", ");
-			printflags(capabilities, arg1->inheritable, "CAP_???");
-			tprintf("}");
-		}
+	if (entering(tcp)) {
+		print_cap_header(tcp, tcp->u_arg[0]);
+		tprints(", ");
+	} else {
+		print_cap_data(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
 int
-sys_capset(tcp)
-struct tcb *tcp;
+sys_capset(struct tcb *tcp)
 {
-	static cap_user_header_t       arg0 = NULL;
-	static cap_user_data_t         arg1 = NULL;
-
-	if(entering(tcp)) {
-		if (!arg0) {
-			if ((arg0 = malloc(sizeof(*arg0))) == NULL) {
-				fprintf(stderr, "out of memory\n");
-				tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-				return -1;
-			}
-		}
-		if (!arg1) {
-			if ((arg1 = malloc(sizeof(*arg1))) == NULL) {
-				fprintf(stderr, "out of memory\n");
-				tprintf("%#lx, %#lx", tcp->u_arg[0], tcp->u_arg[1]);
-				return -1;
-			}
-		}
-
-		if (!tcp->u_arg[0])
-			tprintf("NULL");
-		else if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else if (umoven(tcp, tcp->u_arg[0], sizeof(*arg0), (char *) arg0) < 0)
-			tprintf("???");
-		else {
-			tprintf("%#x, %d", arg0->version, arg0->pid);
-		}
-		tprintf(", ");
-		if (!tcp->u_arg[1])
-			tprintf("NULL");
-		else if (!verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[1]);
-		else if (umoven(tcp, tcp->u_arg[1], sizeof(*arg1), (char *) arg1) < 0)
-			tprintf("???");
-		else {
-			tprintf("{");
-			printflags(capabilities, arg1->effective, "CAP_???");
-			tprintf(", ");
-			printflags(capabilities, arg1->permitted, "CAP_???");
-			tprintf(", ");
-			printflags(capabilities, arg1->inheritable, "CAP_???");
-			tprintf("}");
-		}
+	if (entering(tcp)) {
+		print_cap_header(tcp, tcp->u_arg[0]);
+		tprints(", ");
+		print_cap_data(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
 #else
 
-int sys_capget(tcp)
-struct tcb *tcp;
+int sys_capget(struct tcb *tcp)
 {
 	return printargs(tcp);
 }
 
-int sys_capset(tcp)
-struct tcb *tcp;
+int sys_capset(struct tcb *tcp)
 {
 	return printargs(tcp);
 }
 
 #endif
 
-#ifdef LINUX
 /* Linux 2.6.18+ headers removed CTL_PROC enum.  */
 # define CTL_PROC 4
 # define CTL_CPU 10		/* older headers lack */
@@ -1963,18 +830,17 @@
 };
 
 int
-sys_sysctl(tcp)
-struct tcb *tcp;
+sys_sysctl(struct tcb *tcp)
 {
 	struct __sysctl_args info;
 	int *name;
 	unsigned long size;
 
-	if (umove (tcp, tcp->u_arg[0], &info) < 0)
+	if (umove(tcp, tcp->u_arg[0], &info) < 0)
 		return printargs(tcp);
 
-	size = sizeof (int) * (unsigned long) info.nlen;
-	name = (size / sizeof (int) != info.nlen) ? NULL : malloc (size);
+	size = sizeof(int) * (unsigned long) info.nlen;
+	name = (size / sizeof(int) != info.nlen) ? NULL : malloc(size);
 	if (name == NULL ||
 	    umoven(tcp, (unsigned long) info.name, size, (char *) name) < 0) {
 		free(name);
@@ -1988,7 +854,7 @@
 	if (entering(tcp)) {
 		int cnt = 0, max_cnt;
 
-		tprintf("{{");
+		tprints("{{");
 
 		if (info.nlen == 0)
 			goto out;
@@ -1999,17 +865,17 @@
 			goto out;
 		switch (name[0]) {
 		case CTL_KERN:
-			tprintf(", ");
+			tprints(", ");
 			printxval(sysctl_kern, name[1], "KERN_???");
 			++cnt;
 			break;
 		case CTL_VM:
-			tprintf(", ");
+			tprints(", ");
 			printxval(sysctl_vm, name[1], "VM_???");
 			++cnt;
 			break;
 		case CTL_NET:
-			tprintf(", ");
+			tprints(", ");
 			printxval(sysctl_net, name[1], "NET_???");
 			++cnt;
 
@@ -2017,17 +883,17 @@
 				goto out;
 			switch (name[1]) {
 			case NET_CORE:
-				tprintf(", ");
+				tprints(", ");
 				printxval(sysctl_net_core, name[2],
 					  "NET_CORE_???");
 				break;
 			case NET_UNIX:
-				tprintf(", ");
+				tprints(", ");
 				printxval(sysctl_net_unix, name[2],
 					  "NET_UNIX_???");
 				break;
 			case NET_IPV4:
-				tprintf(", ");
+				tprints(", ");
 				printxval(sysctl_net_ipv4, name[2],
 					  "NET_IPV4_???");
 
@@ -2035,13 +901,13 @@
 					goto out;
 				switch (name[2]) {
 				case NET_IPV4_ROUTE:
-					tprintf(", ");
+					tprints(", ");
 					printxval(sysctl_net_ipv4_route,
 						  name[3],
 						  "NET_IPV4_ROUTE_???");
 					break;
 				case NET_IPV4_CONF:
-					tprintf(", ");
+					tprints(", ");
 					printxval(sysctl_net_ipv4_conf,
 						  name[3],
 						  "NET_IPV4_CONF_???");
@@ -2051,7 +917,7 @@
 				}
 				break;
 			case NET_IPV6:
-				tprintf(", ");
+				tprints(", ");
 				printxval(sysctl_net_ipv6, name[2],
 					  "NET_IPV6_???");
 
@@ -2059,7 +925,7 @@
 					goto out;
 				switch (name[2]) {
 				case NET_IPV6_ROUTE:
-					tprintf(", ");
+					tprints(", ");
 					printxval(sysctl_net_ipv6_route,
 						  name[3],
 						  "NET_IPV6_ROUTE_???");
@@ -2082,7 +948,7 @@
 		while (cnt < max_cnt)
 			tprintf(", %x", name[cnt++]);
 		if (cnt < info.nlen)
-			tprintf(", ...");
+			tprints(", ...");
 		tprintf("}, %d, ", info.nlen);
 	} else {
 		size_t oldlen;
@@ -2101,7 +967,7 @@
 			printpath(tcp, (size_t)info.oldval);
 			tprintf(", %Zu, ", oldlen);
 			if (info.newval == 0)
-				tprintf("NULL");
+				tprints("NULL");
 			else if (syserror(tcp))
 				tprintf("%p", info.newval);
 			else
@@ -2111,240 +977,12 @@
 			tprintf("%p, %Zd, %p, %Zd", info.oldval, oldlen,
 				info.newval, info.newlen);
 		}
-		tprintf("}");
+		tprints("}");
 	}
 
 	free(name);
 	return 0;
 }
-#else
-int sys_sysctl(tcp)
-struct tcb *tcp;
-{
-	return printargs(tcp);
-}
-#endif
-
-#ifdef FREEBSD
-#include <sys/sysctl.h>
-
-int sys___sysctl(tcp)
-struct tcb *tcp;
-{
-	int qoid[CTL_MAXNAME+2];
-	char ctl[1024];
-	size_t len;
-	int i, numeric;
-
-	if (entering(tcp)) {
-		if (tcp->u_arg[1] < 0 || tcp->u_arg[1] > CTL_MAXNAME ||
-		    (umoven(tcp, tcp->u_arg[0], tcp->u_arg[1] * sizeof(int),
-			    (char *) (qoid + 2)) < 0))
-			tprintf("[...], ");
-		else {
-			/* Use sysctl to ask the name of the current MIB
-			   This uses the undocumented "Staff-functions" used
-			   by the sysctl program. See kern_sysctl.c for
-			   details. */
-			qoid[0] = 0; /* sysctl */
-			qoid[1] = 1; /* name */
-			i = sizeof(ctl);
-			tprintf("[");
-			if (sysctl(qoid, tcp->u_arg[1] + 2, ctl, &i, 0, 0) >= 0) {
-				numeric = !abbrev(tcp);
-				tprintf("%s%s", ctl, numeric ? ", " : "");
-			} else
-				numeric = 1;
-			if (numeric) {
-				for (i = 0; i < tcp->u_arg[1]; i++)
-					tprintf("%s%d", i ? "." : "", qoid[i + 2]);
-			}
-			tprintf("], ");
-			tprintf("%lu, ", tcp->u_arg[1]);
-		}
-	} else {
-		if (!syserror(tcp) && (umove(tcp, tcp->u_arg[3], &len) >= 0)) {
-			printstr(tcp, tcp->u_arg[2], len);
-			tprintf(", [%u], ", len);
-		} else
-			tprintf("%#lx, %#lx, ", tcp->u_arg[2], tcp->u_arg[3]);
-		printstr(tcp, tcp->u_arg[4], tcp->u_arg[5]);
-		tprintf(", %lu", tcp->u_arg[5]);
-	}
-	return 0;
-}
-#endif
-
-#if UNIXWARE >= 2
-
-#include <sys/ksym.h>
-#include <sys/elf.h>
-
-static const struct xlat ksym_flags[] = {
-	{ STT_NOTYPE,	"STT_NOTYPE"	},
-	{ STT_FUNC,	"STT_FUNC"	},
-	{ STT_OBJECT,	"STT_OBJECT"	},
-	{ 0,		NULL		},
-};
-
-int
-sys_getksym(tcp)
-struct tcb *tcp;
-{
-	if (entering (tcp)) {
-		printstr(tcp, tcp->u_arg[0], -1);
-		tprintf(", ");
-	}
-	else {
-		if (syserror(tcp)) {
-			tprintf("%#lx, %#lx",
-				tcp->u_arg[1], tcp->u_arg[2]);
-		}
-		else {
-			int val;
-			printnum (tcp, tcp->u_arg[1], "%#lx");
-			tprintf(", ");
-			if (umove(tcp, tcp->u_arg[2], &val) < 0) {
-				tprintf("%#lx", tcp->u_arg[2]);
-			}
-			else {
-				tprintf("[");
-				printxval (ksym_flags, val, "STT_???");
-				tprintf("]");
-			}
-		}
-	}
-
-	return 0;
-}
-
-#ifdef HAVE_SYS_NSCSYS_H
-
-struct cred;
-#include <sys/nscsys.h>
-
-static const struct xlat ssi_cmd [] = {
-	{ SSISYS_BADOP,	"SSISYS_BADOP"	},
-	{ SSISYS_LDLVL_INIT,"SSISYS_LDLVL_INIT"},
-	{ SSISYS_LDLVL_GETVEC,"SSISYS_LDLVL_GETVEC"},
-	{ SSISYS_LDLVL_PUTVEC,"SSISYS_LDLVL_PUTVEC"},
-	{ SSISYS_LDLVL_PUTRCMDS,"SSISYS_LDLVL_PUTRCMDS"},
-	{ SSISYS_LDLVL_SETREXEC,"SSISYS_LDLVL_SETREXEC"},
-	{ SSISYS_CMS_CLUSTERID,"SSISYS_CMS_CLUSTERID"},
-	{ SSISYS_CFS_STATVFS,"SSISYS_CFS_STATVFS"},
-	{ SSISYS_NODE_GETNUM,"SSISYS_NODE_GETNUM"},
-	{ SSISYS_NODE_TABLE,"SSISYS_NODE_TABLE"},
-	{ SSISYS_NODE_DOWN,"SSISYS_NODE_DOWN"},
-	{ SSISYS_RECLAIM_CHILD,"SSISYS_RECLAIM_CHILD"},
-	{ SSISYS_IPC_GETINFO,"SSISYS_IPC_GETINFO"},
-	{ SSISYS_ICS_TEST,"SSISYS_ICS_TEST"},
-	{ SSISYS_NODE_PID,"SSISYS_NODE_PID"},
-	{ SSISYS_ISLOCAL,"SSISYS_ISLOCAL"},
-	{ SSISYS_CFS_ISSTACKED,"SSISYS_CFS_ISSTACKED"},
-	{ SSISYS_DNET_SYNC,"SSISYS_DNET_SYNC"},
-	{ SSISYS_CFS_WAIT_MODE,"SSISYS_CFS_WAIT_MODE"},
-	{ SSISYS_CFS_UMOUNT,"SSISYS_CFS_UMOUNT"},
-	{ SSISYS_LLSTAT,"SSISYS_LLSTAT"	},
-	{ SSISYS_LTS_PERFTEST,"SSISYS_LTS_PERFTEST"},
-	{ SSISYS_LTS_CONFIG,"SSISYS_LTS_CONFIG"},
-	{ SSISYS_SNET_PERFTEST,"SSISYS_SNET_PERFTEST"},
-	{ SSISYS_IGNORE_HALFUP,"SSISYS_IGNORE_HALFUP"},
-	{ SSISYS_NODE_ROOTDEV,"SSISYS_NODE_ROOTDEV"},
-	{ SSISYS_GET_PRIMARY,"SSISYS_GET_PRIMARY"},
-	{ SSISYS_GET_SECONDARY,"SSISYS_GET_SECONDARY"},
-	{ SSISYS_GET_ROOTDISK,"SSISYS_GET_ROOTDISK"},
-	{ SSISYS_CLUSTERNODE_NUM,"SSISYS_CLUSTERNODE_NUM"},
-	{ SSISYS_CLUSTER_MEMBERSHIP,"SSISYS_CLUSTER_MEMBERSHIP"},
-	{ SSISYS_CLUSTER_DETAILEDTRANS,"SSISYS_CLUSTER_DETAILEDTRANS"},
-	{ SSISYS_CLUSTERNODE_INFO,"SSISYS_CLUSTERNODE_INFO"},
-	{ SSISYS_CLUSTERNODE_SETINFO,"SSISYS_CLUSTERNODE_SETINFO"},
-	{ SSISYS_CLUSTERNODE_AVAIL,"SSISYS_CLUSTERNODE_AVAIL"},
-	{ SSISYS_CLUSTER_MAXNODES,"SSISYS_CLUSTER_MAXNODES"},
-	{ SSISYS_SET_MEMPRIO,"SSISYS_SET_MEMPRIO"},
-	{ SSISYS_GET_USERS,"SSISYS_GET_USERS"},
-	{ SSISYS_FORCE_ROOT_NODE,"SSISYS_FORCE_ROOT_NODE"},
-	{ SSISYS_CVIP_SET,"SSISYS_CVIP_SET"},
-	{ SSISYS_CVIP_GET,"SSISYS_CVIP_GET"},
-	{ SSISYS_GET_NODE_COUNTS,"SSISYS_GET_NODE_COUNTS"},
-	{ SSISYS_GET_TRANSPORT,"SSISYS_GET_TRANSPORT"},
-	{ 0,		NULL		},
-};
-
-int sys_ssisys (tcp)
-struct tcb *tcp;
-{
-	struct ssisys_iovec iov;
-	cls_nodeinfo_args_t cni;
-	clusternode_info_t info;
-
-	if (entering (tcp)) {
-		ts_reclaim_child_inargs_t trc;
-		if (tcp->u_arg[1] != sizeof iov ||
-		    umove (tcp, tcp->u_arg[0], &iov) < 0)
-		{
-			tprintf ("%#lx, %ld", tcp->u_arg[0], tcp->u_arg[1]);
-			return 0;
-		}
-		tprintf ("{id=");
-		printxval(ssi_cmd, iov.tio_id.id_cmd, "SSISYS_???");
-		tprintf (":%d", iov.tio_id.id_ver);
-		switch (iov.tio_id.id_cmd) {
-		    case SSISYS_RECLAIM_CHILD:
-			if (iov.tio_udatainlen != sizeof trc ||
-			    umove (tcp, (long) iov.tio_udatain, &trc) < 0)
-				goto bad;
-			tprintf (", in={pid=%ld, start=%ld}",
-				 trc.trc_pid, trc.trc_start);
-			break;
-		    case SSISYS_CLUSTERNODE_INFO:
-			if (iov.tio_udatainlen != sizeof cni ||
-			    umove (tcp, (long) iov.tio_udatain, &cni) < 0)
-				goto bad;
-			tprintf (", in={node=%ld, len=%d}",
-				 cni.nodenum, cni.info_len);
-			break;
-		    default:
-		    bad:
-			if (iov.tio_udatainlen) {
-				tprintf (", in=[/* %d bytes */]",
-					 iov.tio_udatainlen);
-			}
-		}
-	}
-	else {
-		if (tcp->u_arg[1] != sizeof iov ||
-		    umove (tcp, tcp->u_arg[0], &iov) < 0)
-		    goto done;
-		switch (iov.tio_id.id_cmd) {
-		    case SSISYS_CLUSTERNODE_INFO:
-			if (iov.tio_udatainlen != sizeof cni ||
-			    umove (tcp, (long) iov.tio_udatain, &cni) < 0)
-				goto bad_out;
-			if (cni.info_len != sizeof info ||
-			    iov.tio_udataoutlen != sizeof &info ||
-			    umove (tcp, (long) iov.tio_udataout, &info) < 0)
-				goto bad_out;
-			tprintf (", out={node=%ld, cpus=%d, online=%d}",
-				 info.node_num, info.node_totalcpus,
-				 info.node_onlinecpus);
-			break;
-
-		    default:
-		    bad_out:
-			if (iov.tio_udataoutlen) {
-				tprintf (", out=[/* %d bytes */]",
-					 iov.tio_udataoutlen);
-			}
-		}
-	    done:
-		tprintf ("}, %ld", tcp->u_arg[1]);
-	}
-	return 0;
-}
-
-#endif
-
-#endif /* UNIXWARE > 2 */
 
 #ifdef MIPS
 
@@ -2361,19 +999,18 @@
 	{ 0, NULL }
 };
 
-int sys_sysmips(tcp)
-struct tcb *tcp;
+int sys_sysmips(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(sysmips_operations, tcp->u_arg[0], "???");
 		if (!verbose(tcp)) {
 			tprintf("%ld, %ld, %ld", tcp->u_arg[1], tcp->u_arg[2], tcp->u_arg[3]);
-		} else if (tcp->u_arg[0]==SETNAME) {
+		} else if (tcp->u_arg[0] == SETNAME) {
 			char nodename[__NEW_UTS_LEN + 1];
 			if (umovestr(tcp, tcp->u_arg[1], (__NEW_UTS_LEN + 1), nodename) < 0)
 				tprintf(", %#lx", tcp->u_arg[1]);
 			else
-				tprintf(", \"%s\"", nodename);
+				tprintf(", \"%.*s\"", (int)(__NEW_UTS_LEN + 1), nodename);
 		} else if (tcp->u_arg[0] == MIPS_ATOMIC_SET) {
 			tprintf(", %#lx, 0x%lx", tcp->u_arg[1], tcp->u_arg[2]);
 		} else if (tcp->u_arg[0] == MIPS_FIXADE) {
diff --git a/term.c b/term.c
index 23d2317..7b7de74 100644
--- a/term.c
+++ b/term.c
@@ -23,29 +23,16 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#ifdef LINUX
 /*
  * The C library's definition of struct termios might differ from
  * the kernel one, and we need to use the kernel layout.
  */
 #include <linux/termios.h>
-#else
-
-#ifdef HAVE_TERMIO_H
-#include <termio.h>
-#endif /* HAVE_TERMIO_H */
-
-#include <termios.h>
-#endif
-
 #ifdef HAVE_SYS_FILIO_H
-#include <sys/filio.h>
+# include <sys/filio.h>
 #endif
 
 static const struct xlat tcxonc_options[] = {
@@ -177,18 +164,10 @@
 	{ 0,		NULL,		},
 };
 
-
 int term_ioctl(struct tcb *tcp, long code, long arg)
 {
 	struct termios tios;
-#ifndef FREEBSD
 	struct termio tio;
-#else
-	#define TCGETS	TIOCGETA
-	#define TCSETS	TIOCSETA
-	#define TCSETSW	TIOCSETAW
-	#define TCSETSF	TIOCSETAF
-#endif
 	struct winsize ws;
 #ifdef TIOCGSIZE
 	struct  ttysize ts;
@@ -212,17 +191,8 @@
 		if (!verbose(tcp) || umove(tcp, arg, &tios) < 0)
 			return 0;
 		if (abbrev(tcp)) {
-			tprintf(", {");
-#ifndef FREEBSD
+			tprints(", {");
 			printxval(baud_options, tios.c_cflag & CBAUD, "B???");
-#else
-			printxval(baud_options, tios.c_ispeed, "B???");
-			if (tios.c_ispeed != tios.c_ospeed) {
-				tprintf(" (in)");
-				printxval(baud_options, tios.c_ospeed, "B???");
-				tprintf(" (out)");
-			}
-#endif
 			tprintf(" %sopost %sisig %sicanon %secho ...}",
 				(tios.c_oflag & OPOST) ? "" : "-",
 				(tios.c_lflag & ISIG) ? "" : "-",
@@ -234,9 +204,7 @@
 			(long) tios.c_iflag, (long) tios.c_oflag);
 		tprintf("c_cflags=%#lx, c_lflags=%#lx, ",
 			(long) tios.c_cflag, (long) tios.c_lflag);
-#if !defined(SVR4) && !defined(FREEBSD)
 		tprintf("c_line=%u, ", tios.c_line);
-#endif
 		if (!(tios.c_lflag & ICANON))
 			tprintf("c_cc[VMIN]=%d, c_cc[VTIME]=%d, ",
 				tios.c_cc[VMIN], tios.c_cc[VTIME]);
@@ -257,7 +225,7 @@
 		if (!verbose(tcp) || umove(tcp, arg, &tio) < 0)
 			return 0;
 		if (abbrev(tcp)) {
-			tprintf(", {");
+			tprints(", {");
 			printxval(baud_options, tio.c_cflag & CBAUD, "B???");
 			tprintf(" %sopost %sisig %sicanon %secho ...}",
 				(tio.c_oflag & OPOST) ? "" : "-",
@@ -316,16 +284,21 @@
 	/* ioctls with a direct decodable arg */
 #ifdef TCXONC
 	case TCXONC:
-		tprintf(", ");
+		tprints(", ");
 		printxval(tcxonc_options, arg, "TC???");
 		return 1;
 #endif
 #ifdef TCLFLSH
 	case TCFLSH:
-		tprintf(", ");
+		tprints(", ");
 		printxval(tcflsh_options, arg, "TC???");
 		return 1;
 #endif
+#ifdef TIOCSCTTY
+	case TIOCSCTTY:
+		tprintf(", %ld", arg);
+		return 1;
+#endif
 
 	/* ioctls with an indirect parameter displayed as modem flags */
 
@@ -336,9 +309,9 @@
 	case TIOCMSET:
 		if (umove(tcp, arg, &i) < 0)
 			return 0;
-		tprintf(", [");
+		tprints(", [");
 		printflags(modem_flags, i, "TIOCM_???");
-		tprintf("]");
+		tprints("]");
 		return 1;
 #endif /* TIOCMGET */
 
@@ -410,7 +383,7 @@
 #ifdef TIOCGPTN
 	case TIOCGPTN:
 #endif
-		tprintf(", ");
+		tprints(", ");
 		printnum_int(tcp, arg, "%d");
 		return 1;
 
@@ -419,15 +392,12 @@
 #ifdef TIOCSTI
 	case TIOCSTI:
 #endif
-		tprintf(", ");
+		tprints(", ");
 		printstr(tcp, arg, 1);
 		return 1;
 
 	/* ioctls with no parameters */
 
-#ifdef TIOCSCTTY
-	case TIOCSCTTY:
-#endif
 #ifdef TIOCNOTTY
 	case TIOCNOTTY:
 #endif
diff --git a/time.c b/time.c
index b4bb97c..85169af 100644
--- a/time.c
+++ b/time.c
@@ -25,15 +25,11 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#ifdef LINUX
 #include <linux/version.h>
-#ifdef HAVE_ANDROID_OS
+#if HAVE_ANDROID_OS
 #include <linux/timex.h>
 #else
 #include <sys/timex.h>
@@ -47,7 +43,6 @@
 #ifndef UTIME_OMIT
 #define UTIME_OMIT ((1l << 30) - 2l)
 #endif
-#endif /* LINUX */
 
 struct timeval32
 {
@@ -70,52 +65,71 @@
 void
 printtv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness, int special)
 {
+	char buf[TIMEVAL_TEXT_BUFSIZE];
+	sprinttv(buf, tcp, addr, bitness, special);
+	tprints(buf);
+}
+
+char *
+sprinttv(char *buf, struct tcb *tcp, long addr, enum bitness_t bitness, int special)
+{
+	int rc;
+
 	if (addr == 0)
-		tprintf("NULL");
-	else if (!verbose(tcp))
-		tprintf("%#lx", addr);
-	else {
-		int rc;
+		return stpcpy(buf, "NULL");
 
-		if (bitness == BITNESS_32
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
-		    || personality_wordsize[current_personality] == 4
+	if (!verbose(tcp))
+		return buf + sprintf(buf, "%#lx", addr);
+
+	if (bitness == BITNESS_32
+#if SUPPORTED_PERSONALITIES > 1
+	    || current_wordsize == 4
 #endif
-			)
-		{
-			struct timeval32 tv;
+		)
+	{
+		struct timeval32 tv;
 
-			if ((rc = umove(tcp, addr, &tv)) >= 0) {
-				if (special && tv.tv_sec == 0 &&
-				    tv.tv_usec == UTIME_NOW)
-					tprintf("UTIME_NOW");
-				else if (special && tv.tv_sec == 0 &&
-					 tv.tv_usec == UTIME_OMIT)
-					tprintf("UTIME_OMIT");
-				else
-					tprint_timeval32(tcp, &tv);
+		rc = umove(tcp, addr, &tv);
+		if (rc >= 0) {
+			if (special && tv.tv_sec == 0) {
+				if (tv.tv_usec == UTIME_NOW)
+					return stpcpy(buf, "UTIME_NOW");
+				if (tv.tv_usec == UTIME_OMIT)
+					return stpcpy(buf, "UTIME_OMIT");
 			}
-		} else {
-			struct timeval tv;
-
-			if ((rc = umove(tcp, addr, &tv)) >= 0) {
-				if (special && tv.tv_sec == 0 &&
-				    tv.tv_usec == UTIME_NOW)
-					tprintf("UTIME_NOW");
-				else if (special && tv.tv_sec == 0 &&
-					 tv.tv_usec == UTIME_OMIT)
-					tprintf("UTIME_OMIT");
-				else
-					tprint_timeval(tcp, &tv);
-			}
+			return buf + sprintf(buf, "{%u, %u}",
+				tv.tv_sec, tv.tv_usec);
 		}
-		if (rc < 0)
-			tprintf("{...}");
+	} else {
+		struct timeval tv;
+
+		rc = umove(tcp, addr, &tv);
+		if (rc >= 0) {
+			if (special && tv.tv_sec == 0) {
+				if (tv.tv_usec == UTIME_NOW)
+					return stpcpy(buf, "UTIME_NOW");
+				if (tv.tv_usec == UTIME_OMIT)
+					return stpcpy(buf, "UTIME_OMIT");
+			}
+			return buf + sprintf(buf, "{%lu, %lu}",
+				(unsigned long) tv.tv_sec,
+				(unsigned long) tv.tv_usec);
+		}
 	}
+
+	return stpcpy(buf, "{...}");
 }
 
 void
-sprinttv(struct tcb *tcp, long addr, enum bitness_t bitness, char *buf)
+print_timespec(struct tcb *tcp, long addr)
+{
+	char buf[TIMESPEC_TEXT_BUFSIZE];
+	sprint_timespec(buf, tcp, addr);
+	tprints(buf);
+}
+
+void
+sprint_timespec(char *buf, struct tcb *tcp, long addr)
 {
 	if (addr == 0)
 		strcpy(buf, "NULL");
@@ -124,75 +138,12 @@
 	else {
 		int rc;
 
-		if (bitness == BITNESS_32
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
-		    || personality_wordsize[current_personality] == 4
-#endif
-			)
-		{
+#if SUPPORTED_PERSONALITIES > 1
+		if (current_wordsize == 4) {
 			struct timeval32 tv;
 
-			if ((rc = umove(tcp, addr, &tv)) >= 0)
-				sprintf(buf, "{%u, %u}",
-					tv.tv_sec, tv.tv_usec);
-		} else {
-			struct timeval tv;
-
-			if ((rc = umove(tcp, addr, &tv)) >= 0)
-				sprintf(buf, "{%lu, %lu}",
-					(unsigned long) tv.tv_sec,
-					(unsigned long) tv.tv_usec);
-		}
-		if (rc < 0)
-			strcpy(buf, "{...}");
-	}
-}
-
-void print_timespec(struct tcb *tcp, long addr)
-{
-	if (addr == 0)
-		tprintf("NULL");
-	else if (!verbose(tcp))
-		tprintf("%#lx", addr);
-	else {
-		int rc;
-
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
-		if (personality_wordsize[current_personality] == 4) {
-			struct timeval32 tv;
-
-			if ((rc = umove(tcp, addr, &tv)) >= 0)
-				tprintf("{%u, %u}",
-					tv.tv_sec, tv.tv_usec);
-		} else
-#endif
-		{
-			struct timespec ts;
-
-			if ((rc = umove(tcp, addr, &ts)) >= 0)
-				tprintf("{%lu, %lu}",
-					(unsigned long) ts.tv_sec,
-					(unsigned long) ts.tv_nsec);
-		}
-		if (rc < 0)
-			tprintf("{...}");
-	}
-}
-
-void sprint_timespec(char *buf, struct tcb *tcp, long addr)
-{
-	if (addr == 0)
-		strcpy(buf, "NULL");
-	else if (!verbose(tcp))
-		sprintf(buf, "%#lx", addr);
-	else {
-		int rc;
-
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
-		if (personality_wordsize[current_personality] == 4) {
-			struct timeval32 tv;
-
-			if ((rc = umove(tcp, addr, &tv)) >= 0)
+			rc = umove(tcp, addr, &tv);
+			if (rc >= 0)
 				sprintf(buf, "{%u, %u}",
 					tv.tv_sec, tv.tv_usec);
 		} else
@@ -200,7 +151,8 @@
 		{
 			struct timespec ts;
 
-			if ((rc = umove(tcp, addr, &ts)) >= 0)
+			rc = umove(tcp, addr, &ts);
+			if (rc >= 0)
 				sprintf(buf, "{%lu, %lu}",
 					(unsigned long) ts.tv_sec,
 					(unsigned long) ts.tv_nsec);
@@ -211,20 +163,7 @@
 }
 
 int
-sys_time(tcp)
-struct tcb *tcp;
-{
-	if (exiting(tcp)) {
-#ifndef SVR4
-		printnum(tcp, tcp->u_arg[0], "%ld");
-#endif /* SVR4 */
-	}
-	return 0;
-}
-
-int
-sys_stime(tcp)
-struct tcb *tcp;
+sys_time(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		printnum(tcp, tcp->u_arg[0], "%ld");
@@ -233,8 +172,16 @@
 }
 
 int
-sys_gettimeofday(tcp)
-struct tcb *tcp;
+sys_stime(struct tcb *tcp)
+{
+	if (exiting(tcp)) {
+		printnum(tcp, tcp->u_arg[0], "%ld");
+	}
+	return 0;
+}
+
+int
+sys_gettimeofday(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		if (syserror(tcp)) {
@@ -243,19 +190,15 @@
 			return 0;
 		}
 		printtv(tcp, tcp->u_arg[0]);
-#ifndef SVR4
-		tprintf(", ");
+		tprints(", ");
 		printtv(tcp, tcp->u_arg[1]);
-#endif /* !SVR4 */
 	}
 	return 0;
 }
 
-
 #ifdef ALPHA
 int
-sys_osf_gettimeofday(tcp)
-struct tcb *tcp;
+sys_osf_gettimeofday(struct tcb *tcp)
 {
 	if (exiting(tcp)) {
 		if (syserror(tcp)) {
@@ -263,52 +206,43 @@
 			return 0;
 		}
 		printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
-#ifndef SVR4
-		tprintf(", ");
+		tprints(", ");
 		printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0);
-#endif /* !SVR4 */
 	}
 	return 0;
 }
 #endif
 
 int
-sys_settimeofday(tcp)
-struct tcb *tcp;
+sys_settimeofday(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printtv(tcp, tcp->u_arg[0]);
-#ifndef SVR4
-		tprintf(", ");
+		tprints(", ");
 		printtv(tcp, tcp->u_arg[1]);
-#endif /* !SVR4 */
 	}
 	return 0;
 }
 
 #ifdef ALPHA
 int
-sys_osf_settimeofday(tcp)
-struct tcb *tcp;
+sys_osf_settimeofday(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printtv_bitness(tcp, tcp->u_arg[0], BITNESS_32, 0);
-#ifndef SVR4
-		tprintf(", ");
+		tprints(", ");
 		printtv_bitness(tcp, tcp->u_arg[1], BITNESS_32, 0);
-#endif /* !SVR4 */
 	}
 	return 0;
 }
 #endif
 
 int
-sys_adjtime(tcp)
-struct tcb *tcp;
+sys_adjtime(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printtv(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -323,11 +257,17 @@
 {
 	if (entering(tcp)) {
 		print_timespec(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
-		if (!tcp->u_arg[1] || is_restart_error(tcp))
+		/* Second (returned) timespec is only significant
+		 * if syscall was interrupted. We print only its address
+		 * on _success_, since kernel doesn't modify its value.
+		 */
+		if (is_restart_error(tcp) || !tcp->u_arg[1])
+			/* Interrupted (or NULL) */
 			print_timespec(tcp, tcp->u_arg[1]);
 		else
+			/* Success */
 			tprintf("%#lx", tcp->u_arg[1]);
 	}
 	return 0;
@@ -344,15 +284,15 @@
 printitv_bitness(struct tcb *tcp, long addr, enum bitness_t bitness)
 {
 	if (addr == 0)
-		tprintf("NULL");
+		tprints("NULL");
 	else if (!verbose(tcp))
 		tprintf("%#lx", addr);
 	else {
 		int rc;
 
 		if (bitness == BITNESS_32
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
-		    || personality_wordsize[current_personality] == 4
+#if SUPPORTED_PERSONALITIES > 1
+		    || current_wordsize == 4
 #endif
 			)
 		{
@@ -360,26 +300,28 @@
 				struct timeval32 it_interval, it_value;
 			} itv;
 
-			if ((rc = umove(tcp, addr, &itv)) >= 0) {
-				tprintf("{it_interval=");
+			rc = umove(tcp, addr, &itv);
+			if (rc >= 0) {
+				tprints("{it_interval=");
 				tprint_timeval32(tcp, &itv.it_interval);
-				tprintf(", it_value=");
+				tprints(", it_value=");
 				tprint_timeval32(tcp, &itv.it_value);
-				tprintf("}");
+				tprints("}");
 			}
 		} else {
 			struct itimerval itv;
 
-			if ((rc = umove(tcp, addr, &itv)) >= 0)	{
-				tprintf("{it_interval=");
+			rc = umove(tcp, addr, &itv);
+			if (rc >= 0) {
+				tprints("{it_interval=");
 				tprint_timeval(tcp, &itv.it_interval);
-				tprintf(", it_value=");
+				tprints(", it_value=");
 				tprint_timeval(tcp, &itv.it_value);
-				tprintf("}");
+				tprints("}");
 			}
 		}
 		if (rc < 0)
-			tprintf("{...}");
+			tprints("{...}");
 	}
 }
 
@@ -387,12 +329,11 @@
 	printitv_bitness((tcp), (addr), BITNESS_CURRENT)
 
 int
-sys_getitimer(tcp)
-struct tcb *tcp;
+sys_getitimer(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(which, tcp->u_arg[0], "ITIMER_???");
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -402,15 +343,13 @@
 	return 0;
 }
 
-
 #ifdef ALPHA
 int
-sys_osf_getitimer(tcp)
-struct tcb *tcp;
+sys_osf_getitimer(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(which, tcp->u_arg[0], "ITIMER_???");
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -422,14 +361,13 @@
 #endif
 
 int
-sys_setitimer(tcp)
-struct tcb *tcp;
+sys_setitimer(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(which, tcp->u_arg[0], "ITIMER_???");
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[2]);
@@ -441,14 +379,13 @@
 
 #ifdef ALPHA
 int
-sys_osf_setitimer(tcp)
-struct tcb *tcp;
+sys_osf_setitimer(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(which, tcp->u_arg[0], "ITIMER_???");
-		tprintf(", ");
+		tprints(", ");
 		printitv_bitness(tcp, tcp->u_arg[1], BITNESS_32);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[2]);
@@ -459,100 +396,107 @@
 }
 #endif
 
-#ifdef LINUX
-
 static const struct xlat adjtimex_modes[] = {
-  { 0, "0" },
+	{ 0,		"0"			},
 #ifdef ADJ_OFFSET
-  { ADJ_OFFSET, "ADJ_OFFSET" },
+	{ ADJ_OFFSET,	"ADJ_OFFSET"		},
 #endif
 #ifdef ADJ_FREQUENCY
-  { ADJ_FREQUENCY, "ADJ_FREQUENCY" },
+	{ ADJ_FREQUENCY, "ADJ_FREQUENCY"	},
 #endif
 #ifdef ADJ_MAXERROR
-  { ADJ_MAXERROR, "ADJ_MAXERROR" },
+	{ ADJ_MAXERROR,	"ADJ_MAXERROR"		},
 #endif
 #ifdef ADJ_ESTERROR
-  { ADJ_ESTERROR, "ADJ_ESTERROR" },
+	{ ADJ_ESTERROR,	"ADJ_ESTERROR"		},
 #endif
 #ifdef ADJ_STATUS
-  { ADJ_STATUS, "ADJ_STATUS" },
+	{ ADJ_STATUS,	"ADJ_STATUS"		},
 #endif
 #ifdef ADJ_TIMECONST
-  { ADJ_TIMECONST, "ADJ_TIMECONST" },
+	{ ADJ_TIMECONST, "ADJ_TIMECONST"	},
 #endif
 #ifdef ADJ_TICK
-  { ADJ_TICK, "ADJ_TICK" },
+	{ ADJ_TICK,	"ADJ_TICK"		},
 #endif
 #ifdef ADJ_OFFSET_SINGLESHOT
-  { ADJ_OFFSET_SINGLESHOT, "ADJ_OFFSET_SINGLESHOT" },
+	{ ADJ_OFFSET_SINGLESHOT, "ADJ_OFFSET_SINGLESHOT" },
 #endif
-  { 0,             NULL }
+	{ 0,		NULL			}
 };
 
 static const struct xlat adjtimex_status[] = {
 #ifdef STA_PLL
-  { STA_PLL, "STA_PLL" },
+	{ STA_PLL,	"STA_PLL"	},
 #endif
 #ifdef STA_PPSFREQ
-  { STA_PPSFREQ, "STA_PPSFREQ" },
+	{ STA_PPSFREQ,	"STA_PPSFREQ"	},
 #endif
 #ifdef STA_PPSTIME
-  { STA_PPSTIME, "STA_PPSTIME" },
+	{ STA_PPSTIME,	"STA_PPSTIME"	},
 #endif
 #ifdef STA_FLL
-  { STA_FLL, "STA_FLL" },
+	{ STA_FLL,	"STA_FLL"	},
 #endif
 #ifdef STA_INS
-  { STA_INS, "STA_INS" },
+	{ STA_INS,	"STA_INS"	},
 #endif
 #ifdef STA_DEL
-  { STA_DEL, "STA_DEL" },
+	{ STA_DEL,	"STA_DEL"	},
 #endif
 #ifdef STA_UNSYNC
-  { STA_UNSYNC, "STA_UNSYNC" },
+	{ STA_UNSYNC,	"STA_UNSYNC"	},
 #endif
 #ifdef STA_FREQHOLD
-  { STA_FREQHOLD, "STA_FREQHOLD" },
+	{ STA_FREQHOLD,	"STA_FREQHOLD"	},
 #endif
 #ifdef STA_PPSSIGNAL
-  { STA_PPSSIGNAL, "STA_PPSSIGNAL" },
+	{ STA_PPSSIGNAL, "STA_PPSSIGNAL" },
 #endif
 #ifdef STA_PPSJITTER
-  { STA_PPSJITTER, "STA_PPSJITTER" },
+	{ STA_PPSJITTER, "STA_PPSJITTER" },
 #endif
 #ifdef STA_PPSWANDER
-  { STA_PPSWANDER, "STA_PPSWANDER" },
+	{ STA_PPSWANDER, "STA_PPSWANDER" },
 #endif
 #ifdef STA_PPSERROR
-  { STA_PPSERROR, "STA_PPSERROR" },
+	{ STA_PPSERROR,	"STA_PPSERROR"	},
 #endif
 #ifdef STA_CLOCKERR
-  { STA_CLOCKERR, "STA_CLOCKERR" },
+	{ STA_CLOCKERR,	"STA_CLOCKERR"	},
 #endif
-  { 0,             NULL }
+#ifdef STA_NANO
+	{ STA_NANO,	"STA_NANO"	},
+#endif
+#ifdef STA_MODE
+	{ STA_MODE,	"STA_MODE"	},
+#endif
+#ifdef STA_CLK
+	{ STA_CLK,	"STA_CLK"	},
+#endif
+	{ 0,		NULL		}
 };
 
 static const struct xlat adjtimex_state[] = {
 #ifdef TIME_OK
-  { TIME_OK, "TIME_OK" },
+	{ TIME_OK,	"TIME_OK"	},
 #endif
 #ifdef TIME_INS
-  { TIME_INS, "TIME_INS" },
+	{ TIME_INS,	"TIME_INS"	},
 #endif
 #ifdef TIME_DEL
-  { TIME_DEL, "TIME_DEL" },
+	{ TIME_DEL,	"TIME_DEL"	},
 #endif
 #ifdef TIME_OOP
-  { TIME_OOP, "TIME_OOP" },
+	{ TIME_OOP,	"TIME_OOP"	},
 #endif
 #ifdef TIME_WAIT
-  { TIME_WAIT, "TIME_WAIT" },
+	{ TIME_WAIT,	"TIME_WAIT"	},
 #endif
 #ifdef TIME_ERROR
-  { TIME_ERROR, "TIME_ERROR" },
+	{ TIME_ERROR,	"TIME_ERROR"	},
 #endif
-  { 0,             NULL }
+	{ 0,		NULL		}
 };
 
 #if SUPPORTED_PERSONALITIES > 1
@@ -584,7 +528,7 @@
 	if (umove(tcp, addr, &tx) < 0)
 		return -1;
 
-	tprintf("{modes=");
+	tprints("{modes=");
 	printflags(adjtimex_modes, tx.modes, "ADJ_???");
 	tprintf(", offset=%d, freq=%d, maxerror=%d, ",
 		tx.offset, tx.freq, tx.maxerror);
@@ -600,7 +544,7 @@
 		tx.shift, tx.stabil, tx.jitcnt);
 	tprintf(", calcnt=%d, errcnt=%d, stbcnt=%d",
 		tx.calcnt, tx.errcnt, tx.stbcnt);
-	tprintf("}");
+	tprints("}");
 	return 0;
 }
 #endif /* SUPPORTED_PERSONALITIES > 1 */
@@ -611,7 +555,7 @@
 	struct timex tx;
 
 #if SUPPORTED_PERSONALITIES > 1
-	if (personality_wordsize[current_personality] == 4)
+	if (current_wordsize == 4)
 		return tprint_timex32(tcp, addr);
 #endif
 	if (umove(tcp, addr, &tx) < 0)
@@ -627,95 +571,99 @@
 	tprintf("tolerance=%ld, time=", tx.tolerance);
 	tprint_timeval(tcp, &tx.time);
 #else
-	tprintf("{modes=");
+	tprints("{modes=");
 	printflags(adjtimex_modes, tx.modes, "ADJ_???");
 	tprintf(", offset=%ld, freq=%ld, maxerror=%ld, ",
-		tx.offset, tx.freq, tx.maxerror);
-	tprintf("esterror=%lu, status=", tx.esterror);
+		(long) tx.offset, (long) tx.freq, (long) tx.maxerror);
+	tprintf("esterror=%lu, status=", (long) tx.esterror);
 	printflags(adjtimex_status, tx.status, "STA_???");
 	tprintf(", constant=%ld, precision=%lu, ",
-		tx.constant, tx.precision);
-	tprintf("tolerance=%ld, time=", tx.tolerance);
+		(long) tx.constant, (long) tx.precision);
+	tprintf("tolerance=%ld, time=", (long) tx.tolerance);
 	tprint_timeval(tcp, &tx.time);
 	tprintf(", tick=%ld, ppsfreq=%ld, jitter=%ld",
-		tx.tick, tx.ppsfreq, tx.jitter);
+		(long) tx.tick, (long) tx.ppsfreq, (long) tx.jitter);
 	tprintf(", shift=%d, stabil=%ld, jitcnt=%ld",
-		tx.shift, tx.stabil, tx.jitcnt);
+		tx.shift, (long) tx.stabil, (long) tx.jitcnt);
 	tprintf(", calcnt=%ld, errcnt=%ld, stbcnt=%ld",
-		tx.calcnt, tx.errcnt, tx.stbcnt);
+		(long) tx.calcnt, (long) tx.errcnt, (long) tx.stbcnt);
 #endif
-	tprintf("}");
+	tprints("}");
+	return 0;
+}
+
+static int
+do_adjtimex(struct tcb *tcp, long addr)
+{
+	if (addr == 0)
+		tprints("NULL");
+	else if (syserror(tcp) || !verbose(tcp))
+		tprintf("%#lx", addr);
+	else if (tprint_timex(tcp, addr) < 0)
+		tprints("{...}");
+	if (syserror(tcp))
+		return 0;
+	tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval);
+	if (tcp->auxstr)
+		return RVAL_STR;
 	return 0;
 }
 
 int
 sys_adjtimex(struct tcb *tcp)
 {
-	if (exiting(tcp)) {
-		if (tcp->u_arg[0] == 0)
-			tprintf("NULL");
-		else if (syserror(tcp) || !verbose(tcp))
-			tprintf("%#lx", tcp->u_arg[0]);
-		else if (tprint_timex(tcp, tcp->u_arg[0]) < 0)
-			tprintf("{...}");
-		if (syserror(tcp))
-			return 0;
-		tcp->auxstr = xlookup(adjtimex_state, tcp->u_rval);
-		if (tcp->auxstr)
-			return RVAL_STR;
-	}
+	if (exiting(tcp))
+		return do_adjtimex(tcp, tcp->u_arg[0]);
 	return 0;
 }
 
 static const struct xlat clockflags[] = {
-  { TIMER_ABSTIME, "TIMER_ABSTIME" },
-  { 0,             NULL }
+	{ TIMER_ABSTIME,	"TIMER_ABSTIME"	},
+	{ 0,			NULL		}
 };
 
 static const struct xlat clocknames[] = {
 #ifdef CLOCK_REALTIME
-  { CLOCK_REALTIME, "CLOCK_REALTIME" },
+	{ CLOCK_REALTIME,		"CLOCK_REALTIME" },
 #endif
 #ifdef CLOCK_MONOTONIC
-  { CLOCK_MONOTONIC, "CLOCK_MONOTONIC" },
+	{ CLOCK_MONOTONIC,		"CLOCK_MONOTONIC" },
 #endif
 #ifdef CLOCK_PROCESS_CPUTIME_ID
-  { CLOCK_PROCESS_CPUTIME_ID, "CLOCK_PROCESS_CPUTIME_ID" },
+	{ CLOCK_PROCESS_CPUTIME_ID,	"CLOCK_PROCESS_CPUTIME_ID" },
 #endif
 #ifdef CLOCK_THREAD_CPUTIME_ID
-  { CLOCK_THREAD_CPUTIME_ID, "CLOCK_THREAD_CPUTIME_ID" },
+	{ CLOCK_THREAD_CPUTIME_ID,	"CLOCK_THREAD_CPUTIME_ID" },
 #endif
 #ifdef CLOCK_MONOTONIC_RAW
-  { CLOCK_MONOTONIC_RAW, "CLOCK_MONOTONIC_RAW" },
+	{ CLOCK_MONOTONIC_RAW,		"CLOCK_MONOTONIC_RAW" },
 #endif
 #ifdef CLOCK_REALTIME_COARSE
-  { CLOCK_REALTIME_COARSE, "CLOCK_REALTIME_COARSE" },
+	{ CLOCK_REALTIME_COARSE,	"CLOCK_REALTIME_COARSE" },
 #endif
 #ifdef CLOCK_MONOTONIC_COARSE
-  { CLOCK_MONOTONIC_COARSE, "CLOCK_MONOTONIC_COARSE" },
+	{ CLOCK_MONOTONIC_COARSE,	"CLOCK_MONOTONIC_COARSE" },
 #endif
-  { 0, NULL }
+	{ 0,				NULL }
 };
 
 int
-sys_clock_settime(tcp)
-struct tcb *tcp;
+sys_clock_settime(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 		printtv(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
 
 int
-sys_clock_gettime(tcp)
-struct tcb *tcp;
+sys_clock_gettime(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[1]);
@@ -726,16 +674,15 @@
 }
 
 int
-sys_clock_nanosleep(tcp)
-struct tcb *tcp;
+sys_clock_nanosleep(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 		printflags(clockflags, tcp->u_arg[1], "TIMER_???");
-		tprintf(", ");
+		tprints(", ");
 		printtv(tcp, tcp->u_arg[2]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[3]);
@@ -745,6 +692,16 @@
 	return 0;
 }
 
+int
+sys_clock_adjtime(struct tcb *tcp)
+{
+	if (exiting(tcp))
+		return do_adjtimex(tcp, tcp->u_arg[1]);
+	printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
+	tprints(", ");
+	return 0;
+}
+
 #ifndef SIGEV_THREAD_ID
 # define SIGEV_THREAD_ID 4
 #endif
@@ -774,7 +731,7 @@
 	} sev;
 
 	if (umove(tcp, arg, &sev) < 0)
-		tprintf("{...}");
+		tprints("{...}");
 	else {
 		tprintf("{%#x, ", sev.sigev_value);
 		if (sev.sigev_notify == SIGEV_SIGNAL)
@@ -782,7 +739,7 @@
 		else
 			tprintf("%u, ", sev.sigev_signo);
 		printxval(sigev_value, sev.sigev_notify + 1, "SIGEV_???");
-		tprintf(", ");
+		tprints(", ");
 		if (sev.sigev_notify == SIGEV_THREAD_ID)
 			tprintf("{%d}", sev.un.tid);
 		else if (sev.sigev_notify == SIGEV_THREAD)
@@ -790,8 +747,8 @@
 				sev.un.thread.function,
 				sev.un.thread.attribute);
 		else
-			tprintf("{...}");
-		tprintf("}");
+			tprints("{...}");
+		tprints("}");
 	}
 }
 #endif
@@ -802,14 +759,13 @@
 	struct sigevent sev;
 
 #if SUPPORTED_PERSONALITIES > 1
-	if (personality_wordsize[current_personality] == 4)
-	{
+	if (current_wordsize == 4) {
 		printsigevent32(tcp, arg);
 		return;
 	}
 #endif
-	if (umove (tcp, arg, &sev) < 0)
-		tprintf("{...}");
+	if (umove(tcp, arg, &sev) < 0)
+		tprints("{...}");
 	else {
 		tprintf("{%p, ", sev.sigev_value.sival_ptr);
 		if (sev.sigev_notify == SIGEV_SIGNAL)
@@ -817,7 +773,7 @@
 		else
 			tprintf("%u, ", sev.sigev_signo);
 		printxval(sigev_value, sev.sigev_notify+1, "SIGEV_???");
-		tprintf(", ");
+		tprints(", ");
 		if (sev.sigev_notify == SIGEV_THREAD_ID)
 			/* _pad[0] is the _tid field which might not be
 			   present in the userlevel definition of the
@@ -827,41 +783,39 @@
 			tprintf("{%p, %p}", sev.sigev_notify_function,
 				sev.sigev_notify_attributes);
 		else
-			tprintf("{...}");
-		tprintf("}");
+			tprints("{...}");
+		tprints("}");
 	}
 }
 
 int
-sys_timer_create(tcp)
-struct tcb *tcp;
+sys_timer_create(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 		printsigevent(tcp, tcp->u_arg[1]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
-		void *p;
+		int timer_id;
 
-		if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &p) < 0)
+		if (syserror(tcp) || umove(tcp, tcp->u_arg[2], &timer_id) < 0)
 			tprintf("%#lx", tcp->u_arg[2]);
 		else
-			tprintf("{%p}", p);
+			tprintf("{%d}", timer_id);
 	}
 	return 0;
 }
 
 int
-sys_timer_settime(tcp)
-struct tcb *tcp;
+sys_timer_settime(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, ", tcp->u_arg[0]);
 		printflags(clockflags, tcp->u_arg[1], "TIMER_???");
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[2]);
-		tprintf(", ");
+		tprints(", ");
 	} else {
 		if (syserror(tcp))
 			tprintf("%#lx", tcp->u_arg[3]);
@@ -872,8 +826,7 @@
 }
 
 int
-sys_timer_gettime(tcp)
-struct tcb *tcp;
+sys_timer_gettime(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		tprintf("%#lx, ", tcp->u_arg[0]);
@@ -887,9 +840,7 @@
 }
 
 static void
-print_rtc(tcp, rt)
-struct tcb *tcp;
-const struct rtc_time *rt;
+print_rtc(struct tcb *tcp, const struct rtc_time *rt)
 {
 	tprintf("{tm_sec=%d, tm_min=%d, tm_hour=%d, "
 		"tm_mday=%d, tm_mon=%d, tm_year=%d, ",
@@ -899,14 +850,11 @@
 		tprintf("tm_wday=%d, tm_yday=%d, tm_isdst=%d}",
 			rt->tm_wday, rt->tm_yday, rt->tm_isdst);
 	else
-		tprintf("...}");
+		tprints("...}");
 }
 
 int
-rtc_ioctl(tcp, code, arg)
-struct tcb *tcp;
-long code;
-long arg;
+rtc_ioctl(struct tcb *tcp, long code, long arg)
 {
 	switch (code) {
 	case RTC_ALM_SET:
@@ -916,7 +864,7 @@
 			if (umove(tcp, arg, &rt) < 0)
 				tprintf(", %#lx", arg);
 			else {
-				tprintf(", ");
+				tprints(", ");
 				print_rtc(tcp, &rt);
 			}
 		}
@@ -928,7 +876,7 @@
 			if (syserror(tcp) || umove(tcp, arg, &rt) < 0)
 				tprintf(", %#lx", arg);
 			else {
-				tprintf(", ");
+				tprints(", ");
 				print_rtc(tcp, &rt);
 			}
 		}
@@ -952,7 +900,7 @@
 				tprintf(", {enabled=%d, pending=%d, ",
 					wk.enabled, wk.pending);
 				print_rtc(tcp, &wk.time);
-				tprintf("}");
+				tprints("}");
 			}
 		}
 		break;
@@ -965,7 +913,7 @@
 				tprintf(", {enabled=%d, pending=%d, ",
 					wk.enabled, wk.pending);
 				print_rtc(tcp, &wk.time);
-				tprintf("}");
+				tprints("}");
 			}
 		}
 		break;
@@ -987,16 +935,15 @@
 };
 
 int
-sys_timerfd(tcp)
-struct tcb *tcp;
+sys_timerfd(struct tcb *tcp)
 {
 	if (entering(tcp)) {
 		/* It does not matter that the kernel uses itimerspec.  */
 		tprintf("%ld, ", tcp->u_arg[0]);
 		printxval(clocknames, tcp->u_arg[1], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 		printflags(timerfdflags, tcp->u_arg[2], "TFD_???");
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[3]);
 	}
 	return 0;
@@ -1007,7 +954,7 @@
 {
 	if (entering(tcp)) {
 		printxval(clocknames, tcp->u_arg[0], "CLOCK_???");
-		tprintf(", ");
+		tprints(", ");
 		printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
 	}
 	return 0;
@@ -1018,11 +965,11 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printflags(timerfdflags, tcp->u_arg[1], "TFD_???");
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[2]);
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[3]);
 	}
 	return 0;
@@ -1033,10 +980,8 @@
 {
 	if (entering(tcp)) {
 		printfd(tcp, tcp->u_arg[0]);
-		tprintf(", ");
+		tprints(", ");
 		printitv(tcp, tcp->u_arg[1]);
 	}
 	return 0;
 }
-
-#endif /* LINUX */
diff --git a/util.c b/util.c
index 711e614..d347bd8 100644
--- a/util.c
+++ b/util.c
@@ -29,56 +29,42 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- *	$Id$
  */
 
 #include "defs.h"
-
-#include <signal.h>
-#include <sys/syscall.h>
 #include <sys/user.h>
 #include <sys/param.h>
 #include <fcntl.h>
 #if HAVE_SYS_UIO_H
-#include <sys/uio.h>
-#endif
-#ifdef SUNOS4
-#include <machine/reg.h>
-#include <a.out.h>
-#include <link.h>
-#endif /* SUNOS4 */
-
-#if defined(linux) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
-#include <linux/ptrace.h>
+# include <sys/uio.h>
 #endif
 
-#if defined(LINUX) && defined(IA64)
+#if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)
+# include <linux/ptrace.h>
+#endif
+
+#if defined(IA64)
 # include <asm/ptrace_offsets.h>
 # include <asm/rse.h>
 #endif
 
 #ifdef HAVE_SYS_REG_H
-#include <sys/reg.h>
+# include <sys/reg.h>
 # define PTRACE_PEEKUSR PTRACE_PEEKUSER
 #elif defined(HAVE_LINUX_PTRACE_H)
-#undef PTRACE_SYSCALL
+# undef PTRACE_SYSCALL
 # ifdef HAVE_STRUCT_IA64_FPREG
 #  define ia64_fpreg XXX_ia64_fpreg
 # endif
 # ifdef HAVE_STRUCT_PT_ALL_USER_REGS
 #  define pt_all_user_regs XXX_pt_all_user_regs
 # endif
-#include <linux/ptrace.h>
+# include <linux/ptrace.h>
 # undef ia64_fpreg
 # undef pt_all_user_regs
 #endif
 
-#ifdef SUNOS4_KERNEL_ARCH_KLUDGE
-#include <sys/utsname.h>
-#endif /* SUNOS4_KERNEL_ARCH_KLUDGE */
-
-#if defined(LINUXSPARC) && defined (SPARC64)
+#if defined(SPARC64)
 # undef PTRACE_GETREGS
 # define PTRACE_GETREGS PTRACE_GETREGS64
 # undef PTRACE_SETREGS
@@ -87,22 +73,35 @@
 
 /* macros */
 #ifndef MAX
-#define MAX(a,b)		(((a) > (b)) ? (a) : (b))
+# define MAX(a,b)		(((a) > (b)) ? (a) : (b))
 #endif
 #ifndef MIN
-#define MIN(a,b)		(((a) < (b)) ? (a) : (b))
+# define MIN(a,b)		(((a) < (b)) ? (a) : (b))
 #endif
 
 int
-tv_nz(a)
-struct timeval *a;
+string_to_uint(const char *str)
+{
+	char *error;
+	long value;
+
+	if (!*str)
+		return -1;
+	errno = 0;
+	value = strtol(str, &error, 10);
+	if (errno || *error || value < 0 || (long)(int)value != value)
+		return -1;
+	return (int)value;
+}
+
+int
+tv_nz(struct timeval *a)
 {
 	return a->tv_sec || a->tv_usec;
 }
 
 int
-tv_cmp(a, b)
-struct timeval *a, *b;
+tv_cmp(struct timeval *a, struct timeval *b)
 {
 	if (a->tv_sec < b->tv_sec
 	    || (a->tv_sec == b->tv_sec && a->tv_usec < b->tv_usec))
@@ -114,15 +113,13 @@
 }
 
 double
-tv_float(tv)
-struct timeval *tv;
+tv_float(struct timeval *tv)
 {
 	return tv->tv_sec + tv->tv_usec/1000000.0;
 }
 
 void
-tv_add(tv, a, b)
-struct timeval *tv, *a, *b;
+tv_add(struct timeval *tv, struct timeval *a, struct timeval *b)
 {
 	tv->tv_sec = a->tv_sec + b->tv_sec;
 	tv->tv_usec = a->tv_usec + b->tv_usec;
@@ -133,8 +130,7 @@
 }
 
 void
-tv_sub(tv, a, b)
-struct timeval *tv, *a, *b;
+tv_sub(struct timeval *tv, struct timeval *a, struct timeval *b)
 {
 	tv->tv_sec = a->tv_sec - b->tv_sec;
 	tv->tv_usec = a->tv_usec - b->tv_usec;
@@ -145,9 +141,7 @@
 }
 
 void
-tv_div(tv, a, n)
-struct timeval *tv, *a;
-int n;
+tv_div(struct timeval *tv, struct timeval *a, int n)
 {
 	tv->tv_usec = (a->tv_sec % n * 1000000 + a->tv_usec + n / 2) / n;
 	tv->tv_sec = a->tv_sec / n + tv->tv_usec / 1000000;
@@ -155,9 +149,7 @@
 }
 
 void
-tv_mul(tv, a, n)
-struct timeval *tv, *a;
-int n;
+tv_mul(struct timeval *tv, struct timeval *a, int n)
 {
 	tv->tv_usec = a->tv_usec * n;
 	tv->tv_sec = a->tv_sec * n + tv->tv_usec / 1000000;
@@ -173,60 +165,15 @@
 	return NULL;
 }
 
-/*
- * Generic ptrace wrapper which tracks ESRCH errors
- * by setting tcp->ptrace_errno to ESRCH.
- *
- * We assume that ESRCH indicates likely process death (SIGKILL?),
- * modulo bugs where process somehow ended up not stopped.
- * Unfortunately kernel uses ESRCH for that case too. Oh well.
- *
- * Currently used by upeek() only.
- * TODO: use this in all other ptrace() calls while decoding.
- */
-long
-do_ptrace(int request, struct tcb *tcp, void *addr, void *data)
+#if !defined HAVE_STPCPY
+char *
+stpcpy(char *dst, const char *src)
 {
-	long l;
-
-	errno = 0;
-	l = ptrace(request, tcp->pid, addr, (long) data);
-	/* Non-ESRCH errors might be our invalid reg/mem accesses,
-	 * we do not record them. */
-	if (errno == ESRCH)
-		tcp->ptrace_errno = ESRCH;
-	return l;
+	while ((*dst = *src++) != '\0')
+		dst++;
+	return dst;
 }
-
-/*
- * Used when we want to unblock stopped traced process.
- * Should be only used with PTRACE_CONT, PTRACE_DETACH and PTRACE_SYSCALL.
- * Returns 0 on success or if error was ESRCH
- * (presumably process was killed while we talk to it).
- * Otherwise prints error message and returns -1.
- */
-int
-ptrace_restart(int op, struct tcb *tcp, int sig)
-{
-	int err;
-	const char *msg;
-
-	errno = 0;
-	ptrace(op, tcp->pid, (void *) 1, (long) sig);
-	err = errno;
-	if (!err || err == ESRCH)
-		return 0;
-
-	tcp->ptrace_errno = err;
-	msg = "SYSCALL";
-	if (op == PTRACE_CONT)
-		msg = "CONT";
-	if (op == PTRACE_DETACH)
-		msg = "DETACH";
-	fprintf(stderr, "strace: ptrace(PTRACE_%s,1,%d): %s\n",
-			msg, sig, strerror(err));
-	return -1;
-}
+#endif
 
 /*
  * Print entry in struct xlat table, if there.
@@ -237,7 +184,7 @@
 	const char *str = xlookup(xlat, val);
 
 	if (str)
-		tprintf("%s", str);
+		tprints(str);
 	else
 		tprintf("%#x /* %s */", val, dflt);
 }
@@ -250,20 +197,14 @@
 int
 printllval(struct tcb *tcp, const char *format, int llarg)
 {
-# if defined(FREEBSD) \
-     || (defined(LINUX) && defined(POWERPC) && !defined(POWERPC64)) \
-     || defined (LINUX_MIPSO32)
-	/* Align 64bit argument to 64bit boundary.  */
-	if (llarg % 2) llarg++;
-# endif
-# if defined LINUX && (defined X86_64 || defined POWERPC64)
+# if defined(X86_64) || defined(POWERPC64)
 	if (current_personality == 0) {
 		tprintf(format, tcp->u_arg[llarg]);
 		llarg++;
 	} else {
 #  ifdef POWERPC64
 		/* Align 64bit argument to 64bit boundary.  */
-		if (llarg % 2) llarg++;
+		llarg = (llarg + 1) & 0x1e;
 #  endif
 		tprintf(format, LONG_LONG(tcp->u_arg[llarg], tcp->u_arg[llarg + 1]));
 		llarg += 2;
@@ -271,7 +212,7 @@
 # elif defined IA64 || defined ALPHA
 	tprintf(format, tcp->u_arg[llarg]);
 	llarg++;
-# elif defined LINUX_MIPSN32
+# elif defined LINUX_MIPSN32 || defined X32
 	tprintf(format, tcp->ext_arg[llarg]);
 	llarg++;
 # else
@@ -287,29 +228,22 @@
  * print the entries whose bits are on in `flags'
  * return # of flags printed.
  */
-int
-addflags(xlat, flags)
-const struct xlat *xlat;
-int flags;
+void
+addflags(const struct xlat *xlat, int flags)
 {
-	int n;
-
-	for (n = 0; xlat->str; xlat++) {
+	for (; xlat->str; xlat++) {
 		if (xlat->val && (flags & xlat->val) == xlat->val) {
 			tprintf("|%s", xlat->str);
 			flags &= ~xlat->val;
-			n++;
 		}
 	}
 	if (flags) {
 		tprintf("|%#x", flags);
-		n++;
 	}
-	return n;
 }
 
 /*
- * Interpret `xlat' as an array of flags/
+ * Interpret `xlat' as an array of flags.
  * Print to static string the entries whose bits are on in `flags'
  * Return static string.
  */
@@ -317,23 +251,26 @@
 sprintflags(const char *prefix, const struct xlat *xlat, int flags)
 {
 	static char outstr[1024];
+	char *outptr;
 	int found = 0;
 
-	strcpy(outstr, prefix);
+	outptr = stpcpy(outstr, prefix);
 
 	for (; xlat->str; xlat++) {
 		if ((flags & xlat->val) == xlat->val) {
 			if (found)
-				strcat(outstr, "|");
-			strcat(outstr, xlat->str);
-			flags &= ~xlat->val;
+				*outptr++ = '|';
+			outptr = stpcpy(outptr, xlat->str);
 			found = 1;
+			flags &= ~xlat->val;
+			if (!flags)
+				break;
 		}
 	}
 	if (flags) {
 		if (found)
-			strcat(outstr, "|");
-		sprintf(outstr + strlen(outstr), "%#x", flags);
+			*outptr++ = '|';
+		outptr += sprintf(outptr, "%#x", flags);
 	}
 
 	return outstr;
@@ -346,7 +283,7 @@
 	const char *sep;
 
 	if (flags == 0 && xlat->val == 0) {
-		tprintf("%s", xlat->str);
+		tprints(xlat->str);
 		return 1;
 	}
 
@@ -372,7 +309,7 @@
 				tprintf(" /* %s */", dflt);
 		} else {
 			if (dflt)
-				tprintf("0");
+				tprints("0");
 		}
 	}
 
@@ -385,16 +322,16 @@
 	long num;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (umove(tcp, addr, &num) < 0) {
 		tprintf("%#lx", addr);
 		return;
 	}
-	tprintf("[");
+	tprints("[");
 	tprintf(fmt, num);
-	tprintf("]");
+	tprints("]");
 }
 
 void
@@ -403,48 +340,58 @@
 	int num;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	if (umove(tcp, addr, &num) < 0) {
 		tprintf("%#lx", addr);
 		return;
 	}
-	tprintf("[");
+	tprints("[");
 	tprintf(fmt, num);
-	tprintf("]");
+	tprints("]");
 }
 
 void
 printfd(struct tcb *tcp, int fd)
 {
-	tprintf("%d", fd);
+	const char *p;
+
+	if (show_fd_path && (p = getfdpath(tcp, fd)))
+		tprintf("%d<%s>", fd, p);
+	else
+		tprintf("%d", fd);
 }
 
 void
-printuid(text, uid)
-const char *text;
-unsigned long uid;
+printuid(const char *text, unsigned long uid)
 {
-	tprintf("%s", text);
-	tprintf((uid == -1) ? "%ld" : "%lu", uid);
+	tprintf((uid == -1) ? "%s%ld" : "%s%lu", text, uid);
 }
 
-static char path[MAXPATHLEN + 1];
-
 /*
  * Quote string `instr' of length `size'
  * Write up to (3 + `size' * 4) bytes to `outstr' buffer.
- * If `len' < 0, treat `instr' as a NUL-terminated string
+ * If `len' is -1, treat `instr' as a NUL-terminated string
  * and quote at most (`size' - 1) bytes.
+ *
+ * Returns 0 if len == -1 and NUL was seen, 1 otherwise.
+ * Note that if len >= 0, always returns 1.
  */
-static int
-string_quote(const char *instr, char *outstr, int len, int size)
+int
+string_quote(const char *instr, char *outstr, long len, int size)
 {
 	const unsigned char *ustr = (const unsigned char *) instr;
 	char *s = outstr;
-	int usehex = 0, c, i;
+	int usehex, c, i, eol;
 
+	eol = 0x100; /* this can never match a char */
+	if (len == -1) {
+		size--;
+		eol = '\0';
+	}
+
+	usehex = 0;
 	if (xflag > 1)
 		usehex = 1;
 	else if (xflag) {
@@ -453,13 +400,8 @@
 		for (i = 0; i < size; ++i) {
 			c = ustr[i];
 			/* Check for NUL-terminated string. */
-			if (len < 0) {
-				if (c == '\0')
-					break;
-				/* Quote at most size - 1 bytes. */
-				if (i == size - 1)
-					continue;
-			}
+			if (c == eol)
+				break;
 			if (!isprint(c) && !isspace(c)) {
 				usehex = 1;
 				break;
@@ -474,27 +416,19 @@
 		for (i = 0; i < size; ++i) {
 			c = ustr[i];
 			/* Check for NUL-terminated string. */
-			if (len < 0) {
-				if (c == '\0')
-					break;
-				/* Quote at most size - 1 bytes. */
-				if (i == size - 1)
-					continue;
-			}
-			sprintf(s, "\\x%02x", c);
-			s += 4;
+			if (c == eol)
+				goto asciz_ended;
+			*s++ = '\\';
+			*s++ = 'x';
+			*s++ = "0123456789abcdef"[c >> 4];
+			*s++ = "0123456789abcdef"[c & 0xf];
 		}
 	} else {
 		for (i = 0; i < size; ++i) {
 			c = ustr[i];
 			/* Check for NUL-terminated string. */
-			if (len < 0) {
-				if (c == '\0')
-					break;
-				/* Quote at most size - 1 bytes. */
-				if (i == size - 1)
-					continue;
-			}
+			if (c == eol)
+				goto asciz_ended;
 			switch (c) {
 				case '\"': case '\\':
 					*s++ = '\\';
@@ -523,13 +457,25 @@
 				default:
 					if (isprint(c))
 						*s++ = c;
-					else if (i + 1 < size
-						 && isdigit(ustr[i + 1])) {
-						sprintf(s, "\\%03o", c);
-						s += 4;
-					} else {
-						sprintf(s, "\\%o", c);
-						s += strlen(s);
+					else {
+						/* Print \octal */
+						*s++ = '\\';
+						if (i + 1 < size
+						    && ustr[i + 1] >= '0'
+						    && ustr[i + 1] <= '9'
+						) {
+							/* Print \ooo */
+							*s++ = '0' + (c >> 6);
+							*s++ = '0' + ((c >> 3) & 0x7);
+						} else {
+							/* Print \[[o]o]o */
+							if ((c >> 3) != 0) {
+								if ((c >> 6) != 0)
+									*s++ = '0' + (c >> 6);
+								*s++ = '0' + ((c >> 3) & 0x7);
+							}
+						}
+						*s++ = '0' + (c & 0x7);
 					}
 					break;
 			}
@@ -539,8 +485,21 @@
 	*s++ = '\"';
 	*s = '\0';
 
-	/* Return nonzero if the string was unterminated.  */
-	return i == size;
+	/* Return zero if we printed entire ASCIZ string (didn't truncate it) */
+	if (len == -1 && ustr[i] == '\0') {
+		/* We didn't see NUL yet (otherwise we'd jump to 'asciz_ended')
+		 * but next char is NUL.
+		 */
+		return 0;
+	}
+
+	return 1;
+
+ asciz_ended:
+	*s++ = '\"';
+	*s = '\0';
+	/* Return zero: we printed entire ASCIZ string (didn't truncate it) */
+	return 0;
 }
 
 /*
@@ -550,37 +509,40 @@
 void
 printpathn(struct tcb *tcp, long addr, int n)
 {
+	char path[MAXPATHLEN + 1];
+	int nul_seen;
+
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 
-	/* Cap path length to the path buffer size,
-	   and NUL-terminate the buffer. */
+	/* Cap path length to the path buffer size */
 	if (n > sizeof path - 1)
 		n = sizeof path - 1;
-	path[n] = '\0';
 
 	/* Fetch one byte more to find out whether path length > n. */
-	if (umovestr(tcp, addr, n + 1, path) < 0)
+	nul_seen = umovestr(tcp, addr, n + 1, path);
+	if (nul_seen < 0)
 		tprintf("%#lx", addr);
 	else {
-		static char outstr[4*(sizeof path - 1) + sizeof "\"...\""];
-		int trunc = (path[n] != '\0');
+		char *outstr;
 
-		if (trunc)
-			path[n] = '\0';
-		(void) string_quote(path, outstr, -1, n + 1);
-		if (trunc)
-			strcat(outstr, "...");
-		tprintf("%s", outstr);
+		path[n] = '\0';
+		n++;
+		outstr = alloca(4 * n); /* 4*(n-1) + 3 for quotes and NUL */
+		string_quote(path, outstr, -1, n);
+		tprints(outstr);
+		if (!nul_seen)
+			tprints("...");
 	}
 }
 
 void
 printpath(struct tcb *tcp, long addr)
 {
-	printpathn(tcp, addr, sizeof path - 1);
+	/* Size must correspond to char path[] size in printpathn */
+	printpathn(tcp, addr, MAXPATHLEN);
 }
 
 /*
@@ -589,76 +551,79 @@
  * If string length exceeds `max_strlen', append `...' to the output.
  */
 void
-printstr(struct tcb *tcp, long addr, int len)
+printstr(struct tcb *tcp, long addr, long len)
 {
 	static char *str = NULL;
 	static char *outstr;
 	int size;
+	int ellipsis;
 
 	if (!addr) {
-		tprintf("NULL");
+		tprints("NULL");
 		return;
 	}
 	/* Allocate static buffers if they are not allocated yet. */
-	if (!str)
+	if (!str) {
+		unsigned int outstr_size = 4 * max_strlen + /*for quotes and NUL:*/ 3;
+
+		if (outstr_size / 4 != max_strlen)
+			die_out_of_memory();
 		str = malloc(max_strlen + 1);
-	if (!outstr)
-		outstr = malloc(4 * max_strlen + sizeof "\"...\"");
-	if (!str || !outstr) {
-		fprintf(stderr, "out of memory\n");
-		tprintf("%#lx", addr);
-		return;
+		if (!str)
+			die_out_of_memory();
+		outstr = malloc(outstr_size);
+		if (!outstr)
+			die_out_of_memory();
 	}
 
-	if (len < 0) {
+	if (len == -1) {
 		/*
 		 * Treat as a NUL-terminated string: fetch one byte more
 		 * because string_quote() quotes one byte less.
 		 */
 		size = max_strlen + 1;
-		str[max_strlen] = '\0';
 		if (umovestr(tcp, addr, size, str) < 0) {
 			tprintf("%#lx", addr);
 			return;
 		}
 	}
 	else {
-		size = MIN(len, max_strlen);
+		size = max_strlen;
+		if (size > (unsigned long)len)
+			size = (unsigned long)len;
 		if (umoven(tcp, addr, size, str) < 0) {
 			tprintf("%#lx", addr);
 			return;
 		}
 	}
 
-	if (string_quote(str, outstr, len, size) &&
-	    (len < 0 || len > max_strlen))
-		strcat(outstr, "...");
+	/* If string_quote didn't see NUL and (it was supposed to be ASCIZ str
+	 * or we were requested to print more than -s NUM chars)...
+	 */
+	ellipsis = (string_quote(str, outstr, len, size) &&
+			(len < 0 || len > max_strlen));
 
-	tprintf("%s", outstr);
+	tprints(outstr);
+	if (ellipsis)
+		tprints("...");
 }
 
 #if HAVE_SYS_UIO_H
 void
-dumpiov(tcp, len, addr)
-struct tcb * tcp;
-int len;
-long addr;
+dumpiov(struct tcb *tcp, int len, long addr)
 {
-#if defined(LINUX) && SUPPORTED_PERSONALITIES > 1
+#if SUPPORTED_PERSONALITIES > 1
 	union {
 		struct { u_int32_t base; u_int32_t len; } *iov32;
 		struct { u_int64_t base; u_int64_t len; } *iov64;
 	} iovu;
 #define iov iovu.iov64
 #define sizeof_iov \
-  (personality_wordsize[current_personality] == 4 \
-   ? sizeof(*iovu.iov32) : sizeof(*iovu.iov64))
+	(current_wordsize == 4 ? sizeof(*iovu.iov32) : sizeof(*iovu.iov64))
 #define iov_iov_base(i) \
-  (personality_wordsize[current_personality] == 4 \
-   ? (u_int64_t) iovu.iov32[i].base : iovu.iov64[i].base)
+	(current_wordsize == 4 ? (uint64_t) iovu.iov32[i].base : iovu.iov64[i].base)
 #define iov_iov_len(i) \
-  (personality_wordsize[current_personality] == 4 \
-   ? (u_int64_t) iovu.iov32[i].len : iovu.iov64[i].len)
+	(current_wordsize == 4 ? (uint64_t) iovu.iov32[i].len : iovu.iov64[i].len)
 #else
 	struct iovec *iov;
 #define sizeof_iov sizeof(*iov)
@@ -666,12 +631,13 @@
 #define iov_iov_len(i) iov[i].iov_len
 #endif
 	int i;
-	unsigned long size;
+	unsigned size;
 
-	size = sizeof_iov * (unsigned long) len;
-	if (size / sizeof_iov != len
+	size = sizeof_iov * len;
+	/* Assuming no sane program has millions of iovs */
+	if ((unsigned)len > 1024*1024 /* insane or negative size? */
 	    || (iov = malloc(size)) == NULL) {
-		fprintf(stderr, "out of memory\n");
+		fprintf(stderr, "Out of memory\n");
 		return;
 	}
 	if (umoven(tcp, addr, size, (char *) iov) >= 0) {
@@ -684,7 +650,7 @@
 				iov_iov_len(i));
 		}
 	}
-	free((char *) iov);
+	free(iov);
 #undef sizeof_iov
 #undef iov_iov_base
 #undef iov_iov_len
@@ -693,22 +659,19 @@
 #endif
 
 void
-dumpstr(tcp, addr, len)
-struct tcb *tcp;
-long addr;
-int len;
+dumpstr(struct tcb *tcp, long addr, int len)
 {
 	static int strsize = -1;
 	static unsigned char *str;
-	static char outstr[80];
 	char *s;
 	int i, j;
 
 	if (strsize < len) {
-		if (str)
-			free(str);
-		if ((str = malloc(len)) == NULL) {
-			fprintf(stderr, "out of memory\n");
+		free(str);
+		str = malloc(len);
+		if (!str) {
+			strsize = -1;
+			fprintf(stderr, "Out of memory\n");
 			return;
 		}
 		strsize = len;
@@ -718,6 +681,8 @@
 		return;
 
 	for (i = 0; i < len; i += 16) {
+		char outstr[80];
+
 		s = outstr;
 		sprintf(s, " | %05x ", i);
 		s += 9;
@@ -749,6 +714,43 @@
 	}
 }
 
+#ifdef HAVE_PROCESS_VM_READV
+/* C library supports this, but the kernel might not. */
+static bool process_vm_readv_not_supported = 0;
+#else
+
+/* Need to do this since process_vm_readv() is not yet available in libc.
+ * When libc is be updated, only "static bool process_vm_readv_not_supported"
+ * line should remain.
+ */
+#if !defined(__NR_process_vm_readv)
+# if defined(I386)
+#  define __NR_process_vm_readv  347
+# elif defined(X86_64)
+#  define __NR_process_vm_readv  310
+# elif defined(POWERPC)
+#  define __NR_process_vm_readv  351
+# endif
+#endif
+
+#if defined(__NR_process_vm_readv)
+static bool process_vm_readv_not_supported = 0;
+static ssize_t process_vm_readv(pid_t pid,
+		 const struct iovec *lvec,
+		 unsigned long liovcnt,
+		 const struct iovec *rvec,
+		 unsigned long riovcnt,
+		 unsigned long flags)
+{
+	return syscall(__NR_process_vm_readv, (long)pid, lvec, liovcnt, rvec, riovcnt, flags);
+}
+#else
+static bool process_vm_readv_not_supported = 1;
+# define process_vm_readv(...) (errno = ENOSYS, -1)
+#endif
+
+#endif /* end of hack */
+
 #define PAGMASK	(~(PAGSIZ - 1))
 /*
  * move `len' bytes of data from process `pid'
@@ -757,15 +759,44 @@
 int
 umoven(struct tcb *tcp, long addr, int len, char *laddr)
 {
-#ifdef LINUX
 	int pid = tcp->pid;
 	int n, m;
-	int started = 0;
+	int started;
 	union {
 		long val;
 		char x[sizeof(long)];
 	} u;
 
+#if SUPPORTED_PERSONALITIES > 1
+	if (current_wordsize < sizeof(addr))
+		addr &= (1ul << 8 * current_wordsize) - 1;
+#endif
+
+	if (!process_vm_readv_not_supported) {
+		struct iovec local[1], remote[1];
+		int r;
+
+		local[0].iov_base = laddr;
+		remote[0].iov_base = (void*)addr;
+		local[0].iov_len = remote[0].iov_len = len;
+		r = process_vm_readv(pid,
+				local, 1,
+				remote, 1,
+				/*flags:*/ 0
+		);
+		if (r < 0) {
+			if (errno == ENOSYS)
+				process_vm_readv_not_supported = 1;
+			else if (errno != EINVAL) /* EINVAL is seen if process is gone */
+				/* strange... */
+				perror("process_vm_readv");
+			goto vm_readv_didnt_work;
+		}
+		return r;
+	}
+ vm_readv_didnt_work:
+
+	started = 0;
 	if (addr & (sizeof(long) - 1)) {
 		/* addr not a multiple of sizeof(long) */
 		n = addr - (addr & -sizeof(long)); /* residue */
@@ -773,17 +804,14 @@
 		errno = 0;
 		u.val = ptrace(PTRACE_PEEKDATA, pid, (char *) addr, 0);
 		if (errno) {
-			if (started && (errno==EPERM || errno==EIO)) {
-				/* Ran into 'end of memory' - stupid "printpath" */
-				return 0;
-			}
 			/* But if not started, we had a bogus address. */
 			if (addr != 0 && errno != EIO && errno != ESRCH)
-				perror("ptrace: umoven");
+				perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%lx", pid, addr);
 			return -1;
 		}
 		started = 1;
-		memcpy(laddr, &u.x[n], m = MIN(sizeof(long) - n, len));
+		m = MIN(sizeof(long) - n, len);
+		memcpy(laddr, &u.x[n], m);
 		addr += sizeof(long), laddr += m, len -= m;
 	}
 	while (len) {
@@ -795,88 +823,34 @@
 				return 0;
 			}
 			if (addr != 0 && errno != EIO && errno != ESRCH)
-				perror("ptrace: umoven");
+				perror_msg("umoven: PTRACE_PEEKDATA pid:%d @0x%lx", pid, addr);
 			return -1;
 		}
 		started = 1;
-		memcpy(laddr, u.x, m = MIN(sizeof(long), len));
+		m = MIN(sizeof(long), len);
+		memcpy(laddr, u.x, m);
 		addr += sizeof(long), laddr += m, len -= m;
 	}
-#endif /* LINUX */
-
-#ifdef SUNOS4
-	int pid = tcp->pid;
-	int n;
-
-	while (len) {
-		n = MIN(len, PAGSIZ);
-		n = MIN(n, ((addr + PAGSIZ) & PAGMASK) - addr);
-		if (ptrace(PTRACE_READDATA, pid,
-			   (char *) addr, len, laddr) < 0) {
-			if (errno != ESRCH) {
-				perror("umoven: ptrace(PTRACE_READDATA, ...)");
-				abort();
-			}
-			return -1;
-		}
-		len -= n;
-		addr += n;
-		laddr += n;
-	}
-#endif /* SUNOS4 */
-
-#ifdef USE_PROCFS
-#ifdef HAVE_MP_PROCFS
-	int fd = tcp->pfd_as;
-#else
-	int fd = tcp->pfd;
-#endif
-	lseek(fd, addr, SEEK_SET);
-	if (read(fd, laddr, len) == -1)
-		return -1;
-#endif /* USE_PROCFS */
 
 	return 0;
 }
 
 /*
- * like `umove' but make the additional effort of looking
+ * Like `umove' but make the additional effort of looking
  * for a terminating zero byte.
+ *
+ * Returns < 0 on error, > 0 if NUL was seen,
+ * (TODO if useful: return count of bytes including NUL),
+ * else 0 if len bytes were read but no NUL byte seen.
+ *
+ * Note: there is no guarantee we won't overwrite some bytes
+ * in laddr[] _after_ terminating NUL (but, of course,
+ * we never write past laddr[len-1]).
  */
 int
 umovestr(struct tcb *tcp, long addr, int len, char *laddr)
 {
-#ifdef USE_PROCFS
-#ifdef HAVE_MP_PROCFS
-	int fd = tcp->pfd_as;
-#else
-	int fd = tcp->pfd;
-#endif
-	/* Some systems (e.g. FreeBSD) can be upset if we read off the
-	   end of valid memory,  avoid this by trying to read up
-	   to page boundaries.  But we don't know what a page is (and
-	   getpagesize(2) (if it exists) doesn't necessarily return
-	   hardware page size).  Assume all pages >= 1024 (a-historical
-	   I know) */
-
-	int page = 1024; 	/* How to find this? */
-	int move = page - (addr & (page - 1));
-	int left = len;
-
-	lseek(fd, addr, SEEK_SET);
-
-	while (left) {
-		if (move > left) move = left;
-		if ((move = read(fd, laddr, move)) <= 0)
-			return left != len ? 0 : -1;
-		if (memchr (laddr, 0, move)) break;
-		left -= move;
-		laddr += move;
-		addr += move;
-		move = page;
-	}
-#else /* !USE_PROCFS */
-	int started = 0;
+	int started;
 	int pid = tcp->pid;
 	int i, n, m;
 	union {
@@ -884,6 +858,61 @@
 		char x[sizeof(long)];
 	} u;
 
+#if SUPPORTED_PERSONALITIES > 1
+	if (current_wordsize < sizeof(addr))
+		addr &= (1ul << 8 * current_wordsize) - 1;
+#endif
+
+	if (!process_vm_readv_not_supported) {
+		struct iovec local[1], remote[1];
+
+		local[0].iov_base = laddr;
+		remote[0].iov_base = (void*)addr;
+
+		while (len > 0) {
+			int end_in_page;
+			int r;
+			int chunk_len;
+
+			/* Don't read kilobytes: most strings are short */
+			chunk_len = len;
+			if (chunk_len > 256)
+				chunk_len = 256;
+			/* Don't cross pages. I guess otherwise we can get EFAULT
+			 * and fail to notice that terminating NUL lies
+			 * in the existing (first) page.
+			 * (I hope there aren't arches with pages < 4K)
+			 */
+			end_in_page = ((addr + chunk_len) & 4095);
+			r = chunk_len - end_in_page;
+			if (r > 0) /* if chunk_len > end_in_page */
+				chunk_len = r; /* chunk_len -= end_in_page */
+
+			local[0].iov_len = remote[0].iov_len = chunk_len;
+			r = process_vm_readv(pid,
+					local, 1,
+					remote, 1,
+					/*flags:*/ 0
+			);
+			if (r < 0) {
+				if (errno == ENOSYS)
+					process_vm_readv_not_supported = 1;
+				else if (errno != EINVAL) /* EINVAL is seen if process is gone */
+					/* strange... */
+					perror("process_vm_readv");
+				goto vm_readv_didnt_work;
+			}
+			if (memchr(local[0].iov_base, '\0', r))
+				return 1;
+			local[0].iov_base += r;
+			remote[0].iov_base += r;
+			len -= r;
+		}
+		return 0;
+	}
+ vm_readv_didnt_work:
+
+	started = 0;
 	if (addr & (sizeof(long) - 1)) {
 		/* addr not a multiple of sizeof(long) */
 		n = addr - (addr & -sizeof(long)); /* residue */
@@ -891,19 +920,16 @@
 		errno = 0;
 		u.val = ptrace(PTRACE_PEEKDATA, pid, (char *)addr, 0);
 		if (errno) {
-			if (started && (errno==EPERM || errno==EIO)) {
-				/* Ran into 'end of memory' - stupid "printpath" */
-				return 0;
-			}
 			if (addr != 0 && errno != EIO && errno != ESRCH)
-				perror("umovestr");
+				perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%lx", pid, addr);
 			return -1;
 		}
 		started = 1;
-		memcpy(laddr, &u.x[n], m = MIN(sizeof(long)-n,len));
+		m = MIN(sizeof(long) - n, len);
+		memcpy(laddr, &u.x[n], m);
 		while (n & (sizeof(long) - 1))
 			if (u.x[n++] == '\0')
-				return 0;
+				return 1;
 		addr += sizeof(long), laddr += m, len -= m;
 	}
 	while (len) {
@@ -915,144 +941,30 @@
 				return 0;
 			}
 			if (addr != 0 && errno != EIO && errno != ESRCH)
-				perror("umovestr");
+				perror_msg("umovestr: PTRACE_PEEKDATA pid:%d @0x%lx", pid, addr);
 			return -1;
 		}
 		started = 1;
-		memcpy(laddr, u.x, m = MIN(sizeof(long), len));
+		m = MIN(sizeof(long), len);
+		memcpy(laddr, u.x, m);
 		for (i = 0; i < sizeof(long); i++)
 			if (u.x[i] == '\0')
-				return 0;
-
-		addr += sizeof(long), laddr += m, len -= m;
-	}
-#endif /* !USE_PROCFS */
-	return 0;
-}
-
-#ifdef LINUX
-# if !defined (SPARC) && !defined(SPARC64)
-#  define PTRACE_WRITETEXT	101
-#  define PTRACE_WRITEDATA	102
-# endif /* !SPARC && !SPARC64 */
-#endif /* LINUX */
-
-#ifdef SUNOS4
-
-static int
-uload(cmd, pid, addr, len, laddr)
-int cmd;
-int pid;
-long addr;
-int len;
-char *laddr;
-{
-	int peek, poke;
-	int n, m;
-	union {
-		long val;
-		char x[sizeof(long)];
-	} u;
-
-	if (cmd == PTRACE_WRITETEXT) {
-		peek = PTRACE_PEEKTEXT;
-		poke = PTRACE_POKETEXT;
-	}
-	else {
-		peek = PTRACE_PEEKDATA;
-		poke = PTRACE_POKEDATA;
-	}
-	if (addr & (sizeof(long) - 1)) {
-		/* addr not a multiple of sizeof(long) */
-		n = addr - (addr & -sizeof(long)); /* residue */
-		addr &= -sizeof(long);
-		errno = 0;
-		u.val = ptrace(peek, pid, (char *) addr, 0);
-		if (errno) {
-			perror("uload: POKE");
-			return -1;
-		}
-		memcpy(&u.x[n], laddr, m = MIN(sizeof(long) - n, len));
-		if (ptrace(poke, pid, (char *)addr, u.val) < 0) {
-			perror("uload: POKE");
-			return -1;
-		}
-		addr += sizeof(long), laddr += m, len -= m;
-	}
-	while (len) {
-		if (len < sizeof(long))
-			u.val = ptrace(peek, pid, (char *) addr, 0);
-		memcpy(u.x, laddr, m = MIN(sizeof(long), len));
-		if (ptrace(poke, pid, (char *) addr, u.val) < 0) {
-			perror("uload: POKE");
-			return -1;
-		}
+				return 1;
 		addr += sizeof(long), laddr += m, len -= m;
 	}
 	return 0;
 }
 
 int
-tload(pid, addr, len, laddr)
-int pid;
-int addr, len;
-char *laddr;
-{
-	return uload(PTRACE_WRITETEXT, pid, addr, len, laddr);
-}
-
-int
-dload(pid, addr, len, laddr)
-int pid;
-int addr;
-int len;
-char *laddr;
-{
-	return uload(PTRACE_WRITEDATA, pid, addr, len, laddr);
-}
-
-#endif /* SUNOS4 */
-
-#ifndef USE_PROCFS
-
-int
-upeek(tcp, off, res)
-struct tcb *tcp;
-long off;
-long *res;
+upeek(struct tcb *tcp, long off, long *res)
 {
 	long val;
 
-# ifdef SUNOS4_KERNEL_ARCH_KLUDGE
-	{
-		static int is_sun4m = -1;
-		struct utsname name;
-
-		/* Round up the usual suspects. */
-		if (is_sun4m == -1) {
-			if (uname(&name) < 0) {
-				perror("upeek: uname?");
-				exit(1);
-			}
-			is_sun4m = strcmp(name.machine, "sun4m") == 0;
-			if (is_sun4m) {
-				const struct xlat *x;
-
-				for (x = struct_user_offsets; x->str; x++)
-					x->val += 1024;
-			}
-		}
-		if (is_sun4m)
-			off += 1024;
-	}
-# endif /* SUNOS4_KERNEL_ARCH_KLUDGE */
 	errno = 0;
-	val = do_ptrace(PTRACE_PEEKUSER, tcp, (char *) off, 0);
+	val = ptrace(PTRACE_PEEKUSER, tcp->pid, (char *) off, 0);
 	if (val == -1 && errno) {
 		if (errno != ESRCH) {
-			char buf[60];
-			sprintf(buf,"upeek: ptrace(PTRACE_PEEKUSER,%d,%lu,0)", tcp->pid, off);
-			perror(buf);
+			perror_msg("upeek: PTRACE_PEEKUSER pid:%d @0x%lx)", tcp->pid, off);
 		}
 		return -1;
 	}
@@ -1060,8 +972,6 @@
 	return 0;
 }
 
-#endif /* !USE_PROCFS */
-
 void
 printcall(struct tcb *tcp)
 {
@@ -1069,8 +979,7 @@
 			   sizeof(long) == 8 ? "[????????????????] " : \
 			   NULL /* crash */)
 
-#ifdef LINUX
-# ifdef I386
+#if defined(I386)
 	long eip;
 
 	if (upeek(tcp, 4*EIP, &eip) < 0) {
@@ -1078,20 +987,19 @@
 		return;
 	}
 	tprintf("[%08lx] ", eip);
-
-# elif defined(S390) || defined(S390X)
+#elif defined(S390) || defined(S390X)
 	long psw;
-	if(upeek(tcp,PT_PSWADDR,&psw) < 0) {
+	if (upeek(tcp, PT_PSWADDR, &psw) < 0) {
 		PRINTBADPC;
 		return;
 	}
-#  ifdef S390
+# ifdef S390
 	tprintf("[%08lx] ", psw);
-#  elif S390X
+# elif S390X
 	tprintf("[%16lx] ", psw);
-#  endif
+# endif
 
-# elif defined(X86_64)
+#elif defined(X86_64) || defined(X32)
 	long rip;
 
 	if (upeek(tcp, 8*RIP, &rip) < 0) {
@@ -1099,7 +1007,7 @@
 		return;
 	}
 	tprintf("[%16lx] ", rip);
-# elif defined(IA64)
+#elif defined(IA64)
 	long ip;
 
 	if (upeek(tcp, PT_B0, &ip) < 0) {
@@ -1107,78 +1015,78 @@
 		return;
 	}
 	tprintf("[%08lx] ", ip);
-# elif defined(POWERPC)
+#elif defined(POWERPC)
 	long pc;
 
 	if (upeek(tcp, sizeof(unsigned long)*PT_NIP, &pc) < 0) {
 		PRINTBADPC;
 		return;
 	}
-#  ifdef POWERPC64
+# ifdef POWERPC64
 	tprintf("[%016lx] ", pc);
-#  else
+# else
 	tprintf("[%08lx] ", pc);
-#  endif
-# elif defined(M68K)
+# endif
+#elif defined(M68K)
 	long pc;
 
 	if (upeek(tcp, 4*PT_PC, &pc) < 0) {
-		tprintf ("[????????] ");
+		tprints("[????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(ALPHA)
+#elif defined(ALPHA)
 	long pc;
 
 	if (upeek(tcp, REG_PC, &pc) < 0) {
-		tprintf ("[????????????????] ");
+		tprints("[????????????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(SPARC) || defined(SPARC64)
+#elif defined(SPARC) || defined(SPARC64)
 	struct pt_regs regs;
-	if (ptrace(PTRACE_GETREGS,tcp->pid,(char *)&regs,0) < 0) {
+	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
 		PRINTBADPC;
 		return;
 	}
-#  if defined(SPARC64)
+# if defined(SPARC64)
 	tprintf("[%08lx] ", regs.tpc);
-#  else
+# else
 	tprintf("[%08lx] ", regs.pc);
-#  endif
-# elif defined(HPPA)
+# endif
+#elif defined(HPPA)
 	long pc;
 
-	if(upeek(tcp,PT_IAOQ0,&pc) < 0) {
-		tprintf ("[????????] ");
+	if (upeek(tcp, PT_IAOQ0, &pc) < 0) {
+		tprints("[????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(MIPS)
+#elif defined(MIPS)
 	long pc;
 
 	if (upeek(tcp, REG_EPC, &pc) < 0) {
-		tprintf ("[????????] ");
+		tprints("[????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(SH)
+#elif defined(SH)
 	long pc;
 
 	if (upeek(tcp, 4*REG_PC, &pc) < 0) {
-		tprintf ("[????????] ");
+		tprints("[????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(SH64)
+#elif defined(SH64)
 	long pc;
 
 	if (upeek(tcp, REG_PC, &pc) < 0) {
-		tprintf ("[????????????????] ");
+		tprints("[????????????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(ARM)
+#elif defined(ARM)
 	long pc;
 
 	if (upeek(tcp, 4*15, &pc) < 0) {
@@ -1186,15 +1094,15 @@
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(AVR32)
+#elif defined(AVR32)
 	long pc;
 
 	if (upeek(tcp, REG_PC, &pc) < 0) {
-		tprintf("[????????] ");
+		tprints("[????????] ");
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# elif defined(BFIN)
+#elif defined(BFIN)
 	long pc;
 
 	if (upeek(tcp, PT_PC, &pc) < 0) {
@@ -1218,63 +1126,137 @@
 		return;
 	}
 	tprintf("[%08lx] ", pc);
-# endif /* architecture */
-#endif /* LINUX */
-
-#ifdef SUNOS4
-	struct regs regs;
-
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *) &regs, 0) < 0) {
-		perror("printcall: ptrace(PTRACE_GETREGS, ...)");
-		PRINTBADPC;
-		return;
-	}
-	tprintf("[%08x] ", regs.r_o7);
-#endif /* SUNOS4 */
-
-#ifdef SVR4
-	/* XXX */
-	PRINTBADPC;
-#endif
-
-#ifdef FREEBSD
-	struct reg regs;
-	pread(tcp->pfd_reg, &regs, sizeof(regs), 0);
-	tprintf("[%08x] ", regs.r_eip);
-#endif /* FREEBSD */
+#endif /* architecture */
 }
 
-
 /*
  * These #if's are huge, please indent them correctly.
  * It's easy to get confused otherwise.
  */
-#ifndef USE_PROCFS
 
-#ifdef LINUX
+#include "syscall.h"
 
-#  include "syscall.h"
+#ifndef CLONE_PTRACE
+# define CLONE_PTRACE    0x00002000
+#endif
+#ifndef CLONE_VFORK
+# define CLONE_VFORK     0x00004000
+#endif
+#ifndef CLONE_VM
+# define CLONE_VM        0x00000100
+#endif
 
-#  include <sys/syscall.h>
-#  ifndef CLONE_PTRACE
-#   define CLONE_PTRACE    0x00002000
-#  endif
-#  ifndef CLONE_VFORK
-#   define CLONE_VFORK     0x00004000
-#  endif
-#  ifndef CLONE_VM
-#   define CLONE_VM        0x00000100
-#  endif
-#  ifndef CLONE_STOPPED
-#   define CLONE_STOPPED   0x02000000
-#  endif
+static int
+change_syscall(struct tcb *tcp, int new)
+{
+#if defined(I386)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_EAX * 4), new) < 0)
+		return -1;
+	return 0;
+#elif defined(X86_64) || defined(X32)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(ORIG_RAX * 8), new) < 0)
+		return -1;
+	return 0;
+#elif defined(POWERPC)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid,
+		   (char*)(sizeof(unsigned long)*PT_R0), new) < 0)
+		return -1;
+	return 0;
+#elif defined(S390) || defined(S390X)
+	/* s390 linux after 2.4.7 has a hook in entry.S to allow this */
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR2), new) < 0)
+		return -1;
+	return 0;
+#elif defined(M68K)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_ORIG_D0), new) < 0)
+		return -1;
+	return 0;
+#elif defined(SPARC) || defined(SPARC64)
+	struct pt_regs regs;
+	if (ptrace(PTRACE_GETREGS, tcp->pid, (char*)&regs, 0) < 0)
+		return -1;
+	regs.u_regs[U_REG_G1] = new;
+	if (ptrace(PTRACE_SETREGS, tcp->pid, (char*)&regs, 0) < 0)
+		return -1;
+	return 0;
+#elif defined(MIPS)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_V0), new) < 0)
+		return -1;
+	return 0;
+#elif defined(ALPHA)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_A3), new) < 0)
+		return -1;
+	return 0;
+#elif defined(AVR32)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_R8), new) < 0)
+		return -1;
+	return 0;
+#elif defined(BFIN)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_P0), new) < 0)
+		return -1;
+	return 0;
+#elif defined(IA64)
+	if (ia32) {
+		switch (new) {
+		case 2:
+			break;	/* x86 SYS_fork */
+		case SYS_clone:
+			new = 120;
+			break;
+		default:
+			fprintf(stderr, "%s: unexpected syscall %d\n",
+				__FUNCTION__, new);
+			return -1;
+		}
+		if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R1), new) < 0)
+			return -1;
+	} else if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_R15), new) < 0)
+		return -1;
+	return 0;
+#elif defined(HPPA)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GR20), new) < 0)
+		return -1;
+	return 0;
+#elif defined(SH)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*(REG_REG0+3)), new) < 0)
+		return -1;
+	return 0;
+#elif defined(SH64)
+	/* Top half of reg encodes the no. of args n as 0x1n.
+	   Assume 0 args as kernel never actually checks... */
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(REG_SYSCALL),
+				0x100000 | new) < 0)
+		return -1;
+	return 0;
+#elif defined(CRISV10) || defined(CRISV32)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(4*PT_R9), new) < 0)
+		return -1;
+	return 0;
+#elif defined(ARM)
+	/* Some kernels support this, some (pre-2.6.16 or so) don't.  */
+# ifndef PTRACE_SET_SYSCALL
+#  define PTRACE_SET_SYSCALL 23
+# endif
+	if (ptrace(PTRACE_SET_SYSCALL, tcp->pid, 0, new & 0xffff) != 0)
+		return -1;
+	return 0;
+#elif defined(TILE)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid,
+		   (char*)PTREGS_OFFSET_REG(0),
+		   new) != 0)
+		return -1;
+	return 0;
+#elif defined(MICROBLAZE)
+	if (ptrace(PTRACE_POKEUSER, tcp->pid, (char*)(PT_GPR(0)), new) < 0)
+		return -1;
+	return 0;
+#else
+#warning Do not know how to handle change_syscall for this architecture
+#endif /* architecture */
+	return -1;
+}
 
-#  ifdef IA64
-
-/* We don't have fork()/vfork() syscalls on ia64 itself, but the ia32
-   subsystem has them for x86... */
-#   define SYS_fork	2
-#   define SYS_vfork	190
+#ifdef IA64
 
 typedef unsigned long *arg_setup_state;
 
@@ -1303,40 +1285,38 @@
 	return 0;
 }
 
-#   define arg_finish_change(tcp, state)	0
+# define arg_finish_change(tcp, state)	0
 
-#   ifdef SYS_fork
 static int
-get_arg0 (struct tcb *tcp, arg_setup_state *state, long *valp)
+get_arg0(struct tcb *tcp, arg_setup_state *state, long *valp)
 {
 	int ret;
 
 	if (ia32)
-		ret = upeek (tcp, PT_R11, valp);
+		ret = upeek(tcp, PT_R11, valp);
 	else
-		ret = umoven (tcp,
+		ret = umoven(tcp,
 			      (unsigned long) ia64_rse_skip_regs(*state, 0),
 			      sizeof(long), (void *) valp);
 	return ret;
 }
 
 static int
-get_arg1 (struct tcb *tcp, arg_setup_state *state, long *valp)
+get_arg1(struct tcb *tcp, arg_setup_state *state, long *valp)
 {
 	int ret;
 
 	if (ia32)
-		ret = upeek (tcp, PT_R9, valp);
+		ret = upeek(tcp, PT_R9, valp);
 	else
-		ret = umoven (tcp,
+		ret = umoven(tcp,
 			      (unsigned long) ia64_rse_skip_regs(*state, 1),
 			      sizeof(long), (void *) valp);
 	return ret;
 }
-#   endif
 
 static int
-set_arg0 (struct tcb *tcp, arg_setup_state *state, long val)
+set_arg0(struct tcb *tcp, arg_setup_state *state, long val)
 {
 	int req = PTRACE_POKEDATA;
 	void *ap;
@@ -1352,7 +1332,7 @@
 }
 
 static int
-set_arg1 (struct tcb *tcp, arg_setup_state *state, long val)
+set_arg1(struct tcb *tcp, arg_setup_state *state, long val)
 {
 	int req = PTRACE_POKEDATA;
 	void *ap;
@@ -1370,110 +1350,108 @@
 /* ia64 does not return the input arguments from functions (and syscalls)
    according to ia64 RSE (Register Stack Engine) behavior.  */
 
-#   define restore_arg0(tcp, state, val) ((void) (state), 0)
-#   define restore_arg1(tcp, state, val) ((void) (state), 0)
+# define restore_arg0(tcp, state, val) ((void) (state), 0)
+# define restore_arg1(tcp, state, val) ((void) (state), 0)
 
-#  elif defined (SPARC) || defined (SPARC64)
+#elif defined(SPARC) || defined(SPARC64)
 
 typedef struct pt_regs arg_setup_state;
 
-#   define arg_setup(tcp, state) \
-    (ptrace (PTRACE_GETREGS, tcp->pid, (char *) (state), 0))
-#   define arg_finish_change(tcp, state) \
-    (ptrace (PTRACE_SETREGS, tcp->pid, (char *) (state), 0))
+# define arg_setup(tcp, state) \
+    (ptrace(PTRACE_GETREGS, (tcp)->pid, (char *) (state), 0))
+# define arg_finish_change(tcp, state) \
+    (ptrace(PTRACE_SETREGS, (tcp)->pid, (char *) (state), 0))
 
-#   define get_arg0(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O0], 0)
-#   define get_arg1(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O1], 0)
-#   define set_arg0(tcp, state, val) ((state)->u_regs[U_REG_O0] = (val), 0)
-#   define set_arg1(tcp, state, val) ((state)->u_regs[U_REG_O1] = (val), 0)
-#   define restore_arg0(tcp, state, val) 0
+# define get_arg0(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O0], 0)
+# define get_arg1(tcp, state, valp) (*(valp) = (state)->u_regs[U_REG_O1], 0)
+# define set_arg0(tcp, state, val)  ((state)->u_regs[U_REG_O0] = (val), 0)
+# define set_arg1(tcp, state, val)  ((state)->u_regs[U_REG_O1] = (val), 0)
+# define restore_arg0(tcp, state, val) 0
 
-#  else /* other architectures */
+#else /* other architectures */
 
-#   if defined S390 || defined S390X
+# if defined S390 || defined S390X
 /* Note: this is only true for the `clone' system call, which handles
    arguments specially.  We could as well say that its first two arguments
    are swapped relative to other architectures, but that would just be
    another #ifdef in the calls.  */
-#    define arg0_offset	PT_GPR3
-#    define arg1_offset	PT_ORIGGPR2
-#    define restore_arg0(tcp, state, val) ((void) (state), 0)
-#    define restore_arg1(tcp, state, val) ((void) (state), 0)
-#    define arg0_index	1
-#    define arg1_index	0
-#   elif defined (ALPHA) || defined (MIPS)
-#    define arg0_offset	REG_A0
-#    define arg1_offset	(REG_A0+1)
-#   elif defined (AVR32)
-#    define arg0_offset	(REG_R12)
-#    define arg1_offset	(REG_R11)
-#   elif defined (POWERPC)
-#    define arg0_offset	(sizeof(unsigned long)*PT_R3)
-#    define arg1_offset	(sizeof(unsigned long)*PT_R4)
-#    define restore_arg0(tcp, state, val) ((void) (state), 0)
-#   elif defined (HPPA)
-#    define arg0_offset	 PT_GR26
-#    define arg1_offset	 (PT_GR26-4)
-#   elif defined (X86_64)
-#    define arg0_offset	((long)(8*(current_personality ? RBX : RDI)))
-#    define arg1_offset	((long)(8*(current_personality ? RCX : RSI)))
-#   elif defined (SH)
-#    define arg0_offset	(4*(REG_REG0+4))
-#    define arg1_offset	(4*(REG_REG0+5))
-#   elif defined (SH64)
-    /* ABI defines arg0 & 1 in r2 & r3 */
-#    define arg0_offset   (REG_OFFSET+16)
-#    define arg1_offset   (REG_OFFSET+24)
-#    define restore_arg0(tcp, state, val) 0
-#   elif defined CRISV10 || defined CRISV32
-#    define arg0_offset   (4*PT_R11)
-#    define arg1_offset   (4*PT_ORIG_R10)
-#    define restore_arg0(tcp, state, val) 0
-#    define restore_arg1(tcp, state, val) 0
-#    define arg0_index   1
-#    define arg1_index   0
-#   else
-#    define arg0_offset	0
-#    define arg1_offset	4
-#    if defined ARM
-#     define restore_arg0(tcp, state, val) 0
-#    endif
-#   endif
+#  define arg0_offset	PT_GPR3
+#  define arg1_offset	PT_ORIGGPR2
+#  define restore_arg0(tcp, state, val) ((void) (state), 0)
+#  define restore_arg1(tcp, state, val) ((void) (state), 0)
+#  define arg0_index	1
+#  define arg1_index	0
+# elif defined(ALPHA) || defined(MIPS)
+#  define arg0_offset	REG_A0
+#  define arg1_offset	(REG_A0+1)
+# elif defined(AVR32)
+#  define arg0_offset	(REG_R12)
+#  define arg1_offset	(REG_R11)
+# elif defined(POWERPC)
+#  define arg0_offset	(sizeof(unsigned long)*PT_R3)
+#  define arg1_offset	(sizeof(unsigned long)*PT_R4)
+#  define restore_arg0(tcp, state, val) ((void) (state), 0)
+# elif defined(HPPA)
+#  define arg0_offset	PT_GR26
+#  define arg1_offset	(PT_GR26-4)
+# elif defined(X86_64) || defined(X32)
+#  define arg0_offset	((long)(8*(current_personality ? RBX : RDI)))
+#  define arg1_offset	((long)(8*(current_personality ? RCX : RSI)))
+# elif defined(SH)
+#  define arg0_offset	(4*(REG_REG0+4))
+#  define arg1_offset	(4*(REG_REG0+5))
+# elif defined(SH64)
+   /* ABI defines arg0 & 1 in r2 & r3 */
+#  define arg0_offset	(REG_OFFSET+16)
+#  define arg1_offset	(REG_OFFSET+24)
+#  define restore_arg0(tcp, state, val) 0
+# elif defined CRISV10 || defined CRISV32
+#  define arg0_offset	(4*PT_R11)
+#  define arg1_offset	(4*PT_ORIG_R10)
+#  define restore_arg0(tcp, state, val) 0
+#  define restore_arg1(tcp, state, val) 0
+#  define arg0_index	1
+#  define arg1_index	0
+# else
+#  define arg0_offset	0
+#  define arg1_offset	4
+#  if defined ARM
+#   define restore_arg0(tcp, state, val) 0
+#  endif
+# endif
 
 typedef int arg_setup_state;
 
-#   define arg_setup(tcp, state) (0)
-#   define arg_finish_change(tcp, state)	0
-#   define get_arg0(tcp, cookie, valp) \
-    (upeek ((tcp), arg0_offset, (valp)))
-#   define get_arg1(tcp, cookie, valp) \
-    (upeek ((tcp), arg1_offset, (valp)))
+# define arg_setup(tcp, state)         (0)
+# define arg_finish_change(tcp, state) 0
+# define get_arg0(tcp, cookie, valp)   (upeek((tcp), arg0_offset, (valp)))
+# define get_arg1(tcp, cookie, valp)   (upeek((tcp), arg1_offset, (valp)))
 
 static int
-set_arg0 (struct tcb *tcp, void *cookie, long val)
+set_arg0(struct tcb *tcp, void *cookie, long val)
 {
-	return ptrace (PTRACE_POKEUSER, tcp->pid, (char*)arg0_offset, val);
+	return ptrace(PTRACE_POKEUSER, tcp->pid, (char*)arg0_offset, val);
 }
 
 static int
-set_arg1 (struct tcb *tcp, void *cookie, long val)
+set_arg1(struct tcb *tcp, void *cookie, long val)
 {
-	return ptrace (PTRACE_POKEUSER, tcp->pid, (char*)arg1_offset, val);
+	return ptrace(PTRACE_POKEUSER, tcp->pid, (char*)arg1_offset, val);
 }
 
-#  endif /* architectures */
+#endif /* architectures */
 
-#  ifndef restore_arg0
-#   define restore_arg0(tcp, state, val) set_arg0((tcp), (state), (val))
-#  endif
-#  ifndef restore_arg1
-#   define restore_arg1(tcp, state, val) set_arg1((tcp), (state), (val))
-#  endif
+#ifndef restore_arg0
+# define restore_arg0(tcp, state, val) set_arg0((tcp), (state), (val))
+#endif
+#ifndef restore_arg1
+# define restore_arg1(tcp, state, val) set_arg1((tcp), (state), (val))
+#endif
 
-#  ifndef arg0_index
-#   define arg0_index 0
-#   define arg1_index 1
-#  endif
+#ifndef arg0_index
+# define arg0_index 0
+# define arg1_index 1
+#endif
 
 int
 setbpt(struct tcb *tcp)
@@ -1500,279 +1478,59 @@
 			}
 	}
 
-	switch (known_scno(tcp)) {
-#  ifdef SYS_vfork
-	case SYS_vfork:
-#  endif
-#  ifdef SYS_fork
-	case SYS_fork:
-#  endif
-#  if defined SYS_fork || defined SYS_vfork
-		if (arg_setup (tcp, &state) < 0
-		    || get_arg0 (tcp, &state, &tcp->inst[0]) < 0
-		    || get_arg1 (tcp, &state, &tcp->inst[1]) < 0
+	if (sysent[tcp->scno].sys_func == sys_fork ||
+	    sysent[tcp->scno].sys_func == sys_vfork) {
+		if (arg_setup(tcp, &state) < 0
+		    || get_arg0(tcp, &state, &tcp->inst[0]) < 0
+		    || get_arg1(tcp, &state, &tcp->inst[1]) < 0
 		    || change_syscall(tcp, clone_scno[current_personality]) < 0
-		    || set_arg0 (tcp, &state, CLONE_PTRACE|SIGCHLD) < 0
-		    || set_arg1 (tcp, &state, 0) < 0
-		    || arg_finish_change (tcp, &state) < 0)
+		    || set_arg0(tcp, &state, CLONE_PTRACE|SIGCHLD) < 0
+		    || set_arg1(tcp, &state, 0) < 0
+		    || arg_finish_change(tcp, &state) < 0)
 			return -1;
 		tcp->u_arg[arg0_index] = CLONE_PTRACE|SIGCHLD;
 		tcp->u_arg[arg1_index] = 0;
 		tcp->flags |= TCB_BPTSET;
 		return 0;
-#  endif
+	}
 
-	case SYS_clone:
-#  ifdef SYS_clone2
-	case SYS_clone2:
-#  endif
+	if (sysent[tcp->scno].sys_func == sys_clone) {
 		/* ia64 calls directly `clone (CLONE_VFORK | CLONE_VM)'
-		   contrary to x86 SYS_vfork above.  Even on x86 we turn the
+		   contrary to x86 vfork above.  Even on x86 we turn the
 		   vfork semantics into plain fork - each application must not
 		   depend on the vfork specifics according to POSIX.  We would
 		   hang waiting for the parent resume otherwise.  We need to
 		   clear also CLONE_VM but only in the CLONE_VFORK case as
 		   otherwise we would break pthread_create.  */
 
-		if ((arg_setup (tcp, &state) < 0
-		    || set_arg0 (tcp, &state,
-				 (tcp->u_arg[arg0_index] | CLONE_PTRACE)
-				 & ~(tcp->u_arg[arg0_index] & CLONE_VFORK
-				     ? CLONE_VFORK | CLONE_VM : 0)) < 0
-		    || arg_finish_change (tcp, &state) < 0))
+		long new_arg0 = (tcp->u_arg[arg0_index] | CLONE_PTRACE);
+		if (new_arg0 & CLONE_VFORK)
+			new_arg0 &= ~(unsigned long)(CLONE_VFORK | CLONE_VM);
+		if (arg_setup(tcp, &state) < 0
+		 || set_arg0(tcp, &state, new_arg0) < 0
+		 || arg_finish_change(tcp, &state) < 0)
 			return -1;
 		tcp->flags |= TCB_BPTSET;
 		tcp->inst[0] = tcp->u_arg[arg0_index];
 		tcp->inst[1] = tcp->u_arg[arg1_index];
 		return 0;
-
-	default:
-		fprintf(stderr, "PANIC: setbpt for syscall %ld on %u???\n",
-			tcp->scno, tcp->pid);
-		break;
 	}
 
+	fprintf(stderr, "PANIC: setbpt for syscall %ld on %u???\n",
+		tcp->scno, tcp->pid);
 	return -1;
 }
 
 int
-clearbpt(tcp)
-struct tcb *tcp;
+clearbpt(struct tcb *tcp)
 {
 	arg_setup_state state;
-	if (arg_setup (tcp, &state) < 0
-	    || restore_arg0 (tcp, &state, tcp->inst[0]) < 0
-	    || restore_arg1 (tcp, &state, tcp->inst[1]) < 0
-	    || arg_finish_change (tcp, &state))
-		if (errno != ESRCH) return -1;
-	tcp->flags &= ~TCB_BPTSET;
-	return 0;
-}
-
-# else /* !defined LINUX */
-
-int
-setbpt(tcp)
-struct tcb *tcp;
-{
-#  ifdef SUNOS4
-#   ifdef SPARC	/* This code is slightly sparc specific */
-
-	struct regs regs;
-#    define BPT	0x91d02001	/* ta	1 */
-#    define LOOP	0x10800000	/* ba	0 */
-#    define LOOPA	0x30800000	/* ba,a	0 */
-#    define NOP	0x01000000
-#    if LOOPA
-	static int loopdeloop[1] = {LOOPA};
-#    else
-	static int loopdeloop[2] = {LOOP, NOP};
-#    endif
-
-	if (tcp->flags & TCB_BPTSET) {
-		fprintf(stderr, "PANIC: TCB already set in pid %u\n", tcp->pid);
-		return -1;
-	}
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
-		perror("setbpt: ptrace(PTRACE_GETREGS, ...)");
-		return -1;
-	}
-	tcp->baddr = regs.r_o7 + 8;
-	if (ptrace(PTRACE_READTEXT, tcp->pid, (char *)tcp->baddr,
-				sizeof tcp->inst, (char *)tcp->inst) < 0) {
-		perror("setbpt: ptrace(PTRACE_READTEXT, ...)");
-		return -1;
-	}
-
-	/*
-	 * XXX - BRUTAL MODE ON
-	 * We cannot set a real BPT in the child, since it will not be
-	 * traced at the moment it will reach the trap and would probably
-	 * die with a core dump.
-	 * Thus, we are force our way in by taking out two instructions
-	 * and insert an eternal loop in stead, in expectance of the SIGSTOP
-	 * generated by out PTRACE_ATTACH.
-	 * Of cause, if we evaporate ourselves in the middle of all this...
-	 */
-	if (ptrace(PTRACE_WRITETEXT, tcp->pid, (char *) tcp->baddr,
-			sizeof loopdeloop, (char *) loopdeloop) < 0) {
-		perror("setbpt: ptrace(PTRACE_WRITETEXT, ...)");
-		return -1;
-	}
-	tcp->flags |= TCB_BPTSET;
-
-#   endif /* SPARC */
-#  endif /* SUNOS4 */
-
-	return 0;
-}
-
-int
-clearbpt(tcp)
-struct tcb *tcp;
-{
-#  ifdef SUNOS4
-#   ifdef SPARC
-
-#    if !LOOPA
-	struct regs regs;
-#    endif
-
-	if (!(tcp->flags & TCB_BPTSET)) {
-		fprintf(stderr, "PANIC: TCB not set in pid %u\n", tcp->pid);
-		return -1;
-	}
-	if (ptrace(PTRACE_WRITETEXT, tcp->pid, (char *) tcp->baddr,
-				sizeof tcp->inst, (char *) tcp->inst) < 0) {
-		perror("clearbtp: ptrace(PTRACE_WRITETEXT, ...)");
-		return -1;
-	}
-	tcp->flags &= ~TCB_BPTSET;
-
-#    if !LOOPA
-	/*
-	 * Since we don't have a single instruction breakpoint, we may have
-	 * to adjust the program counter after removing our `breakpoint'.
-	 */
-	if (ptrace(PTRACE_GETREGS, tcp->pid, (char *)&regs, 0) < 0) {
-		perror("clearbpt: ptrace(PTRACE_GETREGS, ...)");
-		return -1;
-	}
-	if ((regs.r_pc < tcp->baddr) ||
-				(regs.r_pc > tcp->baddr + 4)) {
-		/* The breakpoint has not been reached yet */
-		if (debug)
-			fprintf(stderr,
-				"NOTE: PC not at bpt (pc %#x baddr %#x)\n",
-					regs.r_pc, tcp->baddr);
-		return 0;
-	}
-	if (regs.r_pc != tcp->baddr)
-		if (debug)
-			fprintf(stderr, "NOTE: PC adjusted (%#x -> %#x\n",
-				regs.r_pc, tcp->baddr);
-
-	regs.r_pc = tcp->baddr;
-	if (ptrace(PTRACE_SETREGS, tcp->pid, (char *)&regs, 0) < 0) {
-		perror("clearbpt: ptrace(PTRACE_SETREGS, ...)");
-		return -1;
-	}
-#    endif /* LOOPA */
-#   endif /* SPARC */
-#  endif /* SUNOS4 */
-
-	return 0;
-}
-
-# endif /* !defined LINUX */
-
-#endif /* !USE_PROCFS */
-
-
-#ifdef SUNOS4
-
-static int
-getex(tcp, hdr)
-struct tcb *tcp;
-struct exec *hdr;
-{
-	int n;
-
-	for (n = 0; n < sizeof *hdr; n += 4) {
-		long res;
-		if (upeek(tcp, uoff(u_exdata) + n, &res) < 0)
+	if (arg_setup(tcp, &state) < 0
+	    || restore_arg0(tcp, &state, tcp->inst[0]) < 0
+	    || restore_arg1(tcp, &state, tcp->inst[1]) < 0
+	    || arg_finish_change(tcp, &state))
+		if (errno != ESRCH)
 			return -1;
-		memcpy(((char *) hdr) + n, &res, 4);
-	}
-	if (debug) {
-		fprintf(stderr, "[struct exec: magic: %o version %u Mach %o\n",
-			hdr->a_magic, hdr->a_toolversion, hdr->a_machtype);
-		fprintf(stderr, "Text %lu Data %lu Bss %lu Syms %lu Entry %#lx]\n",
-			hdr->a_text, hdr->a_data, hdr->a_bss, hdr->a_syms, hdr->a_entry);
-	}
+	tcp->flags &= ~TCB_BPTSET;
 	return 0;
 }
-
-int
-fixvfork(tcp)
-struct tcb *tcp;
-{
-	int pid = tcp->pid;
-	/*
-	 * Change `vfork' in a freshly exec'ed dynamically linked
-	 * executable's (internal) symbol table to plain old `fork'
-	 */
-
-	struct exec hdr;
-	struct link_dynamic dyn;
-	struct link_dynamic_2 ld;
-	char *strtab, *cp;
-
-	if (getex(tcp, &hdr) < 0)
-		return -1;
-	if (!hdr.a_dynamic)
-		return -1;
-
-	if (umove(tcp, (int) N_DATADDR(hdr), &dyn) < 0) {
-		fprintf(stderr, "Cannot read DYNAMIC\n");
-		return -1;
-	}
-	if (umove(tcp, (int) dyn.ld_un.ld_2, &ld) < 0) {
-		fprintf(stderr, "Cannot read link_dynamic_2\n");
-		return -1;
-	}
-	if ((strtab = malloc((unsigned)ld.ld_symb_size)) == NULL) {
-		fprintf(stderr, "out of memory\n");
-		return -1;
-	}
-	if (umoven(tcp, (int)ld.ld_symbols+(int)N_TXTADDR(hdr),
-					(int)ld.ld_symb_size, strtab) < 0)
-		goto err;
-
-	for (cp = strtab; cp < strtab + ld.ld_symb_size; ) {
-		if (strcmp(cp, "_vfork") == 0) {
-			if (debug)
-				fprintf(stderr, "fixvfork: FOUND _vfork\n");
-			strcpy(cp, "_fork");
-			break;
-		}
-		cp += strlen(cp)+1;
-	}
-	if (cp < strtab + ld.ld_symb_size)
-		/*
-		 * Write entire symbol table back to avoid
-		 * memory alignment bugs in ptrace
-		 */
-		if (tload(pid, (int)ld.ld_symbols+(int)N_TXTADDR(hdr),
-					(int)ld.ld_symb_size, strtab) < 0)
-			goto err;
-
-	free(strtab);
-	return 0;
-
-err:
-	free(strtab);
-	return -1;
-}
-
-#endif /* SUNOS4 */
diff --git a/vsprintf.c b/vsprintf.c
new file mode 100644
index 0000000..b66609a
--- /dev/null
+++ b/vsprintf.c
@@ -0,0 +1,784 @@
+/*
+ * Taken from Linux kernel's linux/lib/vsprintf.c
+ * and somewhat simplified.
+ *
+ * Copyright (C) 1991, 1992  Linus Torvalds
+ */
+/* vsprintf.c -- Lars Wirzenius & Linus Torvalds. */
+/*
+ * Wirzenius wrote this portably, Torvalds fucked it up :-)
+ */
+
+#include "defs.h"
+
+#ifdef USE_CUSTOM_PRINTF
+
+#include <stdarg.h>
+#include <limits.h>
+
+#define noinline_for_stack /*nothing*/
+#define likely(expr)       (expr)
+#define unlikely(expr)     (expr)
+
+#define do_div(n, d)       ({ __typeof(num) t = n % d; n /= d; t; })
+
+#undef isdigit
+#define isdigit(a) ((unsigned char)((a) - '0') <= 9)
+
+static inline
+int skip_atoi(const char **s)
+{
+	int i = 0;
+	const char *p = *s;
+
+	while (isdigit(*p))
+		i = i*10 + *p++ - '0';
+
+	*s = p;
+	return i;
+}
+
+/* Decimal conversion is by far the most typical, and is used
+ * for /proc and /sys data. This directly impacts e.g. top performance
+ * with many processes running. We optimize it for speed
+ * using ideas described at <http://www.cs.uiowa.edu/~jones/bcd/divide.html>
+ * (with permission from the author, Douglas W. Jones).
+ */
+
+#if LONG_MAX != 0x7fffffffUL || LLONG_MAX != 0x7fffffffffffffffULL
+/* Formats correctly any integer in [0, 999999999] */
+static noinline_for_stack
+char *put_dec_full9(char *buf, unsigned q)
+{
+	unsigned r;
+
+	/* Possible ways to approx. divide by 10
+	 * (x * 0x1999999a) >> 32 x < 1073741829 (multiply must be 64-bit)
+	 * (x * 0xcccd) >> 19     x <      81920 (x < 262149 when 64-bit mul)
+	 * (x * 0x6667) >> 18     x <      43699
+	 * (x * 0x3334) >> 17     x <      16389
+	 * (x * 0x199a) >> 16     x <      16389
+	 * (x * 0x0ccd) >> 15     x <      16389
+	 * (x * 0x0667) >> 14     x <       2739
+	 * (x * 0x0334) >> 13     x <       1029
+	 * (x * 0x019a) >> 12     x <       1029
+	 * (x * 0x00cd) >> 11     x <       1029 shorter code than * 0x67 (on i386)
+	 * (x * 0x0067) >> 10     x <        179
+	 * (x * 0x0034) >>  9     x <         69 same
+	 * (x * 0x001a) >>  8     x <         69 same
+	 * (x * 0x000d) >>  7     x <         69 same, shortest code (on i386)
+	 * (x * 0x0007) >>  6     x <         19
+	 * See <http://www.cs.uiowa.edu/~jones/bcd/divide.html>
+	 */
+	r      = (q * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (q - 10 * r) + '0'; /* 1 */
+	q      = (r * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (r - 10 * q) + '0'; /* 2 */
+	r      = (q * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (q - 10 * r) + '0'; /* 3 */
+	q      = (r * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (r - 10 * q) + '0'; /* 4 */
+	r      = (q * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (q - 10 * r) + '0'; /* 5 */
+	/* Now value is under 10000, can avoid 64-bit multiply */
+	q      = (r * 0x199a) >> 16;
+	*buf++ = (r - 10 * q)  + '0'; /* 6 */
+	r      = (q * 0xcd) >> 11;
+	*buf++ = (q - 10 * r)  + '0'; /* 7 */
+	q      = (r * 0xcd) >> 11;
+	*buf++ = (r - 10 * q) + '0'; /* 8 */
+	*buf++ = q + '0'; /* 9 */
+	return buf;
+}
+#endif
+
+/* Similar to above but do not pad with zeros.
+ * Code can be easily arranged to print 9 digits too, but our callers
+ * always call put_dec_full9() instead when the number has 9 decimal digits.
+ */
+static noinline_for_stack
+char *put_dec_trunc8(char *buf, unsigned r)
+{
+	unsigned q;
+
+	/* Copy of previous function's body with added early returns */
+	q      = (r * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (r - 10 * q) + '0'; /* 2 */
+	if (q == 0) return buf;
+	r      = (q * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (q - 10 * r) + '0'; /* 3 */
+	if (r == 0) return buf;
+	q      = (r * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (r - 10 * q) + '0'; /* 4 */
+	if (q == 0) return buf;
+	r      = (q * (uint64_t)0x1999999a) >> 32;
+	*buf++ = (q - 10 * r) + '0'; /* 5 */
+	if (r == 0) return buf;
+	q      = (r * 0x199a) >> 16;
+	*buf++ = (r - 10 * q)  + '0'; /* 6 */
+	if (q == 0) return buf;
+	r      = (q * 0xcd) >> 11;
+	*buf++ = (q - 10 * r)  + '0'; /* 7 */
+	if (r == 0) return buf;
+	q      = (r * 0xcd) >> 11;
+	*buf++ = (r - 10 * q) + '0'; /* 8 */
+	if (q == 0) return buf;
+	*buf++ = q + '0'; /* 9 */
+	return buf;
+}
+
+/* There are two algorithms to print larger numbers.
+ * One is generic: divide by 1000000000 and repeatedly print
+ * groups of (up to) 9 digits. It's conceptually simple,
+ * but requires a (unsigned long long) / 1000000000 division.
+ *
+ * Second algorithm splits 64-bit unsigned long long into 16-bit chunks,
+ * manipulates them cleverly and generates groups of 4 decimal digits.
+ * It so happens that it does NOT require long long division.
+ *
+ * If long is > 32 bits, division of 64-bit values is relatively easy,
+ * and we will use the first algorithm.
+ * If long long is > 64 bits (strange architecture with VERY large long long),
+ * second algorithm can't be used, and we again use the first one.
+ *
+ * Else (if long is 32 bits and long long is 64 bits) we use second one.
+ */
+
+#if LONG_MAX != 0x7fffffffUL || LLONG_MAX != 0x7fffffffffffffffULL
+
+/* First algorithm: generic */
+
+static
+char *put_dec(char *buf, unsigned long long n)
+{
+	if (n >= 100*1000*1000) {
+		while (n >= 1000*1000*1000)
+			buf = put_dec_full9(buf, do_div(n, 1000*1000*1000));
+		if (n >= 100*1000*1000)
+			return put_dec_full9(buf, n);
+	}
+	return put_dec_trunc8(buf, n);
+}
+
+#else
+
+/* Second algorithm: valid only for 64-bit long longs */
+
+static noinline_for_stack
+char *put_dec_full4(char *buf, unsigned q)
+{
+	unsigned r;
+	r      = (q * 0xcccd) >> 19;
+	*buf++ = (q - 10 * r) + '0';
+	q      = (r * 0x199a) >> 16;
+	*buf++ = (r - 10 * q)  + '0';
+	r      = (q * 0xcd) >> 11;
+	*buf++ = (q - 10 * r)  + '0';
+	*buf++ = r + '0';
+	return buf;
+}
+
+/* Based on code by Douglas W. Jones found at
+ * <http://www.cs.uiowa.edu/~jones/bcd/decimal.html#sixtyfour>
+ * (with permission from the author).
+ * Performs no 64-bit division and hence should be fast on 32-bit machines.
+ */
+static
+char *put_dec(char *buf, unsigned long long n)
+{
+	uint32_t d3, d2, d1, q, h;
+
+	if (n < 100*1000*1000)
+		return put_dec_trunc8(buf, n);
+
+	d1  = ((uint32_t)n >> 16); /* implicit "& 0xffff" */
+	h   = (n >> 32);
+	d2  = (h      ) & 0xffff;
+	d3  = (h >> 16); /* implicit "& 0xffff" */
+
+	q   = 656 * d3 + 7296 * d2 + 5536 * d1 + ((uint32_t)n & 0xffff);
+
+	buf = put_dec_full4(buf, q % 10000);
+	q   = q / 10000;
+
+	d1  = q + 7671 * d3 + 9496 * d2 + 6 * d1;
+	buf = put_dec_full4(buf, d1 % 10000);
+	q   = d1 / 10000;
+
+	d2  = q + 4749 * d3 + 42 * d2;
+	buf = put_dec_full4(buf, d2 % 10000);
+	q   = d2 / 10000;
+
+	d3  = q + 281 * d3;
+	if (!d3)
+		goto done;
+	buf = put_dec_full4(buf, d3 % 10000);
+	q   = d3 / 10000;
+	if (!q)
+		goto done;
+	buf = put_dec_full4(buf, q);
+ done:
+	while (buf[-1] == '0')
+		--buf;
+
+	return buf;
+}
+
+#endif
+
+/*
+ * For strace, the following formats are not supported:
+ * %h[h]u, %zu, %tu  - use [unsigned] int/long/long long fmt instead
+ * %8.4u  - no precision field for integers allowed (ok for strings)
+ * %+d, % d  - no forced sign or force "space positive" sign
+ * %-07u  - use %-7u instead
+ * %X  - works as %x
+ */
+
+#define ZEROPAD	1		/* pad with zero */
+#define SIGN	2		/* unsigned/signed long */
+//#define PLUS	4		/* show plus */
+//#define SPACE	8		/* space if plus */
+#define LEFT	16		/* left justified */
+//#deefine SMALL	32		/* use lowercase in hex (must be 32 == 0x20) */
+#define SPECIAL	64		/* prefix hex with "0x", octal with "0" */
+
+enum format_type {
+	FORMAT_TYPE_NONE, /* Just a string part */
+	FORMAT_TYPE_WIDTH,
+	FORMAT_TYPE_PRECISION,
+	FORMAT_TYPE_CHAR,
+	FORMAT_TYPE_STR,
+	FORMAT_TYPE_PTR,
+	FORMAT_TYPE_PERCENT_CHAR,
+	FORMAT_TYPE_INVALID,
+	FORMAT_TYPE_LONG_LONG,
+	FORMAT_TYPE_ULONG,
+	FORMAT_TYPE_LONG,
+	FORMAT_TYPE_UINT,
+	FORMAT_TYPE_INT,
+};
+
+struct printf_spec {
+	uint8_t	type;		/* format_type enum */
+	uint8_t	flags;		/* flags to number() */
+	uint8_t	base;		/* number base, 8, 10 or 16 only */
+	uint8_t	qualifier;	/* number qualifier, one of 'hHlLtzZ' */
+	int	field_width;	/* width of output field */
+	int	precision;	/* # of digits/chars */
+};
+
+static noinline_for_stack
+char *number(char *buf, char *end, unsigned long long num,
+	     struct printf_spec spec)
+{
+	/* we are called with base 8, 10 or 16, only, thus don't need "G..."  */
+	static const char digits[16] = "0123456789abcdef"; /* "GHIJKLMNOPQRSTUVWXYZ"; */
+
+	char tmp[sizeof(long long)*3 + 4];
+	char sign;
+	int need_pfx = ((spec.flags & SPECIAL) && spec.base != 10);
+	int i;
+
+	/* We may overflow the buf. Crudely check for it */
+	i = sizeof(long long)*3 + 4;
+	if (i < spec.field_width)
+		i = spec.field_width;
+	if ((end - buf) <= i)
+		return buf + i;
+
+//we don't use formats like "%-07u"
+//	if (spec.flags & LEFT)
+//		spec.flags &= ~ZEROPAD;
+	sign = 0;
+	if (spec.flags & SIGN) {
+		if ((signed long long)num < 0) {
+			sign = '-';
+			num = -(signed long long)num;
+			spec.field_width--;
+//		} else if (spec.flags & PLUS) {
+//			sign = '+';
+//			spec.field_width--;
+//		} else if (spec.flags & SPACE) {
+//			sign = ' ';
+//			spec.field_width--;
+		}
+	}
+	if (need_pfx) {
+		spec.field_width--;
+		if (spec.base == 16)
+			spec.field_width--;
+	}
+
+	/* generate full string in tmp[], in reverse order */
+	i = 0;
+	if (num < spec.base)
+		tmp[i++] = digits[num];
+	/* Generic code, for any base:
+	else do {
+		tmp[i++] = (digits[do_div(num,base)]);
+	} while (num != 0);
+	*/
+	else if (spec.base != 10) { /* 8 or 16 */
+		int mask = spec.base - 1;
+		int shift = 3;
+
+		if (spec.base == 16)
+			shift = 4;
+		do {
+			tmp[i++] = digits[((unsigned char)num) & mask];
+			num >>= shift;
+		} while (num);
+	} else { /* base 10 */
+		i = put_dec(tmp, num) - tmp;
+	}
+
+//spec.precision is assumed 0 ("not specified")
+//	/* printing 100 using %2d gives "100", not "00" */
+//	if (i > spec.precision)
+//		spec.precision = i;
+//	/* leading space padding */
+//	spec.field_width -= spec.precision;
+	spec.field_width -= i;
+	if (!(spec.flags & (ZEROPAD+LEFT))) {
+		while (--spec.field_width >= 0) {
+			///if (buf < end)
+				*buf = ' ';
+			++buf;
+		}
+	}
+	/* sign */
+	if (sign) {
+		///if (buf < end)
+			*buf = sign;
+		++buf;
+	}
+	/* "0x" / "0" prefix */
+	if (need_pfx) {
+		///if (buf < end)
+			*buf = '0';
+		++buf;
+		if (spec.base == 16) {
+			///if (buf < end)
+				*buf = 'x';
+			++buf;
+		}
+	}
+	/* zero or space padding */
+	if (!(spec.flags & LEFT)) {
+		char c = (spec.flags & ZEROPAD) ? '0' : ' ';
+		while (--spec.field_width >= 0) {
+			///if (buf < end)
+				*buf = c;
+			++buf;
+		}
+	}
+//	/* hmm even more zero padding? */
+//	while (i <= --spec.precision) {
+//		///if (buf < end)
+//			*buf = '0';
+//		++buf;
+//	}
+	/* actual digits of result */
+	while (--i >= 0) {
+		///if (buf < end)
+			*buf = tmp[i];
+		++buf;
+	}
+	/* trailing space padding */
+	while (--spec.field_width >= 0) {
+		///if (buf < end)
+			*buf = ' ';
+		++buf;
+	}
+
+	return buf;
+}
+
+static noinline_for_stack
+char *string(char *buf, char *end, const char *s, struct printf_spec spec)
+{
+	int len, i;
+
+	if (!s)
+		s = "(null)";
+
+	len = strnlen(s, spec.precision);
+
+	/* We may overflow the buf. Crudely check for it */
+	i = len;
+	if (i < spec.field_width)
+		i = spec.field_width;
+	if ((end - buf) <= i)
+		return buf + i;
+
+	if (!(spec.flags & LEFT)) {
+		while (len < spec.field_width--) {
+			///if (buf < end)
+				*buf = ' ';
+			++buf;
+		}
+	}
+	for (i = 0; i < len; ++i) {
+		///if (buf < end)
+			*buf = *s;
+		++buf; ++s;
+	}
+	while (len < spec.field_width--) {
+		///if (buf < end)
+			*buf = ' ';
+		++buf;
+	}
+
+	return buf;
+}
+
+static noinline_for_stack
+char *pointer(const char *fmt, char *buf, char *end, void *ptr,
+	      struct printf_spec spec)
+{
+//	spec.flags |= SMALL;
+	if (spec.field_width == -1) {
+		spec.field_width = 2 * sizeof(void *);
+		spec.flags |= ZEROPAD;
+	}
+	spec.base = 16;
+
+	return number(buf, end, (unsigned long) ptr, spec);
+}
+
+/*
+ * Helper function to decode printf style format.
+ * Each call decode a token from the format and return the
+ * number of characters read (or likely the delta where it wants
+ * to go on the next call).
+ * The decoded token is returned through the parameters
+ *
+ * 'h', 'l', or 'L' for integer fields
+ * 'z' support added 23/7/1999 S.H.
+ * 'z' changed to 'Z' --davidm 1/25/99
+ * 't' added for ptrdiff_t
+ *
+ * @fmt: the format string
+ * @type of the token returned
+ * @flags: various flags such as +, -, # tokens..
+ * @field_width: overwritten width
+ * @base: base of the number (octal, hex, ...)
+ * @precision: precision of a number
+ * @qualifier: qualifier of a number (long, size_t, ...)
+ */
+static noinline_for_stack
+int format_decode(const char *fmt, struct printf_spec *spec)
+{
+	const char *start = fmt;
+
+	/* we finished early by reading the field width */
+	if (spec->type == FORMAT_TYPE_WIDTH) {
+		if (spec->field_width < 0) {
+			spec->field_width = -spec->field_width;
+			spec->flags |= LEFT;
+		}
+		spec->type = FORMAT_TYPE_NONE;
+		goto precision;
+	}
+
+	/* we finished early by reading the precision */
+	if (spec->type == FORMAT_TYPE_PRECISION) {
+		if (spec->precision < 0)
+			spec->precision = 0;
+
+		spec->type = FORMAT_TYPE_NONE;
+		goto qualifier;
+	}
+
+	/* By default */
+	spec->type = FORMAT_TYPE_NONE;
+
+	for (;;) {
+		if (*fmt == '\0')
+			return fmt - start;
+		if (*fmt == '%')
+			break;
+		++fmt;
+	}
+
+	/* Return the current non-format string */
+	if (fmt != start)
+		return fmt - start;
+
+	/* Process flags */
+	spec->flags = 0;
+
+	while (1) { /* this also skips first '%' */
+		bool found = true;
+
+		++fmt;
+
+		switch (*fmt) {
+		case '-': spec->flags |= LEFT;    break;
+//		case '+': spec->flags |= PLUS;    break;
+//		case ' ': spec->flags |= SPACE;   break;
+		case '#': spec->flags |= SPECIAL; break;
+		case '0': spec->flags |= ZEROPAD; break;
+		default:  found = false;
+		}
+
+		if (!found)
+			break;
+	}
+
+	/* get field width */
+	spec->field_width = -1;
+
+	if (isdigit(*fmt))
+		spec->field_width = skip_atoi(&fmt);
+	else if (*fmt == '*') {
+		/* it's the next argument */
+		spec->type = FORMAT_TYPE_WIDTH;
+		return ++fmt - start;
+	}
+
+precision:
+	/* get the precision */
+	spec->precision = -1;
+	if (*fmt == '.') {
+		++fmt;
+		if (isdigit(*fmt)) {
+			spec->precision = skip_atoi(&fmt);
+//			if (spec->precision < 0)
+//				spec->precision = 0;
+		} else if (*fmt == '*') {
+			/* it's the next argument */
+			spec->type = FORMAT_TYPE_PRECISION;
+			return ++fmt - start;
+		}
+	}
+
+qualifier:
+	/* get the conversion qualifier */
+	spec->qualifier = -1;
+	if (*fmt == 'l') {
+		spec->qualifier = *fmt++;
+		if (unlikely(spec->qualifier == *fmt)) {
+			spec->qualifier = 'L';
+			++fmt;
+		}
+	}
+
+	/* default base */
+	spec->base = 10;
+	switch (*fmt) {
+	case 'c':
+		spec->type = FORMAT_TYPE_CHAR;
+		return ++fmt - start;
+
+	case 's':
+		spec->type = FORMAT_TYPE_STR;
+		return ++fmt - start;
+
+	case 'p':
+		spec->type = FORMAT_TYPE_PTR;
+		return ++fmt - start;
+
+	case '%':
+		spec->type = FORMAT_TYPE_PERCENT_CHAR;
+		return ++fmt - start;
+
+	/* integer number formats - set up the flags and "break" */
+	case 'o':
+		spec->base = 8;
+		break;
+
+	case 'x':
+//		spec->flags |= SMALL;
+
+	case 'X':
+		spec->base = 16;
+		break;
+
+	case 'd':
+	case 'i':
+		spec->flags |= SIGN;
+	case 'u':
+		break;
+
+	default:
+		spec->type = FORMAT_TYPE_INVALID;
+		return fmt - start;
+	}
+
+	if (spec->qualifier == 'L')
+		spec->type = FORMAT_TYPE_LONG_LONG;
+	else if (spec->qualifier == 'l') {
+		if (spec->flags & SIGN)
+			spec->type = FORMAT_TYPE_LONG;
+		else
+			spec->type = FORMAT_TYPE_ULONG;
+	} else {
+		if (spec->flags & SIGN)
+			spec->type = FORMAT_TYPE_INT;
+		else
+			spec->type = FORMAT_TYPE_UINT;
+	}
+
+	return ++fmt - start;
+}
+
+/**
+ * vsnprintf - Format a string and place it in a buffer
+ * @buf: The buffer to place the result into
+ * @size: The size of the buffer, including the trailing null space
+ * @fmt: The format string to use
+ * @args: Arguments for the format string
+ *
+ * The return value is the number of characters which would
+ * be generated for the given input, excluding the trailing
+ * '\0', as per ISO C99. If you want to have the exact
+ * number of characters written into @buf as return value
+ * (not including the trailing '\0'), use vscnprintf(). If the
+ * return is greater than or equal to @size, the resulting
+ * string is truncated.
+ *
+ * If you're not already dealing with a va_list consider using snprintf().
+ */
+static
+int kernel_vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
+{
+	unsigned long long num;
+	char *str, *end;
+	struct printf_spec spec = {0};
+
+	str = buf;
+	end = buf + size;
+
+	while (*fmt) {
+		const char *old_fmt = fmt;
+		int read = format_decode(fmt, &spec);
+
+		fmt += read;
+
+		switch (spec.type) {
+		case FORMAT_TYPE_NONE: {
+			int copy = read;
+			if (str < end) {
+				if (copy > end - str)
+					copy = end - str;
+				memcpy(str, old_fmt, copy);
+			}
+			str += read;
+			break;
+		}
+
+		case FORMAT_TYPE_WIDTH:
+			spec.field_width = va_arg(args, int);
+			break;
+
+		case FORMAT_TYPE_PRECISION:
+			spec.precision = va_arg(args, int);
+			break;
+
+		case FORMAT_TYPE_CHAR: {
+			char c;
+
+			if (!(spec.flags & LEFT)) {
+				while (--spec.field_width > 0) {
+					if (str < end)
+						*str = ' ';
+					++str;
+
+				}
+			}
+			c = (unsigned char) va_arg(args, int);
+			if (str < end)
+				*str = c;
+			++str;
+			while (--spec.field_width > 0) {
+				if (str < end)
+					*str = ' ';
+				++str;
+			}
+			break;
+		}
+
+		case FORMAT_TYPE_STR:
+			str = string(str, end, va_arg(args, char *), spec);
+			break;
+
+		case FORMAT_TYPE_PTR:
+			str = pointer(fmt+1, str, end, va_arg(args, void *),
+				      spec);
+//			while (isalnum(*fmt))
+//				fmt++;
+			break;
+
+		case FORMAT_TYPE_PERCENT_CHAR:
+			if (str < end)
+				*str = '%';
+			++str;
+			break;
+
+		case FORMAT_TYPE_INVALID:
+			if (str < end)
+				*str = '%';
+			++str;
+			break;
+
+		default:
+			switch (spec.type) {
+			case FORMAT_TYPE_LONG_LONG:
+				num = va_arg(args, long long);
+				break;
+			case FORMAT_TYPE_ULONG:
+				num = va_arg(args, unsigned long);
+				break;
+			case FORMAT_TYPE_LONG:
+				num = va_arg(args, long);
+				break;
+			case FORMAT_TYPE_INT:
+				num = (int) va_arg(args, int);
+				break;
+			default:
+				num = va_arg(args, unsigned int);
+			}
+
+			str = number(str, end, num, spec);
+		}
+	}
+
+//	if (size > 0) {
+		if (str < end)
+			*str = '\0';
+//		else
+//			end[-1] = '\0';
+//	}
+
+	/* the trailing null byte doesn't count towards the total */
+	return str-buf;
+
+}
+
+int strace_vfprintf(FILE *fp, const char *fmt, va_list args)
+{
+	static char *buf;
+	static unsigned buflen;
+
+	int r;
+	va_list a1;
+
+	va_copy(a1, args);
+	unsigned len = kernel_vsnprintf(buf, buflen, fmt, a1);
+	va_end(a1);
+
+	if (len >= buflen) {
+		buflen = len + 256;
+		free(buf);
+		buf = malloc(buflen);
+		/*len =*/ kernel_vsnprintf(buf, buflen, fmt, args);
+	}
+
+	r = fputs_unlocked(buf, fp);
+	if (r < 0) return r;
+	return len;
+}
+
+#endif /* USE_CUSTOM_PRINTF */