Home | History | Annotate | Line # | Download | only in rumpkern
rump_syscalls.c revision 1.81
      1  1.31     pooka /* $NetBSD: rump_syscalls.c,v 1.81 2012/08/03 11:32:56 pooka Exp $ */
      2   1.1     pooka 
      3   1.1     pooka /*
      4  1.29     pooka  * System call vector and marshalling for rump.
      5   1.1     pooka  *
      6   1.1     pooka  * DO NOT EDIT-- this file is automatically generated.
      7  1.79     pooka  * created from	NetBSD: syscalls.master,v 1.260 2012/06/22 18:26:35 christos Exp
      8   1.1     pooka  */
      9   1.1     pooka 
     10  1.81     pooka #include <sys/param.h>
     11  1.81     pooka 
     12  1.81     pooka #ifdef __NetBSD__
     13   1.1     pooka #include <sys/cdefs.h>
     14  1.31     pooka __KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.81 2012/08/03 11:32:56 pooka Exp $");
     15   1.1     pooka 
     16  1.53     pooka #include <sys/fstypes.h>
     17   1.1     pooka #include <sys/proc.h>
     18  1.81     pooka #endif /* __NetBSD__ */
     19  1.81     pooka 
     20  1.71     pooka #ifdef RUMP_CLIENT
     21  1.81     pooka #include <errno.h>
     22  1.81     pooka #include <stdint.h>
     23  1.81     pooka #include <stdlib.h>
     24  1.81     pooka 
     25  1.71     pooka #include <srcsys/syscall.h>
     26  1.71     pooka #include <srcsys/syscallargs.h>
     27  1.53     pooka 
     28  1.53     pooka #include <rump/rumpclient.h>
     29  1.53     pooka 
     30  1.53     pooka #define rsys_syscall(num, data, dlen, retval)	\
     31  1.53     pooka     rumpclient_syscall(num, data, dlen, retval)
     32  1.53     pooka #define rsys_seterrno(error) errno = error
     33  1.53     pooka #define rsys_alias(a,b)
     34  1.53     pooka #else
     35  1.71     pooka #include <sys/syscall.h>
     36  1.71     pooka #include <sys/syscallargs.h>
     37  1.71     pooka 
     38  1.55     pooka #include <sys/syscallvar.h>
     39  1.55     pooka 
     40  1.27     pooka #include <rump/rumpuser.h>
     41  1.15     pooka #include "rump_private.h"
     42   1.1     pooka 
     43  1.53     pooka static int
     44  1.53     pooka rsys_syscall(int num, void *data, size_t dlen, register_t *retval)
     45  1.53     pooka {
     46  1.55     pooka 	struct sysent *callp = rump_sysent + num;
     47  1.53     pooka 	int rv;
     48  1.53     pooka 
     49  1.55     pooka 	KASSERT(num > 0 && num < SYS_NSYSENT);
     50  1.55     pooka 
     51  1.53     pooka 	rump_schedule();
     52  1.55     pooka 	rv = sy_call(callp, curlwp, data, retval);
     53  1.53     pooka 	rump_unschedule();
     54  1.53     pooka 
     55  1.53     pooka 	return rv;
     56  1.53     pooka }
     57  1.53     pooka 
     58  1.53     pooka #define rsys_seterrno(error) rumpuser_seterrno(error)
     59  1.53     pooka #define rsys_alias(a,b) __weak_alias(a,b);
     60  1.53     pooka #endif
     61  1.53     pooka 
     62   1.1     pooka #if	BYTE_ORDER == BIG_ENDIAN
     63   1.1     pooka #define SPARG(p,k)	((p)->k.be.datum)
     64   1.1     pooka #else /* LITTLE_ENDIAN, I hope dearly */
     65   1.1     pooka #define SPARG(p,k)	((p)->k.le.datum)
     66   1.1     pooka #endif
     67   1.1     pooka 
     68  1.53     pooka #ifndef RUMP_CLIENT
     69  1.16     pooka int rump_enosys(void);
     70  1.16     pooka int
     71  1.31     pooka rump_enosys()
     72  1.16     pooka {
     73  1.16     pooka 
     74  1.16     pooka 	return ENOSYS;
     75  1.16     pooka }
     76  1.53     pooka #endif
     77  1.16     pooka 
     78  1.60     pooka ssize_t rump___sysimpl_read(int, void *, size_t);
     79   1.1     pooka ssize_t
     80  1.60     pooka rump___sysimpl_read(int fd, void * buf, size_t nbyte)
     81   1.1     pooka {
     82  1.68     pooka 	register_t retval[2] = {0, 0};
     83  1.27     pooka 	int error = 0;
     84  1.68     pooka 	ssize_t rv = -1;
     85  1.31     pooka 	struct sys_read_args callarg;
     86   1.1     pooka 
     87  1.31     pooka 	SPARG(&callarg, fd) = fd;
     88  1.31     pooka 	SPARG(&callarg, buf) = buf;
     89  1.31     pooka 	SPARG(&callarg, nbyte) = nbyte;
     90   1.1     pooka 
     91  1.68     pooka 	error = rsys_syscall(SYS_read, &callarg, sizeof(callarg), retval);
     92  1.63     pooka 	rsys_seterrno(error);
     93  1.68     pooka 	if (error == 0) {
     94  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
     95  1.68     pooka 			rv = *(ssize_t *)retval;
     96  1.68     pooka 		else
     97  1.69     pooka 			rv = *retval;
     98  1.27     pooka 	}
     99  1.68     pooka 	return rv;
    100   1.1     pooka }
    101  1.53     pooka rsys_alias(sys_read,rump_enosys)
    102   1.1     pooka 
    103  1.60     pooka ssize_t rump___sysimpl_write(int, const void *, size_t);
    104   1.1     pooka ssize_t
    105  1.60     pooka rump___sysimpl_write(int fd, const void * buf, size_t nbyte)
    106   1.1     pooka {
    107  1.68     pooka 	register_t retval[2] = {0, 0};
    108  1.27     pooka 	int error = 0;
    109  1.68     pooka 	ssize_t rv = -1;
    110  1.31     pooka 	struct sys_write_args callarg;
    111   1.1     pooka 
    112  1.31     pooka 	SPARG(&callarg, fd) = fd;
    113  1.31     pooka 	SPARG(&callarg, buf) = buf;
    114  1.31     pooka 	SPARG(&callarg, nbyte) = nbyte;
    115   1.1     pooka 
    116  1.68     pooka 	error = rsys_syscall(SYS_write, &callarg, sizeof(callarg), retval);
    117  1.63     pooka 	rsys_seterrno(error);
    118  1.68     pooka 	if (error == 0) {
    119  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    120  1.68     pooka 			rv = *(ssize_t *)retval;
    121  1.68     pooka 		else
    122  1.69     pooka 			rv = *retval;
    123  1.27     pooka 	}
    124  1.68     pooka 	return rv;
    125   1.1     pooka }
    126  1.53     pooka rsys_alias(sys_write,rump_enosys)
    127   1.1     pooka 
    128  1.60     pooka int rump___sysimpl_open(const char *, int, mode_t);
    129   1.1     pooka int
    130  1.60     pooka rump___sysimpl_open(const char * path, int flags, mode_t mode)
    131   1.1     pooka {
    132  1.68     pooka 	register_t retval[2] = {0, 0};
    133  1.27     pooka 	int error = 0;
    134  1.68     pooka 	int rv = -1;
    135  1.31     pooka 	struct sys_open_args callarg;
    136   1.1     pooka 
    137  1.31     pooka 	SPARG(&callarg, path) = path;
    138  1.31     pooka 	SPARG(&callarg, flags) = flags;
    139  1.31     pooka 	SPARG(&callarg, mode) = mode;
    140   1.1     pooka 
    141  1.68     pooka 	error = rsys_syscall(SYS_open, &callarg, sizeof(callarg), retval);
    142  1.63     pooka 	rsys_seterrno(error);
    143  1.68     pooka 	if (error == 0) {
    144  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    145  1.68     pooka 			rv = *(int *)retval;
    146  1.68     pooka 		else
    147  1.69     pooka 			rv = *retval;
    148  1.27     pooka 	}
    149  1.68     pooka 	return rv;
    150   1.1     pooka }
    151  1.53     pooka rsys_alias(sys_open,rump_enosys)
    152   1.1     pooka 
    153  1.60     pooka int rump___sysimpl_close(int);
    154   1.1     pooka int
    155  1.60     pooka rump___sysimpl_close(int fd)
    156   1.1     pooka {
    157  1.68     pooka 	register_t retval[2] = {0, 0};
    158  1.27     pooka 	int error = 0;
    159  1.68     pooka 	int rv = -1;
    160  1.31     pooka 	struct sys_close_args callarg;
    161   1.1     pooka 
    162  1.31     pooka 	SPARG(&callarg, fd) = fd;
    163   1.1     pooka 
    164  1.68     pooka 	error = rsys_syscall(SYS_close, &callarg, sizeof(callarg), retval);
    165  1.63     pooka 	rsys_seterrno(error);
    166  1.68     pooka 	if (error == 0) {
    167  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    168  1.68     pooka 			rv = *(int *)retval;
    169  1.68     pooka 		else
    170  1.69     pooka 			rv = *retval;
    171  1.27     pooka 	}
    172  1.68     pooka 	return rv;
    173   1.1     pooka }
    174  1.53     pooka rsys_alias(sys_close,rump_enosys)
    175   1.1     pooka 
    176  1.60     pooka int rump___sysimpl_link(const char *, const char *);
    177   1.1     pooka int
    178  1.60     pooka rump___sysimpl_link(const char * path, const char * link)
    179   1.1     pooka {
    180  1.68     pooka 	register_t retval[2] = {0, 0};
    181  1.27     pooka 	int error = 0;
    182  1.68     pooka 	int rv = -1;
    183  1.31     pooka 	struct sys_link_args callarg;
    184   1.1     pooka 
    185  1.31     pooka 	SPARG(&callarg, path) = path;
    186  1.31     pooka 	SPARG(&callarg, link) = link;
    187   1.1     pooka 
    188  1.68     pooka 	error = rsys_syscall(SYS_link, &callarg, sizeof(callarg), retval);
    189  1.63     pooka 	rsys_seterrno(error);
    190  1.68     pooka 	if (error == 0) {
    191  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    192  1.68     pooka 			rv = *(int *)retval;
    193  1.68     pooka 		else
    194  1.69     pooka 			rv = *retval;
    195  1.27     pooka 	}
    196  1.68     pooka 	return rv;
    197   1.1     pooka }
    198  1.53     pooka rsys_alias(sys_link,rump_enosys)
    199   1.1     pooka 
    200  1.60     pooka int rump___sysimpl_unlink(const char *);
    201   1.1     pooka int
    202  1.60     pooka rump___sysimpl_unlink(const char * path)
    203   1.1     pooka {
    204  1.68     pooka 	register_t retval[2] = {0, 0};
    205  1.27     pooka 	int error = 0;
    206  1.68     pooka 	int rv = -1;
    207  1.31     pooka 	struct sys_unlink_args callarg;
    208   1.1     pooka 
    209  1.31     pooka 	SPARG(&callarg, path) = path;
    210   1.1     pooka 
    211  1.68     pooka 	error = rsys_syscall(SYS_unlink, &callarg, sizeof(callarg), retval);
    212  1.63     pooka 	rsys_seterrno(error);
    213  1.68     pooka 	if (error == 0) {
    214  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    215  1.68     pooka 			rv = *(int *)retval;
    216  1.68     pooka 		else
    217  1.69     pooka 			rv = *retval;
    218  1.27     pooka 	}
    219  1.68     pooka 	return rv;
    220   1.1     pooka }
    221  1.53     pooka rsys_alias(sys_unlink,rump_enosys)
    222   1.1     pooka 
    223  1.60     pooka int rump___sysimpl_chdir(const char *);
    224   1.1     pooka int
    225  1.60     pooka rump___sysimpl_chdir(const char * path)
    226   1.1     pooka {
    227  1.68     pooka 	register_t retval[2] = {0, 0};
    228  1.27     pooka 	int error = 0;
    229  1.68     pooka 	int rv = -1;
    230  1.31     pooka 	struct sys_chdir_args callarg;
    231   1.1     pooka 
    232  1.31     pooka 	SPARG(&callarg, path) = path;
    233   1.1     pooka 
    234  1.68     pooka 	error = rsys_syscall(SYS_chdir, &callarg, sizeof(callarg), retval);
    235  1.63     pooka 	rsys_seterrno(error);
    236  1.68     pooka 	if (error == 0) {
    237  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    238  1.68     pooka 			rv = *(int *)retval;
    239  1.68     pooka 		else
    240  1.69     pooka 			rv = *retval;
    241  1.27     pooka 	}
    242  1.68     pooka 	return rv;
    243   1.1     pooka }
    244  1.53     pooka rsys_alias(sys_chdir,rump_enosys)
    245   1.1     pooka 
    246  1.60     pooka int rump___sysimpl_fchdir(int);
    247   1.1     pooka int
    248  1.60     pooka rump___sysimpl_fchdir(int fd)
    249   1.1     pooka {
    250  1.68     pooka 	register_t retval[2] = {0, 0};
    251  1.27     pooka 	int error = 0;
    252  1.68     pooka 	int rv = -1;
    253  1.31     pooka 	struct sys_fchdir_args callarg;
    254   1.1     pooka 
    255  1.31     pooka 	SPARG(&callarg, fd) = fd;
    256   1.1     pooka 
    257  1.68     pooka 	error = rsys_syscall(SYS_fchdir, &callarg, sizeof(callarg), retval);
    258  1.63     pooka 	rsys_seterrno(error);
    259  1.68     pooka 	if (error == 0) {
    260  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    261  1.68     pooka 			rv = *(int *)retval;
    262  1.68     pooka 		else
    263  1.69     pooka 			rv = *retval;
    264  1.27     pooka 	}
    265  1.68     pooka 	return rv;
    266   1.1     pooka }
    267  1.53     pooka rsys_alias(sys_fchdir,rump_enosys)
    268   1.1     pooka 
    269  1.61     pooka int rump___sysimpl_mknod(const char *, mode_t, uint32_t);
    270  1.61     pooka int
    271  1.61     pooka rump___sysimpl_mknod(const char * path, mode_t mode, uint32_t dev)
    272  1.61     pooka {
    273  1.68     pooka 	register_t retval[2] = {0, 0};
    274  1.61     pooka 	int error = 0;
    275  1.68     pooka 	int rv = -1;
    276  1.61     pooka 	struct compat_50_sys_mknod_args callarg;
    277  1.61     pooka 
    278  1.61     pooka 	SPARG(&callarg, path) = path;
    279  1.61     pooka 	SPARG(&callarg, mode) = mode;
    280  1.61     pooka 	SPARG(&callarg, dev) = dev;
    281  1.61     pooka 
    282  1.68     pooka 	error = rsys_syscall(SYS_compat_50_mknod, &callarg, sizeof(callarg), retval);
    283  1.63     pooka 	rsys_seterrno(error);
    284  1.68     pooka 	if (error == 0) {
    285  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    286  1.68     pooka 			rv = *(int *)retval;
    287  1.68     pooka 		else
    288  1.69     pooka 			rv = *retval;
    289  1.61     pooka 	}
    290  1.68     pooka 	return rv;
    291  1.61     pooka }
    292  1.61     pooka rsys_alias(compat_50_sys_mknod,rump_enosys)
    293  1.61     pooka 
    294  1.60     pooka int rump___sysimpl_chmod(const char *, mode_t);
    295   1.1     pooka int
    296  1.60     pooka rump___sysimpl_chmod(const char * path, mode_t mode)
    297   1.1     pooka {
    298  1.68     pooka 	register_t retval[2] = {0, 0};
    299  1.27     pooka 	int error = 0;
    300  1.68     pooka 	int rv = -1;
    301  1.31     pooka 	struct sys_chmod_args callarg;
    302   1.1     pooka 
    303  1.31     pooka 	SPARG(&callarg, path) = path;
    304  1.31     pooka 	SPARG(&callarg, mode) = mode;
    305   1.1     pooka 
    306  1.68     pooka 	error = rsys_syscall(SYS_chmod, &callarg, sizeof(callarg), retval);
    307  1.63     pooka 	rsys_seterrno(error);
    308  1.68     pooka 	if (error == 0) {
    309  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    310  1.68     pooka 			rv = *(int *)retval;
    311  1.68     pooka 		else
    312  1.69     pooka 			rv = *retval;
    313  1.27     pooka 	}
    314  1.68     pooka 	return rv;
    315   1.1     pooka }
    316  1.53     pooka rsys_alias(sys_chmod,rump_enosys)
    317   1.1     pooka 
    318  1.60     pooka int rump___sysimpl_chown(const char *, uid_t, gid_t);
    319   1.1     pooka int
    320  1.60     pooka rump___sysimpl_chown(const char * path, uid_t uid, gid_t gid)
    321   1.1     pooka {
    322  1.68     pooka 	register_t retval[2] = {0, 0};
    323  1.27     pooka 	int error = 0;
    324  1.68     pooka 	int rv = -1;
    325  1.31     pooka 	struct sys_chown_args callarg;
    326   1.1     pooka 
    327  1.31     pooka 	SPARG(&callarg, path) = path;
    328  1.31     pooka 	SPARG(&callarg, uid) = uid;
    329  1.31     pooka 	SPARG(&callarg, gid) = gid;
    330   1.1     pooka 
    331  1.68     pooka 	error = rsys_syscall(SYS_chown, &callarg, sizeof(callarg), retval);
    332  1.63     pooka 	rsys_seterrno(error);
    333  1.68     pooka 	if (error == 0) {
    334  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    335  1.68     pooka 			rv = *(int *)retval;
    336  1.68     pooka 		else
    337  1.69     pooka 			rv = *retval;
    338  1.27     pooka 	}
    339  1.68     pooka 	return rv;
    340   1.1     pooka }
    341  1.53     pooka rsys_alias(sys_chown,rump_enosys)
    342   1.1     pooka 
    343  1.60     pooka pid_t rump___sysimpl_getpid(void);
    344  1.49     pooka pid_t
    345  1.60     pooka rump___sysimpl_getpid(void )
    346  1.49     pooka {
    347  1.68     pooka 	register_t retval[2] = {0, 0};
    348  1.68     pooka 	pid_t rv = -1;
    349  1.49     pooka 
    350  1.68     pooka 	rsys_syscall(SYS_getpid, NULL, 0, retval);
    351  1.68     pooka 	if (sizeof(pid_t) > sizeof(register_t))
    352  1.68     pooka 		rv = *(pid_t *)retval;
    353  1.68     pooka 	else
    354  1.69     pooka 		rv = *retval;
    355  1.68     pooka 	return rv;
    356  1.49     pooka }
    357  1.53     pooka rsys_alias(sys_getpid_with_ppid,rump_enosys)
    358  1.49     pooka 
    359  1.60     pooka int rump___sysimpl_unmount(const char *, int);
    360   1.1     pooka int
    361  1.60     pooka rump___sysimpl_unmount(const char * path, int flags)
    362   1.1     pooka {
    363  1.68     pooka 	register_t retval[2] = {0, 0};
    364  1.27     pooka 	int error = 0;
    365  1.68     pooka 	int rv = -1;
    366  1.31     pooka 	struct sys_unmount_args callarg;
    367   1.1     pooka 
    368  1.31     pooka 	SPARG(&callarg, path) = path;
    369  1.31     pooka 	SPARG(&callarg, flags) = flags;
    370   1.1     pooka 
    371  1.68     pooka 	error = rsys_syscall(SYS_unmount, &callarg, sizeof(callarg), retval);
    372  1.63     pooka 	rsys_seterrno(error);
    373  1.68     pooka 	if (error == 0) {
    374  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    375  1.68     pooka 			rv = *(int *)retval;
    376  1.68     pooka 		else
    377  1.69     pooka 			rv = *retval;
    378  1.27     pooka 	}
    379  1.68     pooka 	return rv;
    380   1.1     pooka }
    381  1.53     pooka rsys_alias(sys_unmount,rump_enosys)
    382   1.1     pooka 
    383  1.60     pooka int rump___sysimpl_setuid(uid_t);
    384  1.49     pooka int
    385  1.60     pooka rump___sysimpl_setuid(uid_t uid)
    386  1.49     pooka {
    387  1.68     pooka 	register_t retval[2] = {0, 0};
    388  1.49     pooka 	int error = 0;
    389  1.68     pooka 	int rv = -1;
    390  1.49     pooka 	struct sys_setuid_args callarg;
    391  1.49     pooka 
    392  1.49     pooka 	SPARG(&callarg, uid) = uid;
    393  1.49     pooka 
    394  1.68     pooka 	error = rsys_syscall(SYS_setuid, &callarg, sizeof(callarg), retval);
    395  1.63     pooka 	rsys_seterrno(error);
    396  1.68     pooka 	if (error == 0) {
    397  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    398  1.68     pooka 			rv = *(int *)retval;
    399  1.68     pooka 		else
    400  1.69     pooka 			rv = *retval;
    401  1.49     pooka 	}
    402  1.68     pooka 	return rv;
    403  1.49     pooka }
    404  1.53     pooka rsys_alias(sys_setuid,rump_enosys)
    405  1.49     pooka 
    406  1.60     pooka uid_t rump___sysimpl_getuid(void);
    407  1.49     pooka uid_t
    408  1.60     pooka rump___sysimpl_getuid(void )
    409  1.49     pooka {
    410  1.68     pooka 	register_t retval[2] = {0, 0};
    411  1.68     pooka 	uid_t rv = -1;
    412  1.49     pooka 
    413  1.68     pooka 	rsys_syscall(SYS_getuid, NULL, 0, retval);
    414  1.68     pooka 	if (sizeof(uid_t) > sizeof(register_t))
    415  1.68     pooka 		rv = *(uid_t *)retval;
    416  1.68     pooka 	else
    417  1.69     pooka 		rv = *retval;
    418  1.68     pooka 	return rv;
    419  1.49     pooka }
    420  1.53     pooka rsys_alias(sys_getuid_with_euid,rump_enosys)
    421  1.49     pooka 
    422  1.60     pooka uid_t rump___sysimpl_geteuid(void);
    423  1.49     pooka uid_t
    424  1.60     pooka rump___sysimpl_geteuid(void )
    425  1.49     pooka {
    426  1.68     pooka 	register_t retval[2] = {0, 0};
    427  1.68     pooka 	uid_t rv = -1;
    428  1.49     pooka 
    429  1.68     pooka 	rsys_syscall(SYS_geteuid, NULL, 0, retval);
    430  1.68     pooka 	if (sizeof(uid_t) > sizeof(register_t))
    431  1.68     pooka 		rv = *(uid_t *)retval;
    432  1.68     pooka 	else
    433  1.69     pooka 		rv = *retval;
    434  1.68     pooka 	return rv;
    435  1.49     pooka }
    436  1.53     pooka rsys_alias(sys_geteuid,rump_enosys)
    437  1.49     pooka 
    438  1.60     pooka ssize_t rump___sysimpl_recvmsg(int, struct msghdr *, int);
    439  1.28     pooka ssize_t
    440  1.60     pooka rump___sysimpl_recvmsg(int s, struct msghdr * msg, int flags)
    441  1.28     pooka {
    442  1.68     pooka 	register_t retval[2] = {0, 0};
    443  1.28     pooka 	int error = 0;
    444  1.68     pooka 	ssize_t rv = -1;
    445  1.31     pooka 	struct sys_recvmsg_args callarg;
    446  1.28     pooka 
    447  1.31     pooka 	SPARG(&callarg, s) = s;
    448  1.31     pooka 	SPARG(&callarg, msg) = msg;
    449  1.31     pooka 	SPARG(&callarg, flags) = flags;
    450  1.28     pooka 
    451  1.68     pooka 	error = rsys_syscall(SYS_recvmsg, &callarg, sizeof(callarg), retval);
    452  1.63     pooka 	rsys_seterrno(error);
    453  1.68     pooka 	if (error == 0) {
    454  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    455  1.68     pooka 			rv = *(ssize_t *)retval;
    456  1.68     pooka 		else
    457  1.69     pooka 			rv = *retval;
    458  1.28     pooka 	}
    459  1.68     pooka 	return rv;
    460  1.28     pooka }
    461  1.53     pooka rsys_alias(sys_recvmsg,rump_enosys)
    462  1.28     pooka 
    463  1.60     pooka ssize_t rump___sysimpl_sendmsg(int, const struct msghdr *, int);
    464  1.28     pooka ssize_t
    465  1.60     pooka rump___sysimpl_sendmsg(int s, const struct msghdr * msg, int flags)
    466  1.28     pooka {
    467  1.68     pooka 	register_t retval[2] = {0, 0};
    468  1.28     pooka 	int error = 0;
    469  1.68     pooka 	ssize_t rv = -1;
    470  1.31     pooka 	struct sys_sendmsg_args callarg;
    471  1.28     pooka 
    472  1.31     pooka 	SPARG(&callarg, s) = s;
    473  1.31     pooka 	SPARG(&callarg, msg) = msg;
    474  1.31     pooka 	SPARG(&callarg, flags) = flags;
    475  1.28     pooka 
    476  1.68     pooka 	error = rsys_syscall(SYS_sendmsg, &callarg, sizeof(callarg), retval);
    477  1.63     pooka 	rsys_seterrno(error);
    478  1.68     pooka 	if (error == 0) {
    479  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    480  1.68     pooka 			rv = *(ssize_t *)retval;
    481  1.68     pooka 		else
    482  1.69     pooka 			rv = *retval;
    483  1.28     pooka 	}
    484  1.68     pooka 	return rv;
    485  1.28     pooka }
    486  1.53     pooka rsys_alias(sys_sendmsg,rump_enosys)
    487  1.28     pooka 
    488  1.72  christos ssize_t rump___sysimpl_recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);
    489  1.28     pooka ssize_t
    490  1.72  christos rump___sysimpl_recvfrom(int s, void * buf, size_t len, int flags, struct sockaddr * from, socklen_t * fromlenaddr)
    491  1.28     pooka {
    492  1.68     pooka 	register_t retval[2] = {0, 0};
    493  1.28     pooka 	int error = 0;
    494  1.68     pooka 	ssize_t rv = -1;
    495  1.31     pooka 	struct sys_recvfrom_args callarg;
    496  1.28     pooka 
    497  1.31     pooka 	SPARG(&callarg, s) = s;
    498  1.31     pooka 	SPARG(&callarg, buf) = buf;
    499  1.31     pooka 	SPARG(&callarg, len) = len;
    500  1.31     pooka 	SPARG(&callarg, flags) = flags;
    501  1.31     pooka 	SPARG(&callarg, from) = from;
    502  1.31     pooka 	SPARG(&callarg, fromlenaddr) = fromlenaddr;
    503  1.28     pooka 
    504  1.68     pooka 	error = rsys_syscall(SYS_recvfrom, &callarg, sizeof(callarg), retval);
    505  1.63     pooka 	rsys_seterrno(error);
    506  1.68     pooka 	if (error == 0) {
    507  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    508  1.68     pooka 			rv = *(ssize_t *)retval;
    509  1.68     pooka 		else
    510  1.69     pooka 			rv = *retval;
    511  1.28     pooka 	}
    512  1.68     pooka 	return rv;
    513  1.28     pooka }
    514  1.53     pooka rsys_alias(sys_recvfrom,rump_enosys)
    515  1.28     pooka 
    516  1.72  christos int rump___sysimpl_accept(int, struct sockaddr *, socklen_t *);
    517   1.1     pooka int
    518  1.72  christos rump___sysimpl_accept(int s, struct sockaddr * name, socklen_t * anamelen)
    519  1.22     pooka {
    520  1.68     pooka 	register_t retval[2] = {0, 0};
    521  1.27     pooka 	int error = 0;
    522  1.68     pooka 	int rv = -1;
    523  1.31     pooka 	struct sys_accept_args callarg;
    524  1.22     pooka 
    525  1.31     pooka 	SPARG(&callarg, s) = s;
    526  1.31     pooka 	SPARG(&callarg, name) = name;
    527  1.31     pooka 	SPARG(&callarg, anamelen) = anamelen;
    528  1.22     pooka 
    529  1.68     pooka 	error = rsys_syscall(SYS_accept, &callarg, sizeof(callarg), retval);
    530  1.63     pooka 	rsys_seterrno(error);
    531  1.68     pooka 	if (error == 0) {
    532  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    533  1.68     pooka 			rv = *(int *)retval;
    534  1.68     pooka 		else
    535  1.69     pooka 			rv = *retval;
    536  1.27     pooka 	}
    537  1.68     pooka 	return rv;
    538  1.22     pooka }
    539  1.53     pooka rsys_alias(sys_accept,rump_enosys)
    540  1.22     pooka 
    541  1.72  christos int rump___sysimpl_getpeername(int, struct sockaddr *, socklen_t *);
    542  1.28     pooka int
    543  1.72  christos rump___sysimpl_getpeername(int fdes, struct sockaddr * asa, socklen_t * alen)
    544  1.28     pooka {
    545  1.68     pooka 	register_t retval[2] = {0, 0};
    546  1.28     pooka 	int error = 0;
    547  1.68     pooka 	int rv = -1;
    548  1.31     pooka 	struct sys_getpeername_args callarg;
    549  1.28     pooka 
    550  1.31     pooka 	SPARG(&callarg, fdes) = fdes;
    551  1.31     pooka 	SPARG(&callarg, asa) = asa;
    552  1.31     pooka 	SPARG(&callarg, alen) = alen;
    553  1.28     pooka 
    554  1.68     pooka 	error = rsys_syscall(SYS_getpeername, &callarg, sizeof(callarg), retval);
    555  1.63     pooka 	rsys_seterrno(error);
    556  1.68     pooka 	if (error == 0) {
    557  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    558  1.68     pooka 			rv = *(int *)retval;
    559  1.68     pooka 		else
    560  1.69     pooka 			rv = *retval;
    561  1.28     pooka 	}
    562  1.68     pooka 	return rv;
    563  1.28     pooka }
    564  1.53     pooka rsys_alias(sys_getpeername,rump_enosys)
    565  1.28     pooka 
    566  1.72  christos int rump___sysimpl_getsockname(int, struct sockaddr *, socklen_t *);
    567  1.28     pooka int
    568  1.72  christos rump___sysimpl_getsockname(int fdes, struct sockaddr * asa, socklen_t * alen)
    569  1.28     pooka {
    570  1.68     pooka 	register_t retval[2] = {0, 0};
    571  1.28     pooka 	int error = 0;
    572  1.68     pooka 	int rv = -1;
    573  1.31     pooka 	struct sys_getsockname_args callarg;
    574  1.28     pooka 
    575  1.31     pooka 	SPARG(&callarg, fdes) = fdes;
    576  1.31     pooka 	SPARG(&callarg, asa) = asa;
    577  1.31     pooka 	SPARG(&callarg, alen) = alen;
    578  1.28     pooka 
    579  1.68     pooka 	error = rsys_syscall(SYS_getsockname, &callarg, sizeof(callarg), retval);
    580  1.63     pooka 	rsys_seterrno(error);
    581  1.68     pooka 	if (error == 0) {
    582  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    583  1.68     pooka 			rv = *(int *)retval;
    584  1.68     pooka 		else
    585  1.69     pooka 			rv = *retval;
    586  1.28     pooka 	}
    587  1.68     pooka 	return rv;
    588  1.28     pooka }
    589  1.53     pooka rsys_alias(sys_getsockname,rump_enosys)
    590  1.28     pooka 
    591  1.60     pooka int rump___sysimpl_access(const char *, int);
    592  1.34     pooka int
    593  1.60     pooka rump___sysimpl_access(const char * path, int flags)
    594  1.34     pooka {
    595  1.68     pooka 	register_t retval[2] = {0, 0};
    596  1.34     pooka 	int error = 0;
    597  1.68     pooka 	int rv = -1;
    598  1.34     pooka 	struct sys_access_args callarg;
    599  1.34     pooka 
    600  1.34     pooka 	SPARG(&callarg, path) = path;
    601  1.34     pooka 	SPARG(&callarg, flags) = flags;
    602  1.34     pooka 
    603  1.68     pooka 	error = rsys_syscall(SYS_access, &callarg, sizeof(callarg), retval);
    604  1.63     pooka 	rsys_seterrno(error);
    605  1.68     pooka 	if (error == 0) {
    606  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    607  1.68     pooka 			rv = *(int *)retval;
    608  1.68     pooka 		else
    609  1.69     pooka 			rv = *retval;
    610  1.34     pooka 	}
    611  1.68     pooka 	return rv;
    612  1.34     pooka }
    613  1.53     pooka rsys_alias(sys_access,rump_enosys)
    614  1.34     pooka 
    615  1.60     pooka int rump___sysimpl_chflags(const char *, u_long);
    616  1.22     pooka int
    617  1.60     pooka rump___sysimpl_chflags(const char * path, u_long flags)
    618   1.1     pooka {
    619  1.68     pooka 	register_t retval[2] = {0, 0};
    620  1.27     pooka 	int error = 0;
    621  1.68     pooka 	int rv = -1;
    622  1.31     pooka 	struct sys_chflags_args callarg;
    623   1.1     pooka 
    624  1.31     pooka 	SPARG(&callarg, path) = path;
    625  1.31     pooka 	SPARG(&callarg, flags) = flags;
    626   1.1     pooka 
    627  1.68     pooka 	error = rsys_syscall(SYS_chflags, &callarg, sizeof(callarg), retval);
    628  1.63     pooka 	rsys_seterrno(error);
    629  1.68     pooka 	if (error == 0) {
    630  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    631  1.68     pooka 			rv = *(int *)retval;
    632  1.68     pooka 		else
    633  1.69     pooka 			rv = *retval;
    634  1.27     pooka 	}
    635  1.68     pooka 	return rv;
    636   1.1     pooka }
    637  1.53     pooka rsys_alias(sys_chflags,rump_enosys)
    638   1.1     pooka 
    639  1.60     pooka int rump___sysimpl_fchflags(int, u_long);
    640  1.34     pooka int
    641  1.60     pooka rump___sysimpl_fchflags(int fd, u_long flags)
    642  1.34     pooka {
    643  1.68     pooka 	register_t retval[2] = {0, 0};
    644  1.34     pooka 	int error = 0;
    645  1.68     pooka 	int rv = -1;
    646  1.34     pooka 	struct sys_fchflags_args callarg;
    647  1.34     pooka 
    648  1.34     pooka 	SPARG(&callarg, fd) = fd;
    649  1.34     pooka 	SPARG(&callarg, flags) = flags;
    650  1.34     pooka 
    651  1.68     pooka 	error = rsys_syscall(SYS_fchflags, &callarg, sizeof(callarg), retval);
    652  1.63     pooka 	rsys_seterrno(error);
    653  1.68     pooka 	if (error == 0) {
    654  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    655  1.68     pooka 			rv = *(int *)retval;
    656  1.68     pooka 		else
    657  1.69     pooka 			rv = *retval;
    658  1.34     pooka 	}
    659  1.68     pooka 	return rv;
    660  1.34     pooka }
    661  1.53     pooka rsys_alias(sys_fchflags,rump_enosys)
    662  1.34     pooka 
    663  1.60     pooka void rump___sysimpl_sync(void);
    664   1.1     pooka void
    665  1.60     pooka rump___sysimpl_sync(void )
    666   1.1     pooka {
    667  1.68     pooka 	register_t retval[2] = {0, 0};
    668   1.1     pooka 
    669  1.68     pooka 	rsys_syscall(SYS_sync, NULL, 0, retval);
    670   1.1     pooka }
    671  1.53     pooka rsys_alias(sys_sync,rump_enosys)
    672   1.1     pooka 
    673  1.60     pooka pid_t rump___sysimpl_getppid(void);
    674  1.49     pooka pid_t
    675  1.60     pooka rump___sysimpl_getppid(void )
    676  1.49     pooka {
    677  1.68     pooka 	register_t retval[2] = {0, 0};
    678  1.68     pooka 	pid_t rv = -1;
    679  1.49     pooka 
    680  1.68     pooka 	rsys_syscall(SYS_getppid, NULL, 0, retval);
    681  1.68     pooka 	if (sizeof(pid_t) > sizeof(register_t))
    682  1.68     pooka 		rv = *(pid_t *)retval;
    683  1.68     pooka 	else
    684  1.69     pooka 		rv = *retval;
    685  1.68     pooka 	return rv;
    686  1.49     pooka }
    687  1.53     pooka rsys_alias(sys_getppid,rump_enosys)
    688  1.49     pooka 
    689  1.60     pooka int rump___sysimpl_dup(int);
    690  1.34     pooka int
    691  1.60     pooka rump___sysimpl_dup(int fd)
    692  1.34     pooka {
    693  1.68     pooka 	register_t retval[2] = {0, 0};
    694  1.34     pooka 	int error = 0;
    695  1.68     pooka 	int rv = -1;
    696  1.34     pooka 	struct sys_dup_args callarg;
    697  1.34     pooka 
    698  1.34     pooka 	SPARG(&callarg, fd) = fd;
    699  1.34     pooka 
    700  1.68     pooka 	error = rsys_syscall(SYS_dup, &callarg, sizeof(callarg), retval);
    701  1.63     pooka 	rsys_seterrno(error);
    702  1.68     pooka 	if (error == 0) {
    703  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    704  1.68     pooka 			rv = *(int *)retval;
    705  1.68     pooka 		else
    706  1.69     pooka 			rv = *retval;
    707  1.34     pooka 	}
    708  1.68     pooka 	return rv;
    709  1.34     pooka }
    710  1.53     pooka rsys_alias(sys_dup,rump_enosys)
    711  1.34     pooka 
    712  1.60     pooka gid_t rump___sysimpl_getegid(void);
    713  1.49     pooka gid_t
    714  1.60     pooka rump___sysimpl_getegid(void )
    715  1.49     pooka {
    716  1.68     pooka 	register_t retval[2] = {0, 0};
    717  1.68     pooka 	gid_t rv = -1;
    718  1.49     pooka 
    719  1.68     pooka 	rsys_syscall(SYS_getegid, NULL, 0, retval);
    720  1.68     pooka 	if (sizeof(gid_t) > sizeof(register_t))
    721  1.68     pooka 		rv = *(gid_t *)retval;
    722  1.68     pooka 	else
    723  1.69     pooka 		rv = *retval;
    724  1.68     pooka 	return rv;
    725  1.49     pooka }
    726  1.53     pooka rsys_alias(sys_getegid,rump_enosys)
    727  1.49     pooka 
    728  1.60     pooka gid_t rump___sysimpl_getgid(void);
    729  1.49     pooka gid_t
    730  1.60     pooka rump___sysimpl_getgid(void )
    731  1.49     pooka {
    732  1.68     pooka 	register_t retval[2] = {0, 0};
    733  1.68     pooka 	gid_t rv = -1;
    734  1.49     pooka 
    735  1.68     pooka 	rsys_syscall(SYS_getgid, NULL, 0, retval);
    736  1.68     pooka 	if (sizeof(gid_t) > sizeof(register_t))
    737  1.68     pooka 		rv = *(gid_t *)retval;
    738  1.68     pooka 	else
    739  1.69     pooka 		rv = *retval;
    740  1.68     pooka 	return rv;
    741  1.49     pooka }
    742  1.53     pooka rsys_alias(sys_getgid_with_egid,rump_enosys)
    743  1.49     pooka 
    744  1.60     pooka int rump___sysimpl___getlogin(char *, size_t);
    745  1.49     pooka int
    746  1.60     pooka rump___sysimpl___getlogin(char * namebuf, size_t namelen)
    747  1.49     pooka {
    748  1.68     pooka 	register_t retval[2] = {0, 0};
    749  1.49     pooka 	int error = 0;
    750  1.68     pooka 	int rv = -1;
    751  1.49     pooka 	struct sys___getlogin_args callarg;
    752  1.49     pooka 
    753  1.49     pooka 	SPARG(&callarg, namebuf) = namebuf;
    754  1.49     pooka 	SPARG(&callarg, namelen) = namelen;
    755  1.49     pooka 
    756  1.68     pooka 	error = rsys_syscall(SYS___getlogin, &callarg, sizeof(callarg), retval);
    757  1.63     pooka 	rsys_seterrno(error);
    758  1.68     pooka 	if (error == 0) {
    759  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    760  1.68     pooka 			rv = *(int *)retval;
    761  1.68     pooka 		else
    762  1.69     pooka 			rv = *retval;
    763  1.49     pooka 	}
    764  1.68     pooka 	return rv;
    765  1.49     pooka }
    766  1.53     pooka rsys_alias(sys___getlogin,rump_enosys)
    767  1.49     pooka 
    768  1.60     pooka int rump___sysimpl___setlogin(const char *);
    769  1.49     pooka int
    770  1.60     pooka rump___sysimpl___setlogin(const char * namebuf)
    771  1.49     pooka {
    772  1.68     pooka 	register_t retval[2] = {0, 0};
    773  1.49     pooka 	int error = 0;
    774  1.68     pooka 	int rv = -1;
    775  1.49     pooka 	struct sys___setlogin_args callarg;
    776  1.49     pooka 
    777  1.49     pooka 	SPARG(&callarg, namebuf) = namebuf;
    778  1.49     pooka 
    779  1.68     pooka 	error = rsys_syscall(SYS___setlogin, &callarg, sizeof(callarg), retval);
    780  1.63     pooka 	rsys_seterrno(error);
    781  1.68     pooka 	if (error == 0) {
    782  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    783  1.68     pooka 			rv = *(int *)retval;
    784  1.68     pooka 		else
    785  1.69     pooka 			rv = *retval;
    786  1.49     pooka 	}
    787  1.68     pooka 	return rv;
    788  1.49     pooka }
    789  1.53     pooka rsys_alias(sys___setlogin,rump_enosys)
    790  1.49     pooka 
    791  1.60     pooka int rump___sysimpl_ioctl(int, u_long, void *);
    792   1.1     pooka int
    793  1.60     pooka rump___sysimpl_ioctl(int fd, u_long com, void * data)
    794  1.19     pooka {
    795  1.68     pooka 	register_t retval[2] = {0, 0};
    796  1.27     pooka 	int error = 0;
    797  1.68     pooka 	int rv = -1;
    798  1.31     pooka 	struct sys_ioctl_args callarg;
    799  1.19     pooka 
    800  1.31     pooka 	SPARG(&callarg, fd) = fd;
    801  1.31     pooka 	SPARG(&callarg, com) = com;
    802  1.31     pooka 	SPARG(&callarg, data) = data;
    803  1.19     pooka 
    804  1.68     pooka 	error = rsys_syscall(SYS_ioctl, &callarg, sizeof(callarg), retval);
    805  1.63     pooka 	rsys_seterrno(error);
    806  1.68     pooka 	if (error == 0) {
    807  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    808  1.68     pooka 			rv = *(int *)retval;
    809  1.68     pooka 		else
    810  1.69     pooka 			rv = *retval;
    811  1.27     pooka 	}
    812  1.68     pooka 	return rv;
    813  1.19     pooka }
    814  1.53     pooka rsys_alias(sys_ioctl,rump_enosys)
    815  1.19     pooka 
    816  1.60     pooka int rump___sysimpl_revoke(const char *);
    817  1.34     pooka int
    818  1.60     pooka rump___sysimpl_revoke(const char * path)
    819  1.34     pooka {
    820  1.68     pooka 	register_t retval[2] = {0, 0};
    821  1.34     pooka 	int error = 0;
    822  1.68     pooka 	int rv = -1;
    823  1.34     pooka 	struct sys_revoke_args callarg;
    824  1.34     pooka 
    825  1.34     pooka 	SPARG(&callarg, path) = path;
    826  1.34     pooka 
    827  1.68     pooka 	error = rsys_syscall(SYS_revoke, &callarg, sizeof(callarg), retval);
    828  1.63     pooka 	rsys_seterrno(error);
    829  1.68     pooka 	if (error == 0) {
    830  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    831  1.68     pooka 			rv = *(int *)retval;
    832  1.68     pooka 		else
    833  1.69     pooka 			rv = *retval;
    834  1.34     pooka 	}
    835  1.68     pooka 	return rv;
    836  1.34     pooka }
    837  1.53     pooka rsys_alias(sys_revoke,rump_enosys)
    838  1.34     pooka 
    839  1.60     pooka int rump___sysimpl_symlink(const char *, const char *);
    840  1.19     pooka int
    841  1.60     pooka rump___sysimpl_symlink(const char * path, const char * link)
    842   1.1     pooka {
    843  1.68     pooka 	register_t retval[2] = {0, 0};
    844  1.27     pooka 	int error = 0;
    845  1.68     pooka 	int rv = -1;
    846  1.31     pooka 	struct sys_symlink_args callarg;
    847   1.1     pooka 
    848  1.31     pooka 	SPARG(&callarg, path) = path;
    849  1.31     pooka 	SPARG(&callarg, link) = link;
    850   1.1     pooka 
    851  1.68     pooka 	error = rsys_syscall(SYS_symlink, &callarg, sizeof(callarg), retval);
    852  1.63     pooka 	rsys_seterrno(error);
    853  1.68     pooka 	if (error == 0) {
    854  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    855  1.68     pooka 			rv = *(int *)retval;
    856  1.68     pooka 		else
    857  1.69     pooka 			rv = *retval;
    858  1.27     pooka 	}
    859  1.68     pooka 	return rv;
    860   1.1     pooka }
    861  1.53     pooka rsys_alias(sys_symlink,rump_enosys)
    862   1.1     pooka 
    863  1.60     pooka ssize_t rump___sysimpl_readlink(const char *, char *, size_t);
    864   1.1     pooka ssize_t
    865  1.60     pooka rump___sysimpl_readlink(const char * path, char * buf, size_t count)
    866   1.1     pooka {
    867  1.68     pooka 	register_t retval[2] = {0, 0};
    868  1.27     pooka 	int error = 0;
    869  1.68     pooka 	ssize_t rv = -1;
    870  1.31     pooka 	struct sys_readlink_args callarg;
    871   1.1     pooka 
    872  1.31     pooka 	SPARG(&callarg, path) = path;
    873  1.31     pooka 	SPARG(&callarg, buf) = buf;
    874  1.31     pooka 	SPARG(&callarg, count) = count;
    875   1.1     pooka 
    876  1.68     pooka 	error = rsys_syscall(SYS_readlink, &callarg, sizeof(callarg), retval);
    877  1.63     pooka 	rsys_seterrno(error);
    878  1.68     pooka 	if (error == 0) {
    879  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    880  1.68     pooka 			rv = *(ssize_t *)retval;
    881  1.68     pooka 		else
    882  1.69     pooka 			rv = *retval;
    883  1.27     pooka 	}
    884  1.68     pooka 	return rv;
    885   1.1     pooka }
    886  1.53     pooka rsys_alias(sys_readlink,rump_enosys)
    887   1.1     pooka 
    888  1.60     pooka mode_t rump___sysimpl_umask(mode_t);
    889  1.50     pooka mode_t
    890  1.60     pooka rump___sysimpl_umask(mode_t newmask)
    891  1.50     pooka {
    892  1.68     pooka 	register_t retval[2] = {0, 0};
    893  1.50     pooka 	int error = 0;
    894  1.68     pooka 	mode_t rv = -1;
    895  1.50     pooka 	struct sys_umask_args callarg;
    896  1.50     pooka 
    897  1.50     pooka 	SPARG(&callarg, newmask) = newmask;
    898  1.50     pooka 
    899  1.68     pooka 	error = rsys_syscall(SYS_umask, &callarg, sizeof(callarg), retval);
    900  1.63     pooka 	rsys_seterrno(error);
    901  1.68     pooka 	if (error == 0) {
    902  1.68     pooka 		if (sizeof(mode_t) > sizeof(register_t))
    903  1.68     pooka 			rv = *(mode_t *)retval;
    904  1.68     pooka 		else
    905  1.69     pooka 			rv = *retval;
    906  1.50     pooka 	}
    907  1.68     pooka 	return rv;
    908  1.50     pooka }
    909  1.53     pooka rsys_alias(sys_umask,rump_enosys)
    910  1.50     pooka 
    911  1.60     pooka int rump___sysimpl_chroot(const char *);
    912  1.34     pooka int
    913  1.60     pooka rump___sysimpl_chroot(const char * path)
    914  1.34     pooka {
    915  1.68     pooka 	register_t retval[2] = {0, 0};
    916  1.34     pooka 	int error = 0;
    917  1.68     pooka 	int rv = -1;
    918  1.34     pooka 	struct sys_chroot_args callarg;
    919  1.34     pooka 
    920  1.34     pooka 	SPARG(&callarg, path) = path;
    921  1.34     pooka 
    922  1.68     pooka 	error = rsys_syscall(SYS_chroot, &callarg, sizeof(callarg), retval);
    923  1.63     pooka 	rsys_seterrno(error);
    924  1.68     pooka 	if (error == 0) {
    925  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    926  1.68     pooka 			rv = *(int *)retval;
    927  1.68     pooka 		else
    928  1.69     pooka 			rv = *retval;
    929  1.34     pooka 	}
    930  1.68     pooka 	return rv;
    931  1.34     pooka }
    932  1.53     pooka rsys_alias(sys_chroot,rump_enosys)
    933  1.34     pooka 
    934  1.60     pooka int rump___sysimpl_getgroups(int, gid_t *);
    935  1.49     pooka int
    936  1.60     pooka rump___sysimpl_getgroups(int gidsetsize, gid_t * gidset)
    937  1.49     pooka {
    938  1.68     pooka 	register_t retval[2] = {0, 0};
    939  1.49     pooka 	int error = 0;
    940  1.68     pooka 	int rv = -1;
    941  1.49     pooka 	struct sys_getgroups_args callarg;
    942  1.49     pooka 
    943  1.49     pooka 	SPARG(&callarg, gidsetsize) = gidsetsize;
    944  1.49     pooka 	SPARG(&callarg, gidset) = gidset;
    945  1.49     pooka 
    946  1.68     pooka 	error = rsys_syscall(SYS_getgroups, &callarg, sizeof(callarg), retval);
    947  1.63     pooka 	rsys_seterrno(error);
    948  1.68     pooka 	if (error == 0) {
    949  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    950  1.68     pooka 			rv = *(int *)retval;
    951  1.68     pooka 		else
    952  1.69     pooka 			rv = *retval;
    953  1.49     pooka 	}
    954  1.68     pooka 	return rv;
    955  1.49     pooka }
    956  1.53     pooka rsys_alias(sys_getgroups,rump_enosys)
    957  1.49     pooka 
    958  1.60     pooka int rump___sysimpl_setgroups(int, const gid_t *);
    959  1.49     pooka int
    960  1.60     pooka rump___sysimpl_setgroups(int gidsetsize, const gid_t * gidset)
    961  1.49     pooka {
    962  1.68     pooka 	register_t retval[2] = {0, 0};
    963  1.49     pooka 	int error = 0;
    964  1.68     pooka 	int rv = -1;
    965  1.49     pooka 	struct sys_setgroups_args callarg;
    966  1.49     pooka 
    967  1.49     pooka 	SPARG(&callarg, gidsetsize) = gidsetsize;
    968  1.49     pooka 	SPARG(&callarg, gidset) = gidset;
    969  1.49     pooka 
    970  1.68     pooka 	error = rsys_syscall(SYS_setgroups, &callarg, sizeof(callarg), retval);
    971  1.63     pooka 	rsys_seterrno(error);
    972  1.68     pooka 	if (error == 0) {
    973  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    974  1.68     pooka 			rv = *(int *)retval;
    975  1.68     pooka 		else
    976  1.69     pooka 			rv = *retval;
    977  1.49     pooka 	}
    978  1.68     pooka 	return rv;
    979  1.49     pooka }
    980  1.53     pooka rsys_alias(sys_setgroups,rump_enosys)
    981  1.49     pooka 
    982  1.60     pooka int rump___sysimpl_getpgrp(void);
    983  1.49     pooka int
    984  1.60     pooka rump___sysimpl_getpgrp(void )
    985  1.49     pooka {
    986  1.68     pooka 	register_t retval[2] = {0, 0};
    987  1.49     pooka 	int error = 0;
    988  1.68     pooka 	int rv = -1;
    989  1.49     pooka 
    990  1.68     pooka 	error = rsys_syscall(SYS_getpgrp, NULL, 0, retval);
    991  1.63     pooka 	rsys_seterrno(error);
    992  1.68     pooka 	if (error == 0) {
    993  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    994  1.68     pooka 			rv = *(int *)retval;
    995  1.68     pooka 		else
    996  1.69     pooka 			rv = *retval;
    997  1.49     pooka 	}
    998  1.68     pooka 	return rv;
    999  1.49     pooka }
   1000  1.53     pooka rsys_alias(sys_getpgrp,rump_enosys)
   1001  1.49     pooka 
   1002  1.62     pooka int rump___sysimpl_setpgid(pid_t, pid_t);
   1003  1.49     pooka int
   1004  1.62     pooka rump___sysimpl_setpgid(pid_t pid, pid_t pgid)
   1005  1.49     pooka {
   1006  1.68     pooka 	register_t retval[2] = {0, 0};
   1007  1.49     pooka 	int error = 0;
   1008  1.68     pooka 	int rv = -1;
   1009  1.49     pooka 	struct sys_setpgid_args callarg;
   1010  1.49     pooka 
   1011  1.49     pooka 	SPARG(&callarg, pid) = pid;
   1012  1.49     pooka 	SPARG(&callarg, pgid) = pgid;
   1013  1.49     pooka 
   1014  1.68     pooka 	error = rsys_syscall(SYS_setpgid, &callarg, sizeof(callarg), retval);
   1015  1.63     pooka 	rsys_seterrno(error);
   1016  1.68     pooka 	if (error == 0) {
   1017  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1018  1.68     pooka 			rv = *(int *)retval;
   1019  1.68     pooka 		else
   1020  1.69     pooka 			rv = *retval;
   1021  1.49     pooka 	}
   1022  1.68     pooka 	return rv;
   1023  1.49     pooka }
   1024  1.53     pooka rsys_alias(sys_setpgid,rump_enosys)
   1025  1.49     pooka 
   1026  1.60     pooka int rump___sysimpl_dup2(int, int);
   1027  1.34     pooka int
   1028  1.60     pooka rump___sysimpl_dup2(int from, int to)
   1029  1.34     pooka {
   1030  1.68     pooka 	register_t retval[2] = {0, 0};
   1031  1.34     pooka 	int error = 0;
   1032  1.68     pooka 	int rv = -1;
   1033  1.34     pooka 	struct sys_dup2_args callarg;
   1034  1.34     pooka 
   1035  1.34     pooka 	SPARG(&callarg, from) = from;
   1036  1.34     pooka 	SPARG(&callarg, to) = to;
   1037  1.34     pooka 
   1038  1.68     pooka 	error = rsys_syscall(SYS_dup2, &callarg, sizeof(callarg), retval);
   1039  1.63     pooka 	rsys_seterrno(error);
   1040  1.68     pooka 	if (error == 0) {
   1041  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1042  1.68     pooka 			rv = *(int *)retval;
   1043  1.68     pooka 		else
   1044  1.69     pooka 			rv = *retval;
   1045  1.34     pooka 	}
   1046  1.68     pooka 	return rv;
   1047  1.34     pooka }
   1048  1.53     pooka rsys_alias(sys_dup2,rump_enosys)
   1049  1.34     pooka 
   1050  1.60     pooka int rump___sysimpl_fcntl(int, int, void *);
   1051  1.34     pooka int
   1052  1.60     pooka rump___sysimpl_fcntl(int fd, int cmd, void * arg)
   1053  1.34     pooka {
   1054  1.68     pooka 	register_t retval[2] = {0, 0};
   1055  1.34     pooka 	int error = 0;
   1056  1.68     pooka 	int rv = -1;
   1057  1.34     pooka 	struct sys_fcntl_args callarg;
   1058  1.34     pooka 
   1059  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1060  1.34     pooka 	SPARG(&callarg, cmd) = cmd;
   1061  1.34     pooka 	SPARG(&callarg, arg) = arg;
   1062  1.34     pooka 
   1063  1.68     pooka 	error = rsys_syscall(SYS_fcntl, &callarg, sizeof(callarg), retval);
   1064  1.63     pooka 	rsys_seterrno(error);
   1065  1.68     pooka 	if (error == 0) {
   1066  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1067  1.68     pooka 			rv = *(int *)retval;
   1068  1.68     pooka 		else
   1069  1.69     pooka 			rv = *retval;
   1070  1.34     pooka 	}
   1071  1.68     pooka 	return rv;
   1072  1.34     pooka }
   1073  1.53     pooka rsys_alias(sys_fcntl,rump_enosys)
   1074  1.34     pooka 
   1075  1.60     pooka int rump___sysimpl_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
   1076   1.1     pooka int
   1077  1.60     pooka rump___sysimpl_select(int nd, fd_set * in, fd_set * ou, fd_set * ex, struct timeval * tv)
   1078  1.60     pooka {
   1079  1.68     pooka 	register_t retval[2] = {0, 0};
   1080  1.60     pooka 	int error = 0;
   1081  1.68     pooka 	int rv = -1;
   1082  1.60     pooka 	struct compat_50_sys_select_args callarg;
   1083  1.60     pooka 
   1084  1.60     pooka 	SPARG(&callarg, nd) = nd;
   1085  1.60     pooka 	SPARG(&callarg, in) = in;
   1086  1.60     pooka 	SPARG(&callarg, ou) = ou;
   1087  1.60     pooka 	SPARG(&callarg, ex) = ex;
   1088  1.60     pooka 	SPARG(&callarg, tv) = (struct timeval50 *)tv;
   1089  1.60     pooka 
   1090  1.68     pooka 	error = rsys_syscall(SYS_compat_50_select, &callarg, sizeof(callarg), retval);
   1091  1.63     pooka 	rsys_seterrno(error);
   1092  1.68     pooka 	if (error == 0) {
   1093  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1094  1.68     pooka 			rv = *(int *)retval;
   1095  1.68     pooka 		else
   1096  1.69     pooka 			rv = *retval;
   1097  1.60     pooka 	}
   1098  1.68     pooka 	return rv;
   1099  1.60     pooka }
   1100  1.60     pooka rsys_alias(compat_50_sys_select,rump_enosys)
   1101  1.60     pooka 
   1102  1.60     pooka int rump___sysimpl_fsync(int);
   1103  1.60     pooka int
   1104  1.60     pooka rump___sysimpl_fsync(int fd)
   1105  1.12     pooka {
   1106  1.68     pooka 	register_t retval[2] = {0, 0};
   1107  1.27     pooka 	int error = 0;
   1108  1.68     pooka 	int rv = -1;
   1109  1.31     pooka 	struct sys_fsync_args callarg;
   1110  1.12     pooka 
   1111  1.31     pooka 	SPARG(&callarg, fd) = fd;
   1112  1.12     pooka 
   1113  1.68     pooka 	error = rsys_syscall(SYS_fsync, &callarg, sizeof(callarg), retval);
   1114  1.63     pooka 	rsys_seterrno(error);
   1115  1.68     pooka 	if (error == 0) {
   1116  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1117  1.68     pooka 			rv = *(int *)retval;
   1118  1.68     pooka 		else
   1119  1.69     pooka 			rv = *retval;
   1120  1.27     pooka 	}
   1121  1.68     pooka 	return rv;
   1122  1.12     pooka }
   1123  1.53     pooka rsys_alias(sys_fsync,rump_enosys)
   1124  1.12     pooka 
   1125  1.72  christos int rump___sysimpl_connect(int, const struct sockaddr *, socklen_t);
   1126  1.12     pooka int
   1127  1.72  christos rump___sysimpl_connect(int s, const struct sockaddr * name, socklen_t namelen)
   1128  1.18     pooka {
   1129  1.68     pooka 	register_t retval[2] = {0, 0};
   1130  1.27     pooka 	int error = 0;
   1131  1.68     pooka 	int rv = -1;
   1132  1.31     pooka 	struct sys_connect_args callarg;
   1133  1.18     pooka 
   1134  1.31     pooka 	SPARG(&callarg, s) = s;
   1135  1.31     pooka 	SPARG(&callarg, name) = name;
   1136  1.31     pooka 	SPARG(&callarg, namelen) = namelen;
   1137  1.18     pooka 
   1138  1.68     pooka 	error = rsys_syscall(SYS_connect, &callarg, sizeof(callarg), retval);
   1139  1.63     pooka 	rsys_seterrno(error);
   1140  1.68     pooka 	if (error == 0) {
   1141  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1142  1.68     pooka 			rv = *(int *)retval;
   1143  1.68     pooka 		else
   1144  1.69     pooka 			rv = *retval;
   1145  1.27     pooka 	}
   1146  1.68     pooka 	return rv;
   1147  1.18     pooka }
   1148  1.53     pooka rsys_alias(sys_connect,rump_enosys)
   1149  1.18     pooka 
   1150  1.72  christos int rump___sysimpl_bind(int, const struct sockaddr *, socklen_t);
   1151  1.18     pooka int
   1152  1.72  christos rump___sysimpl_bind(int s, const struct sockaddr * name, socklen_t namelen)
   1153  1.22     pooka {
   1154  1.68     pooka 	register_t retval[2] = {0, 0};
   1155  1.27     pooka 	int error = 0;
   1156  1.68     pooka 	int rv = -1;
   1157  1.31     pooka 	struct sys_bind_args callarg;
   1158  1.22     pooka 
   1159  1.31     pooka 	SPARG(&callarg, s) = s;
   1160  1.31     pooka 	SPARG(&callarg, name) = name;
   1161  1.31     pooka 	SPARG(&callarg, namelen) = namelen;
   1162  1.22     pooka 
   1163  1.68     pooka 	error = rsys_syscall(SYS_bind, &callarg, sizeof(callarg), retval);
   1164  1.63     pooka 	rsys_seterrno(error);
   1165  1.68     pooka 	if (error == 0) {
   1166  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1167  1.68     pooka 			rv = *(int *)retval;
   1168  1.68     pooka 		else
   1169  1.69     pooka 			rv = *retval;
   1170  1.27     pooka 	}
   1171  1.68     pooka 	return rv;
   1172  1.22     pooka }
   1173  1.53     pooka rsys_alias(sys_bind,rump_enosys)
   1174  1.22     pooka 
   1175  1.72  christos int rump___sysimpl_setsockopt(int, int, int, const void *, socklen_t);
   1176  1.22     pooka int
   1177  1.72  christos rump___sysimpl_setsockopt(int s, int level, int name, const void * val, socklen_t valsize)
   1178  1.18     pooka {
   1179  1.68     pooka 	register_t retval[2] = {0, 0};
   1180  1.27     pooka 	int error = 0;
   1181  1.68     pooka 	int rv = -1;
   1182  1.31     pooka 	struct sys_setsockopt_args callarg;
   1183  1.18     pooka 
   1184  1.31     pooka 	SPARG(&callarg, s) = s;
   1185  1.31     pooka 	SPARG(&callarg, level) = level;
   1186  1.31     pooka 	SPARG(&callarg, name) = name;
   1187  1.31     pooka 	SPARG(&callarg, val) = val;
   1188  1.31     pooka 	SPARG(&callarg, valsize) = valsize;
   1189  1.18     pooka 
   1190  1.68     pooka 	error = rsys_syscall(SYS_setsockopt, &callarg, sizeof(callarg), retval);
   1191  1.63     pooka 	rsys_seterrno(error);
   1192  1.68     pooka 	if (error == 0) {
   1193  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1194  1.68     pooka 			rv = *(int *)retval;
   1195  1.68     pooka 		else
   1196  1.69     pooka 			rv = *retval;
   1197  1.27     pooka 	}
   1198  1.68     pooka 	return rv;
   1199  1.18     pooka }
   1200  1.53     pooka rsys_alias(sys_setsockopt,rump_enosys)
   1201  1.18     pooka 
   1202  1.60     pooka int rump___sysimpl_listen(int, int);
   1203  1.18     pooka int
   1204  1.60     pooka rump___sysimpl_listen(int s, int backlog)
   1205  1.22     pooka {
   1206  1.68     pooka 	register_t retval[2] = {0, 0};
   1207  1.27     pooka 	int error = 0;
   1208  1.68     pooka 	int rv = -1;
   1209  1.31     pooka 	struct sys_listen_args callarg;
   1210  1.22     pooka 
   1211  1.31     pooka 	SPARG(&callarg, s) = s;
   1212  1.31     pooka 	SPARG(&callarg, backlog) = backlog;
   1213  1.22     pooka 
   1214  1.68     pooka 	error = rsys_syscall(SYS_listen, &callarg, sizeof(callarg), retval);
   1215  1.63     pooka 	rsys_seterrno(error);
   1216  1.68     pooka 	if (error == 0) {
   1217  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1218  1.68     pooka 			rv = *(int *)retval;
   1219  1.68     pooka 		else
   1220  1.69     pooka 			rv = *retval;
   1221  1.27     pooka 	}
   1222  1.68     pooka 	return rv;
   1223  1.22     pooka }
   1224  1.53     pooka rsys_alias(sys_listen,rump_enosys)
   1225  1.22     pooka 
   1226  1.72  christos int rump___sysimpl_getsockopt(int, int, int, void *, socklen_t *);
   1227  1.22     pooka int
   1228  1.72  christos rump___sysimpl_getsockopt(int s, int level, int name, void * val, socklen_t * avalsize)
   1229  1.18     pooka {
   1230  1.68     pooka 	register_t retval[2] = {0, 0};
   1231  1.27     pooka 	int error = 0;
   1232  1.68     pooka 	int rv = -1;
   1233  1.31     pooka 	struct sys_getsockopt_args callarg;
   1234  1.18     pooka 
   1235  1.31     pooka 	SPARG(&callarg, s) = s;
   1236  1.31     pooka 	SPARG(&callarg, level) = level;
   1237  1.31     pooka 	SPARG(&callarg, name) = name;
   1238  1.31     pooka 	SPARG(&callarg, val) = val;
   1239  1.31     pooka 	SPARG(&callarg, avalsize) = avalsize;
   1240  1.18     pooka 
   1241  1.68     pooka 	error = rsys_syscall(SYS_getsockopt, &callarg, sizeof(callarg), retval);
   1242  1.63     pooka 	rsys_seterrno(error);
   1243  1.68     pooka 	if (error == 0) {
   1244  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1245  1.68     pooka 			rv = *(int *)retval;
   1246  1.68     pooka 		else
   1247  1.69     pooka 			rv = *retval;
   1248  1.27     pooka 	}
   1249  1.68     pooka 	return rv;
   1250  1.18     pooka }
   1251  1.53     pooka rsys_alias(sys_getsockopt,rump_enosys)
   1252  1.18     pooka 
   1253  1.60     pooka ssize_t rump___sysimpl_readv(int, const struct iovec *, int);
   1254  1.34     pooka ssize_t
   1255  1.60     pooka rump___sysimpl_readv(int fd, const struct iovec * iovp, int iovcnt)
   1256  1.34     pooka {
   1257  1.68     pooka 	register_t retval[2] = {0, 0};
   1258  1.34     pooka 	int error = 0;
   1259  1.68     pooka 	ssize_t rv = -1;
   1260  1.34     pooka 	struct sys_readv_args callarg;
   1261  1.34     pooka 
   1262  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1263  1.34     pooka 	SPARG(&callarg, iovp) = iovp;
   1264  1.34     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   1265  1.34     pooka 
   1266  1.68     pooka 	error = rsys_syscall(SYS_readv, &callarg, sizeof(callarg), retval);
   1267  1.63     pooka 	rsys_seterrno(error);
   1268  1.68     pooka 	if (error == 0) {
   1269  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1270  1.68     pooka 			rv = *(ssize_t *)retval;
   1271  1.68     pooka 		else
   1272  1.69     pooka 			rv = *retval;
   1273  1.34     pooka 	}
   1274  1.68     pooka 	return rv;
   1275  1.34     pooka }
   1276  1.53     pooka rsys_alias(sys_readv,rump_enosys)
   1277  1.34     pooka 
   1278  1.60     pooka ssize_t rump___sysimpl_writev(int, const struct iovec *, int);
   1279  1.34     pooka ssize_t
   1280  1.60     pooka rump___sysimpl_writev(int fd, const struct iovec * iovp, int iovcnt)
   1281  1.34     pooka {
   1282  1.68     pooka 	register_t retval[2] = {0, 0};
   1283  1.34     pooka 	int error = 0;
   1284  1.68     pooka 	ssize_t rv = -1;
   1285  1.34     pooka 	struct sys_writev_args callarg;
   1286  1.34     pooka 
   1287  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1288  1.34     pooka 	SPARG(&callarg, iovp) = iovp;
   1289  1.34     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   1290  1.34     pooka 
   1291  1.68     pooka 	error = rsys_syscall(SYS_writev, &callarg, sizeof(callarg), retval);
   1292  1.63     pooka 	rsys_seterrno(error);
   1293  1.68     pooka 	if (error == 0) {
   1294  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1295  1.68     pooka 			rv = *(ssize_t *)retval;
   1296  1.68     pooka 		else
   1297  1.69     pooka 			rv = *retval;
   1298  1.34     pooka 	}
   1299  1.68     pooka 	return rv;
   1300  1.34     pooka }
   1301  1.53     pooka rsys_alias(sys_writev,rump_enosys)
   1302  1.34     pooka 
   1303  1.60     pooka int rump___sysimpl_fchown(int, uid_t, gid_t);
   1304  1.34     pooka int
   1305  1.60     pooka rump___sysimpl_fchown(int fd, uid_t uid, gid_t gid)
   1306  1.34     pooka {
   1307  1.68     pooka 	register_t retval[2] = {0, 0};
   1308  1.34     pooka 	int error = 0;
   1309  1.68     pooka 	int rv = -1;
   1310  1.34     pooka 	struct sys_fchown_args callarg;
   1311  1.34     pooka 
   1312  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1313  1.34     pooka 	SPARG(&callarg, uid) = uid;
   1314  1.34     pooka 	SPARG(&callarg, gid) = gid;
   1315  1.34     pooka 
   1316  1.68     pooka 	error = rsys_syscall(SYS_fchown, &callarg, sizeof(callarg), retval);
   1317  1.63     pooka 	rsys_seterrno(error);
   1318  1.68     pooka 	if (error == 0) {
   1319  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1320  1.68     pooka 			rv = *(int *)retval;
   1321  1.68     pooka 		else
   1322  1.69     pooka 			rv = *retval;
   1323  1.34     pooka 	}
   1324  1.68     pooka 	return rv;
   1325  1.34     pooka }
   1326  1.53     pooka rsys_alias(sys_fchown,rump_enosys)
   1327  1.34     pooka 
   1328  1.60     pooka int rump___sysimpl_fchmod(int, mode_t);
   1329  1.34     pooka int
   1330  1.60     pooka rump___sysimpl_fchmod(int fd, mode_t mode)
   1331  1.34     pooka {
   1332  1.68     pooka 	register_t retval[2] = {0, 0};
   1333  1.34     pooka 	int error = 0;
   1334  1.68     pooka 	int rv = -1;
   1335  1.34     pooka 	struct sys_fchmod_args callarg;
   1336  1.34     pooka 
   1337  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1338  1.34     pooka 	SPARG(&callarg, mode) = mode;
   1339  1.34     pooka 
   1340  1.68     pooka 	error = rsys_syscall(SYS_fchmod, &callarg, sizeof(callarg), retval);
   1341  1.63     pooka 	rsys_seterrno(error);
   1342  1.68     pooka 	if (error == 0) {
   1343  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1344  1.68     pooka 			rv = *(int *)retval;
   1345  1.68     pooka 		else
   1346  1.69     pooka 			rv = *retval;
   1347  1.34     pooka 	}
   1348  1.68     pooka 	return rv;
   1349  1.34     pooka }
   1350  1.53     pooka rsys_alias(sys_fchmod,rump_enosys)
   1351  1.34     pooka 
   1352  1.60     pooka int rump___sysimpl_setreuid(uid_t, uid_t);
   1353  1.49     pooka int
   1354  1.60     pooka rump___sysimpl_setreuid(uid_t ruid, uid_t euid)
   1355  1.49     pooka {
   1356  1.68     pooka 	register_t retval[2] = {0, 0};
   1357  1.49     pooka 	int error = 0;
   1358  1.68     pooka 	int rv = -1;
   1359  1.49     pooka 	struct sys_setreuid_args callarg;
   1360  1.49     pooka 
   1361  1.49     pooka 	SPARG(&callarg, ruid) = ruid;
   1362  1.49     pooka 	SPARG(&callarg, euid) = euid;
   1363  1.49     pooka 
   1364  1.68     pooka 	error = rsys_syscall(SYS_setreuid, &callarg, sizeof(callarg), retval);
   1365  1.63     pooka 	rsys_seterrno(error);
   1366  1.68     pooka 	if (error == 0) {
   1367  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1368  1.68     pooka 			rv = *(int *)retval;
   1369  1.68     pooka 		else
   1370  1.69     pooka 			rv = *retval;
   1371  1.49     pooka 	}
   1372  1.68     pooka 	return rv;
   1373  1.49     pooka }
   1374  1.53     pooka rsys_alias(sys_setreuid,rump_enosys)
   1375  1.49     pooka 
   1376  1.60     pooka int rump___sysimpl_setregid(gid_t, gid_t);
   1377  1.49     pooka int
   1378  1.60     pooka rump___sysimpl_setregid(gid_t rgid, gid_t egid)
   1379  1.49     pooka {
   1380  1.68     pooka 	register_t retval[2] = {0, 0};
   1381  1.49     pooka 	int error = 0;
   1382  1.68     pooka 	int rv = -1;
   1383  1.49     pooka 	struct sys_setregid_args callarg;
   1384  1.49     pooka 
   1385  1.49     pooka 	SPARG(&callarg, rgid) = rgid;
   1386  1.49     pooka 	SPARG(&callarg, egid) = egid;
   1387  1.49     pooka 
   1388  1.68     pooka 	error = rsys_syscall(SYS_setregid, &callarg, sizeof(callarg), retval);
   1389  1.63     pooka 	rsys_seterrno(error);
   1390  1.68     pooka 	if (error == 0) {
   1391  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1392  1.68     pooka 			rv = *(int *)retval;
   1393  1.68     pooka 		else
   1394  1.69     pooka 			rv = *retval;
   1395  1.49     pooka 	}
   1396  1.68     pooka 	return rv;
   1397  1.49     pooka }
   1398  1.53     pooka rsys_alias(sys_setregid,rump_enosys)
   1399  1.49     pooka 
   1400  1.60     pooka int rump___sysimpl_rename(const char *, const char *);
   1401  1.18     pooka int
   1402  1.60     pooka rump___sysimpl_rename(const char * from, const char * to)
   1403   1.1     pooka {
   1404  1.68     pooka 	register_t retval[2] = {0, 0};
   1405  1.27     pooka 	int error = 0;
   1406  1.68     pooka 	int rv = -1;
   1407  1.31     pooka 	struct sys_rename_args callarg;
   1408   1.1     pooka 
   1409  1.31     pooka 	SPARG(&callarg, from) = from;
   1410  1.31     pooka 	SPARG(&callarg, to) = to;
   1411   1.1     pooka 
   1412  1.68     pooka 	error = rsys_syscall(SYS_rename, &callarg, sizeof(callarg), retval);
   1413  1.63     pooka 	rsys_seterrno(error);
   1414  1.68     pooka 	if (error == 0) {
   1415  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1416  1.68     pooka 			rv = *(int *)retval;
   1417  1.68     pooka 		else
   1418  1.69     pooka 			rv = *retval;
   1419  1.27     pooka 	}
   1420  1.68     pooka 	return rv;
   1421   1.1     pooka }
   1422  1.53     pooka rsys_alias(sys_rename,rump_enosys)
   1423   1.1     pooka 
   1424  1.60     pooka int rump___sysimpl_flock(int, int);
   1425  1.34     pooka int
   1426  1.60     pooka rump___sysimpl_flock(int fd, int how)
   1427  1.34     pooka {
   1428  1.68     pooka 	register_t retval[2] = {0, 0};
   1429  1.34     pooka 	int error = 0;
   1430  1.68     pooka 	int rv = -1;
   1431  1.34     pooka 	struct sys_flock_args callarg;
   1432  1.34     pooka 
   1433  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1434  1.34     pooka 	SPARG(&callarg, how) = how;
   1435  1.34     pooka 
   1436  1.68     pooka 	error = rsys_syscall(SYS_flock, &callarg, sizeof(callarg), retval);
   1437  1.63     pooka 	rsys_seterrno(error);
   1438  1.68     pooka 	if (error == 0) {
   1439  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1440  1.68     pooka 			rv = *(int *)retval;
   1441  1.68     pooka 		else
   1442  1.69     pooka 			rv = *retval;
   1443  1.34     pooka 	}
   1444  1.68     pooka 	return rv;
   1445  1.34     pooka }
   1446  1.53     pooka rsys_alias(sys_flock,rump_enosys)
   1447  1.34     pooka 
   1448  1.60     pooka int rump___sysimpl_mkfifo(const char *, mode_t);
   1449   1.1     pooka int
   1450  1.60     pooka rump___sysimpl_mkfifo(const char * path, mode_t mode)
   1451  1.10     pooka {
   1452  1.68     pooka 	register_t retval[2] = {0, 0};
   1453  1.27     pooka 	int error = 0;
   1454  1.68     pooka 	int rv = -1;
   1455  1.31     pooka 	struct sys_mkfifo_args callarg;
   1456  1.10     pooka 
   1457  1.31     pooka 	SPARG(&callarg, path) = path;
   1458  1.31     pooka 	SPARG(&callarg, mode) = mode;
   1459  1.10     pooka 
   1460  1.68     pooka 	error = rsys_syscall(SYS_mkfifo, &callarg, sizeof(callarg), retval);
   1461  1.63     pooka 	rsys_seterrno(error);
   1462  1.68     pooka 	if (error == 0) {
   1463  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1464  1.68     pooka 			rv = *(int *)retval;
   1465  1.68     pooka 		else
   1466  1.69     pooka 			rv = *retval;
   1467  1.27     pooka 	}
   1468  1.68     pooka 	return rv;
   1469  1.10     pooka }
   1470  1.53     pooka rsys_alias(sys_mkfifo,rump_enosys)
   1471  1.10     pooka 
   1472  1.72  christos ssize_t rump___sysimpl_sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
   1473  1.28     pooka ssize_t
   1474  1.72  christos rump___sysimpl_sendto(int s, const void * buf, size_t len, int flags, const struct sockaddr * to, socklen_t tolen)
   1475  1.28     pooka {
   1476  1.68     pooka 	register_t retval[2] = {0, 0};
   1477  1.28     pooka 	int error = 0;
   1478  1.68     pooka 	ssize_t rv = -1;
   1479  1.31     pooka 	struct sys_sendto_args callarg;
   1480  1.28     pooka 
   1481  1.31     pooka 	SPARG(&callarg, s) = s;
   1482  1.31     pooka 	SPARG(&callarg, buf) = buf;
   1483  1.31     pooka 	SPARG(&callarg, len) = len;
   1484  1.31     pooka 	SPARG(&callarg, flags) = flags;
   1485  1.31     pooka 	SPARG(&callarg, to) = to;
   1486  1.31     pooka 	SPARG(&callarg, tolen) = tolen;
   1487  1.28     pooka 
   1488  1.68     pooka 	error = rsys_syscall(SYS_sendto, &callarg, sizeof(callarg), retval);
   1489  1.63     pooka 	rsys_seterrno(error);
   1490  1.68     pooka 	if (error == 0) {
   1491  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1492  1.68     pooka 			rv = *(ssize_t *)retval;
   1493  1.68     pooka 		else
   1494  1.69     pooka 			rv = *retval;
   1495  1.28     pooka 	}
   1496  1.68     pooka 	return rv;
   1497  1.28     pooka }
   1498  1.53     pooka rsys_alias(sys_sendto,rump_enosys)
   1499  1.28     pooka 
   1500  1.60     pooka int rump___sysimpl_shutdown(int, int);
   1501  1.28     pooka int
   1502  1.60     pooka rump___sysimpl_shutdown(int s, int how)
   1503  1.28     pooka {
   1504  1.68     pooka 	register_t retval[2] = {0, 0};
   1505  1.28     pooka 	int error = 0;
   1506  1.68     pooka 	int rv = -1;
   1507  1.31     pooka 	struct sys_shutdown_args callarg;
   1508  1.28     pooka 
   1509  1.31     pooka 	SPARG(&callarg, s) = s;
   1510  1.31     pooka 	SPARG(&callarg, how) = how;
   1511  1.28     pooka 
   1512  1.68     pooka 	error = rsys_syscall(SYS_shutdown, &callarg, sizeof(callarg), retval);
   1513  1.63     pooka 	rsys_seterrno(error);
   1514  1.68     pooka 	if (error == 0) {
   1515  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1516  1.68     pooka 			rv = *(int *)retval;
   1517  1.68     pooka 		else
   1518  1.69     pooka 			rv = *retval;
   1519  1.28     pooka 	}
   1520  1.68     pooka 	return rv;
   1521  1.28     pooka }
   1522  1.53     pooka rsys_alias(sys_shutdown,rump_enosys)
   1523  1.28     pooka 
   1524  1.60     pooka int rump___sysimpl_socketpair(int, int, int, int *);
   1525  1.28     pooka int
   1526  1.60     pooka rump___sysimpl_socketpair(int domain, int type, int protocol, int * rsv)
   1527  1.28     pooka {
   1528  1.68     pooka 	register_t retval[2] = {0, 0};
   1529  1.28     pooka 	int error = 0;
   1530  1.68     pooka 	int rv = -1;
   1531  1.31     pooka 	struct sys_socketpair_args callarg;
   1532  1.28     pooka 
   1533  1.31     pooka 	SPARG(&callarg, domain) = domain;
   1534  1.31     pooka 	SPARG(&callarg, type) = type;
   1535  1.31     pooka 	SPARG(&callarg, protocol) = protocol;
   1536  1.31     pooka 	SPARG(&callarg, rsv) = rsv;
   1537  1.28     pooka 
   1538  1.68     pooka 	error = rsys_syscall(SYS_socketpair, &callarg, sizeof(callarg), retval);
   1539  1.63     pooka 	rsys_seterrno(error);
   1540  1.68     pooka 	if (error == 0) {
   1541  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1542  1.68     pooka 			rv = *(int *)retval;
   1543  1.68     pooka 		else
   1544  1.69     pooka 			rv = *retval;
   1545  1.34     pooka 	}
   1546  1.68     pooka 	return rv;
   1547  1.34     pooka }
   1548  1.53     pooka rsys_alias(sys_socketpair,rump_enosys)
   1549  1.34     pooka 
   1550  1.60     pooka int rump___sysimpl_mkdir(const char *, mode_t);
   1551  1.34     pooka int
   1552  1.60     pooka rump___sysimpl_mkdir(const char * path, mode_t mode)
   1553  1.34     pooka {
   1554  1.68     pooka 	register_t retval[2] = {0, 0};
   1555  1.34     pooka 	int error = 0;
   1556  1.68     pooka 	int rv = -1;
   1557  1.34     pooka 	struct sys_mkdir_args callarg;
   1558  1.34     pooka 
   1559  1.34     pooka 	SPARG(&callarg, path) = path;
   1560  1.34     pooka 	SPARG(&callarg, mode) = mode;
   1561  1.34     pooka 
   1562  1.68     pooka 	error = rsys_syscall(SYS_mkdir, &callarg, sizeof(callarg), retval);
   1563  1.63     pooka 	rsys_seterrno(error);
   1564  1.68     pooka 	if (error == 0) {
   1565  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1566  1.68     pooka 			rv = *(int *)retval;
   1567  1.68     pooka 		else
   1568  1.69     pooka 			rv = *retval;
   1569  1.34     pooka 	}
   1570  1.68     pooka 	return rv;
   1571  1.34     pooka }
   1572  1.53     pooka rsys_alias(sys_mkdir,rump_enosys)
   1573  1.34     pooka 
   1574  1.60     pooka int rump___sysimpl_rmdir(const char *);
   1575  1.34     pooka int
   1576  1.60     pooka rump___sysimpl_rmdir(const char * path)
   1577  1.34     pooka {
   1578  1.68     pooka 	register_t retval[2] = {0, 0};
   1579  1.34     pooka 	int error = 0;
   1580  1.68     pooka 	int rv = -1;
   1581  1.34     pooka 	struct sys_rmdir_args callarg;
   1582  1.34     pooka 
   1583  1.34     pooka 	SPARG(&callarg, path) = path;
   1584  1.34     pooka 
   1585  1.68     pooka 	error = rsys_syscall(SYS_rmdir, &callarg, sizeof(callarg), retval);
   1586  1.63     pooka 	rsys_seterrno(error);
   1587  1.68     pooka 	if (error == 0) {
   1588  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1589  1.68     pooka 			rv = *(int *)retval;
   1590  1.68     pooka 		else
   1591  1.69     pooka 			rv = *retval;
   1592  1.34     pooka 	}
   1593  1.68     pooka 	return rv;
   1594  1.34     pooka }
   1595  1.53     pooka rsys_alias(sys_rmdir,rump_enosys)
   1596  1.34     pooka 
   1597  1.60     pooka int rump___sysimpl_utimes(const char *, const struct timeval *);
   1598  1.60     pooka int
   1599  1.60     pooka rump___sysimpl_utimes(const char * path, const struct timeval * tptr)
   1600  1.60     pooka {
   1601  1.68     pooka 	register_t retval[2] = {0, 0};
   1602  1.60     pooka 	int error = 0;
   1603  1.68     pooka 	int rv = -1;
   1604  1.60     pooka 	struct compat_50_sys_utimes_args callarg;
   1605  1.60     pooka 
   1606  1.60     pooka 	SPARG(&callarg, path) = path;
   1607  1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   1608  1.60     pooka 
   1609  1.68     pooka 	error = rsys_syscall(SYS_compat_50_utimes, &callarg, sizeof(callarg), retval);
   1610  1.63     pooka 	rsys_seterrno(error);
   1611  1.68     pooka 	if (error == 0) {
   1612  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1613  1.68     pooka 			rv = *(int *)retval;
   1614  1.68     pooka 		else
   1615  1.69     pooka 			rv = *retval;
   1616  1.60     pooka 	}
   1617  1.68     pooka 	return rv;
   1618  1.60     pooka }
   1619  1.60     pooka rsys_alias(compat_50_sys_utimes,rump_enosys)
   1620  1.60     pooka 
   1621  1.60     pooka int rump___sysimpl_setsid(void);
   1622  1.49     pooka int
   1623  1.60     pooka rump___sysimpl_setsid(void )
   1624  1.49     pooka {
   1625  1.68     pooka 	register_t retval[2] = {0, 0};
   1626  1.49     pooka 	int error = 0;
   1627  1.68     pooka 	int rv = -1;
   1628  1.49     pooka 
   1629  1.68     pooka 	error = rsys_syscall(SYS_setsid, NULL, 0, retval);
   1630  1.63     pooka 	rsys_seterrno(error);
   1631  1.68     pooka 	if (error == 0) {
   1632  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1633  1.68     pooka 			rv = *(int *)retval;
   1634  1.68     pooka 		else
   1635  1.69     pooka 			rv = *retval;
   1636  1.49     pooka 	}
   1637  1.68     pooka 	return rv;
   1638  1.49     pooka }
   1639  1.53     pooka rsys_alias(sys_setsid,rump_enosys)
   1640  1.49     pooka 
   1641  1.60     pooka int rump___sysimpl_nfssvc(int, void *);
   1642  1.34     pooka int
   1643  1.60     pooka rump___sysimpl_nfssvc(int flag, void * argp)
   1644  1.34     pooka {
   1645  1.68     pooka 	register_t retval[2] = {0, 0};
   1646  1.34     pooka 	int error = 0;
   1647  1.68     pooka 	int rv = -1;
   1648  1.34     pooka 	struct sys_nfssvc_args callarg;
   1649  1.34     pooka 
   1650  1.34     pooka 	SPARG(&callarg, flag) = flag;
   1651  1.34     pooka 	SPARG(&callarg, argp) = argp;
   1652  1.34     pooka 
   1653  1.68     pooka 	error = rsys_syscall(SYS_nfssvc, &callarg, sizeof(callarg), retval);
   1654  1.63     pooka 	rsys_seterrno(error);
   1655  1.68     pooka 	if (error == 0) {
   1656  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1657  1.68     pooka 			rv = *(int *)retval;
   1658  1.68     pooka 		else
   1659  1.69     pooka 			rv = *retval;
   1660  1.34     pooka 	}
   1661  1.68     pooka 	return rv;
   1662  1.34     pooka }
   1663  1.53     pooka rsys_alias(sys_nfssvc,rump_enosys)
   1664  1.34     pooka 
   1665  1.60     pooka ssize_t rump___sysimpl_pread(int, void *, size_t, off_t);
   1666  1.34     pooka ssize_t
   1667  1.60     pooka rump___sysimpl_pread(int fd, void * buf, size_t nbyte, off_t offset)
   1668  1.34     pooka {
   1669  1.68     pooka 	register_t retval[2] = {0, 0};
   1670  1.34     pooka 	int error = 0;
   1671  1.68     pooka 	ssize_t rv = -1;
   1672  1.34     pooka 	struct sys_pread_args callarg;
   1673  1.34     pooka 
   1674  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1675  1.34     pooka 	SPARG(&callarg, buf) = buf;
   1676  1.34     pooka 	SPARG(&callarg, nbyte) = nbyte;
   1677  1.35     pooka 	SPARG(&callarg, PAD) = 0;
   1678  1.34     pooka 	SPARG(&callarg, offset) = offset;
   1679  1.34     pooka 
   1680  1.68     pooka 	error = rsys_syscall(SYS_pread, &callarg, sizeof(callarg), retval);
   1681  1.63     pooka 	rsys_seterrno(error);
   1682  1.68     pooka 	if (error == 0) {
   1683  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1684  1.68     pooka 			rv = *(ssize_t *)retval;
   1685  1.68     pooka 		else
   1686  1.69     pooka 			rv = *retval;
   1687  1.34     pooka 	}
   1688  1.68     pooka 	return rv;
   1689  1.34     pooka }
   1690  1.53     pooka rsys_alias(sys_pread,rump_enosys)
   1691  1.34     pooka 
   1692  1.60     pooka ssize_t rump___sysimpl_pwrite(int, const void *, size_t, off_t);
   1693  1.34     pooka ssize_t
   1694  1.60     pooka rump___sysimpl_pwrite(int fd, const void * buf, size_t nbyte, off_t offset)
   1695  1.34     pooka {
   1696  1.68     pooka 	register_t retval[2] = {0, 0};
   1697  1.34     pooka 	int error = 0;
   1698  1.68     pooka 	ssize_t rv = -1;
   1699  1.34     pooka 	struct sys_pwrite_args callarg;
   1700  1.34     pooka 
   1701  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1702  1.34     pooka 	SPARG(&callarg, buf) = buf;
   1703  1.34     pooka 	SPARG(&callarg, nbyte) = nbyte;
   1704  1.35     pooka 	SPARG(&callarg, PAD) = 0;
   1705  1.34     pooka 	SPARG(&callarg, offset) = offset;
   1706  1.34     pooka 
   1707  1.68     pooka 	error = rsys_syscall(SYS_pwrite, &callarg, sizeof(callarg), retval);
   1708  1.63     pooka 	rsys_seterrno(error);
   1709  1.68     pooka 	if (error == 0) {
   1710  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1711  1.68     pooka 			rv = *(ssize_t *)retval;
   1712  1.68     pooka 		else
   1713  1.69     pooka 			rv = *retval;
   1714  1.34     pooka 	}
   1715  1.68     pooka 	return rv;
   1716  1.34     pooka }
   1717  1.53     pooka rsys_alias(sys_pwrite,rump_enosys)
   1718  1.34     pooka 
   1719  1.60     pooka int rump___sysimpl_setgid(gid_t);
   1720  1.49     pooka int
   1721  1.60     pooka rump___sysimpl_setgid(gid_t gid)
   1722  1.49     pooka {
   1723  1.68     pooka 	register_t retval[2] = {0, 0};
   1724  1.49     pooka 	int error = 0;
   1725  1.68     pooka 	int rv = -1;
   1726  1.49     pooka 	struct sys_setgid_args callarg;
   1727  1.49     pooka 
   1728  1.49     pooka 	SPARG(&callarg, gid) = gid;
   1729  1.49     pooka 
   1730  1.68     pooka 	error = rsys_syscall(SYS_setgid, &callarg, sizeof(callarg), retval);
   1731  1.63     pooka 	rsys_seterrno(error);
   1732  1.68     pooka 	if (error == 0) {
   1733  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1734  1.68     pooka 			rv = *(int *)retval;
   1735  1.68     pooka 		else
   1736  1.69     pooka 			rv = *retval;
   1737  1.49     pooka 	}
   1738  1.68     pooka 	return rv;
   1739  1.49     pooka }
   1740  1.53     pooka rsys_alias(sys_setgid,rump_enosys)
   1741  1.49     pooka 
   1742  1.60     pooka int rump___sysimpl_setegid(gid_t);
   1743  1.49     pooka int
   1744  1.60     pooka rump___sysimpl_setegid(gid_t egid)
   1745  1.49     pooka {
   1746  1.68     pooka 	register_t retval[2] = {0, 0};
   1747  1.49     pooka 	int error = 0;
   1748  1.68     pooka 	int rv = -1;
   1749  1.49     pooka 	struct sys_setegid_args callarg;
   1750  1.49     pooka 
   1751  1.49     pooka 	SPARG(&callarg, egid) = egid;
   1752  1.49     pooka 
   1753  1.68     pooka 	error = rsys_syscall(SYS_setegid, &callarg, sizeof(callarg), retval);
   1754  1.63     pooka 	rsys_seterrno(error);
   1755  1.68     pooka 	if (error == 0) {
   1756  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1757  1.68     pooka 			rv = *(int *)retval;
   1758  1.68     pooka 		else
   1759  1.69     pooka 			rv = *retval;
   1760  1.49     pooka 	}
   1761  1.68     pooka 	return rv;
   1762  1.49     pooka }
   1763  1.53     pooka rsys_alias(sys_setegid,rump_enosys)
   1764  1.49     pooka 
   1765  1.60     pooka int rump___sysimpl_seteuid(uid_t);
   1766  1.49     pooka int
   1767  1.60     pooka rump___sysimpl_seteuid(uid_t euid)
   1768  1.49     pooka {
   1769  1.68     pooka 	register_t retval[2] = {0, 0};
   1770  1.49     pooka 	int error = 0;
   1771  1.68     pooka 	int rv = -1;
   1772  1.49     pooka 	struct sys_seteuid_args callarg;
   1773  1.49     pooka 
   1774  1.49     pooka 	SPARG(&callarg, euid) = euid;
   1775  1.49     pooka 
   1776  1.68     pooka 	error = rsys_syscall(SYS_seteuid, &callarg, sizeof(callarg), retval);
   1777  1.63     pooka 	rsys_seterrno(error);
   1778  1.68     pooka 	if (error == 0) {
   1779  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1780  1.68     pooka 			rv = *(int *)retval;
   1781  1.68     pooka 		else
   1782  1.69     pooka 			rv = *retval;
   1783  1.49     pooka 	}
   1784  1.68     pooka 	return rv;
   1785  1.49     pooka }
   1786  1.53     pooka rsys_alias(sys_seteuid,rump_enosys)
   1787  1.49     pooka 
   1788  1.60     pooka long rump___sysimpl_pathconf(const char *, int);
   1789  1.45     njoly long
   1790  1.60     pooka rump___sysimpl_pathconf(const char * path, int name)
   1791  1.45     njoly {
   1792  1.68     pooka 	register_t retval[2] = {0, 0};
   1793  1.45     njoly 	int error = 0;
   1794  1.68     pooka 	long rv = -1;
   1795  1.45     njoly 	struct sys_pathconf_args callarg;
   1796  1.45     njoly 
   1797  1.45     njoly 	SPARG(&callarg, path) = path;
   1798  1.45     njoly 	SPARG(&callarg, name) = name;
   1799  1.45     njoly 
   1800  1.68     pooka 	error = rsys_syscall(SYS_pathconf, &callarg, sizeof(callarg), retval);
   1801  1.63     pooka 	rsys_seterrno(error);
   1802  1.68     pooka 	if (error == 0) {
   1803  1.68     pooka 		if (sizeof(long) > sizeof(register_t))
   1804  1.68     pooka 			rv = *(long *)retval;
   1805  1.68     pooka 		else
   1806  1.69     pooka 			rv = *retval;
   1807  1.45     njoly 	}
   1808  1.68     pooka 	return rv;
   1809  1.45     njoly }
   1810  1.53     pooka rsys_alias(sys_pathconf,rump_enosys)
   1811  1.45     njoly 
   1812  1.60     pooka long rump___sysimpl_fpathconf(int, int);
   1813  1.45     njoly long
   1814  1.60     pooka rump___sysimpl_fpathconf(int fd, int name)
   1815  1.45     njoly {
   1816  1.68     pooka 	register_t retval[2] = {0, 0};
   1817  1.45     njoly 	int error = 0;
   1818  1.68     pooka 	long rv = -1;
   1819  1.45     njoly 	struct sys_fpathconf_args callarg;
   1820  1.45     njoly 
   1821  1.45     njoly 	SPARG(&callarg, fd) = fd;
   1822  1.45     njoly 	SPARG(&callarg, name) = name;
   1823  1.45     njoly 
   1824  1.68     pooka 	error = rsys_syscall(SYS_fpathconf, &callarg, sizeof(callarg), retval);
   1825  1.63     pooka 	rsys_seterrno(error);
   1826  1.68     pooka 	if (error == 0) {
   1827  1.68     pooka 		if (sizeof(long) > sizeof(register_t))
   1828  1.68     pooka 			rv = *(long *)retval;
   1829  1.68     pooka 		else
   1830  1.69     pooka 			rv = *retval;
   1831  1.45     njoly 	}
   1832  1.68     pooka 	return rv;
   1833  1.45     njoly }
   1834  1.53     pooka rsys_alias(sys_fpathconf,rump_enosys)
   1835  1.45     njoly 
   1836  1.60     pooka int rump___sysimpl_getrlimit(int, struct rlimit *);
   1837  1.42     pooka int
   1838  1.60     pooka rump___sysimpl_getrlimit(int which, struct rlimit * rlp)
   1839  1.42     pooka {
   1840  1.68     pooka 	register_t retval[2] = {0, 0};
   1841  1.42     pooka 	int error = 0;
   1842  1.68     pooka 	int rv = -1;
   1843  1.42     pooka 	struct sys_getrlimit_args callarg;
   1844  1.42     pooka 
   1845  1.42     pooka 	SPARG(&callarg, which) = which;
   1846  1.42     pooka 	SPARG(&callarg, rlp) = rlp;
   1847  1.42     pooka 
   1848  1.68     pooka 	error = rsys_syscall(SYS_getrlimit, &callarg, sizeof(callarg), retval);
   1849  1.63     pooka 	rsys_seterrno(error);
   1850  1.68     pooka 	if (error == 0) {
   1851  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1852  1.68     pooka 			rv = *(int *)retval;
   1853  1.68     pooka 		else
   1854  1.69     pooka 			rv = *retval;
   1855  1.42     pooka 	}
   1856  1.68     pooka 	return rv;
   1857  1.42     pooka }
   1858  1.53     pooka rsys_alias(sys_getrlimit,rump_enosys)
   1859  1.42     pooka 
   1860  1.60     pooka int rump___sysimpl_setrlimit(int, const struct rlimit *);
   1861  1.42     pooka int
   1862  1.60     pooka rump___sysimpl_setrlimit(int which, const struct rlimit * rlp)
   1863  1.42     pooka {
   1864  1.68     pooka 	register_t retval[2] = {0, 0};
   1865  1.42     pooka 	int error = 0;
   1866  1.68     pooka 	int rv = -1;
   1867  1.42     pooka 	struct sys_setrlimit_args callarg;
   1868  1.42     pooka 
   1869  1.42     pooka 	SPARG(&callarg, which) = which;
   1870  1.42     pooka 	SPARG(&callarg, rlp) = rlp;
   1871  1.42     pooka 
   1872  1.68     pooka 	error = rsys_syscall(SYS_setrlimit, &callarg, sizeof(callarg), retval);
   1873  1.63     pooka 	rsys_seterrno(error);
   1874  1.68     pooka 	if (error == 0) {
   1875  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1876  1.68     pooka 			rv = *(int *)retval;
   1877  1.68     pooka 		else
   1878  1.69     pooka 			rv = *retval;
   1879  1.42     pooka 	}
   1880  1.68     pooka 	return rv;
   1881  1.42     pooka }
   1882  1.53     pooka rsys_alias(sys_setrlimit,rump_enosys)
   1883  1.42     pooka 
   1884  1.60     pooka off_t rump___sysimpl_lseek(int, off_t, int);
   1885  1.34     pooka off_t
   1886  1.60     pooka rump___sysimpl_lseek(int fd, off_t offset, int whence)
   1887  1.34     pooka {
   1888  1.68     pooka 	register_t retval[2] = {0, 0};
   1889  1.34     pooka 	int error = 0;
   1890  1.68     pooka 	off_t rv = -1;
   1891  1.34     pooka 	struct sys_lseek_args callarg;
   1892  1.34     pooka 
   1893  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1894  1.35     pooka 	SPARG(&callarg, PAD) = 0;
   1895  1.34     pooka 	SPARG(&callarg, offset) = offset;
   1896  1.34     pooka 	SPARG(&callarg, whence) = whence;
   1897  1.34     pooka 
   1898  1.68     pooka 	error = rsys_syscall(SYS_lseek, &callarg, sizeof(callarg), retval);
   1899  1.63     pooka 	rsys_seterrno(error);
   1900  1.68     pooka 	if (error == 0) {
   1901  1.68     pooka 		if (sizeof(off_t) > sizeof(register_t))
   1902  1.68     pooka 			rv = *(off_t *)retval;
   1903  1.68     pooka 		else
   1904  1.69     pooka 			rv = *retval;
   1905  1.34     pooka 	}
   1906  1.68     pooka 	return rv;
   1907  1.34     pooka }
   1908  1.53     pooka rsys_alias(sys_lseek,rump_enosys)
   1909  1.34     pooka 
   1910  1.60     pooka int rump___sysimpl_truncate(const char *, off_t);
   1911  1.34     pooka int
   1912  1.60     pooka rump___sysimpl_truncate(const char * path, off_t length)
   1913  1.34     pooka {
   1914  1.68     pooka 	register_t retval[2] = {0, 0};
   1915  1.34     pooka 	int error = 0;
   1916  1.68     pooka 	int rv = -1;
   1917  1.34     pooka 	struct sys_truncate_args callarg;
   1918  1.34     pooka 
   1919  1.34     pooka 	SPARG(&callarg, path) = path;
   1920  1.35     pooka 	SPARG(&callarg, PAD) = 0;
   1921  1.34     pooka 	SPARG(&callarg, length) = length;
   1922  1.34     pooka 
   1923  1.68     pooka 	error = rsys_syscall(SYS_truncate, &callarg, sizeof(callarg), retval);
   1924  1.63     pooka 	rsys_seterrno(error);
   1925  1.68     pooka 	if (error == 0) {
   1926  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1927  1.68     pooka 			rv = *(int *)retval;
   1928  1.68     pooka 		else
   1929  1.69     pooka 			rv = *retval;
   1930  1.34     pooka 	}
   1931  1.68     pooka 	return rv;
   1932  1.34     pooka }
   1933  1.53     pooka rsys_alias(sys_truncate,rump_enosys)
   1934  1.34     pooka 
   1935  1.60     pooka int rump___sysimpl_ftruncate(int, off_t);
   1936  1.34     pooka int
   1937  1.60     pooka rump___sysimpl_ftruncate(int fd, off_t length)
   1938  1.34     pooka {
   1939  1.68     pooka 	register_t retval[2] = {0, 0};
   1940  1.34     pooka 	int error = 0;
   1941  1.68     pooka 	int rv = -1;
   1942  1.34     pooka 	struct sys_ftruncate_args callarg;
   1943  1.34     pooka 
   1944  1.34     pooka 	SPARG(&callarg, fd) = fd;
   1945  1.35     pooka 	SPARG(&callarg, PAD) = 0;
   1946  1.34     pooka 	SPARG(&callarg, length) = length;
   1947  1.34     pooka 
   1948  1.68     pooka 	error = rsys_syscall(SYS_ftruncate, &callarg, sizeof(callarg), retval);
   1949  1.63     pooka 	rsys_seterrno(error);
   1950  1.68     pooka 	if (error == 0) {
   1951  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1952  1.68     pooka 			rv = *(int *)retval;
   1953  1.68     pooka 		else
   1954  1.69     pooka 			rv = *retval;
   1955  1.34     pooka 	}
   1956  1.68     pooka 	return rv;
   1957  1.34     pooka }
   1958  1.53     pooka rsys_alias(sys_ftruncate,rump_enosys)
   1959  1.34     pooka 
   1960  1.60     pooka int rump___sysimpl___sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
   1961  1.34     pooka int
   1962  1.60     pooka rump___sysimpl___sysctl(const int * name, u_int namelen, void * old, size_t * oldlenp, const void * new, size_t newlen)
   1963  1.34     pooka {
   1964  1.68     pooka 	register_t retval[2] = {0, 0};
   1965  1.34     pooka 	int error = 0;
   1966  1.68     pooka 	int rv = -1;
   1967  1.34     pooka 	struct sys___sysctl_args callarg;
   1968  1.34     pooka 
   1969  1.34     pooka 	SPARG(&callarg, name) = name;
   1970  1.34     pooka 	SPARG(&callarg, namelen) = namelen;
   1971  1.34     pooka 	SPARG(&callarg, old) = old;
   1972  1.34     pooka 	SPARG(&callarg, oldlenp) = oldlenp;
   1973  1.34     pooka 	SPARG(&callarg, new) = new;
   1974  1.34     pooka 	SPARG(&callarg, newlen) = newlen;
   1975  1.34     pooka 
   1976  1.68     pooka 	error = rsys_syscall(SYS___sysctl, &callarg, sizeof(callarg), retval);
   1977  1.63     pooka 	rsys_seterrno(error);
   1978  1.68     pooka 	if (error == 0) {
   1979  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1980  1.68     pooka 			rv = *(int *)retval;
   1981  1.68     pooka 		else
   1982  1.69     pooka 			rv = *retval;
   1983  1.34     pooka 	}
   1984  1.68     pooka 	return rv;
   1985  1.34     pooka }
   1986  1.53     pooka rsys_alias(sys___sysctl,rump_enosys)
   1987  1.34     pooka 
   1988  1.60     pooka int rump___sysimpl_futimes(int, const struct timeval *);
   1989  1.60     pooka int
   1990  1.60     pooka rump___sysimpl_futimes(int fd, const struct timeval * tptr)
   1991  1.60     pooka {
   1992  1.68     pooka 	register_t retval[2] = {0, 0};
   1993  1.60     pooka 	int error = 0;
   1994  1.68     pooka 	int rv = -1;
   1995  1.60     pooka 	struct compat_50_sys_futimes_args callarg;
   1996  1.60     pooka 
   1997  1.60     pooka 	SPARG(&callarg, fd) = fd;
   1998  1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   1999  1.60     pooka 
   2000  1.68     pooka 	error = rsys_syscall(SYS_compat_50_futimes, &callarg, sizeof(callarg), retval);
   2001  1.63     pooka 	rsys_seterrno(error);
   2002  1.68     pooka 	if (error == 0) {
   2003  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2004  1.68     pooka 			rv = *(int *)retval;
   2005  1.68     pooka 		else
   2006  1.69     pooka 			rv = *retval;
   2007  1.60     pooka 	}
   2008  1.68     pooka 	return rv;
   2009  1.60     pooka }
   2010  1.60     pooka rsys_alias(compat_50_sys_futimes,rump_enosys)
   2011  1.60     pooka 
   2012  1.60     pooka pid_t rump___sysimpl_getpgid(pid_t);
   2013  1.49     pooka pid_t
   2014  1.60     pooka rump___sysimpl_getpgid(pid_t pid)
   2015  1.49     pooka {
   2016  1.68     pooka 	register_t retval[2] = {0, 0};
   2017  1.49     pooka 	int error = 0;
   2018  1.68     pooka 	pid_t rv = -1;
   2019  1.49     pooka 	struct sys_getpgid_args callarg;
   2020  1.49     pooka 
   2021  1.49     pooka 	SPARG(&callarg, pid) = pid;
   2022  1.49     pooka 
   2023  1.68     pooka 	error = rsys_syscall(SYS_getpgid, &callarg, sizeof(callarg), retval);
   2024  1.63     pooka 	rsys_seterrno(error);
   2025  1.68     pooka 	if (error == 0) {
   2026  1.68     pooka 		if (sizeof(pid_t) > sizeof(register_t))
   2027  1.68     pooka 			rv = *(pid_t *)retval;
   2028  1.68     pooka 		else
   2029  1.69     pooka 			rv = *retval;
   2030  1.49     pooka 	}
   2031  1.68     pooka 	return rv;
   2032  1.49     pooka }
   2033  1.53     pooka rsys_alias(sys_getpgid,rump_enosys)
   2034  1.49     pooka 
   2035  1.60     pooka int rump___sysimpl_reboot(int, char *);
   2036  1.34     pooka int
   2037  1.60     pooka rump___sysimpl_reboot(int opt, char * bootstr)
   2038  1.34     pooka {
   2039  1.68     pooka 	register_t retval[2] = {0, 0};
   2040  1.34     pooka 	int error = 0;
   2041  1.68     pooka 	int rv = -1;
   2042  1.34     pooka 	struct sys_reboot_args callarg;
   2043  1.34     pooka 
   2044  1.34     pooka 	SPARG(&callarg, opt) = opt;
   2045  1.34     pooka 	SPARG(&callarg, bootstr) = bootstr;
   2046  1.34     pooka 
   2047  1.68     pooka 	error = rsys_syscall(SYS_reboot, &callarg, sizeof(callarg), retval);
   2048  1.63     pooka 	rsys_seterrno(error);
   2049  1.68     pooka 	if (error == 0) {
   2050  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2051  1.68     pooka 			rv = *(int *)retval;
   2052  1.68     pooka 		else
   2053  1.69     pooka 			rv = *retval;
   2054  1.34     pooka 	}
   2055  1.68     pooka 	return rv;
   2056  1.34     pooka }
   2057  1.53     pooka rsys_alias(sys_reboot,rump_enosys)
   2058  1.34     pooka 
   2059  1.60     pooka int rump___sysimpl_poll(struct pollfd *, u_int, int);
   2060  1.34     pooka int
   2061  1.60     pooka rump___sysimpl_poll(struct pollfd * fds, u_int nfds, int timeout)
   2062  1.34     pooka {
   2063  1.68     pooka 	register_t retval[2] = {0, 0};
   2064  1.34     pooka 	int error = 0;
   2065  1.68     pooka 	int rv = -1;
   2066  1.34     pooka 	struct sys_poll_args callarg;
   2067  1.34     pooka 
   2068  1.34     pooka 	SPARG(&callarg, fds) = fds;
   2069  1.34     pooka 	SPARG(&callarg, nfds) = nfds;
   2070  1.34     pooka 	SPARG(&callarg, timeout) = timeout;
   2071  1.34     pooka 
   2072  1.68     pooka 	error = rsys_syscall(SYS_poll, &callarg, sizeof(callarg), retval);
   2073  1.63     pooka 	rsys_seterrno(error);
   2074  1.68     pooka 	if (error == 0) {
   2075  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2076  1.68     pooka 			rv = *(int *)retval;
   2077  1.68     pooka 		else
   2078  1.69     pooka 			rv = *retval;
   2079  1.34     pooka 	}
   2080  1.68     pooka 	return rv;
   2081  1.34     pooka }
   2082  1.53     pooka rsys_alias(sys_poll,rump_enosys)
   2083  1.34     pooka 
   2084  1.60     pooka int rump___sysimpl_fdatasync(int);
   2085  1.34     pooka int
   2086  1.60     pooka rump___sysimpl_fdatasync(int fd)
   2087  1.34     pooka {
   2088  1.68     pooka 	register_t retval[2] = {0, 0};
   2089  1.34     pooka 	int error = 0;
   2090  1.68     pooka 	int rv = -1;
   2091  1.34     pooka 	struct sys_fdatasync_args callarg;
   2092  1.34     pooka 
   2093  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2094  1.34     pooka 
   2095  1.68     pooka 	error = rsys_syscall(SYS_fdatasync, &callarg, sizeof(callarg), retval);
   2096  1.63     pooka 	rsys_seterrno(error);
   2097  1.68     pooka 	if (error == 0) {
   2098  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2099  1.68     pooka 			rv = *(int *)retval;
   2100  1.68     pooka 		else
   2101  1.69     pooka 			rv = *retval;
   2102  1.34     pooka 	}
   2103  1.68     pooka 	return rv;
   2104  1.34     pooka }
   2105  1.53     pooka rsys_alias(sys_fdatasync,rump_enosys)
   2106  1.34     pooka 
   2107  1.60     pooka int rump___sysimpl_modctl(int, void *);
   2108  1.38     pooka int
   2109  1.60     pooka rump___sysimpl_modctl(int cmd, void * arg)
   2110  1.38     pooka {
   2111  1.68     pooka 	register_t retval[2] = {0, 0};
   2112  1.38     pooka 	int error = 0;
   2113  1.68     pooka 	int rv = -1;
   2114  1.38     pooka 	struct sys_modctl_args callarg;
   2115  1.38     pooka 
   2116  1.38     pooka 	SPARG(&callarg, cmd) = cmd;
   2117  1.38     pooka 	SPARG(&callarg, arg) = arg;
   2118  1.38     pooka 
   2119  1.68     pooka 	error = rsys_syscall(SYS_modctl, &callarg, sizeof(callarg), retval);
   2120  1.63     pooka 	rsys_seterrno(error);
   2121  1.68     pooka 	if (error == 0) {
   2122  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2123  1.68     pooka 			rv = *(int *)retval;
   2124  1.68     pooka 		else
   2125  1.69     pooka 			rv = *retval;
   2126  1.38     pooka 	}
   2127  1.68     pooka 	return rv;
   2128  1.38     pooka }
   2129  1.53     pooka rsys_alias(sys_modctl,rump_enosys)
   2130  1.38     pooka 
   2131  1.60     pooka int rump___sysimpl__ksem_init(unsigned int, intptr_t *);
   2132  1.46     pooka int
   2133  1.60     pooka rump___sysimpl__ksem_init(unsigned int value, intptr_t * idp)
   2134  1.46     pooka {
   2135  1.68     pooka 	register_t retval[2] = {0, 0};
   2136  1.46     pooka 	int error = 0;
   2137  1.68     pooka 	int rv = -1;
   2138  1.46     pooka 	struct sys__ksem_init_args callarg;
   2139  1.46     pooka 
   2140  1.46     pooka 	SPARG(&callarg, value) = value;
   2141  1.46     pooka 	SPARG(&callarg, idp) = idp;
   2142  1.46     pooka 
   2143  1.68     pooka 	error = rsys_syscall(SYS__ksem_init, &callarg, sizeof(callarg), retval);
   2144  1.63     pooka 	rsys_seterrno(error);
   2145  1.68     pooka 	if (error == 0) {
   2146  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2147  1.68     pooka 			rv = *(int *)retval;
   2148  1.68     pooka 		else
   2149  1.69     pooka 			rv = *retval;
   2150  1.46     pooka 	}
   2151  1.68     pooka 	return rv;
   2152  1.46     pooka }
   2153  1.53     pooka rsys_alias(sys__ksem_init,rump_enosys)
   2154  1.46     pooka 
   2155  1.60     pooka int rump___sysimpl__ksem_open(const char *, int, mode_t, unsigned int, intptr_t *);
   2156  1.46     pooka int
   2157  1.60     pooka rump___sysimpl__ksem_open(const char * name, int oflag, mode_t mode, unsigned int value, intptr_t * idp)
   2158  1.46     pooka {
   2159  1.68     pooka 	register_t retval[2] = {0, 0};
   2160  1.46     pooka 	int error = 0;
   2161  1.68     pooka 	int rv = -1;
   2162  1.46     pooka 	struct sys__ksem_open_args callarg;
   2163  1.46     pooka 
   2164  1.46     pooka 	SPARG(&callarg, name) = name;
   2165  1.46     pooka 	SPARG(&callarg, oflag) = oflag;
   2166  1.46     pooka 	SPARG(&callarg, mode) = mode;
   2167  1.46     pooka 	SPARG(&callarg, value) = value;
   2168  1.46     pooka 	SPARG(&callarg, idp) = idp;
   2169  1.46     pooka 
   2170  1.68     pooka 	error = rsys_syscall(SYS__ksem_open, &callarg, sizeof(callarg), retval);
   2171  1.63     pooka 	rsys_seterrno(error);
   2172  1.68     pooka 	if (error == 0) {
   2173  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2174  1.68     pooka 			rv = *(int *)retval;
   2175  1.68     pooka 		else
   2176  1.69     pooka 			rv = *retval;
   2177  1.46     pooka 	}
   2178  1.68     pooka 	return rv;
   2179  1.46     pooka }
   2180  1.53     pooka rsys_alias(sys__ksem_open,rump_enosys)
   2181  1.46     pooka 
   2182  1.60     pooka int rump___sysimpl__ksem_unlink(const char *);
   2183  1.46     pooka int
   2184  1.60     pooka rump___sysimpl__ksem_unlink(const char * name)
   2185  1.46     pooka {
   2186  1.68     pooka 	register_t retval[2] = {0, 0};
   2187  1.46     pooka 	int error = 0;
   2188  1.68     pooka 	int rv = -1;
   2189  1.46     pooka 	struct sys__ksem_unlink_args callarg;
   2190  1.46     pooka 
   2191  1.46     pooka 	SPARG(&callarg, name) = name;
   2192  1.46     pooka 
   2193  1.68     pooka 	error = rsys_syscall(SYS__ksem_unlink, &callarg, sizeof(callarg), retval);
   2194  1.63     pooka 	rsys_seterrno(error);
   2195  1.68     pooka 	if (error == 0) {
   2196  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2197  1.68     pooka 			rv = *(int *)retval;
   2198  1.68     pooka 		else
   2199  1.69     pooka 			rv = *retval;
   2200  1.46     pooka 	}
   2201  1.68     pooka 	return rv;
   2202  1.46     pooka }
   2203  1.53     pooka rsys_alias(sys__ksem_unlink,rump_enosys)
   2204  1.46     pooka 
   2205  1.60     pooka int rump___sysimpl__ksem_close(intptr_t);
   2206  1.46     pooka int
   2207  1.60     pooka rump___sysimpl__ksem_close(intptr_t id)
   2208  1.46     pooka {
   2209  1.68     pooka 	register_t retval[2] = {0, 0};
   2210  1.46     pooka 	int error = 0;
   2211  1.68     pooka 	int rv = -1;
   2212  1.46     pooka 	struct sys__ksem_close_args callarg;
   2213  1.46     pooka 
   2214  1.46     pooka 	SPARG(&callarg, id) = id;
   2215  1.46     pooka 
   2216  1.68     pooka 	error = rsys_syscall(SYS__ksem_close, &callarg, sizeof(callarg), retval);
   2217  1.63     pooka 	rsys_seterrno(error);
   2218  1.68     pooka 	if (error == 0) {
   2219  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2220  1.68     pooka 			rv = *(int *)retval;
   2221  1.68     pooka 		else
   2222  1.69     pooka 			rv = *retval;
   2223  1.46     pooka 	}
   2224  1.68     pooka 	return rv;
   2225  1.46     pooka }
   2226  1.53     pooka rsys_alias(sys__ksem_close,rump_enosys)
   2227  1.46     pooka 
   2228  1.60     pooka int rump___sysimpl__ksem_post(intptr_t);
   2229  1.46     pooka int
   2230  1.60     pooka rump___sysimpl__ksem_post(intptr_t id)
   2231  1.46     pooka {
   2232  1.68     pooka 	register_t retval[2] = {0, 0};
   2233  1.46     pooka 	int error = 0;
   2234  1.68     pooka 	int rv = -1;
   2235  1.46     pooka 	struct sys__ksem_post_args callarg;
   2236  1.46     pooka 
   2237  1.46     pooka 	SPARG(&callarg, id) = id;
   2238  1.46     pooka 
   2239  1.68     pooka 	error = rsys_syscall(SYS__ksem_post, &callarg, sizeof(callarg), retval);
   2240  1.63     pooka 	rsys_seterrno(error);
   2241  1.68     pooka 	if (error == 0) {
   2242  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2243  1.68     pooka 			rv = *(int *)retval;
   2244  1.68     pooka 		else
   2245  1.69     pooka 			rv = *retval;
   2246  1.46     pooka 	}
   2247  1.68     pooka 	return rv;
   2248  1.46     pooka }
   2249  1.53     pooka rsys_alias(sys__ksem_post,rump_enosys)
   2250  1.46     pooka 
   2251  1.60     pooka int rump___sysimpl__ksem_wait(intptr_t);
   2252  1.46     pooka int
   2253  1.60     pooka rump___sysimpl__ksem_wait(intptr_t id)
   2254  1.46     pooka {
   2255  1.68     pooka 	register_t retval[2] = {0, 0};
   2256  1.46     pooka 	int error = 0;
   2257  1.68     pooka 	int rv = -1;
   2258  1.46     pooka 	struct sys__ksem_wait_args callarg;
   2259  1.46     pooka 
   2260  1.46     pooka 	SPARG(&callarg, id) = id;
   2261  1.46     pooka 
   2262  1.68     pooka 	error = rsys_syscall(SYS__ksem_wait, &callarg, sizeof(callarg), retval);
   2263  1.63     pooka 	rsys_seterrno(error);
   2264  1.68     pooka 	if (error == 0) {
   2265  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2266  1.68     pooka 			rv = *(int *)retval;
   2267  1.68     pooka 		else
   2268  1.69     pooka 			rv = *retval;
   2269  1.46     pooka 	}
   2270  1.68     pooka 	return rv;
   2271  1.46     pooka }
   2272  1.53     pooka rsys_alias(sys__ksem_wait,rump_enosys)
   2273  1.46     pooka 
   2274  1.60     pooka int rump___sysimpl__ksem_trywait(intptr_t);
   2275  1.46     pooka int
   2276  1.60     pooka rump___sysimpl__ksem_trywait(intptr_t id)
   2277  1.46     pooka {
   2278  1.68     pooka 	register_t retval[2] = {0, 0};
   2279  1.46     pooka 	int error = 0;
   2280  1.68     pooka 	int rv = -1;
   2281  1.46     pooka 	struct sys__ksem_trywait_args callarg;
   2282  1.46     pooka 
   2283  1.46     pooka 	SPARG(&callarg, id) = id;
   2284  1.46     pooka 
   2285  1.68     pooka 	error = rsys_syscall(SYS__ksem_trywait, &callarg, sizeof(callarg), retval);
   2286  1.63     pooka 	rsys_seterrno(error);
   2287  1.68     pooka 	if (error == 0) {
   2288  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2289  1.68     pooka 			rv = *(int *)retval;
   2290  1.68     pooka 		else
   2291  1.69     pooka 			rv = *retval;
   2292  1.46     pooka 	}
   2293  1.68     pooka 	return rv;
   2294  1.46     pooka }
   2295  1.53     pooka rsys_alias(sys__ksem_trywait,rump_enosys)
   2296  1.46     pooka 
   2297  1.60     pooka int rump___sysimpl__ksem_getvalue(intptr_t, unsigned int *);
   2298  1.46     pooka int
   2299  1.60     pooka rump___sysimpl__ksem_getvalue(intptr_t id, unsigned int * value)
   2300  1.46     pooka {
   2301  1.68     pooka 	register_t retval[2] = {0, 0};
   2302  1.46     pooka 	int error = 0;
   2303  1.68     pooka 	int rv = -1;
   2304  1.46     pooka 	struct sys__ksem_getvalue_args callarg;
   2305  1.46     pooka 
   2306  1.46     pooka 	SPARG(&callarg, id) = id;
   2307  1.46     pooka 	SPARG(&callarg, value) = value;
   2308  1.46     pooka 
   2309  1.68     pooka 	error = rsys_syscall(SYS__ksem_getvalue, &callarg, sizeof(callarg), retval);
   2310  1.63     pooka 	rsys_seterrno(error);
   2311  1.68     pooka 	if (error == 0) {
   2312  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2313  1.68     pooka 			rv = *(int *)retval;
   2314  1.68     pooka 		else
   2315  1.69     pooka 			rv = *retval;
   2316  1.46     pooka 	}
   2317  1.68     pooka 	return rv;
   2318  1.46     pooka }
   2319  1.53     pooka rsys_alias(sys__ksem_getvalue,rump_enosys)
   2320  1.46     pooka 
   2321  1.60     pooka int rump___sysimpl__ksem_destroy(intptr_t);
   2322  1.46     pooka int
   2323  1.60     pooka rump___sysimpl__ksem_destroy(intptr_t id)
   2324  1.46     pooka {
   2325  1.68     pooka 	register_t retval[2] = {0, 0};
   2326  1.46     pooka 	int error = 0;
   2327  1.68     pooka 	int rv = -1;
   2328  1.46     pooka 	struct sys__ksem_destroy_args callarg;
   2329  1.46     pooka 
   2330  1.46     pooka 	SPARG(&callarg, id) = id;
   2331  1.46     pooka 
   2332  1.68     pooka 	error = rsys_syscall(SYS__ksem_destroy, &callarg, sizeof(callarg), retval);
   2333  1.63     pooka 	rsys_seterrno(error);
   2334  1.68     pooka 	if (error == 0) {
   2335  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2336  1.68     pooka 			rv = *(int *)retval;
   2337  1.68     pooka 		else
   2338  1.69     pooka 			rv = *retval;
   2339  1.46     pooka 	}
   2340  1.68     pooka 	return rv;
   2341  1.46     pooka }
   2342  1.53     pooka rsys_alias(sys__ksem_destroy,rump_enosys)
   2343  1.46     pooka 
   2344  1.78     joerg int rump___sysimpl__ksem_timedwait(intptr_t, const struct timespec *);
   2345  1.78     joerg int
   2346  1.78     joerg rump___sysimpl__ksem_timedwait(intptr_t id, const struct timespec * abstime)
   2347  1.78     joerg {
   2348  1.78     joerg 	register_t retval[2] = {0, 0};
   2349  1.78     joerg 	int error = 0;
   2350  1.78     joerg 	int rv = -1;
   2351  1.78     joerg 	struct sys__ksem_timedwait_args callarg;
   2352  1.78     joerg 
   2353  1.78     joerg 	SPARG(&callarg, id) = id;
   2354  1.78     joerg 	SPARG(&callarg, abstime) = abstime;
   2355  1.78     joerg 
   2356  1.78     joerg 	error = rsys_syscall(SYS__ksem_timedwait, &callarg, sizeof(callarg), retval);
   2357  1.78     joerg 	rsys_seterrno(error);
   2358  1.78     joerg 	if (error == 0) {
   2359  1.78     joerg 		if (sizeof(int) > sizeof(register_t))
   2360  1.78     joerg 			rv = *(int *)retval;
   2361  1.78     joerg 		else
   2362  1.78     joerg 			rv = *retval;
   2363  1.78     joerg 	}
   2364  1.78     joerg 	return rv;
   2365  1.78     joerg }
   2366  1.78     joerg rsys_alias(sys__ksem_timedwait,rump_enosys)
   2367  1.78     joerg 
   2368  1.60     pooka int rump___sysimpl_lchmod(const char *, mode_t);
   2369  1.34     pooka int
   2370  1.60     pooka rump___sysimpl_lchmod(const char * path, mode_t mode)
   2371  1.34     pooka {
   2372  1.68     pooka 	register_t retval[2] = {0, 0};
   2373  1.34     pooka 	int error = 0;
   2374  1.68     pooka 	int rv = -1;
   2375  1.34     pooka 	struct sys_lchmod_args callarg;
   2376  1.34     pooka 
   2377  1.34     pooka 	SPARG(&callarg, path) = path;
   2378  1.34     pooka 	SPARG(&callarg, mode) = mode;
   2379  1.34     pooka 
   2380  1.68     pooka 	error = rsys_syscall(SYS_lchmod, &callarg, sizeof(callarg), retval);
   2381  1.63     pooka 	rsys_seterrno(error);
   2382  1.68     pooka 	if (error == 0) {
   2383  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2384  1.68     pooka 			rv = *(int *)retval;
   2385  1.68     pooka 		else
   2386  1.69     pooka 			rv = *retval;
   2387  1.34     pooka 	}
   2388  1.68     pooka 	return rv;
   2389  1.34     pooka }
   2390  1.53     pooka rsys_alias(sys_lchmod,rump_enosys)
   2391  1.34     pooka 
   2392  1.60     pooka int rump___sysimpl_lchown(const char *, uid_t, gid_t);
   2393  1.34     pooka int
   2394  1.60     pooka rump___sysimpl_lchown(const char * path, uid_t uid, gid_t gid)
   2395  1.34     pooka {
   2396  1.68     pooka 	register_t retval[2] = {0, 0};
   2397  1.34     pooka 	int error = 0;
   2398  1.68     pooka 	int rv = -1;
   2399  1.34     pooka 	struct sys_lchown_args callarg;
   2400  1.34     pooka 
   2401  1.34     pooka 	SPARG(&callarg, path) = path;
   2402  1.34     pooka 	SPARG(&callarg, uid) = uid;
   2403  1.34     pooka 	SPARG(&callarg, gid) = gid;
   2404  1.34     pooka 
   2405  1.68     pooka 	error = rsys_syscall(SYS_lchown, &callarg, sizeof(callarg), retval);
   2406  1.63     pooka 	rsys_seterrno(error);
   2407  1.68     pooka 	if (error == 0) {
   2408  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2409  1.68     pooka 			rv = *(int *)retval;
   2410  1.68     pooka 		else
   2411  1.69     pooka 			rv = *retval;
   2412  1.34     pooka 	}
   2413  1.68     pooka 	return rv;
   2414  1.34     pooka }
   2415  1.53     pooka rsys_alias(sys_lchown,rump_enosys)
   2416  1.34     pooka 
   2417  1.60     pooka int rump___sysimpl_lutimes(const char *, const struct timeval *);
   2418  1.60     pooka int
   2419  1.60     pooka rump___sysimpl_lutimes(const char * path, const struct timeval * tptr)
   2420  1.60     pooka {
   2421  1.68     pooka 	register_t retval[2] = {0, 0};
   2422  1.60     pooka 	int error = 0;
   2423  1.68     pooka 	int rv = -1;
   2424  1.60     pooka 	struct compat_50_sys_lutimes_args callarg;
   2425  1.60     pooka 
   2426  1.60     pooka 	SPARG(&callarg, path) = path;
   2427  1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   2428  1.60     pooka 
   2429  1.68     pooka 	error = rsys_syscall(SYS_compat_50_lutimes, &callarg, sizeof(callarg), retval);
   2430  1.63     pooka 	rsys_seterrno(error);
   2431  1.68     pooka 	if (error == 0) {
   2432  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2433  1.68     pooka 			rv = *(int *)retval;
   2434  1.68     pooka 		else
   2435  1.69     pooka 			rv = *retval;
   2436  1.60     pooka 	}
   2437  1.68     pooka 	return rv;
   2438  1.60     pooka }
   2439  1.60     pooka rsys_alias(compat_50_sys_lutimes,rump_enosys)
   2440  1.60     pooka 
   2441  1.60     pooka pid_t rump___sysimpl_getsid(pid_t);
   2442  1.49     pooka pid_t
   2443  1.60     pooka rump___sysimpl_getsid(pid_t pid)
   2444  1.49     pooka {
   2445  1.68     pooka 	register_t retval[2] = {0, 0};
   2446  1.49     pooka 	int error = 0;
   2447  1.68     pooka 	pid_t rv = -1;
   2448  1.49     pooka 	struct sys_getsid_args callarg;
   2449  1.49     pooka 
   2450  1.49     pooka 	SPARG(&callarg, pid) = pid;
   2451  1.49     pooka 
   2452  1.68     pooka 	error = rsys_syscall(SYS_getsid, &callarg, sizeof(callarg), retval);
   2453  1.63     pooka 	rsys_seterrno(error);
   2454  1.68     pooka 	if (error == 0) {
   2455  1.68     pooka 		if (sizeof(pid_t) > sizeof(register_t))
   2456  1.68     pooka 			rv = *(pid_t *)retval;
   2457  1.68     pooka 		else
   2458  1.69     pooka 			rv = *retval;
   2459  1.49     pooka 	}
   2460  1.68     pooka 	return rv;
   2461  1.49     pooka }
   2462  1.53     pooka rsys_alias(sys_getsid,rump_enosys)
   2463  1.49     pooka 
   2464  1.64     pooka ssize_t rump___sysimpl_preadv(int, const struct iovec *, int, off_t);
   2465  1.64     pooka ssize_t
   2466  1.64     pooka rump___sysimpl_preadv(int fd, const struct iovec * iovp, int iovcnt, off_t offset)
   2467  1.64     pooka {
   2468  1.68     pooka 	register_t retval[2] = {0, 0};
   2469  1.64     pooka 	int error = 0;
   2470  1.68     pooka 	ssize_t rv = -1;
   2471  1.64     pooka 	struct sys_preadv_args callarg;
   2472  1.64     pooka 
   2473  1.64     pooka 	SPARG(&callarg, fd) = fd;
   2474  1.64     pooka 	SPARG(&callarg, iovp) = iovp;
   2475  1.64     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   2476  1.64     pooka 	SPARG(&callarg, PAD) = 0;
   2477  1.64     pooka 	SPARG(&callarg, offset) = offset;
   2478  1.64     pooka 
   2479  1.68     pooka 	error = rsys_syscall(SYS_preadv, &callarg, sizeof(callarg), retval);
   2480  1.64     pooka 	rsys_seterrno(error);
   2481  1.68     pooka 	if (error == 0) {
   2482  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2483  1.68     pooka 			rv = *(ssize_t *)retval;
   2484  1.68     pooka 		else
   2485  1.69     pooka 			rv = *retval;
   2486  1.64     pooka 	}
   2487  1.68     pooka 	return rv;
   2488  1.64     pooka }
   2489  1.64     pooka rsys_alias(sys_preadv,rump_enosys)
   2490  1.64     pooka 
   2491  1.64     pooka ssize_t rump___sysimpl_pwritev(int, const struct iovec *, int, off_t);
   2492  1.64     pooka ssize_t
   2493  1.64     pooka rump___sysimpl_pwritev(int fd, const struct iovec * iovp, int iovcnt, off_t offset)
   2494  1.64     pooka {
   2495  1.68     pooka 	register_t retval[2] = {0, 0};
   2496  1.64     pooka 	int error = 0;
   2497  1.68     pooka 	ssize_t rv = -1;
   2498  1.64     pooka 	struct sys_pwritev_args callarg;
   2499  1.64     pooka 
   2500  1.64     pooka 	SPARG(&callarg, fd) = fd;
   2501  1.64     pooka 	SPARG(&callarg, iovp) = iovp;
   2502  1.64     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   2503  1.64     pooka 	SPARG(&callarg, PAD) = 0;
   2504  1.64     pooka 	SPARG(&callarg, offset) = offset;
   2505  1.64     pooka 
   2506  1.68     pooka 	error = rsys_syscall(SYS_pwritev, &callarg, sizeof(callarg), retval);
   2507  1.64     pooka 	rsys_seterrno(error);
   2508  1.68     pooka 	if (error == 0) {
   2509  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2510  1.68     pooka 			rv = *(ssize_t *)retval;
   2511  1.68     pooka 		else
   2512  1.69     pooka 			rv = *retval;
   2513  1.64     pooka 	}
   2514  1.68     pooka 	return rv;
   2515  1.64     pooka }
   2516  1.64     pooka rsys_alias(sys_pwritev,rump_enosys)
   2517  1.64     pooka 
   2518  1.60     pooka int rump___sysimpl___getcwd(char *, size_t);
   2519  1.51     pooka int
   2520  1.60     pooka rump___sysimpl___getcwd(char * bufp, size_t length)
   2521  1.51     pooka {
   2522  1.68     pooka 	register_t retval[2] = {0, 0};
   2523  1.51     pooka 	int error = 0;
   2524  1.68     pooka 	int rv = -1;
   2525  1.51     pooka 	struct sys___getcwd_args callarg;
   2526  1.51     pooka 
   2527  1.51     pooka 	SPARG(&callarg, bufp) = bufp;
   2528  1.51     pooka 	SPARG(&callarg, length) = length;
   2529  1.51     pooka 
   2530  1.68     pooka 	error = rsys_syscall(SYS___getcwd, &callarg, sizeof(callarg), retval);
   2531  1.63     pooka 	rsys_seterrno(error);
   2532  1.68     pooka 	if (error == 0) {
   2533  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2534  1.68     pooka 			rv = *(int *)retval;
   2535  1.68     pooka 		else
   2536  1.69     pooka 			rv = *retval;
   2537  1.51     pooka 	}
   2538  1.68     pooka 	return rv;
   2539  1.51     pooka }
   2540  1.53     pooka rsys_alias(sys___getcwd,rump_enosys)
   2541  1.51     pooka 
   2542  1.60     pooka int rump___sysimpl_fchroot(int);
   2543  1.34     pooka int
   2544  1.60     pooka rump___sysimpl_fchroot(int fd)
   2545  1.34     pooka {
   2546  1.68     pooka 	register_t retval[2] = {0, 0};
   2547  1.34     pooka 	int error = 0;
   2548  1.68     pooka 	int rv = -1;
   2549  1.34     pooka 	struct sys_fchroot_args callarg;
   2550  1.34     pooka 
   2551  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2552  1.34     pooka 
   2553  1.68     pooka 	error = rsys_syscall(SYS_fchroot, &callarg, sizeof(callarg), retval);
   2554  1.63     pooka 	rsys_seterrno(error);
   2555  1.68     pooka 	if (error == 0) {
   2556  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2557  1.68     pooka 			rv = *(int *)retval;
   2558  1.68     pooka 		else
   2559  1.69     pooka 			rv = *retval;
   2560  1.34     pooka 	}
   2561  1.68     pooka 	return rv;
   2562  1.34     pooka }
   2563  1.53     pooka rsys_alias(sys_fchroot,rump_enosys)
   2564  1.34     pooka 
   2565  1.60     pooka int rump___sysimpl_lchflags(const char *, u_long);
   2566  1.34     pooka int
   2567  1.60     pooka rump___sysimpl_lchflags(const char * path, u_long flags)
   2568  1.34     pooka {
   2569  1.68     pooka 	register_t retval[2] = {0, 0};
   2570  1.34     pooka 	int error = 0;
   2571  1.68     pooka 	int rv = -1;
   2572  1.34     pooka 	struct sys_lchflags_args callarg;
   2573  1.34     pooka 
   2574  1.34     pooka 	SPARG(&callarg, path) = path;
   2575  1.34     pooka 	SPARG(&callarg, flags) = flags;
   2576  1.34     pooka 
   2577  1.68     pooka 	error = rsys_syscall(SYS_lchflags, &callarg, sizeof(callarg), retval);
   2578  1.63     pooka 	rsys_seterrno(error);
   2579  1.68     pooka 	if (error == 0) {
   2580  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2581  1.68     pooka 			rv = *(int *)retval;
   2582  1.68     pooka 		else
   2583  1.69     pooka 			rv = *retval;
   2584  1.34     pooka 	}
   2585  1.68     pooka 	return rv;
   2586  1.34     pooka }
   2587  1.53     pooka rsys_alias(sys_lchflags,rump_enosys)
   2588  1.34     pooka 
   2589  1.60     pooka int rump___sysimpl_issetugid(void);
   2590  1.49     pooka int
   2591  1.60     pooka rump___sysimpl_issetugid(void )
   2592  1.49     pooka {
   2593  1.68     pooka 	register_t retval[2] = {0, 0};
   2594  1.68     pooka 	int rv = -1;
   2595  1.49     pooka 
   2596  1.68     pooka 	rsys_syscall(SYS_issetugid, NULL, 0, retval);
   2597  1.68     pooka 	if (sizeof(int) > sizeof(register_t))
   2598  1.68     pooka 		rv = *(int *)retval;
   2599  1.68     pooka 	else
   2600  1.69     pooka 		rv = *retval;
   2601  1.68     pooka 	return rv;
   2602  1.49     pooka }
   2603  1.53     pooka rsys_alias(sys_issetugid,rump_enosys)
   2604  1.49     pooka 
   2605  1.60     pooka int rump___sysimpl_kqueue(void);
   2606  1.34     pooka int
   2607  1.60     pooka rump___sysimpl_kqueue(void )
   2608  1.34     pooka {
   2609  1.68     pooka 	register_t retval[2] = {0, 0};
   2610  1.34     pooka 	int error = 0;
   2611  1.68     pooka 	int rv = -1;
   2612  1.34     pooka 
   2613  1.68     pooka 	error = rsys_syscall(SYS_kqueue, NULL, 0, retval);
   2614  1.63     pooka 	rsys_seterrno(error);
   2615  1.68     pooka 	if (error == 0) {
   2616  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2617  1.68     pooka 			rv = *(int *)retval;
   2618  1.68     pooka 		else
   2619  1.69     pooka 			rv = *retval;
   2620  1.34     pooka 	}
   2621  1.68     pooka 	return rv;
   2622  1.34     pooka }
   2623  1.53     pooka rsys_alias(sys_kqueue,rump_enosys)
   2624  1.34     pooka 
   2625  1.60     pooka int rump___sysimpl_kevent(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *);
   2626  1.60     pooka int
   2627  1.60     pooka rump___sysimpl_kevent(int fd, const struct kevent * changelist, size_t nchanges, struct kevent * eventlist, size_t nevents, const struct timespec * timeout)
   2628  1.60     pooka {
   2629  1.68     pooka 	register_t retval[2] = {0, 0};
   2630  1.60     pooka 	int error = 0;
   2631  1.68     pooka 	int rv = -1;
   2632  1.60     pooka 	struct compat_50_sys_kevent_args callarg;
   2633  1.60     pooka 
   2634  1.60     pooka 	SPARG(&callarg, fd) = fd;
   2635  1.60     pooka 	SPARG(&callarg, changelist) = changelist;
   2636  1.60     pooka 	SPARG(&callarg, nchanges) = nchanges;
   2637  1.60     pooka 	SPARG(&callarg, eventlist) = eventlist;
   2638  1.60     pooka 	SPARG(&callarg, nevents) = nevents;
   2639  1.60     pooka 	SPARG(&callarg, timeout) = (const struct timespec50 *)timeout;
   2640  1.60     pooka 
   2641  1.68     pooka 	error = rsys_syscall(SYS_compat_50_kevent, &callarg, sizeof(callarg), retval);
   2642  1.63     pooka 	rsys_seterrno(error);
   2643  1.68     pooka 	if (error == 0) {
   2644  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2645  1.68     pooka 			rv = *(int *)retval;
   2646  1.68     pooka 		else
   2647  1.69     pooka 			rv = *retval;
   2648  1.60     pooka 	}
   2649  1.68     pooka 	return rv;
   2650  1.60     pooka }
   2651  1.60     pooka rsys_alias(compat_50_sys_kevent,rump_enosys)
   2652  1.60     pooka 
   2653  1.60     pooka int rump___sysimpl_fsync_range(int, int, off_t, off_t);
   2654  1.34     pooka int
   2655  1.60     pooka rump___sysimpl_fsync_range(int fd, int flags, off_t start, off_t length)
   2656  1.34     pooka {
   2657  1.68     pooka 	register_t retval[2] = {0, 0};
   2658  1.34     pooka 	int error = 0;
   2659  1.68     pooka 	int rv = -1;
   2660  1.34     pooka 	struct sys_fsync_range_args callarg;
   2661  1.34     pooka 
   2662  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2663  1.34     pooka 	SPARG(&callarg, flags) = flags;
   2664  1.34     pooka 	SPARG(&callarg, start) = start;
   2665  1.34     pooka 	SPARG(&callarg, length) = length;
   2666  1.34     pooka 
   2667  1.68     pooka 	error = rsys_syscall(SYS_fsync_range, &callarg, sizeof(callarg), retval);
   2668  1.63     pooka 	rsys_seterrno(error);
   2669  1.68     pooka 	if (error == 0) {
   2670  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2671  1.68     pooka 			rv = *(int *)retval;
   2672  1.68     pooka 		else
   2673  1.69     pooka 			rv = *retval;
   2674  1.34     pooka 	}
   2675  1.68     pooka 	return rv;
   2676  1.34     pooka }
   2677  1.53     pooka rsys_alias(sys_fsync_range,rump_enosys)
   2678  1.34     pooka 
   2679  1.60     pooka int rump___sysimpl_getvfsstat(struct statvfs *, size_t, int);
   2680  1.34     pooka int
   2681  1.60     pooka rump___sysimpl_getvfsstat(struct statvfs * buf, size_t bufsize, int flags)
   2682  1.34     pooka {
   2683  1.68     pooka 	register_t retval[2] = {0, 0};
   2684  1.34     pooka 	int error = 0;
   2685  1.68     pooka 	int rv = -1;
   2686  1.34     pooka 	struct sys_getvfsstat_args callarg;
   2687  1.34     pooka 
   2688  1.34     pooka 	SPARG(&callarg, buf) = buf;
   2689  1.34     pooka 	SPARG(&callarg, bufsize) = bufsize;
   2690  1.34     pooka 	SPARG(&callarg, flags) = flags;
   2691  1.34     pooka 
   2692  1.68     pooka 	error = rsys_syscall(SYS_getvfsstat, &callarg, sizeof(callarg), retval);
   2693  1.63     pooka 	rsys_seterrno(error);
   2694  1.68     pooka 	if (error == 0) {
   2695  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2696  1.68     pooka 			rv = *(int *)retval;
   2697  1.68     pooka 		else
   2698  1.69     pooka 			rv = *retval;
   2699  1.34     pooka 	}
   2700  1.68     pooka 	return rv;
   2701  1.34     pooka }
   2702  1.53     pooka rsys_alias(sys_getvfsstat,rump_enosys)
   2703  1.34     pooka 
   2704  1.60     pooka int rump___sysimpl_statvfs1(const char *, struct statvfs *, int);
   2705  1.34     pooka int
   2706  1.60     pooka rump___sysimpl_statvfs1(const char * path, struct statvfs * buf, int flags)
   2707  1.34     pooka {
   2708  1.68     pooka 	register_t retval[2] = {0, 0};
   2709  1.34     pooka 	int error = 0;
   2710  1.68     pooka 	int rv = -1;
   2711  1.34     pooka 	struct sys_statvfs1_args callarg;
   2712  1.34     pooka 
   2713  1.34     pooka 	SPARG(&callarg, path) = path;
   2714  1.34     pooka 	SPARG(&callarg, buf) = buf;
   2715  1.34     pooka 	SPARG(&callarg, flags) = flags;
   2716  1.34     pooka 
   2717  1.68     pooka 	error = rsys_syscall(SYS_statvfs1, &callarg, sizeof(callarg), retval);
   2718  1.63     pooka 	rsys_seterrno(error);
   2719  1.68     pooka 	if (error == 0) {
   2720  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2721  1.68     pooka 			rv = *(int *)retval;
   2722  1.68     pooka 		else
   2723  1.69     pooka 			rv = *retval;
   2724  1.34     pooka 	}
   2725  1.68     pooka 	return rv;
   2726  1.34     pooka }
   2727  1.53     pooka rsys_alias(sys_statvfs1,rump_enosys)
   2728  1.34     pooka 
   2729  1.60     pooka int rump___sysimpl_fstatvfs1(int, struct statvfs *, int);
   2730  1.34     pooka int
   2731  1.60     pooka rump___sysimpl_fstatvfs1(int fd, struct statvfs * buf, int flags)
   2732  1.34     pooka {
   2733  1.68     pooka 	register_t retval[2] = {0, 0};
   2734  1.34     pooka 	int error = 0;
   2735  1.68     pooka 	int rv = -1;
   2736  1.34     pooka 	struct sys_fstatvfs1_args callarg;
   2737  1.34     pooka 
   2738  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2739  1.34     pooka 	SPARG(&callarg, buf) = buf;
   2740  1.34     pooka 	SPARG(&callarg, flags) = flags;
   2741  1.34     pooka 
   2742  1.68     pooka 	error = rsys_syscall(SYS_fstatvfs1, &callarg, sizeof(callarg), retval);
   2743  1.63     pooka 	rsys_seterrno(error);
   2744  1.68     pooka 	if (error == 0) {
   2745  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2746  1.68     pooka 			rv = *(int *)retval;
   2747  1.68     pooka 		else
   2748  1.69     pooka 			rv = *retval;
   2749  1.34     pooka 	}
   2750  1.68     pooka 	return rv;
   2751  1.34     pooka }
   2752  1.53     pooka rsys_alias(sys_fstatvfs1,rump_enosys)
   2753  1.34     pooka 
   2754  1.60     pooka int rump___sysimpl_extattrctl(const char *, int, const char *, int, const char *);
   2755  1.34     pooka int
   2756  1.60     pooka rump___sysimpl_extattrctl(const char * path, int cmd, const char * filename, int attrnamespace, const char * attrname)
   2757  1.34     pooka {
   2758  1.68     pooka 	register_t retval[2] = {0, 0};
   2759  1.34     pooka 	int error = 0;
   2760  1.68     pooka 	int rv = -1;
   2761  1.34     pooka 	struct sys_extattrctl_args callarg;
   2762  1.34     pooka 
   2763  1.34     pooka 	SPARG(&callarg, path) = path;
   2764  1.34     pooka 	SPARG(&callarg, cmd) = cmd;
   2765  1.34     pooka 	SPARG(&callarg, filename) = filename;
   2766  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2767  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2768  1.34     pooka 
   2769  1.68     pooka 	error = rsys_syscall(SYS_extattrctl, &callarg, sizeof(callarg), retval);
   2770  1.63     pooka 	rsys_seterrno(error);
   2771  1.68     pooka 	if (error == 0) {
   2772  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2773  1.68     pooka 			rv = *(int *)retval;
   2774  1.68     pooka 		else
   2775  1.69     pooka 			rv = *retval;
   2776  1.34     pooka 	}
   2777  1.68     pooka 	return rv;
   2778  1.34     pooka }
   2779  1.53     pooka rsys_alias(sys_extattrctl,rump_enosys)
   2780  1.34     pooka 
   2781  1.60     pooka int rump___sysimpl_extattr_set_file(const char *, int, const char *, const void *, size_t);
   2782  1.34     pooka int
   2783  1.60     pooka rump___sysimpl_extattr_set_file(const char * path, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   2784  1.34     pooka {
   2785  1.68     pooka 	register_t retval[2] = {0, 0};
   2786  1.34     pooka 	int error = 0;
   2787  1.68     pooka 	int rv = -1;
   2788  1.34     pooka 	struct sys_extattr_set_file_args callarg;
   2789  1.34     pooka 
   2790  1.34     pooka 	SPARG(&callarg, path) = path;
   2791  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2792  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2793  1.34     pooka 	SPARG(&callarg, data) = data;
   2794  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2795  1.34     pooka 
   2796  1.68     pooka 	error = rsys_syscall(SYS_extattr_set_file, &callarg, sizeof(callarg), retval);
   2797  1.63     pooka 	rsys_seterrno(error);
   2798  1.68     pooka 	if (error == 0) {
   2799  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2800  1.68     pooka 			rv = *(int *)retval;
   2801  1.68     pooka 		else
   2802  1.69     pooka 			rv = *retval;
   2803  1.34     pooka 	}
   2804  1.68     pooka 	return rv;
   2805  1.34     pooka }
   2806  1.53     pooka rsys_alias(sys_extattr_set_file,rump_enosys)
   2807  1.34     pooka 
   2808  1.60     pooka ssize_t rump___sysimpl_extattr_get_file(const char *, int, const char *, void *, size_t);
   2809  1.34     pooka ssize_t
   2810  1.60     pooka rump___sysimpl_extattr_get_file(const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   2811  1.34     pooka {
   2812  1.68     pooka 	register_t retval[2] = {0, 0};
   2813  1.34     pooka 	int error = 0;
   2814  1.68     pooka 	ssize_t rv = -1;
   2815  1.34     pooka 	struct sys_extattr_get_file_args callarg;
   2816  1.34     pooka 
   2817  1.34     pooka 	SPARG(&callarg, path) = path;
   2818  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2819  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2820  1.34     pooka 	SPARG(&callarg, data) = data;
   2821  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2822  1.34     pooka 
   2823  1.68     pooka 	error = rsys_syscall(SYS_extattr_get_file, &callarg, sizeof(callarg), retval);
   2824  1.63     pooka 	rsys_seterrno(error);
   2825  1.68     pooka 	if (error == 0) {
   2826  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2827  1.68     pooka 			rv = *(ssize_t *)retval;
   2828  1.68     pooka 		else
   2829  1.69     pooka 			rv = *retval;
   2830  1.34     pooka 	}
   2831  1.68     pooka 	return rv;
   2832  1.34     pooka }
   2833  1.53     pooka rsys_alias(sys_extattr_get_file,rump_enosys)
   2834  1.34     pooka 
   2835  1.60     pooka int rump___sysimpl_extattr_delete_file(const char *, int, const char *);
   2836  1.34     pooka int
   2837  1.60     pooka rump___sysimpl_extattr_delete_file(const char * path, int attrnamespace, const char * attrname)
   2838  1.34     pooka {
   2839  1.68     pooka 	register_t retval[2] = {0, 0};
   2840  1.34     pooka 	int error = 0;
   2841  1.68     pooka 	int rv = -1;
   2842  1.34     pooka 	struct sys_extattr_delete_file_args callarg;
   2843  1.34     pooka 
   2844  1.34     pooka 	SPARG(&callarg, path) = path;
   2845  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2846  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2847  1.34     pooka 
   2848  1.68     pooka 	error = rsys_syscall(SYS_extattr_delete_file, &callarg, sizeof(callarg), retval);
   2849  1.63     pooka 	rsys_seterrno(error);
   2850  1.68     pooka 	if (error == 0) {
   2851  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2852  1.68     pooka 			rv = *(int *)retval;
   2853  1.68     pooka 		else
   2854  1.69     pooka 			rv = *retval;
   2855  1.34     pooka 	}
   2856  1.68     pooka 	return rv;
   2857  1.34     pooka }
   2858  1.53     pooka rsys_alias(sys_extattr_delete_file,rump_enosys)
   2859  1.34     pooka 
   2860  1.60     pooka int rump___sysimpl_extattr_set_fd(int, int, const char *, const void *, size_t);
   2861  1.34     pooka int
   2862  1.60     pooka rump___sysimpl_extattr_set_fd(int fd, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   2863  1.34     pooka {
   2864  1.68     pooka 	register_t retval[2] = {0, 0};
   2865  1.34     pooka 	int error = 0;
   2866  1.68     pooka 	int rv = -1;
   2867  1.34     pooka 	struct sys_extattr_set_fd_args callarg;
   2868  1.34     pooka 
   2869  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2870  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2871  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2872  1.34     pooka 	SPARG(&callarg, data) = data;
   2873  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2874  1.34     pooka 
   2875  1.68     pooka 	error = rsys_syscall(SYS_extattr_set_fd, &callarg, sizeof(callarg), retval);
   2876  1.63     pooka 	rsys_seterrno(error);
   2877  1.68     pooka 	if (error == 0) {
   2878  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2879  1.68     pooka 			rv = *(int *)retval;
   2880  1.68     pooka 		else
   2881  1.69     pooka 			rv = *retval;
   2882  1.34     pooka 	}
   2883  1.68     pooka 	return rv;
   2884  1.34     pooka }
   2885  1.53     pooka rsys_alias(sys_extattr_set_fd,rump_enosys)
   2886  1.34     pooka 
   2887  1.60     pooka ssize_t rump___sysimpl_extattr_get_fd(int, int, const char *, void *, size_t);
   2888  1.34     pooka ssize_t
   2889  1.60     pooka rump___sysimpl_extattr_get_fd(int fd, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   2890  1.34     pooka {
   2891  1.68     pooka 	register_t retval[2] = {0, 0};
   2892  1.34     pooka 	int error = 0;
   2893  1.68     pooka 	ssize_t rv = -1;
   2894  1.34     pooka 	struct sys_extattr_get_fd_args callarg;
   2895  1.34     pooka 
   2896  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2897  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2898  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2899  1.34     pooka 	SPARG(&callarg, data) = data;
   2900  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2901  1.34     pooka 
   2902  1.68     pooka 	error = rsys_syscall(SYS_extattr_get_fd, &callarg, sizeof(callarg), retval);
   2903  1.63     pooka 	rsys_seterrno(error);
   2904  1.68     pooka 	if (error == 0) {
   2905  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2906  1.68     pooka 			rv = *(ssize_t *)retval;
   2907  1.68     pooka 		else
   2908  1.69     pooka 			rv = *retval;
   2909  1.34     pooka 	}
   2910  1.68     pooka 	return rv;
   2911  1.34     pooka }
   2912  1.53     pooka rsys_alias(sys_extattr_get_fd,rump_enosys)
   2913  1.34     pooka 
   2914  1.60     pooka int rump___sysimpl_extattr_delete_fd(int, int, const char *);
   2915  1.34     pooka int
   2916  1.60     pooka rump___sysimpl_extattr_delete_fd(int fd, int attrnamespace, const char * attrname)
   2917  1.34     pooka {
   2918  1.68     pooka 	register_t retval[2] = {0, 0};
   2919  1.34     pooka 	int error = 0;
   2920  1.68     pooka 	int rv = -1;
   2921  1.34     pooka 	struct sys_extattr_delete_fd_args callarg;
   2922  1.34     pooka 
   2923  1.34     pooka 	SPARG(&callarg, fd) = fd;
   2924  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2925  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2926  1.34     pooka 
   2927  1.68     pooka 	error = rsys_syscall(SYS_extattr_delete_fd, &callarg, sizeof(callarg), retval);
   2928  1.63     pooka 	rsys_seterrno(error);
   2929  1.68     pooka 	if (error == 0) {
   2930  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2931  1.68     pooka 			rv = *(int *)retval;
   2932  1.68     pooka 		else
   2933  1.69     pooka 			rv = *retval;
   2934  1.34     pooka 	}
   2935  1.68     pooka 	return rv;
   2936  1.34     pooka }
   2937  1.53     pooka rsys_alias(sys_extattr_delete_fd,rump_enosys)
   2938  1.34     pooka 
   2939  1.60     pooka int rump___sysimpl_extattr_set_link(const char *, int, const char *, const void *, size_t);
   2940  1.34     pooka int
   2941  1.60     pooka rump___sysimpl_extattr_set_link(const char * path, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   2942  1.34     pooka {
   2943  1.68     pooka 	register_t retval[2] = {0, 0};
   2944  1.34     pooka 	int error = 0;
   2945  1.68     pooka 	int rv = -1;
   2946  1.34     pooka 	struct sys_extattr_set_link_args callarg;
   2947  1.34     pooka 
   2948  1.34     pooka 	SPARG(&callarg, path) = path;
   2949  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2950  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2951  1.34     pooka 	SPARG(&callarg, data) = data;
   2952  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2953  1.34     pooka 
   2954  1.68     pooka 	error = rsys_syscall(SYS_extattr_set_link, &callarg, sizeof(callarg), retval);
   2955  1.63     pooka 	rsys_seterrno(error);
   2956  1.68     pooka 	if (error == 0) {
   2957  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2958  1.68     pooka 			rv = *(int *)retval;
   2959  1.68     pooka 		else
   2960  1.69     pooka 			rv = *retval;
   2961  1.34     pooka 	}
   2962  1.68     pooka 	return rv;
   2963  1.34     pooka }
   2964  1.53     pooka rsys_alias(sys_extattr_set_link,rump_enosys)
   2965  1.34     pooka 
   2966  1.60     pooka ssize_t rump___sysimpl_extattr_get_link(const char *, int, const char *, void *, size_t);
   2967  1.34     pooka ssize_t
   2968  1.60     pooka rump___sysimpl_extattr_get_link(const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   2969  1.34     pooka {
   2970  1.68     pooka 	register_t retval[2] = {0, 0};
   2971  1.34     pooka 	int error = 0;
   2972  1.68     pooka 	ssize_t rv = -1;
   2973  1.34     pooka 	struct sys_extattr_get_link_args callarg;
   2974  1.34     pooka 
   2975  1.34     pooka 	SPARG(&callarg, path) = path;
   2976  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   2977  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   2978  1.34     pooka 	SPARG(&callarg, data) = data;
   2979  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   2980  1.34     pooka 
   2981  1.68     pooka 	error = rsys_syscall(SYS_extattr_get_link, &callarg, sizeof(callarg), retval);
   2982  1.63     pooka 	rsys_seterrno(error);
   2983  1.68     pooka 	if (error == 0) {
   2984  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2985  1.68     pooka 			rv = *(ssize_t *)retval;
   2986  1.68     pooka 		else
   2987  1.69     pooka 			rv = *retval;
   2988  1.34     pooka 	}
   2989  1.68     pooka 	return rv;
   2990  1.34     pooka }
   2991  1.53     pooka rsys_alias(sys_extattr_get_link,rump_enosys)
   2992  1.34     pooka 
   2993  1.60     pooka int rump___sysimpl_extattr_delete_link(const char *, int, const char *);
   2994  1.34     pooka int
   2995  1.60     pooka rump___sysimpl_extattr_delete_link(const char * path, int attrnamespace, const char * attrname)
   2996  1.34     pooka {
   2997  1.68     pooka 	register_t retval[2] = {0, 0};
   2998  1.34     pooka 	int error = 0;
   2999  1.68     pooka 	int rv = -1;
   3000  1.34     pooka 	struct sys_extattr_delete_link_args callarg;
   3001  1.34     pooka 
   3002  1.34     pooka 	SPARG(&callarg, path) = path;
   3003  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3004  1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3005  1.34     pooka 
   3006  1.68     pooka 	error = rsys_syscall(SYS_extattr_delete_link, &callarg, sizeof(callarg), retval);
   3007  1.63     pooka 	rsys_seterrno(error);
   3008  1.68     pooka 	if (error == 0) {
   3009  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3010  1.68     pooka 			rv = *(int *)retval;
   3011  1.68     pooka 		else
   3012  1.69     pooka 			rv = *retval;
   3013  1.34     pooka 	}
   3014  1.68     pooka 	return rv;
   3015  1.34     pooka }
   3016  1.53     pooka rsys_alias(sys_extattr_delete_link,rump_enosys)
   3017  1.34     pooka 
   3018  1.60     pooka ssize_t rump___sysimpl_extattr_list_fd(int, int, void *, size_t);
   3019  1.34     pooka ssize_t
   3020  1.60     pooka rump___sysimpl_extattr_list_fd(int fd, int attrnamespace, void * data, size_t nbytes)
   3021  1.34     pooka {
   3022  1.68     pooka 	register_t retval[2] = {0, 0};
   3023  1.34     pooka 	int error = 0;
   3024  1.68     pooka 	ssize_t rv = -1;
   3025  1.34     pooka 	struct sys_extattr_list_fd_args callarg;
   3026  1.34     pooka 
   3027  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3028  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3029  1.34     pooka 	SPARG(&callarg, data) = data;
   3030  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3031  1.34     pooka 
   3032  1.68     pooka 	error = rsys_syscall(SYS_extattr_list_fd, &callarg, sizeof(callarg), retval);
   3033  1.63     pooka 	rsys_seterrno(error);
   3034  1.68     pooka 	if (error == 0) {
   3035  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3036  1.68     pooka 			rv = *(ssize_t *)retval;
   3037  1.68     pooka 		else
   3038  1.69     pooka 			rv = *retval;
   3039  1.34     pooka 	}
   3040  1.68     pooka 	return rv;
   3041  1.34     pooka }
   3042  1.53     pooka rsys_alias(sys_extattr_list_fd,rump_enosys)
   3043  1.34     pooka 
   3044  1.60     pooka ssize_t rump___sysimpl_extattr_list_file(const char *, int, void *, size_t);
   3045  1.34     pooka ssize_t
   3046  1.60     pooka rump___sysimpl_extattr_list_file(const char * path, int attrnamespace, void * data, size_t nbytes)
   3047  1.34     pooka {
   3048  1.68     pooka 	register_t retval[2] = {0, 0};
   3049  1.34     pooka 	int error = 0;
   3050  1.68     pooka 	ssize_t rv = -1;
   3051  1.34     pooka 	struct sys_extattr_list_file_args callarg;
   3052  1.34     pooka 
   3053  1.34     pooka 	SPARG(&callarg, path) = path;
   3054  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3055  1.34     pooka 	SPARG(&callarg, data) = data;
   3056  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3057  1.34     pooka 
   3058  1.68     pooka 	error = rsys_syscall(SYS_extattr_list_file, &callarg, sizeof(callarg), retval);
   3059  1.63     pooka 	rsys_seterrno(error);
   3060  1.68     pooka 	if (error == 0) {
   3061  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3062  1.68     pooka 			rv = *(ssize_t *)retval;
   3063  1.68     pooka 		else
   3064  1.69     pooka 			rv = *retval;
   3065  1.34     pooka 	}
   3066  1.68     pooka 	return rv;
   3067  1.34     pooka }
   3068  1.53     pooka rsys_alias(sys_extattr_list_file,rump_enosys)
   3069  1.34     pooka 
   3070  1.60     pooka ssize_t rump___sysimpl_extattr_list_link(const char *, int, void *, size_t);
   3071  1.34     pooka ssize_t
   3072  1.60     pooka rump___sysimpl_extattr_list_link(const char * path, int attrnamespace, void * data, size_t nbytes)
   3073  1.34     pooka {
   3074  1.68     pooka 	register_t retval[2] = {0, 0};
   3075  1.34     pooka 	int error = 0;
   3076  1.68     pooka 	ssize_t rv = -1;
   3077  1.34     pooka 	struct sys_extattr_list_link_args callarg;
   3078  1.34     pooka 
   3079  1.34     pooka 	SPARG(&callarg, path) = path;
   3080  1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3081  1.34     pooka 	SPARG(&callarg, data) = data;
   3082  1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3083  1.34     pooka 
   3084  1.68     pooka 	error = rsys_syscall(SYS_extattr_list_link, &callarg, sizeof(callarg), retval);
   3085  1.63     pooka 	rsys_seterrno(error);
   3086  1.68     pooka 	if (error == 0) {
   3087  1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3088  1.68     pooka 			rv = *(ssize_t *)retval;
   3089  1.68     pooka 		else
   3090  1.69     pooka 			rv = *retval;
   3091  1.34     pooka 	}
   3092  1.68     pooka 	return rv;
   3093  1.34     pooka }
   3094  1.53     pooka rsys_alias(sys_extattr_list_link,rump_enosys)
   3095  1.34     pooka 
   3096  1.61     pooka int rump___sysimpl_pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
   3097  1.61     pooka int
   3098  1.61     pooka rump___sysimpl_pselect(int nd, fd_set * in, fd_set * ou, fd_set * ex, const struct timespec * ts, const sigset_t * mask)
   3099  1.61     pooka {
   3100  1.68     pooka 	register_t retval[2] = {0, 0};
   3101  1.61     pooka 	int error = 0;
   3102  1.68     pooka 	int rv = -1;
   3103  1.61     pooka 	struct compat_50_sys_pselect_args callarg;
   3104  1.61     pooka 
   3105  1.61     pooka 	SPARG(&callarg, nd) = nd;
   3106  1.61     pooka 	SPARG(&callarg, in) = in;
   3107  1.61     pooka 	SPARG(&callarg, ou) = ou;
   3108  1.61     pooka 	SPARG(&callarg, ex) = ex;
   3109  1.61     pooka 	SPARG(&callarg, ts) = (const struct timespec50 *)ts;
   3110  1.61     pooka 	SPARG(&callarg, mask) = mask;
   3111  1.61     pooka 
   3112  1.68     pooka 	error = rsys_syscall(SYS_compat_50_pselect, &callarg, sizeof(callarg), retval);
   3113  1.63     pooka 	rsys_seterrno(error);
   3114  1.68     pooka 	if (error == 0) {
   3115  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3116  1.68     pooka 			rv = *(int *)retval;
   3117  1.68     pooka 		else
   3118  1.69     pooka 			rv = *retval;
   3119  1.61     pooka 	}
   3120  1.68     pooka 	return rv;
   3121  1.61     pooka }
   3122  1.61     pooka rsys_alias(compat_50_sys_pselect,rump_enosys)
   3123  1.61     pooka 
   3124  1.60     pooka int rump___sysimpl_pollts(struct pollfd *, u_int, const struct timespec *, const sigset_t *);
   3125  1.60     pooka int
   3126  1.60     pooka rump___sysimpl_pollts(struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * mask)
   3127  1.60     pooka {
   3128  1.68     pooka 	register_t retval[2] = {0, 0};
   3129  1.60     pooka 	int error = 0;
   3130  1.68     pooka 	int rv = -1;
   3131  1.60     pooka 	struct compat_50_sys_pollts_args callarg;
   3132  1.60     pooka 
   3133  1.60     pooka 	SPARG(&callarg, fds) = fds;
   3134  1.60     pooka 	SPARG(&callarg, nfds) = nfds;
   3135  1.60     pooka 	SPARG(&callarg, ts) = (const struct timespec50 *)ts;
   3136  1.60     pooka 	SPARG(&callarg, mask) = mask;
   3137  1.60     pooka 
   3138  1.68     pooka 	error = rsys_syscall(SYS_compat_50_pollts, &callarg, sizeof(callarg), retval);
   3139  1.63     pooka 	rsys_seterrno(error);
   3140  1.68     pooka 	if (error == 0) {
   3141  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3142  1.68     pooka 			rv = *(int *)retval;
   3143  1.68     pooka 		else
   3144  1.69     pooka 			rv = *retval;
   3145  1.60     pooka 	}
   3146  1.68     pooka 	return rv;
   3147  1.60     pooka }
   3148  1.60     pooka rsys_alias(compat_50_sys_pollts,rump_enosys)
   3149  1.60     pooka 
   3150  1.73  drochner int rump___sysimpl_setxattr(const char *, const char *, const void *, size_t, int);
   3151  1.34     pooka int
   3152  1.73  drochner rump___sysimpl_setxattr(const char * path, const char * name, const void * value, size_t size, int flags)
   3153  1.34     pooka {
   3154  1.68     pooka 	register_t retval[2] = {0, 0};
   3155  1.34     pooka 	int error = 0;
   3156  1.68     pooka 	int rv = -1;
   3157  1.34     pooka 	struct sys_setxattr_args callarg;
   3158  1.34     pooka 
   3159  1.34     pooka 	SPARG(&callarg, path) = path;
   3160  1.34     pooka 	SPARG(&callarg, name) = name;
   3161  1.34     pooka 	SPARG(&callarg, value) = value;
   3162  1.34     pooka 	SPARG(&callarg, size) = size;
   3163  1.34     pooka 	SPARG(&callarg, flags) = flags;
   3164  1.34     pooka 
   3165  1.68     pooka 	error = rsys_syscall(SYS_setxattr, &callarg, sizeof(callarg), retval);
   3166  1.63     pooka 	rsys_seterrno(error);
   3167  1.68     pooka 	if (error == 0) {
   3168  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3169  1.68     pooka 			rv = *(int *)retval;
   3170  1.68     pooka 		else
   3171  1.69     pooka 			rv = *retval;
   3172  1.28     pooka 	}
   3173  1.68     pooka 	return rv;
   3174  1.28     pooka }
   3175  1.53     pooka rsys_alias(sys_setxattr,rump_enosys)
   3176  1.28     pooka 
   3177  1.73  drochner int rump___sysimpl_lsetxattr(const char *, const char *, const void *, size_t, int);
   3178  1.10     pooka int
   3179  1.73  drochner rump___sysimpl_lsetxattr(const char * path, const char * name, const void * value, size_t size, int flags)
   3180   1.1     pooka {
   3181  1.68     pooka 	register_t retval[2] = {0, 0};
   3182  1.27     pooka 	int error = 0;
   3183  1.68     pooka 	int rv = -1;
   3184  1.34     pooka 	struct sys_lsetxattr_args callarg;
   3185   1.1     pooka 
   3186  1.31     pooka 	SPARG(&callarg, path) = path;
   3187  1.34     pooka 	SPARG(&callarg, name) = name;
   3188  1.34     pooka 	SPARG(&callarg, value) = value;
   3189  1.34     pooka 	SPARG(&callarg, size) = size;
   3190  1.34     pooka 	SPARG(&callarg, flags) = flags;
   3191   1.1     pooka 
   3192  1.68     pooka 	error = rsys_syscall(SYS_lsetxattr, &callarg, sizeof(callarg), retval);
   3193  1.63     pooka 	rsys_seterrno(error);
   3194  1.68     pooka 	if (error == 0) {
   3195  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3196  1.68     pooka 			rv = *(int *)retval;
   3197  1.68     pooka 		else
   3198  1.69     pooka 			rv = *retval;
   3199  1.27     pooka 	}
   3200  1.68     pooka 	return rv;
   3201   1.1     pooka }
   3202  1.53     pooka rsys_alias(sys_lsetxattr,rump_enosys)
   3203   1.1     pooka 
   3204  1.73  drochner int rump___sysimpl_fsetxattr(int, const char *, const void *, size_t, int);
   3205   1.1     pooka int
   3206  1.73  drochner rump___sysimpl_fsetxattr(int fd, const char * name, const void * value, size_t size, int flags)
   3207   1.1     pooka {
   3208  1.68     pooka 	register_t retval[2] = {0, 0};
   3209  1.27     pooka 	int error = 0;
   3210  1.68     pooka 	int rv = -1;
   3211  1.34     pooka 	struct sys_fsetxattr_args callarg;
   3212   1.1     pooka 
   3213  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3214  1.34     pooka 	SPARG(&callarg, name) = name;
   3215  1.34     pooka 	SPARG(&callarg, value) = value;
   3216  1.34     pooka 	SPARG(&callarg, size) = size;
   3217  1.34     pooka 	SPARG(&callarg, flags) = flags;
   3218   1.1     pooka 
   3219  1.68     pooka 	error = rsys_syscall(SYS_fsetxattr, &callarg, sizeof(callarg), retval);
   3220  1.63     pooka 	rsys_seterrno(error);
   3221  1.68     pooka 	if (error == 0) {
   3222  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3223  1.68     pooka 			rv = *(int *)retval;
   3224  1.68     pooka 		else
   3225  1.69     pooka 			rv = *retval;
   3226  1.27     pooka 	}
   3227  1.68     pooka 	return rv;
   3228   1.1     pooka }
   3229  1.53     pooka rsys_alias(sys_fsetxattr,rump_enosys)
   3230   1.1     pooka 
   3231  1.60     pooka int rump___sysimpl_getxattr(const char *, const char *, void *, size_t);
   3232  1.11     pooka int
   3233  1.60     pooka rump___sysimpl_getxattr(const char * path, const char * name, void * value, size_t size)
   3234  1.22     pooka {
   3235  1.68     pooka 	register_t retval[2] = {0, 0};
   3236  1.27     pooka 	int error = 0;
   3237  1.68     pooka 	int rv = -1;
   3238  1.34     pooka 	struct sys_getxattr_args callarg;
   3239  1.22     pooka 
   3240  1.34     pooka 	SPARG(&callarg, path) = path;
   3241  1.34     pooka 	SPARG(&callarg, name) = name;
   3242  1.34     pooka 	SPARG(&callarg, value) = value;
   3243  1.34     pooka 	SPARG(&callarg, size) = size;
   3244  1.22     pooka 
   3245  1.68     pooka 	error = rsys_syscall(SYS_getxattr, &callarg, sizeof(callarg), retval);
   3246  1.63     pooka 	rsys_seterrno(error);
   3247  1.68     pooka 	if (error == 0) {
   3248  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3249  1.68     pooka 			rv = *(int *)retval;
   3250  1.68     pooka 		else
   3251  1.69     pooka 			rv = *retval;
   3252  1.27     pooka 	}
   3253  1.68     pooka 	return rv;
   3254  1.22     pooka }
   3255  1.53     pooka rsys_alias(sys_getxattr,rump_enosys)
   3256  1.22     pooka 
   3257  1.60     pooka int rump___sysimpl_lgetxattr(const char *, const char *, void *, size_t);
   3258  1.34     pooka int
   3259  1.60     pooka rump___sysimpl_lgetxattr(const char * path, const char * name, void * value, size_t size)
   3260   1.8     pooka {
   3261  1.68     pooka 	register_t retval[2] = {0, 0};
   3262  1.27     pooka 	int error = 0;
   3263  1.68     pooka 	int rv = -1;
   3264  1.34     pooka 	struct sys_lgetxattr_args callarg;
   3265   1.8     pooka 
   3266  1.34     pooka 	SPARG(&callarg, path) = path;
   3267  1.34     pooka 	SPARG(&callarg, name) = name;
   3268  1.34     pooka 	SPARG(&callarg, value) = value;
   3269  1.34     pooka 	SPARG(&callarg, size) = size;
   3270   1.8     pooka 
   3271  1.68     pooka 	error = rsys_syscall(SYS_lgetxattr, &callarg, sizeof(callarg), retval);
   3272  1.63     pooka 	rsys_seterrno(error);
   3273  1.68     pooka 	if (error == 0) {
   3274  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3275  1.68     pooka 			rv = *(int *)retval;
   3276  1.68     pooka 		else
   3277  1.69     pooka 			rv = *retval;
   3278  1.27     pooka 	}
   3279  1.68     pooka 	return rv;
   3280   1.8     pooka }
   3281  1.53     pooka rsys_alias(sys_lgetxattr,rump_enosys)
   3282   1.8     pooka 
   3283  1.60     pooka int rump___sysimpl_fgetxattr(int, const char *, void *, size_t);
   3284  1.34     pooka int
   3285  1.60     pooka rump___sysimpl_fgetxattr(int fd, const char * name, void * value, size_t size)
   3286   1.8     pooka {
   3287  1.68     pooka 	register_t retval[2] = {0, 0};
   3288  1.27     pooka 	int error = 0;
   3289  1.68     pooka 	int rv = -1;
   3290  1.34     pooka 	struct sys_fgetxattr_args callarg;
   3291   1.8     pooka 
   3292  1.31     pooka 	SPARG(&callarg, fd) = fd;
   3293  1.34     pooka 	SPARG(&callarg, name) = name;
   3294  1.34     pooka 	SPARG(&callarg, value) = value;
   3295  1.34     pooka 	SPARG(&callarg, size) = size;
   3296   1.8     pooka 
   3297  1.68     pooka 	error = rsys_syscall(SYS_fgetxattr, &callarg, sizeof(callarg), retval);
   3298  1.63     pooka 	rsys_seterrno(error);
   3299  1.68     pooka 	if (error == 0) {
   3300  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3301  1.68     pooka 			rv = *(int *)retval;
   3302  1.68     pooka 		else
   3303  1.69     pooka 			rv = *retval;
   3304  1.27     pooka 	}
   3305  1.68     pooka 	return rv;
   3306   1.8     pooka }
   3307  1.53     pooka rsys_alias(sys_fgetxattr,rump_enosys)
   3308   1.8     pooka 
   3309  1.60     pooka int rump___sysimpl_listxattr(const char *, char *, size_t);
   3310   1.1     pooka int
   3311  1.60     pooka rump___sysimpl_listxattr(const char * path, char * list, size_t size)
   3312   1.1     pooka {
   3313  1.68     pooka 	register_t retval[2] = {0, 0};
   3314  1.27     pooka 	int error = 0;
   3315  1.68     pooka 	int rv = -1;
   3316  1.34     pooka 	struct sys_listxattr_args callarg;
   3317   1.1     pooka 
   3318  1.31     pooka 	SPARG(&callarg, path) = path;
   3319  1.34     pooka 	SPARG(&callarg, list) = list;
   3320  1.34     pooka 	SPARG(&callarg, size) = size;
   3321   1.1     pooka 
   3322  1.68     pooka 	error = rsys_syscall(SYS_listxattr, &callarg, sizeof(callarg), retval);
   3323  1.63     pooka 	rsys_seterrno(error);
   3324  1.68     pooka 	if (error == 0) {
   3325  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3326  1.68     pooka 			rv = *(int *)retval;
   3327  1.68     pooka 		else
   3328  1.69     pooka 			rv = *retval;
   3329  1.27     pooka 	}
   3330  1.68     pooka 	return rv;
   3331   1.1     pooka }
   3332  1.53     pooka rsys_alias(sys_listxattr,rump_enosys)
   3333   1.1     pooka 
   3334  1.60     pooka int rump___sysimpl_llistxattr(const char *, char *, size_t);
   3335   1.1     pooka int
   3336  1.60     pooka rump___sysimpl_llistxattr(const char * path, char * list, size_t size)
   3337  1.13     pooka {
   3338  1.68     pooka 	register_t retval[2] = {0, 0};
   3339  1.27     pooka 	int error = 0;
   3340  1.68     pooka 	int rv = -1;
   3341  1.34     pooka 	struct sys_llistxattr_args callarg;
   3342  1.13     pooka 
   3343  1.34     pooka 	SPARG(&callarg, path) = path;
   3344  1.34     pooka 	SPARG(&callarg, list) = list;
   3345  1.34     pooka 	SPARG(&callarg, size) = size;
   3346  1.13     pooka 
   3347  1.68     pooka 	error = rsys_syscall(SYS_llistxattr, &callarg, sizeof(callarg), retval);
   3348  1.63     pooka 	rsys_seterrno(error);
   3349  1.68     pooka 	if (error == 0) {
   3350  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3351  1.68     pooka 			rv = *(int *)retval;
   3352  1.68     pooka 		else
   3353  1.69     pooka 			rv = *retval;
   3354  1.27     pooka 	}
   3355  1.68     pooka 	return rv;
   3356  1.13     pooka }
   3357  1.53     pooka rsys_alias(sys_llistxattr,rump_enosys)
   3358  1.13     pooka 
   3359  1.60     pooka int rump___sysimpl_flistxattr(int, char *, size_t);
   3360  1.13     pooka int
   3361  1.60     pooka rump___sysimpl_flistxattr(int fd, char * list, size_t size)
   3362   1.1     pooka {
   3363  1.68     pooka 	register_t retval[2] = {0, 0};
   3364  1.27     pooka 	int error = 0;
   3365  1.68     pooka 	int rv = -1;
   3366  1.34     pooka 	struct sys_flistxattr_args callarg;
   3367   1.1     pooka 
   3368  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3369  1.34     pooka 	SPARG(&callarg, list) = list;
   3370  1.34     pooka 	SPARG(&callarg, size) = size;
   3371   1.1     pooka 
   3372  1.68     pooka 	error = rsys_syscall(SYS_flistxattr, &callarg, sizeof(callarg), retval);
   3373  1.63     pooka 	rsys_seterrno(error);
   3374  1.68     pooka 	if (error == 0) {
   3375  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3376  1.68     pooka 			rv = *(int *)retval;
   3377  1.68     pooka 		else
   3378  1.69     pooka 			rv = *retval;
   3379  1.27     pooka 	}
   3380  1.68     pooka 	return rv;
   3381   1.1     pooka }
   3382  1.53     pooka rsys_alias(sys_flistxattr,rump_enosys)
   3383   1.1     pooka 
   3384  1.60     pooka int rump___sysimpl_removexattr(const char *, const char *);
   3385   1.1     pooka int
   3386  1.60     pooka rump___sysimpl_removexattr(const char * path, const char * name)
   3387   1.1     pooka {
   3388  1.68     pooka 	register_t retval[2] = {0, 0};
   3389  1.27     pooka 	int error = 0;
   3390  1.68     pooka 	int rv = -1;
   3391  1.34     pooka 	struct sys_removexattr_args callarg;
   3392   1.1     pooka 
   3393  1.31     pooka 	SPARG(&callarg, path) = path;
   3394  1.34     pooka 	SPARG(&callarg, name) = name;
   3395   1.1     pooka 
   3396  1.68     pooka 	error = rsys_syscall(SYS_removexattr, &callarg, sizeof(callarg), retval);
   3397  1.63     pooka 	rsys_seterrno(error);
   3398  1.68     pooka 	if (error == 0) {
   3399  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3400  1.68     pooka 			rv = *(int *)retval;
   3401  1.68     pooka 		else
   3402  1.69     pooka 			rv = *retval;
   3403  1.27     pooka 	}
   3404  1.68     pooka 	return rv;
   3405   1.1     pooka }
   3406  1.53     pooka rsys_alias(sys_removexattr,rump_enosys)
   3407   1.1     pooka 
   3408  1.60     pooka int rump___sysimpl_lremovexattr(const char *, const char *);
   3409  1.10     pooka int
   3410  1.60     pooka rump___sysimpl_lremovexattr(const char * path, const char * name)
   3411  1.11     pooka {
   3412  1.68     pooka 	register_t retval[2] = {0, 0};
   3413  1.27     pooka 	int error = 0;
   3414  1.68     pooka 	int rv = -1;
   3415  1.34     pooka 	struct sys_lremovexattr_args callarg;
   3416  1.11     pooka 
   3417  1.31     pooka 	SPARG(&callarg, path) = path;
   3418  1.34     pooka 	SPARG(&callarg, name) = name;
   3419  1.11     pooka 
   3420  1.68     pooka 	error = rsys_syscall(SYS_lremovexattr, &callarg, sizeof(callarg), retval);
   3421  1.63     pooka 	rsys_seterrno(error);
   3422  1.68     pooka 	if (error == 0) {
   3423  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3424  1.68     pooka 			rv = *(int *)retval;
   3425  1.68     pooka 		else
   3426  1.69     pooka 			rv = *retval;
   3427  1.27     pooka 	}
   3428  1.68     pooka 	return rv;
   3429  1.11     pooka }
   3430  1.53     pooka rsys_alias(sys_lremovexattr,rump_enosys)
   3431  1.11     pooka 
   3432  1.60     pooka int rump___sysimpl_fremovexattr(int, const char *);
   3433  1.32     pooka int
   3434  1.60     pooka rump___sysimpl_fremovexattr(int fd, const char * name)
   3435  1.32     pooka {
   3436  1.68     pooka 	register_t retval[2] = {0, 0};
   3437  1.32     pooka 	int error = 0;
   3438  1.68     pooka 	int rv = -1;
   3439  1.34     pooka 	struct sys_fremovexattr_args callarg;
   3440  1.34     pooka 
   3441  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3442  1.34     pooka 	SPARG(&callarg, name) = name;
   3443  1.32     pooka 
   3444  1.68     pooka 	error = rsys_syscall(SYS_fremovexattr, &callarg, sizeof(callarg), retval);
   3445  1.63     pooka 	rsys_seterrno(error);
   3446  1.68     pooka 	if (error == 0) {
   3447  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3448  1.68     pooka 			rv = *(int *)retval;
   3449  1.68     pooka 		else
   3450  1.69     pooka 			rv = *retval;
   3451  1.32     pooka 	}
   3452  1.68     pooka 	return rv;
   3453  1.32     pooka }
   3454  1.53     pooka rsys_alias(sys_fremovexattr,rump_enosys)
   3455  1.32     pooka 
   3456  1.60     pooka int rump___sysimpl_stat30(const char *, struct stat *);
   3457  1.60     pooka int
   3458  1.60     pooka rump___sysimpl_stat30(const char * path, struct stat * ub)
   3459  1.60     pooka {
   3460  1.68     pooka 	register_t retval[2] = {0, 0};
   3461  1.60     pooka 	int error = 0;
   3462  1.68     pooka 	int rv = -1;
   3463  1.60     pooka 	struct compat_50_sys___stat30_args callarg;
   3464  1.60     pooka 
   3465  1.60     pooka 	SPARG(&callarg, path) = path;
   3466  1.60     pooka 	SPARG(&callarg, ub) = (struct stat30 *)ub;
   3467  1.60     pooka 
   3468  1.68     pooka 	error = rsys_syscall(SYS_compat_50___stat30, &callarg, sizeof(callarg), retval);
   3469  1.63     pooka 	rsys_seterrno(error);
   3470  1.68     pooka 	if (error == 0) {
   3471  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3472  1.68     pooka 			rv = *(int *)retval;
   3473  1.68     pooka 		else
   3474  1.69     pooka 			rv = *retval;
   3475  1.60     pooka 	}
   3476  1.68     pooka 	return rv;
   3477  1.60     pooka }
   3478  1.60     pooka rsys_alias(compat_50_sys___stat30,rump_enosys)
   3479  1.60     pooka 
   3480  1.60     pooka int rump___sysimpl_fstat30(int, struct stat *);
   3481  1.60     pooka int
   3482  1.60     pooka rump___sysimpl_fstat30(int fd, struct stat * sb)
   3483  1.60     pooka {
   3484  1.68     pooka 	register_t retval[2] = {0, 0};
   3485  1.60     pooka 	int error = 0;
   3486  1.68     pooka 	int rv = -1;
   3487  1.60     pooka 	struct compat_50_sys___fstat30_args callarg;
   3488  1.60     pooka 
   3489  1.60     pooka 	SPARG(&callarg, fd) = fd;
   3490  1.60     pooka 	SPARG(&callarg, sb) = (struct stat30 *)sb;
   3491  1.60     pooka 
   3492  1.68     pooka 	error = rsys_syscall(SYS_compat_50___fstat30, &callarg, sizeof(callarg), retval);
   3493  1.63     pooka 	rsys_seterrno(error);
   3494  1.68     pooka 	if (error == 0) {
   3495  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3496  1.68     pooka 			rv = *(int *)retval;
   3497  1.68     pooka 		else
   3498  1.69     pooka 			rv = *retval;
   3499  1.60     pooka 	}
   3500  1.68     pooka 	return rv;
   3501  1.60     pooka }
   3502  1.60     pooka rsys_alias(compat_50_sys___fstat30,rump_enosys)
   3503  1.60     pooka 
   3504  1.60     pooka int rump___sysimpl_lstat30(const char *, struct stat *);
   3505  1.60     pooka int
   3506  1.60     pooka rump___sysimpl_lstat30(const char * path, struct stat * ub)
   3507  1.60     pooka {
   3508  1.68     pooka 	register_t retval[2] = {0, 0};
   3509  1.60     pooka 	int error = 0;
   3510  1.68     pooka 	int rv = -1;
   3511  1.60     pooka 	struct compat_50_sys___lstat30_args callarg;
   3512  1.60     pooka 
   3513  1.60     pooka 	SPARG(&callarg, path) = path;
   3514  1.60     pooka 	SPARG(&callarg, ub) = (struct stat30 *)ub;
   3515  1.60     pooka 
   3516  1.68     pooka 	error = rsys_syscall(SYS_compat_50___lstat30, &callarg, sizeof(callarg), retval);
   3517  1.63     pooka 	rsys_seterrno(error);
   3518  1.68     pooka 	if (error == 0) {
   3519  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3520  1.68     pooka 			rv = *(int *)retval;
   3521  1.68     pooka 		else
   3522  1.69     pooka 			rv = *retval;
   3523  1.60     pooka 	}
   3524  1.68     pooka 	return rv;
   3525  1.60     pooka }
   3526  1.60     pooka rsys_alias(compat_50_sys___lstat30,rump_enosys)
   3527  1.60     pooka 
   3528  1.60     pooka int rump___sysimpl_getdents30(int, char *, size_t);
   3529  1.11     pooka int
   3530  1.60     pooka rump___sysimpl_getdents30(int fd, char * buf, size_t count)
   3531  1.10     pooka {
   3532  1.68     pooka 	register_t retval[2] = {0, 0};
   3533  1.27     pooka 	int error = 0;
   3534  1.68     pooka 	int rv = -1;
   3535  1.34     pooka 	struct sys___getdents30_args callarg;
   3536  1.10     pooka 
   3537  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3538  1.31     pooka 	SPARG(&callarg, buf) = buf;
   3539  1.34     pooka 	SPARG(&callarg, count) = count;
   3540  1.10     pooka 
   3541  1.68     pooka 	error = rsys_syscall(SYS___getdents30, &callarg, sizeof(callarg), retval);
   3542  1.63     pooka 	rsys_seterrno(error);
   3543  1.68     pooka 	if (error == 0) {
   3544  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3545  1.68     pooka 			rv = *(int *)retval;
   3546  1.68     pooka 		else
   3547  1.69     pooka 			rv = *retval;
   3548  1.27     pooka 	}
   3549  1.68     pooka 	return rv;
   3550  1.23  christos }
   3551  1.53     pooka rsys_alias(sys___getdents30,rump_enosys)
   3552  1.23  christos 
   3553  1.60     pooka int rump___sysimpl_socket30(int, int, int);
   3554  1.23  christos int
   3555  1.60     pooka rump___sysimpl_socket30(int domain, int type, int protocol)
   3556  1.23  christos {
   3557  1.68     pooka 	register_t retval[2] = {0, 0};
   3558  1.27     pooka 	int error = 0;
   3559  1.68     pooka 	int rv = -1;
   3560  1.31     pooka 	struct sys___socket30_args callarg;
   3561  1.23  christos 
   3562  1.31     pooka 	SPARG(&callarg, domain) = domain;
   3563  1.31     pooka 	SPARG(&callarg, type) = type;
   3564  1.31     pooka 	SPARG(&callarg, protocol) = protocol;
   3565  1.23  christos 
   3566  1.68     pooka 	error = rsys_syscall(SYS___socket30, &callarg, sizeof(callarg), retval);
   3567  1.63     pooka 	rsys_seterrno(error);
   3568  1.68     pooka 	if (error == 0) {
   3569  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3570  1.68     pooka 			rv = *(int *)retval;
   3571  1.68     pooka 		else
   3572  1.69     pooka 			rv = *retval;
   3573  1.27     pooka 	}
   3574  1.68     pooka 	return rv;
   3575  1.23  christos }
   3576  1.53     pooka rsys_alias(sys___socket30,rump_enosys)
   3577  1.23  christos 
   3578  1.60     pooka int rump___sysimpl_getfh30(const char *, void *, size_t *);
   3579  1.23  christos int
   3580  1.60     pooka rump___sysimpl_getfh30(const char * fname, void * fhp, size_t * fh_size)
   3581  1.23  christos {
   3582  1.68     pooka 	register_t retval[2] = {0, 0};
   3583  1.27     pooka 	int error = 0;
   3584  1.68     pooka 	int rv = -1;
   3585  1.31     pooka 	struct sys___getfh30_args callarg;
   3586  1.23  christos 
   3587  1.31     pooka 	SPARG(&callarg, fname) = fname;
   3588  1.31     pooka 	SPARG(&callarg, fhp) = fhp;
   3589  1.31     pooka 	SPARG(&callarg, fh_size) = fh_size;
   3590  1.23  christos 
   3591  1.68     pooka 	error = rsys_syscall(SYS___getfh30, &callarg, sizeof(callarg), retval);
   3592  1.63     pooka 	rsys_seterrno(error);
   3593  1.68     pooka 	if (error == 0) {
   3594  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3595  1.68     pooka 			rv = *(int *)retval;
   3596  1.68     pooka 		else
   3597  1.69     pooka 			rv = *retval;
   3598  1.27     pooka 	}
   3599  1.68     pooka 	return rv;
   3600  1.10     pooka }
   3601  1.53     pooka rsys_alias(sys___getfh30,rump_enosys)
   3602  1.10     pooka 
   3603  1.60     pooka int rump___sysimpl_fhopen40(const void *, size_t, int);
   3604  1.36     pooka int
   3605  1.60     pooka rump___sysimpl_fhopen40(const void * fhp, size_t fh_size, int flags)
   3606  1.36     pooka {
   3607  1.68     pooka 	register_t retval[2] = {0, 0};
   3608  1.36     pooka 	int error = 0;
   3609  1.68     pooka 	int rv = -1;
   3610  1.36     pooka 	struct sys___fhopen40_args callarg;
   3611  1.36     pooka 
   3612  1.36     pooka 	SPARG(&callarg, fhp) = fhp;
   3613  1.36     pooka 	SPARG(&callarg, fh_size) = fh_size;
   3614  1.36     pooka 	SPARG(&callarg, flags) = flags;
   3615  1.36     pooka 
   3616  1.68     pooka 	error = rsys_syscall(SYS___fhopen40, &callarg, sizeof(callarg), retval);
   3617  1.63     pooka 	rsys_seterrno(error);
   3618  1.68     pooka 	if (error == 0) {
   3619  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3620  1.68     pooka 			rv = *(int *)retval;
   3621  1.68     pooka 		else
   3622  1.69     pooka 			rv = *retval;
   3623  1.36     pooka 	}
   3624  1.68     pooka 	return rv;
   3625  1.36     pooka }
   3626  1.53     pooka rsys_alias(sys___fhopen40,rump_enosys)
   3627  1.36     pooka 
   3628  1.60     pooka int rump___sysimpl_fhstatvfs140(const void *, size_t, struct statvfs *, int);
   3629  1.36     pooka int
   3630  1.60     pooka rump___sysimpl_fhstatvfs140(const void * fhp, size_t fh_size, struct statvfs * buf, int flags)
   3631  1.36     pooka {
   3632  1.68     pooka 	register_t retval[2] = {0, 0};
   3633  1.36     pooka 	int error = 0;
   3634  1.68     pooka 	int rv = -1;
   3635  1.36     pooka 	struct sys___fhstatvfs140_args callarg;
   3636  1.36     pooka 
   3637  1.36     pooka 	SPARG(&callarg, fhp) = fhp;
   3638  1.36     pooka 	SPARG(&callarg, fh_size) = fh_size;
   3639  1.36     pooka 	SPARG(&callarg, buf) = buf;
   3640  1.36     pooka 	SPARG(&callarg, flags) = flags;
   3641  1.36     pooka 
   3642  1.68     pooka 	error = rsys_syscall(SYS___fhstatvfs140, &callarg, sizeof(callarg), retval);
   3643  1.63     pooka 	rsys_seterrno(error);
   3644  1.68     pooka 	if (error == 0) {
   3645  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3646  1.68     pooka 			rv = *(int *)retval;
   3647  1.68     pooka 		else
   3648  1.69     pooka 			rv = *retval;
   3649  1.36     pooka 	}
   3650  1.68     pooka 	return rv;
   3651  1.36     pooka }
   3652  1.53     pooka rsys_alias(sys___fhstatvfs140,rump_enosys)
   3653  1.36     pooka 
   3654  1.61     pooka int rump___sysimpl_fhstat40(const void *, size_t, struct stat *);
   3655  1.61     pooka int
   3656  1.61     pooka rump___sysimpl_fhstat40(const void * fhp, size_t fh_size, struct stat * sb)
   3657  1.61     pooka {
   3658  1.68     pooka 	register_t retval[2] = {0, 0};
   3659  1.61     pooka 	int error = 0;
   3660  1.68     pooka 	int rv = -1;
   3661  1.61     pooka 	struct compat_50_sys___fhstat40_args callarg;
   3662  1.61     pooka 
   3663  1.61     pooka 	SPARG(&callarg, fhp) = fhp;
   3664  1.61     pooka 	SPARG(&callarg, fh_size) = fh_size;
   3665  1.61     pooka 	SPARG(&callarg, sb) = (struct stat30 *)sb;
   3666  1.61     pooka 
   3667  1.68     pooka 	error = rsys_syscall(SYS_compat_50___fhstat40, &callarg, sizeof(callarg), retval);
   3668  1.63     pooka 	rsys_seterrno(error);
   3669  1.68     pooka 	if (error == 0) {
   3670  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3671  1.68     pooka 			rv = *(int *)retval;
   3672  1.68     pooka 		else
   3673  1.69     pooka 			rv = *retval;
   3674  1.61     pooka 	}
   3675  1.68     pooka 	return rv;
   3676  1.61     pooka }
   3677  1.61     pooka rsys_alias(compat_50_sys___fhstat40,rump_enosys)
   3678  1.61     pooka 
   3679  1.60     pooka int rump___sysimpl_mount50(const char *, const char *, int, void *, size_t);
   3680  1.33     pooka int
   3681  1.60     pooka rump___sysimpl_mount50(const char * type, const char * path, int flags, void * data, size_t data_len)
   3682  1.33     pooka {
   3683  1.68     pooka 	register_t retval[2] = {0, 0};
   3684  1.33     pooka 	int error = 0;
   3685  1.68     pooka 	int rv = -1;
   3686  1.33     pooka 	struct sys___mount50_args callarg;
   3687  1.33     pooka 
   3688  1.33     pooka 	SPARG(&callarg, type) = type;
   3689  1.33     pooka 	SPARG(&callarg, path) = path;
   3690  1.33     pooka 	SPARG(&callarg, flags) = flags;
   3691  1.33     pooka 	SPARG(&callarg, data) = data;
   3692  1.33     pooka 	SPARG(&callarg, data_len) = data_len;
   3693  1.33     pooka 
   3694  1.68     pooka 	error = rsys_syscall(SYS___mount50, &callarg, sizeof(callarg), retval);
   3695  1.63     pooka 	rsys_seterrno(error);
   3696  1.68     pooka 	if (error == 0) {
   3697  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3698  1.68     pooka 			rv = *(int *)retval;
   3699  1.68     pooka 		else
   3700  1.69     pooka 			rv = *retval;
   3701  1.33     pooka 	}
   3702  1.68     pooka 	return rv;
   3703  1.33     pooka }
   3704  1.53     pooka rsys_alias(sys___mount50,rump_enosys)
   3705  1.33     pooka 
   3706  1.60     pooka int rump___sysimpl_posix_fadvise50(int, off_t, off_t, int);
   3707  1.54     pooka int
   3708  1.60     pooka rump___sysimpl_posix_fadvise50(int fd, off_t offset, off_t len, int advice)
   3709  1.54     pooka {
   3710  1.68     pooka 	register_t retval[2] = {0, 0};
   3711  1.68     pooka 	int rv = -1;
   3712  1.54     pooka 	struct sys___posix_fadvise50_args callarg;
   3713  1.54     pooka 
   3714  1.54     pooka 	SPARG(&callarg, fd) = fd;
   3715  1.54     pooka 	SPARG(&callarg, PAD) = 0;
   3716  1.54     pooka 	SPARG(&callarg, offset) = offset;
   3717  1.54     pooka 	SPARG(&callarg, len) = len;
   3718  1.54     pooka 	SPARG(&callarg, advice) = advice;
   3719  1.54     pooka 
   3720  1.68     pooka 	rsys_syscall(SYS___posix_fadvise50, &callarg, sizeof(callarg), retval);
   3721  1.68     pooka 	if (sizeof(int) > sizeof(register_t))
   3722  1.68     pooka 		rv = *(int *)retval;
   3723  1.68     pooka 	else
   3724  1.69     pooka 		rv = *retval;
   3725  1.68     pooka 	return rv;
   3726  1.54     pooka }
   3727  1.54     pooka rsys_alias(sys___posix_fadvise50,rump_enosys)
   3728  1.54     pooka 
   3729  1.60     pooka int rump___sysimpl_select50(int, fd_set *, fd_set *, fd_set *, struct timeval *);
   3730  1.34     pooka int
   3731  1.60     pooka rump___sysimpl_select50(int nd, fd_set * in, fd_set * ou, fd_set * ex, struct timeval * tv)
   3732  1.34     pooka {
   3733  1.68     pooka 	register_t retval[2] = {0, 0};
   3734  1.34     pooka 	int error = 0;
   3735  1.68     pooka 	int rv = -1;
   3736  1.34     pooka 	struct sys___select50_args callarg;
   3737  1.34     pooka 
   3738  1.34     pooka 	SPARG(&callarg, nd) = nd;
   3739  1.34     pooka 	SPARG(&callarg, in) = in;
   3740  1.34     pooka 	SPARG(&callarg, ou) = ou;
   3741  1.34     pooka 	SPARG(&callarg, ex) = ex;
   3742  1.34     pooka 	SPARG(&callarg, tv) = tv;
   3743  1.34     pooka 
   3744  1.68     pooka 	error = rsys_syscall(SYS___select50, &callarg, sizeof(callarg), retval);
   3745  1.63     pooka 	rsys_seterrno(error);
   3746  1.68     pooka 	if (error == 0) {
   3747  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3748  1.68     pooka 			rv = *(int *)retval;
   3749  1.68     pooka 		else
   3750  1.69     pooka 			rv = *retval;
   3751  1.34     pooka 	}
   3752  1.68     pooka 	return rv;
   3753  1.34     pooka }
   3754  1.53     pooka rsys_alias(sys___select50,rump_enosys)
   3755  1.34     pooka 
   3756  1.60     pooka int rump___sysimpl_utimes50(const char *, const struct timeval *);
   3757  1.10     pooka int
   3758  1.60     pooka rump___sysimpl_utimes50(const char * path, const struct timeval * tptr)
   3759  1.22     pooka {
   3760  1.68     pooka 	register_t retval[2] = {0, 0};
   3761  1.27     pooka 	int error = 0;
   3762  1.68     pooka 	int rv = -1;
   3763  1.31     pooka 	struct sys___utimes50_args callarg;
   3764  1.22     pooka 
   3765  1.31     pooka 	SPARG(&callarg, path) = path;
   3766  1.31     pooka 	SPARG(&callarg, tptr) = tptr;
   3767  1.22     pooka 
   3768  1.68     pooka 	error = rsys_syscall(SYS___utimes50, &callarg, sizeof(callarg), retval);
   3769  1.63     pooka 	rsys_seterrno(error);
   3770  1.68     pooka 	if (error == 0) {
   3771  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3772  1.68     pooka 			rv = *(int *)retval;
   3773  1.68     pooka 		else
   3774  1.69     pooka 			rv = *retval;
   3775  1.27     pooka 	}
   3776  1.68     pooka 	return rv;
   3777  1.22     pooka }
   3778  1.53     pooka rsys_alias(sys___utimes50,rump_enosys)
   3779  1.22     pooka 
   3780  1.60     pooka int rump___sysimpl_futimes50(int, const struct timeval *);
   3781  1.34     pooka int
   3782  1.60     pooka rump___sysimpl_futimes50(int fd, const struct timeval * tptr)
   3783  1.34     pooka {
   3784  1.68     pooka 	register_t retval[2] = {0, 0};
   3785  1.34     pooka 	int error = 0;
   3786  1.68     pooka 	int rv = -1;
   3787  1.34     pooka 	struct sys___futimes50_args callarg;
   3788  1.34     pooka 
   3789  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3790  1.34     pooka 	SPARG(&callarg, tptr) = tptr;
   3791  1.34     pooka 
   3792  1.68     pooka 	error = rsys_syscall(SYS___futimes50, &callarg, sizeof(callarg), retval);
   3793  1.63     pooka 	rsys_seterrno(error);
   3794  1.68     pooka 	if (error == 0) {
   3795  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3796  1.68     pooka 			rv = *(int *)retval;
   3797  1.68     pooka 		else
   3798  1.69     pooka 			rv = *retval;
   3799  1.34     pooka 	}
   3800  1.68     pooka 	return rv;
   3801  1.34     pooka }
   3802  1.53     pooka rsys_alias(sys___futimes50,rump_enosys)
   3803  1.34     pooka 
   3804  1.60     pooka int rump___sysimpl_lutimes50(const char *, const struct timeval *);
   3805  1.22     pooka int
   3806  1.60     pooka rump___sysimpl_lutimes50(const char * path, const struct timeval * tptr)
   3807  1.10     pooka {
   3808  1.68     pooka 	register_t retval[2] = {0, 0};
   3809  1.27     pooka 	int error = 0;
   3810  1.68     pooka 	int rv = -1;
   3811  1.31     pooka 	struct sys___lutimes50_args callarg;
   3812  1.10     pooka 
   3813  1.31     pooka 	SPARG(&callarg, path) = path;
   3814  1.31     pooka 	SPARG(&callarg, tptr) = tptr;
   3815  1.10     pooka 
   3816  1.68     pooka 	error = rsys_syscall(SYS___lutimes50, &callarg, sizeof(callarg), retval);
   3817  1.63     pooka 	rsys_seterrno(error);
   3818  1.68     pooka 	if (error == 0) {
   3819  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3820  1.68     pooka 			rv = *(int *)retval;
   3821  1.68     pooka 		else
   3822  1.69     pooka 			rv = *retval;
   3823  1.27     pooka 	}
   3824  1.68     pooka 	return rv;
   3825  1.10     pooka }
   3826  1.53     pooka rsys_alias(sys___lutimes50,rump_enosys)
   3827  1.10     pooka 
   3828  1.60     pooka int rump___sysimpl_kevent50(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *);
   3829  1.32     pooka int
   3830  1.60     pooka rump___sysimpl_kevent50(int fd, const struct kevent * changelist, size_t nchanges, struct kevent * eventlist, size_t nevents, const struct timespec * timeout)
   3831  1.32     pooka {
   3832  1.68     pooka 	register_t retval[2] = {0, 0};
   3833  1.32     pooka 	int error = 0;
   3834  1.68     pooka 	int rv = -1;
   3835  1.32     pooka 	struct sys___kevent50_args callarg;
   3836  1.32     pooka 
   3837  1.32     pooka 	SPARG(&callarg, fd) = fd;
   3838  1.32     pooka 	SPARG(&callarg, changelist) = changelist;
   3839  1.32     pooka 	SPARG(&callarg, nchanges) = nchanges;
   3840  1.32     pooka 	SPARG(&callarg, eventlist) = eventlist;
   3841  1.32     pooka 	SPARG(&callarg, nevents) = nevents;
   3842  1.32     pooka 	SPARG(&callarg, timeout) = timeout;
   3843  1.32     pooka 
   3844  1.68     pooka 	error = rsys_syscall(SYS___kevent50, &callarg, sizeof(callarg), retval);
   3845  1.63     pooka 	rsys_seterrno(error);
   3846  1.68     pooka 	if (error == 0) {
   3847  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3848  1.68     pooka 			rv = *(int *)retval;
   3849  1.68     pooka 		else
   3850  1.69     pooka 			rv = *retval;
   3851  1.32     pooka 	}
   3852  1.68     pooka 	return rv;
   3853  1.32     pooka }
   3854  1.53     pooka rsys_alias(sys___kevent50,rump_enosys)
   3855  1.32     pooka 
   3856  1.60     pooka int rump___sysimpl_pselect50(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
   3857  1.34     pooka int
   3858  1.60     pooka rump___sysimpl_pselect50(int nd, fd_set * in, fd_set * ou, fd_set * ex, const struct timespec * ts, const sigset_t * mask)
   3859  1.34     pooka {
   3860  1.68     pooka 	register_t retval[2] = {0, 0};
   3861  1.34     pooka 	int error = 0;
   3862  1.68     pooka 	int rv = -1;
   3863  1.34     pooka 	struct sys___pselect50_args callarg;
   3864  1.34     pooka 
   3865  1.34     pooka 	SPARG(&callarg, nd) = nd;
   3866  1.34     pooka 	SPARG(&callarg, in) = in;
   3867  1.34     pooka 	SPARG(&callarg, ou) = ou;
   3868  1.34     pooka 	SPARG(&callarg, ex) = ex;
   3869  1.34     pooka 	SPARG(&callarg, ts) = ts;
   3870  1.34     pooka 	SPARG(&callarg, mask) = mask;
   3871  1.34     pooka 
   3872  1.68     pooka 	error = rsys_syscall(SYS___pselect50, &callarg, sizeof(callarg), retval);
   3873  1.63     pooka 	rsys_seterrno(error);
   3874  1.68     pooka 	if (error == 0) {
   3875  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3876  1.68     pooka 			rv = *(int *)retval;
   3877  1.68     pooka 		else
   3878  1.69     pooka 			rv = *retval;
   3879  1.34     pooka 	}
   3880  1.68     pooka 	return rv;
   3881  1.34     pooka }
   3882  1.53     pooka rsys_alias(sys___pselect50,rump_enosys)
   3883  1.34     pooka 
   3884  1.60     pooka int rump___sysimpl_pollts50(struct pollfd *, u_int, const struct timespec *, const sigset_t *);
   3885  1.34     pooka int
   3886  1.60     pooka rump___sysimpl_pollts50(struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * mask)
   3887  1.34     pooka {
   3888  1.68     pooka 	register_t retval[2] = {0, 0};
   3889  1.34     pooka 	int error = 0;
   3890  1.68     pooka 	int rv = -1;
   3891  1.34     pooka 	struct sys___pollts50_args callarg;
   3892  1.34     pooka 
   3893  1.34     pooka 	SPARG(&callarg, fds) = fds;
   3894  1.34     pooka 	SPARG(&callarg, nfds) = nfds;
   3895  1.34     pooka 	SPARG(&callarg, ts) = ts;
   3896  1.34     pooka 	SPARG(&callarg, mask) = mask;
   3897  1.34     pooka 
   3898  1.68     pooka 	error = rsys_syscall(SYS___pollts50, &callarg, sizeof(callarg), retval);
   3899  1.63     pooka 	rsys_seterrno(error);
   3900  1.68     pooka 	if (error == 0) {
   3901  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3902  1.68     pooka 			rv = *(int *)retval;
   3903  1.68     pooka 		else
   3904  1.69     pooka 			rv = *retval;
   3905  1.34     pooka 	}
   3906  1.68     pooka 	return rv;
   3907  1.34     pooka }
   3908  1.53     pooka rsys_alias(sys___pollts50,rump_enosys)
   3909  1.34     pooka 
   3910  1.60     pooka int rump___sysimpl_stat50(const char *, struct stat *);
   3911  1.10     pooka int
   3912  1.60     pooka rump___sysimpl_stat50(const char * path, struct stat * ub)
   3913  1.10     pooka {
   3914  1.68     pooka 	register_t retval[2] = {0, 0};
   3915  1.27     pooka 	int error = 0;
   3916  1.68     pooka 	int rv = -1;
   3917  1.31     pooka 	struct sys___stat50_args callarg;
   3918  1.10     pooka 
   3919  1.31     pooka 	SPARG(&callarg, path) = path;
   3920  1.31     pooka 	SPARG(&callarg, ub) = ub;
   3921  1.10     pooka 
   3922  1.68     pooka 	error = rsys_syscall(SYS___stat50, &callarg, sizeof(callarg), retval);
   3923  1.63     pooka 	rsys_seterrno(error);
   3924  1.68     pooka 	if (error == 0) {
   3925  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3926  1.68     pooka 			rv = *(int *)retval;
   3927  1.68     pooka 		else
   3928  1.69     pooka 			rv = *retval;
   3929  1.27     pooka 	}
   3930  1.68     pooka 	return rv;
   3931  1.10     pooka }
   3932  1.53     pooka rsys_alias(sys___stat50,rump_enosys)
   3933  1.18     pooka 
   3934  1.60     pooka int rump___sysimpl_fstat50(int, struct stat *);
   3935  1.34     pooka int
   3936  1.60     pooka rump___sysimpl_fstat50(int fd, struct stat * sb)
   3937  1.34     pooka {
   3938  1.68     pooka 	register_t retval[2] = {0, 0};
   3939  1.34     pooka 	int error = 0;
   3940  1.68     pooka 	int rv = -1;
   3941  1.34     pooka 	struct sys___fstat50_args callarg;
   3942  1.34     pooka 
   3943  1.34     pooka 	SPARG(&callarg, fd) = fd;
   3944  1.34     pooka 	SPARG(&callarg, sb) = sb;
   3945  1.34     pooka 
   3946  1.68     pooka 	error = rsys_syscall(SYS___fstat50, &callarg, sizeof(callarg), retval);
   3947  1.63     pooka 	rsys_seterrno(error);
   3948  1.68     pooka 	if (error == 0) {
   3949  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3950  1.68     pooka 			rv = *(int *)retval;
   3951  1.68     pooka 		else
   3952  1.69     pooka 			rv = *retval;
   3953  1.34     pooka 	}
   3954  1.68     pooka 	return rv;
   3955  1.34     pooka }
   3956  1.53     pooka rsys_alias(sys___fstat50,rump_enosys)
   3957  1.34     pooka 
   3958  1.60     pooka int rump___sysimpl_lstat50(const char *, struct stat *);
   3959  1.18     pooka int
   3960  1.60     pooka rump___sysimpl_lstat50(const char * path, struct stat * ub)
   3961  1.18     pooka {
   3962  1.68     pooka 	register_t retval[2] = {0, 0};
   3963  1.27     pooka 	int error = 0;
   3964  1.68     pooka 	int rv = -1;
   3965  1.31     pooka 	struct sys___lstat50_args callarg;
   3966  1.18     pooka 
   3967  1.31     pooka 	SPARG(&callarg, path) = path;
   3968  1.31     pooka 	SPARG(&callarg, ub) = ub;
   3969  1.18     pooka 
   3970  1.68     pooka 	error = rsys_syscall(SYS___lstat50, &callarg, sizeof(callarg), retval);
   3971  1.63     pooka 	rsys_seterrno(error);
   3972  1.68     pooka 	if (error == 0) {
   3973  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3974  1.68     pooka 			rv = *(int *)retval;
   3975  1.68     pooka 		else
   3976  1.69     pooka 			rv = *retval;
   3977  1.27     pooka 	}
   3978  1.68     pooka 	return rv;
   3979  1.18     pooka }
   3980  1.53     pooka rsys_alias(sys___lstat50,rump_enosys)
   3981  1.22     pooka 
   3982  1.60     pooka int rump___sysimpl_mknod50(const char *, mode_t, dev_t);
   3983  1.22     pooka int
   3984  1.60     pooka rump___sysimpl_mknod50(const char * path, mode_t mode, dev_t dev)
   3985  1.22     pooka {
   3986  1.68     pooka 	register_t retval[2] = {0, 0};
   3987  1.27     pooka 	int error = 0;
   3988  1.68     pooka 	int rv = -1;
   3989  1.31     pooka 	struct sys___mknod50_args callarg;
   3990  1.22     pooka 
   3991  1.31     pooka 	SPARG(&callarg, path) = path;
   3992  1.31     pooka 	SPARG(&callarg, mode) = mode;
   3993  1.31     pooka 	SPARG(&callarg, dev) = dev;
   3994  1.22     pooka 
   3995  1.68     pooka 	error = rsys_syscall(SYS___mknod50, &callarg, sizeof(callarg), retval);
   3996  1.63     pooka 	rsys_seterrno(error);
   3997  1.68     pooka 	if (error == 0) {
   3998  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3999  1.68     pooka 			rv = *(int *)retval;
   4000  1.68     pooka 		else
   4001  1.69     pooka 			rv = *retval;
   4002  1.27     pooka 	}
   4003  1.68     pooka 	return rv;
   4004  1.22     pooka }
   4005  1.53     pooka rsys_alias(sys___mknod50,rump_enosys)
   4006  1.29     pooka 
   4007  1.60     pooka int rump___sysimpl_fhstat50(const void *, size_t, struct stat *);
   4008  1.34     pooka int
   4009  1.60     pooka rump___sysimpl_fhstat50(const void * fhp, size_t fh_size, struct stat * sb)
   4010  1.34     pooka {
   4011  1.68     pooka 	register_t retval[2] = {0, 0};
   4012  1.34     pooka 	int error = 0;
   4013  1.68     pooka 	int rv = -1;
   4014  1.34     pooka 	struct sys___fhstat50_args callarg;
   4015  1.34     pooka 
   4016  1.34     pooka 	SPARG(&callarg, fhp) = fhp;
   4017  1.34     pooka 	SPARG(&callarg, fh_size) = fh_size;
   4018  1.34     pooka 	SPARG(&callarg, sb) = sb;
   4019  1.34     pooka 
   4020  1.68     pooka 	error = rsys_syscall(SYS___fhstat50, &callarg, sizeof(callarg), retval);
   4021  1.63     pooka 	rsys_seterrno(error);
   4022  1.68     pooka 	if (error == 0) {
   4023  1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4024  1.68     pooka 			rv = *(int *)retval;
   4025  1.68     pooka 		else
   4026  1.69     pooka 			rv = *retval;
   4027  1.34     pooka 	}
   4028  1.68     pooka 	return rv;
   4029  1.34     pooka }
   4030  1.53     pooka rsys_alias(sys___fhstat50,rump_enosys)
   4031  1.34     pooka 
   4032  1.72  christos int rump___sysimpl_pipe2(int *, int);
   4033  1.72  christos int
   4034  1.72  christos rump___sysimpl_pipe2(int * fildes, int flags)
   4035  1.72  christos {
   4036  1.72  christos 	register_t retval[2] = {0, 0};
   4037  1.72  christos 	int error = 0;
   4038  1.72  christos 	int rv = -1;
   4039  1.72  christos 	struct sys_pipe2_args callarg;
   4040  1.72  christos 
   4041  1.72  christos 	SPARG(&callarg, fildes) = fildes;
   4042  1.72  christos 	SPARG(&callarg, flags) = flags;
   4043  1.72  christos 
   4044  1.72  christos 	error = rsys_syscall(SYS_pipe2, &callarg, sizeof(callarg), retval);
   4045  1.72  christos 	rsys_seterrno(error);
   4046  1.72  christos 	if (error == 0) {
   4047  1.72  christos 		if (sizeof(int) > sizeof(register_t))
   4048  1.72  christos 			rv = *(int *)retval;
   4049  1.72  christos 		else
   4050  1.72  christos 			rv = *retval;
   4051  1.72  christos 	}
   4052  1.72  christos 	return rv;
   4053  1.72  christos }
   4054  1.72  christos rsys_alias(sys_pipe2,rump_enosys)
   4055  1.72  christos 
   4056  1.72  christos int rump___sysimpl_dup3(int, int, int);
   4057  1.72  christos int
   4058  1.72  christos rump___sysimpl_dup3(int from, int to, int flags)
   4059  1.72  christos {
   4060  1.72  christos 	register_t retval[2] = {0, 0};
   4061  1.72  christos 	int error = 0;
   4062  1.72  christos 	int rv = -1;
   4063  1.72  christos 	struct sys_dup3_args callarg;
   4064  1.72  christos 
   4065  1.72  christos 	SPARG(&callarg, from) = from;
   4066  1.72  christos 	SPARG(&callarg, to) = to;
   4067  1.72  christos 	SPARG(&callarg, flags) = flags;
   4068  1.72  christos 
   4069  1.72  christos 	error = rsys_syscall(SYS_dup3, &callarg, sizeof(callarg), retval);
   4070  1.72  christos 	rsys_seterrno(error);
   4071  1.72  christos 	if (error == 0) {
   4072  1.72  christos 		if (sizeof(int) > sizeof(register_t))
   4073  1.72  christos 			rv = *(int *)retval;
   4074  1.72  christos 		else
   4075  1.72  christos 			rv = *retval;
   4076  1.72  christos 	}
   4077  1.72  christos 	return rv;
   4078  1.72  christos }
   4079  1.72  christos rsys_alias(sys_dup3,rump_enosys)
   4080  1.72  christos 
   4081  1.72  christos int rump___sysimpl_kqueue1(int);
   4082  1.72  christos int
   4083  1.72  christos rump___sysimpl_kqueue1(int flags)
   4084  1.72  christos {
   4085  1.72  christos 	register_t retval[2] = {0, 0};
   4086  1.72  christos 	int error = 0;
   4087  1.72  christos 	int rv = -1;
   4088  1.72  christos 	struct sys_kqueue1_args callarg;
   4089  1.72  christos 
   4090  1.72  christos 	SPARG(&callarg, flags) = flags;
   4091  1.72  christos 
   4092  1.72  christos 	error = rsys_syscall(SYS_kqueue1, &callarg, sizeof(callarg), retval);
   4093  1.72  christos 	rsys_seterrno(error);
   4094  1.72  christos 	if (error == 0) {
   4095  1.72  christos 		if (sizeof(int) > sizeof(register_t))
   4096  1.72  christos 			rv = *(int *)retval;
   4097  1.72  christos 		else
   4098  1.72  christos 			rv = *retval;
   4099  1.72  christos 	}
   4100  1.72  christos 	return rv;
   4101  1.72  christos }
   4102  1.72  christos rsys_alias(sys_kqueue1,rump_enosys)
   4103  1.72  christos 
   4104  1.72  christos int rump___sysimpl_paccept(int, struct sockaddr *, socklen_t *, const sigset_t *, int);
   4105  1.72  christos int
   4106  1.72  christos rump___sysimpl_paccept(int s, struct sockaddr * name, socklen_t * anamelen, const sigset_t * mask, int flags)
   4107  1.72  christos {
   4108  1.72  christos 	register_t retval[2] = {0, 0};
   4109  1.72  christos 	int error = 0;
   4110  1.72  christos 	int rv = -1;
   4111  1.72  christos 	struct sys_paccept_args callarg;
   4112  1.72  christos 
   4113  1.72  christos 	SPARG(&callarg, s) = s;
   4114  1.72  christos 	SPARG(&callarg, name) = name;
   4115  1.72  christos 	SPARG(&callarg, anamelen) = anamelen;
   4116  1.72  christos 	SPARG(&callarg, mask) = mask;
   4117  1.72  christos 	SPARG(&callarg, flags) = flags;
   4118  1.72  christos 
   4119  1.72  christos 	error = rsys_syscall(SYS_paccept, &callarg, sizeof(callarg), retval);
   4120  1.72  christos 	rsys_seterrno(error);
   4121  1.72  christos 	if (error == 0) {
   4122  1.72  christos 		if (sizeof(int) > sizeof(register_t))
   4123  1.72  christos 			rv = *(int *)retval;
   4124  1.72  christos 		else
   4125  1.72  christos 			rv = *retval;
   4126  1.72  christos 	}
   4127  1.72  christos 	return rv;
   4128  1.72  christos }
   4129  1.72  christos rsys_alias(sys_paccept,rump_enosys)
   4130  1.72  christos 
   4131  1.74      manu int rump___sysimpl_linkat(int, const char *, int, const char *, int);
   4132  1.74      manu int
   4133  1.74      manu rump___sysimpl_linkat(int fd1, const char * name1, int fd2, const char * name2, int flags)
   4134  1.74      manu {
   4135  1.74      manu 	register_t retval[2] = {0, 0};
   4136  1.74      manu 	int error = 0;
   4137  1.74      manu 	int rv = -1;
   4138  1.74      manu 	struct sys_linkat_args callarg;
   4139  1.74      manu 
   4140  1.74      manu 	SPARG(&callarg, fd1) = fd1;
   4141  1.74      manu 	SPARG(&callarg, name1) = name1;
   4142  1.74      manu 	SPARG(&callarg, fd2) = fd2;
   4143  1.74      manu 	SPARG(&callarg, name2) = name2;
   4144  1.74      manu 	SPARG(&callarg, flags) = flags;
   4145  1.74      manu 
   4146  1.74      manu 	error = rsys_syscall(SYS_linkat, &callarg, sizeof(callarg), retval);
   4147  1.74      manu 	rsys_seterrno(error);
   4148  1.74      manu 	if (error == 0) {
   4149  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4150  1.74      manu 			rv = *(int *)retval;
   4151  1.74      manu 		else
   4152  1.74      manu 			rv = *retval;
   4153  1.74      manu 	}
   4154  1.74      manu 	return rv;
   4155  1.74      manu }
   4156  1.74      manu rsys_alias(sys_linkat,rump_enosys)
   4157  1.74      manu 
   4158  1.74      manu int rump___sysimpl_renameat(int, const char *, int, const char *);
   4159  1.74      manu int
   4160  1.74      manu rump___sysimpl_renameat(int fromfd, const char * from, int tofd, const char * to)
   4161  1.74      manu {
   4162  1.74      manu 	register_t retval[2] = {0, 0};
   4163  1.74      manu 	int error = 0;
   4164  1.74      manu 	int rv = -1;
   4165  1.74      manu 	struct sys_renameat_args callarg;
   4166  1.74      manu 
   4167  1.74      manu 	SPARG(&callarg, fromfd) = fromfd;
   4168  1.74      manu 	SPARG(&callarg, from) = from;
   4169  1.74      manu 	SPARG(&callarg, tofd) = tofd;
   4170  1.74      manu 	SPARG(&callarg, to) = to;
   4171  1.74      manu 
   4172  1.74      manu 	error = rsys_syscall(SYS_renameat, &callarg, sizeof(callarg), retval);
   4173  1.74      manu 	rsys_seterrno(error);
   4174  1.74      manu 	if (error == 0) {
   4175  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4176  1.74      manu 			rv = *(int *)retval;
   4177  1.74      manu 		else
   4178  1.74      manu 			rv = *retval;
   4179  1.74      manu 	}
   4180  1.74      manu 	return rv;
   4181  1.74      manu }
   4182  1.74      manu rsys_alias(sys_renameat,rump_enosys)
   4183  1.74      manu 
   4184  1.74      manu int rump___sysimpl_mkfifoat(int, const char *, mode_t);
   4185  1.74      manu int
   4186  1.74      manu rump___sysimpl_mkfifoat(int fd, const char * path, mode_t mode)
   4187  1.74      manu {
   4188  1.74      manu 	register_t retval[2] = {0, 0};
   4189  1.74      manu 	int error = 0;
   4190  1.74      manu 	int rv = -1;
   4191  1.74      manu 	struct sys_mkfifoat_args callarg;
   4192  1.74      manu 
   4193  1.74      manu 	SPARG(&callarg, fd) = fd;
   4194  1.74      manu 	SPARG(&callarg, path) = path;
   4195  1.74      manu 	SPARG(&callarg, mode) = mode;
   4196  1.74      manu 
   4197  1.74      manu 	error = rsys_syscall(SYS_mkfifoat, &callarg, sizeof(callarg), retval);
   4198  1.74      manu 	rsys_seterrno(error);
   4199  1.74      manu 	if (error == 0) {
   4200  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4201  1.74      manu 			rv = *(int *)retval;
   4202  1.74      manu 		else
   4203  1.74      manu 			rv = *retval;
   4204  1.74      manu 	}
   4205  1.74      manu 	return rv;
   4206  1.74      manu }
   4207  1.74      manu rsys_alias(sys_mkfifoat,rump_enosys)
   4208  1.74      manu 
   4209  1.74      manu int rump___sysimpl_mknodat(int, const char *, mode_t, uint32_t);
   4210  1.74      manu int
   4211  1.74      manu rump___sysimpl_mknodat(int fd, const char * path, mode_t mode, uint32_t dev)
   4212  1.74      manu {
   4213  1.74      manu 	register_t retval[2] = {0, 0};
   4214  1.74      manu 	int error = 0;
   4215  1.74      manu 	int rv = -1;
   4216  1.74      manu 	struct sys_mknodat_args callarg;
   4217  1.74      manu 
   4218  1.74      manu 	SPARG(&callarg, fd) = fd;
   4219  1.74      manu 	SPARG(&callarg, path) = path;
   4220  1.74      manu 	SPARG(&callarg, mode) = mode;
   4221  1.74      manu 	SPARG(&callarg, dev) = dev;
   4222  1.74      manu 
   4223  1.74      manu 	error = rsys_syscall(SYS_mknodat, &callarg, sizeof(callarg), retval);
   4224  1.74      manu 	rsys_seterrno(error);
   4225  1.74      manu 	if (error == 0) {
   4226  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4227  1.74      manu 			rv = *(int *)retval;
   4228  1.74      manu 		else
   4229  1.74      manu 			rv = *retval;
   4230  1.74      manu 	}
   4231  1.74      manu 	return rv;
   4232  1.74      manu }
   4233  1.74      manu rsys_alias(sys_mknodat,rump_enosys)
   4234  1.74      manu 
   4235  1.74      manu int rump___sysimpl_mkdirat(int, const char *, mode_t);
   4236  1.74      manu int
   4237  1.74      manu rump___sysimpl_mkdirat(int fd, const char * path, mode_t mode)
   4238  1.74      manu {
   4239  1.74      manu 	register_t retval[2] = {0, 0};
   4240  1.74      manu 	int error = 0;
   4241  1.74      manu 	int rv = -1;
   4242  1.74      manu 	struct sys_mkdirat_args callarg;
   4243  1.74      manu 
   4244  1.74      manu 	SPARG(&callarg, fd) = fd;
   4245  1.74      manu 	SPARG(&callarg, path) = path;
   4246  1.74      manu 	SPARG(&callarg, mode) = mode;
   4247  1.74      manu 
   4248  1.74      manu 	error = rsys_syscall(SYS_mkdirat, &callarg, sizeof(callarg), retval);
   4249  1.74      manu 	rsys_seterrno(error);
   4250  1.74      manu 	if (error == 0) {
   4251  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4252  1.74      manu 			rv = *(int *)retval;
   4253  1.74      manu 		else
   4254  1.74      manu 			rv = *retval;
   4255  1.74      manu 	}
   4256  1.74      manu 	return rv;
   4257  1.74      manu }
   4258  1.74      manu rsys_alias(sys_mkdirat,rump_enosys)
   4259  1.74      manu 
   4260  1.74      manu int rump___sysimpl_faccessat(int, const char *, int, int);
   4261  1.74      manu int
   4262  1.74      manu rump___sysimpl_faccessat(int fd, const char * path, int amode, int flag)
   4263  1.74      manu {
   4264  1.74      manu 	register_t retval[2] = {0, 0};
   4265  1.74      manu 	int error = 0;
   4266  1.74      manu 	int rv = -1;
   4267  1.74      manu 	struct sys_faccessat_args callarg;
   4268  1.74      manu 
   4269  1.74      manu 	SPARG(&callarg, fd) = fd;
   4270  1.74      manu 	SPARG(&callarg, path) = path;
   4271  1.74      manu 	SPARG(&callarg, amode) = amode;
   4272  1.74      manu 	SPARG(&callarg, flag) = flag;
   4273  1.74      manu 
   4274  1.74      manu 	error = rsys_syscall(SYS_faccessat, &callarg, sizeof(callarg), retval);
   4275  1.74      manu 	rsys_seterrno(error);
   4276  1.74      manu 	if (error == 0) {
   4277  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4278  1.74      manu 			rv = *(int *)retval;
   4279  1.74      manu 		else
   4280  1.74      manu 			rv = *retval;
   4281  1.74      manu 	}
   4282  1.74      manu 	return rv;
   4283  1.74      manu }
   4284  1.74      manu rsys_alias(sys_faccessat,rump_enosys)
   4285  1.74      manu 
   4286  1.74      manu int rump___sysimpl_fchmodat(int, const char *, mode_t, int);
   4287  1.74      manu int
   4288  1.74      manu rump___sysimpl_fchmodat(int fd, const char * path, mode_t mode, int flag)
   4289  1.74      manu {
   4290  1.74      manu 	register_t retval[2] = {0, 0};
   4291  1.74      manu 	int error = 0;
   4292  1.74      manu 	int rv = -1;
   4293  1.74      manu 	struct sys_fchmodat_args callarg;
   4294  1.74      manu 
   4295  1.74      manu 	SPARG(&callarg, fd) = fd;
   4296  1.74      manu 	SPARG(&callarg, path) = path;
   4297  1.74      manu 	SPARG(&callarg, mode) = mode;
   4298  1.74      manu 	SPARG(&callarg, flag) = flag;
   4299  1.74      manu 
   4300  1.74      manu 	error = rsys_syscall(SYS_fchmodat, &callarg, sizeof(callarg), retval);
   4301  1.74      manu 	rsys_seterrno(error);
   4302  1.74      manu 	if (error == 0) {
   4303  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4304  1.74      manu 			rv = *(int *)retval;
   4305  1.74      manu 		else
   4306  1.74      manu 			rv = *retval;
   4307  1.74      manu 	}
   4308  1.74      manu 	return rv;
   4309  1.74      manu }
   4310  1.74      manu rsys_alias(sys_fchmodat,rump_enosys)
   4311  1.74      manu 
   4312  1.74      manu int rump___sysimpl_fchownat(int, const char *, uid_t, gid_t, int);
   4313  1.74      manu int
   4314  1.74      manu rump___sysimpl_fchownat(int fd, const char * path, uid_t owner, gid_t group, int flag)
   4315  1.74      manu {
   4316  1.74      manu 	register_t retval[2] = {0, 0};
   4317  1.74      manu 	int error = 0;
   4318  1.74      manu 	int rv = -1;
   4319  1.74      manu 	struct sys_fchownat_args callarg;
   4320  1.74      manu 
   4321  1.74      manu 	SPARG(&callarg, fd) = fd;
   4322  1.74      manu 	SPARG(&callarg, path) = path;
   4323  1.74      manu 	SPARG(&callarg, owner) = owner;
   4324  1.74      manu 	SPARG(&callarg, group) = group;
   4325  1.74      manu 	SPARG(&callarg, flag) = flag;
   4326  1.74      manu 
   4327  1.74      manu 	error = rsys_syscall(SYS_fchownat, &callarg, sizeof(callarg), retval);
   4328  1.74      manu 	rsys_seterrno(error);
   4329  1.74      manu 	if (error == 0) {
   4330  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4331  1.74      manu 			rv = *(int *)retval;
   4332  1.74      manu 		else
   4333  1.74      manu 			rv = *retval;
   4334  1.74      manu 	}
   4335  1.74      manu 	return rv;
   4336  1.74      manu }
   4337  1.74      manu rsys_alias(sys_fchownat,rump_enosys)
   4338  1.74      manu 
   4339  1.74      manu int rump___sysimpl_fexecve(int, char *const *, char *const *);
   4340  1.74      manu int
   4341  1.74      manu rump___sysimpl_fexecve(int fd, char *const * argp, char *const * envp)
   4342  1.74      manu {
   4343  1.74      manu 	register_t retval[2] = {0, 0};
   4344  1.74      manu 	int error = 0;
   4345  1.74      manu 	int rv = -1;
   4346  1.74      manu 	struct sys_fexecve_args callarg;
   4347  1.74      manu 
   4348  1.74      manu 	SPARG(&callarg, fd) = fd;
   4349  1.74      manu 	SPARG(&callarg, argp) = argp;
   4350  1.74      manu 	SPARG(&callarg, envp) = envp;
   4351  1.74      manu 
   4352  1.74      manu 	error = rsys_syscall(SYS_fexecve, &callarg, sizeof(callarg), retval);
   4353  1.74      manu 	rsys_seterrno(error);
   4354  1.74      manu 	if (error == 0) {
   4355  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4356  1.74      manu 			rv = *(int *)retval;
   4357  1.74      manu 		else
   4358  1.74      manu 			rv = *retval;
   4359  1.74      manu 	}
   4360  1.74      manu 	return rv;
   4361  1.74      manu }
   4362  1.74      manu rsys_alias(sys_fexecve,rump_enosys)
   4363  1.74      manu 
   4364  1.74      manu int rump___sysimpl_fstatat(int, const char *, struct stat *, int);
   4365  1.74      manu int
   4366  1.74      manu rump___sysimpl_fstatat(int fd, const char * path, struct stat * buf, int flag)
   4367  1.74      manu {
   4368  1.74      manu 	register_t retval[2] = {0, 0};
   4369  1.74      manu 	int error = 0;
   4370  1.74      manu 	int rv = -1;
   4371  1.74      manu 	struct sys_fstatat_args callarg;
   4372  1.74      manu 
   4373  1.74      manu 	SPARG(&callarg, fd) = fd;
   4374  1.74      manu 	SPARG(&callarg, path) = path;
   4375  1.74      manu 	SPARG(&callarg, buf) = buf;
   4376  1.74      manu 	SPARG(&callarg, flag) = flag;
   4377  1.74      manu 
   4378  1.74      manu 	error = rsys_syscall(SYS_fstatat, &callarg, sizeof(callarg), retval);
   4379  1.74      manu 	rsys_seterrno(error);
   4380  1.74      manu 	if (error == 0) {
   4381  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4382  1.74      manu 			rv = *(int *)retval;
   4383  1.74      manu 		else
   4384  1.74      manu 			rv = *retval;
   4385  1.74      manu 	}
   4386  1.74      manu 	return rv;
   4387  1.74      manu }
   4388  1.74      manu rsys_alias(sys_fstatat,rump_enosys)
   4389  1.74      manu 
   4390  1.74      manu int rump___sysimpl_utimensat(int, const char *, const struct timespec *, int);
   4391  1.74      manu int
   4392  1.74      manu rump___sysimpl_utimensat(int fd, const char * path, const struct timespec * tptr, int flag)
   4393  1.74      manu {
   4394  1.74      manu 	register_t retval[2] = {0, 0};
   4395  1.74      manu 	int error = 0;
   4396  1.74      manu 	int rv = -1;
   4397  1.74      manu 	struct sys_utimensat_args callarg;
   4398  1.74      manu 
   4399  1.74      manu 	SPARG(&callarg, fd) = fd;
   4400  1.74      manu 	SPARG(&callarg, path) = path;
   4401  1.74      manu 	SPARG(&callarg, tptr) = tptr;
   4402  1.74      manu 	SPARG(&callarg, flag) = flag;
   4403  1.74      manu 
   4404  1.74      manu 	error = rsys_syscall(SYS_utimensat, &callarg, sizeof(callarg), retval);
   4405  1.74      manu 	rsys_seterrno(error);
   4406  1.74      manu 	if (error == 0) {
   4407  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4408  1.74      manu 			rv = *(int *)retval;
   4409  1.74      manu 		else
   4410  1.74      manu 			rv = *retval;
   4411  1.74      manu 	}
   4412  1.74      manu 	return rv;
   4413  1.74      manu }
   4414  1.74      manu rsys_alias(sys_utimensat,rump_enosys)
   4415  1.74      manu 
   4416  1.74      manu int rump___sysimpl_openat(int, const char *, int, mode_t);
   4417  1.74      manu int
   4418  1.74      manu rump___sysimpl_openat(int fd, const char * path, int oflags, mode_t mode)
   4419  1.74      manu {
   4420  1.74      manu 	register_t retval[2] = {0, 0};
   4421  1.74      manu 	int error = 0;
   4422  1.74      manu 	int rv = -1;
   4423  1.74      manu 	struct sys_openat_args callarg;
   4424  1.74      manu 
   4425  1.74      manu 	SPARG(&callarg, fd) = fd;
   4426  1.74      manu 	SPARG(&callarg, path) = path;
   4427  1.74      manu 	SPARG(&callarg, oflags) = oflags;
   4428  1.74      manu 	SPARG(&callarg, mode) = mode;
   4429  1.74      manu 
   4430  1.74      manu 	error = rsys_syscall(SYS_openat, &callarg, sizeof(callarg), retval);
   4431  1.74      manu 	rsys_seterrno(error);
   4432  1.74      manu 	if (error == 0) {
   4433  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4434  1.74      manu 			rv = *(int *)retval;
   4435  1.74      manu 		else
   4436  1.74      manu 			rv = *retval;
   4437  1.74      manu 	}
   4438  1.74      manu 	return rv;
   4439  1.74      manu }
   4440  1.74      manu rsys_alias(sys_openat,rump_enosys)
   4441  1.74      manu 
   4442  1.74      manu int rump___sysimpl_readlinkat(int, const char *, char *, size_t);
   4443  1.74      manu int
   4444  1.74      manu rump___sysimpl_readlinkat(int fd, const char * path, char * buf, size_t bufsize)
   4445  1.74      manu {
   4446  1.74      manu 	register_t retval[2] = {0, 0};
   4447  1.74      manu 	int error = 0;
   4448  1.74      manu 	int rv = -1;
   4449  1.74      manu 	struct sys_readlinkat_args callarg;
   4450  1.74      manu 
   4451  1.74      manu 	SPARG(&callarg, fd) = fd;
   4452  1.74      manu 	SPARG(&callarg, path) = path;
   4453  1.74      manu 	SPARG(&callarg, buf) = buf;
   4454  1.74      manu 	SPARG(&callarg, bufsize) = bufsize;
   4455  1.74      manu 
   4456  1.74      manu 	error = rsys_syscall(SYS_readlinkat, &callarg, sizeof(callarg), retval);
   4457  1.74      manu 	rsys_seterrno(error);
   4458  1.74      manu 	if (error == 0) {
   4459  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4460  1.74      manu 			rv = *(int *)retval;
   4461  1.74      manu 		else
   4462  1.74      manu 			rv = *retval;
   4463  1.74      manu 	}
   4464  1.74      manu 	return rv;
   4465  1.74      manu }
   4466  1.74      manu rsys_alias(sys_readlinkat,rump_enosys)
   4467  1.74      manu 
   4468  1.74      manu int rump___sysimpl_symlinkat(const char *, int, const char *);
   4469  1.74      manu int
   4470  1.74      manu rump___sysimpl_symlinkat(const char * path1, int fd, const char * path2)
   4471  1.74      manu {
   4472  1.74      manu 	register_t retval[2] = {0, 0};
   4473  1.74      manu 	int error = 0;
   4474  1.74      manu 	int rv = -1;
   4475  1.74      manu 	struct sys_symlinkat_args callarg;
   4476  1.74      manu 
   4477  1.74      manu 	SPARG(&callarg, path1) = path1;
   4478  1.74      manu 	SPARG(&callarg, fd) = fd;
   4479  1.74      manu 	SPARG(&callarg, path2) = path2;
   4480  1.74      manu 
   4481  1.74      manu 	error = rsys_syscall(SYS_symlinkat, &callarg, sizeof(callarg), retval);
   4482  1.74      manu 	rsys_seterrno(error);
   4483  1.74      manu 	if (error == 0) {
   4484  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4485  1.74      manu 			rv = *(int *)retval;
   4486  1.74      manu 		else
   4487  1.74      manu 			rv = *retval;
   4488  1.74      manu 	}
   4489  1.74      manu 	return rv;
   4490  1.74      manu }
   4491  1.74      manu rsys_alias(sys_symlinkat,rump_enosys)
   4492  1.74      manu 
   4493  1.74      manu int rump___sysimpl_unlinkat(int, const char *, int);
   4494  1.74      manu int
   4495  1.74      manu rump___sysimpl_unlinkat(int fd, const char * path, int flag)
   4496  1.74      manu {
   4497  1.74      manu 	register_t retval[2] = {0, 0};
   4498  1.74      manu 	int error = 0;
   4499  1.74      manu 	int rv = -1;
   4500  1.74      manu 	struct sys_unlinkat_args callarg;
   4501  1.74      manu 
   4502  1.74      manu 	SPARG(&callarg, fd) = fd;
   4503  1.74      manu 	SPARG(&callarg, path) = path;
   4504  1.74      manu 	SPARG(&callarg, flag) = flag;
   4505  1.74      manu 
   4506  1.74      manu 	error = rsys_syscall(SYS_unlinkat, &callarg, sizeof(callarg), retval);
   4507  1.74      manu 	rsys_seterrno(error);
   4508  1.74      manu 	if (error == 0) {
   4509  1.74      manu 		if (sizeof(int) > sizeof(register_t))
   4510  1.74      manu 			rv = *(int *)retval;
   4511  1.74      manu 		else
   4512  1.74      manu 			rv = *retval;
   4513  1.74      manu 	}
   4514  1.74      manu 	return rv;
   4515  1.74      manu }
   4516  1.74      manu rsys_alias(sys_unlinkat,rump_enosys)
   4517  1.74      manu 
   4518  1.75  dholland int rump___sysimpl_futimens(int, const struct timespec *);
   4519  1.75  dholland int
   4520  1.75  dholland rump___sysimpl_futimens(int fd, const struct timespec * tptr)
   4521  1.75  dholland {
   4522  1.75  dholland 	register_t retval[2] = {0, 0};
   4523  1.75  dholland 	int error = 0;
   4524  1.75  dholland 	int rv = -1;
   4525  1.75  dholland 	struct sys_futimens_args callarg;
   4526  1.75  dholland 
   4527  1.75  dholland 	SPARG(&callarg, fd) = fd;
   4528  1.75  dholland 	SPARG(&callarg, tptr) = tptr;
   4529  1.75  dholland 
   4530  1.75  dholland 	error = rsys_syscall(SYS_futimens, &callarg, sizeof(callarg), retval);
   4531  1.75  dholland 	rsys_seterrno(error);
   4532  1.75  dholland 	if (error == 0) {
   4533  1.75  dholland 		if (sizeof(int) > sizeof(register_t))
   4534  1.75  dholland 			rv = *(int *)retval;
   4535  1.75  dholland 		else
   4536  1.75  dholland 			rv = *retval;
   4537  1.75  dholland 	}
   4538  1.75  dholland 	return rv;
   4539  1.75  dholland }
   4540  1.75  dholland rsys_alias(sys_futimens,rump_enosys)
   4541  1.75  dholland 
   4542  1.75  dholland int rump___sysimpl___quotactl(const char *, struct quotactl_args *);
   4543  1.75  dholland int
   4544  1.75  dholland rump___sysimpl___quotactl(const char * path, struct quotactl_args * args)
   4545  1.75  dholland {
   4546  1.75  dholland 	register_t retval[2] = {0, 0};
   4547  1.75  dholland 	int error = 0;
   4548  1.75  dholland 	int rv = -1;
   4549  1.75  dholland 	struct sys___quotactl_args callarg;
   4550  1.75  dholland 
   4551  1.75  dholland 	SPARG(&callarg, path) = path;
   4552  1.75  dholland 	SPARG(&callarg, args) = args;
   4553  1.75  dholland 
   4554  1.75  dholland 	error = rsys_syscall(SYS___quotactl, &callarg, sizeof(callarg), retval);
   4555  1.75  dholland 	rsys_seterrno(error);
   4556  1.75  dholland 	if (error == 0) {
   4557  1.75  dholland 		if (sizeof(int) > sizeof(register_t))
   4558  1.75  dholland 			rv = *(int *)retval;
   4559  1.75  dholland 		else
   4560  1.75  dholland 			rv = *retval;
   4561  1.75  dholland 	}
   4562  1.75  dholland 	return rv;
   4563  1.75  dholland }
   4564  1.75  dholland rsys_alias(sys___quotactl,rump_enosys)
   4565  1.75  dholland 
   4566  1.40     pooka int rump_sys_pipe(int *);
   4567  1.40     pooka int
   4568  1.40     pooka rump_sys_pipe(int *fd)
   4569  1.40     pooka {
   4570  1.68     pooka 	register_t retval[2] = {0, 0};
   4571  1.40     pooka 	int error = 0;
   4572  1.40     pooka 
   4573  1.68     pooka 	error = rsys_syscall(SYS_pipe, NULL, 0, retval);
   4574  1.40     pooka 	if (error) {
   4575  1.53     pooka 		rsys_seterrno(error);
   4576  1.40     pooka 	} else {
   4577  1.68     pooka 		fd[0] = retval[0];
   4578  1.68     pooka 		fd[1] = retval[1];
   4579  1.40     pooka 	}
   4580  1.40     pooka 	return error ? -1 : 0;
   4581  1.40     pooka }
   4582  1.40     pooka 
   4583  1.53     pooka #ifndef RUMP_CLIENT
   4584  1.29     pooka #define	s(type)	sizeof(type)
   4585  1.29     pooka #define	n(type)	(sizeof(type)/sizeof (register_t))
   4586  1.29     pooka #define	ns(type)	n(type), s(type)
   4587  1.29     pooka 
   4588  1.29     pooka struct sysent rump_sysent[] = {
   4589  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4590  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 0 = syscall */
   4591  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4592  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 1 = exit */
   4593  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4594  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 2 = fork */
   4595  1.29     pooka 	{ ns(struct sys_read_args), 0,
   4596  1.56     pooka 	    (sy_call_t *)sys_read },		/* 3 = read */
   4597  1.29     pooka 	{ ns(struct sys_write_args), 0,
   4598  1.56     pooka 	    (sy_call_t *)sys_write },		/* 4 = write */
   4599  1.29     pooka 	{ ns(struct sys_open_args), 0,
   4600  1.56     pooka 	    (sy_call_t *)sys_open },		/* 5 = open */
   4601  1.29     pooka 	{ ns(struct sys_close_args), 0,
   4602  1.56     pooka 	    (sy_call_t *)sys_close },		/* 6 = close */
   4603  1.29     pooka 	{ 0, 0, 0,
   4604  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 7 = wait4 */
   4605  1.29     pooka 	{ 0, 0, 0,
   4606  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 8 = ocreat */
   4607  1.29     pooka 	{ ns(struct sys_link_args), 0,
   4608  1.56     pooka 	    (sy_call_t *)sys_link },		/* 9 = link */
   4609  1.29     pooka 	{ ns(struct sys_unlink_args), 0,
   4610  1.56     pooka 	    (sy_call_t *)sys_unlink },		/* 10 = unlink */
   4611  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4612  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 11 = obsolete execv */
   4613  1.29     pooka 	{ ns(struct sys_chdir_args), 0,
   4614  1.56     pooka 	    (sy_call_t *)sys_chdir },		/* 12 = chdir */
   4615  1.29     pooka 	{ ns(struct sys_fchdir_args), 0,
   4616  1.56     pooka 	    (sy_call_t *)sys_fchdir },		/* 13 = fchdir */
   4617  1.61     pooka 	{ ns(struct compat_50_sys_mknod_args), 0,
   4618  1.61     pooka 	    (sy_call_t *)compat_50_sys_mknod },	/* 14 = compat_50_mknod */
   4619  1.29     pooka 	{ ns(struct sys_chmod_args), 0,
   4620  1.56     pooka 	    (sy_call_t *)sys_chmod },		/* 15 = chmod */
   4621  1.29     pooka 	{ ns(struct sys_chown_args), 0,
   4622  1.56     pooka 	    (sy_call_t *)sys_chown },		/* 16 = chown */
   4623  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4624  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 17 = break */
   4625  1.29     pooka 	{ 0, 0, 0,
   4626  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 18 = getfsstat */
   4627  1.29     pooka 	{ 0, 0, 0,
   4628  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 19 = olseek */
   4629  1.29     pooka 	{ 0, 0, 0,
   4630  1.56     pooka 	    (sy_call_t *)sys_getpid_with_ppid },/* 20 = getpid */
   4631  1.29     pooka 	{ 0, 0, 0,
   4632  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 21 = mount */
   4633  1.29     pooka 	{ ns(struct sys_unmount_args), 0,
   4634  1.56     pooka 	    (sy_call_t *)sys_unmount },		/* 22 = unmount */
   4635  1.49     pooka 	{ ns(struct sys_setuid_args), 0,
   4636  1.56     pooka 	    (sy_call_t *)sys_setuid },		/* 23 = setuid */
   4637  1.29     pooka 	{ 0, 0, 0,
   4638  1.56     pooka 	    (sy_call_t *)sys_getuid_with_euid },/* 24 = getuid */
   4639  1.29     pooka 	{ 0, 0, 0,
   4640  1.56     pooka 	    (sy_call_t *)sys_geteuid },		/* 25 = geteuid */
   4641  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4642  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 26 = ptrace */
   4643  1.29     pooka 	{ ns(struct sys_recvmsg_args), 0,
   4644  1.56     pooka 	    (sy_call_t *)sys_recvmsg },		/* 27 = recvmsg */
   4645  1.29     pooka 	{ ns(struct sys_sendmsg_args), 0,
   4646  1.56     pooka 	    (sy_call_t *)sys_sendmsg },		/* 28 = sendmsg */
   4647  1.29     pooka 	{ ns(struct sys_recvfrom_args), 0,
   4648  1.56     pooka 	    (sy_call_t *)sys_recvfrom },	/* 29 = recvfrom */
   4649  1.29     pooka 	{ ns(struct sys_accept_args), 0,
   4650  1.56     pooka 	    (sy_call_t *)sys_accept },		/* 30 = accept */
   4651  1.29     pooka 	{ ns(struct sys_getpeername_args), 0,
   4652  1.56     pooka 	    (sy_call_t *)sys_getpeername },	/* 31 = getpeername */
   4653  1.29     pooka 	{ ns(struct sys_getsockname_args), 0,
   4654  1.56     pooka 	    (sy_call_t *)sys_getsockname },	/* 32 = getsockname */
   4655  1.34     pooka 	{ ns(struct sys_access_args), 0,
   4656  1.56     pooka 	    (sy_call_t *)sys_access },		/* 33 = access */
   4657  1.29     pooka 	{ ns(struct sys_chflags_args), 0,
   4658  1.56     pooka 	    (sy_call_t *)sys_chflags },		/* 34 = chflags */
   4659  1.34     pooka 	{ ns(struct sys_fchflags_args), 0,
   4660  1.56     pooka 	    (sy_call_t *)sys_fchflags },	/* 35 = fchflags */
   4661  1.29     pooka 	{ 0, 0, 0,
   4662  1.56     pooka 	    (sy_call_t *)sys_sync },		/* 36 = sync */
   4663  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4664  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 37 = kill */
   4665  1.29     pooka 	{ 0, 0, 0,
   4666  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 38 = stat43 */
   4667  1.29     pooka 	{ 0, 0, 0,
   4668  1.56     pooka 	    (sy_call_t *)sys_getppid },		/* 39 = getppid */
   4669  1.29     pooka 	{ 0, 0, 0,
   4670  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 40 = lstat43 */
   4671  1.34     pooka 	{ ns(struct sys_dup_args), 0,
   4672  1.56     pooka 	    (sy_call_t *)sys_dup },		/* 41 = dup */
   4673  1.29     pooka 	{ 0, 0, 0,
   4674  1.56     pooka 	    (sy_call_t *)sys_pipe },		/* 42 = pipe */
   4675  1.29     pooka 	{ 0, 0, 0,
   4676  1.56     pooka 	    (sy_call_t *)sys_getegid },		/* 43 = getegid */
   4677  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4678  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 44 = profil */
   4679  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4680  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 45 = ktrace */
   4681  1.29     pooka 	{ 0, 0, 0,
   4682  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 46 = sigaction13 */
   4683  1.29     pooka 	{ 0, 0, 0,
   4684  1.56     pooka 	    (sy_call_t *)sys_getgid_with_egid },/* 47 = getgid */
   4685  1.29     pooka 	{ 0, 0, 0,
   4686  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 48 = sigprocmask13 */
   4687  1.49     pooka 	{ ns(struct sys___getlogin_args), 0,
   4688  1.56     pooka 	    (sy_call_t *)sys___getlogin },	/* 49 = __getlogin */
   4689  1.49     pooka 	{ ns(struct sys___setlogin_args), 0,
   4690  1.56     pooka 	    (sy_call_t *)sys___setlogin },	/* 50 = __setlogin */
   4691  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4692  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 51 = acct */
   4693  1.29     pooka 	{ 0, 0, 0,
   4694  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 52 = sigpending13 */
   4695  1.29     pooka 	{ 0, 0, 0,
   4696  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 53 = sigaltstack13 */
   4697  1.29     pooka 	{ ns(struct sys_ioctl_args), 0,
   4698  1.56     pooka 	    (sy_call_t *)sys_ioctl },		/* 54 = ioctl */
   4699  1.29     pooka 	{ 0, 0, 0,
   4700  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 55 = oreboot */
   4701  1.34     pooka 	{ ns(struct sys_revoke_args), 0,
   4702  1.56     pooka 	    (sy_call_t *)sys_revoke },		/* 56 = revoke */
   4703  1.29     pooka 	{ ns(struct sys_symlink_args), 0,
   4704  1.56     pooka 	    (sy_call_t *)sys_symlink },		/* 57 = symlink */
   4705  1.29     pooka 	{ ns(struct sys_readlink_args), 0,
   4706  1.56     pooka 	    (sy_call_t *)sys_readlink },	/* 58 = readlink */
   4707  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4708  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 59 = execve */
   4709  1.50     pooka 	{ ns(struct sys_umask_args), 0,
   4710  1.56     pooka 	    (sy_call_t *)sys_umask },		/* 60 = umask */
   4711  1.34     pooka 	{ ns(struct sys_chroot_args), 0,
   4712  1.56     pooka 	    (sy_call_t *)sys_chroot },		/* 61 = chroot */
   4713  1.29     pooka 	{ 0, 0, 0,
   4714  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 62 = fstat43 */
   4715  1.29     pooka 	{ 0, 0, 0,
   4716  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 63 = ogetkerninfo */
   4717  1.29     pooka 	{ 0, 0, 0,
   4718  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 64 = ogetpagesize */
   4719  1.29     pooka 	{ 0, 0, 0,
   4720  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 65 = msync */
   4721  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4722  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 66 = vfork */
   4723  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4724  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 67 = obsolete vread */
   4725  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4726  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 68 = obsolete vwrite */
   4727  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4728  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 69 = sbrk */
   4729  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4730  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 70 = sstk */
   4731  1.29     pooka 	{ 0, 0, 0,
   4732  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 71 = ommap */
   4733  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4734  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 72 = vadvise */
   4735  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4736  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 73 = munmap */
   4737  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4738  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 74 = mprotect */
   4739  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4740  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 75 = madvise */
   4741  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4742  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 76 = obsolete vhangup */
   4743  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4744  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 77 = obsolete vlimit */
   4745  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4746  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 78 = mincore */
   4747  1.49     pooka 	{ ns(struct sys_getgroups_args), 0,
   4748  1.56     pooka 	    (sy_call_t *)sys_getgroups },	/* 79 = getgroups */
   4749  1.49     pooka 	{ ns(struct sys_setgroups_args), 0,
   4750  1.56     pooka 	    (sy_call_t *)sys_setgroups },	/* 80 = setgroups */
   4751  1.49     pooka 	{ 0, 0, 0,
   4752  1.56     pooka 	    (sy_call_t *)sys_getpgrp },		/* 81 = getpgrp */
   4753  1.49     pooka 	{ ns(struct sys_setpgid_args), 0,
   4754  1.56     pooka 	    (sy_call_t *)sys_setpgid },		/* 82 = setpgid */
   4755  1.29     pooka 	{ 0, 0, 0,
   4756  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 83 = setitimer */
   4757  1.29     pooka 	{ 0, 0, 0,
   4758  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 84 = owait */
   4759  1.29     pooka 	{ 0, 0, 0,
   4760  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 85 = oswapon */
   4761  1.29     pooka 	{ 0, 0, 0,
   4762  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 86 = getitimer */
   4763  1.29     pooka 	{ 0, 0, 0,
   4764  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 87 = ogethostname */
   4765  1.29     pooka 	{ 0, 0, 0,
   4766  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 88 = osethostname */
   4767  1.29     pooka 	{ 0, 0, 0,
   4768  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 89 = ogetdtablesize */
   4769  1.34     pooka 	{ ns(struct sys_dup2_args), 0,
   4770  1.56     pooka 	    (sy_call_t *)sys_dup2 },		/* 90 = dup2 */
   4771  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4772  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 91 = unimplemented getdopt */
   4773  1.34     pooka 	{ ns(struct sys_fcntl_args), 0,
   4774  1.56     pooka 	    (sy_call_t *)sys_fcntl },		/* 92 = fcntl */
   4775  1.60     pooka 	{ ns(struct compat_50_sys_select_args), 0,
   4776  1.60     pooka 	    (sy_call_t *)compat_50_sys_select },/* 93 = compat_50_select */
   4777  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4778  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 94 = unimplemented setdopt */
   4779  1.29     pooka 	{ ns(struct sys_fsync_args), 0,
   4780  1.56     pooka 	    (sy_call_t *)sys_fsync },		/* 95 = fsync */
   4781  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4782  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 96 = setpriority */
   4783  1.29     pooka 	{ 0, 0, 0,
   4784  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 97 = socket */
   4785  1.29     pooka 	{ ns(struct sys_connect_args), 0,
   4786  1.56     pooka 	    (sy_call_t *)sys_connect },		/* 98 = connect */
   4787  1.29     pooka 	{ 0, 0, 0,
   4788  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 99 = oaccept */
   4789  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4790  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 100 = getpriority */
   4791  1.29     pooka 	{ 0, 0, 0,
   4792  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 101 = osend */
   4793  1.29     pooka 	{ 0, 0, 0,
   4794  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 102 = orecv */
   4795  1.29     pooka 	{ 0, 0, 0,
   4796  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 103 = sigreturn13 */
   4797  1.29     pooka 	{ ns(struct sys_bind_args), 0,
   4798  1.56     pooka 	    (sy_call_t *)sys_bind },		/* 104 = bind */
   4799  1.29     pooka 	{ ns(struct sys_setsockopt_args), 0,
   4800  1.56     pooka 	    (sy_call_t *)sys_setsockopt },	/* 105 = setsockopt */
   4801  1.29     pooka 	{ ns(struct sys_listen_args), 0,
   4802  1.56     pooka 	    (sy_call_t *)sys_listen },		/* 106 = listen */
   4803  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4804  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 107 = obsolete vtimes */
   4805  1.29     pooka 	{ 0, 0, 0,
   4806  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 108 = osigvec */
   4807  1.29     pooka 	{ 0, 0, 0,
   4808  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 109 = osigblock */
   4809  1.29     pooka 	{ 0, 0, 0,
   4810  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 110 = osigsetmask */
   4811  1.29     pooka 	{ 0, 0, 0,
   4812  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 111 = sigsuspend13 */
   4813  1.29     pooka 	{ 0, 0, 0,
   4814  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 112 = osigstack */
   4815  1.29     pooka 	{ 0, 0, 0,
   4816  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 113 = orecvmsg */
   4817  1.29     pooka 	{ 0, 0, 0,
   4818  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 114 = osendmsg */
   4819  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4820  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 115 = obsolete vtrace */
   4821  1.29     pooka 	{ 0, 0, 0,
   4822  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 116 = gettimeofday */
   4823  1.29     pooka 	{ 0, 0, 0,
   4824  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 117 = getrusage */
   4825  1.29     pooka 	{ ns(struct sys_getsockopt_args), 0,
   4826  1.56     pooka 	    (sy_call_t *)sys_getsockopt },	/* 118 = getsockopt */
   4827  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4828  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 119 = obsolete resuba */
   4829  1.34     pooka 	{ ns(struct sys_readv_args), 0,
   4830  1.56     pooka 	    (sy_call_t *)sys_readv },		/* 120 = readv */
   4831  1.34     pooka 	{ ns(struct sys_writev_args), 0,
   4832  1.56     pooka 	    (sy_call_t *)sys_writev },		/* 121 = writev */
   4833  1.29     pooka 	{ 0, 0, 0,
   4834  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 122 = settimeofday */
   4835  1.34     pooka 	{ ns(struct sys_fchown_args), 0,
   4836  1.56     pooka 	    (sy_call_t *)sys_fchown },		/* 123 = fchown */
   4837  1.34     pooka 	{ ns(struct sys_fchmod_args), 0,
   4838  1.56     pooka 	    (sy_call_t *)sys_fchmod },		/* 124 = fchmod */
   4839  1.29     pooka 	{ 0, 0, 0,
   4840  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 125 = orecvfrom */
   4841  1.49     pooka 	{ ns(struct sys_setreuid_args), 0,
   4842  1.56     pooka 	    (sy_call_t *)sys_setreuid },	/* 126 = setreuid */
   4843  1.49     pooka 	{ ns(struct sys_setregid_args), 0,
   4844  1.56     pooka 	    (sy_call_t *)sys_setregid },	/* 127 = setregid */
   4845  1.29     pooka 	{ ns(struct sys_rename_args), 0,
   4846  1.56     pooka 	    (sy_call_t *)sys_rename },		/* 128 = rename */
   4847  1.29     pooka 	{ 0, 0, 0,
   4848  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 129 = otruncate */
   4849  1.29     pooka 	{ 0, 0, 0,
   4850  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 130 = oftruncate */
   4851  1.34     pooka 	{ ns(struct sys_flock_args), 0,
   4852  1.56     pooka 	    (sy_call_t *)sys_flock },		/* 131 = flock */
   4853  1.29     pooka 	{ ns(struct sys_mkfifo_args), 0,
   4854  1.56     pooka 	    (sy_call_t *)sys_mkfifo },		/* 132 = mkfifo */
   4855  1.29     pooka 	{ ns(struct sys_sendto_args), 0,
   4856  1.56     pooka 	    (sy_call_t *)sys_sendto },		/* 133 = sendto */
   4857  1.29     pooka 	{ ns(struct sys_shutdown_args), 0,
   4858  1.56     pooka 	    (sy_call_t *)sys_shutdown },	/* 134 = shutdown */
   4859  1.29     pooka 	{ ns(struct sys_socketpair_args), 0,
   4860  1.56     pooka 	    (sy_call_t *)sys_socketpair },	/* 135 = socketpair */
   4861  1.29     pooka 	{ ns(struct sys_mkdir_args), 0,
   4862  1.56     pooka 	    (sy_call_t *)sys_mkdir },		/* 136 = mkdir */
   4863  1.29     pooka 	{ ns(struct sys_rmdir_args), 0,
   4864  1.56     pooka 	    (sy_call_t *)sys_rmdir },		/* 137 = rmdir */
   4865  1.60     pooka 	{ ns(struct compat_50_sys_utimes_args), 0,
   4866  1.60     pooka 	    (sy_call_t *)compat_50_sys_utimes },/* 138 = compat_50_utimes */
   4867  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4868  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 139 = obsolete 4.2 sigreturn */
   4869  1.29     pooka 	{ 0, 0, 0,
   4870  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 140 = adjtime */
   4871  1.29     pooka 	{ 0, 0, 0,
   4872  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 141 = ogetpeername */
   4873  1.29     pooka 	{ 0, 0, 0,
   4874  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 142 = ogethostid */
   4875  1.29     pooka 	{ 0, 0, 0,
   4876  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 143 = osethostid */
   4877  1.29     pooka 	{ 0, 0, 0,
   4878  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 144 = ogetrlimit */
   4879  1.29     pooka 	{ 0, 0, 0,
   4880  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 145 = osetrlimit */
   4881  1.29     pooka 	{ 0, 0, 0,
   4882  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 146 = okillpg */
   4883  1.29     pooka 	{ 0, 0, 0,
   4884  1.56     pooka 	    (sy_call_t *)sys_setsid },		/* 147 = setsid */
   4885  1.70    bouyer 	{ 0, 0, 0,
   4886  1.70    bouyer 	    (sy_call_t *)sys_nomodule }, 	/* 148 = quotactl */
   4887  1.29     pooka 	{ 0, 0, 0,
   4888  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 149 = oquota */
   4889  1.29     pooka 	{ 0, 0, 0,
   4890  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 150 = ogetsockname */
   4891  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4892  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 151 = unimplemented */
   4893  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4894  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 152 = unimplemented */
   4895  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4896  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 153 = unimplemented */
   4897  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4898  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 154 = unimplemented */
   4899  1.29     pooka 	{ ns(struct sys_nfssvc_args), 0,
   4900  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 155 = nfssvc */
   4901  1.29     pooka 	{ 0, 0, 0,
   4902  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 156 = ogetdirentries */
   4903  1.29     pooka 	{ 0, 0, 0,
   4904  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 157 = statfs */
   4905  1.29     pooka 	{ 0, 0, 0,
   4906  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 158 = fstatfs */
   4907  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4908  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 159 = unimplemented */
   4909  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4910  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 160 = unimplemented */
   4911  1.29     pooka 	{ 0, 0, 0,
   4912  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 161 = getfh */
   4913  1.29     pooka 	{ 0, 0, 0,
   4914  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 162 = ogetdomainname */
   4915  1.29     pooka 	{ 0, 0, 0,
   4916  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 163 = osetdomainname */
   4917  1.29     pooka 	{ 0, 0, 0,
   4918  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 164 = ouname */
   4919  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4920  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 165 = sysarch */
   4921  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4922  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 166 = unimplemented */
   4923  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4924  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 167 = unimplemented */
   4925  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4926  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 168 = unimplemented */
   4927  1.29     pooka #if (defined(SYSVSEM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
   4928  1.29     pooka 	{ 0, 0, 0,
   4929  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 169 = osemsys */
   4930  1.29     pooka #else
   4931  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4932  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 169 = excluded 1.0 semsys */
   4933  1.29     pooka #endif
   4934  1.29     pooka #if (defined(SYSVMSG) || !defined(_KERNEL_OPT)) && !defined(_LP64)
   4935  1.29     pooka 	{ 0, 0, 0,
   4936  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 170 = omsgsys */
   4937  1.29     pooka #else
   4938  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4939  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 170 = excluded 1.0 msgsys */
   4940  1.29     pooka #endif
   4941  1.29     pooka #if (defined(SYSVSHM) || !defined(_KERNEL_OPT)) && !defined(_LP64)
   4942  1.29     pooka 	{ 0, 0, 0,
   4943  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 171 = oshmsys */
   4944  1.29     pooka #else
   4945  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4946  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 171 = excluded 1.0 shmsys */
   4947  1.29     pooka #endif
   4948  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4949  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 172 = unimplemented */
   4950  1.29     pooka 	{ ns(struct sys_pread_args), 0,
   4951  1.56     pooka 	    (sy_call_t *)sys_pread },		/* 173 = pread */
   4952  1.29     pooka 	{ ns(struct sys_pwrite_args), 0,
   4953  1.56     pooka 	    (sy_call_t *)sys_pwrite },		/* 174 = pwrite */
   4954  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4955  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 175 = ntp_gettime */
   4956  1.29     pooka #if defined(NTP) || !defined(_KERNEL_OPT)
   4957  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4958  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 176 = ntp_adjtime */
   4959  1.29     pooka #else
   4960  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4961  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 176 = excluded ntp_adjtime */
   4962  1.29     pooka #endif
   4963  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4964  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 177 = unimplemented */
   4965  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4966  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 178 = unimplemented */
   4967  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4968  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 179 = unimplemented */
   4969  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4970  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 180 = unimplemented */
   4971  1.49     pooka 	{ ns(struct sys_setgid_args), 0,
   4972  1.56     pooka 	    (sy_call_t *)sys_setgid },		/* 181 = setgid */
   4973  1.49     pooka 	{ ns(struct sys_setegid_args), 0,
   4974  1.56     pooka 	    (sy_call_t *)sys_setegid },		/* 182 = setegid */
   4975  1.49     pooka 	{ ns(struct sys_seteuid_args), 0,
   4976  1.56     pooka 	    (sy_call_t *)sys_seteuid },		/* 183 = seteuid */
   4977  1.29     pooka 	{ 0, 0, 0,
   4978  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 184 = lfs_bmapv */
   4979  1.29     pooka 	{ 0, 0, 0,
   4980  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 185 = lfs_markv */
   4981  1.29     pooka 	{ 0, 0, 0,
   4982  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 186 = lfs_segclean */
   4983  1.29     pooka 	{ 0, 0, 0,
   4984  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 187 = lfs_segwait */
   4985  1.29     pooka 	{ 0, 0, 0,
   4986  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 188 = stat12 */
   4987  1.29     pooka 	{ 0, 0, 0,
   4988  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 189 = fstat12 */
   4989  1.29     pooka 	{ 0, 0, 0,
   4990  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 190 = lstat12 */
   4991  1.45     njoly 	{ ns(struct sys_pathconf_args), 0,
   4992  1.56     pooka 	    (sy_call_t *)sys_pathconf },	/* 191 = pathconf */
   4993  1.45     njoly 	{ ns(struct sys_fpathconf_args), 0,
   4994  1.56     pooka 	    (sy_call_t *)sys_fpathconf },	/* 192 = fpathconf */
   4995  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   4996  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 193 = unimplemented */
   4997  1.42     pooka 	{ ns(struct sys_getrlimit_args), 0,
   4998  1.56     pooka 	    (sy_call_t *)sys_getrlimit },	/* 194 = getrlimit */
   4999  1.42     pooka 	{ ns(struct sys_setrlimit_args), 0,
   5000  1.56     pooka 	    (sy_call_t *)sys_setrlimit },	/* 195 = setrlimit */
   5001  1.29     pooka 	{ 0, 0, 0,
   5002  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 196 = getdirentries */
   5003  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5004  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 197 = mmap */
   5005  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5006  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 198 = __syscall */
   5007  1.34     pooka 	{ ns(struct sys_lseek_args), 0,
   5008  1.56     pooka 	    (sy_call_t *)sys_lseek },		/* 199 = lseek */
   5009  1.29     pooka 	{ ns(struct sys_truncate_args), 0,
   5010  1.56     pooka 	    (sy_call_t *)sys_truncate },	/* 200 = truncate */
   5011  1.34     pooka 	{ ns(struct sys_ftruncate_args), 0,
   5012  1.56     pooka 	    (sy_call_t *)sys_ftruncate },	/* 201 = ftruncate */
   5013  1.29     pooka 	{ ns(struct sys___sysctl_args), 0,
   5014  1.56     pooka 	    (sy_call_t *)sys___sysctl },	/* 202 = __sysctl */
   5015  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5016  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 203 = mlock */
   5017  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5018  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 204 = munlock */
   5019  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5020  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 205 = undelete */
   5021  1.60     pooka 	{ ns(struct compat_50_sys_futimes_args), 0,
   5022  1.60     pooka 	    (sy_call_t *)compat_50_sys_futimes },/* 206 = compat_50_futimes */
   5023  1.49     pooka 	{ ns(struct sys_getpgid_args), 0,
   5024  1.56     pooka 	    (sy_call_t *)sys_getpgid },		/* 207 = getpgid */
   5025  1.34     pooka 	{ ns(struct sys_reboot_args), 0,
   5026  1.56     pooka 	    (sy_call_t *)sys_reboot },		/* 208 = reboot */
   5027  1.34     pooka 	{ ns(struct sys_poll_args), 0,
   5028  1.56     pooka 	    (sy_call_t *)sys_poll },		/* 209 = poll */
   5029  1.79     pooka 	{ 0, 0, 0,
   5030  1.79     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 210 = afssys */
   5031  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5032  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 211 = unimplemented */
   5033  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5034  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 212 = unimplemented */
   5035  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5036  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 213 = unimplemented */
   5037  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5038  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 214 = unimplemented */
   5039  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5040  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 215 = unimplemented */
   5041  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5042  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 216 = unimplemented */
   5043  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5044  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 217 = unimplemented */
   5045  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5046  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 218 = unimplemented */
   5047  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5048  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 219 = unimplemented */
   5049  1.29     pooka #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
   5050  1.29     pooka 	{ 0, 0, 0,
   5051  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 220 = __semctl */
   5052  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5053  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 221 = semget */
   5054  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5055  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 222 = semop */
   5056  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5057  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 223 = semconfig */
   5058  1.29     pooka #else
   5059  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5060  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 220 = excluded compat_14_semctl */
   5061  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5062  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 221 = excluded semget */
   5063  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5064  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 222 = excluded semop */
   5065  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5066  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 223 = excluded semconfig */
   5067  1.29     pooka #endif
   5068  1.29     pooka #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
   5069  1.29     pooka 	{ 0, 0, 0,
   5070  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 224 = msgctl */
   5071  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5072  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 225 = msgget */
   5073  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5074  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 226 = msgsnd */
   5075  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5076  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 227 = msgrcv */
   5077  1.29     pooka #else
   5078  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5079  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 224 = excluded compat_14_msgctl */
   5080  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5081  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 225 = excluded msgget */
   5082  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5083  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 226 = excluded msgsnd */
   5084  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5085  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 227 = excluded msgrcv */
   5086  1.29     pooka #endif
   5087  1.29     pooka #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
   5088  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5089  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 228 = shmat */
   5090  1.29     pooka 	{ 0, 0, 0,
   5091  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 229 = shmctl */
   5092  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5093  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 230 = shmdt */
   5094  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5095  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 231 = shmget */
   5096  1.29     pooka #else
   5097  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5098  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 228 = excluded shmat */
   5099  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5100  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 229 = excluded compat_14_shmctl */
   5101  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5102  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 230 = excluded shmdt */
   5103  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5104  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 231 = excluded shmget */
   5105  1.29     pooka #endif
   5106  1.29     pooka 	{ 0, 0, 0,
   5107  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 232 = clock_gettime */
   5108  1.29     pooka 	{ 0, 0, 0,
   5109  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 233 = clock_settime */
   5110  1.29     pooka 	{ 0, 0, 0,
   5111  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 234 = clock_getres */
   5112  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5113  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 235 = timer_create */
   5114  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5115  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 236 = timer_delete */
   5116  1.29     pooka 	{ 0, 0, 0,
   5117  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 237 = timer_settime */
   5118  1.29     pooka 	{ 0, 0, 0,
   5119  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 238 = timer_gettime */
   5120  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5121  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 239 = timer_getoverrun */
   5122  1.29     pooka 	{ 0, 0, 0,
   5123  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 240 = nanosleep */
   5124  1.34     pooka 	{ ns(struct sys_fdatasync_args), 0,
   5125  1.56     pooka 	    (sy_call_t *)sys_fdatasync },	/* 241 = fdatasync */
   5126  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5127  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 242 = mlockall */
   5128  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5129  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 243 = munlockall */
   5130  1.29     pooka 	{ 0, 0, 0,
   5131  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 244 = __sigtimedwait */
   5132  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5133  1.59  christos 	    (sy_call_t *)rump_enosys }, 	/* 245 = sigqueueinfo */
   5134  1.38     pooka 	{ ns(struct sys_modctl_args), 0,
   5135  1.56     pooka 	    (sy_call_t *)sys_modctl },		/* 246 = modctl */
   5136  1.46     pooka 	{ ns(struct sys__ksem_init_args), 0,
   5137  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 247 = _ksem_init */
   5138  1.46     pooka 	{ ns(struct sys__ksem_open_args), 0,
   5139  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 248 = _ksem_open */
   5140  1.46     pooka 	{ ns(struct sys__ksem_unlink_args), 0,
   5141  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 249 = _ksem_unlink */
   5142  1.46     pooka 	{ ns(struct sys__ksem_close_args), 0,
   5143  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 250 = _ksem_close */
   5144  1.46     pooka 	{ ns(struct sys__ksem_post_args), 0,
   5145  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 251 = _ksem_post */
   5146  1.46     pooka 	{ ns(struct sys__ksem_wait_args), 0,
   5147  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 252 = _ksem_wait */
   5148  1.46     pooka 	{ ns(struct sys__ksem_trywait_args), 0,
   5149  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 253 = _ksem_trywait */
   5150  1.46     pooka 	{ ns(struct sys__ksem_getvalue_args), 0,
   5151  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 254 = _ksem_getvalue */
   5152  1.46     pooka 	{ ns(struct sys__ksem_destroy_args), 0,
   5153  1.56     pooka 	    (sy_call_t *)sys_nomodule },	/* 255 = _ksem_destroy */
   5154  1.78     joerg 	{ ns(struct sys__ksem_timedwait_args), 0,
   5155  1.78     joerg 	    (sy_call_t *)sys_nomodule },	/* 256 = _ksem_timedwait */
   5156  1.29     pooka 	{ 0, 0, 0,
   5157  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 257 = mq_open */
   5158  1.29     pooka 	{ 0, 0, 0,
   5159  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 258 = mq_close */
   5160  1.29     pooka 	{ 0, 0, 0,
   5161  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 259 = mq_unlink */
   5162  1.29     pooka 	{ 0, 0, 0,
   5163  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 260 = mq_getattr */
   5164  1.29     pooka 	{ 0, 0, 0,
   5165  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 261 = mq_setattr */
   5166  1.29     pooka 	{ 0, 0, 0,
   5167  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 262 = mq_notify */
   5168  1.29     pooka 	{ 0, 0, 0,
   5169  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 263 = mq_send */
   5170  1.29     pooka 	{ 0, 0, 0,
   5171  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 264 = mq_receive */
   5172  1.29     pooka 	{ 0, 0, 0,
   5173  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 265 = mq_timedsend */
   5174  1.29     pooka 	{ 0, 0, 0,
   5175  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 266 = mq_timedreceive */
   5176  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5177  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 267 = unimplemented */
   5178  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5179  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 268 = unimplemented */
   5180  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5181  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 269 = unimplemented */
   5182  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5183  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 270 = __posix_rename */
   5184  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5185  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 271 = swapctl */
   5186  1.29     pooka 	{ 0, 0, 0,
   5187  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 272 = getdents */
   5188  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5189  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 273 = minherit */
   5190  1.29     pooka 	{ ns(struct sys_lchmod_args), 0,
   5191  1.56     pooka 	    (sy_call_t *)sys_lchmod },		/* 274 = lchmod */
   5192  1.29     pooka 	{ ns(struct sys_lchown_args), 0,
   5193  1.56     pooka 	    (sy_call_t *)sys_lchown },		/* 275 = lchown */
   5194  1.60     pooka 	{ ns(struct compat_50_sys_lutimes_args), 0,
   5195  1.60     pooka 	    (sy_call_t *)compat_50_sys_lutimes },/* 276 = compat_50_lutimes */
   5196  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5197  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 277 = __msync13 */
   5198  1.29     pooka 	{ 0, 0, 0,
   5199  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 278 = __stat13 */
   5200  1.29     pooka 	{ 0, 0, 0,
   5201  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 279 = __fstat13 */
   5202  1.29     pooka 	{ 0, 0, 0,
   5203  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 280 = __lstat13 */
   5204  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5205  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 281 = __sigaltstack14 */
   5206  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5207  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 282 = __vfork14 */
   5208  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5209  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 283 = __posix_chown */
   5210  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5211  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 284 = __posix_fchown */
   5212  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5213  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 285 = __posix_lchown */
   5214  1.49     pooka 	{ ns(struct sys_getsid_args), 0,
   5215  1.56     pooka 	    (sy_call_t *)sys_getsid },		/* 286 = getsid */
   5216  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5217  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 287 = __clone */
   5218  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5219  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 288 = fktrace */
   5220  1.64     pooka 	{ ns(struct sys_preadv_args), 0,
   5221  1.64     pooka 	    (sy_call_t *)sys_preadv },		/* 289 = preadv */
   5222  1.64     pooka 	{ ns(struct sys_pwritev_args), 0,
   5223  1.64     pooka 	    (sy_call_t *)sys_pwritev },		/* 290 = pwritev */
   5224  1.29     pooka 	{ 0, 0, 0,
   5225  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 291 = __sigaction14 */
   5226  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5227  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 292 = __sigpending14 */
   5228  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5229  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 293 = __sigprocmask14 */
   5230  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5231  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 294 = __sigsuspend14 */
   5232  1.29     pooka 	{ 0, 0, 0,
   5233  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 295 = __sigreturn14 */
   5234  1.51     pooka 	{ ns(struct sys___getcwd_args), 0,
   5235  1.56     pooka 	    (sy_call_t *)sys___getcwd },	/* 296 = __getcwd */
   5236  1.34     pooka 	{ ns(struct sys_fchroot_args), 0,
   5237  1.56     pooka 	    (sy_call_t *)sys_fchroot },		/* 297 = fchroot */
   5238  1.29     pooka 	{ 0, 0, 0,
   5239  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 298 = fhopen */
   5240  1.29     pooka 	{ 0, 0, 0,
   5241  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 299 = fhstat */
   5242  1.29     pooka 	{ 0, 0, 0,
   5243  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 300 = fhstatfs */
   5244  1.29     pooka #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
   5245  1.29     pooka 	{ 0, 0, 0,
   5246  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 301 = ____semctl13 */
   5247  1.29     pooka #else
   5248  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5249  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 301 = excluded ____semctl13 */
   5250  1.29     pooka #endif
   5251  1.29     pooka #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
   5252  1.29     pooka 	{ 0, 0, 0,
   5253  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 302 = __msgctl13 */
   5254  1.29     pooka #else
   5255  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5256  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 302 = excluded __msgctl13 */
   5257  1.29     pooka #endif
   5258  1.29     pooka #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
   5259  1.29     pooka 	{ 0, 0, 0,
   5260  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 303 = __shmctl13 */
   5261  1.29     pooka #else
   5262  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5263  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 303 = excluded __shmctl13 */
   5264  1.29     pooka #endif
   5265  1.29     pooka 	{ ns(struct sys_lchflags_args), 0,
   5266  1.56     pooka 	    (sy_call_t *)sys_lchflags },	/* 304 = lchflags */
   5267  1.29     pooka 	{ 0, 0, 0,
   5268  1.56     pooka 	    (sy_call_t *)sys_issetugid },	/* 305 = issetugid */
   5269  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5270  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 306 = utrace */
   5271  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5272  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 307 = getcontext */
   5273  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5274  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 308 = setcontext */
   5275  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5276  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 309 = _lwp_create */
   5277  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5278  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 310 = _lwp_exit */
   5279  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5280  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 311 = _lwp_self */
   5281  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5282  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 312 = _lwp_wait */
   5283  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5284  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 313 = _lwp_suspend */
   5285  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5286  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 314 = _lwp_continue */
   5287  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5288  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 315 = _lwp_wakeup */
   5289  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5290  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 316 = _lwp_getprivate */
   5291  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5292  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 317 = _lwp_setprivate */
   5293  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5294  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 318 = _lwp_kill */
   5295  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5296  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 319 = _lwp_detach */
   5297  1.29     pooka 	{ 0, 0, 0,
   5298  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 320 = _lwp_park */
   5299  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5300  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 321 = _lwp_unpark */
   5301  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5302  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 322 = _lwp_unpark_all */
   5303  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5304  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 323 = _lwp_setname */
   5305  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5306  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 324 = _lwp_getname */
   5307  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5308  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 325 = _lwp_ctl */
   5309  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5310  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 326 = unimplemented */
   5311  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5312  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 327 = unimplemented */
   5313  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5314  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 328 = unimplemented */
   5315  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5316  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 329 = unimplemented */
   5317  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5318  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 330 = sa_register */
   5319  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5320  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 331 = sa_stacks */
   5321  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5322  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 332 = sa_enable */
   5323  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5324  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 333 = sa_setconcurrency */
   5325  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5326  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 334 = sa_yield */
   5327  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5328  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 335 = sa_preempt */
   5329  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5330  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 336 = obsolete sys_sa_unblockyield */
   5331  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5332  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 337 = unimplemented */
   5333  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5334  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 338 = unimplemented */
   5335  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5336  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 339 = unimplemented */
   5337  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5338  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 340 = __sigaction_sigtramp */
   5339  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5340  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 341 = pmc_get_info */
   5341  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5342  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 342 = pmc_control */
   5343  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5344  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 343 = rasctl */
   5345  1.29     pooka 	{ 0, 0, 0,
   5346  1.56     pooka 	    (sy_call_t *)sys_kqueue },		/* 344 = kqueue */
   5347  1.60     pooka 	{ ns(struct compat_50_sys_kevent_args), 0,
   5348  1.60     pooka 	    (sy_call_t *)compat_50_sys_kevent },/* 345 = compat_50_kevent */
   5349  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5350  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 346 = _sched_setparam */
   5351  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5352  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 347 = _sched_getparam */
   5353  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5354  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 348 = _sched_setaffinity */
   5355  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5356  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 349 = _sched_getaffinity */
   5357  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5358  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 350 = sched_yield */
   5359  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5360  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 351 = unimplemented */
   5361  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5362  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 352 = unimplemented */
   5363  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5364  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 353 = unimplemented */
   5365  1.34     pooka 	{ ns(struct sys_fsync_range_args), 0,
   5366  1.56     pooka 	    (sy_call_t *)sys_fsync_range },	/* 354 = fsync_range */
   5367  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5368  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 355 = uuidgen */
   5369  1.34     pooka 	{ ns(struct sys_getvfsstat_args), 0,
   5370  1.56     pooka 	    (sy_call_t *)sys_getvfsstat },	/* 356 = getvfsstat */
   5371  1.29     pooka 	{ ns(struct sys_statvfs1_args), 0,
   5372  1.56     pooka 	    (sy_call_t *)sys_statvfs1 },	/* 357 = statvfs1 */
   5373  1.34     pooka 	{ ns(struct sys_fstatvfs1_args), 0,
   5374  1.56     pooka 	    (sy_call_t *)sys_fstatvfs1 },	/* 358 = fstatvfs1 */
   5375  1.29     pooka 	{ 0, 0, 0,
   5376  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 359 = fhstatvfs1 */
   5377  1.34     pooka 	{ ns(struct sys_extattrctl_args), 0,
   5378  1.56     pooka 	    (sy_call_t *)sys_extattrctl },	/* 360 = extattrctl */
   5379  1.34     pooka 	{ ns(struct sys_extattr_set_file_args), 0,
   5380  1.56     pooka 	    (sy_call_t *)sys_extattr_set_file },/* 361 = extattr_set_file */
   5381  1.34     pooka 	{ ns(struct sys_extattr_get_file_args), 0,
   5382  1.56     pooka 	    (sy_call_t *)sys_extattr_get_file },/* 362 = extattr_get_file */
   5383  1.34     pooka 	{ ns(struct sys_extattr_delete_file_args), 0,
   5384  1.56     pooka 	    (sy_call_t *)sys_extattr_delete_file },/* 363 = extattr_delete_file */
   5385  1.34     pooka 	{ ns(struct sys_extattr_set_fd_args), 0,
   5386  1.56     pooka 	    (sy_call_t *)sys_extattr_set_fd },	/* 364 = extattr_set_fd */
   5387  1.34     pooka 	{ ns(struct sys_extattr_get_fd_args), 0,
   5388  1.56     pooka 	    (sy_call_t *)sys_extattr_get_fd },	/* 365 = extattr_get_fd */
   5389  1.34     pooka 	{ ns(struct sys_extattr_delete_fd_args), 0,
   5390  1.56     pooka 	    (sy_call_t *)sys_extattr_delete_fd },/* 366 = extattr_delete_fd */
   5391  1.34     pooka 	{ ns(struct sys_extattr_set_link_args), 0,
   5392  1.56     pooka 	    (sy_call_t *)sys_extattr_set_link },/* 367 = extattr_set_link */
   5393  1.34     pooka 	{ ns(struct sys_extattr_get_link_args), 0,
   5394  1.56     pooka 	    (sy_call_t *)sys_extattr_get_link },/* 368 = extattr_get_link */
   5395  1.34     pooka 	{ ns(struct sys_extattr_delete_link_args), 0,
   5396  1.56     pooka 	    (sy_call_t *)sys_extattr_delete_link },/* 369 = extattr_delete_link */
   5397  1.34     pooka 	{ ns(struct sys_extattr_list_fd_args), 0,
   5398  1.56     pooka 	    (sy_call_t *)sys_extattr_list_fd },	/* 370 = extattr_list_fd */
   5399  1.34     pooka 	{ ns(struct sys_extattr_list_file_args), 0,
   5400  1.56     pooka 	    (sy_call_t *)sys_extattr_list_file },/* 371 = extattr_list_file */
   5401  1.34     pooka 	{ ns(struct sys_extattr_list_link_args), 0,
   5402  1.56     pooka 	    (sy_call_t *)sys_extattr_list_link },/* 372 = extattr_list_link */
   5403  1.61     pooka 	{ ns(struct compat_50_sys_pselect_args), 0,
   5404  1.61     pooka 	    (sy_call_t *)compat_50_sys_pselect },/* 373 = compat_50_pselect */
   5405  1.60     pooka 	{ ns(struct compat_50_sys_pollts_args), 0,
   5406  1.60     pooka 	    (sy_call_t *)compat_50_sys_pollts },/* 374 = compat_50_pollts */
   5407  1.34     pooka 	{ ns(struct sys_setxattr_args), 0,
   5408  1.56     pooka 	    (sy_call_t *)sys_setxattr },	/* 375 = setxattr */
   5409  1.34     pooka 	{ ns(struct sys_lsetxattr_args), 0,
   5410  1.56     pooka 	    (sy_call_t *)sys_lsetxattr },	/* 376 = lsetxattr */
   5411  1.34     pooka 	{ ns(struct sys_fsetxattr_args), 0,
   5412  1.56     pooka 	    (sy_call_t *)sys_fsetxattr },	/* 377 = fsetxattr */
   5413  1.34     pooka 	{ ns(struct sys_getxattr_args), 0,
   5414  1.56     pooka 	    (sy_call_t *)sys_getxattr },	/* 378 = getxattr */
   5415  1.34     pooka 	{ ns(struct sys_lgetxattr_args), 0,
   5416  1.56     pooka 	    (sy_call_t *)sys_lgetxattr },	/* 379 = lgetxattr */
   5417  1.34     pooka 	{ ns(struct sys_fgetxattr_args), 0,
   5418  1.56     pooka 	    (sy_call_t *)sys_fgetxattr },	/* 380 = fgetxattr */
   5419  1.34     pooka 	{ ns(struct sys_listxattr_args), 0,
   5420  1.56     pooka 	    (sy_call_t *)sys_listxattr },	/* 381 = listxattr */
   5421  1.34     pooka 	{ ns(struct sys_llistxattr_args), 0,
   5422  1.56     pooka 	    (sy_call_t *)sys_llistxattr },	/* 382 = llistxattr */
   5423  1.34     pooka 	{ ns(struct sys_flistxattr_args), 0,
   5424  1.56     pooka 	    (sy_call_t *)sys_flistxattr },	/* 383 = flistxattr */
   5425  1.34     pooka 	{ ns(struct sys_removexattr_args), 0,
   5426  1.56     pooka 	    (sy_call_t *)sys_removexattr },	/* 384 = removexattr */
   5427  1.34     pooka 	{ ns(struct sys_lremovexattr_args), 0,
   5428  1.56     pooka 	    (sy_call_t *)sys_lremovexattr },	/* 385 = lremovexattr */
   5429  1.34     pooka 	{ ns(struct sys_fremovexattr_args), 0,
   5430  1.56     pooka 	    (sy_call_t *)sys_fremovexattr },	/* 386 = fremovexattr */
   5431  1.60     pooka 	{ ns(struct compat_50_sys___stat30_args), 0,
   5432  1.60     pooka 	    (sy_call_t *)compat_50_sys___stat30 },/* 387 = compat_50___stat30 */
   5433  1.60     pooka 	{ ns(struct compat_50_sys___fstat30_args), 0,
   5434  1.60     pooka 	    (sy_call_t *)compat_50_sys___fstat30 },/* 388 = compat_50___fstat30 */
   5435  1.60     pooka 	{ ns(struct compat_50_sys___lstat30_args), 0,
   5436  1.60     pooka 	    (sy_call_t *)compat_50_sys___lstat30 },/* 389 = compat_50___lstat30 */
   5437  1.34     pooka 	{ ns(struct sys___getdents30_args), 0,
   5438  1.56     pooka 	    (sy_call_t *)sys___getdents30 },	/* 390 = __getdents30 */
   5439  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5440  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 391 = ignored old posix_fadvise */
   5441  1.29     pooka 	{ 0, 0, 0,
   5442  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 392 = __fhstat30 */
   5443  1.29     pooka 	{ 0, 0, 0,
   5444  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 393 = __ntp_gettime30 */
   5445  1.29     pooka 	{ ns(struct sys___socket30_args), 0,
   5446  1.56     pooka 	    (sy_call_t *)sys___socket30 },	/* 394 = __socket30 */
   5447  1.29     pooka 	{ ns(struct sys___getfh30_args), 0,
   5448  1.56     pooka 	    (sy_call_t *)sys___getfh30 },	/* 395 = __getfh30 */
   5449  1.36     pooka 	{ ns(struct sys___fhopen40_args), 0,
   5450  1.56     pooka 	    (sy_call_t *)sys___fhopen40 },	/* 396 = __fhopen40 */
   5451  1.36     pooka 	{ ns(struct sys___fhstatvfs140_args), 0,
   5452  1.56     pooka 	    (sy_call_t *)sys___fhstatvfs140 },	/* 397 = __fhstatvfs140 */
   5453  1.61     pooka 	{ ns(struct compat_50_sys___fhstat40_args), 0,
   5454  1.61     pooka 	    (sy_call_t *)compat_50_sys___fhstat40 },/* 398 = compat_50___fhstat40 */
   5455  1.29     pooka 	{ 0, 0, 0,
   5456  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 399 = aio_cancel */
   5457  1.29     pooka 	{ 0, 0, 0,
   5458  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 400 = aio_error */
   5459  1.29     pooka 	{ 0, 0, 0,
   5460  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 401 = aio_fsync */
   5461  1.29     pooka 	{ 0, 0, 0,
   5462  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 402 = aio_read */
   5463  1.29     pooka 	{ 0, 0, 0,
   5464  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 403 = aio_return */
   5465  1.29     pooka 	{ 0, 0, 0,
   5466  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 404 = aio_suspend */
   5467  1.29     pooka 	{ 0, 0, 0,
   5468  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 405 = aio_write */
   5469  1.29     pooka 	{ 0, 0, 0,
   5470  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 406 = lio_listio */
   5471  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5472  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 407 = unimplemented */
   5473  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5474  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 408 = unimplemented */
   5475  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5476  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 409 = unimplemented */
   5477  1.33     pooka 	{ ns(struct sys___mount50_args), 0,
   5478  1.56     pooka 	    (sy_call_t *)sys___mount50 },	/* 410 = __mount50 */
   5479  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5480  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 411 = mremap */
   5481  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5482  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 412 = pset_create */
   5483  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5484  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 413 = pset_destroy */
   5485  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5486  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 414 = pset_assign */
   5487  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5488  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 415 = _pset_bind */
   5489  1.54     pooka 	{ ns(struct sys___posix_fadvise50_args), 0,
   5490  1.56     pooka 	    (sy_call_t *)sys___posix_fadvise50 },/* 416 = __posix_fadvise50 */
   5491  1.34     pooka 	{ ns(struct sys___select50_args), 0,
   5492  1.56     pooka 	    (sy_call_t *)sys___select50 },	/* 417 = __select50 */
   5493  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5494  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 418 = __gettimeofday50 */
   5495  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5496  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 419 = __settimeofday50 */
   5497  1.29     pooka 	{ ns(struct sys___utimes50_args), 0,
   5498  1.56     pooka 	    (sy_call_t *)sys___utimes50 },	/* 420 = __utimes50 */
   5499  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5500  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 421 = __adjtime50 */
   5501  1.29     pooka 	{ 0, 0, 0,
   5502  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 422 = __lfs_segwait50 */
   5503  1.34     pooka 	{ ns(struct sys___futimes50_args), 0,
   5504  1.56     pooka 	    (sy_call_t *)sys___futimes50 },	/* 423 = __futimes50 */
   5505  1.29     pooka 	{ ns(struct sys___lutimes50_args), 0,
   5506  1.56     pooka 	    (sy_call_t *)sys___lutimes50 },	/* 424 = __lutimes50 */
   5507  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5508  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 425 = __setitimer50 */
   5509  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5510  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 426 = __getitimer50 */
   5511  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5512  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 427 = __clock_gettime50 */
   5513  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5514  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 428 = __clock_settime50 */
   5515  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5516  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 429 = __clock_getres50 */
   5517  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5518  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 430 = __nanosleep50 */
   5519  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5520  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 431 = ____sigtimedwait50 */
   5521  1.29     pooka 	{ 0, 0, 0,
   5522  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 432 = __mq_timedsend50 */
   5523  1.29     pooka 	{ 0, 0, 0,
   5524  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 433 = __mq_timedreceive50 */
   5525  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5526  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 434 = ___lwp_park50 */
   5527  1.32     pooka 	{ ns(struct sys___kevent50_args), 0,
   5528  1.56     pooka 	    (sy_call_t *)sys___kevent50 },	/* 435 = __kevent50 */
   5529  1.34     pooka 	{ ns(struct sys___pselect50_args), 0,
   5530  1.56     pooka 	    (sy_call_t *)sys___pselect50 },	/* 436 = __pselect50 */
   5531  1.34     pooka 	{ ns(struct sys___pollts50_args), 0,
   5532  1.56     pooka 	    (sy_call_t *)sys___pollts50 },	/* 437 = __pollts50 */
   5533  1.29     pooka 	{ 0, 0, 0,
   5534  1.58     pooka 	    (sy_call_t *)sys_nomodule }, 	/* 438 = __aio_suspend50 */
   5535  1.29     pooka 	{ ns(struct sys___stat50_args), 0,
   5536  1.56     pooka 	    (sy_call_t *)sys___stat50 },	/* 439 = __stat50 */
   5537  1.34     pooka 	{ ns(struct sys___fstat50_args), 0,
   5538  1.56     pooka 	    (sy_call_t *)sys___fstat50 },	/* 440 = __fstat50 */
   5539  1.29     pooka 	{ ns(struct sys___lstat50_args), 0,
   5540  1.56     pooka 	    (sy_call_t *)sys___lstat50 },	/* 441 = __lstat50 */
   5541  1.29     pooka #if defined(SYSVSEM) || !defined(_KERNEL_OPT)
   5542  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5543  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 442 = ____semctl50 */
   5544  1.29     pooka #else
   5545  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5546  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 442 = excluded ____semctl50 */
   5547  1.29     pooka #endif
   5548  1.29     pooka #if defined(SYSVSHM) || !defined(_KERNEL_OPT)
   5549  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5550  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 443 = __shmctl50 */
   5551  1.29     pooka #else
   5552  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5553  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 443 = excluded ____shmctl50 */
   5554  1.29     pooka #endif
   5555  1.29     pooka #if defined(SYSVMSG) || !defined(_KERNEL_OPT)
   5556  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5557  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 444 = __msgctl50 */
   5558  1.29     pooka #else
   5559  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5560  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 444 = excluded ____msgctl50 */
   5561  1.29     pooka #endif
   5562  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5563  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 445 = __getrusage50 */
   5564  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5565  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 446 = __timer_settime50 */
   5566  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5567  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 447 = __timer_gettime50 */
   5568  1.29     pooka #if defined(NTP) || !defined(_KERNEL_OPT)
   5569  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5570  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 448 = __ntp_gettime50 */
   5571  1.29     pooka #else
   5572  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5573  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 448 = excluded ___ntp_gettime50 */
   5574  1.29     pooka #endif
   5575  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5576  1.58     pooka 	    (sy_call_t *)rump_enosys }, 	/* 449 = __wait450 */
   5577  1.29     pooka 	{ ns(struct sys___mknod50_args), 0,
   5578  1.56     pooka 	    (sy_call_t *)sys___mknod50 },	/* 450 = __mknod50 */
   5579  1.34     pooka 	{ ns(struct sys___fhstat50_args), 0,
   5580  1.56     pooka 	    (sy_call_t *)sys___fhstat50 },	/* 451 = __fhstat50 */
   5581  1.75  dholland 	{ 0, 0, SYCALL_NOSYS,
   5582  1.75  dholland 	    (sy_call_t *)rump_enosys },		/* 452 = obsolete 5.99 quotactl */
   5583  1.72  christos 	{ ns(struct sys_pipe2_args), 0,
   5584  1.72  christos 	    (sy_call_t *)sys_pipe2 },		/* 453 = pipe2 */
   5585  1.72  christos 	{ ns(struct sys_dup3_args), 0,
   5586  1.72  christos 	    (sy_call_t *)sys_dup3 },		/* 454 = dup3 */
   5587  1.72  christos 	{ ns(struct sys_kqueue1_args), 0,
   5588  1.72  christos 	    (sy_call_t *)sys_kqueue1 },		/* 455 = kqueue1 */
   5589  1.72  christos 	{ ns(struct sys_paccept_args), 0,
   5590  1.72  christos 	    (sy_call_t *)sys_paccept },		/* 456 = paccept */
   5591  1.74      manu 	{ ns(struct sys_linkat_args), 0,
   5592  1.74      manu 	    (sy_call_t *)sys_linkat },		/* 457 = linkat */
   5593  1.74      manu 	{ ns(struct sys_renameat_args), 0,
   5594  1.74      manu 	    (sy_call_t *)sys_renameat },	/* 458 = renameat */
   5595  1.74      manu 	{ ns(struct sys_mkfifoat_args), 0,
   5596  1.74      manu 	    (sy_call_t *)sys_mkfifoat },	/* 459 = mkfifoat */
   5597  1.74      manu 	{ ns(struct sys_mknodat_args), 0,
   5598  1.74      manu 	    (sy_call_t *)sys_mknodat },		/* 460 = mknodat */
   5599  1.74      manu 	{ ns(struct sys_mkdirat_args), 0,
   5600  1.74      manu 	    (sy_call_t *)sys_mkdirat },		/* 461 = mkdirat */
   5601  1.74      manu 	{ ns(struct sys_faccessat_args), 0,
   5602  1.74      manu 	    (sy_call_t *)sys_faccessat },	/* 462 = faccessat */
   5603  1.74      manu 	{ ns(struct sys_fchmodat_args), 0,
   5604  1.74      manu 	    (sy_call_t *)sys_fchmodat },	/* 463 = fchmodat */
   5605  1.74      manu 	{ ns(struct sys_fchownat_args), 0,
   5606  1.74      manu 	    (sy_call_t *)sys_fchownat },	/* 464 = fchownat */
   5607  1.74      manu 	{ ns(struct sys_fexecve_args), 0,
   5608  1.74      manu 	    (sy_call_t *)sys_fexecve },		/* 465 = fexecve */
   5609  1.74      manu 	{ ns(struct sys_fstatat_args), 0,
   5610  1.74      manu 	    (sy_call_t *)sys_fstatat },		/* 466 = fstatat */
   5611  1.74      manu 	{ ns(struct sys_utimensat_args), 0,
   5612  1.74      manu 	    (sy_call_t *)sys_utimensat },	/* 467 = utimensat */
   5613  1.74      manu 	{ ns(struct sys_openat_args), 0,
   5614  1.74      manu 	    (sy_call_t *)sys_openat },		/* 468 = openat */
   5615  1.74      manu 	{ ns(struct sys_readlinkat_args), 0,
   5616  1.74      manu 	    (sy_call_t *)sys_readlinkat },	/* 469 = readlinkat */
   5617  1.74      manu 	{ ns(struct sys_symlinkat_args), 0,
   5618  1.74      manu 	    (sy_call_t *)sys_symlinkat },	/* 470 = symlinkat */
   5619  1.74      manu 	{ ns(struct sys_unlinkat_args), 0,
   5620  1.74      manu 	    (sy_call_t *)sys_unlinkat },	/* 471 = unlinkat */
   5621  1.75  dholland 	{ ns(struct sys_futimens_args), 0,
   5622  1.75  dholland 	    (sy_call_t *)sys_futimens },	/* 472 = futimens */
   5623  1.75  dholland 	{ ns(struct sys___quotactl_args), 0,
   5624  1.75  dholland 	    (sy_call_t *)sys___quotactl },	/* 473 = __quotactl */
   5625  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5626  1.77    martin 	    (sy_call_t *)rump_enosys }, 	/* 474 = posix_spawn */
   5627  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5628  1.79     pooka 	    (sy_call_t *)rump_enosys }, 	/* 475 = recvmmsg */
   5629  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5630  1.79     pooka 	    (sy_call_t *)rump_enosys }, 	/* 476 = sendmmsg */
   5631  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5632  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 477 = filler */
   5633  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5634  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 478 = filler */
   5635  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5636  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 479 = filler */
   5637  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5638  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 480 = filler */
   5639  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5640  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 481 = filler */
   5641  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5642  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 482 = filler */
   5643  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5644  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 483 = filler */
   5645  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5646  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 484 = filler */
   5647  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5648  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 485 = filler */
   5649  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5650  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 486 = filler */
   5651  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5652  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 487 = filler */
   5653  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5654  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 488 = filler */
   5655  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5656  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 489 = filler */
   5657  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5658  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 490 = filler */
   5659  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5660  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 491 = filler */
   5661  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5662  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 492 = filler */
   5663  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5664  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 493 = filler */
   5665  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5666  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 494 = filler */
   5667  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5668  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 495 = filler */
   5669  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5670  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 496 = filler */
   5671  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5672  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 497 = filler */
   5673  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5674  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 498 = filler */
   5675  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5676  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 499 = filler */
   5677  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5678  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 500 = filler */
   5679  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5680  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 501 = filler */
   5681  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5682  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 502 = filler */
   5683  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5684  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 503 = filler */
   5685  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5686  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 504 = filler */
   5687  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5688  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 505 = filler */
   5689  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5690  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 506 = filler */
   5691  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5692  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 507 = filler */
   5693  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5694  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 508 = filler */
   5695  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5696  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 509 = filler */
   5697  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5698  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 510 = filler */
   5699  1.57     pooka 	{ 0, 0, SYCALL_NOSYS,
   5700  1.56     pooka 	    (sy_call_t *)rump_enosys },		/* 511 = filler */
   5701  1.29     pooka };
   5702  1.29     pooka CTASSERT(__arraycount(rump_sysent) == SYS_NSYSENT);
   5703  1.53     pooka #endif /* RUMP_CLIENT */
   5704