Home | History | Annotate | Line # | Download | only in rumpkern
      1  1.148   thorpej /* $NetBSD: rump_syscalls.c,v 1.164 2024/10/09 16:29:11 christos 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.164  christos  * created from	NetBSD: syscalls.master,v 1.316 2024/10/09 16:27:28 christos Exp
      8    1.1     pooka  */
      9    1.1     pooka 
     10   1.85     pooka #ifdef RUMP_CLIENT
     11   1.91     pooka #include <rump/rumpuser_port.h>
     12   1.85     pooka #endif /* RUMP_CLIENT */
     13   1.85     pooka 
     14   1.81     pooka #include <sys/param.h>
     15   1.81     pooka 
     16   1.81     pooka #ifdef __NetBSD__
     17    1.1     pooka #include <sys/cdefs.h>
     18  1.148   thorpej __KERNEL_RCSID(0, "$NetBSD: rump_syscalls.c,v 1.164 2024/10/09 16:29:11 christos Exp $");
     19    1.1     pooka 
     20   1.53     pooka #include <sys/fstypes.h>
     21    1.1     pooka #include <sys/proc.h>
     22   1.81     pooka #endif /* __NetBSD__ */
     23   1.81     pooka 
     24   1.71     pooka #ifdef RUMP_CLIENT
     25   1.81     pooka #include <errno.h>
     26   1.81     pooka #include <stdint.h>
     27   1.81     pooka #include <stdlib.h>
     28   1.96     pooka #include <string.h>
     29   1.81     pooka 
     30   1.71     pooka #include <srcsys/syscall.h>
     31   1.71     pooka #include <srcsys/syscallargs.h>
     32   1.53     pooka 
     33   1.53     pooka #include <rump/rumpclient.h>
     34   1.53     pooka 
     35   1.53     pooka #define rsys_syscall(num, data, dlen, retval)	\
     36   1.53     pooka     rumpclient_syscall(num, data, dlen, retval)
     37   1.53     pooka #define rsys_seterrno(error) errno = error
     38   1.53     pooka #else
     39   1.71     pooka #include <sys/syscall.h>
     40   1.71     pooka #include <sys/syscallargs.h>
     41   1.71     pooka 
     42   1.55     pooka #include <sys/syscallvar.h>
     43   1.55     pooka 
     44  1.122     pooka #include <rump-sys/kern.h>
     45  1.122     pooka 
     46   1.27     pooka #include <rump/rumpuser.h>
     47   1.90     pooka #define rsys_syscall(num, data, dlen, retval)	\
     48   1.90     pooka     rump_syscall(num, data, dlen, retval)
     49   1.90     pooka 
     50   1.90     pooka #define rsys_seterrno(error) rumpuser_seterrno(error)
     51   1.86     pooka #endif
     52   1.55     pooka 
     53  1.103     pooka #ifndef RUMP_KERNEL_IS_LIBC
     54  1.103     pooka #define RUMP_SYS_COMPAT
     55   1.53     pooka #endif
     56   1.53     pooka 
     57    1.1     pooka #if	BYTE_ORDER == BIG_ENDIAN
     58    1.1     pooka #define SPARG(p,k)	((p)->k.be.datum)
     59    1.1     pooka #else /* LITTLE_ENDIAN, I hope dearly */
     60    1.1     pooka #define SPARG(p,k)	((p)->k.le.datum)
     61    1.1     pooka #endif
     62    1.1     pooka 
     63   1.16     pooka 
     64   1.90     pooka void rumpns_sys_nomodule(void);
     65   1.90     pooka 
     66   1.60     pooka ssize_t rump___sysimpl_read(int, void *, size_t);
     67    1.1     pooka ssize_t
     68   1.60     pooka rump___sysimpl_read(int fd, void * buf, size_t nbyte)
     69    1.1     pooka {
     70   1.93     pooka 	register_t retval[2];
     71   1.27     pooka 	int error = 0;
     72   1.68     pooka 	ssize_t rv = -1;
     73   1.31     pooka 	struct sys_read_args callarg;
     74    1.1     pooka 
     75   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
     76   1.31     pooka 	SPARG(&callarg, fd) = fd;
     77   1.31     pooka 	SPARG(&callarg, buf) = buf;
     78   1.31     pooka 	SPARG(&callarg, nbyte) = nbyte;
     79    1.1     pooka 
     80  1.120  pgoyette 	error = rsys_syscall(SYS_read, &callarg, sizeof(callarg), retval);
     81   1.63     pooka 	rsys_seterrno(error);
     82   1.68     pooka 	if (error == 0) {
     83   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
     84   1.68     pooka 			rv = *(ssize_t *)retval;
     85   1.68     pooka 		else
     86   1.69     pooka 			rv = *retval;
     87   1.27     pooka 	}
     88   1.68     pooka 	return rv;
     89    1.1     pooka }
     90  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
     91  1.103     pooka __weak_alias(read,rump___sysimpl_read);
     92  1.103     pooka __weak_alias(_read,rump___sysimpl_read);
     93  1.103     pooka __strong_alias(_sys_read,rump___sysimpl_read);
     94  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
     95    1.1     pooka 
     96   1.60     pooka ssize_t rump___sysimpl_write(int, const void *, size_t);
     97    1.1     pooka ssize_t
     98   1.60     pooka rump___sysimpl_write(int fd, const void * buf, size_t nbyte)
     99    1.1     pooka {
    100   1.93     pooka 	register_t retval[2];
    101   1.27     pooka 	int error = 0;
    102   1.68     pooka 	ssize_t rv = -1;
    103   1.31     pooka 	struct sys_write_args callarg;
    104    1.1     pooka 
    105   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    106   1.31     pooka 	SPARG(&callarg, fd) = fd;
    107   1.31     pooka 	SPARG(&callarg, buf) = buf;
    108   1.31     pooka 	SPARG(&callarg, nbyte) = nbyte;
    109    1.1     pooka 
    110  1.120  pgoyette 	error = rsys_syscall(SYS_write, &callarg, sizeof(callarg), retval);
    111   1.63     pooka 	rsys_seterrno(error);
    112   1.68     pooka 	if (error == 0) {
    113   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    114   1.68     pooka 			rv = *(ssize_t *)retval;
    115   1.68     pooka 		else
    116   1.69     pooka 			rv = *retval;
    117   1.27     pooka 	}
    118   1.68     pooka 	return rv;
    119    1.1     pooka }
    120  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    121  1.103     pooka __weak_alias(write,rump___sysimpl_write);
    122  1.103     pooka __weak_alias(_write,rump___sysimpl_write);
    123  1.103     pooka __strong_alias(_sys_write,rump___sysimpl_write);
    124  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    125    1.1     pooka 
    126   1.60     pooka int rump___sysimpl_open(const char *, int, mode_t);
    127    1.1     pooka int
    128   1.60     pooka rump___sysimpl_open(const char * path, int flags, mode_t mode)
    129    1.1     pooka {
    130   1.93     pooka 	register_t retval[2];
    131   1.27     pooka 	int error = 0;
    132   1.68     pooka 	int rv = -1;
    133   1.31     pooka 	struct sys_open_args callarg;
    134    1.1     pooka 
    135   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    136   1.31     pooka 	SPARG(&callarg, path) = path;
    137   1.31     pooka 	SPARG(&callarg, flags) = flags;
    138   1.31     pooka 	SPARG(&callarg, mode) = mode;
    139    1.1     pooka 
    140  1.120  pgoyette 	error = rsys_syscall(SYS_open, &callarg, sizeof(callarg), retval);
    141   1.63     pooka 	rsys_seterrno(error);
    142   1.68     pooka 	if (error == 0) {
    143   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    144   1.68     pooka 			rv = *(int *)retval;
    145   1.68     pooka 		else
    146   1.69     pooka 			rv = *retval;
    147   1.27     pooka 	}
    148   1.68     pooka 	return rv;
    149    1.1     pooka }
    150  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    151  1.103     pooka __weak_alias(open,rump___sysimpl_open);
    152  1.103     pooka __weak_alias(_open,rump___sysimpl_open);
    153  1.103     pooka __strong_alias(_sys_open,rump___sysimpl_open);
    154  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    155    1.1     pooka 
    156   1.60     pooka int rump___sysimpl_close(int);
    157    1.1     pooka int
    158   1.60     pooka rump___sysimpl_close(int fd)
    159    1.1     pooka {
    160   1.93     pooka 	register_t retval[2];
    161   1.27     pooka 	int error = 0;
    162   1.68     pooka 	int rv = -1;
    163   1.31     pooka 	struct sys_close_args callarg;
    164    1.1     pooka 
    165   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    166   1.31     pooka 	SPARG(&callarg, fd) = fd;
    167    1.1     pooka 
    168  1.120  pgoyette 	error = rsys_syscall(SYS_close, &callarg, sizeof(callarg), retval);
    169   1.63     pooka 	rsys_seterrno(error);
    170   1.68     pooka 	if (error == 0) {
    171   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    172   1.68     pooka 			rv = *(int *)retval;
    173   1.68     pooka 		else
    174   1.69     pooka 			rv = *retval;
    175   1.27     pooka 	}
    176   1.68     pooka 	return rv;
    177    1.1     pooka }
    178  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    179  1.103     pooka __weak_alias(close,rump___sysimpl_close);
    180  1.103     pooka __weak_alias(_close,rump___sysimpl_close);
    181  1.103     pooka __strong_alias(_sys_close,rump___sysimpl_close);
    182  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    183    1.1     pooka 
    184   1.60     pooka int rump___sysimpl_link(const char *, const char *);
    185    1.1     pooka int
    186   1.60     pooka rump___sysimpl_link(const char * path, const char * link)
    187    1.1     pooka {
    188   1.93     pooka 	register_t retval[2];
    189   1.27     pooka 	int error = 0;
    190   1.68     pooka 	int rv = -1;
    191   1.31     pooka 	struct sys_link_args callarg;
    192    1.1     pooka 
    193   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    194   1.31     pooka 	SPARG(&callarg, path) = path;
    195   1.31     pooka 	SPARG(&callarg, link) = link;
    196    1.1     pooka 
    197  1.120  pgoyette 	error = rsys_syscall(SYS_link, &callarg, sizeof(callarg), retval);
    198   1.63     pooka 	rsys_seterrno(error);
    199   1.68     pooka 	if (error == 0) {
    200   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    201   1.68     pooka 			rv = *(int *)retval;
    202   1.68     pooka 		else
    203   1.69     pooka 			rv = *retval;
    204   1.27     pooka 	}
    205   1.68     pooka 	return rv;
    206    1.1     pooka }
    207  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    208  1.103     pooka __weak_alias(link,rump___sysimpl_link);
    209  1.103     pooka __weak_alias(_link,rump___sysimpl_link);
    210  1.103     pooka __strong_alias(_sys_link,rump___sysimpl_link);
    211  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    212    1.1     pooka 
    213   1.60     pooka int rump___sysimpl_unlink(const char *);
    214    1.1     pooka int
    215   1.60     pooka rump___sysimpl_unlink(const char * path)
    216    1.1     pooka {
    217   1.93     pooka 	register_t retval[2];
    218   1.27     pooka 	int error = 0;
    219   1.68     pooka 	int rv = -1;
    220   1.31     pooka 	struct sys_unlink_args callarg;
    221    1.1     pooka 
    222   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    223   1.31     pooka 	SPARG(&callarg, path) = path;
    224    1.1     pooka 
    225  1.120  pgoyette 	error = rsys_syscall(SYS_unlink, &callarg, sizeof(callarg), retval);
    226   1.63     pooka 	rsys_seterrno(error);
    227   1.68     pooka 	if (error == 0) {
    228   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    229   1.68     pooka 			rv = *(int *)retval;
    230   1.68     pooka 		else
    231   1.69     pooka 			rv = *retval;
    232   1.27     pooka 	}
    233   1.68     pooka 	return rv;
    234    1.1     pooka }
    235  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    236  1.103     pooka __weak_alias(unlink,rump___sysimpl_unlink);
    237  1.103     pooka __weak_alias(_unlink,rump___sysimpl_unlink);
    238  1.103     pooka __strong_alias(_sys_unlink,rump___sysimpl_unlink);
    239  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    240    1.1     pooka 
    241   1.60     pooka int rump___sysimpl_chdir(const char *);
    242    1.1     pooka int
    243   1.60     pooka rump___sysimpl_chdir(const char * path)
    244    1.1     pooka {
    245   1.93     pooka 	register_t retval[2];
    246   1.27     pooka 	int error = 0;
    247   1.68     pooka 	int rv = -1;
    248   1.31     pooka 	struct sys_chdir_args callarg;
    249    1.1     pooka 
    250   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    251   1.31     pooka 	SPARG(&callarg, path) = path;
    252    1.1     pooka 
    253  1.120  pgoyette 	error = rsys_syscall(SYS_chdir, &callarg, sizeof(callarg), retval);
    254   1.63     pooka 	rsys_seterrno(error);
    255   1.68     pooka 	if (error == 0) {
    256   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    257   1.68     pooka 			rv = *(int *)retval;
    258   1.68     pooka 		else
    259   1.69     pooka 			rv = *retval;
    260   1.27     pooka 	}
    261   1.68     pooka 	return rv;
    262    1.1     pooka }
    263  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    264  1.103     pooka __weak_alias(chdir,rump___sysimpl_chdir);
    265  1.103     pooka __weak_alias(_chdir,rump___sysimpl_chdir);
    266  1.103     pooka __strong_alias(_sys_chdir,rump___sysimpl_chdir);
    267  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    268    1.1     pooka 
    269   1.60     pooka int rump___sysimpl_fchdir(int);
    270    1.1     pooka int
    271   1.60     pooka rump___sysimpl_fchdir(int fd)
    272    1.1     pooka {
    273   1.93     pooka 	register_t retval[2];
    274   1.27     pooka 	int error = 0;
    275   1.68     pooka 	int rv = -1;
    276   1.31     pooka 	struct sys_fchdir_args callarg;
    277    1.1     pooka 
    278   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    279   1.31     pooka 	SPARG(&callarg, fd) = fd;
    280    1.1     pooka 
    281  1.120  pgoyette 	error = rsys_syscall(SYS_fchdir, &callarg, sizeof(callarg), retval);
    282   1.63     pooka 	rsys_seterrno(error);
    283   1.68     pooka 	if (error == 0) {
    284   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    285   1.68     pooka 			rv = *(int *)retval;
    286   1.68     pooka 		else
    287   1.69     pooka 			rv = *retval;
    288   1.27     pooka 	}
    289   1.68     pooka 	return rv;
    290    1.1     pooka }
    291  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    292  1.103     pooka __weak_alias(fchdir,rump___sysimpl_fchdir);
    293  1.103     pooka __weak_alias(_fchdir,rump___sysimpl_fchdir);
    294  1.103     pooka __strong_alias(_sys_fchdir,rump___sysimpl_fchdir);
    295  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    296    1.1     pooka 
    297  1.103     pooka #ifdef RUMP_SYS_COMPAT
    298   1.61     pooka int rump___sysimpl_mknod(const char *, mode_t, uint32_t);
    299   1.61     pooka int
    300   1.61     pooka rump___sysimpl_mknod(const char * path, mode_t mode, uint32_t dev)
    301   1.61     pooka {
    302   1.93     pooka 	register_t retval[2];
    303   1.61     pooka 	int error = 0;
    304   1.68     pooka 	int rv = -1;
    305   1.61     pooka 	struct compat_50_sys_mknod_args callarg;
    306   1.61     pooka 
    307   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    308   1.61     pooka 	SPARG(&callarg, path) = path;
    309   1.61     pooka 	SPARG(&callarg, mode) = mode;
    310   1.61     pooka 	SPARG(&callarg, dev) = dev;
    311   1.61     pooka 
    312  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_mknod, &callarg, sizeof(callarg), retval);
    313   1.63     pooka 	rsys_seterrno(error);
    314   1.68     pooka 	if (error == 0) {
    315   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    316   1.68     pooka 			rv = *(int *)retval;
    317   1.68     pooka 		else
    318   1.69     pooka 			rv = *retval;
    319   1.61     pooka 	}
    320   1.68     pooka 	return rv;
    321   1.61     pooka }
    322  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    323  1.103     pooka __weak_alias(mknod,rump___sysimpl_mknod);
    324  1.103     pooka __weak_alias(_mknod,rump___sysimpl_mknod);
    325  1.103     pooka __strong_alias(_sys_mknod,rump___sysimpl_mknod);
    326  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    327  1.103     pooka #endif /* RUMP_SYS_COMPAT */
    328   1.61     pooka 
    329   1.60     pooka int rump___sysimpl_chmod(const char *, mode_t);
    330    1.1     pooka int
    331   1.60     pooka rump___sysimpl_chmod(const char * path, mode_t mode)
    332    1.1     pooka {
    333   1.93     pooka 	register_t retval[2];
    334   1.27     pooka 	int error = 0;
    335   1.68     pooka 	int rv = -1;
    336   1.31     pooka 	struct sys_chmod_args callarg;
    337    1.1     pooka 
    338   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    339   1.31     pooka 	SPARG(&callarg, path) = path;
    340   1.31     pooka 	SPARG(&callarg, mode) = mode;
    341    1.1     pooka 
    342  1.120  pgoyette 	error = rsys_syscall(SYS_chmod, &callarg, sizeof(callarg), retval);
    343   1.63     pooka 	rsys_seterrno(error);
    344   1.68     pooka 	if (error == 0) {
    345   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    346   1.68     pooka 			rv = *(int *)retval;
    347   1.68     pooka 		else
    348   1.69     pooka 			rv = *retval;
    349   1.27     pooka 	}
    350   1.68     pooka 	return rv;
    351    1.1     pooka }
    352  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    353  1.103     pooka __weak_alias(chmod,rump___sysimpl_chmod);
    354  1.103     pooka __weak_alias(_chmod,rump___sysimpl_chmod);
    355  1.103     pooka __strong_alias(_sys_chmod,rump___sysimpl_chmod);
    356  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    357    1.1     pooka 
    358   1.60     pooka int rump___sysimpl_chown(const char *, uid_t, gid_t);
    359    1.1     pooka int
    360   1.60     pooka rump___sysimpl_chown(const char * path, uid_t uid, gid_t gid)
    361    1.1     pooka {
    362   1.93     pooka 	register_t retval[2];
    363   1.27     pooka 	int error = 0;
    364   1.68     pooka 	int rv = -1;
    365   1.31     pooka 	struct sys_chown_args callarg;
    366    1.1     pooka 
    367   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    368   1.31     pooka 	SPARG(&callarg, path) = path;
    369   1.31     pooka 	SPARG(&callarg, uid) = uid;
    370   1.31     pooka 	SPARG(&callarg, gid) = gid;
    371    1.1     pooka 
    372  1.120  pgoyette 	error = rsys_syscall(SYS_chown, &callarg, sizeof(callarg), retval);
    373   1.63     pooka 	rsys_seterrno(error);
    374   1.68     pooka 	if (error == 0) {
    375   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    376   1.68     pooka 			rv = *(int *)retval;
    377   1.68     pooka 		else
    378   1.69     pooka 			rv = *retval;
    379   1.27     pooka 	}
    380   1.68     pooka 	return rv;
    381    1.1     pooka }
    382  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    383  1.103     pooka __weak_alias(chown,rump___sysimpl_chown);
    384  1.103     pooka __weak_alias(_chown,rump___sysimpl_chown);
    385  1.103     pooka __strong_alias(_sys_chown,rump___sysimpl_chown);
    386  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    387    1.1     pooka 
    388   1.60     pooka pid_t rump___sysimpl_getpid(void);
    389   1.49     pooka pid_t
    390   1.60     pooka rump___sysimpl_getpid(void )
    391   1.49     pooka {
    392   1.93     pooka 	register_t retval[2];
    393   1.68     pooka 	pid_t rv = -1;
    394   1.49     pooka 
    395  1.119  pgoyette 	(void)rsys_syscall(SYS_getpid, NULL, 0, retval);
    396   1.68     pooka 	if (sizeof(pid_t) > sizeof(register_t))
    397   1.68     pooka 		rv = *(pid_t *)retval;
    398   1.68     pooka 	else
    399   1.69     pooka 		rv = *retval;
    400   1.68     pooka 	return rv;
    401   1.49     pooka }
    402  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    403  1.103     pooka __weak_alias(getpid,rump___sysimpl_getpid);
    404  1.103     pooka __weak_alias(_getpid,rump___sysimpl_getpid);
    405  1.103     pooka __strong_alias(_sys_getpid,rump___sysimpl_getpid);
    406  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    407   1.49     pooka 
    408   1.60     pooka int rump___sysimpl_unmount(const char *, int);
    409    1.1     pooka int
    410   1.60     pooka rump___sysimpl_unmount(const char * path, int flags)
    411    1.1     pooka {
    412   1.93     pooka 	register_t retval[2];
    413   1.27     pooka 	int error = 0;
    414   1.68     pooka 	int rv = -1;
    415   1.31     pooka 	struct sys_unmount_args callarg;
    416    1.1     pooka 
    417   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    418   1.31     pooka 	SPARG(&callarg, path) = path;
    419   1.31     pooka 	SPARG(&callarg, flags) = flags;
    420    1.1     pooka 
    421  1.120  pgoyette 	error = rsys_syscall(SYS_unmount, &callarg, sizeof(callarg), retval);
    422   1.63     pooka 	rsys_seterrno(error);
    423   1.68     pooka 	if (error == 0) {
    424   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    425   1.68     pooka 			rv = *(int *)retval;
    426   1.68     pooka 		else
    427   1.69     pooka 			rv = *retval;
    428   1.27     pooka 	}
    429   1.68     pooka 	return rv;
    430    1.1     pooka }
    431  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    432  1.103     pooka __weak_alias(unmount,rump___sysimpl_unmount);
    433  1.103     pooka __weak_alias(_unmount,rump___sysimpl_unmount);
    434  1.103     pooka __strong_alias(_sys_unmount,rump___sysimpl_unmount);
    435  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    436    1.1     pooka 
    437   1.60     pooka int rump___sysimpl_setuid(uid_t);
    438   1.49     pooka int
    439   1.60     pooka rump___sysimpl_setuid(uid_t uid)
    440   1.49     pooka {
    441   1.93     pooka 	register_t retval[2];
    442   1.49     pooka 	int error = 0;
    443   1.68     pooka 	int rv = -1;
    444   1.49     pooka 	struct sys_setuid_args callarg;
    445   1.49     pooka 
    446   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    447   1.49     pooka 	SPARG(&callarg, uid) = uid;
    448   1.49     pooka 
    449  1.120  pgoyette 	error = rsys_syscall(SYS_setuid, &callarg, sizeof(callarg), retval);
    450   1.63     pooka 	rsys_seterrno(error);
    451   1.68     pooka 	if (error == 0) {
    452   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    453   1.68     pooka 			rv = *(int *)retval;
    454   1.68     pooka 		else
    455   1.69     pooka 			rv = *retval;
    456   1.49     pooka 	}
    457   1.68     pooka 	return rv;
    458   1.49     pooka }
    459  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    460  1.103     pooka __weak_alias(setuid,rump___sysimpl_setuid);
    461  1.103     pooka __weak_alias(_setuid,rump___sysimpl_setuid);
    462  1.103     pooka __strong_alias(_sys_setuid,rump___sysimpl_setuid);
    463  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    464   1.49     pooka 
    465   1.60     pooka uid_t rump___sysimpl_getuid(void);
    466   1.49     pooka uid_t
    467   1.60     pooka rump___sysimpl_getuid(void )
    468   1.49     pooka {
    469   1.93     pooka 	register_t retval[2];
    470   1.68     pooka 	uid_t rv = -1;
    471   1.49     pooka 
    472  1.119  pgoyette 	(void)rsys_syscall(SYS_getuid, NULL, 0, retval);
    473   1.68     pooka 	if (sizeof(uid_t) > sizeof(register_t))
    474   1.68     pooka 		rv = *(uid_t *)retval;
    475   1.68     pooka 	else
    476   1.69     pooka 		rv = *retval;
    477   1.68     pooka 	return rv;
    478   1.49     pooka }
    479  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    480  1.103     pooka __weak_alias(getuid,rump___sysimpl_getuid);
    481  1.103     pooka __weak_alias(_getuid,rump___sysimpl_getuid);
    482  1.103     pooka __strong_alias(_sys_getuid,rump___sysimpl_getuid);
    483  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    484   1.49     pooka 
    485   1.60     pooka uid_t rump___sysimpl_geteuid(void);
    486   1.49     pooka uid_t
    487   1.60     pooka rump___sysimpl_geteuid(void )
    488   1.49     pooka {
    489   1.93     pooka 	register_t retval[2];
    490   1.68     pooka 	uid_t rv = -1;
    491   1.49     pooka 
    492  1.119  pgoyette 	(void)rsys_syscall(SYS_geteuid, NULL, 0, retval);
    493   1.68     pooka 	if (sizeof(uid_t) > sizeof(register_t))
    494   1.68     pooka 		rv = *(uid_t *)retval;
    495   1.68     pooka 	else
    496   1.69     pooka 		rv = *retval;
    497   1.68     pooka 	return rv;
    498   1.49     pooka }
    499  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    500  1.103     pooka __weak_alias(geteuid,rump___sysimpl_geteuid);
    501  1.103     pooka __weak_alias(_geteuid,rump___sysimpl_geteuid);
    502  1.103     pooka __strong_alias(_sys_geteuid,rump___sysimpl_geteuid);
    503  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    504   1.49     pooka 
    505   1.60     pooka ssize_t rump___sysimpl_recvmsg(int, struct msghdr *, int);
    506   1.28     pooka ssize_t
    507   1.60     pooka rump___sysimpl_recvmsg(int s, struct msghdr * msg, int flags)
    508   1.28     pooka {
    509   1.93     pooka 	register_t retval[2];
    510   1.28     pooka 	int error = 0;
    511   1.68     pooka 	ssize_t rv = -1;
    512   1.31     pooka 	struct sys_recvmsg_args callarg;
    513   1.28     pooka 
    514   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    515   1.31     pooka 	SPARG(&callarg, s) = s;
    516   1.31     pooka 	SPARG(&callarg, msg) = msg;
    517   1.31     pooka 	SPARG(&callarg, flags) = flags;
    518   1.28     pooka 
    519  1.120  pgoyette 	error = rsys_syscall(SYS_recvmsg, &callarg, sizeof(callarg), retval);
    520   1.63     pooka 	rsys_seterrno(error);
    521   1.68     pooka 	if (error == 0) {
    522   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    523   1.68     pooka 			rv = *(ssize_t *)retval;
    524   1.68     pooka 		else
    525   1.69     pooka 			rv = *retval;
    526   1.28     pooka 	}
    527   1.68     pooka 	return rv;
    528   1.28     pooka }
    529  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    530  1.103     pooka __weak_alias(recvmsg,rump___sysimpl_recvmsg);
    531  1.103     pooka __weak_alias(_recvmsg,rump___sysimpl_recvmsg);
    532  1.103     pooka __strong_alias(_sys_recvmsg,rump___sysimpl_recvmsg);
    533  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    534   1.28     pooka 
    535   1.60     pooka ssize_t rump___sysimpl_sendmsg(int, const struct msghdr *, int);
    536   1.28     pooka ssize_t
    537   1.60     pooka rump___sysimpl_sendmsg(int s, const struct msghdr * msg, int flags)
    538   1.28     pooka {
    539   1.93     pooka 	register_t retval[2];
    540   1.28     pooka 	int error = 0;
    541   1.68     pooka 	ssize_t rv = -1;
    542   1.31     pooka 	struct sys_sendmsg_args callarg;
    543   1.28     pooka 
    544   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    545   1.31     pooka 	SPARG(&callarg, s) = s;
    546   1.31     pooka 	SPARG(&callarg, msg) = msg;
    547   1.31     pooka 	SPARG(&callarg, flags) = flags;
    548   1.28     pooka 
    549  1.120  pgoyette 	error = rsys_syscall(SYS_sendmsg, &callarg, sizeof(callarg), retval);
    550   1.63     pooka 	rsys_seterrno(error);
    551   1.68     pooka 	if (error == 0) {
    552   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    553   1.68     pooka 			rv = *(ssize_t *)retval;
    554   1.68     pooka 		else
    555   1.69     pooka 			rv = *retval;
    556   1.28     pooka 	}
    557   1.68     pooka 	return rv;
    558   1.28     pooka }
    559  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    560  1.103     pooka __weak_alias(sendmsg,rump___sysimpl_sendmsg);
    561  1.103     pooka __weak_alias(_sendmsg,rump___sysimpl_sendmsg);
    562  1.103     pooka __strong_alias(_sys_sendmsg,rump___sysimpl_sendmsg);
    563  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    564   1.28     pooka 
    565   1.72  christos ssize_t rump___sysimpl_recvfrom(int, void *, size_t, int, struct sockaddr *, socklen_t *);
    566   1.28     pooka ssize_t
    567   1.72  christos rump___sysimpl_recvfrom(int s, void * buf, size_t len, int flags, struct sockaddr * from, socklen_t * fromlenaddr)
    568   1.28     pooka {
    569   1.93     pooka 	register_t retval[2];
    570   1.28     pooka 	int error = 0;
    571   1.68     pooka 	ssize_t rv = -1;
    572   1.31     pooka 	struct sys_recvfrom_args callarg;
    573   1.28     pooka 
    574   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    575   1.31     pooka 	SPARG(&callarg, s) = s;
    576   1.31     pooka 	SPARG(&callarg, buf) = buf;
    577   1.31     pooka 	SPARG(&callarg, len) = len;
    578   1.31     pooka 	SPARG(&callarg, flags) = flags;
    579   1.31     pooka 	SPARG(&callarg, from) = from;
    580   1.31     pooka 	SPARG(&callarg, fromlenaddr) = fromlenaddr;
    581   1.28     pooka 
    582  1.120  pgoyette 	error = rsys_syscall(SYS_recvfrom, &callarg, sizeof(callarg), retval);
    583   1.63     pooka 	rsys_seterrno(error);
    584   1.68     pooka 	if (error == 0) {
    585   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
    586   1.68     pooka 			rv = *(ssize_t *)retval;
    587   1.68     pooka 		else
    588   1.69     pooka 			rv = *retval;
    589   1.28     pooka 	}
    590   1.68     pooka 	return rv;
    591   1.28     pooka }
    592  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    593  1.103     pooka __weak_alias(recvfrom,rump___sysimpl_recvfrom);
    594  1.103     pooka __weak_alias(_recvfrom,rump___sysimpl_recvfrom);
    595  1.103     pooka __strong_alias(_sys_recvfrom,rump___sysimpl_recvfrom);
    596  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    597   1.28     pooka 
    598   1.72  christos int rump___sysimpl_accept(int, struct sockaddr *, socklen_t *);
    599    1.1     pooka int
    600   1.72  christos rump___sysimpl_accept(int s, struct sockaddr * name, socklen_t * anamelen)
    601   1.22     pooka {
    602   1.93     pooka 	register_t retval[2];
    603   1.27     pooka 	int error = 0;
    604   1.68     pooka 	int rv = -1;
    605   1.31     pooka 	struct sys_accept_args callarg;
    606   1.22     pooka 
    607   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    608   1.31     pooka 	SPARG(&callarg, s) = s;
    609   1.31     pooka 	SPARG(&callarg, name) = name;
    610   1.31     pooka 	SPARG(&callarg, anamelen) = anamelen;
    611   1.22     pooka 
    612  1.120  pgoyette 	error = rsys_syscall(SYS_accept, &callarg, sizeof(callarg), retval);
    613   1.63     pooka 	rsys_seterrno(error);
    614   1.68     pooka 	if (error == 0) {
    615   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    616   1.68     pooka 			rv = *(int *)retval;
    617   1.68     pooka 		else
    618   1.69     pooka 			rv = *retval;
    619   1.27     pooka 	}
    620   1.68     pooka 	return rv;
    621   1.22     pooka }
    622  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    623  1.103     pooka __weak_alias(accept,rump___sysimpl_accept);
    624  1.103     pooka __weak_alias(_accept,rump___sysimpl_accept);
    625  1.103     pooka __strong_alias(_sys_accept,rump___sysimpl_accept);
    626  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    627   1.22     pooka 
    628   1.72  christos int rump___sysimpl_getpeername(int, struct sockaddr *, socklen_t *);
    629   1.28     pooka int
    630   1.72  christos rump___sysimpl_getpeername(int fdes, struct sockaddr * asa, socklen_t * alen)
    631   1.28     pooka {
    632   1.93     pooka 	register_t retval[2];
    633   1.28     pooka 	int error = 0;
    634   1.68     pooka 	int rv = -1;
    635   1.31     pooka 	struct sys_getpeername_args callarg;
    636   1.28     pooka 
    637   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    638   1.31     pooka 	SPARG(&callarg, fdes) = fdes;
    639   1.31     pooka 	SPARG(&callarg, asa) = asa;
    640   1.31     pooka 	SPARG(&callarg, alen) = alen;
    641   1.28     pooka 
    642  1.120  pgoyette 	error = rsys_syscall(SYS_getpeername, &callarg, sizeof(callarg), retval);
    643   1.63     pooka 	rsys_seterrno(error);
    644   1.68     pooka 	if (error == 0) {
    645   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    646   1.68     pooka 			rv = *(int *)retval;
    647   1.68     pooka 		else
    648   1.69     pooka 			rv = *retval;
    649   1.28     pooka 	}
    650   1.68     pooka 	return rv;
    651   1.28     pooka }
    652  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    653  1.103     pooka __weak_alias(getpeername,rump___sysimpl_getpeername);
    654  1.103     pooka __weak_alias(_getpeername,rump___sysimpl_getpeername);
    655  1.103     pooka __strong_alias(_sys_getpeername,rump___sysimpl_getpeername);
    656  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    657   1.28     pooka 
    658   1.72  christos int rump___sysimpl_getsockname(int, struct sockaddr *, socklen_t *);
    659   1.28     pooka int
    660   1.72  christos rump___sysimpl_getsockname(int fdes, struct sockaddr * asa, socklen_t * alen)
    661   1.28     pooka {
    662   1.93     pooka 	register_t retval[2];
    663   1.28     pooka 	int error = 0;
    664   1.68     pooka 	int rv = -1;
    665   1.31     pooka 	struct sys_getsockname_args callarg;
    666   1.28     pooka 
    667   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    668   1.31     pooka 	SPARG(&callarg, fdes) = fdes;
    669   1.31     pooka 	SPARG(&callarg, asa) = asa;
    670   1.31     pooka 	SPARG(&callarg, alen) = alen;
    671   1.28     pooka 
    672  1.120  pgoyette 	error = rsys_syscall(SYS_getsockname, &callarg, sizeof(callarg), retval);
    673   1.63     pooka 	rsys_seterrno(error);
    674   1.68     pooka 	if (error == 0) {
    675   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    676   1.68     pooka 			rv = *(int *)retval;
    677   1.68     pooka 		else
    678   1.69     pooka 			rv = *retval;
    679   1.28     pooka 	}
    680   1.68     pooka 	return rv;
    681   1.28     pooka }
    682  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    683  1.103     pooka __weak_alias(getsockname,rump___sysimpl_getsockname);
    684  1.103     pooka __weak_alias(_getsockname,rump___sysimpl_getsockname);
    685  1.103     pooka __strong_alias(_sys_getsockname,rump___sysimpl_getsockname);
    686  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    687   1.28     pooka 
    688   1.60     pooka int rump___sysimpl_access(const char *, int);
    689   1.34     pooka int
    690   1.60     pooka rump___sysimpl_access(const char * path, int flags)
    691   1.34     pooka {
    692   1.93     pooka 	register_t retval[2];
    693   1.34     pooka 	int error = 0;
    694   1.68     pooka 	int rv = -1;
    695   1.34     pooka 	struct sys_access_args callarg;
    696   1.34     pooka 
    697   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    698   1.34     pooka 	SPARG(&callarg, path) = path;
    699   1.34     pooka 	SPARG(&callarg, flags) = flags;
    700   1.34     pooka 
    701  1.120  pgoyette 	error = rsys_syscall(SYS_access, &callarg, sizeof(callarg), retval);
    702   1.63     pooka 	rsys_seterrno(error);
    703   1.68     pooka 	if (error == 0) {
    704   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    705   1.68     pooka 			rv = *(int *)retval;
    706   1.68     pooka 		else
    707   1.69     pooka 			rv = *retval;
    708   1.34     pooka 	}
    709   1.68     pooka 	return rv;
    710   1.34     pooka }
    711  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    712  1.103     pooka __weak_alias(access,rump___sysimpl_access);
    713  1.103     pooka __weak_alias(_access,rump___sysimpl_access);
    714  1.103     pooka __strong_alias(_sys_access,rump___sysimpl_access);
    715  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    716   1.34     pooka 
    717   1.60     pooka int rump___sysimpl_chflags(const char *, u_long);
    718   1.22     pooka int
    719   1.60     pooka rump___sysimpl_chflags(const char * path, u_long flags)
    720    1.1     pooka {
    721   1.93     pooka 	register_t retval[2];
    722   1.27     pooka 	int error = 0;
    723   1.68     pooka 	int rv = -1;
    724   1.31     pooka 	struct sys_chflags_args callarg;
    725    1.1     pooka 
    726   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    727   1.31     pooka 	SPARG(&callarg, path) = path;
    728   1.31     pooka 	SPARG(&callarg, flags) = flags;
    729    1.1     pooka 
    730  1.120  pgoyette 	error = rsys_syscall(SYS_chflags, &callarg, sizeof(callarg), retval);
    731   1.63     pooka 	rsys_seterrno(error);
    732   1.68     pooka 	if (error == 0) {
    733   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    734   1.68     pooka 			rv = *(int *)retval;
    735   1.68     pooka 		else
    736   1.69     pooka 			rv = *retval;
    737   1.27     pooka 	}
    738   1.68     pooka 	return rv;
    739    1.1     pooka }
    740  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    741  1.103     pooka __weak_alias(chflags,rump___sysimpl_chflags);
    742  1.103     pooka __weak_alias(_chflags,rump___sysimpl_chflags);
    743  1.103     pooka __strong_alias(_sys_chflags,rump___sysimpl_chflags);
    744  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    745    1.1     pooka 
    746   1.60     pooka int rump___sysimpl_fchflags(int, u_long);
    747   1.34     pooka int
    748   1.60     pooka rump___sysimpl_fchflags(int fd, u_long flags)
    749   1.34     pooka {
    750   1.93     pooka 	register_t retval[2];
    751   1.34     pooka 	int error = 0;
    752   1.68     pooka 	int rv = -1;
    753   1.34     pooka 	struct sys_fchflags_args callarg;
    754   1.34     pooka 
    755   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    756   1.34     pooka 	SPARG(&callarg, fd) = fd;
    757   1.34     pooka 	SPARG(&callarg, flags) = flags;
    758   1.34     pooka 
    759  1.120  pgoyette 	error = rsys_syscall(SYS_fchflags, &callarg, sizeof(callarg), retval);
    760   1.63     pooka 	rsys_seterrno(error);
    761   1.68     pooka 	if (error == 0) {
    762   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    763   1.68     pooka 			rv = *(int *)retval;
    764   1.68     pooka 		else
    765   1.69     pooka 			rv = *retval;
    766   1.34     pooka 	}
    767   1.68     pooka 	return rv;
    768   1.34     pooka }
    769  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    770  1.103     pooka __weak_alias(fchflags,rump___sysimpl_fchflags);
    771  1.103     pooka __weak_alias(_fchflags,rump___sysimpl_fchflags);
    772  1.103     pooka __strong_alias(_sys_fchflags,rump___sysimpl_fchflags);
    773  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    774   1.34     pooka 
    775   1.60     pooka void rump___sysimpl_sync(void);
    776    1.1     pooka void
    777   1.60     pooka rump___sysimpl_sync(void )
    778    1.1     pooka {
    779   1.93     pooka 	register_t retval[2];
    780    1.1     pooka 
    781  1.120  pgoyette 	rsys_syscall(SYS_sync, NULL, 0, retval);
    782    1.1     pooka }
    783  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    784  1.103     pooka __weak_alias(sync,rump___sysimpl_sync);
    785  1.103     pooka __weak_alias(_sync,rump___sysimpl_sync);
    786  1.103     pooka __strong_alias(_sys_sync,rump___sysimpl_sync);
    787  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    788    1.1     pooka 
    789   1.60     pooka pid_t rump___sysimpl_getppid(void);
    790   1.49     pooka pid_t
    791   1.60     pooka rump___sysimpl_getppid(void )
    792   1.49     pooka {
    793   1.93     pooka 	register_t retval[2];
    794   1.68     pooka 	pid_t rv = -1;
    795   1.49     pooka 
    796  1.119  pgoyette 	(void)rsys_syscall(SYS_getppid, NULL, 0, retval);
    797   1.68     pooka 	if (sizeof(pid_t) > sizeof(register_t))
    798   1.68     pooka 		rv = *(pid_t *)retval;
    799   1.68     pooka 	else
    800   1.69     pooka 		rv = *retval;
    801   1.68     pooka 	return rv;
    802   1.49     pooka }
    803  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    804  1.103     pooka __weak_alias(getppid,rump___sysimpl_getppid);
    805  1.103     pooka __weak_alias(_getppid,rump___sysimpl_getppid);
    806  1.103     pooka __strong_alias(_sys_getppid,rump___sysimpl_getppid);
    807  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    808   1.49     pooka 
    809   1.60     pooka int rump___sysimpl_dup(int);
    810   1.34     pooka int
    811   1.60     pooka rump___sysimpl_dup(int fd)
    812   1.34     pooka {
    813   1.93     pooka 	register_t retval[2];
    814   1.34     pooka 	int error = 0;
    815   1.68     pooka 	int rv = -1;
    816   1.34     pooka 	struct sys_dup_args callarg;
    817   1.34     pooka 
    818   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    819   1.34     pooka 	SPARG(&callarg, fd) = fd;
    820   1.34     pooka 
    821  1.120  pgoyette 	error = rsys_syscall(SYS_dup, &callarg, sizeof(callarg), retval);
    822   1.63     pooka 	rsys_seterrno(error);
    823   1.68     pooka 	if (error == 0) {
    824   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    825   1.68     pooka 			rv = *(int *)retval;
    826   1.68     pooka 		else
    827   1.69     pooka 			rv = *retval;
    828   1.34     pooka 	}
    829   1.68     pooka 	return rv;
    830   1.34     pooka }
    831  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    832  1.103     pooka __weak_alias(dup,rump___sysimpl_dup);
    833  1.103     pooka __weak_alias(_dup,rump___sysimpl_dup);
    834  1.103     pooka __strong_alias(_sys_dup,rump___sysimpl_dup);
    835  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    836   1.34     pooka 
    837   1.60     pooka gid_t rump___sysimpl_getegid(void);
    838   1.49     pooka gid_t
    839   1.60     pooka rump___sysimpl_getegid(void )
    840   1.49     pooka {
    841   1.93     pooka 	register_t retval[2];
    842   1.68     pooka 	gid_t rv = -1;
    843   1.49     pooka 
    844  1.119  pgoyette 	(void)rsys_syscall(SYS_getegid, NULL, 0, retval);
    845   1.68     pooka 	if (sizeof(gid_t) > sizeof(register_t))
    846   1.68     pooka 		rv = *(gid_t *)retval;
    847   1.68     pooka 	else
    848   1.69     pooka 		rv = *retval;
    849   1.68     pooka 	return rv;
    850   1.49     pooka }
    851  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    852  1.103     pooka __weak_alias(getegid,rump___sysimpl_getegid);
    853  1.103     pooka __weak_alias(_getegid,rump___sysimpl_getegid);
    854  1.103     pooka __strong_alias(_sys_getegid,rump___sysimpl_getegid);
    855  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    856   1.49     pooka 
    857   1.94     pooka int rump___sysimpl_ktrace(const char *, int, int, pid_t);
    858   1.94     pooka int
    859   1.94     pooka rump___sysimpl_ktrace(const char * fname, int ops, int facs, pid_t pid)
    860   1.94     pooka {
    861   1.94     pooka 	register_t retval[2];
    862   1.94     pooka 	int error = 0;
    863   1.94     pooka 	int rv = -1;
    864   1.94     pooka 	struct sys_ktrace_args callarg;
    865   1.94     pooka 
    866   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    867   1.94     pooka 	SPARG(&callarg, fname) = fname;
    868   1.94     pooka 	SPARG(&callarg, ops) = ops;
    869   1.94     pooka 	SPARG(&callarg, facs) = facs;
    870   1.94     pooka 	SPARG(&callarg, pid) = pid;
    871   1.94     pooka 
    872  1.120  pgoyette 	error = rsys_syscall(SYS_ktrace, &callarg, sizeof(callarg), retval);
    873   1.94     pooka 	rsys_seterrno(error);
    874   1.94     pooka 	if (error == 0) {
    875   1.94     pooka 		if (sizeof(int) > sizeof(register_t))
    876   1.94     pooka 			rv = *(int *)retval;
    877   1.94     pooka 		else
    878   1.94     pooka 			rv = *retval;
    879   1.94     pooka 	}
    880   1.94     pooka 	return rv;
    881   1.94     pooka }
    882  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    883  1.103     pooka __weak_alias(ktrace,rump___sysimpl_ktrace);
    884  1.103     pooka __weak_alias(_ktrace,rump___sysimpl_ktrace);
    885  1.103     pooka __strong_alias(_sys_ktrace,rump___sysimpl_ktrace);
    886  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    887   1.94     pooka 
    888   1.60     pooka gid_t rump___sysimpl_getgid(void);
    889   1.49     pooka gid_t
    890   1.60     pooka rump___sysimpl_getgid(void )
    891   1.49     pooka {
    892   1.93     pooka 	register_t retval[2];
    893   1.68     pooka 	gid_t rv = -1;
    894   1.49     pooka 
    895  1.119  pgoyette 	(void)rsys_syscall(SYS_getgid, NULL, 0, retval);
    896   1.68     pooka 	if (sizeof(gid_t) > sizeof(register_t))
    897   1.68     pooka 		rv = *(gid_t *)retval;
    898   1.68     pooka 	else
    899   1.69     pooka 		rv = *retval;
    900   1.68     pooka 	return rv;
    901   1.49     pooka }
    902  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    903  1.103     pooka __weak_alias(getgid,rump___sysimpl_getgid);
    904  1.103     pooka __weak_alias(_getgid,rump___sysimpl_getgid);
    905  1.103     pooka __strong_alias(_sys_getgid,rump___sysimpl_getgid);
    906  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    907   1.49     pooka 
    908   1.60     pooka int rump___sysimpl___getlogin(char *, size_t);
    909   1.49     pooka int
    910   1.60     pooka rump___sysimpl___getlogin(char * namebuf, size_t namelen)
    911   1.49     pooka {
    912   1.93     pooka 	register_t retval[2];
    913   1.49     pooka 	int error = 0;
    914   1.68     pooka 	int rv = -1;
    915   1.49     pooka 	struct sys___getlogin_args callarg;
    916   1.49     pooka 
    917   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    918   1.49     pooka 	SPARG(&callarg, namebuf) = namebuf;
    919   1.49     pooka 	SPARG(&callarg, namelen) = namelen;
    920   1.49     pooka 
    921  1.120  pgoyette 	error = rsys_syscall(SYS___getlogin, &callarg, sizeof(callarg), retval);
    922   1.63     pooka 	rsys_seterrno(error);
    923   1.68     pooka 	if (error == 0) {
    924   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    925   1.68     pooka 			rv = *(int *)retval;
    926   1.68     pooka 		else
    927   1.69     pooka 			rv = *retval;
    928   1.49     pooka 	}
    929   1.68     pooka 	return rv;
    930   1.49     pooka }
    931  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    932  1.103     pooka __weak_alias(__getlogin,rump___sysimpl___getlogin);
    933  1.103     pooka __weak_alias(___getlogin,rump___sysimpl___getlogin);
    934  1.103     pooka __strong_alias(_sys___getlogin,rump___sysimpl___getlogin);
    935  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    936   1.49     pooka 
    937   1.60     pooka int rump___sysimpl___setlogin(const char *);
    938   1.49     pooka int
    939   1.60     pooka rump___sysimpl___setlogin(const char * namebuf)
    940   1.49     pooka {
    941   1.93     pooka 	register_t retval[2];
    942   1.49     pooka 	int error = 0;
    943   1.68     pooka 	int rv = -1;
    944   1.49     pooka 	struct sys___setlogin_args callarg;
    945   1.49     pooka 
    946   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    947   1.49     pooka 	SPARG(&callarg, namebuf) = namebuf;
    948   1.49     pooka 
    949  1.120  pgoyette 	error = rsys_syscall(SYS___setlogin, &callarg, sizeof(callarg), retval);
    950   1.63     pooka 	rsys_seterrno(error);
    951   1.68     pooka 	if (error == 0) {
    952   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    953   1.68     pooka 			rv = *(int *)retval;
    954   1.68     pooka 		else
    955   1.69     pooka 			rv = *retval;
    956   1.49     pooka 	}
    957   1.68     pooka 	return rv;
    958   1.49     pooka }
    959  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    960  1.103     pooka __weak_alias(__setlogin,rump___sysimpl___setlogin);
    961  1.103     pooka __weak_alias(___setlogin,rump___sysimpl___setlogin);
    962  1.103     pooka __strong_alias(_sys___setlogin,rump___sysimpl___setlogin);
    963  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    964   1.49     pooka 
    965   1.60     pooka int rump___sysimpl_ioctl(int, u_long, void *);
    966    1.1     pooka int
    967   1.60     pooka rump___sysimpl_ioctl(int fd, u_long com, void * data)
    968   1.19     pooka {
    969   1.93     pooka 	register_t retval[2];
    970   1.27     pooka 	int error = 0;
    971   1.68     pooka 	int rv = -1;
    972   1.31     pooka 	struct sys_ioctl_args callarg;
    973   1.19     pooka 
    974   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
    975   1.31     pooka 	SPARG(&callarg, fd) = fd;
    976   1.31     pooka 	SPARG(&callarg, com) = com;
    977   1.31     pooka 	SPARG(&callarg, data) = data;
    978   1.19     pooka 
    979  1.120  pgoyette 	error = rsys_syscall(SYS_ioctl, &callarg, sizeof(callarg), retval);
    980   1.63     pooka 	rsys_seterrno(error);
    981   1.68     pooka 	if (error == 0) {
    982   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
    983   1.68     pooka 			rv = *(int *)retval;
    984   1.68     pooka 		else
    985   1.69     pooka 			rv = *retval;
    986   1.27     pooka 	}
    987   1.68     pooka 	return rv;
    988   1.19     pooka }
    989  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
    990  1.103     pooka __weak_alias(ioctl,rump___sysimpl_ioctl);
    991  1.103     pooka __weak_alias(_ioctl,rump___sysimpl_ioctl);
    992  1.103     pooka __strong_alias(_sys_ioctl,rump___sysimpl_ioctl);
    993  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
    994   1.19     pooka 
    995   1.60     pooka int rump___sysimpl_revoke(const char *);
    996   1.34     pooka int
    997   1.60     pooka rump___sysimpl_revoke(const char * path)
    998   1.34     pooka {
    999   1.93     pooka 	register_t retval[2];
   1000   1.34     pooka 	int error = 0;
   1001   1.68     pooka 	int rv = -1;
   1002   1.34     pooka 	struct sys_revoke_args callarg;
   1003   1.34     pooka 
   1004   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1005   1.34     pooka 	SPARG(&callarg, path) = path;
   1006   1.34     pooka 
   1007  1.120  pgoyette 	error = rsys_syscall(SYS_revoke, &callarg, sizeof(callarg), retval);
   1008   1.63     pooka 	rsys_seterrno(error);
   1009   1.68     pooka 	if (error == 0) {
   1010   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1011   1.68     pooka 			rv = *(int *)retval;
   1012   1.68     pooka 		else
   1013   1.69     pooka 			rv = *retval;
   1014   1.34     pooka 	}
   1015   1.68     pooka 	return rv;
   1016   1.34     pooka }
   1017  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1018  1.103     pooka __weak_alias(revoke,rump___sysimpl_revoke);
   1019  1.103     pooka __weak_alias(_revoke,rump___sysimpl_revoke);
   1020  1.103     pooka __strong_alias(_sys_revoke,rump___sysimpl_revoke);
   1021  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1022   1.34     pooka 
   1023   1.60     pooka int rump___sysimpl_symlink(const char *, const char *);
   1024   1.19     pooka int
   1025   1.60     pooka rump___sysimpl_symlink(const char * path, const char * link)
   1026    1.1     pooka {
   1027   1.93     pooka 	register_t retval[2];
   1028   1.27     pooka 	int error = 0;
   1029   1.68     pooka 	int rv = -1;
   1030   1.31     pooka 	struct sys_symlink_args callarg;
   1031    1.1     pooka 
   1032   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1033   1.31     pooka 	SPARG(&callarg, path) = path;
   1034   1.31     pooka 	SPARG(&callarg, link) = link;
   1035    1.1     pooka 
   1036  1.120  pgoyette 	error = rsys_syscall(SYS_symlink, &callarg, sizeof(callarg), retval);
   1037   1.63     pooka 	rsys_seterrno(error);
   1038   1.68     pooka 	if (error == 0) {
   1039   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1040   1.68     pooka 			rv = *(int *)retval;
   1041   1.68     pooka 		else
   1042   1.69     pooka 			rv = *retval;
   1043   1.27     pooka 	}
   1044   1.68     pooka 	return rv;
   1045    1.1     pooka }
   1046  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1047  1.103     pooka __weak_alias(symlink,rump___sysimpl_symlink);
   1048  1.103     pooka __weak_alias(_symlink,rump___sysimpl_symlink);
   1049  1.103     pooka __strong_alias(_sys_symlink,rump___sysimpl_symlink);
   1050  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1051    1.1     pooka 
   1052   1.60     pooka ssize_t rump___sysimpl_readlink(const char *, char *, size_t);
   1053    1.1     pooka ssize_t
   1054   1.60     pooka rump___sysimpl_readlink(const char * path, char * buf, size_t count)
   1055    1.1     pooka {
   1056   1.93     pooka 	register_t retval[2];
   1057   1.27     pooka 	int error = 0;
   1058   1.68     pooka 	ssize_t rv = -1;
   1059   1.31     pooka 	struct sys_readlink_args callarg;
   1060    1.1     pooka 
   1061   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1062   1.31     pooka 	SPARG(&callarg, path) = path;
   1063   1.31     pooka 	SPARG(&callarg, buf) = buf;
   1064   1.31     pooka 	SPARG(&callarg, count) = count;
   1065    1.1     pooka 
   1066  1.120  pgoyette 	error = rsys_syscall(SYS_readlink, &callarg, sizeof(callarg), retval);
   1067   1.63     pooka 	rsys_seterrno(error);
   1068   1.68     pooka 	if (error == 0) {
   1069   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1070   1.68     pooka 			rv = *(ssize_t *)retval;
   1071   1.68     pooka 		else
   1072   1.69     pooka 			rv = *retval;
   1073   1.27     pooka 	}
   1074   1.68     pooka 	return rv;
   1075    1.1     pooka }
   1076  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1077  1.103     pooka __weak_alias(readlink,rump___sysimpl_readlink);
   1078  1.103     pooka __weak_alias(_readlink,rump___sysimpl_readlink);
   1079  1.103     pooka __strong_alias(_sys_readlink,rump___sysimpl_readlink);
   1080  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1081    1.1     pooka 
   1082   1.60     pooka mode_t rump___sysimpl_umask(mode_t);
   1083   1.50     pooka mode_t
   1084   1.60     pooka rump___sysimpl_umask(mode_t newmask)
   1085   1.50     pooka {
   1086   1.93     pooka 	register_t retval[2];
   1087   1.50     pooka 	int error = 0;
   1088   1.68     pooka 	mode_t rv = -1;
   1089   1.50     pooka 	struct sys_umask_args callarg;
   1090   1.50     pooka 
   1091   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1092   1.50     pooka 	SPARG(&callarg, newmask) = newmask;
   1093   1.50     pooka 
   1094  1.120  pgoyette 	error = rsys_syscall(SYS_umask, &callarg, sizeof(callarg), retval);
   1095   1.63     pooka 	rsys_seterrno(error);
   1096   1.68     pooka 	if (error == 0) {
   1097   1.68     pooka 		if (sizeof(mode_t) > sizeof(register_t))
   1098   1.68     pooka 			rv = *(mode_t *)retval;
   1099   1.68     pooka 		else
   1100   1.69     pooka 			rv = *retval;
   1101   1.50     pooka 	}
   1102   1.68     pooka 	return rv;
   1103   1.50     pooka }
   1104  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1105  1.103     pooka __weak_alias(umask,rump___sysimpl_umask);
   1106  1.103     pooka __weak_alias(_umask,rump___sysimpl_umask);
   1107  1.103     pooka __strong_alias(_sys_umask,rump___sysimpl_umask);
   1108  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1109   1.50     pooka 
   1110   1.60     pooka int rump___sysimpl_chroot(const char *);
   1111   1.34     pooka int
   1112   1.60     pooka rump___sysimpl_chroot(const char * path)
   1113   1.34     pooka {
   1114   1.93     pooka 	register_t retval[2];
   1115   1.34     pooka 	int error = 0;
   1116   1.68     pooka 	int rv = -1;
   1117   1.34     pooka 	struct sys_chroot_args callarg;
   1118   1.34     pooka 
   1119   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1120   1.34     pooka 	SPARG(&callarg, path) = path;
   1121   1.34     pooka 
   1122  1.120  pgoyette 	error = rsys_syscall(SYS_chroot, &callarg, sizeof(callarg), retval);
   1123   1.63     pooka 	rsys_seterrno(error);
   1124   1.68     pooka 	if (error == 0) {
   1125   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1126   1.68     pooka 			rv = *(int *)retval;
   1127   1.68     pooka 		else
   1128   1.69     pooka 			rv = *retval;
   1129   1.34     pooka 	}
   1130   1.68     pooka 	return rv;
   1131   1.34     pooka }
   1132  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1133  1.103     pooka __weak_alias(chroot,rump___sysimpl_chroot);
   1134  1.103     pooka __weak_alias(_chroot,rump___sysimpl_chroot);
   1135  1.103     pooka __strong_alias(_sys_chroot,rump___sysimpl_chroot);
   1136  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1137   1.34     pooka 
   1138   1.60     pooka int rump___sysimpl_getgroups(int, gid_t *);
   1139   1.49     pooka int
   1140   1.60     pooka rump___sysimpl_getgroups(int gidsetsize, gid_t * gidset)
   1141   1.49     pooka {
   1142   1.93     pooka 	register_t retval[2];
   1143   1.49     pooka 	int error = 0;
   1144   1.68     pooka 	int rv = -1;
   1145   1.49     pooka 	struct sys_getgroups_args callarg;
   1146   1.49     pooka 
   1147   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1148   1.49     pooka 	SPARG(&callarg, gidsetsize) = gidsetsize;
   1149   1.49     pooka 	SPARG(&callarg, gidset) = gidset;
   1150   1.49     pooka 
   1151  1.120  pgoyette 	error = rsys_syscall(SYS_getgroups, &callarg, sizeof(callarg), retval);
   1152   1.63     pooka 	rsys_seterrno(error);
   1153   1.68     pooka 	if (error == 0) {
   1154   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1155   1.68     pooka 			rv = *(int *)retval;
   1156   1.68     pooka 		else
   1157   1.69     pooka 			rv = *retval;
   1158   1.49     pooka 	}
   1159   1.68     pooka 	return rv;
   1160   1.49     pooka }
   1161  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1162  1.103     pooka __weak_alias(getgroups,rump___sysimpl_getgroups);
   1163  1.103     pooka __weak_alias(_getgroups,rump___sysimpl_getgroups);
   1164  1.103     pooka __strong_alias(_sys_getgroups,rump___sysimpl_getgroups);
   1165  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1166   1.49     pooka 
   1167   1.60     pooka int rump___sysimpl_setgroups(int, const gid_t *);
   1168   1.49     pooka int
   1169   1.60     pooka rump___sysimpl_setgroups(int gidsetsize, const gid_t * gidset)
   1170   1.49     pooka {
   1171   1.93     pooka 	register_t retval[2];
   1172   1.49     pooka 	int error = 0;
   1173   1.68     pooka 	int rv = -1;
   1174   1.49     pooka 	struct sys_setgroups_args callarg;
   1175   1.49     pooka 
   1176   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1177   1.49     pooka 	SPARG(&callarg, gidsetsize) = gidsetsize;
   1178   1.49     pooka 	SPARG(&callarg, gidset) = gidset;
   1179   1.49     pooka 
   1180  1.120  pgoyette 	error = rsys_syscall(SYS_setgroups, &callarg, sizeof(callarg), retval);
   1181   1.63     pooka 	rsys_seterrno(error);
   1182   1.68     pooka 	if (error == 0) {
   1183   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1184   1.68     pooka 			rv = *(int *)retval;
   1185   1.68     pooka 		else
   1186   1.69     pooka 			rv = *retval;
   1187   1.49     pooka 	}
   1188   1.68     pooka 	return rv;
   1189   1.49     pooka }
   1190  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1191  1.103     pooka __weak_alias(setgroups,rump___sysimpl_setgroups);
   1192  1.103     pooka __weak_alias(_setgroups,rump___sysimpl_setgroups);
   1193  1.103     pooka __strong_alias(_sys_setgroups,rump___sysimpl_setgroups);
   1194  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1195   1.49     pooka 
   1196   1.60     pooka int rump___sysimpl_getpgrp(void);
   1197   1.49     pooka int
   1198   1.60     pooka rump___sysimpl_getpgrp(void )
   1199   1.49     pooka {
   1200   1.93     pooka 	register_t retval[2];
   1201   1.49     pooka 	int error = 0;
   1202   1.68     pooka 	int rv = -1;
   1203   1.49     pooka 
   1204  1.120  pgoyette 	error = rsys_syscall(SYS_getpgrp, NULL, 0, retval);
   1205   1.63     pooka 	rsys_seterrno(error);
   1206   1.68     pooka 	if (error == 0) {
   1207   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1208   1.68     pooka 			rv = *(int *)retval;
   1209   1.68     pooka 		else
   1210   1.69     pooka 			rv = *retval;
   1211   1.49     pooka 	}
   1212   1.68     pooka 	return rv;
   1213   1.49     pooka }
   1214  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1215  1.103     pooka __weak_alias(getpgrp,rump___sysimpl_getpgrp);
   1216  1.103     pooka __weak_alias(_getpgrp,rump___sysimpl_getpgrp);
   1217  1.103     pooka __strong_alias(_sys_getpgrp,rump___sysimpl_getpgrp);
   1218  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1219   1.49     pooka 
   1220   1.62     pooka int rump___sysimpl_setpgid(pid_t, pid_t);
   1221   1.49     pooka int
   1222   1.62     pooka rump___sysimpl_setpgid(pid_t pid, pid_t pgid)
   1223   1.49     pooka {
   1224   1.93     pooka 	register_t retval[2];
   1225   1.49     pooka 	int error = 0;
   1226   1.68     pooka 	int rv = -1;
   1227   1.49     pooka 	struct sys_setpgid_args callarg;
   1228   1.49     pooka 
   1229   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1230   1.49     pooka 	SPARG(&callarg, pid) = pid;
   1231   1.49     pooka 	SPARG(&callarg, pgid) = pgid;
   1232   1.49     pooka 
   1233  1.120  pgoyette 	error = rsys_syscall(SYS_setpgid, &callarg, sizeof(callarg), retval);
   1234   1.63     pooka 	rsys_seterrno(error);
   1235   1.68     pooka 	if (error == 0) {
   1236   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1237   1.68     pooka 			rv = *(int *)retval;
   1238   1.68     pooka 		else
   1239   1.69     pooka 			rv = *retval;
   1240   1.49     pooka 	}
   1241   1.68     pooka 	return rv;
   1242   1.49     pooka }
   1243  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1244  1.103     pooka __weak_alias(setpgid,rump___sysimpl_setpgid);
   1245  1.103     pooka __weak_alias(_setpgid,rump___sysimpl_setpgid);
   1246  1.103     pooka __strong_alias(_sys_setpgid,rump___sysimpl_setpgid);
   1247  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1248   1.49     pooka 
   1249   1.60     pooka int rump___sysimpl_dup2(int, int);
   1250   1.34     pooka int
   1251   1.60     pooka rump___sysimpl_dup2(int from, int to)
   1252   1.34     pooka {
   1253   1.93     pooka 	register_t retval[2];
   1254   1.34     pooka 	int error = 0;
   1255   1.68     pooka 	int rv = -1;
   1256   1.34     pooka 	struct sys_dup2_args callarg;
   1257   1.34     pooka 
   1258   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1259   1.34     pooka 	SPARG(&callarg, from) = from;
   1260   1.34     pooka 	SPARG(&callarg, to) = to;
   1261   1.34     pooka 
   1262  1.120  pgoyette 	error = rsys_syscall(SYS_dup2, &callarg, sizeof(callarg), retval);
   1263   1.63     pooka 	rsys_seterrno(error);
   1264   1.68     pooka 	if (error == 0) {
   1265   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1266   1.68     pooka 			rv = *(int *)retval;
   1267   1.68     pooka 		else
   1268   1.69     pooka 			rv = *retval;
   1269   1.34     pooka 	}
   1270   1.68     pooka 	return rv;
   1271   1.34     pooka }
   1272  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1273  1.103     pooka __weak_alias(dup2,rump___sysimpl_dup2);
   1274  1.103     pooka __weak_alias(_dup2,rump___sysimpl_dup2);
   1275  1.103     pooka __strong_alias(_sys_dup2,rump___sysimpl_dup2);
   1276  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1277   1.34     pooka 
   1278  1.154  riastrad ssize_t rump___sysimpl_getrandom(void *, size_t, unsigned int);
   1279  1.154  riastrad ssize_t
   1280  1.154  riastrad rump___sysimpl_getrandom(void * buf, size_t buflen, unsigned int flags)
   1281  1.154  riastrad {
   1282  1.154  riastrad 	register_t retval[2];
   1283  1.154  riastrad 	int error = 0;
   1284  1.154  riastrad 	ssize_t rv = -1;
   1285  1.154  riastrad 	struct sys_getrandom_args callarg;
   1286  1.154  riastrad 
   1287  1.154  riastrad 	memset(&callarg, 0, sizeof(callarg));
   1288  1.154  riastrad 	SPARG(&callarg, buf) = buf;
   1289  1.154  riastrad 	SPARG(&callarg, buflen) = buflen;
   1290  1.154  riastrad 	SPARG(&callarg, flags) = flags;
   1291  1.154  riastrad 
   1292  1.154  riastrad 	error = rsys_syscall(SYS_getrandom, &callarg, sizeof(callarg), retval);
   1293  1.154  riastrad 	rsys_seterrno(error);
   1294  1.154  riastrad 	if (error == 0) {
   1295  1.154  riastrad 		if (sizeof(ssize_t) > sizeof(register_t))
   1296  1.154  riastrad 			rv = *(ssize_t *)retval;
   1297  1.154  riastrad 		else
   1298  1.154  riastrad 			rv = *retval;
   1299  1.154  riastrad 	}
   1300  1.154  riastrad 	return rv;
   1301  1.154  riastrad }
   1302  1.154  riastrad #ifdef RUMP_KERNEL_IS_LIBC
   1303  1.154  riastrad __weak_alias(getrandom,rump___sysimpl_getrandom);
   1304  1.154  riastrad __weak_alias(_getrandom,rump___sysimpl_getrandom);
   1305  1.154  riastrad __strong_alias(_sys_getrandom,rump___sysimpl_getrandom);
   1306  1.154  riastrad #endif /* RUMP_KERNEL_IS_LIBC */
   1307  1.154  riastrad 
   1308   1.60     pooka int rump___sysimpl_fcntl(int, int, void *);
   1309   1.34     pooka int
   1310   1.60     pooka rump___sysimpl_fcntl(int fd, int cmd, void * arg)
   1311   1.34     pooka {
   1312   1.93     pooka 	register_t retval[2];
   1313   1.34     pooka 	int error = 0;
   1314   1.68     pooka 	int rv = -1;
   1315   1.34     pooka 	struct sys_fcntl_args callarg;
   1316   1.34     pooka 
   1317   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1318   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1319   1.34     pooka 	SPARG(&callarg, cmd) = cmd;
   1320   1.34     pooka 	SPARG(&callarg, arg) = arg;
   1321   1.34     pooka 
   1322  1.120  pgoyette 	error = rsys_syscall(SYS_fcntl, &callarg, sizeof(callarg), retval);
   1323   1.63     pooka 	rsys_seterrno(error);
   1324   1.68     pooka 	if (error == 0) {
   1325   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1326   1.68     pooka 			rv = *(int *)retval;
   1327   1.68     pooka 		else
   1328   1.69     pooka 			rv = *retval;
   1329   1.34     pooka 	}
   1330   1.68     pooka 	return rv;
   1331   1.34     pooka }
   1332  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1333  1.103     pooka __weak_alias(fcntl,rump___sysimpl_fcntl);
   1334  1.103     pooka __weak_alias(_fcntl,rump___sysimpl_fcntl);
   1335  1.103     pooka __strong_alias(_sys_fcntl,rump___sysimpl_fcntl);
   1336  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1337   1.34     pooka 
   1338  1.103     pooka #ifdef RUMP_SYS_COMPAT
   1339   1.60     pooka int rump___sysimpl_select(int, fd_set *, fd_set *, fd_set *, struct timeval *);
   1340    1.1     pooka int
   1341   1.60     pooka rump___sysimpl_select(int nd, fd_set * in, fd_set * ou, fd_set * ex, struct timeval * tv)
   1342   1.60     pooka {
   1343   1.93     pooka 	register_t retval[2];
   1344   1.60     pooka 	int error = 0;
   1345   1.68     pooka 	int rv = -1;
   1346   1.60     pooka 	struct compat_50_sys_select_args callarg;
   1347   1.60     pooka 
   1348   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1349   1.60     pooka 	SPARG(&callarg, nd) = nd;
   1350   1.60     pooka 	SPARG(&callarg, in) = in;
   1351   1.60     pooka 	SPARG(&callarg, ou) = ou;
   1352   1.60     pooka 	SPARG(&callarg, ex) = ex;
   1353   1.60     pooka 	SPARG(&callarg, tv) = (struct timeval50 *)tv;
   1354   1.60     pooka 
   1355  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_select, &callarg, sizeof(callarg), retval);
   1356   1.63     pooka 	rsys_seterrno(error);
   1357   1.68     pooka 	if (error == 0) {
   1358   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1359   1.68     pooka 			rv = *(int *)retval;
   1360   1.68     pooka 		else
   1361   1.69     pooka 			rv = *retval;
   1362   1.60     pooka 	}
   1363   1.68     pooka 	return rv;
   1364   1.60     pooka }
   1365  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1366  1.103     pooka __weak_alias(select,rump___sysimpl_select);
   1367  1.103     pooka __weak_alias(_select,rump___sysimpl_select);
   1368  1.103     pooka __strong_alias(_sys_select,rump___sysimpl_select);
   1369  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1370  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   1371   1.60     pooka 
   1372   1.60     pooka int rump___sysimpl_fsync(int);
   1373   1.60     pooka int
   1374   1.60     pooka rump___sysimpl_fsync(int fd)
   1375   1.12     pooka {
   1376   1.93     pooka 	register_t retval[2];
   1377   1.27     pooka 	int error = 0;
   1378   1.68     pooka 	int rv = -1;
   1379   1.31     pooka 	struct sys_fsync_args callarg;
   1380   1.12     pooka 
   1381   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1382   1.31     pooka 	SPARG(&callarg, fd) = fd;
   1383   1.12     pooka 
   1384  1.120  pgoyette 	error = rsys_syscall(SYS_fsync, &callarg, sizeof(callarg), retval);
   1385   1.63     pooka 	rsys_seterrno(error);
   1386   1.68     pooka 	if (error == 0) {
   1387   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1388   1.68     pooka 			rv = *(int *)retval;
   1389   1.68     pooka 		else
   1390   1.69     pooka 			rv = *retval;
   1391   1.27     pooka 	}
   1392   1.68     pooka 	return rv;
   1393   1.12     pooka }
   1394  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1395  1.103     pooka __weak_alias(fsync,rump___sysimpl_fsync);
   1396  1.103     pooka __weak_alias(_fsync,rump___sysimpl_fsync);
   1397  1.103     pooka __strong_alias(_sys_fsync,rump___sysimpl_fsync);
   1398  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1399   1.12     pooka 
   1400   1.72  christos int rump___sysimpl_connect(int, const struct sockaddr *, socklen_t);
   1401   1.12     pooka int
   1402   1.72  christos rump___sysimpl_connect(int s, const struct sockaddr * name, socklen_t namelen)
   1403   1.18     pooka {
   1404   1.93     pooka 	register_t retval[2];
   1405   1.27     pooka 	int error = 0;
   1406   1.68     pooka 	int rv = -1;
   1407   1.31     pooka 	struct sys_connect_args callarg;
   1408   1.18     pooka 
   1409   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1410   1.31     pooka 	SPARG(&callarg, s) = s;
   1411   1.31     pooka 	SPARG(&callarg, name) = name;
   1412   1.31     pooka 	SPARG(&callarg, namelen) = namelen;
   1413   1.18     pooka 
   1414  1.120  pgoyette 	error = rsys_syscall(SYS_connect, &callarg, sizeof(callarg), retval);
   1415   1.63     pooka 	rsys_seterrno(error);
   1416   1.68     pooka 	if (error == 0) {
   1417   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1418   1.68     pooka 			rv = *(int *)retval;
   1419   1.68     pooka 		else
   1420   1.69     pooka 			rv = *retval;
   1421   1.27     pooka 	}
   1422   1.68     pooka 	return rv;
   1423   1.18     pooka }
   1424  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1425  1.103     pooka __weak_alias(connect,rump___sysimpl_connect);
   1426  1.103     pooka __weak_alias(_connect,rump___sysimpl_connect);
   1427  1.103     pooka __strong_alias(_sys_connect,rump___sysimpl_connect);
   1428  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1429   1.18     pooka 
   1430   1.72  christos int rump___sysimpl_bind(int, const struct sockaddr *, socklen_t);
   1431   1.18     pooka int
   1432   1.72  christos rump___sysimpl_bind(int s, const struct sockaddr * name, socklen_t namelen)
   1433   1.22     pooka {
   1434   1.93     pooka 	register_t retval[2];
   1435   1.27     pooka 	int error = 0;
   1436   1.68     pooka 	int rv = -1;
   1437   1.31     pooka 	struct sys_bind_args callarg;
   1438   1.22     pooka 
   1439   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1440   1.31     pooka 	SPARG(&callarg, s) = s;
   1441   1.31     pooka 	SPARG(&callarg, name) = name;
   1442   1.31     pooka 	SPARG(&callarg, namelen) = namelen;
   1443   1.22     pooka 
   1444  1.120  pgoyette 	error = rsys_syscall(SYS_bind, &callarg, sizeof(callarg), retval);
   1445   1.63     pooka 	rsys_seterrno(error);
   1446   1.68     pooka 	if (error == 0) {
   1447   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1448   1.68     pooka 			rv = *(int *)retval;
   1449   1.68     pooka 		else
   1450   1.69     pooka 			rv = *retval;
   1451   1.27     pooka 	}
   1452   1.68     pooka 	return rv;
   1453   1.22     pooka }
   1454  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1455  1.103     pooka __weak_alias(bind,rump___sysimpl_bind);
   1456  1.103     pooka __weak_alias(_bind,rump___sysimpl_bind);
   1457  1.103     pooka __strong_alias(_sys_bind,rump___sysimpl_bind);
   1458  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1459   1.22     pooka 
   1460   1.72  christos int rump___sysimpl_setsockopt(int, int, int, const void *, socklen_t);
   1461   1.22     pooka int
   1462   1.72  christos rump___sysimpl_setsockopt(int s, int level, int name, const void * val, socklen_t valsize)
   1463   1.18     pooka {
   1464   1.93     pooka 	register_t retval[2];
   1465   1.27     pooka 	int error = 0;
   1466   1.68     pooka 	int rv = -1;
   1467   1.31     pooka 	struct sys_setsockopt_args callarg;
   1468   1.18     pooka 
   1469   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1470   1.31     pooka 	SPARG(&callarg, s) = s;
   1471   1.31     pooka 	SPARG(&callarg, level) = level;
   1472   1.31     pooka 	SPARG(&callarg, name) = name;
   1473   1.31     pooka 	SPARG(&callarg, val) = val;
   1474   1.31     pooka 	SPARG(&callarg, valsize) = valsize;
   1475   1.18     pooka 
   1476  1.120  pgoyette 	error = rsys_syscall(SYS_setsockopt, &callarg, sizeof(callarg), retval);
   1477   1.63     pooka 	rsys_seterrno(error);
   1478   1.68     pooka 	if (error == 0) {
   1479   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1480   1.68     pooka 			rv = *(int *)retval;
   1481   1.68     pooka 		else
   1482   1.69     pooka 			rv = *retval;
   1483   1.27     pooka 	}
   1484   1.68     pooka 	return rv;
   1485   1.18     pooka }
   1486  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1487  1.103     pooka __weak_alias(setsockopt,rump___sysimpl_setsockopt);
   1488  1.103     pooka __weak_alias(_setsockopt,rump___sysimpl_setsockopt);
   1489  1.103     pooka __strong_alias(_sys_setsockopt,rump___sysimpl_setsockopt);
   1490  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1491   1.18     pooka 
   1492   1.60     pooka int rump___sysimpl_listen(int, int);
   1493   1.18     pooka int
   1494   1.60     pooka rump___sysimpl_listen(int s, int backlog)
   1495   1.22     pooka {
   1496   1.93     pooka 	register_t retval[2];
   1497   1.27     pooka 	int error = 0;
   1498   1.68     pooka 	int rv = -1;
   1499   1.31     pooka 	struct sys_listen_args callarg;
   1500   1.22     pooka 
   1501   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1502   1.31     pooka 	SPARG(&callarg, s) = s;
   1503   1.31     pooka 	SPARG(&callarg, backlog) = backlog;
   1504   1.22     pooka 
   1505  1.120  pgoyette 	error = rsys_syscall(SYS_listen, &callarg, sizeof(callarg), retval);
   1506   1.63     pooka 	rsys_seterrno(error);
   1507   1.68     pooka 	if (error == 0) {
   1508   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1509   1.68     pooka 			rv = *(int *)retval;
   1510   1.68     pooka 		else
   1511   1.69     pooka 			rv = *retval;
   1512   1.27     pooka 	}
   1513   1.68     pooka 	return rv;
   1514   1.22     pooka }
   1515  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1516  1.103     pooka __weak_alias(listen,rump___sysimpl_listen);
   1517  1.103     pooka __weak_alias(_listen,rump___sysimpl_listen);
   1518  1.103     pooka __strong_alias(_sys_listen,rump___sysimpl_listen);
   1519  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1520   1.22     pooka 
   1521   1.72  christos int rump___sysimpl_getsockopt(int, int, int, void *, socklen_t *);
   1522   1.22     pooka int
   1523   1.72  christos rump___sysimpl_getsockopt(int s, int level, int name, void * val, socklen_t * avalsize)
   1524   1.18     pooka {
   1525   1.93     pooka 	register_t retval[2];
   1526   1.27     pooka 	int error = 0;
   1527   1.68     pooka 	int rv = -1;
   1528   1.31     pooka 	struct sys_getsockopt_args callarg;
   1529   1.18     pooka 
   1530   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1531   1.31     pooka 	SPARG(&callarg, s) = s;
   1532   1.31     pooka 	SPARG(&callarg, level) = level;
   1533   1.31     pooka 	SPARG(&callarg, name) = name;
   1534   1.31     pooka 	SPARG(&callarg, val) = val;
   1535   1.31     pooka 	SPARG(&callarg, avalsize) = avalsize;
   1536   1.18     pooka 
   1537  1.120  pgoyette 	error = rsys_syscall(SYS_getsockopt, &callarg, sizeof(callarg), retval);
   1538   1.63     pooka 	rsys_seterrno(error);
   1539   1.68     pooka 	if (error == 0) {
   1540   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1541   1.68     pooka 			rv = *(int *)retval;
   1542   1.68     pooka 		else
   1543   1.69     pooka 			rv = *retval;
   1544   1.27     pooka 	}
   1545   1.68     pooka 	return rv;
   1546   1.18     pooka }
   1547  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1548  1.103     pooka __weak_alias(getsockopt,rump___sysimpl_getsockopt);
   1549  1.103     pooka __weak_alias(_getsockopt,rump___sysimpl_getsockopt);
   1550  1.103     pooka __strong_alias(_sys_getsockopt,rump___sysimpl_getsockopt);
   1551  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1552   1.18     pooka 
   1553   1.60     pooka ssize_t rump___sysimpl_readv(int, const struct iovec *, int);
   1554   1.34     pooka ssize_t
   1555   1.60     pooka rump___sysimpl_readv(int fd, const struct iovec * iovp, int iovcnt)
   1556   1.34     pooka {
   1557   1.93     pooka 	register_t retval[2];
   1558   1.34     pooka 	int error = 0;
   1559   1.68     pooka 	ssize_t rv = -1;
   1560   1.34     pooka 	struct sys_readv_args callarg;
   1561   1.34     pooka 
   1562   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1563   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1564   1.34     pooka 	SPARG(&callarg, iovp) = iovp;
   1565   1.34     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   1566   1.34     pooka 
   1567  1.120  pgoyette 	error = rsys_syscall(SYS_readv, &callarg, sizeof(callarg), retval);
   1568   1.63     pooka 	rsys_seterrno(error);
   1569   1.68     pooka 	if (error == 0) {
   1570   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1571   1.68     pooka 			rv = *(ssize_t *)retval;
   1572   1.68     pooka 		else
   1573   1.69     pooka 			rv = *retval;
   1574   1.34     pooka 	}
   1575   1.68     pooka 	return rv;
   1576   1.34     pooka }
   1577  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1578  1.103     pooka __weak_alias(readv,rump___sysimpl_readv);
   1579  1.103     pooka __weak_alias(_readv,rump___sysimpl_readv);
   1580  1.103     pooka __strong_alias(_sys_readv,rump___sysimpl_readv);
   1581  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1582   1.34     pooka 
   1583   1.60     pooka ssize_t rump___sysimpl_writev(int, const struct iovec *, int);
   1584   1.34     pooka ssize_t
   1585   1.60     pooka rump___sysimpl_writev(int fd, const struct iovec * iovp, int iovcnt)
   1586   1.34     pooka {
   1587   1.93     pooka 	register_t retval[2];
   1588   1.34     pooka 	int error = 0;
   1589   1.68     pooka 	ssize_t rv = -1;
   1590   1.34     pooka 	struct sys_writev_args callarg;
   1591   1.34     pooka 
   1592   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1593   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1594   1.34     pooka 	SPARG(&callarg, iovp) = iovp;
   1595   1.34     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   1596   1.34     pooka 
   1597  1.120  pgoyette 	error = rsys_syscall(SYS_writev, &callarg, sizeof(callarg), retval);
   1598   1.63     pooka 	rsys_seterrno(error);
   1599   1.68     pooka 	if (error == 0) {
   1600   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1601   1.68     pooka 			rv = *(ssize_t *)retval;
   1602   1.68     pooka 		else
   1603   1.69     pooka 			rv = *retval;
   1604   1.34     pooka 	}
   1605   1.68     pooka 	return rv;
   1606   1.34     pooka }
   1607  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1608  1.103     pooka __weak_alias(writev,rump___sysimpl_writev);
   1609  1.103     pooka __weak_alias(_writev,rump___sysimpl_writev);
   1610  1.103     pooka __strong_alias(_sys_writev,rump___sysimpl_writev);
   1611  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1612   1.34     pooka 
   1613   1.60     pooka int rump___sysimpl_fchown(int, uid_t, gid_t);
   1614   1.34     pooka int
   1615   1.60     pooka rump___sysimpl_fchown(int fd, uid_t uid, gid_t gid)
   1616   1.34     pooka {
   1617   1.93     pooka 	register_t retval[2];
   1618   1.34     pooka 	int error = 0;
   1619   1.68     pooka 	int rv = -1;
   1620   1.34     pooka 	struct sys_fchown_args callarg;
   1621   1.34     pooka 
   1622   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1623   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1624   1.34     pooka 	SPARG(&callarg, uid) = uid;
   1625   1.34     pooka 	SPARG(&callarg, gid) = gid;
   1626   1.34     pooka 
   1627  1.120  pgoyette 	error = rsys_syscall(SYS_fchown, &callarg, sizeof(callarg), retval);
   1628   1.63     pooka 	rsys_seterrno(error);
   1629   1.68     pooka 	if (error == 0) {
   1630   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1631   1.68     pooka 			rv = *(int *)retval;
   1632   1.68     pooka 		else
   1633   1.69     pooka 			rv = *retval;
   1634   1.34     pooka 	}
   1635   1.68     pooka 	return rv;
   1636   1.34     pooka }
   1637  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1638  1.103     pooka __weak_alias(fchown,rump___sysimpl_fchown);
   1639  1.103     pooka __weak_alias(_fchown,rump___sysimpl_fchown);
   1640  1.103     pooka __strong_alias(_sys_fchown,rump___sysimpl_fchown);
   1641  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1642   1.34     pooka 
   1643   1.60     pooka int rump___sysimpl_fchmod(int, mode_t);
   1644   1.34     pooka int
   1645   1.60     pooka rump___sysimpl_fchmod(int fd, mode_t mode)
   1646   1.34     pooka {
   1647   1.93     pooka 	register_t retval[2];
   1648   1.34     pooka 	int error = 0;
   1649   1.68     pooka 	int rv = -1;
   1650   1.34     pooka 	struct sys_fchmod_args callarg;
   1651   1.34     pooka 
   1652   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1653   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1654   1.34     pooka 	SPARG(&callarg, mode) = mode;
   1655   1.34     pooka 
   1656  1.120  pgoyette 	error = rsys_syscall(SYS_fchmod, &callarg, sizeof(callarg), retval);
   1657   1.63     pooka 	rsys_seterrno(error);
   1658   1.68     pooka 	if (error == 0) {
   1659   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1660   1.68     pooka 			rv = *(int *)retval;
   1661   1.68     pooka 		else
   1662   1.69     pooka 			rv = *retval;
   1663   1.34     pooka 	}
   1664   1.68     pooka 	return rv;
   1665   1.34     pooka }
   1666  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1667  1.103     pooka __weak_alias(fchmod,rump___sysimpl_fchmod);
   1668  1.103     pooka __weak_alias(_fchmod,rump___sysimpl_fchmod);
   1669  1.103     pooka __strong_alias(_sys_fchmod,rump___sysimpl_fchmod);
   1670  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1671   1.34     pooka 
   1672   1.60     pooka int rump___sysimpl_setreuid(uid_t, uid_t);
   1673   1.49     pooka int
   1674   1.60     pooka rump___sysimpl_setreuid(uid_t ruid, uid_t euid)
   1675   1.49     pooka {
   1676   1.93     pooka 	register_t retval[2];
   1677   1.49     pooka 	int error = 0;
   1678   1.68     pooka 	int rv = -1;
   1679   1.49     pooka 	struct sys_setreuid_args callarg;
   1680   1.49     pooka 
   1681   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1682   1.49     pooka 	SPARG(&callarg, ruid) = ruid;
   1683   1.49     pooka 	SPARG(&callarg, euid) = euid;
   1684   1.49     pooka 
   1685  1.120  pgoyette 	error = rsys_syscall(SYS_setreuid, &callarg, sizeof(callarg), retval);
   1686   1.63     pooka 	rsys_seterrno(error);
   1687   1.68     pooka 	if (error == 0) {
   1688   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1689   1.68     pooka 			rv = *(int *)retval;
   1690   1.68     pooka 		else
   1691   1.69     pooka 			rv = *retval;
   1692   1.49     pooka 	}
   1693   1.68     pooka 	return rv;
   1694   1.49     pooka }
   1695  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1696  1.103     pooka __weak_alias(setreuid,rump___sysimpl_setreuid);
   1697  1.103     pooka __weak_alias(_setreuid,rump___sysimpl_setreuid);
   1698  1.103     pooka __strong_alias(_sys_setreuid,rump___sysimpl_setreuid);
   1699  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1700   1.49     pooka 
   1701   1.60     pooka int rump___sysimpl_setregid(gid_t, gid_t);
   1702   1.49     pooka int
   1703   1.60     pooka rump___sysimpl_setregid(gid_t rgid, gid_t egid)
   1704   1.49     pooka {
   1705   1.93     pooka 	register_t retval[2];
   1706   1.49     pooka 	int error = 0;
   1707   1.68     pooka 	int rv = -1;
   1708   1.49     pooka 	struct sys_setregid_args callarg;
   1709   1.49     pooka 
   1710   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1711   1.49     pooka 	SPARG(&callarg, rgid) = rgid;
   1712   1.49     pooka 	SPARG(&callarg, egid) = egid;
   1713   1.49     pooka 
   1714  1.120  pgoyette 	error = rsys_syscall(SYS_setregid, &callarg, sizeof(callarg), retval);
   1715   1.63     pooka 	rsys_seterrno(error);
   1716   1.68     pooka 	if (error == 0) {
   1717   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1718   1.68     pooka 			rv = *(int *)retval;
   1719   1.68     pooka 		else
   1720   1.69     pooka 			rv = *retval;
   1721   1.49     pooka 	}
   1722   1.68     pooka 	return rv;
   1723   1.49     pooka }
   1724  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1725  1.103     pooka __weak_alias(setregid,rump___sysimpl_setregid);
   1726  1.103     pooka __weak_alias(_setregid,rump___sysimpl_setregid);
   1727  1.103     pooka __strong_alias(_sys_setregid,rump___sysimpl_setregid);
   1728  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1729   1.49     pooka 
   1730   1.60     pooka int rump___sysimpl_rename(const char *, const char *);
   1731   1.18     pooka int
   1732   1.60     pooka rump___sysimpl_rename(const char * from, const char * to)
   1733    1.1     pooka {
   1734   1.93     pooka 	register_t retval[2];
   1735   1.27     pooka 	int error = 0;
   1736   1.68     pooka 	int rv = -1;
   1737   1.31     pooka 	struct sys_rename_args callarg;
   1738    1.1     pooka 
   1739   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1740   1.31     pooka 	SPARG(&callarg, from) = from;
   1741   1.31     pooka 	SPARG(&callarg, to) = to;
   1742    1.1     pooka 
   1743  1.120  pgoyette 	error = rsys_syscall(SYS_rename, &callarg, sizeof(callarg), retval);
   1744   1.63     pooka 	rsys_seterrno(error);
   1745   1.68     pooka 	if (error == 0) {
   1746   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1747   1.68     pooka 			rv = *(int *)retval;
   1748   1.68     pooka 		else
   1749   1.69     pooka 			rv = *retval;
   1750   1.27     pooka 	}
   1751   1.68     pooka 	return rv;
   1752    1.1     pooka }
   1753  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1754  1.103     pooka __weak_alias(rename,rump___sysimpl_rename);
   1755  1.103     pooka __weak_alias(_rename,rump___sysimpl_rename);
   1756  1.103     pooka __strong_alias(_sys_rename,rump___sysimpl_rename);
   1757  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1758    1.1     pooka 
   1759   1.60     pooka int rump___sysimpl_flock(int, int);
   1760   1.34     pooka int
   1761   1.60     pooka rump___sysimpl_flock(int fd, int how)
   1762   1.34     pooka {
   1763   1.93     pooka 	register_t retval[2];
   1764   1.34     pooka 	int error = 0;
   1765   1.68     pooka 	int rv = -1;
   1766   1.34     pooka 	struct sys_flock_args callarg;
   1767   1.34     pooka 
   1768   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1769   1.34     pooka 	SPARG(&callarg, fd) = fd;
   1770   1.34     pooka 	SPARG(&callarg, how) = how;
   1771   1.34     pooka 
   1772  1.120  pgoyette 	error = rsys_syscall(SYS_flock, &callarg, sizeof(callarg), retval);
   1773   1.63     pooka 	rsys_seterrno(error);
   1774   1.68     pooka 	if (error == 0) {
   1775   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1776   1.68     pooka 			rv = *(int *)retval;
   1777   1.68     pooka 		else
   1778   1.69     pooka 			rv = *retval;
   1779   1.34     pooka 	}
   1780   1.68     pooka 	return rv;
   1781   1.34     pooka }
   1782  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1783  1.103     pooka __weak_alias(flock,rump___sysimpl_flock);
   1784  1.103     pooka __weak_alias(_flock,rump___sysimpl_flock);
   1785  1.103     pooka __strong_alias(_sys_flock,rump___sysimpl_flock);
   1786  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1787   1.34     pooka 
   1788   1.60     pooka int rump___sysimpl_mkfifo(const char *, mode_t);
   1789    1.1     pooka int
   1790   1.60     pooka rump___sysimpl_mkfifo(const char * path, mode_t mode)
   1791   1.10     pooka {
   1792   1.93     pooka 	register_t retval[2];
   1793   1.27     pooka 	int error = 0;
   1794   1.68     pooka 	int rv = -1;
   1795   1.31     pooka 	struct sys_mkfifo_args callarg;
   1796   1.10     pooka 
   1797   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1798   1.31     pooka 	SPARG(&callarg, path) = path;
   1799   1.31     pooka 	SPARG(&callarg, mode) = mode;
   1800   1.10     pooka 
   1801  1.120  pgoyette 	error = rsys_syscall(SYS_mkfifo, &callarg, sizeof(callarg), retval);
   1802   1.63     pooka 	rsys_seterrno(error);
   1803   1.68     pooka 	if (error == 0) {
   1804   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1805   1.68     pooka 			rv = *(int *)retval;
   1806   1.68     pooka 		else
   1807   1.69     pooka 			rv = *retval;
   1808   1.27     pooka 	}
   1809   1.68     pooka 	return rv;
   1810   1.10     pooka }
   1811  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1812  1.103     pooka __weak_alias(mkfifo,rump___sysimpl_mkfifo);
   1813  1.103     pooka __weak_alias(_mkfifo,rump___sysimpl_mkfifo);
   1814  1.103     pooka __strong_alias(_sys_mkfifo,rump___sysimpl_mkfifo);
   1815  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1816   1.10     pooka 
   1817   1.72  christos ssize_t rump___sysimpl_sendto(int, const void *, size_t, int, const struct sockaddr *, socklen_t);
   1818   1.28     pooka ssize_t
   1819   1.72  christos rump___sysimpl_sendto(int s, const void * buf, size_t len, int flags, const struct sockaddr * to, socklen_t tolen)
   1820   1.28     pooka {
   1821   1.93     pooka 	register_t retval[2];
   1822   1.28     pooka 	int error = 0;
   1823   1.68     pooka 	ssize_t rv = -1;
   1824   1.31     pooka 	struct sys_sendto_args callarg;
   1825   1.28     pooka 
   1826   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1827   1.31     pooka 	SPARG(&callarg, s) = s;
   1828   1.31     pooka 	SPARG(&callarg, buf) = buf;
   1829   1.31     pooka 	SPARG(&callarg, len) = len;
   1830   1.31     pooka 	SPARG(&callarg, flags) = flags;
   1831   1.31     pooka 	SPARG(&callarg, to) = to;
   1832   1.31     pooka 	SPARG(&callarg, tolen) = tolen;
   1833   1.28     pooka 
   1834  1.120  pgoyette 	error = rsys_syscall(SYS_sendto, &callarg, sizeof(callarg), retval);
   1835   1.63     pooka 	rsys_seterrno(error);
   1836   1.68     pooka 	if (error == 0) {
   1837   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   1838   1.68     pooka 			rv = *(ssize_t *)retval;
   1839   1.68     pooka 		else
   1840   1.69     pooka 			rv = *retval;
   1841   1.28     pooka 	}
   1842   1.68     pooka 	return rv;
   1843   1.28     pooka }
   1844  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1845  1.103     pooka __weak_alias(sendto,rump___sysimpl_sendto);
   1846  1.103     pooka __weak_alias(_sendto,rump___sysimpl_sendto);
   1847  1.103     pooka __strong_alias(_sys_sendto,rump___sysimpl_sendto);
   1848  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1849   1.28     pooka 
   1850   1.60     pooka int rump___sysimpl_shutdown(int, int);
   1851   1.28     pooka int
   1852   1.60     pooka rump___sysimpl_shutdown(int s, int how)
   1853   1.28     pooka {
   1854   1.93     pooka 	register_t retval[2];
   1855   1.28     pooka 	int error = 0;
   1856   1.68     pooka 	int rv = -1;
   1857   1.31     pooka 	struct sys_shutdown_args callarg;
   1858   1.28     pooka 
   1859   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1860   1.31     pooka 	SPARG(&callarg, s) = s;
   1861   1.31     pooka 	SPARG(&callarg, how) = how;
   1862   1.28     pooka 
   1863  1.120  pgoyette 	error = rsys_syscall(SYS_shutdown, &callarg, sizeof(callarg), retval);
   1864   1.63     pooka 	rsys_seterrno(error);
   1865   1.68     pooka 	if (error == 0) {
   1866   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1867   1.68     pooka 			rv = *(int *)retval;
   1868   1.68     pooka 		else
   1869   1.69     pooka 			rv = *retval;
   1870   1.28     pooka 	}
   1871   1.68     pooka 	return rv;
   1872   1.28     pooka }
   1873  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1874  1.103     pooka __weak_alias(shutdown,rump___sysimpl_shutdown);
   1875  1.103     pooka __weak_alias(_shutdown,rump___sysimpl_shutdown);
   1876  1.103     pooka __strong_alias(_sys_shutdown,rump___sysimpl_shutdown);
   1877  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1878   1.28     pooka 
   1879   1.60     pooka int rump___sysimpl_socketpair(int, int, int, int *);
   1880   1.28     pooka int
   1881   1.60     pooka rump___sysimpl_socketpair(int domain, int type, int protocol, int * rsv)
   1882   1.28     pooka {
   1883   1.93     pooka 	register_t retval[2];
   1884   1.28     pooka 	int error = 0;
   1885   1.68     pooka 	int rv = -1;
   1886   1.31     pooka 	struct sys_socketpair_args callarg;
   1887   1.28     pooka 
   1888   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1889   1.31     pooka 	SPARG(&callarg, domain) = domain;
   1890   1.31     pooka 	SPARG(&callarg, type) = type;
   1891   1.31     pooka 	SPARG(&callarg, protocol) = protocol;
   1892   1.31     pooka 	SPARG(&callarg, rsv) = rsv;
   1893   1.28     pooka 
   1894  1.120  pgoyette 	error = rsys_syscall(SYS_socketpair, &callarg, sizeof(callarg), retval);
   1895   1.63     pooka 	rsys_seterrno(error);
   1896   1.68     pooka 	if (error == 0) {
   1897   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1898   1.68     pooka 			rv = *(int *)retval;
   1899   1.68     pooka 		else
   1900   1.69     pooka 			rv = *retval;
   1901   1.34     pooka 	}
   1902   1.68     pooka 	return rv;
   1903   1.34     pooka }
   1904  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1905  1.103     pooka __weak_alias(socketpair,rump___sysimpl_socketpair);
   1906  1.103     pooka __weak_alias(_socketpair,rump___sysimpl_socketpair);
   1907  1.103     pooka __strong_alias(_sys_socketpair,rump___sysimpl_socketpair);
   1908  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1909   1.34     pooka 
   1910   1.60     pooka int rump___sysimpl_mkdir(const char *, mode_t);
   1911   1.34     pooka int
   1912   1.60     pooka rump___sysimpl_mkdir(const char * path, mode_t mode)
   1913   1.34     pooka {
   1914   1.93     pooka 	register_t retval[2];
   1915   1.34     pooka 	int error = 0;
   1916   1.68     pooka 	int rv = -1;
   1917   1.34     pooka 	struct sys_mkdir_args callarg;
   1918   1.34     pooka 
   1919   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1920   1.34     pooka 	SPARG(&callarg, path) = path;
   1921   1.34     pooka 	SPARG(&callarg, mode) = mode;
   1922   1.34     pooka 
   1923  1.120  pgoyette 	error = rsys_syscall(SYS_mkdir, &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.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1934  1.103     pooka __weak_alias(mkdir,rump___sysimpl_mkdir);
   1935  1.103     pooka __weak_alias(_mkdir,rump___sysimpl_mkdir);
   1936  1.103     pooka __strong_alias(_sys_mkdir,rump___sysimpl_mkdir);
   1937  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1938   1.34     pooka 
   1939   1.60     pooka int rump___sysimpl_rmdir(const char *);
   1940   1.34     pooka int
   1941   1.60     pooka rump___sysimpl_rmdir(const char * path)
   1942   1.34     pooka {
   1943   1.93     pooka 	register_t retval[2];
   1944   1.34     pooka 	int error = 0;
   1945   1.68     pooka 	int rv = -1;
   1946   1.34     pooka 	struct sys_rmdir_args callarg;
   1947   1.34     pooka 
   1948   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1949   1.34     pooka 	SPARG(&callarg, path) = path;
   1950   1.34     pooka 
   1951  1.120  pgoyette 	error = rsys_syscall(SYS_rmdir, &callarg, sizeof(callarg), retval);
   1952   1.63     pooka 	rsys_seterrno(error);
   1953   1.68     pooka 	if (error == 0) {
   1954   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1955   1.68     pooka 			rv = *(int *)retval;
   1956   1.68     pooka 		else
   1957   1.69     pooka 			rv = *retval;
   1958   1.34     pooka 	}
   1959   1.68     pooka 	return rv;
   1960   1.34     pooka }
   1961  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1962  1.103     pooka __weak_alias(rmdir,rump___sysimpl_rmdir);
   1963  1.103     pooka __weak_alias(_rmdir,rump___sysimpl_rmdir);
   1964  1.103     pooka __strong_alias(_sys_rmdir,rump___sysimpl_rmdir);
   1965  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1966   1.34     pooka 
   1967  1.103     pooka #ifdef RUMP_SYS_COMPAT
   1968   1.60     pooka int rump___sysimpl_utimes(const char *, const struct timeval *);
   1969   1.60     pooka int
   1970   1.60     pooka rump___sysimpl_utimes(const char * path, const struct timeval * tptr)
   1971   1.60     pooka {
   1972   1.93     pooka 	register_t retval[2];
   1973   1.60     pooka 	int error = 0;
   1974   1.68     pooka 	int rv = -1;
   1975   1.60     pooka 	struct compat_50_sys_utimes_args callarg;
   1976   1.60     pooka 
   1977   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   1978   1.60     pooka 	SPARG(&callarg, path) = path;
   1979   1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   1980   1.60     pooka 
   1981  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_utimes, &callarg, sizeof(callarg), retval);
   1982   1.63     pooka 	rsys_seterrno(error);
   1983   1.68     pooka 	if (error == 0) {
   1984   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   1985   1.68     pooka 			rv = *(int *)retval;
   1986   1.68     pooka 		else
   1987   1.69     pooka 			rv = *retval;
   1988   1.60     pooka 	}
   1989   1.68     pooka 	return rv;
   1990   1.60     pooka }
   1991  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   1992  1.103     pooka __weak_alias(utimes,rump___sysimpl_utimes);
   1993  1.103     pooka __weak_alias(_utimes,rump___sysimpl_utimes);
   1994  1.103     pooka __strong_alias(_sys_utimes,rump___sysimpl_utimes);
   1995  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   1996  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   1997   1.60     pooka 
   1998   1.60     pooka int rump___sysimpl_setsid(void);
   1999   1.49     pooka int
   2000   1.60     pooka rump___sysimpl_setsid(void )
   2001   1.49     pooka {
   2002   1.93     pooka 	register_t retval[2];
   2003   1.49     pooka 	int error = 0;
   2004   1.68     pooka 	int rv = -1;
   2005   1.49     pooka 
   2006  1.120  pgoyette 	error = rsys_syscall(SYS_setsid, NULL, 0, retval);
   2007   1.63     pooka 	rsys_seterrno(error);
   2008   1.68     pooka 	if (error == 0) {
   2009   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2010   1.68     pooka 			rv = *(int *)retval;
   2011   1.68     pooka 		else
   2012   1.69     pooka 			rv = *retval;
   2013   1.49     pooka 	}
   2014   1.68     pooka 	return rv;
   2015   1.49     pooka }
   2016  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2017  1.103     pooka __weak_alias(setsid,rump___sysimpl_setsid);
   2018  1.103     pooka __weak_alias(_setsid,rump___sysimpl_setsid);
   2019  1.103     pooka __strong_alias(_sys_setsid,rump___sysimpl_setsid);
   2020  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2021   1.49     pooka 
   2022   1.60     pooka int rump___sysimpl_nfssvc(int, void *);
   2023   1.34     pooka int
   2024   1.60     pooka rump___sysimpl_nfssvc(int flag, void * argp)
   2025   1.34     pooka {
   2026   1.93     pooka 	register_t retval[2];
   2027   1.34     pooka 	int error = 0;
   2028   1.68     pooka 	int rv = -1;
   2029   1.34     pooka 	struct sys_nfssvc_args callarg;
   2030   1.34     pooka 
   2031   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2032   1.34     pooka 	SPARG(&callarg, flag) = flag;
   2033   1.34     pooka 	SPARG(&callarg, argp) = argp;
   2034   1.34     pooka 
   2035  1.120  pgoyette 	error = rsys_syscall(SYS_nfssvc, &callarg, sizeof(callarg), retval);
   2036   1.63     pooka 	rsys_seterrno(error);
   2037   1.68     pooka 	if (error == 0) {
   2038   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2039   1.68     pooka 			rv = *(int *)retval;
   2040   1.68     pooka 		else
   2041   1.69     pooka 			rv = *retval;
   2042   1.34     pooka 	}
   2043   1.68     pooka 	return rv;
   2044   1.34     pooka }
   2045  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2046  1.103     pooka __weak_alias(nfssvc,rump___sysimpl_nfssvc);
   2047  1.103     pooka __weak_alias(_nfssvc,rump___sysimpl_nfssvc);
   2048  1.103     pooka __strong_alias(_sys_nfssvc,rump___sysimpl_nfssvc);
   2049  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2050   1.34     pooka 
   2051   1.60     pooka ssize_t rump___sysimpl_pread(int, void *, size_t, off_t);
   2052   1.34     pooka ssize_t
   2053   1.60     pooka rump___sysimpl_pread(int fd, void * buf, size_t nbyte, off_t offset)
   2054   1.34     pooka {
   2055   1.93     pooka 	register_t retval[2];
   2056   1.34     pooka 	int error = 0;
   2057   1.68     pooka 	ssize_t rv = -1;
   2058   1.34     pooka 	struct sys_pread_args callarg;
   2059   1.34     pooka 
   2060   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2061   1.34     pooka 	SPARG(&callarg, fd) = fd;
   2062   1.34     pooka 	SPARG(&callarg, buf) = buf;
   2063   1.34     pooka 	SPARG(&callarg, nbyte) = nbyte;
   2064   1.35     pooka 	SPARG(&callarg, PAD) = 0;
   2065   1.34     pooka 	SPARG(&callarg, offset) = offset;
   2066   1.34     pooka 
   2067  1.120  pgoyette 	error = rsys_syscall(SYS_pread, &callarg, sizeof(callarg), retval);
   2068   1.63     pooka 	rsys_seterrno(error);
   2069   1.68     pooka 	if (error == 0) {
   2070   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2071   1.68     pooka 			rv = *(ssize_t *)retval;
   2072   1.68     pooka 		else
   2073   1.69     pooka 			rv = *retval;
   2074   1.34     pooka 	}
   2075   1.68     pooka 	return rv;
   2076   1.34     pooka }
   2077  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2078  1.103     pooka __weak_alias(pread,rump___sysimpl_pread);
   2079  1.103     pooka __weak_alias(_pread,rump___sysimpl_pread);
   2080  1.103     pooka __strong_alias(_sys_pread,rump___sysimpl_pread);
   2081  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2082   1.34     pooka 
   2083   1.60     pooka ssize_t rump___sysimpl_pwrite(int, const void *, size_t, off_t);
   2084   1.34     pooka ssize_t
   2085   1.60     pooka rump___sysimpl_pwrite(int fd, const void * buf, size_t nbyte, off_t offset)
   2086   1.34     pooka {
   2087   1.93     pooka 	register_t retval[2];
   2088   1.34     pooka 	int error = 0;
   2089   1.68     pooka 	ssize_t rv = -1;
   2090   1.34     pooka 	struct sys_pwrite_args callarg;
   2091   1.34     pooka 
   2092   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2093   1.34     pooka 	SPARG(&callarg, fd) = fd;
   2094   1.34     pooka 	SPARG(&callarg, buf) = buf;
   2095   1.34     pooka 	SPARG(&callarg, nbyte) = nbyte;
   2096   1.35     pooka 	SPARG(&callarg, PAD) = 0;
   2097   1.34     pooka 	SPARG(&callarg, offset) = offset;
   2098   1.34     pooka 
   2099  1.120  pgoyette 	error = rsys_syscall(SYS_pwrite, &callarg, sizeof(callarg), retval);
   2100   1.63     pooka 	rsys_seterrno(error);
   2101   1.68     pooka 	if (error == 0) {
   2102   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   2103   1.68     pooka 			rv = *(ssize_t *)retval;
   2104   1.68     pooka 		else
   2105   1.69     pooka 			rv = *retval;
   2106   1.34     pooka 	}
   2107   1.68     pooka 	return rv;
   2108   1.34     pooka }
   2109  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2110  1.103     pooka __weak_alias(pwrite,rump___sysimpl_pwrite);
   2111  1.103     pooka __weak_alias(_pwrite,rump___sysimpl_pwrite);
   2112  1.103     pooka __strong_alias(_sys_pwrite,rump___sysimpl_pwrite);
   2113  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2114   1.34     pooka 
   2115   1.60     pooka int rump___sysimpl_setgid(gid_t);
   2116   1.49     pooka int
   2117   1.60     pooka rump___sysimpl_setgid(gid_t gid)
   2118   1.49     pooka {
   2119   1.93     pooka 	register_t retval[2];
   2120   1.49     pooka 	int error = 0;
   2121   1.68     pooka 	int rv = -1;
   2122   1.49     pooka 	struct sys_setgid_args callarg;
   2123   1.49     pooka 
   2124   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2125   1.49     pooka 	SPARG(&callarg, gid) = gid;
   2126   1.49     pooka 
   2127  1.120  pgoyette 	error = rsys_syscall(SYS_setgid, &callarg, sizeof(callarg), retval);
   2128   1.63     pooka 	rsys_seterrno(error);
   2129   1.68     pooka 	if (error == 0) {
   2130   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2131   1.68     pooka 			rv = *(int *)retval;
   2132   1.68     pooka 		else
   2133   1.69     pooka 			rv = *retval;
   2134   1.49     pooka 	}
   2135   1.68     pooka 	return rv;
   2136   1.49     pooka }
   2137  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2138  1.103     pooka __weak_alias(setgid,rump___sysimpl_setgid);
   2139  1.103     pooka __weak_alias(_setgid,rump___sysimpl_setgid);
   2140  1.103     pooka __strong_alias(_sys_setgid,rump___sysimpl_setgid);
   2141  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2142   1.49     pooka 
   2143   1.60     pooka int rump___sysimpl_setegid(gid_t);
   2144   1.49     pooka int
   2145   1.60     pooka rump___sysimpl_setegid(gid_t egid)
   2146   1.49     pooka {
   2147   1.93     pooka 	register_t retval[2];
   2148   1.49     pooka 	int error = 0;
   2149   1.68     pooka 	int rv = -1;
   2150   1.49     pooka 	struct sys_setegid_args callarg;
   2151   1.49     pooka 
   2152   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2153   1.49     pooka 	SPARG(&callarg, egid) = egid;
   2154   1.49     pooka 
   2155  1.120  pgoyette 	error = rsys_syscall(SYS_setegid, &callarg, sizeof(callarg), retval);
   2156   1.63     pooka 	rsys_seterrno(error);
   2157   1.68     pooka 	if (error == 0) {
   2158   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2159   1.68     pooka 			rv = *(int *)retval;
   2160   1.68     pooka 		else
   2161   1.69     pooka 			rv = *retval;
   2162   1.49     pooka 	}
   2163   1.68     pooka 	return rv;
   2164   1.49     pooka }
   2165  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2166  1.103     pooka __weak_alias(setegid,rump___sysimpl_setegid);
   2167  1.103     pooka __weak_alias(_setegid,rump___sysimpl_setegid);
   2168  1.103     pooka __strong_alias(_sys_setegid,rump___sysimpl_setegid);
   2169  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2170   1.49     pooka 
   2171   1.60     pooka int rump___sysimpl_seteuid(uid_t);
   2172   1.49     pooka int
   2173   1.60     pooka rump___sysimpl_seteuid(uid_t euid)
   2174   1.49     pooka {
   2175   1.93     pooka 	register_t retval[2];
   2176   1.49     pooka 	int error = 0;
   2177   1.68     pooka 	int rv = -1;
   2178   1.49     pooka 	struct sys_seteuid_args callarg;
   2179   1.49     pooka 
   2180   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2181   1.49     pooka 	SPARG(&callarg, euid) = euid;
   2182   1.49     pooka 
   2183  1.120  pgoyette 	error = rsys_syscall(SYS_seteuid, &callarg, sizeof(callarg), retval);
   2184   1.63     pooka 	rsys_seterrno(error);
   2185   1.68     pooka 	if (error == 0) {
   2186   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2187   1.68     pooka 			rv = *(int *)retval;
   2188   1.68     pooka 		else
   2189   1.69     pooka 			rv = *retval;
   2190   1.49     pooka 	}
   2191   1.68     pooka 	return rv;
   2192   1.49     pooka }
   2193  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2194  1.103     pooka __weak_alias(seteuid,rump___sysimpl_seteuid);
   2195  1.103     pooka __weak_alias(_seteuid,rump___sysimpl_seteuid);
   2196  1.103     pooka __strong_alias(_sys_seteuid,rump___sysimpl_seteuid);
   2197  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2198   1.49     pooka 
   2199   1.60     pooka long rump___sysimpl_pathconf(const char *, int);
   2200   1.45     njoly long
   2201   1.60     pooka rump___sysimpl_pathconf(const char * path, int name)
   2202   1.45     njoly {
   2203   1.93     pooka 	register_t retval[2];
   2204   1.45     njoly 	int error = 0;
   2205   1.68     pooka 	long rv = -1;
   2206   1.45     njoly 	struct sys_pathconf_args callarg;
   2207   1.45     njoly 
   2208   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2209   1.45     njoly 	SPARG(&callarg, path) = path;
   2210   1.45     njoly 	SPARG(&callarg, name) = name;
   2211   1.45     njoly 
   2212  1.120  pgoyette 	error = rsys_syscall(SYS_pathconf, &callarg, sizeof(callarg), retval);
   2213   1.63     pooka 	rsys_seterrno(error);
   2214   1.68     pooka 	if (error == 0) {
   2215   1.68     pooka 		if (sizeof(long) > sizeof(register_t))
   2216   1.68     pooka 			rv = *(long *)retval;
   2217   1.68     pooka 		else
   2218   1.69     pooka 			rv = *retval;
   2219   1.45     njoly 	}
   2220   1.68     pooka 	return rv;
   2221   1.45     njoly }
   2222  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2223  1.103     pooka __weak_alias(pathconf,rump___sysimpl_pathconf);
   2224  1.103     pooka __weak_alias(_pathconf,rump___sysimpl_pathconf);
   2225  1.103     pooka __strong_alias(_sys_pathconf,rump___sysimpl_pathconf);
   2226  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2227   1.45     njoly 
   2228   1.60     pooka long rump___sysimpl_fpathconf(int, int);
   2229   1.45     njoly long
   2230   1.60     pooka rump___sysimpl_fpathconf(int fd, int name)
   2231   1.45     njoly {
   2232   1.93     pooka 	register_t retval[2];
   2233   1.45     njoly 	int error = 0;
   2234   1.68     pooka 	long rv = -1;
   2235   1.45     njoly 	struct sys_fpathconf_args callarg;
   2236   1.45     njoly 
   2237   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2238   1.45     njoly 	SPARG(&callarg, fd) = fd;
   2239   1.45     njoly 	SPARG(&callarg, name) = name;
   2240   1.45     njoly 
   2241  1.120  pgoyette 	error = rsys_syscall(SYS_fpathconf, &callarg, sizeof(callarg), retval);
   2242   1.63     pooka 	rsys_seterrno(error);
   2243   1.68     pooka 	if (error == 0) {
   2244   1.68     pooka 		if (sizeof(long) > sizeof(register_t))
   2245   1.68     pooka 			rv = *(long *)retval;
   2246   1.68     pooka 		else
   2247   1.69     pooka 			rv = *retval;
   2248   1.45     njoly 	}
   2249   1.68     pooka 	return rv;
   2250   1.45     njoly }
   2251  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2252  1.103     pooka __weak_alias(fpathconf,rump___sysimpl_fpathconf);
   2253  1.103     pooka __weak_alias(_fpathconf,rump___sysimpl_fpathconf);
   2254  1.103     pooka __strong_alias(_sys_fpathconf,rump___sysimpl_fpathconf);
   2255  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2256   1.45     njoly 
   2257  1.139       rjs int rump___sysimpl_getsockopt2(int, int, int, void *, socklen_t *);
   2258  1.139       rjs int
   2259  1.139       rjs rump___sysimpl_getsockopt2(int s, int level, int name, void * val, socklen_t * avalsize)
   2260  1.139       rjs {
   2261  1.139       rjs 	register_t retval[2];
   2262  1.139       rjs 	int error = 0;
   2263  1.139       rjs 	int rv = -1;
   2264  1.139       rjs 	struct sys_getsockopt2_args callarg;
   2265  1.139       rjs 
   2266  1.139       rjs 	memset(&callarg, 0, sizeof(callarg));
   2267  1.139       rjs 	SPARG(&callarg, s) = s;
   2268  1.139       rjs 	SPARG(&callarg, level) = level;
   2269  1.139       rjs 	SPARG(&callarg, name) = name;
   2270  1.139       rjs 	SPARG(&callarg, val) = val;
   2271  1.139       rjs 	SPARG(&callarg, avalsize) = avalsize;
   2272  1.139       rjs 
   2273  1.139       rjs 	error = rsys_syscall(SYS_getsockopt2, &callarg, sizeof(callarg), retval);
   2274  1.139       rjs 	rsys_seterrno(error);
   2275  1.139       rjs 	if (error == 0) {
   2276  1.139       rjs 		if (sizeof(int) > sizeof(register_t))
   2277  1.139       rjs 			rv = *(int *)retval;
   2278  1.139       rjs 		else
   2279  1.139       rjs 			rv = *retval;
   2280  1.139       rjs 	}
   2281  1.139       rjs 	return rv;
   2282  1.139       rjs }
   2283  1.139       rjs #ifdef RUMP_KERNEL_IS_LIBC
   2284  1.139       rjs __weak_alias(getsockopt2,rump___sysimpl_getsockopt2);
   2285  1.139       rjs __weak_alias(_getsockopt2,rump___sysimpl_getsockopt2);
   2286  1.139       rjs __strong_alias(_sys_getsockopt2,rump___sysimpl_getsockopt2);
   2287  1.139       rjs #endif /* RUMP_KERNEL_IS_LIBC */
   2288  1.139       rjs 
   2289   1.60     pooka int rump___sysimpl_getrlimit(int, struct rlimit *);
   2290   1.42     pooka int
   2291   1.60     pooka rump___sysimpl_getrlimit(int which, struct rlimit * rlp)
   2292   1.42     pooka {
   2293   1.93     pooka 	register_t retval[2];
   2294   1.42     pooka 	int error = 0;
   2295   1.68     pooka 	int rv = -1;
   2296   1.42     pooka 	struct sys_getrlimit_args callarg;
   2297   1.42     pooka 
   2298   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2299   1.42     pooka 	SPARG(&callarg, which) = which;
   2300   1.42     pooka 	SPARG(&callarg, rlp) = rlp;
   2301   1.42     pooka 
   2302  1.120  pgoyette 	error = rsys_syscall(SYS_getrlimit, &callarg, sizeof(callarg), retval);
   2303   1.63     pooka 	rsys_seterrno(error);
   2304   1.68     pooka 	if (error == 0) {
   2305   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2306   1.68     pooka 			rv = *(int *)retval;
   2307   1.68     pooka 		else
   2308   1.69     pooka 			rv = *retval;
   2309   1.42     pooka 	}
   2310   1.68     pooka 	return rv;
   2311   1.42     pooka }
   2312  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2313  1.103     pooka __weak_alias(getrlimit,rump___sysimpl_getrlimit);
   2314  1.103     pooka __weak_alias(_getrlimit,rump___sysimpl_getrlimit);
   2315  1.103     pooka __strong_alias(_sys_getrlimit,rump___sysimpl_getrlimit);
   2316  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2317   1.42     pooka 
   2318   1.60     pooka int rump___sysimpl_setrlimit(int, const struct rlimit *);
   2319   1.42     pooka int
   2320   1.60     pooka rump___sysimpl_setrlimit(int which, const struct rlimit * rlp)
   2321   1.42     pooka {
   2322   1.93     pooka 	register_t retval[2];
   2323   1.42     pooka 	int error = 0;
   2324   1.68     pooka 	int rv = -1;
   2325   1.42     pooka 	struct sys_setrlimit_args callarg;
   2326   1.42     pooka 
   2327   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2328   1.42     pooka 	SPARG(&callarg, which) = which;
   2329   1.42     pooka 	SPARG(&callarg, rlp) = rlp;
   2330   1.42     pooka 
   2331  1.120  pgoyette 	error = rsys_syscall(SYS_setrlimit, &callarg, sizeof(callarg), retval);
   2332   1.63     pooka 	rsys_seterrno(error);
   2333   1.68     pooka 	if (error == 0) {
   2334   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2335   1.68     pooka 			rv = *(int *)retval;
   2336   1.68     pooka 		else
   2337   1.69     pooka 			rv = *retval;
   2338   1.42     pooka 	}
   2339   1.68     pooka 	return rv;
   2340   1.42     pooka }
   2341  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2342  1.103     pooka __weak_alias(setrlimit,rump___sysimpl_setrlimit);
   2343  1.103     pooka __weak_alias(_setrlimit,rump___sysimpl_setrlimit);
   2344  1.103     pooka __strong_alias(_sys_setrlimit,rump___sysimpl_setrlimit);
   2345  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2346   1.42     pooka 
   2347   1.60     pooka off_t rump___sysimpl_lseek(int, off_t, int);
   2348   1.34     pooka off_t
   2349   1.60     pooka rump___sysimpl_lseek(int fd, off_t offset, int whence)
   2350   1.34     pooka {
   2351   1.93     pooka 	register_t retval[2];
   2352   1.34     pooka 	int error = 0;
   2353   1.68     pooka 	off_t rv = -1;
   2354   1.34     pooka 	struct sys_lseek_args callarg;
   2355   1.34     pooka 
   2356   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2357   1.34     pooka 	SPARG(&callarg, fd) = fd;
   2358   1.35     pooka 	SPARG(&callarg, PAD) = 0;
   2359   1.34     pooka 	SPARG(&callarg, offset) = offset;
   2360   1.34     pooka 	SPARG(&callarg, whence) = whence;
   2361   1.34     pooka 
   2362  1.120  pgoyette 	error = rsys_syscall(SYS_lseek, &callarg, sizeof(callarg), retval);
   2363   1.63     pooka 	rsys_seterrno(error);
   2364   1.68     pooka 	if (error == 0) {
   2365   1.68     pooka 		if (sizeof(off_t) > sizeof(register_t))
   2366   1.68     pooka 			rv = *(off_t *)retval;
   2367   1.68     pooka 		else
   2368   1.69     pooka 			rv = *retval;
   2369   1.34     pooka 	}
   2370   1.68     pooka 	return rv;
   2371   1.34     pooka }
   2372  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2373  1.103     pooka __weak_alias(lseek,rump___sysimpl_lseek);
   2374  1.103     pooka __weak_alias(_lseek,rump___sysimpl_lseek);
   2375  1.103     pooka __strong_alias(_sys_lseek,rump___sysimpl_lseek);
   2376  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2377   1.34     pooka 
   2378   1.60     pooka int rump___sysimpl_truncate(const char *, off_t);
   2379   1.34     pooka int
   2380   1.60     pooka rump___sysimpl_truncate(const char * path, off_t length)
   2381   1.34     pooka {
   2382   1.93     pooka 	register_t retval[2];
   2383   1.34     pooka 	int error = 0;
   2384   1.68     pooka 	int rv = -1;
   2385   1.34     pooka 	struct sys_truncate_args callarg;
   2386   1.34     pooka 
   2387   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2388   1.34     pooka 	SPARG(&callarg, path) = path;
   2389   1.35     pooka 	SPARG(&callarg, PAD) = 0;
   2390   1.34     pooka 	SPARG(&callarg, length) = length;
   2391   1.34     pooka 
   2392  1.120  pgoyette 	error = rsys_syscall(SYS_truncate, &callarg, sizeof(callarg), retval);
   2393   1.63     pooka 	rsys_seterrno(error);
   2394   1.68     pooka 	if (error == 0) {
   2395   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2396   1.68     pooka 			rv = *(int *)retval;
   2397   1.68     pooka 		else
   2398   1.69     pooka 			rv = *retval;
   2399   1.34     pooka 	}
   2400   1.68     pooka 	return rv;
   2401   1.34     pooka }
   2402  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2403  1.103     pooka __weak_alias(truncate,rump___sysimpl_truncate);
   2404  1.103     pooka __weak_alias(_truncate,rump___sysimpl_truncate);
   2405  1.103     pooka __strong_alias(_sys_truncate,rump___sysimpl_truncate);
   2406  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2407   1.34     pooka 
   2408   1.60     pooka int rump___sysimpl_ftruncate(int, off_t);
   2409   1.34     pooka int
   2410   1.60     pooka rump___sysimpl_ftruncate(int fd, off_t length)
   2411   1.34     pooka {
   2412   1.93     pooka 	register_t retval[2];
   2413   1.34     pooka 	int error = 0;
   2414   1.68     pooka 	int rv = -1;
   2415   1.34     pooka 	struct sys_ftruncate_args callarg;
   2416   1.34     pooka 
   2417   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2418   1.34     pooka 	SPARG(&callarg, fd) = fd;
   2419   1.35     pooka 	SPARG(&callarg, PAD) = 0;
   2420   1.34     pooka 	SPARG(&callarg, length) = length;
   2421   1.34     pooka 
   2422  1.120  pgoyette 	error = rsys_syscall(SYS_ftruncate, &callarg, sizeof(callarg), retval);
   2423   1.63     pooka 	rsys_seterrno(error);
   2424   1.68     pooka 	if (error == 0) {
   2425   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2426   1.68     pooka 			rv = *(int *)retval;
   2427   1.68     pooka 		else
   2428   1.69     pooka 			rv = *retval;
   2429   1.34     pooka 	}
   2430   1.68     pooka 	return rv;
   2431   1.34     pooka }
   2432  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2433  1.103     pooka __weak_alias(ftruncate,rump___sysimpl_ftruncate);
   2434  1.103     pooka __weak_alias(_ftruncate,rump___sysimpl_ftruncate);
   2435  1.103     pooka __strong_alias(_sys_ftruncate,rump___sysimpl_ftruncate);
   2436  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2437   1.34     pooka 
   2438   1.60     pooka int rump___sysimpl___sysctl(const int *, u_int, void *, size_t *, const void *, size_t);
   2439   1.34     pooka int
   2440  1.101     joerg rump___sysimpl___sysctl(const int * name, u_int namelen, void * oldv, size_t * oldlenp, const void * newv, size_t newlen)
   2441   1.34     pooka {
   2442   1.93     pooka 	register_t retval[2];
   2443   1.34     pooka 	int error = 0;
   2444   1.68     pooka 	int rv = -1;
   2445   1.34     pooka 	struct sys___sysctl_args callarg;
   2446   1.34     pooka 
   2447   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2448   1.34     pooka 	SPARG(&callarg, name) = name;
   2449   1.34     pooka 	SPARG(&callarg, namelen) = namelen;
   2450  1.101     joerg 	SPARG(&callarg, oldv) = oldv;
   2451   1.34     pooka 	SPARG(&callarg, oldlenp) = oldlenp;
   2452  1.101     joerg 	SPARG(&callarg, newv) = newv;
   2453   1.34     pooka 	SPARG(&callarg, newlen) = newlen;
   2454   1.34     pooka 
   2455  1.120  pgoyette 	error = rsys_syscall(SYS___sysctl, &callarg, sizeof(callarg), retval);
   2456   1.63     pooka 	rsys_seterrno(error);
   2457   1.68     pooka 	if (error == 0) {
   2458   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2459   1.68     pooka 			rv = *(int *)retval;
   2460   1.68     pooka 		else
   2461   1.69     pooka 			rv = *retval;
   2462   1.34     pooka 	}
   2463   1.68     pooka 	return rv;
   2464   1.34     pooka }
   2465  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2466  1.103     pooka __weak_alias(__sysctl,rump___sysimpl___sysctl);
   2467  1.103     pooka __weak_alias(___sysctl,rump___sysimpl___sysctl);
   2468  1.103     pooka __strong_alias(_sys___sysctl,rump___sysimpl___sysctl);
   2469  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2470   1.34     pooka 
   2471  1.103     pooka #ifdef RUMP_SYS_COMPAT
   2472   1.60     pooka int rump___sysimpl_futimes(int, const struct timeval *);
   2473   1.60     pooka int
   2474   1.60     pooka rump___sysimpl_futimes(int fd, const struct timeval * tptr)
   2475   1.60     pooka {
   2476   1.93     pooka 	register_t retval[2];
   2477   1.60     pooka 	int error = 0;
   2478   1.68     pooka 	int rv = -1;
   2479   1.60     pooka 	struct compat_50_sys_futimes_args callarg;
   2480   1.60     pooka 
   2481   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2482   1.60     pooka 	SPARG(&callarg, fd) = fd;
   2483   1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   2484   1.60     pooka 
   2485  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_futimes, &callarg, sizeof(callarg), retval);
   2486   1.63     pooka 	rsys_seterrno(error);
   2487   1.68     pooka 	if (error == 0) {
   2488   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2489   1.68     pooka 			rv = *(int *)retval;
   2490   1.68     pooka 		else
   2491   1.69     pooka 			rv = *retval;
   2492   1.60     pooka 	}
   2493   1.68     pooka 	return rv;
   2494   1.60     pooka }
   2495  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2496  1.103     pooka __weak_alias(futimes,rump___sysimpl_futimes);
   2497  1.103     pooka __weak_alias(_futimes,rump___sysimpl_futimes);
   2498  1.103     pooka __strong_alias(_sys_futimes,rump___sysimpl_futimes);
   2499  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2500  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   2501   1.60     pooka 
   2502   1.60     pooka pid_t rump___sysimpl_getpgid(pid_t);
   2503   1.49     pooka pid_t
   2504   1.60     pooka rump___sysimpl_getpgid(pid_t pid)
   2505   1.49     pooka {
   2506   1.93     pooka 	register_t retval[2];
   2507   1.49     pooka 	int error = 0;
   2508   1.68     pooka 	pid_t rv = -1;
   2509   1.49     pooka 	struct sys_getpgid_args callarg;
   2510   1.49     pooka 
   2511   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2512   1.49     pooka 	SPARG(&callarg, pid) = pid;
   2513   1.49     pooka 
   2514  1.120  pgoyette 	error = rsys_syscall(SYS_getpgid, &callarg, sizeof(callarg), retval);
   2515   1.63     pooka 	rsys_seterrno(error);
   2516   1.68     pooka 	if (error == 0) {
   2517   1.68     pooka 		if (sizeof(pid_t) > sizeof(register_t))
   2518   1.68     pooka 			rv = *(pid_t *)retval;
   2519   1.68     pooka 		else
   2520   1.69     pooka 			rv = *retval;
   2521   1.49     pooka 	}
   2522   1.68     pooka 	return rv;
   2523   1.49     pooka }
   2524  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2525  1.103     pooka __weak_alias(getpgid,rump___sysimpl_getpgid);
   2526  1.103     pooka __weak_alias(_getpgid,rump___sysimpl_getpgid);
   2527  1.103     pooka __strong_alias(_sys_getpgid,rump___sysimpl_getpgid);
   2528  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2529   1.49     pooka 
   2530   1.60     pooka int rump___sysimpl_reboot(int, char *);
   2531   1.34     pooka int
   2532   1.60     pooka rump___sysimpl_reboot(int opt, char * bootstr)
   2533   1.34     pooka {
   2534   1.93     pooka 	register_t retval[2];
   2535   1.34     pooka 	int error = 0;
   2536   1.68     pooka 	int rv = -1;
   2537   1.34     pooka 	struct sys_reboot_args callarg;
   2538   1.34     pooka 
   2539   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2540   1.34     pooka 	SPARG(&callarg, opt) = opt;
   2541   1.34     pooka 	SPARG(&callarg, bootstr) = bootstr;
   2542   1.34     pooka 
   2543  1.120  pgoyette 	error = rsys_syscall(SYS_reboot, &callarg, sizeof(callarg), retval);
   2544   1.63     pooka 	rsys_seterrno(error);
   2545   1.68     pooka 	if (error == 0) {
   2546   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2547   1.68     pooka 			rv = *(int *)retval;
   2548   1.68     pooka 		else
   2549   1.69     pooka 			rv = *retval;
   2550   1.34     pooka 	}
   2551   1.68     pooka 	return rv;
   2552   1.34     pooka }
   2553  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2554  1.103     pooka __weak_alias(reboot,rump___sysimpl_reboot);
   2555  1.103     pooka __weak_alias(_reboot,rump___sysimpl_reboot);
   2556  1.103     pooka __strong_alias(_sys_reboot,rump___sysimpl_reboot);
   2557  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2558   1.34     pooka 
   2559   1.60     pooka int rump___sysimpl_poll(struct pollfd *, u_int, int);
   2560   1.34     pooka int
   2561   1.60     pooka rump___sysimpl_poll(struct pollfd * fds, u_int nfds, int timeout)
   2562   1.34     pooka {
   2563   1.93     pooka 	register_t retval[2];
   2564   1.34     pooka 	int error = 0;
   2565   1.68     pooka 	int rv = -1;
   2566   1.34     pooka 	struct sys_poll_args callarg;
   2567   1.34     pooka 
   2568   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2569   1.34     pooka 	SPARG(&callarg, fds) = fds;
   2570   1.34     pooka 	SPARG(&callarg, nfds) = nfds;
   2571   1.34     pooka 	SPARG(&callarg, timeout) = timeout;
   2572   1.34     pooka 
   2573  1.120  pgoyette 	error = rsys_syscall(SYS_poll, &callarg, sizeof(callarg), retval);
   2574   1.63     pooka 	rsys_seterrno(error);
   2575   1.68     pooka 	if (error == 0) {
   2576   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2577   1.68     pooka 			rv = *(int *)retval;
   2578   1.68     pooka 		else
   2579   1.69     pooka 			rv = *retval;
   2580   1.34     pooka 	}
   2581   1.68     pooka 	return rv;
   2582   1.34     pooka }
   2583  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2584  1.103     pooka __weak_alias(poll,rump___sysimpl_poll);
   2585  1.103     pooka __weak_alias(_poll,rump___sysimpl_poll);
   2586  1.103     pooka __strong_alias(_sys_poll,rump___sysimpl_poll);
   2587  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2588   1.34     pooka 
   2589   1.98     pooka int rump___sysimpl_timer_create(clockid_t, struct sigevent *, timer_t *);
   2590   1.98     pooka int
   2591   1.98     pooka rump___sysimpl_timer_create(clockid_t clock_id, struct sigevent * evp, timer_t * timerid)
   2592   1.98     pooka {
   2593   1.98     pooka 	register_t retval[2];
   2594   1.98     pooka 	int error = 0;
   2595   1.98     pooka 	int rv = -1;
   2596   1.98     pooka 	struct sys_timer_create_args callarg;
   2597   1.98     pooka 
   2598   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   2599   1.98     pooka 	SPARG(&callarg, clock_id) = clock_id;
   2600   1.98     pooka 	SPARG(&callarg, evp) = evp;
   2601   1.98     pooka 	SPARG(&callarg, timerid) = timerid;
   2602   1.98     pooka 
   2603  1.120  pgoyette 	error = rsys_syscall(SYS_timer_create, &callarg, sizeof(callarg), retval);
   2604   1.98     pooka 	rsys_seterrno(error);
   2605   1.98     pooka 	if (error == 0) {
   2606   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   2607   1.98     pooka 			rv = *(int *)retval;
   2608   1.98     pooka 		else
   2609   1.98     pooka 			rv = *retval;
   2610   1.98     pooka 	}
   2611   1.98     pooka 	return rv;
   2612   1.98     pooka }
   2613  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2614  1.103     pooka __weak_alias(timer_create,rump___sysimpl_timer_create);
   2615  1.103     pooka __weak_alias(_timer_create,rump___sysimpl_timer_create);
   2616  1.103     pooka __strong_alias(_sys_timer_create,rump___sysimpl_timer_create);
   2617  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2618   1.98     pooka 
   2619   1.98     pooka int rump___sysimpl_timer_delete(timer_t);
   2620   1.98     pooka int
   2621   1.98     pooka rump___sysimpl_timer_delete(timer_t timerid)
   2622   1.98     pooka {
   2623   1.98     pooka 	register_t retval[2];
   2624   1.98     pooka 	int error = 0;
   2625   1.98     pooka 	int rv = -1;
   2626   1.98     pooka 	struct sys_timer_delete_args callarg;
   2627   1.98     pooka 
   2628   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   2629   1.98     pooka 	SPARG(&callarg, timerid) = timerid;
   2630   1.98     pooka 
   2631  1.120  pgoyette 	error = rsys_syscall(SYS_timer_delete, &callarg, sizeof(callarg), retval);
   2632   1.98     pooka 	rsys_seterrno(error);
   2633   1.98     pooka 	if (error == 0) {
   2634   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   2635   1.98     pooka 			rv = *(int *)retval;
   2636   1.98     pooka 		else
   2637   1.98     pooka 			rv = *retval;
   2638   1.98     pooka 	}
   2639   1.98     pooka 	return rv;
   2640   1.98     pooka }
   2641  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2642  1.103     pooka __weak_alias(timer_delete,rump___sysimpl_timer_delete);
   2643  1.103     pooka __weak_alias(_timer_delete,rump___sysimpl_timer_delete);
   2644  1.103     pooka __strong_alias(_sys_timer_delete,rump___sysimpl_timer_delete);
   2645  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2646   1.98     pooka 
   2647   1.98     pooka int rump___sysimpl_timer_getoverrun(timer_t);
   2648   1.98     pooka int
   2649   1.98     pooka rump___sysimpl_timer_getoverrun(timer_t timerid)
   2650   1.98     pooka {
   2651   1.98     pooka 	register_t retval[2];
   2652   1.98     pooka 	int error = 0;
   2653   1.98     pooka 	int rv = -1;
   2654   1.98     pooka 	struct sys_timer_getoverrun_args callarg;
   2655   1.98     pooka 
   2656   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   2657   1.98     pooka 	SPARG(&callarg, timerid) = timerid;
   2658   1.98     pooka 
   2659  1.120  pgoyette 	error = rsys_syscall(SYS_timer_getoverrun, &callarg, sizeof(callarg), retval);
   2660   1.98     pooka 	rsys_seterrno(error);
   2661   1.98     pooka 	if (error == 0) {
   2662   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   2663   1.98     pooka 			rv = *(int *)retval;
   2664   1.98     pooka 		else
   2665   1.98     pooka 			rv = *retval;
   2666   1.98     pooka 	}
   2667   1.98     pooka 	return rv;
   2668   1.98     pooka }
   2669  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2670  1.103     pooka __weak_alias(timer_getoverrun,rump___sysimpl_timer_getoverrun);
   2671  1.103     pooka __weak_alias(_timer_getoverrun,rump___sysimpl_timer_getoverrun);
   2672  1.103     pooka __strong_alias(_sys_timer_getoverrun,rump___sysimpl_timer_getoverrun);
   2673  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2674   1.98     pooka 
   2675   1.60     pooka int rump___sysimpl_fdatasync(int);
   2676   1.34     pooka int
   2677   1.60     pooka rump___sysimpl_fdatasync(int fd)
   2678   1.34     pooka {
   2679   1.93     pooka 	register_t retval[2];
   2680   1.34     pooka 	int error = 0;
   2681   1.68     pooka 	int rv = -1;
   2682   1.34     pooka 	struct sys_fdatasync_args callarg;
   2683   1.34     pooka 
   2684   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2685   1.34     pooka 	SPARG(&callarg, fd) = fd;
   2686   1.34     pooka 
   2687  1.120  pgoyette 	error = rsys_syscall(SYS_fdatasync, &callarg, sizeof(callarg), retval);
   2688   1.63     pooka 	rsys_seterrno(error);
   2689   1.68     pooka 	if (error == 0) {
   2690   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2691   1.68     pooka 			rv = *(int *)retval;
   2692   1.68     pooka 		else
   2693   1.69     pooka 			rv = *retval;
   2694   1.34     pooka 	}
   2695   1.68     pooka 	return rv;
   2696   1.34     pooka }
   2697  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2698  1.103     pooka __weak_alias(fdatasync,rump___sysimpl_fdatasync);
   2699  1.103     pooka __weak_alias(_fdatasync,rump___sysimpl_fdatasync);
   2700  1.103     pooka __strong_alias(_sys_fdatasync,rump___sysimpl_fdatasync);
   2701  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2702   1.34     pooka 
   2703   1.60     pooka int rump___sysimpl_modctl(int, void *);
   2704   1.38     pooka int
   2705   1.60     pooka rump___sysimpl_modctl(int cmd, void * arg)
   2706   1.38     pooka {
   2707   1.93     pooka 	register_t retval[2];
   2708   1.38     pooka 	int error = 0;
   2709   1.68     pooka 	int rv = -1;
   2710   1.38     pooka 	struct sys_modctl_args callarg;
   2711   1.38     pooka 
   2712   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2713   1.38     pooka 	SPARG(&callarg, cmd) = cmd;
   2714   1.38     pooka 	SPARG(&callarg, arg) = arg;
   2715   1.38     pooka 
   2716  1.120  pgoyette 	error = rsys_syscall(SYS_modctl, &callarg, sizeof(callarg), retval);
   2717   1.63     pooka 	rsys_seterrno(error);
   2718   1.68     pooka 	if (error == 0) {
   2719   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2720   1.68     pooka 			rv = *(int *)retval;
   2721   1.68     pooka 		else
   2722   1.69     pooka 			rv = *retval;
   2723   1.38     pooka 	}
   2724   1.68     pooka 	return rv;
   2725   1.38     pooka }
   2726  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2727  1.103     pooka __weak_alias(modctl,rump___sysimpl_modctl);
   2728  1.103     pooka __weak_alias(_modctl,rump___sysimpl_modctl);
   2729  1.103     pooka __strong_alias(_sys_modctl,rump___sysimpl_modctl);
   2730  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2731   1.38     pooka 
   2732   1.60     pooka int rump___sysimpl__ksem_init(unsigned int, intptr_t *);
   2733   1.46     pooka int
   2734   1.60     pooka rump___sysimpl__ksem_init(unsigned int value, intptr_t * idp)
   2735   1.46     pooka {
   2736   1.93     pooka 	register_t retval[2];
   2737   1.46     pooka 	int error = 0;
   2738   1.68     pooka 	int rv = -1;
   2739   1.46     pooka 	struct sys__ksem_init_args callarg;
   2740   1.46     pooka 
   2741   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2742   1.46     pooka 	SPARG(&callarg, value) = value;
   2743   1.46     pooka 	SPARG(&callarg, idp) = idp;
   2744   1.46     pooka 
   2745  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_init, &callarg, sizeof(callarg), retval);
   2746   1.63     pooka 	rsys_seterrno(error);
   2747   1.68     pooka 	if (error == 0) {
   2748   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2749   1.68     pooka 			rv = *(int *)retval;
   2750   1.68     pooka 		else
   2751   1.69     pooka 			rv = *retval;
   2752   1.46     pooka 	}
   2753   1.68     pooka 	return rv;
   2754   1.46     pooka }
   2755  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2756  1.103     pooka __weak_alias(_ksem_init,rump___sysimpl__ksem_init);
   2757  1.103     pooka __weak_alias(__ksem_init,rump___sysimpl__ksem_init);
   2758  1.103     pooka __strong_alias(_sys__ksem_init,rump___sysimpl__ksem_init);
   2759  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2760   1.46     pooka 
   2761   1.60     pooka int rump___sysimpl__ksem_open(const char *, int, mode_t, unsigned int, intptr_t *);
   2762   1.46     pooka int
   2763   1.60     pooka rump___sysimpl__ksem_open(const char * name, int oflag, mode_t mode, unsigned int value, intptr_t * idp)
   2764   1.46     pooka {
   2765   1.93     pooka 	register_t retval[2];
   2766   1.46     pooka 	int error = 0;
   2767   1.68     pooka 	int rv = -1;
   2768   1.46     pooka 	struct sys__ksem_open_args callarg;
   2769   1.46     pooka 
   2770   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2771   1.46     pooka 	SPARG(&callarg, name) = name;
   2772   1.46     pooka 	SPARG(&callarg, oflag) = oflag;
   2773   1.46     pooka 	SPARG(&callarg, mode) = mode;
   2774   1.46     pooka 	SPARG(&callarg, value) = value;
   2775   1.46     pooka 	SPARG(&callarg, idp) = idp;
   2776   1.46     pooka 
   2777  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_open, &callarg, sizeof(callarg), retval);
   2778   1.63     pooka 	rsys_seterrno(error);
   2779   1.68     pooka 	if (error == 0) {
   2780   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2781   1.68     pooka 			rv = *(int *)retval;
   2782   1.68     pooka 		else
   2783   1.69     pooka 			rv = *retval;
   2784   1.46     pooka 	}
   2785   1.68     pooka 	return rv;
   2786   1.46     pooka }
   2787  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2788  1.103     pooka __weak_alias(_ksem_open,rump___sysimpl__ksem_open);
   2789  1.103     pooka __weak_alias(__ksem_open,rump___sysimpl__ksem_open);
   2790  1.103     pooka __strong_alias(_sys__ksem_open,rump___sysimpl__ksem_open);
   2791  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2792   1.46     pooka 
   2793   1.60     pooka int rump___sysimpl__ksem_unlink(const char *);
   2794   1.46     pooka int
   2795   1.60     pooka rump___sysimpl__ksem_unlink(const char * name)
   2796   1.46     pooka {
   2797   1.93     pooka 	register_t retval[2];
   2798   1.46     pooka 	int error = 0;
   2799   1.68     pooka 	int rv = -1;
   2800   1.46     pooka 	struct sys__ksem_unlink_args callarg;
   2801   1.46     pooka 
   2802   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2803   1.46     pooka 	SPARG(&callarg, name) = name;
   2804   1.46     pooka 
   2805  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_unlink, &callarg, sizeof(callarg), retval);
   2806   1.63     pooka 	rsys_seterrno(error);
   2807   1.68     pooka 	if (error == 0) {
   2808   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2809   1.68     pooka 			rv = *(int *)retval;
   2810   1.68     pooka 		else
   2811   1.69     pooka 			rv = *retval;
   2812   1.46     pooka 	}
   2813   1.68     pooka 	return rv;
   2814   1.46     pooka }
   2815  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2816  1.103     pooka __weak_alias(_ksem_unlink,rump___sysimpl__ksem_unlink);
   2817  1.103     pooka __weak_alias(__ksem_unlink,rump___sysimpl__ksem_unlink);
   2818  1.103     pooka __strong_alias(_sys__ksem_unlink,rump___sysimpl__ksem_unlink);
   2819  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2820   1.46     pooka 
   2821   1.60     pooka int rump___sysimpl__ksem_close(intptr_t);
   2822   1.46     pooka int
   2823   1.60     pooka rump___sysimpl__ksem_close(intptr_t id)
   2824   1.46     pooka {
   2825   1.93     pooka 	register_t retval[2];
   2826   1.46     pooka 	int error = 0;
   2827   1.68     pooka 	int rv = -1;
   2828   1.46     pooka 	struct sys__ksem_close_args callarg;
   2829   1.46     pooka 
   2830   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2831   1.46     pooka 	SPARG(&callarg, id) = id;
   2832   1.46     pooka 
   2833  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_close, &callarg, sizeof(callarg), retval);
   2834   1.63     pooka 	rsys_seterrno(error);
   2835   1.68     pooka 	if (error == 0) {
   2836   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2837   1.68     pooka 			rv = *(int *)retval;
   2838   1.68     pooka 		else
   2839   1.69     pooka 			rv = *retval;
   2840   1.46     pooka 	}
   2841   1.68     pooka 	return rv;
   2842   1.46     pooka }
   2843  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2844  1.103     pooka __weak_alias(_ksem_close,rump___sysimpl__ksem_close);
   2845  1.103     pooka __weak_alias(__ksem_close,rump___sysimpl__ksem_close);
   2846  1.103     pooka __strong_alias(_sys__ksem_close,rump___sysimpl__ksem_close);
   2847  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2848   1.46     pooka 
   2849   1.60     pooka int rump___sysimpl__ksem_post(intptr_t);
   2850   1.46     pooka int
   2851   1.60     pooka rump___sysimpl__ksem_post(intptr_t id)
   2852   1.46     pooka {
   2853   1.93     pooka 	register_t retval[2];
   2854   1.46     pooka 	int error = 0;
   2855   1.68     pooka 	int rv = -1;
   2856   1.46     pooka 	struct sys__ksem_post_args callarg;
   2857   1.46     pooka 
   2858   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2859   1.46     pooka 	SPARG(&callarg, id) = id;
   2860   1.46     pooka 
   2861  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_post, &callarg, sizeof(callarg), retval);
   2862   1.63     pooka 	rsys_seterrno(error);
   2863   1.68     pooka 	if (error == 0) {
   2864   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2865   1.68     pooka 			rv = *(int *)retval;
   2866   1.68     pooka 		else
   2867   1.69     pooka 			rv = *retval;
   2868   1.46     pooka 	}
   2869   1.68     pooka 	return rv;
   2870   1.46     pooka }
   2871  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2872  1.103     pooka __weak_alias(_ksem_post,rump___sysimpl__ksem_post);
   2873  1.103     pooka __weak_alias(__ksem_post,rump___sysimpl__ksem_post);
   2874  1.103     pooka __strong_alias(_sys__ksem_post,rump___sysimpl__ksem_post);
   2875  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2876   1.46     pooka 
   2877   1.60     pooka int rump___sysimpl__ksem_wait(intptr_t);
   2878   1.46     pooka int
   2879   1.60     pooka rump___sysimpl__ksem_wait(intptr_t id)
   2880   1.46     pooka {
   2881   1.93     pooka 	register_t retval[2];
   2882   1.46     pooka 	int error = 0;
   2883   1.68     pooka 	int rv = -1;
   2884   1.46     pooka 	struct sys__ksem_wait_args callarg;
   2885   1.46     pooka 
   2886   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2887   1.46     pooka 	SPARG(&callarg, id) = id;
   2888   1.46     pooka 
   2889  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_wait, &callarg, sizeof(callarg), retval);
   2890   1.63     pooka 	rsys_seterrno(error);
   2891   1.68     pooka 	if (error == 0) {
   2892   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2893   1.68     pooka 			rv = *(int *)retval;
   2894   1.68     pooka 		else
   2895   1.69     pooka 			rv = *retval;
   2896   1.46     pooka 	}
   2897   1.68     pooka 	return rv;
   2898   1.46     pooka }
   2899  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2900  1.103     pooka __weak_alias(_ksem_wait,rump___sysimpl__ksem_wait);
   2901  1.103     pooka __weak_alias(__ksem_wait,rump___sysimpl__ksem_wait);
   2902  1.103     pooka __strong_alias(_sys__ksem_wait,rump___sysimpl__ksem_wait);
   2903  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2904   1.46     pooka 
   2905   1.60     pooka int rump___sysimpl__ksem_trywait(intptr_t);
   2906   1.46     pooka int
   2907   1.60     pooka rump___sysimpl__ksem_trywait(intptr_t id)
   2908   1.46     pooka {
   2909   1.93     pooka 	register_t retval[2];
   2910   1.46     pooka 	int error = 0;
   2911   1.68     pooka 	int rv = -1;
   2912   1.46     pooka 	struct sys__ksem_trywait_args callarg;
   2913   1.46     pooka 
   2914   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2915   1.46     pooka 	SPARG(&callarg, id) = id;
   2916   1.46     pooka 
   2917  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_trywait, &callarg, sizeof(callarg), retval);
   2918   1.63     pooka 	rsys_seterrno(error);
   2919   1.68     pooka 	if (error == 0) {
   2920   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2921   1.68     pooka 			rv = *(int *)retval;
   2922   1.68     pooka 		else
   2923   1.69     pooka 			rv = *retval;
   2924   1.46     pooka 	}
   2925   1.68     pooka 	return rv;
   2926   1.46     pooka }
   2927  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2928  1.103     pooka __weak_alias(_ksem_trywait,rump___sysimpl__ksem_trywait);
   2929  1.103     pooka __weak_alias(__ksem_trywait,rump___sysimpl__ksem_trywait);
   2930  1.103     pooka __strong_alias(_sys__ksem_trywait,rump___sysimpl__ksem_trywait);
   2931  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2932   1.46     pooka 
   2933   1.60     pooka int rump___sysimpl__ksem_getvalue(intptr_t, unsigned int *);
   2934   1.46     pooka int
   2935   1.60     pooka rump___sysimpl__ksem_getvalue(intptr_t id, unsigned int * value)
   2936   1.46     pooka {
   2937   1.93     pooka 	register_t retval[2];
   2938   1.46     pooka 	int error = 0;
   2939   1.68     pooka 	int rv = -1;
   2940   1.46     pooka 	struct sys__ksem_getvalue_args callarg;
   2941   1.46     pooka 
   2942   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2943   1.46     pooka 	SPARG(&callarg, id) = id;
   2944   1.46     pooka 	SPARG(&callarg, value) = value;
   2945   1.46     pooka 
   2946  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_getvalue, &callarg, sizeof(callarg), retval);
   2947   1.63     pooka 	rsys_seterrno(error);
   2948   1.68     pooka 	if (error == 0) {
   2949   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2950   1.68     pooka 			rv = *(int *)retval;
   2951   1.68     pooka 		else
   2952   1.69     pooka 			rv = *retval;
   2953   1.46     pooka 	}
   2954   1.68     pooka 	return rv;
   2955   1.46     pooka }
   2956  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2957  1.103     pooka __weak_alias(_ksem_getvalue,rump___sysimpl__ksem_getvalue);
   2958  1.103     pooka __weak_alias(__ksem_getvalue,rump___sysimpl__ksem_getvalue);
   2959  1.103     pooka __strong_alias(_sys__ksem_getvalue,rump___sysimpl__ksem_getvalue);
   2960  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2961   1.46     pooka 
   2962   1.60     pooka int rump___sysimpl__ksem_destroy(intptr_t);
   2963   1.46     pooka int
   2964   1.60     pooka rump___sysimpl__ksem_destroy(intptr_t id)
   2965   1.46     pooka {
   2966   1.93     pooka 	register_t retval[2];
   2967   1.46     pooka 	int error = 0;
   2968   1.68     pooka 	int rv = -1;
   2969   1.46     pooka 	struct sys__ksem_destroy_args callarg;
   2970   1.46     pooka 
   2971   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   2972   1.46     pooka 	SPARG(&callarg, id) = id;
   2973   1.46     pooka 
   2974  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_destroy, &callarg, sizeof(callarg), retval);
   2975   1.63     pooka 	rsys_seterrno(error);
   2976   1.68     pooka 	if (error == 0) {
   2977   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   2978   1.68     pooka 			rv = *(int *)retval;
   2979   1.68     pooka 		else
   2980   1.69     pooka 			rv = *retval;
   2981   1.46     pooka 	}
   2982   1.68     pooka 	return rv;
   2983   1.46     pooka }
   2984  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   2985  1.103     pooka __weak_alias(_ksem_destroy,rump___sysimpl__ksem_destroy);
   2986  1.103     pooka __weak_alias(__ksem_destroy,rump___sysimpl__ksem_destroy);
   2987  1.103     pooka __strong_alias(_sys__ksem_destroy,rump___sysimpl__ksem_destroy);
   2988  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   2989   1.46     pooka 
   2990   1.78     joerg int rump___sysimpl__ksem_timedwait(intptr_t, const struct timespec *);
   2991   1.78     joerg int
   2992   1.78     joerg rump___sysimpl__ksem_timedwait(intptr_t id, const struct timespec * abstime)
   2993   1.78     joerg {
   2994   1.93     pooka 	register_t retval[2];
   2995   1.78     joerg 	int error = 0;
   2996   1.78     joerg 	int rv = -1;
   2997   1.78     joerg 	struct sys__ksem_timedwait_args callarg;
   2998   1.78     joerg 
   2999   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3000   1.78     joerg 	SPARG(&callarg, id) = id;
   3001   1.78     joerg 	SPARG(&callarg, abstime) = abstime;
   3002   1.78     joerg 
   3003  1.120  pgoyette 	error = rsys_syscall(SYS__ksem_timedwait, &callarg, sizeof(callarg), retval);
   3004   1.78     joerg 	rsys_seterrno(error);
   3005   1.78     joerg 	if (error == 0) {
   3006   1.78     joerg 		if (sizeof(int) > sizeof(register_t))
   3007   1.78     joerg 			rv = *(int *)retval;
   3008   1.78     joerg 		else
   3009   1.78     joerg 			rv = *retval;
   3010   1.78     joerg 	}
   3011   1.78     joerg 	return rv;
   3012   1.78     joerg }
   3013  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3014  1.103     pooka __weak_alias(_ksem_timedwait,rump___sysimpl__ksem_timedwait);
   3015  1.103     pooka __weak_alias(__ksem_timedwait,rump___sysimpl__ksem_timedwait);
   3016  1.103     pooka __strong_alias(_sys__ksem_timedwait,rump___sysimpl__ksem_timedwait);
   3017  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3018   1.78     joerg 
   3019  1.108    justin int rump___sysimpl___posix_rename(const char *, const char *);
   3020  1.108    justin int
   3021  1.108    justin rump___sysimpl___posix_rename(const char * from, const char * to)
   3022  1.108    justin {
   3023  1.108    justin 	register_t retval[2];
   3024  1.108    justin 	int error = 0;
   3025  1.108    justin 	int rv = -1;
   3026  1.108    justin 	struct sys___posix_rename_args callarg;
   3027  1.108    justin 
   3028  1.108    justin 	memset(&callarg, 0, sizeof(callarg));
   3029  1.108    justin 	SPARG(&callarg, from) = from;
   3030  1.108    justin 	SPARG(&callarg, to) = to;
   3031  1.108    justin 
   3032  1.120  pgoyette 	error = rsys_syscall(SYS___posix_rename, &callarg, sizeof(callarg), retval);
   3033  1.108    justin 	rsys_seterrno(error);
   3034  1.108    justin 	if (error == 0) {
   3035  1.108    justin 		if (sizeof(int) > sizeof(register_t))
   3036  1.108    justin 			rv = *(int *)retval;
   3037  1.108    justin 		else
   3038  1.108    justin 			rv = *retval;
   3039  1.108    justin 	}
   3040  1.108    justin 	return rv;
   3041  1.108    justin }
   3042  1.108    justin #ifdef RUMP_KERNEL_IS_LIBC
   3043  1.108    justin __weak_alias(__posix_rename,rump___sysimpl___posix_rename);
   3044  1.108    justin __weak_alias(___posix_rename,rump___sysimpl___posix_rename);
   3045  1.108    justin __strong_alias(_sys___posix_rename,rump___sysimpl___posix_rename);
   3046  1.108    justin #endif /* RUMP_KERNEL_IS_LIBC */
   3047  1.108    justin 
   3048   1.60     pooka int rump___sysimpl_lchmod(const char *, mode_t);
   3049   1.34     pooka int
   3050   1.60     pooka rump___sysimpl_lchmod(const char * path, mode_t mode)
   3051   1.34     pooka {
   3052   1.93     pooka 	register_t retval[2];
   3053   1.34     pooka 	int error = 0;
   3054   1.68     pooka 	int rv = -1;
   3055   1.34     pooka 	struct sys_lchmod_args callarg;
   3056   1.34     pooka 
   3057   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3058   1.34     pooka 	SPARG(&callarg, path) = path;
   3059   1.34     pooka 	SPARG(&callarg, mode) = mode;
   3060   1.34     pooka 
   3061  1.120  pgoyette 	error = rsys_syscall(SYS_lchmod, &callarg, sizeof(callarg), retval);
   3062   1.63     pooka 	rsys_seterrno(error);
   3063   1.68     pooka 	if (error == 0) {
   3064   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3065   1.68     pooka 			rv = *(int *)retval;
   3066   1.68     pooka 		else
   3067   1.69     pooka 			rv = *retval;
   3068   1.34     pooka 	}
   3069   1.68     pooka 	return rv;
   3070   1.34     pooka }
   3071  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3072  1.103     pooka __weak_alias(lchmod,rump___sysimpl_lchmod);
   3073  1.103     pooka __weak_alias(_lchmod,rump___sysimpl_lchmod);
   3074  1.103     pooka __strong_alias(_sys_lchmod,rump___sysimpl_lchmod);
   3075  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3076   1.34     pooka 
   3077   1.60     pooka int rump___sysimpl_lchown(const char *, uid_t, gid_t);
   3078   1.34     pooka int
   3079   1.60     pooka rump___sysimpl_lchown(const char * path, uid_t uid, gid_t gid)
   3080   1.34     pooka {
   3081   1.93     pooka 	register_t retval[2];
   3082   1.34     pooka 	int error = 0;
   3083   1.68     pooka 	int rv = -1;
   3084   1.34     pooka 	struct sys_lchown_args callarg;
   3085   1.34     pooka 
   3086   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3087   1.34     pooka 	SPARG(&callarg, path) = path;
   3088   1.34     pooka 	SPARG(&callarg, uid) = uid;
   3089   1.34     pooka 	SPARG(&callarg, gid) = gid;
   3090   1.34     pooka 
   3091  1.120  pgoyette 	error = rsys_syscall(SYS_lchown, &callarg, sizeof(callarg), retval);
   3092   1.63     pooka 	rsys_seterrno(error);
   3093   1.68     pooka 	if (error == 0) {
   3094   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3095   1.68     pooka 			rv = *(int *)retval;
   3096   1.68     pooka 		else
   3097   1.69     pooka 			rv = *retval;
   3098   1.34     pooka 	}
   3099   1.68     pooka 	return rv;
   3100   1.34     pooka }
   3101  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3102  1.103     pooka __weak_alias(lchown,rump___sysimpl_lchown);
   3103  1.103     pooka __weak_alias(_lchown,rump___sysimpl_lchown);
   3104  1.103     pooka __strong_alias(_sys_lchown,rump___sysimpl_lchown);
   3105  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3106   1.34     pooka 
   3107  1.103     pooka #ifdef RUMP_SYS_COMPAT
   3108   1.60     pooka int rump___sysimpl_lutimes(const char *, const struct timeval *);
   3109   1.60     pooka int
   3110   1.60     pooka rump___sysimpl_lutimes(const char * path, const struct timeval * tptr)
   3111   1.60     pooka {
   3112   1.93     pooka 	register_t retval[2];
   3113   1.60     pooka 	int error = 0;
   3114   1.68     pooka 	int rv = -1;
   3115   1.60     pooka 	struct compat_50_sys_lutimes_args callarg;
   3116   1.60     pooka 
   3117   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3118   1.60     pooka 	SPARG(&callarg, path) = path;
   3119   1.60     pooka 	SPARG(&callarg, tptr) = (const struct timeval50 *)tptr;
   3120   1.60     pooka 
   3121  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_lutimes, &callarg, sizeof(callarg), retval);
   3122   1.63     pooka 	rsys_seterrno(error);
   3123   1.68     pooka 	if (error == 0) {
   3124   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3125   1.68     pooka 			rv = *(int *)retval;
   3126   1.68     pooka 		else
   3127   1.69     pooka 			rv = *retval;
   3128   1.60     pooka 	}
   3129   1.68     pooka 	return rv;
   3130   1.60     pooka }
   3131  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3132  1.103     pooka __weak_alias(lutimes,rump___sysimpl_lutimes);
   3133  1.103     pooka __weak_alias(_lutimes,rump___sysimpl_lutimes);
   3134  1.103     pooka __strong_alias(_sys_lutimes,rump___sysimpl_lutimes);
   3135  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3136  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   3137   1.60     pooka 
   3138  1.113     pooka int rump___sysimpl___posix_chown(const char *, uid_t, gid_t);
   3139  1.113     pooka int
   3140  1.113     pooka rump___sysimpl___posix_chown(const char * path, uid_t uid, gid_t gid)
   3141  1.113     pooka {
   3142  1.113     pooka 	register_t retval[2];
   3143  1.113     pooka 	int error = 0;
   3144  1.113     pooka 	int rv = -1;
   3145  1.113     pooka 	struct sys___posix_chown_args callarg;
   3146  1.113     pooka 
   3147  1.113     pooka 	memset(&callarg, 0, sizeof(callarg));
   3148  1.113     pooka 	SPARG(&callarg, path) = path;
   3149  1.113     pooka 	SPARG(&callarg, uid) = uid;
   3150  1.113     pooka 	SPARG(&callarg, gid) = gid;
   3151  1.113     pooka 
   3152  1.120  pgoyette 	error = rsys_syscall(SYS___posix_chown, &callarg, sizeof(callarg), retval);
   3153  1.113     pooka 	rsys_seterrno(error);
   3154  1.113     pooka 	if (error == 0) {
   3155  1.113     pooka 		if (sizeof(int) > sizeof(register_t))
   3156  1.113     pooka 			rv = *(int *)retval;
   3157  1.113     pooka 		else
   3158  1.113     pooka 			rv = *retval;
   3159  1.113     pooka 	}
   3160  1.113     pooka 	return rv;
   3161  1.113     pooka }
   3162  1.113     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3163  1.113     pooka __weak_alias(__posix_chown,rump___sysimpl___posix_chown);
   3164  1.113     pooka __weak_alias(___posix_chown,rump___sysimpl___posix_chown);
   3165  1.113     pooka __strong_alias(_sys___posix_chown,rump___sysimpl___posix_chown);
   3166  1.113     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3167  1.113     pooka 
   3168  1.113     pooka int rump___sysimpl___posix_fchown(int, uid_t, gid_t);
   3169  1.113     pooka int
   3170  1.113     pooka rump___sysimpl___posix_fchown(int fd, uid_t uid, gid_t gid)
   3171  1.113     pooka {
   3172  1.113     pooka 	register_t retval[2];
   3173  1.113     pooka 	int error = 0;
   3174  1.113     pooka 	int rv = -1;
   3175  1.113     pooka 	struct sys___posix_fchown_args callarg;
   3176  1.113     pooka 
   3177  1.113     pooka 	memset(&callarg, 0, sizeof(callarg));
   3178  1.113     pooka 	SPARG(&callarg, fd) = fd;
   3179  1.113     pooka 	SPARG(&callarg, uid) = uid;
   3180  1.113     pooka 	SPARG(&callarg, gid) = gid;
   3181  1.113     pooka 
   3182  1.120  pgoyette 	error = rsys_syscall(SYS___posix_fchown, &callarg, sizeof(callarg), retval);
   3183  1.113     pooka 	rsys_seterrno(error);
   3184  1.113     pooka 	if (error == 0) {
   3185  1.113     pooka 		if (sizeof(int) > sizeof(register_t))
   3186  1.113     pooka 			rv = *(int *)retval;
   3187  1.113     pooka 		else
   3188  1.113     pooka 			rv = *retval;
   3189  1.113     pooka 	}
   3190  1.113     pooka 	return rv;
   3191  1.113     pooka }
   3192  1.113     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3193  1.113     pooka __weak_alias(__posix_fchown,rump___sysimpl___posix_fchown);
   3194  1.113     pooka __weak_alias(___posix_fchown,rump___sysimpl___posix_fchown);
   3195  1.113     pooka __strong_alias(_sys___posix_fchown,rump___sysimpl___posix_fchown);
   3196  1.113     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3197  1.113     pooka 
   3198  1.113     pooka int rump___sysimpl___posix_lchown(const char *, uid_t, gid_t);
   3199  1.113     pooka int
   3200  1.113     pooka rump___sysimpl___posix_lchown(const char * path, uid_t uid, gid_t gid)
   3201  1.113     pooka {
   3202  1.113     pooka 	register_t retval[2];
   3203  1.113     pooka 	int error = 0;
   3204  1.113     pooka 	int rv = -1;
   3205  1.113     pooka 	struct sys___posix_lchown_args callarg;
   3206  1.113     pooka 
   3207  1.113     pooka 	memset(&callarg, 0, sizeof(callarg));
   3208  1.113     pooka 	SPARG(&callarg, path) = path;
   3209  1.113     pooka 	SPARG(&callarg, uid) = uid;
   3210  1.113     pooka 	SPARG(&callarg, gid) = gid;
   3211  1.113     pooka 
   3212  1.120  pgoyette 	error = rsys_syscall(SYS___posix_lchown, &callarg, sizeof(callarg), retval);
   3213  1.113     pooka 	rsys_seterrno(error);
   3214  1.113     pooka 	if (error == 0) {
   3215  1.113     pooka 		if (sizeof(int) > sizeof(register_t))
   3216  1.113     pooka 			rv = *(int *)retval;
   3217  1.113     pooka 		else
   3218  1.113     pooka 			rv = *retval;
   3219  1.113     pooka 	}
   3220  1.113     pooka 	return rv;
   3221  1.113     pooka }
   3222  1.113     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3223  1.113     pooka __weak_alias(__posix_lchown,rump___sysimpl___posix_lchown);
   3224  1.113     pooka __weak_alias(___posix_lchown,rump___sysimpl___posix_lchown);
   3225  1.113     pooka __strong_alias(_sys___posix_lchown,rump___sysimpl___posix_lchown);
   3226  1.113     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3227  1.113     pooka 
   3228   1.60     pooka pid_t rump___sysimpl_getsid(pid_t);
   3229   1.49     pooka pid_t
   3230   1.60     pooka rump___sysimpl_getsid(pid_t pid)
   3231   1.49     pooka {
   3232   1.93     pooka 	register_t retval[2];
   3233   1.49     pooka 	int error = 0;
   3234   1.68     pooka 	pid_t rv = -1;
   3235   1.49     pooka 	struct sys_getsid_args callarg;
   3236   1.49     pooka 
   3237   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3238   1.49     pooka 	SPARG(&callarg, pid) = pid;
   3239   1.49     pooka 
   3240  1.120  pgoyette 	error = rsys_syscall(SYS_getsid, &callarg, sizeof(callarg), retval);
   3241   1.63     pooka 	rsys_seterrno(error);
   3242   1.68     pooka 	if (error == 0) {
   3243   1.68     pooka 		if (sizeof(pid_t) > sizeof(register_t))
   3244   1.68     pooka 			rv = *(pid_t *)retval;
   3245   1.68     pooka 		else
   3246   1.69     pooka 			rv = *retval;
   3247   1.49     pooka 	}
   3248   1.68     pooka 	return rv;
   3249   1.49     pooka }
   3250  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3251  1.103     pooka __weak_alias(getsid,rump___sysimpl_getsid);
   3252  1.103     pooka __weak_alias(_getsid,rump___sysimpl_getsid);
   3253  1.103     pooka __strong_alias(_sys_getsid,rump___sysimpl_getsid);
   3254  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3255   1.49     pooka 
   3256   1.94     pooka int rump___sysimpl_fktrace(int, int, int, pid_t);
   3257   1.94     pooka int
   3258   1.94     pooka rump___sysimpl_fktrace(int fd, int ops, int facs, pid_t pid)
   3259   1.94     pooka {
   3260   1.94     pooka 	register_t retval[2];
   3261   1.94     pooka 	int error = 0;
   3262   1.94     pooka 	int rv = -1;
   3263   1.94     pooka 	struct sys_fktrace_args callarg;
   3264   1.94     pooka 
   3265   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3266   1.94     pooka 	SPARG(&callarg, fd) = fd;
   3267   1.94     pooka 	SPARG(&callarg, ops) = ops;
   3268   1.94     pooka 	SPARG(&callarg, facs) = facs;
   3269   1.94     pooka 	SPARG(&callarg, pid) = pid;
   3270   1.94     pooka 
   3271  1.120  pgoyette 	error = rsys_syscall(SYS_fktrace, &callarg, sizeof(callarg), retval);
   3272   1.94     pooka 	rsys_seterrno(error);
   3273   1.94     pooka 	if (error == 0) {
   3274   1.94     pooka 		if (sizeof(int) > sizeof(register_t))
   3275   1.94     pooka 			rv = *(int *)retval;
   3276   1.94     pooka 		else
   3277   1.94     pooka 			rv = *retval;
   3278   1.94     pooka 	}
   3279   1.94     pooka 	return rv;
   3280   1.94     pooka }
   3281  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3282  1.103     pooka __weak_alias(fktrace,rump___sysimpl_fktrace);
   3283  1.103     pooka __weak_alias(_fktrace,rump___sysimpl_fktrace);
   3284  1.103     pooka __strong_alias(_sys_fktrace,rump___sysimpl_fktrace);
   3285  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3286   1.94     pooka 
   3287   1.64     pooka ssize_t rump___sysimpl_preadv(int, const struct iovec *, int, off_t);
   3288   1.64     pooka ssize_t
   3289   1.64     pooka rump___sysimpl_preadv(int fd, const struct iovec * iovp, int iovcnt, off_t offset)
   3290   1.64     pooka {
   3291   1.93     pooka 	register_t retval[2];
   3292   1.64     pooka 	int error = 0;
   3293   1.68     pooka 	ssize_t rv = -1;
   3294   1.64     pooka 	struct sys_preadv_args callarg;
   3295   1.64     pooka 
   3296   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3297   1.64     pooka 	SPARG(&callarg, fd) = fd;
   3298   1.64     pooka 	SPARG(&callarg, iovp) = iovp;
   3299   1.64     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   3300   1.64     pooka 	SPARG(&callarg, PAD) = 0;
   3301   1.64     pooka 	SPARG(&callarg, offset) = offset;
   3302   1.64     pooka 
   3303  1.120  pgoyette 	error = rsys_syscall(SYS_preadv, &callarg, sizeof(callarg), retval);
   3304   1.64     pooka 	rsys_seterrno(error);
   3305   1.68     pooka 	if (error == 0) {
   3306   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3307   1.68     pooka 			rv = *(ssize_t *)retval;
   3308   1.68     pooka 		else
   3309   1.69     pooka 			rv = *retval;
   3310   1.64     pooka 	}
   3311   1.68     pooka 	return rv;
   3312   1.64     pooka }
   3313  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3314  1.103     pooka __weak_alias(preadv,rump___sysimpl_preadv);
   3315  1.103     pooka __weak_alias(_preadv,rump___sysimpl_preadv);
   3316  1.103     pooka __strong_alias(_sys_preadv,rump___sysimpl_preadv);
   3317  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3318   1.64     pooka 
   3319   1.64     pooka ssize_t rump___sysimpl_pwritev(int, const struct iovec *, int, off_t);
   3320   1.64     pooka ssize_t
   3321   1.64     pooka rump___sysimpl_pwritev(int fd, const struct iovec * iovp, int iovcnt, off_t offset)
   3322   1.64     pooka {
   3323   1.93     pooka 	register_t retval[2];
   3324   1.64     pooka 	int error = 0;
   3325   1.68     pooka 	ssize_t rv = -1;
   3326   1.64     pooka 	struct sys_pwritev_args callarg;
   3327   1.64     pooka 
   3328   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3329   1.64     pooka 	SPARG(&callarg, fd) = fd;
   3330   1.64     pooka 	SPARG(&callarg, iovp) = iovp;
   3331   1.64     pooka 	SPARG(&callarg, iovcnt) = iovcnt;
   3332   1.64     pooka 	SPARG(&callarg, PAD) = 0;
   3333   1.64     pooka 	SPARG(&callarg, offset) = offset;
   3334   1.64     pooka 
   3335  1.120  pgoyette 	error = rsys_syscall(SYS_pwritev, &callarg, sizeof(callarg), retval);
   3336   1.64     pooka 	rsys_seterrno(error);
   3337   1.68     pooka 	if (error == 0) {
   3338   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3339   1.68     pooka 			rv = *(ssize_t *)retval;
   3340   1.68     pooka 		else
   3341   1.69     pooka 			rv = *retval;
   3342   1.64     pooka 	}
   3343   1.68     pooka 	return rv;
   3344   1.64     pooka }
   3345  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3346  1.103     pooka __weak_alias(pwritev,rump___sysimpl_pwritev);
   3347  1.103     pooka __weak_alias(_pwritev,rump___sysimpl_pwritev);
   3348  1.103     pooka __strong_alias(_sys_pwritev,rump___sysimpl_pwritev);
   3349  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3350   1.64     pooka 
   3351   1.60     pooka int rump___sysimpl___getcwd(char *, size_t);
   3352   1.51     pooka int
   3353   1.60     pooka rump___sysimpl___getcwd(char * bufp, size_t length)
   3354   1.51     pooka {
   3355   1.93     pooka 	register_t retval[2];
   3356   1.51     pooka 	int error = 0;
   3357   1.68     pooka 	int rv = -1;
   3358   1.51     pooka 	struct sys___getcwd_args callarg;
   3359   1.51     pooka 
   3360   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3361   1.51     pooka 	SPARG(&callarg, bufp) = bufp;
   3362   1.51     pooka 	SPARG(&callarg, length) = length;
   3363   1.51     pooka 
   3364  1.120  pgoyette 	error = rsys_syscall(SYS___getcwd, &callarg, sizeof(callarg), retval);
   3365   1.63     pooka 	rsys_seterrno(error);
   3366   1.68     pooka 	if (error == 0) {
   3367   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3368   1.68     pooka 			rv = *(int *)retval;
   3369   1.68     pooka 		else
   3370   1.69     pooka 			rv = *retval;
   3371   1.51     pooka 	}
   3372   1.68     pooka 	return rv;
   3373   1.51     pooka }
   3374  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3375  1.103     pooka __weak_alias(__getcwd,rump___sysimpl___getcwd);
   3376  1.103     pooka __weak_alias(___getcwd,rump___sysimpl___getcwd);
   3377  1.103     pooka __strong_alias(_sys___getcwd,rump___sysimpl___getcwd);
   3378  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3379   1.51     pooka 
   3380   1.60     pooka int rump___sysimpl_fchroot(int);
   3381   1.34     pooka int
   3382   1.60     pooka rump___sysimpl_fchroot(int fd)
   3383   1.34     pooka {
   3384   1.93     pooka 	register_t retval[2];
   3385   1.34     pooka 	int error = 0;
   3386   1.68     pooka 	int rv = -1;
   3387   1.34     pooka 	struct sys_fchroot_args callarg;
   3388   1.34     pooka 
   3389   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3390   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3391   1.34     pooka 
   3392  1.120  pgoyette 	error = rsys_syscall(SYS_fchroot, &callarg, sizeof(callarg), retval);
   3393   1.63     pooka 	rsys_seterrno(error);
   3394   1.68     pooka 	if (error == 0) {
   3395   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3396   1.68     pooka 			rv = *(int *)retval;
   3397   1.68     pooka 		else
   3398   1.69     pooka 			rv = *retval;
   3399   1.34     pooka 	}
   3400   1.68     pooka 	return rv;
   3401   1.34     pooka }
   3402  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3403  1.103     pooka __weak_alias(fchroot,rump___sysimpl_fchroot);
   3404  1.103     pooka __weak_alias(_fchroot,rump___sysimpl_fchroot);
   3405  1.103     pooka __strong_alias(_sys_fchroot,rump___sysimpl_fchroot);
   3406  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3407   1.34     pooka 
   3408   1.60     pooka int rump___sysimpl_lchflags(const char *, u_long);
   3409   1.34     pooka int
   3410   1.60     pooka rump___sysimpl_lchflags(const char * path, u_long flags)
   3411   1.34     pooka {
   3412   1.93     pooka 	register_t retval[2];
   3413   1.34     pooka 	int error = 0;
   3414   1.68     pooka 	int rv = -1;
   3415   1.34     pooka 	struct sys_lchflags_args callarg;
   3416   1.34     pooka 
   3417   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3418   1.34     pooka 	SPARG(&callarg, path) = path;
   3419   1.34     pooka 	SPARG(&callarg, flags) = flags;
   3420   1.34     pooka 
   3421  1.120  pgoyette 	error = rsys_syscall(SYS_lchflags, &callarg, sizeof(callarg), retval);
   3422   1.63     pooka 	rsys_seterrno(error);
   3423   1.68     pooka 	if (error == 0) {
   3424   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3425   1.68     pooka 			rv = *(int *)retval;
   3426   1.68     pooka 		else
   3427   1.69     pooka 			rv = *retval;
   3428   1.34     pooka 	}
   3429   1.68     pooka 	return rv;
   3430   1.34     pooka }
   3431  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3432  1.103     pooka __weak_alias(lchflags,rump___sysimpl_lchflags);
   3433  1.103     pooka __weak_alias(_lchflags,rump___sysimpl_lchflags);
   3434  1.103     pooka __strong_alias(_sys_lchflags,rump___sysimpl_lchflags);
   3435  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3436   1.34     pooka 
   3437   1.60     pooka int rump___sysimpl_issetugid(void);
   3438   1.49     pooka int
   3439   1.60     pooka rump___sysimpl_issetugid(void )
   3440   1.49     pooka {
   3441   1.93     pooka 	register_t retval[2];
   3442   1.68     pooka 	int rv = -1;
   3443   1.49     pooka 
   3444  1.119  pgoyette 	(void)rsys_syscall(SYS_issetugid, NULL, 0, retval);
   3445   1.68     pooka 	if (sizeof(int) > sizeof(register_t))
   3446   1.68     pooka 		rv = *(int *)retval;
   3447   1.68     pooka 	else
   3448   1.69     pooka 		rv = *retval;
   3449   1.68     pooka 	return rv;
   3450   1.49     pooka }
   3451  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3452  1.103     pooka __weak_alias(issetugid,rump___sysimpl_issetugid);
   3453  1.103     pooka __weak_alias(_issetugid,rump___sysimpl_issetugid);
   3454  1.103     pooka __strong_alias(_sys_issetugid,rump___sysimpl_issetugid);
   3455  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3456   1.49     pooka 
   3457   1.97     pooka int rump___sysimpl_utrace(const char *, void *, size_t);
   3458   1.97     pooka int
   3459   1.97     pooka rump___sysimpl_utrace(const char * label, void * addr, size_t len)
   3460   1.97     pooka {
   3461   1.97     pooka 	register_t retval[2];
   3462   1.97     pooka 	int error = 0;
   3463   1.97     pooka 	int rv = -1;
   3464   1.97     pooka 	struct sys_utrace_args callarg;
   3465   1.97     pooka 
   3466   1.97     pooka 	memset(&callarg, 0, sizeof(callarg));
   3467   1.97     pooka 	SPARG(&callarg, label) = label;
   3468   1.97     pooka 	SPARG(&callarg, addr) = addr;
   3469   1.97     pooka 	SPARG(&callarg, len) = len;
   3470   1.97     pooka 
   3471  1.120  pgoyette 	error = rsys_syscall(SYS_utrace, &callarg, sizeof(callarg), retval);
   3472   1.97     pooka 	rsys_seterrno(error);
   3473   1.97     pooka 	if (error == 0) {
   3474   1.97     pooka 		if (sizeof(int) > sizeof(register_t))
   3475   1.97     pooka 			rv = *(int *)retval;
   3476   1.97     pooka 		else
   3477   1.97     pooka 			rv = *retval;
   3478   1.97     pooka 	}
   3479   1.97     pooka 	return rv;
   3480   1.97     pooka }
   3481  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3482  1.103     pooka __weak_alias(utrace,rump___sysimpl_utrace);
   3483  1.103     pooka __weak_alias(_utrace,rump___sysimpl_utrace);
   3484  1.103     pooka __strong_alias(_sys_utrace,rump___sysimpl_utrace);
   3485  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3486   1.97     pooka 
   3487   1.60     pooka int rump___sysimpl_kqueue(void);
   3488   1.34     pooka int
   3489   1.60     pooka rump___sysimpl_kqueue(void )
   3490   1.34     pooka {
   3491   1.93     pooka 	register_t retval[2];
   3492   1.34     pooka 	int error = 0;
   3493   1.68     pooka 	int rv = -1;
   3494   1.34     pooka 
   3495  1.120  pgoyette 	error = rsys_syscall(SYS_kqueue, NULL, 0, retval);
   3496   1.63     pooka 	rsys_seterrno(error);
   3497   1.68     pooka 	if (error == 0) {
   3498   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3499   1.68     pooka 			rv = *(int *)retval;
   3500   1.68     pooka 		else
   3501   1.69     pooka 			rv = *retval;
   3502   1.34     pooka 	}
   3503   1.68     pooka 	return rv;
   3504   1.34     pooka }
   3505  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3506  1.103     pooka __weak_alias(kqueue,rump___sysimpl_kqueue);
   3507  1.103     pooka __weak_alias(_kqueue,rump___sysimpl_kqueue);
   3508  1.103     pooka __strong_alias(_sys_kqueue,rump___sysimpl_kqueue);
   3509  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3510   1.34     pooka 
   3511  1.103     pooka #ifdef RUMP_SYS_COMPAT
   3512   1.60     pooka int rump___sysimpl_kevent(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *);
   3513   1.60     pooka int
   3514   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)
   3515   1.60     pooka {
   3516   1.93     pooka 	register_t retval[2];
   3517   1.60     pooka 	int error = 0;
   3518   1.68     pooka 	int rv = -1;
   3519   1.60     pooka 	struct compat_50_sys_kevent_args callarg;
   3520   1.60     pooka 
   3521   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3522   1.60     pooka 	SPARG(&callarg, fd) = fd;
   3523  1.159  christos 	SPARG(&callarg, changelist) = (const struct kevent100 *)changelist;
   3524   1.60     pooka 	SPARG(&callarg, nchanges) = nchanges;
   3525  1.159  christos 	SPARG(&callarg, eventlist) = (struct kevent100 *)eventlist;
   3526   1.60     pooka 	SPARG(&callarg, nevents) = nevents;
   3527   1.60     pooka 	SPARG(&callarg, timeout) = (const struct timespec50 *)timeout;
   3528   1.60     pooka 
   3529  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_kevent, &callarg, sizeof(callarg), retval);
   3530   1.63     pooka 	rsys_seterrno(error);
   3531   1.68     pooka 	if (error == 0) {
   3532   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3533   1.68     pooka 			rv = *(int *)retval;
   3534   1.68     pooka 		else
   3535   1.69     pooka 			rv = *retval;
   3536   1.60     pooka 	}
   3537   1.68     pooka 	return rv;
   3538   1.60     pooka }
   3539  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3540  1.103     pooka __weak_alias(kevent,rump___sysimpl_kevent);
   3541  1.103     pooka __weak_alias(_kevent,rump___sysimpl_kevent);
   3542  1.103     pooka __strong_alias(_sys_kevent,rump___sysimpl_kevent);
   3543  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3544  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   3545   1.60     pooka 
   3546   1.60     pooka int rump___sysimpl_fsync_range(int, int, off_t, off_t);
   3547   1.34     pooka int
   3548   1.60     pooka rump___sysimpl_fsync_range(int fd, int flags, off_t start, off_t length)
   3549   1.34     pooka {
   3550   1.93     pooka 	register_t retval[2];
   3551   1.34     pooka 	int error = 0;
   3552   1.68     pooka 	int rv = -1;
   3553   1.34     pooka 	struct sys_fsync_range_args callarg;
   3554   1.34     pooka 
   3555   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3556   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3557   1.34     pooka 	SPARG(&callarg, flags) = flags;
   3558   1.34     pooka 	SPARG(&callarg, start) = start;
   3559   1.34     pooka 	SPARG(&callarg, length) = length;
   3560   1.34     pooka 
   3561  1.120  pgoyette 	error = rsys_syscall(SYS_fsync_range, &callarg, sizeof(callarg), retval);
   3562   1.63     pooka 	rsys_seterrno(error);
   3563   1.68     pooka 	if (error == 0) {
   3564   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3565   1.68     pooka 			rv = *(int *)retval;
   3566   1.68     pooka 		else
   3567   1.69     pooka 			rv = *retval;
   3568   1.34     pooka 	}
   3569   1.68     pooka 	return rv;
   3570   1.34     pooka }
   3571  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3572  1.103     pooka __weak_alias(fsync_range,rump___sysimpl_fsync_range);
   3573  1.103     pooka __weak_alias(_fsync_range,rump___sysimpl_fsync_range);
   3574  1.103     pooka __strong_alias(_sys_fsync_range,rump___sysimpl_fsync_range);
   3575  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3576   1.34     pooka 
   3577   1.60     pooka int rump___sysimpl_extattrctl(const char *, int, const char *, int, const char *);
   3578   1.34     pooka int
   3579   1.60     pooka rump___sysimpl_extattrctl(const char * path, int cmd, const char * filename, int attrnamespace, const char * attrname)
   3580   1.34     pooka {
   3581   1.93     pooka 	register_t retval[2];
   3582   1.34     pooka 	int error = 0;
   3583   1.68     pooka 	int rv = -1;
   3584   1.34     pooka 	struct sys_extattrctl_args callarg;
   3585   1.34     pooka 
   3586   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3587   1.34     pooka 	SPARG(&callarg, path) = path;
   3588   1.34     pooka 	SPARG(&callarg, cmd) = cmd;
   3589   1.34     pooka 	SPARG(&callarg, filename) = filename;
   3590   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3591   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3592   1.34     pooka 
   3593  1.120  pgoyette 	error = rsys_syscall(SYS_extattrctl, &callarg, sizeof(callarg), retval);
   3594   1.63     pooka 	rsys_seterrno(error);
   3595   1.68     pooka 	if (error == 0) {
   3596   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3597   1.68     pooka 			rv = *(int *)retval;
   3598   1.68     pooka 		else
   3599   1.69     pooka 			rv = *retval;
   3600   1.34     pooka 	}
   3601   1.68     pooka 	return rv;
   3602   1.34     pooka }
   3603  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3604  1.103     pooka __weak_alias(extattrctl,rump___sysimpl_extattrctl);
   3605  1.103     pooka __weak_alias(_extattrctl,rump___sysimpl_extattrctl);
   3606  1.103     pooka __strong_alias(_sys_extattrctl,rump___sysimpl_extattrctl);
   3607  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3608   1.34     pooka 
   3609   1.60     pooka int rump___sysimpl_extattr_set_file(const char *, int, const char *, const void *, size_t);
   3610   1.34     pooka int
   3611   1.60     pooka rump___sysimpl_extattr_set_file(const char * path, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   3612   1.34     pooka {
   3613   1.93     pooka 	register_t retval[2];
   3614   1.34     pooka 	int error = 0;
   3615   1.68     pooka 	int rv = -1;
   3616   1.34     pooka 	struct sys_extattr_set_file_args callarg;
   3617   1.34     pooka 
   3618   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3619   1.34     pooka 	SPARG(&callarg, path) = path;
   3620   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3621   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3622   1.34     pooka 	SPARG(&callarg, data) = data;
   3623   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3624   1.34     pooka 
   3625  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_set_file, &callarg, sizeof(callarg), retval);
   3626   1.63     pooka 	rsys_seterrno(error);
   3627   1.68     pooka 	if (error == 0) {
   3628   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3629   1.68     pooka 			rv = *(int *)retval;
   3630   1.68     pooka 		else
   3631   1.69     pooka 			rv = *retval;
   3632   1.34     pooka 	}
   3633   1.68     pooka 	return rv;
   3634   1.34     pooka }
   3635  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3636  1.103     pooka __weak_alias(extattr_set_file,rump___sysimpl_extattr_set_file);
   3637  1.103     pooka __weak_alias(_extattr_set_file,rump___sysimpl_extattr_set_file);
   3638  1.103     pooka __strong_alias(_sys_extattr_set_file,rump___sysimpl_extattr_set_file);
   3639  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3640   1.34     pooka 
   3641   1.60     pooka ssize_t rump___sysimpl_extattr_get_file(const char *, int, const char *, void *, size_t);
   3642   1.34     pooka ssize_t
   3643   1.60     pooka rump___sysimpl_extattr_get_file(const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   3644   1.34     pooka {
   3645   1.93     pooka 	register_t retval[2];
   3646   1.34     pooka 	int error = 0;
   3647   1.68     pooka 	ssize_t rv = -1;
   3648   1.34     pooka 	struct sys_extattr_get_file_args callarg;
   3649   1.34     pooka 
   3650   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3651   1.34     pooka 	SPARG(&callarg, path) = path;
   3652   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3653   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3654   1.34     pooka 	SPARG(&callarg, data) = data;
   3655   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3656   1.34     pooka 
   3657  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_get_file, &callarg, sizeof(callarg), retval);
   3658   1.63     pooka 	rsys_seterrno(error);
   3659   1.68     pooka 	if (error == 0) {
   3660   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3661   1.68     pooka 			rv = *(ssize_t *)retval;
   3662   1.68     pooka 		else
   3663   1.69     pooka 			rv = *retval;
   3664   1.34     pooka 	}
   3665   1.68     pooka 	return rv;
   3666   1.34     pooka }
   3667  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3668  1.103     pooka __weak_alias(extattr_get_file,rump___sysimpl_extattr_get_file);
   3669  1.103     pooka __weak_alias(_extattr_get_file,rump___sysimpl_extattr_get_file);
   3670  1.103     pooka __strong_alias(_sys_extattr_get_file,rump___sysimpl_extattr_get_file);
   3671  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3672   1.34     pooka 
   3673   1.60     pooka int rump___sysimpl_extattr_delete_file(const char *, int, const char *);
   3674   1.34     pooka int
   3675   1.60     pooka rump___sysimpl_extattr_delete_file(const char * path, int attrnamespace, const char * attrname)
   3676   1.34     pooka {
   3677   1.93     pooka 	register_t retval[2];
   3678   1.34     pooka 	int error = 0;
   3679   1.68     pooka 	int rv = -1;
   3680   1.34     pooka 	struct sys_extattr_delete_file_args callarg;
   3681   1.34     pooka 
   3682   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3683   1.34     pooka 	SPARG(&callarg, path) = path;
   3684   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3685   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3686   1.34     pooka 
   3687  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_delete_file, &callarg, sizeof(callarg), retval);
   3688   1.63     pooka 	rsys_seterrno(error);
   3689   1.68     pooka 	if (error == 0) {
   3690   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3691   1.68     pooka 			rv = *(int *)retval;
   3692   1.68     pooka 		else
   3693   1.69     pooka 			rv = *retval;
   3694   1.34     pooka 	}
   3695   1.68     pooka 	return rv;
   3696   1.34     pooka }
   3697  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3698  1.103     pooka __weak_alias(extattr_delete_file,rump___sysimpl_extattr_delete_file);
   3699  1.103     pooka __weak_alias(_extattr_delete_file,rump___sysimpl_extattr_delete_file);
   3700  1.103     pooka __strong_alias(_sys_extattr_delete_file,rump___sysimpl_extattr_delete_file);
   3701  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3702   1.34     pooka 
   3703   1.60     pooka int rump___sysimpl_extattr_set_fd(int, int, const char *, const void *, size_t);
   3704   1.34     pooka int
   3705   1.60     pooka rump___sysimpl_extattr_set_fd(int fd, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   3706   1.34     pooka {
   3707   1.93     pooka 	register_t retval[2];
   3708   1.34     pooka 	int error = 0;
   3709   1.68     pooka 	int rv = -1;
   3710   1.34     pooka 	struct sys_extattr_set_fd_args callarg;
   3711   1.34     pooka 
   3712   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3713   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3714   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3715   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3716   1.34     pooka 	SPARG(&callarg, data) = data;
   3717   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3718   1.34     pooka 
   3719  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_set_fd, &callarg, sizeof(callarg), retval);
   3720   1.63     pooka 	rsys_seterrno(error);
   3721   1.68     pooka 	if (error == 0) {
   3722   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3723   1.68     pooka 			rv = *(int *)retval;
   3724   1.68     pooka 		else
   3725   1.69     pooka 			rv = *retval;
   3726   1.34     pooka 	}
   3727   1.68     pooka 	return rv;
   3728   1.34     pooka }
   3729  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3730  1.103     pooka __weak_alias(extattr_set_fd,rump___sysimpl_extattr_set_fd);
   3731  1.103     pooka __weak_alias(_extattr_set_fd,rump___sysimpl_extattr_set_fd);
   3732  1.103     pooka __strong_alias(_sys_extattr_set_fd,rump___sysimpl_extattr_set_fd);
   3733  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3734   1.34     pooka 
   3735   1.60     pooka ssize_t rump___sysimpl_extattr_get_fd(int, int, const char *, void *, size_t);
   3736   1.34     pooka ssize_t
   3737   1.60     pooka rump___sysimpl_extattr_get_fd(int fd, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   3738   1.34     pooka {
   3739   1.93     pooka 	register_t retval[2];
   3740   1.34     pooka 	int error = 0;
   3741   1.68     pooka 	ssize_t rv = -1;
   3742   1.34     pooka 	struct sys_extattr_get_fd_args callarg;
   3743   1.34     pooka 
   3744   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3745   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3746   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3747   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3748   1.34     pooka 	SPARG(&callarg, data) = data;
   3749   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3750   1.34     pooka 
   3751  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_get_fd, &callarg, sizeof(callarg), retval);
   3752   1.63     pooka 	rsys_seterrno(error);
   3753   1.68     pooka 	if (error == 0) {
   3754   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3755   1.68     pooka 			rv = *(ssize_t *)retval;
   3756   1.68     pooka 		else
   3757   1.69     pooka 			rv = *retval;
   3758   1.34     pooka 	}
   3759   1.68     pooka 	return rv;
   3760   1.34     pooka }
   3761  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3762  1.103     pooka __weak_alias(extattr_get_fd,rump___sysimpl_extattr_get_fd);
   3763  1.103     pooka __weak_alias(_extattr_get_fd,rump___sysimpl_extattr_get_fd);
   3764  1.103     pooka __strong_alias(_sys_extattr_get_fd,rump___sysimpl_extattr_get_fd);
   3765  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3766   1.34     pooka 
   3767   1.60     pooka int rump___sysimpl_extattr_delete_fd(int, int, const char *);
   3768   1.34     pooka int
   3769   1.60     pooka rump___sysimpl_extattr_delete_fd(int fd, int attrnamespace, const char * attrname)
   3770   1.34     pooka {
   3771   1.93     pooka 	register_t retval[2];
   3772   1.34     pooka 	int error = 0;
   3773   1.68     pooka 	int rv = -1;
   3774   1.34     pooka 	struct sys_extattr_delete_fd_args callarg;
   3775   1.34     pooka 
   3776   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3777   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3778   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3779   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3780   1.34     pooka 
   3781  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_delete_fd, &callarg, sizeof(callarg), retval);
   3782   1.63     pooka 	rsys_seterrno(error);
   3783   1.68     pooka 	if (error == 0) {
   3784   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3785   1.68     pooka 			rv = *(int *)retval;
   3786   1.68     pooka 		else
   3787   1.69     pooka 			rv = *retval;
   3788   1.34     pooka 	}
   3789   1.68     pooka 	return rv;
   3790   1.34     pooka }
   3791  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3792  1.103     pooka __weak_alias(extattr_delete_fd,rump___sysimpl_extattr_delete_fd);
   3793  1.103     pooka __weak_alias(_extattr_delete_fd,rump___sysimpl_extattr_delete_fd);
   3794  1.103     pooka __strong_alias(_sys_extattr_delete_fd,rump___sysimpl_extattr_delete_fd);
   3795  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3796   1.34     pooka 
   3797   1.60     pooka int rump___sysimpl_extattr_set_link(const char *, int, const char *, const void *, size_t);
   3798   1.34     pooka int
   3799   1.60     pooka rump___sysimpl_extattr_set_link(const char * path, int attrnamespace, const char * attrname, const void * data, size_t nbytes)
   3800   1.34     pooka {
   3801   1.93     pooka 	register_t retval[2];
   3802   1.34     pooka 	int error = 0;
   3803   1.68     pooka 	int rv = -1;
   3804   1.34     pooka 	struct sys_extattr_set_link_args callarg;
   3805   1.34     pooka 
   3806   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3807   1.34     pooka 	SPARG(&callarg, path) = path;
   3808   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3809   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3810   1.34     pooka 	SPARG(&callarg, data) = data;
   3811   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3812   1.34     pooka 
   3813  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_set_link, &callarg, sizeof(callarg), retval);
   3814   1.63     pooka 	rsys_seterrno(error);
   3815   1.68     pooka 	if (error == 0) {
   3816   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3817   1.68     pooka 			rv = *(int *)retval;
   3818   1.68     pooka 		else
   3819   1.69     pooka 			rv = *retval;
   3820   1.34     pooka 	}
   3821   1.68     pooka 	return rv;
   3822   1.34     pooka }
   3823  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3824  1.103     pooka __weak_alias(extattr_set_link,rump___sysimpl_extattr_set_link);
   3825  1.103     pooka __weak_alias(_extattr_set_link,rump___sysimpl_extattr_set_link);
   3826  1.103     pooka __strong_alias(_sys_extattr_set_link,rump___sysimpl_extattr_set_link);
   3827  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3828   1.34     pooka 
   3829   1.60     pooka ssize_t rump___sysimpl_extattr_get_link(const char *, int, const char *, void *, size_t);
   3830   1.34     pooka ssize_t
   3831   1.60     pooka rump___sysimpl_extattr_get_link(const char * path, int attrnamespace, const char * attrname, void * data, size_t nbytes)
   3832   1.34     pooka {
   3833   1.93     pooka 	register_t retval[2];
   3834   1.34     pooka 	int error = 0;
   3835   1.68     pooka 	ssize_t rv = -1;
   3836   1.34     pooka 	struct sys_extattr_get_link_args callarg;
   3837   1.34     pooka 
   3838   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3839   1.34     pooka 	SPARG(&callarg, path) = path;
   3840   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3841   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3842   1.34     pooka 	SPARG(&callarg, data) = data;
   3843   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3844   1.34     pooka 
   3845  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_get_link, &callarg, sizeof(callarg), retval);
   3846   1.63     pooka 	rsys_seterrno(error);
   3847   1.68     pooka 	if (error == 0) {
   3848   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3849   1.68     pooka 			rv = *(ssize_t *)retval;
   3850   1.68     pooka 		else
   3851   1.69     pooka 			rv = *retval;
   3852   1.34     pooka 	}
   3853   1.68     pooka 	return rv;
   3854   1.34     pooka }
   3855  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3856  1.103     pooka __weak_alias(extattr_get_link,rump___sysimpl_extattr_get_link);
   3857  1.103     pooka __weak_alias(_extattr_get_link,rump___sysimpl_extattr_get_link);
   3858  1.103     pooka __strong_alias(_sys_extattr_get_link,rump___sysimpl_extattr_get_link);
   3859  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3860   1.34     pooka 
   3861   1.60     pooka int rump___sysimpl_extattr_delete_link(const char *, int, const char *);
   3862   1.34     pooka int
   3863   1.60     pooka rump___sysimpl_extattr_delete_link(const char * path, int attrnamespace, const char * attrname)
   3864   1.34     pooka {
   3865   1.93     pooka 	register_t retval[2];
   3866   1.34     pooka 	int error = 0;
   3867   1.68     pooka 	int rv = -1;
   3868   1.34     pooka 	struct sys_extattr_delete_link_args callarg;
   3869   1.34     pooka 
   3870   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3871   1.34     pooka 	SPARG(&callarg, path) = path;
   3872   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3873   1.34     pooka 	SPARG(&callarg, attrname) = attrname;
   3874   1.34     pooka 
   3875  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_delete_link, &callarg, sizeof(callarg), retval);
   3876   1.63     pooka 	rsys_seterrno(error);
   3877   1.68     pooka 	if (error == 0) {
   3878   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   3879   1.68     pooka 			rv = *(int *)retval;
   3880   1.68     pooka 		else
   3881   1.69     pooka 			rv = *retval;
   3882   1.34     pooka 	}
   3883   1.68     pooka 	return rv;
   3884   1.34     pooka }
   3885  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3886  1.103     pooka __weak_alias(extattr_delete_link,rump___sysimpl_extattr_delete_link);
   3887  1.103     pooka __weak_alias(_extattr_delete_link,rump___sysimpl_extattr_delete_link);
   3888  1.103     pooka __strong_alias(_sys_extattr_delete_link,rump___sysimpl_extattr_delete_link);
   3889  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3890   1.34     pooka 
   3891   1.60     pooka ssize_t rump___sysimpl_extattr_list_fd(int, int, void *, size_t);
   3892   1.34     pooka ssize_t
   3893   1.60     pooka rump___sysimpl_extattr_list_fd(int fd, int attrnamespace, void * data, size_t nbytes)
   3894   1.34     pooka {
   3895   1.93     pooka 	register_t retval[2];
   3896   1.34     pooka 	int error = 0;
   3897   1.68     pooka 	ssize_t rv = -1;
   3898   1.34     pooka 	struct sys_extattr_list_fd_args callarg;
   3899   1.34     pooka 
   3900   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3901   1.34     pooka 	SPARG(&callarg, fd) = fd;
   3902   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3903   1.34     pooka 	SPARG(&callarg, data) = data;
   3904   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3905   1.34     pooka 
   3906  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_list_fd, &callarg, sizeof(callarg), retval);
   3907   1.63     pooka 	rsys_seterrno(error);
   3908   1.68     pooka 	if (error == 0) {
   3909   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3910   1.68     pooka 			rv = *(ssize_t *)retval;
   3911   1.68     pooka 		else
   3912   1.69     pooka 			rv = *retval;
   3913   1.34     pooka 	}
   3914   1.68     pooka 	return rv;
   3915   1.34     pooka }
   3916  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3917  1.103     pooka __weak_alias(extattr_list_fd,rump___sysimpl_extattr_list_fd);
   3918  1.103     pooka __weak_alias(_extattr_list_fd,rump___sysimpl_extattr_list_fd);
   3919  1.103     pooka __strong_alias(_sys_extattr_list_fd,rump___sysimpl_extattr_list_fd);
   3920  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3921   1.34     pooka 
   3922   1.60     pooka ssize_t rump___sysimpl_extattr_list_file(const char *, int, void *, size_t);
   3923   1.34     pooka ssize_t
   3924   1.60     pooka rump___sysimpl_extattr_list_file(const char * path, int attrnamespace, void * data, size_t nbytes)
   3925   1.34     pooka {
   3926   1.93     pooka 	register_t retval[2];
   3927   1.34     pooka 	int error = 0;
   3928   1.68     pooka 	ssize_t rv = -1;
   3929   1.34     pooka 	struct sys_extattr_list_file_args callarg;
   3930   1.34     pooka 
   3931   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3932   1.34     pooka 	SPARG(&callarg, path) = path;
   3933   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3934   1.34     pooka 	SPARG(&callarg, data) = data;
   3935   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3936   1.34     pooka 
   3937  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_list_file, &callarg, sizeof(callarg), retval);
   3938   1.63     pooka 	rsys_seterrno(error);
   3939   1.68     pooka 	if (error == 0) {
   3940   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3941   1.68     pooka 			rv = *(ssize_t *)retval;
   3942   1.68     pooka 		else
   3943   1.69     pooka 			rv = *retval;
   3944   1.34     pooka 	}
   3945   1.68     pooka 	return rv;
   3946   1.34     pooka }
   3947  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3948  1.103     pooka __weak_alias(extattr_list_file,rump___sysimpl_extattr_list_file);
   3949  1.103     pooka __weak_alias(_extattr_list_file,rump___sysimpl_extattr_list_file);
   3950  1.103     pooka __strong_alias(_sys_extattr_list_file,rump___sysimpl_extattr_list_file);
   3951  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3952   1.34     pooka 
   3953   1.60     pooka ssize_t rump___sysimpl_extattr_list_link(const char *, int, void *, size_t);
   3954   1.34     pooka ssize_t
   3955   1.60     pooka rump___sysimpl_extattr_list_link(const char * path, int attrnamespace, void * data, size_t nbytes)
   3956   1.34     pooka {
   3957   1.93     pooka 	register_t retval[2];
   3958   1.34     pooka 	int error = 0;
   3959   1.68     pooka 	ssize_t rv = -1;
   3960   1.34     pooka 	struct sys_extattr_list_link_args callarg;
   3961   1.34     pooka 
   3962   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3963   1.34     pooka 	SPARG(&callarg, path) = path;
   3964   1.34     pooka 	SPARG(&callarg, attrnamespace) = attrnamespace;
   3965   1.34     pooka 	SPARG(&callarg, data) = data;
   3966   1.34     pooka 	SPARG(&callarg, nbytes) = nbytes;
   3967   1.34     pooka 
   3968  1.120  pgoyette 	error = rsys_syscall(SYS_extattr_list_link, &callarg, sizeof(callarg), retval);
   3969   1.63     pooka 	rsys_seterrno(error);
   3970   1.68     pooka 	if (error == 0) {
   3971   1.68     pooka 		if (sizeof(ssize_t) > sizeof(register_t))
   3972   1.68     pooka 			rv = *(ssize_t *)retval;
   3973   1.68     pooka 		else
   3974   1.69     pooka 			rv = *retval;
   3975   1.34     pooka 	}
   3976   1.68     pooka 	return rv;
   3977   1.34     pooka }
   3978  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   3979  1.103     pooka __weak_alias(extattr_list_link,rump___sysimpl_extattr_list_link);
   3980  1.103     pooka __weak_alias(_extattr_list_link,rump___sysimpl_extattr_list_link);
   3981  1.103     pooka __strong_alias(_sys_extattr_list_link,rump___sysimpl_extattr_list_link);
   3982  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   3983   1.34     pooka 
   3984  1.103     pooka #ifdef RUMP_SYS_COMPAT
   3985   1.61     pooka int rump___sysimpl_pselect(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
   3986   1.61     pooka int
   3987   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)
   3988   1.61     pooka {
   3989   1.93     pooka 	register_t retval[2];
   3990   1.61     pooka 	int error = 0;
   3991   1.68     pooka 	int rv = -1;
   3992   1.61     pooka 	struct compat_50_sys_pselect_args callarg;
   3993   1.61     pooka 
   3994   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   3995   1.61     pooka 	SPARG(&callarg, nd) = nd;
   3996   1.61     pooka 	SPARG(&callarg, in) = in;
   3997   1.61     pooka 	SPARG(&callarg, ou) = ou;
   3998   1.61     pooka 	SPARG(&callarg, ex) = ex;
   3999   1.61     pooka 	SPARG(&callarg, ts) = (const struct timespec50 *)ts;
   4000   1.61     pooka 	SPARG(&callarg, mask) = mask;
   4001   1.61     pooka 
   4002  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_pselect, &callarg, sizeof(callarg), retval);
   4003   1.63     pooka 	rsys_seterrno(error);
   4004   1.68     pooka 	if (error == 0) {
   4005   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4006   1.68     pooka 			rv = *(int *)retval;
   4007   1.68     pooka 		else
   4008   1.69     pooka 			rv = *retval;
   4009   1.61     pooka 	}
   4010   1.68     pooka 	return rv;
   4011   1.61     pooka }
   4012  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4013  1.103     pooka __weak_alias(pselect,rump___sysimpl_pselect);
   4014  1.103     pooka __weak_alias(_pselect,rump___sysimpl_pselect);
   4015  1.103     pooka __strong_alias(_sys_pselect,rump___sysimpl_pselect);
   4016  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4017  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4018   1.61     pooka 
   4019  1.103     pooka #ifdef RUMP_SYS_COMPAT
   4020   1.60     pooka int rump___sysimpl_pollts(struct pollfd *, u_int, const struct timespec *, const sigset_t *);
   4021   1.60     pooka int
   4022   1.60     pooka rump___sysimpl_pollts(struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * mask)
   4023   1.60     pooka {
   4024   1.93     pooka 	register_t retval[2];
   4025   1.60     pooka 	int error = 0;
   4026   1.68     pooka 	int rv = -1;
   4027   1.60     pooka 	struct compat_50_sys_pollts_args callarg;
   4028   1.60     pooka 
   4029   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4030   1.60     pooka 	SPARG(&callarg, fds) = fds;
   4031   1.60     pooka 	SPARG(&callarg, nfds) = nfds;
   4032   1.60     pooka 	SPARG(&callarg, ts) = (const struct timespec50 *)ts;
   4033   1.60     pooka 	SPARG(&callarg, mask) = mask;
   4034   1.60     pooka 
   4035  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50_pollts, &callarg, sizeof(callarg), retval);
   4036   1.63     pooka 	rsys_seterrno(error);
   4037   1.68     pooka 	if (error == 0) {
   4038   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4039   1.68     pooka 			rv = *(int *)retval;
   4040   1.68     pooka 		else
   4041   1.69     pooka 			rv = *retval;
   4042   1.60     pooka 	}
   4043   1.68     pooka 	return rv;
   4044   1.60     pooka }
   4045  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4046  1.103     pooka __weak_alias(pollts,rump___sysimpl_pollts);
   4047  1.103     pooka __weak_alias(_pollts,rump___sysimpl_pollts);
   4048  1.103     pooka __strong_alias(_sys_pollts,rump___sysimpl_pollts);
   4049  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4050  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4051   1.60     pooka 
   4052   1.73  drochner int rump___sysimpl_setxattr(const char *, const char *, const void *, size_t, int);
   4053   1.34     pooka int
   4054   1.73  drochner rump___sysimpl_setxattr(const char * path, const char * name, const void * value, size_t size, int flags)
   4055   1.34     pooka {
   4056   1.93     pooka 	register_t retval[2];
   4057   1.34     pooka 	int error = 0;
   4058   1.68     pooka 	int rv = -1;
   4059   1.34     pooka 	struct sys_setxattr_args callarg;
   4060   1.34     pooka 
   4061   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4062   1.34     pooka 	SPARG(&callarg, path) = path;
   4063   1.34     pooka 	SPARG(&callarg, name) = name;
   4064   1.34     pooka 	SPARG(&callarg, value) = value;
   4065   1.34     pooka 	SPARG(&callarg, size) = size;
   4066   1.34     pooka 	SPARG(&callarg, flags) = flags;
   4067   1.34     pooka 
   4068  1.120  pgoyette 	error = rsys_syscall(SYS_setxattr, &callarg, sizeof(callarg), retval);
   4069   1.63     pooka 	rsys_seterrno(error);
   4070   1.68     pooka 	if (error == 0) {
   4071   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4072   1.68     pooka 			rv = *(int *)retval;
   4073   1.68     pooka 		else
   4074   1.69     pooka 			rv = *retval;
   4075   1.28     pooka 	}
   4076   1.68     pooka 	return rv;
   4077   1.28     pooka }
   4078  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4079  1.103     pooka __weak_alias(setxattr,rump___sysimpl_setxattr);
   4080  1.103     pooka __weak_alias(_setxattr,rump___sysimpl_setxattr);
   4081  1.103     pooka __strong_alias(_sys_setxattr,rump___sysimpl_setxattr);
   4082  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4083   1.28     pooka 
   4084   1.73  drochner int rump___sysimpl_lsetxattr(const char *, const char *, const void *, size_t, int);
   4085   1.10     pooka int
   4086   1.73  drochner rump___sysimpl_lsetxattr(const char * path, const char * name, const void * value, size_t size, int flags)
   4087    1.1     pooka {
   4088   1.93     pooka 	register_t retval[2];
   4089   1.27     pooka 	int error = 0;
   4090   1.68     pooka 	int rv = -1;
   4091   1.34     pooka 	struct sys_lsetxattr_args callarg;
   4092    1.1     pooka 
   4093   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4094   1.31     pooka 	SPARG(&callarg, path) = path;
   4095   1.34     pooka 	SPARG(&callarg, name) = name;
   4096   1.34     pooka 	SPARG(&callarg, value) = value;
   4097   1.34     pooka 	SPARG(&callarg, size) = size;
   4098   1.34     pooka 	SPARG(&callarg, flags) = flags;
   4099    1.1     pooka 
   4100  1.120  pgoyette 	error = rsys_syscall(SYS_lsetxattr, &callarg, sizeof(callarg), retval);
   4101   1.63     pooka 	rsys_seterrno(error);
   4102   1.68     pooka 	if (error == 0) {
   4103   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4104   1.68     pooka 			rv = *(int *)retval;
   4105   1.68     pooka 		else
   4106   1.69     pooka 			rv = *retval;
   4107   1.27     pooka 	}
   4108   1.68     pooka 	return rv;
   4109    1.1     pooka }
   4110  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4111  1.103     pooka __weak_alias(lsetxattr,rump___sysimpl_lsetxattr);
   4112  1.103     pooka __weak_alias(_lsetxattr,rump___sysimpl_lsetxattr);
   4113  1.103     pooka __strong_alias(_sys_lsetxattr,rump___sysimpl_lsetxattr);
   4114  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4115    1.1     pooka 
   4116   1.73  drochner int rump___sysimpl_fsetxattr(int, const char *, const void *, size_t, int);
   4117    1.1     pooka int
   4118   1.73  drochner rump___sysimpl_fsetxattr(int fd, const char * name, const void * value, size_t size, int flags)
   4119    1.1     pooka {
   4120   1.93     pooka 	register_t retval[2];
   4121   1.27     pooka 	int error = 0;
   4122   1.68     pooka 	int rv = -1;
   4123   1.34     pooka 	struct sys_fsetxattr_args callarg;
   4124    1.1     pooka 
   4125   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4126   1.34     pooka 	SPARG(&callarg, fd) = fd;
   4127   1.34     pooka 	SPARG(&callarg, name) = name;
   4128   1.34     pooka 	SPARG(&callarg, value) = value;
   4129   1.34     pooka 	SPARG(&callarg, size) = size;
   4130   1.34     pooka 	SPARG(&callarg, flags) = flags;
   4131    1.1     pooka 
   4132  1.120  pgoyette 	error = rsys_syscall(SYS_fsetxattr, &callarg, sizeof(callarg), retval);
   4133   1.63     pooka 	rsys_seterrno(error);
   4134   1.68     pooka 	if (error == 0) {
   4135   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4136   1.68     pooka 			rv = *(int *)retval;
   4137   1.68     pooka 		else
   4138   1.69     pooka 			rv = *retval;
   4139   1.27     pooka 	}
   4140   1.68     pooka 	return rv;
   4141    1.1     pooka }
   4142  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4143  1.103     pooka __weak_alias(fsetxattr,rump___sysimpl_fsetxattr);
   4144  1.103     pooka __weak_alias(_fsetxattr,rump___sysimpl_fsetxattr);
   4145  1.103     pooka __strong_alias(_sys_fsetxattr,rump___sysimpl_fsetxattr);
   4146  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4147    1.1     pooka 
   4148   1.60     pooka int rump___sysimpl_getxattr(const char *, const char *, void *, size_t);
   4149   1.11     pooka int
   4150   1.60     pooka rump___sysimpl_getxattr(const char * path, const char * name, void * value, size_t size)
   4151   1.22     pooka {
   4152   1.93     pooka 	register_t retval[2];
   4153   1.27     pooka 	int error = 0;
   4154   1.68     pooka 	int rv = -1;
   4155   1.34     pooka 	struct sys_getxattr_args callarg;
   4156   1.22     pooka 
   4157   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4158   1.34     pooka 	SPARG(&callarg, path) = path;
   4159   1.34     pooka 	SPARG(&callarg, name) = name;
   4160   1.34     pooka 	SPARG(&callarg, value) = value;
   4161   1.34     pooka 	SPARG(&callarg, size) = size;
   4162   1.22     pooka 
   4163  1.120  pgoyette 	error = rsys_syscall(SYS_getxattr, &callarg, sizeof(callarg), retval);
   4164   1.63     pooka 	rsys_seterrno(error);
   4165   1.68     pooka 	if (error == 0) {
   4166   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4167   1.68     pooka 			rv = *(int *)retval;
   4168   1.68     pooka 		else
   4169   1.69     pooka 			rv = *retval;
   4170   1.27     pooka 	}
   4171   1.68     pooka 	return rv;
   4172   1.22     pooka }
   4173  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4174  1.103     pooka __weak_alias(getxattr,rump___sysimpl_getxattr);
   4175  1.103     pooka __weak_alias(_getxattr,rump___sysimpl_getxattr);
   4176  1.103     pooka __strong_alias(_sys_getxattr,rump___sysimpl_getxattr);
   4177  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4178   1.22     pooka 
   4179   1.60     pooka int rump___sysimpl_lgetxattr(const char *, const char *, void *, size_t);
   4180   1.34     pooka int
   4181   1.60     pooka rump___sysimpl_lgetxattr(const char * path, const char * name, void * value, size_t size)
   4182    1.8     pooka {
   4183   1.93     pooka 	register_t retval[2];
   4184   1.27     pooka 	int error = 0;
   4185   1.68     pooka 	int rv = -1;
   4186   1.34     pooka 	struct sys_lgetxattr_args callarg;
   4187    1.8     pooka 
   4188   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4189   1.34     pooka 	SPARG(&callarg, path) = path;
   4190   1.34     pooka 	SPARG(&callarg, name) = name;
   4191   1.34     pooka 	SPARG(&callarg, value) = value;
   4192   1.34     pooka 	SPARG(&callarg, size) = size;
   4193    1.8     pooka 
   4194  1.120  pgoyette 	error = rsys_syscall(SYS_lgetxattr, &callarg, sizeof(callarg), retval);
   4195   1.63     pooka 	rsys_seterrno(error);
   4196   1.68     pooka 	if (error == 0) {
   4197   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4198   1.68     pooka 			rv = *(int *)retval;
   4199   1.68     pooka 		else
   4200   1.69     pooka 			rv = *retval;
   4201   1.27     pooka 	}
   4202   1.68     pooka 	return rv;
   4203    1.8     pooka }
   4204  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4205  1.103     pooka __weak_alias(lgetxattr,rump___sysimpl_lgetxattr);
   4206  1.103     pooka __weak_alias(_lgetxattr,rump___sysimpl_lgetxattr);
   4207  1.103     pooka __strong_alias(_sys_lgetxattr,rump___sysimpl_lgetxattr);
   4208  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4209    1.8     pooka 
   4210   1.60     pooka int rump___sysimpl_fgetxattr(int, const char *, void *, size_t);
   4211   1.34     pooka int
   4212   1.60     pooka rump___sysimpl_fgetxattr(int fd, const char * name, void * value, size_t size)
   4213    1.8     pooka {
   4214   1.93     pooka 	register_t retval[2];
   4215   1.27     pooka 	int error = 0;
   4216   1.68     pooka 	int rv = -1;
   4217   1.34     pooka 	struct sys_fgetxattr_args callarg;
   4218    1.8     pooka 
   4219   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4220   1.31     pooka 	SPARG(&callarg, fd) = fd;
   4221   1.34     pooka 	SPARG(&callarg, name) = name;
   4222   1.34     pooka 	SPARG(&callarg, value) = value;
   4223   1.34     pooka 	SPARG(&callarg, size) = size;
   4224    1.8     pooka 
   4225  1.120  pgoyette 	error = rsys_syscall(SYS_fgetxattr, &callarg, sizeof(callarg), retval);
   4226   1.63     pooka 	rsys_seterrno(error);
   4227   1.68     pooka 	if (error == 0) {
   4228   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4229   1.68     pooka 			rv = *(int *)retval;
   4230   1.68     pooka 		else
   4231   1.69     pooka 			rv = *retval;
   4232   1.27     pooka 	}
   4233   1.68     pooka 	return rv;
   4234    1.8     pooka }
   4235  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4236  1.103     pooka __weak_alias(fgetxattr,rump___sysimpl_fgetxattr);
   4237  1.103     pooka __weak_alias(_fgetxattr,rump___sysimpl_fgetxattr);
   4238  1.103     pooka __strong_alias(_sys_fgetxattr,rump___sysimpl_fgetxattr);
   4239  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4240    1.8     pooka 
   4241   1.60     pooka int rump___sysimpl_listxattr(const char *, char *, size_t);
   4242    1.1     pooka int
   4243   1.60     pooka rump___sysimpl_listxattr(const char * path, char * list, size_t size)
   4244    1.1     pooka {
   4245   1.93     pooka 	register_t retval[2];
   4246   1.27     pooka 	int error = 0;
   4247   1.68     pooka 	int rv = -1;
   4248   1.34     pooka 	struct sys_listxattr_args callarg;
   4249    1.1     pooka 
   4250   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4251   1.31     pooka 	SPARG(&callarg, path) = path;
   4252   1.34     pooka 	SPARG(&callarg, list) = list;
   4253   1.34     pooka 	SPARG(&callarg, size) = size;
   4254    1.1     pooka 
   4255  1.120  pgoyette 	error = rsys_syscall(SYS_listxattr, &callarg, sizeof(callarg), retval);
   4256   1.63     pooka 	rsys_seterrno(error);
   4257   1.68     pooka 	if (error == 0) {
   4258   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4259   1.68     pooka 			rv = *(int *)retval;
   4260   1.68     pooka 		else
   4261   1.69     pooka 			rv = *retval;
   4262   1.27     pooka 	}
   4263   1.68     pooka 	return rv;
   4264    1.1     pooka }
   4265  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4266  1.103     pooka __weak_alias(listxattr,rump___sysimpl_listxattr);
   4267  1.103     pooka __weak_alias(_listxattr,rump___sysimpl_listxattr);
   4268  1.103     pooka __strong_alias(_sys_listxattr,rump___sysimpl_listxattr);
   4269  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4270    1.1     pooka 
   4271   1.60     pooka int rump___sysimpl_llistxattr(const char *, char *, size_t);
   4272    1.1     pooka int
   4273   1.60     pooka rump___sysimpl_llistxattr(const char * path, char * list, size_t size)
   4274   1.13     pooka {
   4275   1.93     pooka 	register_t retval[2];
   4276   1.27     pooka 	int error = 0;
   4277   1.68     pooka 	int rv = -1;
   4278   1.34     pooka 	struct sys_llistxattr_args callarg;
   4279   1.13     pooka 
   4280   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4281   1.34     pooka 	SPARG(&callarg, path) = path;
   4282   1.34     pooka 	SPARG(&callarg, list) = list;
   4283   1.34     pooka 	SPARG(&callarg, size) = size;
   4284   1.13     pooka 
   4285  1.120  pgoyette 	error = rsys_syscall(SYS_llistxattr, &callarg, sizeof(callarg), retval);
   4286   1.63     pooka 	rsys_seterrno(error);
   4287   1.68     pooka 	if (error == 0) {
   4288   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4289   1.68     pooka 			rv = *(int *)retval;
   4290   1.68     pooka 		else
   4291   1.69     pooka 			rv = *retval;
   4292   1.27     pooka 	}
   4293   1.68     pooka 	return rv;
   4294   1.13     pooka }
   4295  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4296  1.103     pooka __weak_alias(llistxattr,rump___sysimpl_llistxattr);
   4297  1.103     pooka __weak_alias(_llistxattr,rump___sysimpl_llistxattr);
   4298  1.103     pooka __strong_alias(_sys_llistxattr,rump___sysimpl_llistxattr);
   4299  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4300   1.13     pooka 
   4301   1.60     pooka int rump___sysimpl_flistxattr(int, char *, size_t);
   4302   1.13     pooka int
   4303   1.60     pooka rump___sysimpl_flistxattr(int fd, char * list, size_t size)
   4304    1.1     pooka {
   4305   1.93     pooka 	register_t retval[2];
   4306   1.27     pooka 	int error = 0;
   4307   1.68     pooka 	int rv = -1;
   4308   1.34     pooka 	struct sys_flistxattr_args callarg;
   4309    1.1     pooka 
   4310   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4311   1.34     pooka 	SPARG(&callarg, fd) = fd;
   4312   1.34     pooka 	SPARG(&callarg, list) = list;
   4313   1.34     pooka 	SPARG(&callarg, size) = size;
   4314    1.1     pooka 
   4315  1.120  pgoyette 	error = rsys_syscall(SYS_flistxattr, &callarg, sizeof(callarg), retval);
   4316   1.63     pooka 	rsys_seterrno(error);
   4317   1.68     pooka 	if (error == 0) {
   4318   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4319   1.68     pooka 			rv = *(int *)retval;
   4320   1.68     pooka 		else
   4321   1.69     pooka 			rv = *retval;
   4322   1.27     pooka 	}
   4323   1.68     pooka 	return rv;
   4324    1.1     pooka }
   4325  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4326  1.103     pooka __weak_alias(flistxattr,rump___sysimpl_flistxattr);
   4327  1.103     pooka __weak_alias(_flistxattr,rump___sysimpl_flistxattr);
   4328  1.103     pooka __strong_alias(_sys_flistxattr,rump___sysimpl_flistxattr);
   4329  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4330    1.1     pooka 
   4331   1.60     pooka int rump___sysimpl_removexattr(const char *, const char *);
   4332    1.1     pooka int
   4333   1.60     pooka rump___sysimpl_removexattr(const char * path, const char * name)
   4334    1.1     pooka {
   4335   1.93     pooka 	register_t retval[2];
   4336   1.27     pooka 	int error = 0;
   4337   1.68     pooka 	int rv = -1;
   4338   1.34     pooka 	struct sys_removexattr_args callarg;
   4339    1.1     pooka 
   4340   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4341   1.31     pooka 	SPARG(&callarg, path) = path;
   4342   1.34     pooka 	SPARG(&callarg, name) = name;
   4343    1.1     pooka 
   4344  1.120  pgoyette 	error = rsys_syscall(SYS_removexattr, &callarg, sizeof(callarg), retval);
   4345   1.63     pooka 	rsys_seterrno(error);
   4346   1.68     pooka 	if (error == 0) {
   4347   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4348   1.68     pooka 			rv = *(int *)retval;
   4349   1.68     pooka 		else
   4350   1.69     pooka 			rv = *retval;
   4351   1.27     pooka 	}
   4352   1.68     pooka 	return rv;
   4353    1.1     pooka }
   4354  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4355  1.103     pooka __weak_alias(removexattr,rump___sysimpl_removexattr);
   4356  1.103     pooka __weak_alias(_removexattr,rump___sysimpl_removexattr);
   4357  1.103     pooka __strong_alias(_sys_removexattr,rump___sysimpl_removexattr);
   4358  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4359    1.1     pooka 
   4360   1.60     pooka int rump___sysimpl_lremovexattr(const char *, const char *);
   4361   1.10     pooka int
   4362   1.60     pooka rump___sysimpl_lremovexattr(const char * path, const char * name)
   4363   1.11     pooka {
   4364   1.93     pooka 	register_t retval[2];
   4365   1.27     pooka 	int error = 0;
   4366   1.68     pooka 	int rv = -1;
   4367   1.34     pooka 	struct sys_lremovexattr_args callarg;
   4368   1.11     pooka 
   4369   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4370   1.31     pooka 	SPARG(&callarg, path) = path;
   4371   1.34     pooka 	SPARG(&callarg, name) = name;
   4372   1.11     pooka 
   4373  1.120  pgoyette 	error = rsys_syscall(SYS_lremovexattr, &callarg, sizeof(callarg), retval);
   4374   1.63     pooka 	rsys_seterrno(error);
   4375   1.68     pooka 	if (error == 0) {
   4376   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4377   1.68     pooka 			rv = *(int *)retval;
   4378   1.68     pooka 		else
   4379   1.69     pooka 			rv = *retval;
   4380   1.27     pooka 	}
   4381   1.68     pooka 	return rv;
   4382   1.11     pooka }
   4383  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4384  1.103     pooka __weak_alias(lremovexattr,rump___sysimpl_lremovexattr);
   4385  1.103     pooka __weak_alias(_lremovexattr,rump___sysimpl_lremovexattr);
   4386  1.103     pooka __strong_alias(_sys_lremovexattr,rump___sysimpl_lremovexattr);
   4387  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4388   1.11     pooka 
   4389   1.60     pooka int rump___sysimpl_fremovexattr(int, const char *);
   4390   1.32     pooka int
   4391   1.60     pooka rump___sysimpl_fremovexattr(int fd, const char * name)
   4392   1.32     pooka {
   4393   1.93     pooka 	register_t retval[2];
   4394   1.32     pooka 	int error = 0;
   4395   1.68     pooka 	int rv = -1;
   4396   1.34     pooka 	struct sys_fremovexattr_args callarg;
   4397   1.34     pooka 
   4398   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4399   1.34     pooka 	SPARG(&callarg, fd) = fd;
   4400   1.34     pooka 	SPARG(&callarg, name) = name;
   4401   1.32     pooka 
   4402  1.120  pgoyette 	error = rsys_syscall(SYS_fremovexattr, &callarg, sizeof(callarg), retval);
   4403   1.63     pooka 	rsys_seterrno(error);
   4404   1.68     pooka 	if (error == 0) {
   4405   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4406   1.68     pooka 			rv = *(int *)retval;
   4407   1.68     pooka 		else
   4408   1.69     pooka 			rv = *retval;
   4409   1.32     pooka 	}
   4410   1.68     pooka 	return rv;
   4411   1.32     pooka }
   4412  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4413  1.103     pooka __weak_alias(fremovexattr,rump___sysimpl_fremovexattr);
   4414  1.103     pooka __weak_alias(_fremovexattr,rump___sysimpl_fremovexattr);
   4415  1.103     pooka __strong_alias(_sys_fremovexattr,rump___sysimpl_fremovexattr);
   4416  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4417   1.32     pooka 
   4418  1.103     pooka #ifdef RUMP_SYS_COMPAT
   4419   1.60     pooka int rump___sysimpl_stat30(const char *, struct stat *);
   4420   1.60     pooka int
   4421   1.60     pooka rump___sysimpl_stat30(const char * path, struct stat * ub)
   4422   1.60     pooka {
   4423   1.93     pooka 	register_t retval[2];
   4424   1.60     pooka 	int error = 0;
   4425   1.68     pooka 	int rv = -1;
   4426   1.60     pooka 	struct compat_50_sys___stat30_args callarg;
   4427   1.60     pooka 
   4428   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4429   1.60     pooka 	SPARG(&callarg, path) = path;
   4430   1.60     pooka 	SPARG(&callarg, ub) = (struct stat30 *)ub;
   4431   1.60     pooka 
   4432  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50___stat30, &callarg, sizeof(callarg), retval);
   4433   1.63     pooka 	rsys_seterrno(error);
   4434   1.68     pooka 	if (error == 0) {
   4435   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4436   1.68     pooka 			rv = *(int *)retval;
   4437   1.68     pooka 		else
   4438   1.69     pooka 			rv = *retval;
   4439   1.60     pooka 	}
   4440   1.68     pooka 	return rv;
   4441   1.60     pooka }
   4442  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4443  1.103     pooka __weak_alias(stat,rump___sysimpl_stat30);
   4444  1.103     pooka __weak_alias(__stat30,rump___sysimpl_stat30);
   4445  1.103     pooka __weak_alias(___stat30,rump___sysimpl_stat30);
   4446  1.103     pooka __strong_alias(_sys___stat30,rump___sysimpl_stat30);
   4447  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4448  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4449   1.60     pooka 
   4450  1.103     pooka #ifdef RUMP_SYS_COMPAT
   4451   1.60     pooka int rump___sysimpl_fstat30(int, struct stat *);
   4452   1.60     pooka int
   4453   1.60     pooka rump___sysimpl_fstat30(int fd, struct stat * sb)
   4454   1.60     pooka {
   4455   1.93     pooka 	register_t retval[2];
   4456   1.60     pooka 	int error = 0;
   4457   1.68     pooka 	int rv = -1;
   4458   1.60     pooka 	struct compat_50_sys___fstat30_args callarg;
   4459   1.60     pooka 
   4460   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4461   1.60     pooka 	SPARG(&callarg, fd) = fd;
   4462   1.60     pooka 	SPARG(&callarg, sb) = (struct stat30 *)sb;
   4463   1.60     pooka 
   4464  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50___fstat30, &callarg, sizeof(callarg), retval);
   4465   1.63     pooka 	rsys_seterrno(error);
   4466   1.68     pooka 	if (error == 0) {
   4467   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4468   1.68     pooka 			rv = *(int *)retval;
   4469   1.68     pooka 		else
   4470   1.69     pooka 			rv = *retval;
   4471   1.60     pooka 	}
   4472   1.68     pooka 	return rv;
   4473   1.60     pooka }
   4474  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4475  1.103     pooka __weak_alias(fstat,rump___sysimpl_fstat30);
   4476  1.103     pooka __weak_alias(__fstat30,rump___sysimpl_fstat30);
   4477  1.103     pooka __weak_alias(___fstat30,rump___sysimpl_fstat30);
   4478  1.103     pooka __strong_alias(_sys___fstat30,rump___sysimpl_fstat30);
   4479  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4480  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4481   1.60     pooka 
   4482  1.103     pooka #ifdef RUMP_SYS_COMPAT
   4483   1.60     pooka int rump___sysimpl_lstat30(const char *, struct stat *);
   4484   1.60     pooka int
   4485   1.60     pooka rump___sysimpl_lstat30(const char * path, struct stat * ub)
   4486   1.60     pooka {
   4487   1.93     pooka 	register_t retval[2];
   4488   1.60     pooka 	int error = 0;
   4489   1.68     pooka 	int rv = -1;
   4490   1.60     pooka 	struct compat_50_sys___lstat30_args callarg;
   4491   1.60     pooka 
   4492   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4493   1.60     pooka 	SPARG(&callarg, path) = path;
   4494   1.60     pooka 	SPARG(&callarg, ub) = (struct stat30 *)ub;
   4495   1.60     pooka 
   4496  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50___lstat30, &callarg, sizeof(callarg), retval);
   4497   1.63     pooka 	rsys_seterrno(error);
   4498   1.68     pooka 	if (error == 0) {
   4499   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4500   1.68     pooka 			rv = *(int *)retval;
   4501   1.68     pooka 		else
   4502   1.69     pooka 			rv = *retval;
   4503   1.60     pooka 	}
   4504   1.68     pooka 	return rv;
   4505   1.60     pooka }
   4506  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4507  1.103     pooka __weak_alias(lstat,rump___sysimpl_lstat30);
   4508  1.103     pooka __weak_alias(__lstat30,rump___sysimpl_lstat30);
   4509  1.103     pooka __weak_alias(___lstat30,rump___sysimpl_lstat30);
   4510  1.103     pooka __strong_alias(_sys___lstat30,rump___sysimpl_lstat30);
   4511  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4512  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4513   1.60     pooka 
   4514   1.60     pooka int rump___sysimpl_getdents30(int, char *, size_t);
   4515   1.11     pooka int
   4516   1.60     pooka rump___sysimpl_getdents30(int fd, char * buf, size_t count)
   4517   1.10     pooka {
   4518   1.93     pooka 	register_t retval[2];
   4519   1.27     pooka 	int error = 0;
   4520   1.68     pooka 	int rv = -1;
   4521   1.34     pooka 	struct sys___getdents30_args callarg;
   4522   1.10     pooka 
   4523   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4524   1.34     pooka 	SPARG(&callarg, fd) = fd;
   4525   1.31     pooka 	SPARG(&callarg, buf) = buf;
   4526   1.34     pooka 	SPARG(&callarg, count) = count;
   4527   1.10     pooka 
   4528  1.120  pgoyette 	error = rsys_syscall(SYS___getdents30, &callarg, sizeof(callarg), retval);
   4529   1.63     pooka 	rsys_seterrno(error);
   4530   1.68     pooka 	if (error == 0) {
   4531   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4532   1.68     pooka 			rv = *(int *)retval;
   4533   1.68     pooka 		else
   4534   1.69     pooka 			rv = *retval;
   4535   1.27     pooka 	}
   4536   1.68     pooka 	return rv;
   4537   1.23  christos }
   4538  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4539  1.103     pooka __weak_alias(getdents,rump___sysimpl_getdents30);
   4540  1.103     pooka __weak_alias(__getdents30,rump___sysimpl_getdents30);
   4541  1.103     pooka __weak_alias(___getdents30,rump___sysimpl_getdents30);
   4542  1.103     pooka __strong_alias(_sys___getdents30,rump___sysimpl_getdents30);
   4543  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4544   1.23  christos 
   4545   1.60     pooka int rump___sysimpl_socket30(int, int, int);
   4546   1.23  christos int
   4547   1.60     pooka rump___sysimpl_socket30(int domain, int type, int protocol)
   4548   1.23  christos {
   4549   1.93     pooka 	register_t retval[2];
   4550   1.27     pooka 	int error = 0;
   4551   1.68     pooka 	int rv = -1;
   4552   1.31     pooka 	struct sys___socket30_args callarg;
   4553   1.23  christos 
   4554   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4555   1.31     pooka 	SPARG(&callarg, domain) = domain;
   4556   1.31     pooka 	SPARG(&callarg, type) = type;
   4557   1.31     pooka 	SPARG(&callarg, protocol) = protocol;
   4558   1.23  christos 
   4559  1.120  pgoyette 	error = rsys_syscall(SYS___socket30, &callarg, sizeof(callarg), retval);
   4560   1.63     pooka 	rsys_seterrno(error);
   4561   1.68     pooka 	if (error == 0) {
   4562   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4563   1.68     pooka 			rv = *(int *)retval;
   4564   1.68     pooka 		else
   4565   1.69     pooka 			rv = *retval;
   4566   1.27     pooka 	}
   4567   1.68     pooka 	return rv;
   4568   1.23  christos }
   4569  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4570  1.103     pooka __weak_alias(socket,rump___sysimpl_socket30);
   4571  1.103     pooka __weak_alias(__socket30,rump___sysimpl_socket30);
   4572  1.103     pooka __weak_alias(___socket30,rump___sysimpl_socket30);
   4573  1.103     pooka __strong_alias(_sys___socket30,rump___sysimpl_socket30);
   4574  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4575   1.23  christos 
   4576   1.60     pooka int rump___sysimpl_getfh30(const char *, void *, size_t *);
   4577   1.23  christos int
   4578   1.60     pooka rump___sysimpl_getfh30(const char * fname, void * fhp, size_t * fh_size)
   4579   1.23  christos {
   4580   1.93     pooka 	register_t retval[2];
   4581   1.27     pooka 	int error = 0;
   4582   1.68     pooka 	int rv = -1;
   4583   1.31     pooka 	struct sys___getfh30_args callarg;
   4584   1.23  christos 
   4585   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4586   1.31     pooka 	SPARG(&callarg, fname) = fname;
   4587   1.31     pooka 	SPARG(&callarg, fhp) = fhp;
   4588   1.31     pooka 	SPARG(&callarg, fh_size) = fh_size;
   4589   1.23  christos 
   4590  1.120  pgoyette 	error = rsys_syscall(SYS___getfh30, &callarg, sizeof(callarg), retval);
   4591   1.63     pooka 	rsys_seterrno(error);
   4592   1.68     pooka 	if (error == 0) {
   4593   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4594   1.68     pooka 			rv = *(int *)retval;
   4595   1.68     pooka 		else
   4596   1.69     pooka 			rv = *retval;
   4597   1.27     pooka 	}
   4598   1.68     pooka 	return rv;
   4599   1.10     pooka }
   4600  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4601  1.103     pooka __weak_alias(getfh,rump___sysimpl_getfh30);
   4602  1.103     pooka __weak_alias(__getfh30,rump___sysimpl_getfh30);
   4603  1.103     pooka __weak_alias(___getfh30,rump___sysimpl_getfh30);
   4604  1.103     pooka __strong_alias(_sys___getfh30,rump___sysimpl_getfh30);
   4605  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4606   1.10     pooka 
   4607   1.60     pooka int rump___sysimpl_fhopen40(const void *, size_t, int);
   4608   1.36     pooka int
   4609   1.60     pooka rump___sysimpl_fhopen40(const void * fhp, size_t fh_size, int flags)
   4610   1.36     pooka {
   4611   1.93     pooka 	register_t retval[2];
   4612   1.36     pooka 	int error = 0;
   4613   1.68     pooka 	int rv = -1;
   4614   1.36     pooka 	struct sys___fhopen40_args callarg;
   4615   1.36     pooka 
   4616   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4617   1.36     pooka 	SPARG(&callarg, fhp) = fhp;
   4618   1.36     pooka 	SPARG(&callarg, fh_size) = fh_size;
   4619   1.36     pooka 	SPARG(&callarg, flags) = flags;
   4620   1.36     pooka 
   4621  1.120  pgoyette 	error = rsys_syscall(SYS___fhopen40, &callarg, sizeof(callarg), retval);
   4622   1.63     pooka 	rsys_seterrno(error);
   4623   1.68     pooka 	if (error == 0) {
   4624   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4625   1.68     pooka 			rv = *(int *)retval;
   4626   1.68     pooka 		else
   4627   1.69     pooka 			rv = *retval;
   4628   1.36     pooka 	}
   4629   1.68     pooka 	return rv;
   4630   1.36     pooka }
   4631  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4632  1.103     pooka __weak_alias(fhopen,rump___sysimpl_fhopen40);
   4633  1.103     pooka __weak_alias(__fhopen40,rump___sysimpl_fhopen40);
   4634  1.103     pooka __weak_alias(___fhopen40,rump___sysimpl_fhopen40);
   4635  1.103     pooka __strong_alias(_sys___fhopen40,rump___sysimpl_fhopen40);
   4636  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4637   1.36     pooka 
   4638  1.103     pooka #ifdef RUMP_SYS_COMPAT
   4639   1.61     pooka int rump___sysimpl_fhstat40(const void *, size_t, struct stat *);
   4640   1.61     pooka int
   4641   1.61     pooka rump___sysimpl_fhstat40(const void * fhp, size_t fh_size, struct stat * sb)
   4642   1.61     pooka {
   4643   1.93     pooka 	register_t retval[2];
   4644   1.61     pooka 	int error = 0;
   4645   1.68     pooka 	int rv = -1;
   4646   1.61     pooka 	struct compat_50_sys___fhstat40_args callarg;
   4647   1.61     pooka 
   4648   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4649   1.61     pooka 	SPARG(&callarg, fhp) = fhp;
   4650   1.61     pooka 	SPARG(&callarg, fh_size) = fh_size;
   4651   1.61     pooka 	SPARG(&callarg, sb) = (struct stat30 *)sb;
   4652   1.61     pooka 
   4653  1.120  pgoyette 	error = rsys_syscall(SYS_compat_50___fhstat40, &callarg, sizeof(callarg), retval);
   4654   1.63     pooka 	rsys_seterrno(error);
   4655   1.68     pooka 	if (error == 0) {
   4656   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4657   1.68     pooka 			rv = *(int *)retval;
   4658   1.68     pooka 		else
   4659   1.69     pooka 			rv = *retval;
   4660   1.61     pooka 	}
   4661   1.68     pooka 	return rv;
   4662   1.61     pooka }
   4663  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4664  1.103     pooka __weak_alias(fhstat,rump___sysimpl_fhstat40);
   4665  1.103     pooka __weak_alias(__fhstat40,rump___sysimpl_fhstat40);
   4666  1.103     pooka __weak_alias(___fhstat40,rump___sysimpl_fhstat40);
   4667  1.103     pooka __strong_alias(_sys___fhstat40,rump___sysimpl_fhstat40);
   4668  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4669  1.103     pooka #endif /* RUMP_SYS_COMPAT */
   4670   1.61     pooka 
   4671   1.99     pooka int rump___sysimpl_aio_cancel(int, struct aiocb *);
   4672   1.99     pooka int
   4673   1.99     pooka rump___sysimpl_aio_cancel(int fildes, struct aiocb * aiocbp)
   4674   1.99     pooka {
   4675   1.99     pooka 	register_t retval[2];
   4676   1.99     pooka 	int error = 0;
   4677   1.99     pooka 	int rv = -1;
   4678   1.99     pooka 	struct sys_aio_cancel_args callarg;
   4679   1.99     pooka 
   4680   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4681   1.99     pooka 	SPARG(&callarg, fildes) = fildes;
   4682   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4683   1.99     pooka 
   4684  1.120  pgoyette 	error = rsys_syscall(SYS_aio_cancel, &callarg, sizeof(callarg), retval);
   4685   1.99     pooka 	rsys_seterrno(error);
   4686   1.99     pooka 	if (error == 0) {
   4687   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4688   1.99     pooka 			rv = *(int *)retval;
   4689   1.99     pooka 		else
   4690   1.99     pooka 			rv = *retval;
   4691   1.99     pooka 	}
   4692   1.99     pooka 	return rv;
   4693   1.99     pooka }
   4694  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4695  1.103     pooka __weak_alias(aio_cancel,rump___sysimpl_aio_cancel);
   4696  1.103     pooka __weak_alias(_aio_cancel,rump___sysimpl_aio_cancel);
   4697  1.103     pooka __strong_alias(_sys_aio_cancel,rump___sysimpl_aio_cancel);
   4698  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4699   1.99     pooka 
   4700   1.99     pooka int rump___sysimpl_aio_error(const struct aiocb *);
   4701   1.99     pooka int
   4702   1.99     pooka rump___sysimpl_aio_error(const struct aiocb * aiocbp)
   4703   1.99     pooka {
   4704   1.99     pooka 	register_t retval[2];
   4705   1.99     pooka 	int error = 0;
   4706   1.99     pooka 	int rv = -1;
   4707   1.99     pooka 	struct sys_aio_error_args callarg;
   4708   1.99     pooka 
   4709   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4710   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4711   1.99     pooka 
   4712  1.120  pgoyette 	error = rsys_syscall(SYS_aio_error, &callarg, sizeof(callarg), retval);
   4713   1.99     pooka 	rsys_seterrno(error);
   4714   1.99     pooka 	if (error == 0) {
   4715   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4716   1.99     pooka 			rv = *(int *)retval;
   4717   1.99     pooka 		else
   4718   1.99     pooka 			rv = *retval;
   4719   1.99     pooka 	}
   4720   1.99     pooka 	return rv;
   4721   1.99     pooka }
   4722  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4723  1.103     pooka __weak_alias(aio_error,rump___sysimpl_aio_error);
   4724  1.103     pooka __weak_alias(_aio_error,rump___sysimpl_aio_error);
   4725  1.103     pooka __strong_alias(_sys_aio_error,rump___sysimpl_aio_error);
   4726  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4727   1.99     pooka 
   4728   1.99     pooka int rump___sysimpl_aio_fsync(int, struct aiocb *);
   4729   1.99     pooka int
   4730   1.99     pooka rump___sysimpl_aio_fsync(int op, struct aiocb * aiocbp)
   4731   1.99     pooka {
   4732   1.99     pooka 	register_t retval[2];
   4733   1.99     pooka 	int error = 0;
   4734   1.99     pooka 	int rv = -1;
   4735   1.99     pooka 	struct sys_aio_fsync_args callarg;
   4736   1.99     pooka 
   4737   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4738   1.99     pooka 	SPARG(&callarg, op) = op;
   4739   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4740   1.99     pooka 
   4741  1.120  pgoyette 	error = rsys_syscall(SYS_aio_fsync, &callarg, sizeof(callarg), retval);
   4742   1.99     pooka 	rsys_seterrno(error);
   4743   1.99     pooka 	if (error == 0) {
   4744   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4745   1.99     pooka 			rv = *(int *)retval;
   4746   1.99     pooka 		else
   4747   1.99     pooka 			rv = *retval;
   4748   1.99     pooka 	}
   4749   1.99     pooka 	return rv;
   4750   1.99     pooka }
   4751  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4752  1.103     pooka __weak_alias(aio_fsync,rump___sysimpl_aio_fsync);
   4753  1.103     pooka __weak_alias(_aio_fsync,rump___sysimpl_aio_fsync);
   4754  1.103     pooka __strong_alias(_sys_aio_fsync,rump___sysimpl_aio_fsync);
   4755  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4756   1.99     pooka 
   4757   1.99     pooka int rump___sysimpl_aio_read(struct aiocb *);
   4758   1.99     pooka int
   4759   1.99     pooka rump___sysimpl_aio_read(struct aiocb * aiocbp)
   4760   1.99     pooka {
   4761   1.99     pooka 	register_t retval[2];
   4762   1.99     pooka 	int error = 0;
   4763   1.99     pooka 	int rv = -1;
   4764   1.99     pooka 	struct sys_aio_read_args callarg;
   4765   1.99     pooka 
   4766   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4767   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4768   1.99     pooka 
   4769  1.120  pgoyette 	error = rsys_syscall(SYS_aio_read, &callarg, sizeof(callarg), retval);
   4770   1.99     pooka 	rsys_seterrno(error);
   4771   1.99     pooka 	if (error == 0) {
   4772   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4773   1.99     pooka 			rv = *(int *)retval;
   4774   1.99     pooka 		else
   4775   1.99     pooka 			rv = *retval;
   4776   1.99     pooka 	}
   4777   1.99     pooka 	return rv;
   4778   1.99     pooka }
   4779  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4780  1.103     pooka __weak_alias(aio_read,rump___sysimpl_aio_read);
   4781  1.103     pooka __weak_alias(_aio_read,rump___sysimpl_aio_read);
   4782  1.103     pooka __strong_alias(_sys_aio_read,rump___sysimpl_aio_read);
   4783  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4784   1.99     pooka 
   4785   1.99     pooka int rump___sysimpl_aio_return(struct aiocb *);
   4786   1.99     pooka int
   4787   1.99     pooka rump___sysimpl_aio_return(struct aiocb * aiocbp)
   4788   1.99     pooka {
   4789   1.99     pooka 	register_t retval[2];
   4790   1.99     pooka 	int error = 0;
   4791   1.99     pooka 	int rv = -1;
   4792   1.99     pooka 	struct sys_aio_return_args callarg;
   4793   1.99     pooka 
   4794   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4795   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4796   1.99     pooka 
   4797  1.120  pgoyette 	error = rsys_syscall(SYS_aio_return, &callarg, sizeof(callarg), retval);
   4798   1.99     pooka 	rsys_seterrno(error);
   4799   1.99     pooka 	if (error == 0) {
   4800   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4801   1.99     pooka 			rv = *(int *)retval;
   4802   1.99     pooka 		else
   4803   1.99     pooka 			rv = *retval;
   4804   1.99     pooka 	}
   4805   1.99     pooka 	return rv;
   4806   1.99     pooka }
   4807  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4808  1.103     pooka __weak_alias(aio_return,rump___sysimpl_aio_return);
   4809  1.103     pooka __weak_alias(_aio_return,rump___sysimpl_aio_return);
   4810  1.103     pooka __strong_alias(_sys_aio_return,rump___sysimpl_aio_return);
   4811  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4812   1.99     pooka 
   4813   1.99     pooka int rump___sysimpl_aio_write(struct aiocb *);
   4814   1.99     pooka int
   4815   1.99     pooka rump___sysimpl_aio_write(struct aiocb * aiocbp)
   4816   1.99     pooka {
   4817   1.99     pooka 	register_t retval[2];
   4818   1.99     pooka 	int error = 0;
   4819   1.99     pooka 	int rv = -1;
   4820   1.99     pooka 	struct sys_aio_write_args callarg;
   4821   1.99     pooka 
   4822   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4823   1.99     pooka 	SPARG(&callarg, aiocbp) = aiocbp;
   4824   1.99     pooka 
   4825  1.120  pgoyette 	error = rsys_syscall(SYS_aio_write, &callarg, sizeof(callarg), retval);
   4826   1.99     pooka 	rsys_seterrno(error);
   4827   1.99     pooka 	if (error == 0) {
   4828   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4829   1.99     pooka 			rv = *(int *)retval;
   4830   1.99     pooka 		else
   4831   1.99     pooka 			rv = *retval;
   4832   1.99     pooka 	}
   4833   1.99     pooka 	return rv;
   4834   1.99     pooka }
   4835  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4836  1.103     pooka __weak_alias(aio_write,rump___sysimpl_aio_write);
   4837  1.103     pooka __weak_alias(_aio_write,rump___sysimpl_aio_write);
   4838  1.103     pooka __strong_alias(_sys_aio_write,rump___sysimpl_aio_write);
   4839  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4840   1.99     pooka 
   4841   1.99     pooka int rump___sysimpl_lio_listio(int, struct aiocb *const *, int, struct sigevent *);
   4842   1.99     pooka int
   4843   1.99     pooka rump___sysimpl_lio_listio(int mode, struct aiocb *const * list, int nent, struct sigevent * sig)
   4844   1.99     pooka {
   4845   1.99     pooka 	register_t retval[2];
   4846   1.99     pooka 	int error = 0;
   4847   1.99     pooka 	int rv = -1;
   4848   1.99     pooka 	struct sys_lio_listio_args callarg;
   4849   1.99     pooka 
   4850   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   4851   1.99     pooka 	SPARG(&callarg, mode) = mode;
   4852   1.99     pooka 	SPARG(&callarg, list) = list;
   4853   1.99     pooka 	SPARG(&callarg, nent) = nent;
   4854   1.99     pooka 	SPARG(&callarg, sig) = sig;
   4855   1.99     pooka 
   4856  1.120  pgoyette 	error = rsys_syscall(SYS_lio_listio, &callarg, sizeof(callarg), retval);
   4857   1.99     pooka 	rsys_seterrno(error);
   4858   1.99     pooka 	if (error == 0) {
   4859   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   4860   1.99     pooka 			rv = *(int *)retval;
   4861   1.99     pooka 		else
   4862   1.99     pooka 			rv = *retval;
   4863   1.99     pooka 	}
   4864   1.99     pooka 	return rv;
   4865   1.99     pooka }
   4866  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4867  1.103     pooka __weak_alias(lio_listio,rump___sysimpl_lio_listio);
   4868  1.103     pooka __weak_alias(_lio_listio,rump___sysimpl_lio_listio);
   4869  1.103     pooka __strong_alias(_sys_lio_listio,rump___sysimpl_lio_listio);
   4870  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4871   1.99     pooka 
   4872   1.60     pooka int rump___sysimpl_mount50(const char *, const char *, int, void *, size_t);
   4873   1.33     pooka int
   4874   1.60     pooka rump___sysimpl_mount50(const char * type, const char * path, int flags, void * data, size_t data_len)
   4875   1.33     pooka {
   4876   1.93     pooka 	register_t retval[2];
   4877   1.33     pooka 	int error = 0;
   4878   1.68     pooka 	int rv = -1;
   4879   1.33     pooka 	struct sys___mount50_args callarg;
   4880   1.33     pooka 
   4881   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4882   1.33     pooka 	SPARG(&callarg, type) = type;
   4883   1.33     pooka 	SPARG(&callarg, path) = path;
   4884   1.33     pooka 	SPARG(&callarg, flags) = flags;
   4885   1.33     pooka 	SPARG(&callarg, data) = data;
   4886   1.33     pooka 	SPARG(&callarg, data_len) = data_len;
   4887   1.33     pooka 
   4888  1.120  pgoyette 	error = rsys_syscall(SYS___mount50, &callarg, sizeof(callarg), retval);
   4889   1.63     pooka 	rsys_seterrno(error);
   4890   1.68     pooka 	if (error == 0) {
   4891   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4892   1.68     pooka 			rv = *(int *)retval;
   4893   1.68     pooka 		else
   4894   1.69     pooka 			rv = *retval;
   4895   1.33     pooka 	}
   4896   1.68     pooka 	return rv;
   4897   1.33     pooka }
   4898  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4899  1.103     pooka __weak_alias(mount,rump___sysimpl_mount50);
   4900  1.103     pooka __weak_alias(__mount50,rump___sysimpl_mount50);
   4901  1.103     pooka __weak_alias(___mount50,rump___sysimpl_mount50);
   4902  1.103     pooka __strong_alias(_sys___mount50,rump___sysimpl_mount50);
   4903  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4904   1.33     pooka 
   4905   1.60     pooka int rump___sysimpl_posix_fadvise50(int, off_t, off_t, int);
   4906   1.54     pooka int
   4907   1.60     pooka rump___sysimpl_posix_fadvise50(int fd, off_t offset, off_t len, int advice)
   4908   1.54     pooka {
   4909   1.93     pooka 	register_t retval[2];
   4910   1.68     pooka 	int rv = -1;
   4911   1.54     pooka 	struct sys___posix_fadvise50_args callarg;
   4912   1.54     pooka 
   4913   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4914   1.54     pooka 	SPARG(&callarg, fd) = fd;
   4915   1.54     pooka 	SPARG(&callarg, PAD) = 0;
   4916   1.54     pooka 	SPARG(&callarg, offset) = offset;
   4917   1.54     pooka 	SPARG(&callarg, len) = len;
   4918   1.54     pooka 	SPARG(&callarg, advice) = advice;
   4919   1.54     pooka 
   4920  1.119  pgoyette 	(void)rsys_syscall(SYS___posix_fadvise50, &callarg, sizeof(callarg), retval);
   4921   1.68     pooka 	if (sizeof(int) > sizeof(register_t))
   4922   1.68     pooka 		rv = *(int *)retval;
   4923   1.68     pooka 	else
   4924   1.69     pooka 		rv = *retval;
   4925   1.68     pooka 	return rv;
   4926   1.54     pooka }
   4927  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4928  1.103     pooka __weak_alias(posix_fadvise,rump___sysimpl_posix_fadvise50);
   4929  1.103     pooka __weak_alias(__posix_fadvise50,rump___sysimpl_posix_fadvise50);
   4930  1.103     pooka __weak_alias(___posix_fadvise50,rump___sysimpl_posix_fadvise50);
   4931  1.103     pooka __strong_alias(_sys___posix_fadvise50,rump___sysimpl_posix_fadvise50);
   4932  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4933   1.54     pooka 
   4934   1.60     pooka int rump___sysimpl_select50(int, fd_set *, fd_set *, fd_set *, struct timeval *);
   4935   1.34     pooka int
   4936   1.60     pooka rump___sysimpl_select50(int nd, fd_set * in, fd_set * ou, fd_set * ex, struct timeval * tv)
   4937   1.34     pooka {
   4938   1.93     pooka 	register_t retval[2];
   4939   1.34     pooka 	int error = 0;
   4940   1.68     pooka 	int rv = -1;
   4941   1.34     pooka 	struct sys___select50_args callarg;
   4942   1.34     pooka 
   4943   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   4944   1.34     pooka 	SPARG(&callarg, nd) = nd;
   4945   1.34     pooka 	SPARG(&callarg, in) = in;
   4946   1.34     pooka 	SPARG(&callarg, ou) = ou;
   4947   1.34     pooka 	SPARG(&callarg, ex) = ex;
   4948   1.34     pooka 	SPARG(&callarg, tv) = tv;
   4949   1.34     pooka 
   4950  1.120  pgoyette 	error = rsys_syscall(SYS___select50, &callarg, sizeof(callarg), retval);
   4951   1.63     pooka 	rsys_seterrno(error);
   4952   1.68     pooka 	if (error == 0) {
   4953   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   4954   1.68     pooka 			rv = *(int *)retval;
   4955   1.68     pooka 		else
   4956   1.69     pooka 			rv = *retval;
   4957   1.34     pooka 	}
   4958   1.68     pooka 	return rv;
   4959   1.34     pooka }
   4960  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4961  1.103     pooka __weak_alias(select,rump___sysimpl_select50);
   4962  1.103     pooka __weak_alias(__select50,rump___sysimpl_select50);
   4963  1.103     pooka __weak_alias(___select50,rump___sysimpl_select50);
   4964  1.103     pooka __strong_alias(_sys___select50,rump___sysimpl_select50);
   4965  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4966   1.34     pooka 
   4967   1.98     pooka int rump___sysimpl_gettimeofday50(struct timeval *, void *);
   4968   1.98     pooka int
   4969   1.98     pooka rump___sysimpl_gettimeofday50(struct timeval * tp, void * tzp)
   4970   1.98     pooka {
   4971   1.98     pooka 	register_t retval[2];
   4972   1.98     pooka 	int error = 0;
   4973   1.98     pooka 	int rv = -1;
   4974   1.98     pooka 	struct sys___gettimeofday50_args callarg;
   4975   1.98     pooka 
   4976   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   4977   1.98     pooka 	SPARG(&callarg, tp) = tp;
   4978   1.98     pooka 	SPARG(&callarg, tzp) = tzp;
   4979   1.98     pooka 
   4980  1.120  pgoyette 	error = rsys_syscall(SYS___gettimeofday50, &callarg, sizeof(callarg), retval);
   4981   1.98     pooka 	rsys_seterrno(error);
   4982   1.98     pooka 	if (error == 0) {
   4983   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   4984   1.98     pooka 			rv = *(int *)retval;
   4985   1.98     pooka 		else
   4986   1.98     pooka 			rv = *retval;
   4987   1.98     pooka 	}
   4988   1.98     pooka 	return rv;
   4989   1.98     pooka }
   4990  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   4991  1.103     pooka __weak_alias(gettimeofday,rump___sysimpl_gettimeofday50);
   4992  1.103     pooka __weak_alias(__gettimeofday50,rump___sysimpl_gettimeofday50);
   4993  1.103     pooka __weak_alias(___gettimeofday50,rump___sysimpl_gettimeofday50);
   4994  1.103     pooka __strong_alias(_sys___gettimeofday50,rump___sysimpl_gettimeofday50);
   4995  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   4996   1.98     pooka 
   4997   1.98     pooka int rump___sysimpl_settimeofday50(const struct timeval *, const void *);
   4998   1.98     pooka int
   4999   1.98     pooka rump___sysimpl_settimeofday50(const struct timeval * tv, const void * tzp)
   5000   1.98     pooka {
   5001   1.98     pooka 	register_t retval[2];
   5002   1.98     pooka 	int error = 0;
   5003   1.98     pooka 	int rv = -1;
   5004   1.98     pooka 	struct sys___settimeofday50_args callarg;
   5005   1.98     pooka 
   5006   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5007   1.98     pooka 	SPARG(&callarg, tv) = tv;
   5008   1.98     pooka 	SPARG(&callarg, tzp) = tzp;
   5009   1.98     pooka 
   5010  1.120  pgoyette 	error = rsys_syscall(SYS___settimeofday50, &callarg, sizeof(callarg), retval);
   5011   1.98     pooka 	rsys_seterrno(error);
   5012   1.98     pooka 	if (error == 0) {
   5013   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5014   1.98     pooka 			rv = *(int *)retval;
   5015   1.98     pooka 		else
   5016   1.98     pooka 			rv = *retval;
   5017   1.98     pooka 	}
   5018   1.98     pooka 	return rv;
   5019   1.98     pooka }
   5020  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5021  1.103     pooka __weak_alias(settimeofday,rump___sysimpl_settimeofday50);
   5022  1.103     pooka __weak_alias(__settimeofday50,rump___sysimpl_settimeofday50);
   5023  1.103     pooka __weak_alias(___settimeofday50,rump___sysimpl_settimeofday50);
   5024  1.103     pooka __strong_alias(_sys___settimeofday50,rump___sysimpl_settimeofday50);
   5025  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5026   1.98     pooka 
   5027   1.60     pooka int rump___sysimpl_utimes50(const char *, const struct timeval *);
   5028   1.10     pooka int
   5029   1.60     pooka rump___sysimpl_utimes50(const char * path, const struct timeval * tptr)
   5030   1.22     pooka {
   5031   1.93     pooka 	register_t retval[2];
   5032   1.27     pooka 	int error = 0;
   5033   1.68     pooka 	int rv = -1;
   5034   1.31     pooka 	struct sys___utimes50_args callarg;
   5035   1.22     pooka 
   5036   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5037   1.31     pooka 	SPARG(&callarg, path) = path;
   5038   1.31     pooka 	SPARG(&callarg, tptr) = tptr;
   5039   1.22     pooka 
   5040  1.120  pgoyette 	error = rsys_syscall(SYS___utimes50, &callarg, sizeof(callarg), retval);
   5041   1.63     pooka 	rsys_seterrno(error);
   5042   1.68     pooka 	if (error == 0) {
   5043   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5044   1.68     pooka 			rv = *(int *)retval;
   5045   1.68     pooka 		else
   5046   1.69     pooka 			rv = *retval;
   5047   1.27     pooka 	}
   5048   1.68     pooka 	return rv;
   5049   1.22     pooka }
   5050  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5051  1.103     pooka __weak_alias(utimes,rump___sysimpl_utimes50);
   5052  1.103     pooka __weak_alias(__utimes50,rump___sysimpl_utimes50);
   5053  1.103     pooka __weak_alias(___utimes50,rump___sysimpl_utimes50);
   5054  1.103     pooka __strong_alias(_sys___utimes50,rump___sysimpl_utimes50);
   5055  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5056   1.22     pooka 
   5057   1.98     pooka int rump___sysimpl_adjtime50(const struct timeval *, struct timeval *);
   5058   1.98     pooka int
   5059   1.98     pooka rump___sysimpl_adjtime50(const struct timeval * delta, struct timeval * olddelta)
   5060   1.98     pooka {
   5061   1.98     pooka 	register_t retval[2];
   5062   1.98     pooka 	int error = 0;
   5063   1.98     pooka 	int rv = -1;
   5064   1.98     pooka 	struct sys___adjtime50_args callarg;
   5065   1.98     pooka 
   5066   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5067   1.98     pooka 	SPARG(&callarg, delta) = delta;
   5068   1.98     pooka 	SPARG(&callarg, olddelta) = olddelta;
   5069   1.98     pooka 
   5070  1.120  pgoyette 	error = rsys_syscall(SYS___adjtime50, &callarg, sizeof(callarg), retval);
   5071   1.98     pooka 	rsys_seterrno(error);
   5072   1.98     pooka 	if (error == 0) {
   5073   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5074   1.98     pooka 			rv = *(int *)retval;
   5075   1.98     pooka 		else
   5076   1.98     pooka 			rv = *retval;
   5077   1.98     pooka 	}
   5078   1.98     pooka 	return rv;
   5079   1.98     pooka }
   5080  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5081  1.103     pooka __weak_alias(adjtime,rump___sysimpl_adjtime50);
   5082  1.103     pooka __weak_alias(__adjtime50,rump___sysimpl_adjtime50);
   5083  1.103     pooka __weak_alias(___adjtime50,rump___sysimpl_adjtime50);
   5084  1.103     pooka __strong_alias(_sys___adjtime50,rump___sysimpl_adjtime50);
   5085  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5086   1.98     pooka 
   5087   1.60     pooka int rump___sysimpl_futimes50(int, const struct timeval *);
   5088   1.34     pooka int
   5089   1.60     pooka rump___sysimpl_futimes50(int fd, const struct timeval * tptr)
   5090   1.34     pooka {
   5091   1.93     pooka 	register_t retval[2];
   5092   1.34     pooka 	int error = 0;
   5093   1.68     pooka 	int rv = -1;
   5094   1.34     pooka 	struct sys___futimes50_args callarg;
   5095   1.34     pooka 
   5096   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5097   1.34     pooka 	SPARG(&callarg, fd) = fd;
   5098   1.34     pooka 	SPARG(&callarg, tptr) = tptr;
   5099   1.34     pooka 
   5100  1.120  pgoyette 	error = rsys_syscall(SYS___futimes50, &callarg, sizeof(callarg), retval);
   5101   1.63     pooka 	rsys_seterrno(error);
   5102   1.68     pooka 	if (error == 0) {
   5103   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5104   1.68     pooka 			rv = *(int *)retval;
   5105   1.68     pooka 		else
   5106   1.69     pooka 			rv = *retval;
   5107   1.34     pooka 	}
   5108   1.68     pooka 	return rv;
   5109   1.34     pooka }
   5110  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5111  1.103     pooka __weak_alias(futimes,rump___sysimpl_futimes50);
   5112  1.103     pooka __weak_alias(__futimes50,rump___sysimpl_futimes50);
   5113  1.103     pooka __weak_alias(___futimes50,rump___sysimpl_futimes50);
   5114  1.103     pooka __strong_alias(_sys___futimes50,rump___sysimpl_futimes50);
   5115  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5116   1.34     pooka 
   5117   1.60     pooka int rump___sysimpl_lutimes50(const char *, const struct timeval *);
   5118   1.22     pooka int
   5119   1.60     pooka rump___sysimpl_lutimes50(const char * path, const struct timeval * tptr)
   5120   1.10     pooka {
   5121   1.93     pooka 	register_t retval[2];
   5122   1.27     pooka 	int error = 0;
   5123   1.68     pooka 	int rv = -1;
   5124   1.31     pooka 	struct sys___lutimes50_args callarg;
   5125   1.10     pooka 
   5126   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5127   1.31     pooka 	SPARG(&callarg, path) = path;
   5128   1.31     pooka 	SPARG(&callarg, tptr) = tptr;
   5129   1.10     pooka 
   5130  1.120  pgoyette 	error = rsys_syscall(SYS___lutimes50, &callarg, sizeof(callarg), retval);
   5131   1.63     pooka 	rsys_seterrno(error);
   5132   1.68     pooka 	if (error == 0) {
   5133   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5134   1.68     pooka 			rv = *(int *)retval;
   5135   1.68     pooka 		else
   5136   1.69     pooka 			rv = *retval;
   5137   1.27     pooka 	}
   5138   1.68     pooka 	return rv;
   5139   1.10     pooka }
   5140  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5141  1.103     pooka __weak_alias(lutimes,rump___sysimpl_lutimes50);
   5142  1.103     pooka __weak_alias(__lutimes50,rump___sysimpl_lutimes50);
   5143  1.103     pooka __weak_alias(___lutimes50,rump___sysimpl_lutimes50);
   5144  1.103     pooka __strong_alias(_sys___lutimes50,rump___sysimpl_lutimes50);
   5145  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5146   1.10     pooka 
   5147   1.98     pooka int rump___sysimpl_setitimer50(int, const struct itimerval *, struct itimerval *);
   5148   1.98     pooka int
   5149   1.98     pooka rump___sysimpl_setitimer50(int which, const struct itimerval * itv, struct itimerval * oitv)
   5150   1.98     pooka {
   5151   1.98     pooka 	register_t retval[2];
   5152   1.98     pooka 	int error = 0;
   5153   1.98     pooka 	int rv = -1;
   5154   1.98     pooka 	struct sys___setitimer50_args callarg;
   5155   1.98     pooka 
   5156   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5157   1.98     pooka 	SPARG(&callarg, which) = which;
   5158   1.98     pooka 	SPARG(&callarg, itv) = itv;
   5159   1.98     pooka 	SPARG(&callarg, oitv) = oitv;
   5160   1.98     pooka 
   5161  1.120  pgoyette 	error = rsys_syscall(SYS___setitimer50, &callarg, sizeof(callarg), retval);
   5162   1.98     pooka 	rsys_seterrno(error);
   5163   1.98     pooka 	if (error == 0) {
   5164   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5165   1.98     pooka 			rv = *(int *)retval;
   5166   1.98     pooka 		else
   5167   1.98     pooka 			rv = *retval;
   5168   1.98     pooka 	}
   5169   1.98     pooka 	return rv;
   5170   1.98     pooka }
   5171  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5172  1.103     pooka __weak_alias(setitimer,rump___sysimpl_setitimer50);
   5173  1.103     pooka __weak_alias(__setitimer50,rump___sysimpl_setitimer50);
   5174  1.103     pooka __weak_alias(___setitimer50,rump___sysimpl_setitimer50);
   5175  1.103     pooka __strong_alias(_sys___setitimer50,rump___sysimpl_setitimer50);
   5176  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5177   1.98     pooka 
   5178   1.98     pooka int rump___sysimpl_getitimer50(int, struct itimerval *);
   5179   1.98     pooka int
   5180   1.98     pooka rump___sysimpl_getitimer50(int which, struct itimerval * itv)
   5181   1.98     pooka {
   5182   1.98     pooka 	register_t retval[2];
   5183   1.98     pooka 	int error = 0;
   5184   1.98     pooka 	int rv = -1;
   5185   1.98     pooka 	struct sys___getitimer50_args callarg;
   5186   1.98     pooka 
   5187   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5188   1.98     pooka 	SPARG(&callarg, which) = which;
   5189   1.98     pooka 	SPARG(&callarg, itv) = itv;
   5190   1.98     pooka 
   5191  1.120  pgoyette 	error = rsys_syscall(SYS___getitimer50, &callarg, sizeof(callarg), retval);
   5192   1.98     pooka 	rsys_seterrno(error);
   5193   1.98     pooka 	if (error == 0) {
   5194   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5195   1.98     pooka 			rv = *(int *)retval;
   5196   1.98     pooka 		else
   5197   1.98     pooka 			rv = *retval;
   5198   1.98     pooka 	}
   5199   1.98     pooka 	return rv;
   5200   1.98     pooka }
   5201  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5202  1.103     pooka __weak_alias(getitimer,rump___sysimpl_getitimer50);
   5203  1.103     pooka __weak_alias(__getitimer50,rump___sysimpl_getitimer50);
   5204  1.103     pooka __weak_alias(___getitimer50,rump___sysimpl_getitimer50);
   5205  1.103     pooka __strong_alias(_sys___getitimer50,rump___sysimpl_getitimer50);
   5206  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5207   1.98     pooka 
   5208   1.98     pooka int rump___sysimpl_clock_gettime50(clockid_t, struct timespec *);
   5209   1.98     pooka int
   5210   1.98     pooka rump___sysimpl_clock_gettime50(clockid_t clock_id, struct timespec * tp)
   5211   1.98     pooka {
   5212   1.98     pooka 	register_t retval[2];
   5213   1.98     pooka 	int error = 0;
   5214   1.98     pooka 	int rv = -1;
   5215   1.98     pooka 	struct sys___clock_gettime50_args callarg;
   5216   1.98     pooka 
   5217   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5218   1.98     pooka 	SPARG(&callarg, clock_id) = clock_id;
   5219   1.98     pooka 	SPARG(&callarg, tp) = tp;
   5220   1.98     pooka 
   5221  1.120  pgoyette 	error = rsys_syscall(SYS___clock_gettime50, &callarg, sizeof(callarg), retval);
   5222   1.98     pooka 	rsys_seterrno(error);
   5223   1.98     pooka 	if (error == 0) {
   5224   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5225   1.98     pooka 			rv = *(int *)retval;
   5226   1.98     pooka 		else
   5227   1.98     pooka 			rv = *retval;
   5228   1.98     pooka 	}
   5229   1.98     pooka 	return rv;
   5230   1.98     pooka }
   5231  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5232  1.103     pooka __weak_alias(clock_gettime,rump___sysimpl_clock_gettime50);
   5233  1.103     pooka __weak_alias(__clock_gettime50,rump___sysimpl_clock_gettime50);
   5234  1.103     pooka __weak_alias(___clock_gettime50,rump___sysimpl_clock_gettime50);
   5235  1.103     pooka __strong_alias(_sys___clock_gettime50,rump___sysimpl_clock_gettime50);
   5236  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5237   1.98     pooka 
   5238   1.98     pooka int rump___sysimpl_clock_settime50(clockid_t, const struct timespec *);
   5239   1.98     pooka int
   5240   1.98     pooka rump___sysimpl_clock_settime50(clockid_t clock_id, const struct timespec * tp)
   5241   1.98     pooka {
   5242   1.98     pooka 	register_t retval[2];
   5243   1.98     pooka 	int error = 0;
   5244   1.98     pooka 	int rv = -1;
   5245   1.98     pooka 	struct sys___clock_settime50_args callarg;
   5246   1.98     pooka 
   5247   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5248   1.98     pooka 	SPARG(&callarg, clock_id) = clock_id;
   5249   1.98     pooka 	SPARG(&callarg, tp) = tp;
   5250   1.98     pooka 
   5251  1.120  pgoyette 	error = rsys_syscall(SYS___clock_settime50, &callarg, sizeof(callarg), retval);
   5252   1.98     pooka 	rsys_seterrno(error);
   5253   1.98     pooka 	if (error == 0) {
   5254   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5255   1.98     pooka 			rv = *(int *)retval;
   5256   1.98     pooka 		else
   5257   1.98     pooka 			rv = *retval;
   5258   1.98     pooka 	}
   5259   1.98     pooka 	return rv;
   5260   1.98     pooka }
   5261  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5262  1.103     pooka __weak_alias(clock_settime,rump___sysimpl_clock_settime50);
   5263  1.103     pooka __weak_alias(__clock_settime50,rump___sysimpl_clock_settime50);
   5264  1.103     pooka __weak_alias(___clock_settime50,rump___sysimpl_clock_settime50);
   5265  1.103     pooka __strong_alias(_sys___clock_settime50,rump___sysimpl_clock_settime50);
   5266  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5267   1.98     pooka 
   5268   1.98     pooka int rump___sysimpl_clock_getres50(clockid_t, struct timespec *);
   5269   1.98     pooka int
   5270   1.98     pooka rump___sysimpl_clock_getres50(clockid_t clock_id, struct timespec * tp)
   5271   1.98     pooka {
   5272   1.98     pooka 	register_t retval[2];
   5273   1.98     pooka 	int error = 0;
   5274   1.98     pooka 	int rv = -1;
   5275   1.98     pooka 	struct sys___clock_getres50_args callarg;
   5276   1.98     pooka 
   5277   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5278   1.98     pooka 	SPARG(&callarg, clock_id) = clock_id;
   5279   1.98     pooka 	SPARG(&callarg, tp) = tp;
   5280   1.98     pooka 
   5281  1.120  pgoyette 	error = rsys_syscall(SYS___clock_getres50, &callarg, sizeof(callarg), retval);
   5282   1.98     pooka 	rsys_seterrno(error);
   5283   1.98     pooka 	if (error == 0) {
   5284   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5285   1.98     pooka 			rv = *(int *)retval;
   5286   1.98     pooka 		else
   5287   1.98     pooka 			rv = *retval;
   5288   1.98     pooka 	}
   5289   1.98     pooka 	return rv;
   5290   1.98     pooka }
   5291  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5292  1.103     pooka __weak_alias(clock_getres,rump___sysimpl_clock_getres50);
   5293  1.103     pooka __weak_alias(__clock_getres50,rump___sysimpl_clock_getres50);
   5294  1.103     pooka __weak_alias(___clock_getres50,rump___sysimpl_clock_getres50);
   5295  1.103     pooka __strong_alias(_sys___clock_getres50,rump___sysimpl_clock_getres50);
   5296  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5297   1.98     pooka 
   5298   1.98     pooka int rump___sysimpl_nanosleep50(const struct timespec *, struct timespec *);
   5299   1.98     pooka int
   5300   1.98     pooka rump___sysimpl_nanosleep50(const struct timespec * rqtp, struct timespec * rmtp)
   5301   1.98     pooka {
   5302   1.98     pooka 	register_t retval[2];
   5303   1.98     pooka 	int error = 0;
   5304   1.98     pooka 	int rv = -1;
   5305   1.98     pooka 	struct sys___nanosleep50_args callarg;
   5306   1.98     pooka 
   5307   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5308   1.98     pooka 	SPARG(&callarg, rqtp) = rqtp;
   5309   1.98     pooka 	SPARG(&callarg, rmtp) = rmtp;
   5310   1.98     pooka 
   5311  1.120  pgoyette 	error = rsys_syscall(SYS___nanosleep50, &callarg, sizeof(callarg), retval);
   5312   1.98     pooka 	rsys_seterrno(error);
   5313   1.98     pooka 	if (error == 0) {
   5314   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5315   1.98     pooka 			rv = *(int *)retval;
   5316   1.98     pooka 		else
   5317   1.98     pooka 			rv = *retval;
   5318   1.98     pooka 	}
   5319   1.98     pooka 	return rv;
   5320   1.98     pooka }
   5321  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5322  1.103     pooka __weak_alias(nanosleep,rump___sysimpl_nanosleep50);
   5323  1.103     pooka __weak_alias(__nanosleep50,rump___sysimpl_nanosleep50);
   5324  1.103     pooka __weak_alias(___nanosleep50,rump___sysimpl_nanosleep50);
   5325  1.103     pooka __strong_alias(_sys___nanosleep50,rump___sysimpl_nanosleep50);
   5326  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5327   1.98     pooka 
   5328  1.159  christos #ifdef RUMP_SYS_COMPAT
   5329   1.60     pooka int rump___sysimpl_kevent50(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *);
   5330   1.32     pooka int
   5331   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)
   5332   1.32     pooka {
   5333   1.93     pooka 	register_t retval[2];
   5334   1.32     pooka 	int error = 0;
   5335   1.68     pooka 	int rv = -1;
   5336  1.159  christos 	struct compat_100_sys___kevent50_args callarg;
   5337   1.32     pooka 
   5338   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5339   1.32     pooka 	SPARG(&callarg, fd) = fd;
   5340  1.159  christos 	SPARG(&callarg, changelist) = (const struct kevent100 *)changelist;
   5341   1.32     pooka 	SPARG(&callarg, nchanges) = nchanges;
   5342  1.159  christos 	SPARG(&callarg, eventlist) = (struct kevent100 *)eventlist;
   5343   1.32     pooka 	SPARG(&callarg, nevents) = nevents;
   5344   1.32     pooka 	SPARG(&callarg, timeout) = timeout;
   5345   1.32     pooka 
   5346  1.159  christos 	error = rsys_syscall(SYS_compat_100___kevent50, &callarg, sizeof(callarg), retval);
   5347   1.63     pooka 	rsys_seterrno(error);
   5348   1.68     pooka 	if (error == 0) {
   5349   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5350   1.68     pooka 			rv = *(int *)retval;
   5351   1.68     pooka 		else
   5352   1.69     pooka 			rv = *retval;
   5353   1.32     pooka 	}
   5354   1.68     pooka 	return rv;
   5355   1.32     pooka }
   5356  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5357  1.103     pooka __weak_alias(kevent,rump___sysimpl_kevent50);
   5358  1.103     pooka __weak_alias(__kevent50,rump___sysimpl_kevent50);
   5359  1.103     pooka __weak_alias(___kevent50,rump___sysimpl_kevent50);
   5360  1.103     pooka __strong_alias(_sys___kevent50,rump___sysimpl_kevent50);
   5361  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5362  1.159  christos #endif /* RUMP_SYS_COMPAT */
   5363   1.32     pooka 
   5364   1.60     pooka int rump___sysimpl_pselect50(int, fd_set *, fd_set *, fd_set *, const struct timespec *, const sigset_t *);
   5365   1.34     pooka int
   5366   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)
   5367   1.34     pooka {
   5368   1.93     pooka 	register_t retval[2];
   5369   1.34     pooka 	int error = 0;
   5370   1.68     pooka 	int rv = -1;
   5371   1.34     pooka 	struct sys___pselect50_args callarg;
   5372   1.34     pooka 
   5373   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5374   1.34     pooka 	SPARG(&callarg, nd) = nd;
   5375   1.34     pooka 	SPARG(&callarg, in) = in;
   5376   1.34     pooka 	SPARG(&callarg, ou) = ou;
   5377   1.34     pooka 	SPARG(&callarg, ex) = ex;
   5378   1.34     pooka 	SPARG(&callarg, ts) = ts;
   5379   1.34     pooka 	SPARG(&callarg, mask) = mask;
   5380   1.34     pooka 
   5381  1.120  pgoyette 	error = rsys_syscall(SYS___pselect50, &callarg, sizeof(callarg), retval);
   5382   1.63     pooka 	rsys_seterrno(error);
   5383   1.68     pooka 	if (error == 0) {
   5384   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5385   1.68     pooka 			rv = *(int *)retval;
   5386   1.68     pooka 		else
   5387   1.69     pooka 			rv = *retval;
   5388   1.34     pooka 	}
   5389   1.68     pooka 	return rv;
   5390   1.34     pooka }
   5391  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5392  1.103     pooka __weak_alias(pselect,rump___sysimpl_pselect50);
   5393  1.103     pooka __weak_alias(__pselect50,rump___sysimpl_pselect50);
   5394  1.103     pooka __weak_alias(___pselect50,rump___sysimpl_pselect50);
   5395  1.103     pooka __strong_alias(_sys___pselect50,rump___sysimpl_pselect50);
   5396  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5397   1.34     pooka 
   5398   1.60     pooka int rump___sysimpl_pollts50(struct pollfd *, u_int, const struct timespec *, const sigset_t *);
   5399   1.34     pooka int
   5400   1.60     pooka rump___sysimpl_pollts50(struct pollfd * fds, u_int nfds, const struct timespec * ts, const sigset_t * mask)
   5401   1.34     pooka {
   5402   1.93     pooka 	register_t retval[2];
   5403   1.34     pooka 	int error = 0;
   5404   1.68     pooka 	int rv = -1;
   5405   1.34     pooka 	struct sys___pollts50_args callarg;
   5406   1.34     pooka 
   5407   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5408   1.34     pooka 	SPARG(&callarg, fds) = fds;
   5409   1.34     pooka 	SPARG(&callarg, nfds) = nfds;
   5410   1.34     pooka 	SPARG(&callarg, ts) = ts;
   5411   1.34     pooka 	SPARG(&callarg, mask) = mask;
   5412   1.34     pooka 
   5413  1.120  pgoyette 	error = rsys_syscall(SYS___pollts50, &callarg, sizeof(callarg), retval);
   5414   1.63     pooka 	rsys_seterrno(error);
   5415   1.68     pooka 	if (error == 0) {
   5416   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5417   1.68     pooka 			rv = *(int *)retval;
   5418   1.68     pooka 		else
   5419   1.69     pooka 			rv = *retval;
   5420   1.34     pooka 	}
   5421   1.68     pooka 	return rv;
   5422   1.34     pooka }
   5423  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5424  1.103     pooka __weak_alias(pollts,rump___sysimpl_pollts50);
   5425  1.103     pooka __weak_alias(__pollts50,rump___sysimpl_pollts50);
   5426  1.103     pooka __weak_alias(___pollts50,rump___sysimpl_pollts50);
   5427  1.103     pooka __strong_alias(_sys___pollts50,rump___sysimpl_pollts50);
   5428  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5429   1.34     pooka 
   5430   1.99     pooka int rump___sysimpl_aio_suspend50(const struct aiocb *const *, int, const struct timespec *);
   5431   1.99     pooka int
   5432   1.99     pooka rump___sysimpl_aio_suspend50(const struct aiocb *const * list, int nent, const struct timespec * timeout)
   5433   1.99     pooka {
   5434   1.99     pooka 	register_t retval[2];
   5435   1.99     pooka 	int error = 0;
   5436   1.99     pooka 	int rv = -1;
   5437   1.99     pooka 	struct sys___aio_suspend50_args callarg;
   5438   1.99     pooka 
   5439   1.99     pooka 	memset(&callarg, 0, sizeof(callarg));
   5440   1.99     pooka 	SPARG(&callarg, list) = list;
   5441   1.99     pooka 	SPARG(&callarg, nent) = nent;
   5442   1.99     pooka 	SPARG(&callarg, timeout) = timeout;
   5443   1.99     pooka 
   5444  1.120  pgoyette 	error = rsys_syscall(SYS___aio_suspend50, &callarg, sizeof(callarg), retval);
   5445   1.99     pooka 	rsys_seterrno(error);
   5446   1.99     pooka 	if (error == 0) {
   5447   1.99     pooka 		if (sizeof(int) > sizeof(register_t))
   5448   1.99     pooka 			rv = *(int *)retval;
   5449   1.99     pooka 		else
   5450   1.99     pooka 			rv = *retval;
   5451   1.99     pooka 	}
   5452   1.99     pooka 	return rv;
   5453   1.99     pooka }
   5454  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5455  1.103     pooka __weak_alias(aio_suspend,rump___sysimpl_aio_suspend50);
   5456  1.103     pooka __weak_alias(__aio_suspend50,rump___sysimpl_aio_suspend50);
   5457  1.103     pooka __weak_alias(___aio_suspend50,rump___sysimpl_aio_suspend50);
   5458  1.103     pooka __strong_alias(_sys___aio_suspend50,rump___sysimpl_aio_suspend50);
   5459  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5460   1.99     pooka 
   5461   1.60     pooka int rump___sysimpl_stat50(const char *, struct stat *);
   5462   1.10     pooka int
   5463   1.60     pooka rump___sysimpl_stat50(const char * path, struct stat * ub)
   5464   1.10     pooka {
   5465   1.93     pooka 	register_t retval[2];
   5466   1.27     pooka 	int error = 0;
   5467   1.68     pooka 	int rv = -1;
   5468   1.31     pooka 	struct sys___stat50_args callarg;
   5469   1.10     pooka 
   5470   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5471   1.31     pooka 	SPARG(&callarg, path) = path;
   5472   1.31     pooka 	SPARG(&callarg, ub) = ub;
   5473   1.10     pooka 
   5474  1.120  pgoyette 	error = rsys_syscall(SYS___stat50, &callarg, sizeof(callarg), retval);
   5475   1.63     pooka 	rsys_seterrno(error);
   5476   1.68     pooka 	if (error == 0) {
   5477   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5478   1.68     pooka 			rv = *(int *)retval;
   5479   1.68     pooka 		else
   5480   1.69     pooka 			rv = *retval;
   5481   1.27     pooka 	}
   5482   1.68     pooka 	return rv;
   5483   1.10     pooka }
   5484  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5485  1.103     pooka __weak_alias(stat,rump___sysimpl_stat50);
   5486  1.103     pooka __weak_alias(__stat50,rump___sysimpl_stat50);
   5487  1.103     pooka __weak_alias(___stat50,rump___sysimpl_stat50);
   5488  1.103     pooka __strong_alias(_sys___stat50,rump___sysimpl_stat50);
   5489  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5490   1.18     pooka 
   5491   1.60     pooka int rump___sysimpl_fstat50(int, struct stat *);
   5492   1.34     pooka int
   5493   1.60     pooka rump___sysimpl_fstat50(int fd, struct stat * sb)
   5494   1.34     pooka {
   5495   1.93     pooka 	register_t retval[2];
   5496   1.34     pooka 	int error = 0;
   5497   1.68     pooka 	int rv = -1;
   5498   1.34     pooka 	struct sys___fstat50_args callarg;
   5499   1.34     pooka 
   5500   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5501   1.34     pooka 	SPARG(&callarg, fd) = fd;
   5502   1.34     pooka 	SPARG(&callarg, sb) = sb;
   5503   1.34     pooka 
   5504  1.120  pgoyette 	error = rsys_syscall(SYS___fstat50, &callarg, sizeof(callarg), retval);
   5505   1.63     pooka 	rsys_seterrno(error);
   5506   1.68     pooka 	if (error == 0) {
   5507   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5508   1.68     pooka 			rv = *(int *)retval;
   5509   1.68     pooka 		else
   5510   1.69     pooka 			rv = *retval;
   5511   1.34     pooka 	}
   5512   1.68     pooka 	return rv;
   5513   1.34     pooka }
   5514  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5515  1.103     pooka __weak_alias(fstat,rump___sysimpl_fstat50);
   5516  1.103     pooka __weak_alias(__fstat50,rump___sysimpl_fstat50);
   5517  1.103     pooka __weak_alias(___fstat50,rump___sysimpl_fstat50);
   5518  1.103     pooka __strong_alias(_sys___fstat50,rump___sysimpl_fstat50);
   5519  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5520   1.34     pooka 
   5521   1.60     pooka int rump___sysimpl_lstat50(const char *, struct stat *);
   5522   1.18     pooka int
   5523   1.60     pooka rump___sysimpl_lstat50(const char * path, struct stat * ub)
   5524   1.18     pooka {
   5525   1.93     pooka 	register_t retval[2];
   5526   1.27     pooka 	int error = 0;
   5527   1.68     pooka 	int rv = -1;
   5528   1.31     pooka 	struct sys___lstat50_args callarg;
   5529   1.18     pooka 
   5530   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5531   1.31     pooka 	SPARG(&callarg, path) = path;
   5532   1.31     pooka 	SPARG(&callarg, ub) = ub;
   5533   1.18     pooka 
   5534  1.120  pgoyette 	error = rsys_syscall(SYS___lstat50, &callarg, sizeof(callarg), retval);
   5535   1.63     pooka 	rsys_seterrno(error);
   5536   1.68     pooka 	if (error == 0) {
   5537   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5538   1.68     pooka 			rv = *(int *)retval;
   5539   1.68     pooka 		else
   5540   1.69     pooka 			rv = *retval;
   5541   1.27     pooka 	}
   5542   1.68     pooka 	return rv;
   5543   1.18     pooka }
   5544  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5545  1.103     pooka __weak_alias(lstat,rump___sysimpl_lstat50);
   5546  1.103     pooka __weak_alias(__lstat50,rump___sysimpl_lstat50);
   5547  1.103     pooka __weak_alias(___lstat50,rump___sysimpl_lstat50);
   5548  1.103     pooka __strong_alias(_sys___lstat50,rump___sysimpl_lstat50);
   5549  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5550   1.22     pooka 
   5551   1.98     pooka int rump___sysimpl_timer_settime50(timer_t, int, const struct itimerspec *, struct itimerspec *);
   5552   1.98     pooka int
   5553   1.98     pooka rump___sysimpl_timer_settime50(timer_t timerid, int flags, const struct itimerspec * value, struct itimerspec * ovalue)
   5554   1.98     pooka {
   5555   1.98     pooka 	register_t retval[2];
   5556   1.98     pooka 	int error = 0;
   5557   1.98     pooka 	int rv = -1;
   5558   1.98     pooka 	struct sys___timer_settime50_args callarg;
   5559   1.98     pooka 
   5560   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5561   1.98     pooka 	SPARG(&callarg, timerid) = timerid;
   5562   1.98     pooka 	SPARG(&callarg, flags) = flags;
   5563   1.98     pooka 	SPARG(&callarg, value) = value;
   5564   1.98     pooka 	SPARG(&callarg, ovalue) = ovalue;
   5565   1.98     pooka 
   5566  1.120  pgoyette 	error = rsys_syscall(SYS___timer_settime50, &callarg, sizeof(callarg), retval);
   5567   1.98     pooka 	rsys_seterrno(error);
   5568   1.98     pooka 	if (error == 0) {
   5569   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5570   1.98     pooka 			rv = *(int *)retval;
   5571   1.98     pooka 		else
   5572   1.98     pooka 			rv = *retval;
   5573   1.98     pooka 	}
   5574   1.98     pooka 	return rv;
   5575   1.98     pooka }
   5576  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5577  1.103     pooka __weak_alias(timer_settime,rump___sysimpl_timer_settime50);
   5578  1.103     pooka __weak_alias(__timer_settime50,rump___sysimpl_timer_settime50);
   5579  1.103     pooka __weak_alias(___timer_settime50,rump___sysimpl_timer_settime50);
   5580  1.103     pooka __strong_alias(_sys___timer_settime50,rump___sysimpl_timer_settime50);
   5581  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5582   1.98     pooka 
   5583   1.98     pooka int rump___sysimpl_timer_gettime50(timer_t, struct itimerspec *);
   5584   1.98     pooka int
   5585   1.98     pooka rump___sysimpl_timer_gettime50(timer_t timerid, struct itimerspec * value)
   5586   1.98     pooka {
   5587   1.98     pooka 	register_t retval[2];
   5588   1.98     pooka 	int error = 0;
   5589   1.98     pooka 	int rv = -1;
   5590   1.98     pooka 	struct sys___timer_gettime50_args callarg;
   5591   1.98     pooka 
   5592   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   5593   1.98     pooka 	SPARG(&callarg, timerid) = timerid;
   5594   1.98     pooka 	SPARG(&callarg, value) = value;
   5595   1.98     pooka 
   5596  1.120  pgoyette 	error = rsys_syscall(SYS___timer_gettime50, &callarg, sizeof(callarg), retval);
   5597   1.98     pooka 	rsys_seterrno(error);
   5598   1.98     pooka 	if (error == 0) {
   5599   1.98     pooka 		if (sizeof(int) > sizeof(register_t))
   5600   1.98     pooka 			rv = *(int *)retval;
   5601   1.98     pooka 		else
   5602   1.98     pooka 			rv = *retval;
   5603   1.98     pooka 	}
   5604   1.98     pooka 	return rv;
   5605   1.98     pooka }
   5606  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5607  1.103     pooka __weak_alias(timer_gettime,rump___sysimpl_timer_gettime50);
   5608  1.103     pooka __weak_alias(__timer_gettime50,rump___sysimpl_timer_gettime50);
   5609  1.103     pooka __weak_alias(___timer_gettime50,rump___sysimpl_timer_gettime50);
   5610  1.103     pooka __strong_alias(_sys___timer_gettime50,rump___sysimpl_timer_gettime50);
   5611  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5612   1.98     pooka 
   5613   1.60     pooka int rump___sysimpl_mknod50(const char *, mode_t, dev_t);
   5614   1.22     pooka int
   5615   1.60     pooka rump___sysimpl_mknod50(const char * path, mode_t mode, dev_t dev)
   5616   1.22     pooka {
   5617   1.93     pooka 	register_t retval[2];
   5618   1.27     pooka 	int error = 0;
   5619   1.68     pooka 	int rv = -1;
   5620   1.31     pooka 	struct sys___mknod50_args callarg;
   5621   1.22     pooka 
   5622   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5623   1.31     pooka 	SPARG(&callarg, path) = path;
   5624   1.31     pooka 	SPARG(&callarg, mode) = mode;
   5625   1.31     pooka 	SPARG(&callarg, dev) = dev;
   5626   1.22     pooka 
   5627  1.120  pgoyette 	error = rsys_syscall(SYS___mknod50, &callarg, sizeof(callarg), retval);
   5628   1.63     pooka 	rsys_seterrno(error);
   5629   1.68     pooka 	if (error == 0) {
   5630   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5631   1.68     pooka 			rv = *(int *)retval;
   5632   1.68     pooka 		else
   5633   1.69     pooka 			rv = *retval;
   5634   1.27     pooka 	}
   5635   1.68     pooka 	return rv;
   5636   1.22     pooka }
   5637  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5638  1.103     pooka __weak_alias(mknod,rump___sysimpl_mknod50);
   5639  1.103     pooka __weak_alias(__mknod50,rump___sysimpl_mknod50);
   5640  1.103     pooka __weak_alias(___mknod50,rump___sysimpl_mknod50);
   5641  1.103     pooka __strong_alias(_sys___mknod50,rump___sysimpl_mknod50);
   5642  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5643   1.29     pooka 
   5644   1.60     pooka int rump___sysimpl_fhstat50(const void *, size_t, struct stat *);
   5645   1.34     pooka int
   5646   1.60     pooka rump___sysimpl_fhstat50(const void * fhp, size_t fh_size, struct stat * sb)
   5647   1.34     pooka {
   5648   1.93     pooka 	register_t retval[2];
   5649   1.34     pooka 	int error = 0;
   5650   1.68     pooka 	int rv = -1;
   5651   1.34     pooka 	struct sys___fhstat50_args callarg;
   5652   1.34     pooka 
   5653   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5654   1.34     pooka 	SPARG(&callarg, fhp) = fhp;
   5655   1.34     pooka 	SPARG(&callarg, fh_size) = fh_size;
   5656   1.34     pooka 	SPARG(&callarg, sb) = sb;
   5657   1.34     pooka 
   5658  1.120  pgoyette 	error = rsys_syscall(SYS___fhstat50, &callarg, sizeof(callarg), retval);
   5659   1.63     pooka 	rsys_seterrno(error);
   5660   1.68     pooka 	if (error == 0) {
   5661   1.68     pooka 		if (sizeof(int) > sizeof(register_t))
   5662   1.68     pooka 			rv = *(int *)retval;
   5663   1.68     pooka 		else
   5664   1.69     pooka 			rv = *retval;
   5665   1.34     pooka 	}
   5666   1.68     pooka 	return rv;
   5667   1.34     pooka }
   5668  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5669  1.103     pooka __weak_alias(fhstat,rump___sysimpl_fhstat50);
   5670  1.103     pooka __weak_alias(__fhstat50,rump___sysimpl_fhstat50);
   5671  1.103     pooka __weak_alias(___fhstat50,rump___sysimpl_fhstat50);
   5672  1.103     pooka __strong_alias(_sys___fhstat50,rump___sysimpl_fhstat50);
   5673  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5674   1.34     pooka 
   5675   1.72  christos int rump___sysimpl_pipe2(int *, int);
   5676   1.72  christos int
   5677   1.72  christos rump___sysimpl_pipe2(int * fildes, int flags)
   5678   1.72  christos {
   5679   1.93     pooka 	register_t retval[2];
   5680   1.72  christos 	int error = 0;
   5681   1.72  christos 	int rv = -1;
   5682   1.72  christos 	struct sys_pipe2_args callarg;
   5683   1.72  christos 
   5684   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5685   1.72  christos 	SPARG(&callarg, fildes) = fildes;
   5686   1.72  christos 	SPARG(&callarg, flags) = flags;
   5687   1.72  christos 
   5688  1.120  pgoyette 	error = rsys_syscall(SYS_pipe2, &callarg, sizeof(callarg), retval);
   5689   1.72  christos 	rsys_seterrno(error);
   5690   1.72  christos 	if (error == 0) {
   5691   1.72  christos 		if (sizeof(int) > sizeof(register_t))
   5692   1.72  christos 			rv = *(int *)retval;
   5693   1.72  christos 		else
   5694   1.72  christos 			rv = *retval;
   5695   1.72  christos 	}
   5696   1.72  christos 	return rv;
   5697   1.72  christos }
   5698  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5699  1.103     pooka __weak_alias(pipe2,rump___sysimpl_pipe2);
   5700  1.103     pooka __weak_alias(_pipe2,rump___sysimpl_pipe2);
   5701  1.103     pooka __strong_alias(_sys_pipe2,rump___sysimpl_pipe2);
   5702  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5703   1.72  christos 
   5704  1.160  christos #ifdef RUMP_SYS_COMPAT
   5705   1.72  christos int rump___sysimpl_dup3(int, int, int);
   5706   1.72  christos int
   5707   1.72  christos rump___sysimpl_dup3(int from, int to, int flags)
   5708   1.72  christos {
   5709   1.93     pooka 	register_t retval[2];
   5710   1.72  christos 	int error = 0;
   5711   1.72  christos 	int rv = -1;
   5712  1.161  christos 	struct compat_100_sys_dup3_args callarg;
   5713   1.72  christos 
   5714   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5715   1.72  christos 	SPARG(&callarg, from) = from;
   5716   1.72  christos 	SPARG(&callarg, to) = to;
   5717   1.72  christos 	SPARG(&callarg, flags) = flags;
   5718   1.72  christos 
   5719  1.161  christos 	error = rsys_syscall(SYS_compat_100_dup3, &callarg, sizeof(callarg), retval);
   5720   1.72  christos 	rsys_seterrno(error);
   5721   1.72  christos 	if (error == 0) {
   5722   1.72  christos 		if (sizeof(int) > sizeof(register_t))
   5723   1.72  christos 			rv = *(int *)retval;
   5724   1.72  christos 		else
   5725   1.72  christos 			rv = *retval;
   5726   1.72  christos 	}
   5727   1.72  christos 	return rv;
   5728   1.72  christos }
   5729  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5730  1.103     pooka __weak_alias(dup3,rump___sysimpl_dup3);
   5731  1.103     pooka __weak_alias(_dup3,rump___sysimpl_dup3);
   5732  1.103     pooka __strong_alias(_sys_dup3,rump___sysimpl_dup3);
   5733  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5734  1.160  christos #endif /* RUMP_SYS_COMPAT */
   5735   1.72  christos 
   5736   1.72  christos int rump___sysimpl_kqueue1(int);
   5737   1.72  christos int
   5738   1.72  christos rump___sysimpl_kqueue1(int flags)
   5739   1.72  christos {
   5740   1.93     pooka 	register_t retval[2];
   5741   1.72  christos 	int error = 0;
   5742   1.72  christos 	int rv = -1;
   5743   1.72  christos 	struct sys_kqueue1_args callarg;
   5744   1.72  christos 
   5745   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5746   1.72  christos 	SPARG(&callarg, flags) = flags;
   5747   1.72  christos 
   5748  1.120  pgoyette 	error = rsys_syscall(SYS_kqueue1, &callarg, sizeof(callarg), retval);
   5749   1.72  christos 	rsys_seterrno(error);
   5750   1.72  christos 	if (error == 0) {
   5751   1.72  christos 		if (sizeof(int) > sizeof(register_t))
   5752   1.72  christos 			rv = *(int *)retval;
   5753   1.72  christos 		else
   5754   1.72  christos 			rv = *retval;
   5755   1.72  christos 	}
   5756   1.72  christos 	return rv;
   5757   1.72  christos }
   5758  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5759  1.103     pooka __weak_alias(kqueue1,rump___sysimpl_kqueue1);
   5760  1.103     pooka __weak_alias(_kqueue1,rump___sysimpl_kqueue1);
   5761  1.103     pooka __strong_alias(_sys_kqueue1,rump___sysimpl_kqueue1);
   5762  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5763   1.72  christos 
   5764   1.72  christos int rump___sysimpl_paccept(int, struct sockaddr *, socklen_t *, const sigset_t *, int);
   5765   1.72  christos int
   5766   1.72  christos rump___sysimpl_paccept(int s, struct sockaddr * name, socklen_t * anamelen, const sigset_t * mask, int flags)
   5767   1.72  christos {
   5768   1.93     pooka 	register_t retval[2];
   5769   1.72  christos 	int error = 0;
   5770   1.72  christos 	int rv = -1;
   5771   1.72  christos 	struct sys_paccept_args callarg;
   5772   1.72  christos 
   5773   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5774   1.72  christos 	SPARG(&callarg, s) = s;
   5775   1.72  christos 	SPARG(&callarg, name) = name;
   5776   1.72  christos 	SPARG(&callarg, anamelen) = anamelen;
   5777   1.72  christos 	SPARG(&callarg, mask) = mask;
   5778   1.72  christos 	SPARG(&callarg, flags) = flags;
   5779   1.72  christos 
   5780  1.120  pgoyette 	error = rsys_syscall(SYS_paccept, &callarg, sizeof(callarg), retval);
   5781   1.72  christos 	rsys_seterrno(error);
   5782   1.72  christos 	if (error == 0) {
   5783   1.72  christos 		if (sizeof(int) > sizeof(register_t))
   5784   1.72  christos 			rv = *(int *)retval;
   5785   1.72  christos 		else
   5786   1.72  christos 			rv = *retval;
   5787   1.72  christos 	}
   5788   1.72  christos 	return rv;
   5789   1.72  christos }
   5790  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5791  1.103     pooka __weak_alias(paccept,rump___sysimpl_paccept);
   5792  1.103     pooka __weak_alias(_paccept,rump___sysimpl_paccept);
   5793  1.103     pooka __strong_alias(_sys_paccept,rump___sysimpl_paccept);
   5794  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5795   1.72  christos 
   5796   1.74      manu int rump___sysimpl_linkat(int, const char *, int, const char *, int);
   5797   1.74      manu int
   5798   1.74      manu rump___sysimpl_linkat(int fd1, const char * name1, int fd2, const char * name2, int flags)
   5799   1.74      manu {
   5800   1.93     pooka 	register_t retval[2];
   5801   1.74      manu 	int error = 0;
   5802   1.74      manu 	int rv = -1;
   5803   1.74      manu 	struct sys_linkat_args callarg;
   5804   1.74      manu 
   5805   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5806   1.74      manu 	SPARG(&callarg, fd1) = fd1;
   5807   1.74      manu 	SPARG(&callarg, name1) = name1;
   5808   1.74      manu 	SPARG(&callarg, fd2) = fd2;
   5809   1.74      manu 	SPARG(&callarg, name2) = name2;
   5810   1.74      manu 	SPARG(&callarg, flags) = flags;
   5811   1.74      manu 
   5812  1.120  pgoyette 	error = rsys_syscall(SYS_linkat, &callarg, sizeof(callarg), retval);
   5813   1.74      manu 	rsys_seterrno(error);
   5814   1.74      manu 	if (error == 0) {
   5815   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5816   1.74      manu 			rv = *(int *)retval;
   5817   1.74      manu 		else
   5818   1.74      manu 			rv = *retval;
   5819   1.74      manu 	}
   5820   1.74      manu 	return rv;
   5821   1.74      manu }
   5822  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5823  1.103     pooka __weak_alias(linkat,rump___sysimpl_linkat);
   5824  1.103     pooka __weak_alias(_linkat,rump___sysimpl_linkat);
   5825  1.103     pooka __strong_alias(_sys_linkat,rump___sysimpl_linkat);
   5826  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5827   1.74      manu 
   5828   1.74      manu int rump___sysimpl_renameat(int, const char *, int, const char *);
   5829   1.74      manu int
   5830   1.74      manu rump___sysimpl_renameat(int fromfd, const char * from, int tofd, const char * to)
   5831   1.74      manu {
   5832   1.93     pooka 	register_t retval[2];
   5833   1.74      manu 	int error = 0;
   5834   1.74      manu 	int rv = -1;
   5835   1.74      manu 	struct sys_renameat_args callarg;
   5836   1.74      manu 
   5837   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5838   1.74      manu 	SPARG(&callarg, fromfd) = fromfd;
   5839   1.74      manu 	SPARG(&callarg, from) = from;
   5840   1.74      manu 	SPARG(&callarg, tofd) = tofd;
   5841   1.74      manu 	SPARG(&callarg, to) = to;
   5842   1.74      manu 
   5843  1.120  pgoyette 	error = rsys_syscall(SYS_renameat, &callarg, sizeof(callarg), retval);
   5844   1.74      manu 	rsys_seterrno(error);
   5845   1.74      manu 	if (error == 0) {
   5846   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5847   1.74      manu 			rv = *(int *)retval;
   5848   1.74      manu 		else
   5849   1.74      manu 			rv = *retval;
   5850   1.74      manu 	}
   5851   1.74      manu 	return rv;
   5852   1.74      manu }
   5853  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5854  1.103     pooka __weak_alias(renameat,rump___sysimpl_renameat);
   5855  1.103     pooka __weak_alias(_renameat,rump___sysimpl_renameat);
   5856  1.103     pooka __strong_alias(_sys_renameat,rump___sysimpl_renameat);
   5857  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5858   1.74      manu 
   5859   1.74      manu int rump___sysimpl_mkfifoat(int, const char *, mode_t);
   5860   1.74      manu int
   5861   1.74      manu rump___sysimpl_mkfifoat(int fd, const char * path, mode_t mode)
   5862   1.74      manu {
   5863   1.93     pooka 	register_t retval[2];
   5864   1.74      manu 	int error = 0;
   5865   1.74      manu 	int rv = -1;
   5866   1.74      manu 	struct sys_mkfifoat_args callarg;
   5867   1.74      manu 
   5868   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5869   1.74      manu 	SPARG(&callarg, fd) = fd;
   5870   1.74      manu 	SPARG(&callarg, path) = path;
   5871   1.74      manu 	SPARG(&callarg, mode) = mode;
   5872   1.74      manu 
   5873  1.120  pgoyette 	error = rsys_syscall(SYS_mkfifoat, &callarg, sizeof(callarg), retval);
   5874   1.74      manu 	rsys_seterrno(error);
   5875   1.74      manu 	if (error == 0) {
   5876   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5877   1.74      manu 			rv = *(int *)retval;
   5878   1.74      manu 		else
   5879   1.74      manu 			rv = *retval;
   5880   1.74      manu 	}
   5881   1.74      manu 	return rv;
   5882   1.74      manu }
   5883  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5884  1.103     pooka __weak_alias(mkfifoat,rump___sysimpl_mkfifoat);
   5885  1.103     pooka __weak_alias(_mkfifoat,rump___sysimpl_mkfifoat);
   5886  1.103     pooka __strong_alias(_sys_mkfifoat,rump___sysimpl_mkfifoat);
   5887  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5888   1.74      manu 
   5889   1.92     njoly int rump___sysimpl_mknodat(int, const char *, mode_t, dev_t);
   5890   1.74      manu int
   5891   1.92     njoly rump___sysimpl_mknodat(int fd, const char * path, mode_t mode, dev_t dev)
   5892   1.74      manu {
   5893   1.93     pooka 	register_t retval[2];
   5894   1.74      manu 	int error = 0;
   5895   1.74      manu 	int rv = -1;
   5896   1.74      manu 	struct sys_mknodat_args callarg;
   5897   1.74      manu 
   5898   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5899   1.74      manu 	SPARG(&callarg, fd) = fd;
   5900   1.74      manu 	SPARG(&callarg, path) = path;
   5901   1.74      manu 	SPARG(&callarg, mode) = mode;
   5902   1.92     njoly 	SPARG(&callarg, PAD) = 0;
   5903   1.74      manu 	SPARG(&callarg, dev) = dev;
   5904   1.74      manu 
   5905  1.120  pgoyette 	error = rsys_syscall(SYS_mknodat, &callarg, sizeof(callarg), retval);
   5906   1.74      manu 	rsys_seterrno(error);
   5907   1.74      manu 	if (error == 0) {
   5908   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5909   1.74      manu 			rv = *(int *)retval;
   5910   1.74      manu 		else
   5911   1.74      manu 			rv = *retval;
   5912   1.74      manu 	}
   5913   1.74      manu 	return rv;
   5914   1.74      manu }
   5915  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5916  1.103     pooka __weak_alias(mknodat,rump___sysimpl_mknodat);
   5917  1.103     pooka __weak_alias(_mknodat,rump___sysimpl_mknodat);
   5918  1.103     pooka __strong_alias(_sys_mknodat,rump___sysimpl_mknodat);
   5919  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5920   1.74      manu 
   5921   1.74      manu int rump___sysimpl_mkdirat(int, const char *, mode_t);
   5922   1.74      manu int
   5923   1.74      manu rump___sysimpl_mkdirat(int fd, const char * path, mode_t mode)
   5924   1.74      manu {
   5925   1.93     pooka 	register_t retval[2];
   5926   1.74      manu 	int error = 0;
   5927   1.74      manu 	int rv = -1;
   5928   1.74      manu 	struct sys_mkdirat_args callarg;
   5929   1.74      manu 
   5930   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5931   1.74      manu 	SPARG(&callarg, fd) = fd;
   5932   1.74      manu 	SPARG(&callarg, path) = path;
   5933   1.74      manu 	SPARG(&callarg, mode) = mode;
   5934   1.74      manu 
   5935  1.120  pgoyette 	error = rsys_syscall(SYS_mkdirat, &callarg, sizeof(callarg), retval);
   5936   1.74      manu 	rsys_seterrno(error);
   5937   1.74      manu 	if (error == 0) {
   5938   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5939   1.74      manu 			rv = *(int *)retval;
   5940   1.74      manu 		else
   5941   1.74      manu 			rv = *retval;
   5942   1.74      manu 	}
   5943   1.74      manu 	return rv;
   5944   1.74      manu }
   5945  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5946  1.103     pooka __weak_alias(mkdirat,rump___sysimpl_mkdirat);
   5947  1.103     pooka __weak_alias(_mkdirat,rump___sysimpl_mkdirat);
   5948  1.103     pooka __strong_alias(_sys_mkdirat,rump___sysimpl_mkdirat);
   5949  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5950   1.74      manu 
   5951   1.74      manu int rump___sysimpl_faccessat(int, const char *, int, int);
   5952   1.74      manu int
   5953   1.74      manu rump___sysimpl_faccessat(int fd, const char * path, int amode, int flag)
   5954   1.74      manu {
   5955   1.93     pooka 	register_t retval[2];
   5956   1.74      manu 	int error = 0;
   5957   1.74      manu 	int rv = -1;
   5958   1.74      manu 	struct sys_faccessat_args callarg;
   5959   1.74      manu 
   5960   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5961   1.74      manu 	SPARG(&callarg, fd) = fd;
   5962   1.74      manu 	SPARG(&callarg, path) = path;
   5963   1.74      manu 	SPARG(&callarg, amode) = amode;
   5964   1.74      manu 	SPARG(&callarg, flag) = flag;
   5965   1.74      manu 
   5966  1.120  pgoyette 	error = rsys_syscall(SYS_faccessat, &callarg, sizeof(callarg), retval);
   5967   1.74      manu 	rsys_seterrno(error);
   5968   1.74      manu 	if (error == 0) {
   5969   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   5970   1.74      manu 			rv = *(int *)retval;
   5971   1.74      manu 		else
   5972   1.74      manu 			rv = *retval;
   5973   1.74      manu 	}
   5974   1.74      manu 	return rv;
   5975   1.74      manu }
   5976  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   5977  1.103     pooka __weak_alias(faccessat,rump___sysimpl_faccessat);
   5978  1.103     pooka __weak_alias(_faccessat,rump___sysimpl_faccessat);
   5979  1.103     pooka __strong_alias(_sys_faccessat,rump___sysimpl_faccessat);
   5980  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   5981   1.74      manu 
   5982   1.74      manu int rump___sysimpl_fchmodat(int, const char *, mode_t, int);
   5983   1.74      manu int
   5984   1.74      manu rump___sysimpl_fchmodat(int fd, const char * path, mode_t mode, int flag)
   5985   1.74      manu {
   5986   1.93     pooka 	register_t retval[2];
   5987   1.74      manu 	int error = 0;
   5988   1.74      manu 	int rv = -1;
   5989   1.74      manu 	struct sys_fchmodat_args callarg;
   5990   1.74      manu 
   5991   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   5992   1.74      manu 	SPARG(&callarg, fd) = fd;
   5993   1.74      manu 	SPARG(&callarg, path) = path;
   5994   1.74      manu 	SPARG(&callarg, mode) = mode;
   5995   1.74      manu 	SPARG(&callarg, flag) = flag;
   5996   1.74      manu 
   5997  1.120  pgoyette 	error = rsys_syscall(SYS_fchmodat, &callarg, sizeof(callarg), retval);
   5998   1.74      manu 	rsys_seterrno(error);
   5999   1.74      manu 	if (error == 0) {
   6000   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6001   1.74      manu 			rv = *(int *)retval;
   6002   1.74      manu 		else
   6003   1.74      manu 			rv = *retval;
   6004   1.74      manu 	}
   6005   1.74      manu 	return rv;
   6006   1.74      manu }
   6007  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6008  1.103     pooka __weak_alias(fchmodat,rump___sysimpl_fchmodat);
   6009  1.103     pooka __weak_alias(_fchmodat,rump___sysimpl_fchmodat);
   6010  1.103     pooka __strong_alias(_sys_fchmodat,rump___sysimpl_fchmodat);
   6011  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6012   1.74      manu 
   6013   1.74      manu int rump___sysimpl_fchownat(int, const char *, uid_t, gid_t, int);
   6014   1.74      manu int
   6015   1.74      manu rump___sysimpl_fchownat(int fd, const char * path, uid_t owner, gid_t group, int flag)
   6016   1.74      manu {
   6017   1.93     pooka 	register_t retval[2];
   6018   1.74      manu 	int error = 0;
   6019   1.74      manu 	int rv = -1;
   6020   1.74      manu 	struct sys_fchownat_args callarg;
   6021   1.74      manu 
   6022   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6023   1.74      manu 	SPARG(&callarg, fd) = fd;
   6024   1.74      manu 	SPARG(&callarg, path) = path;
   6025   1.74      manu 	SPARG(&callarg, owner) = owner;
   6026   1.74      manu 	SPARG(&callarg, group) = group;
   6027   1.74      manu 	SPARG(&callarg, flag) = flag;
   6028   1.74      manu 
   6029  1.120  pgoyette 	error = rsys_syscall(SYS_fchownat, &callarg, sizeof(callarg), retval);
   6030   1.74      manu 	rsys_seterrno(error);
   6031   1.74      manu 	if (error == 0) {
   6032   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6033   1.74      manu 			rv = *(int *)retval;
   6034   1.74      manu 		else
   6035   1.74      manu 			rv = *retval;
   6036   1.74      manu 	}
   6037   1.74      manu 	return rv;
   6038   1.74      manu }
   6039  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6040  1.103     pooka __weak_alias(fchownat,rump___sysimpl_fchownat);
   6041  1.103     pooka __weak_alias(_fchownat,rump___sysimpl_fchownat);
   6042  1.103     pooka __strong_alias(_sys_fchownat,rump___sysimpl_fchownat);
   6043  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6044   1.74      manu 
   6045   1.74      manu int rump___sysimpl_fstatat(int, const char *, struct stat *, int);
   6046   1.74      manu int
   6047   1.74      manu rump___sysimpl_fstatat(int fd, const char * path, struct stat * buf, int flag)
   6048   1.74      manu {
   6049   1.93     pooka 	register_t retval[2];
   6050   1.74      manu 	int error = 0;
   6051   1.74      manu 	int rv = -1;
   6052   1.74      manu 	struct sys_fstatat_args callarg;
   6053   1.74      manu 
   6054   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6055   1.74      manu 	SPARG(&callarg, fd) = fd;
   6056   1.74      manu 	SPARG(&callarg, path) = path;
   6057   1.74      manu 	SPARG(&callarg, buf) = buf;
   6058   1.74      manu 	SPARG(&callarg, flag) = flag;
   6059   1.74      manu 
   6060  1.120  pgoyette 	error = rsys_syscall(SYS_fstatat, &callarg, sizeof(callarg), retval);
   6061   1.74      manu 	rsys_seterrno(error);
   6062   1.74      manu 	if (error == 0) {
   6063   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6064   1.74      manu 			rv = *(int *)retval;
   6065   1.74      manu 		else
   6066   1.74      manu 			rv = *retval;
   6067   1.74      manu 	}
   6068   1.74      manu 	return rv;
   6069   1.74      manu }
   6070  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6071  1.103     pooka __weak_alias(fstatat,rump___sysimpl_fstatat);
   6072  1.103     pooka __weak_alias(_fstatat,rump___sysimpl_fstatat);
   6073  1.103     pooka __strong_alias(_sys_fstatat,rump___sysimpl_fstatat);
   6074  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6075   1.74      manu 
   6076   1.74      manu int rump___sysimpl_utimensat(int, const char *, const struct timespec *, int);
   6077   1.74      manu int
   6078   1.74      manu rump___sysimpl_utimensat(int fd, const char * path, const struct timespec * tptr, int flag)
   6079   1.74      manu {
   6080   1.93     pooka 	register_t retval[2];
   6081   1.74      manu 	int error = 0;
   6082   1.74      manu 	int rv = -1;
   6083   1.74      manu 	struct sys_utimensat_args callarg;
   6084   1.74      manu 
   6085   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6086   1.74      manu 	SPARG(&callarg, fd) = fd;
   6087   1.74      manu 	SPARG(&callarg, path) = path;
   6088   1.74      manu 	SPARG(&callarg, tptr) = tptr;
   6089   1.74      manu 	SPARG(&callarg, flag) = flag;
   6090   1.74      manu 
   6091  1.120  pgoyette 	error = rsys_syscall(SYS_utimensat, &callarg, sizeof(callarg), retval);
   6092   1.74      manu 	rsys_seterrno(error);
   6093   1.74      manu 	if (error == 0) {
   6094   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6095   1.74      manu 			rv = *(int *)retval;
   6096   1.74      manu 		else
   6097   1.74      manu 			rv = *retval;
   6098   1.74      manu 	}
   6099   1.74      manu 	return rv;
   6100   1.74      manu }
   6101  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6102  1.103     pooka __weak_alias(utimensat,rump___sysimpl_utimensat);
   6103  1.103     pooka __weak_alias(_utimensat,rump___sysimpl_utimensat);
   6104  1.103     pooka __strong_alias(_sys_utimensat,rump___sysimpl_utimensat);
   6105  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6106   1.74      manu 
   6107   1.74      manu int rump___sysimpl_openat(int, const char *, int, mode_t);
   6108   1.74      manu int
   6109   1.74      manu rump___sysimpl_openat(int fd, const char * path, int oflags, mode_t mode)
   6110   1.74      manu {
   6111   1.93     pooka 	register_t retval[2];
   6112   1.74      manu 	int error = 0;
   6113   1.74      manu 	int rv = -1;
   6114   1.74      manu 	struct sys_openat_args callarg;
   6115   1.74      manu 
   6116   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6117   1.74      manu 	SPARG(&callarg, fd) = fd;
   6118   1.74      manu 	SPARG(&callarg, path) = path;
   6119   1.74      manu 	SPARG(&callarg, oflags) = oflags;
   6120   1.74      manu 	SPARG(&callarg, mode) = mode;
   6121   1.74      manu 
   6122  1.120  pgoyette 	error = rsys_syscall(SYS_openat, &callarg, sizeof(callarg), retval);
   6123   1.74      manu 	rsys_seterrno(error);
   6124   1.74      manu 	if (error == 0) {
   6125   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6126   1.74      manu 			rv = *(int *)retval;
   6127   1.74      manu 		else
   6128   1.74      manu 			rv = *retval;
   6129   1.74      manu 	}
   6130   1.74      manu 	return rv;
   6131   1.74      manu }
   6132  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6133  1.103     pooka __weak_alias(openat,rump___sysimpl_openat);
   6134  1.103     pooka __weak_alias(_openat,rump___sysimpl_openat);
   6135  1.103     pooka __strong_alias(_sys_openat,rump___sysimpl_openat);
   6136  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6137   1.74      manu 
   6138  1.105  christos ssize_t rump___sysimpl_readlinkat(int, const char *, char *, size_t);
   6139  1.105  christos ssize_t
   6140   1.74      manu rump___sysimpl_readlinkat(int fd, const char * path, char * buf, size_t bufsize)
   6141   1.74      manu {
   6142   1.93     pooka 	register_t retval[2];
   6143   1.74      manu 	int error = 0;
   6144  1.105  christos 	ssize_t rv = -1;
   6145   1.74      manu 	struct sys_readlinkat_args callarg;
   6146   1.74      manu 
   6147   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6148   1.74      manu 	SPARG(&callarg, fd) = fd;
   6149   1.74      manu 	SPARG(&callarg, path) = path;
   6150   1.74      manu 	SPARG(&callarg, buf) = buf;
   6151   1.74      manu 	SPARG(&callarg, bufsize) = bufsize;
   6152   1.74      manu 
   6153  1.120  pgoyette 	error = rsys_syscall(SYS_readlinkat, &callarg, sizeof(callarg), retval);
   6154   1.74      manu 	rsys_seterrno(error);
   6155   1.74      manu 	if (error == 0) {
   6156  1.105  christos 		if (sizeof(ssize_t) > sizeof(register_t))
   6157  1.105  christos 			rv = *(ssize_t *)retval;
   6158   1.74      manu 		else
   6159   1.74      manu 			rv = *retval;
   6160   1.74      manu 	}
   6161   1.74      manu 	return rv;
   6162   1.74      manu }
   6163  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6164  1.103     pooka __weak_alias(readlinkat,rump___sysimpl_readlinkat);
   6165  1.103     pooka __weak_alias(_readlinkat,rump___sysimpl_readlinkat);
   6166  1.103     pooka __strong_alias(_sys_readlinkat,rump___sysimpl_readlinkat);
   6167  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6168   1.74      manu 
   6169   1.74      manu int rump___sysimpl_symlinkat(const char *, int, const char *);
   6170   1.74      manu int
   6171   1.74      manu rump___sysimpl_symlinkat(const char * path1, int fd, const char * path2)
   6172   1.74      manu {
   6173   1.93     pooka 	register_t retval[2];
   6174   1.74      manu 	int error = 0;
   6175   1.74      manu 	int rv = -1;
   6176   1.74      manu 	struct sys_symlinkat_args callarg;
   6177   1.74      manu 
   6178   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6179   1.74      manu 	SPARG(&callarg, path1) = path1;
   6180   1.74      manu 	SPARG(&callarg, fd) = fd;
   6181   1.74      manu 	SPARG(&callarg, path2) = path2;
   6182   1.74      manu 
   6183  1.120  pgoyette 	error = rsys_syscall(SYS_symlinkat, &callarg, sizeof(callarg), retval);
   6184   1.74      manu 	rsys_seterrno(error);
   6185   1.74      manu 	if (error == 0) {
   6186   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6187   1.74      manu 			rv = *(int *)retval;
   6188   1.74      manu 		else
   6189   1.74      manu 			rv = *retval;
   6190   1.74      manu 	}
   6191   1.74      manu 	return rv;
   6192   1.74      manu }
   6193  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6194  1.103     pooka __weak_alias(symlinkat,rump___sysimpl_symlinkat);
   6195  1.103     pooka __weak_alias(_symlinkat,rump___sysimpl_symlinkat);
   6196  1.103     pooka __strong_alias(_sys_symlinkat,rump___sysimpl_symlinkat);
   6197  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6198   1.74      manu 
   6199   1.74      manu int rump___sysimpl_unlinkat(int, const char *, int);
   6200   1.74      manu int
   6201   1.74      manu rump___sysimpl_unlinkat(int fd, const char * path, int flag)
   6202   1.74      manu {
   6203   1.93     pooka 	register_t retval[2];
   6204   1.74      manu 	int error = 0;
   6205   1.74      manu 	int rv = -1;
   6206   1.74      manu 	struct sys_unlinkat_args callarg;
   6207   1.74      manu 
   6208   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6209   1.74      manu 	SPARG(&callarg, fd) = fd;
   6210   1.74      manu 	SPARG(&callarg, path) = path;
   6211   1.74      manu 	SPARG(&callarg, flag) = flag;
   6212   1.74      manu 
   6213  1.120  pgoyette 	error = rsys_syscall(SYS_unlinkat, &callarg, sizeof(callarg), retval);
   6214   1.74      manu 	rsys_seterrno(error);
   6215   1.74      manu 	if (error == 0) {
   6216   1.74      manu 		if (sizeof(int) > sizeof(register_t))
   6217   1.74      manu 			rv = *(int *)retval;
   6218   1.74      manu 		else
   6219   1.74      manu 			rv = *retval;
   6220   1.74      manu 	}
   6221   1.74      manu 	return rv;
   6222   1.74      manu }
   6223  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6224  1.103     pooka __weak_alias(unlinkat,rump___sysimpl_unlinkat);
   6225  1.103     pooka __weak_alias(_unlinkat,rump___sysimpl_unlinkat);
   6226  1.103     pooka __strong_alias(_sys_unlinkat,rump___sysimpl_unlinkat);
   6227  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6228   1.74      manu 
   6229   1.75  dholland int rump___sysimpl_futimens(int, const struct timespec *);
   6230   1.75  dholland int
   6231   1.75  dholland rump___sysimpl_futimens(int fd, const struct timespec * tptr)
   6232   1.75  dholland {
   6233   1.93     pooka 	register_t retval[2];
   6234   1.75  dholland 	int error = 0;
   6235   1.75  dholland 	int rv = -1;
   6236   1.75  dholland 	struct sys_futimens_args callarg;
   6237   1.75  dholland 
   6238   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6239   1.75  dholland 	SPARG(&callarg, fd) = fd;
   6240   1.75  dholland 	SPARG(&callarg, tptr) = tptr;
   6241   1.75  dholland 
   6242  1.120  pgoyette 	error = rsys_syscall(SYS_futimens, &callarg, sizeof(callarg), retval);
   6243   1.75  dholland 	rsys_seterrno(error);
   6244   1.75  dholland 	if (error == 0) {
   6245   1.75  dholland 		if (sizeof(int) > sizeof(register_t))
   6246   1.75  dholland 			rv = *(int *)retval;
   6247   1.75  dholland 		else
   6248   1.75  dholland 			rv = *retval;
   6249   1.75  dholland 	}
   6250   1.75  dholland 	return rv;
   6251   1.75  dholland }
   6252  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6253  1.103     pooka __weak_alias(futimens,rump___sysimpl_futimens);
   6254  1.103     pooka __weak_alias(_futimens,rump___sysimpl_futimens);
   6255  1.103     pooka __strong_alias(_sys_futimens,rump___sysimpl_futimens);
   6256  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6257   1.75  dholland 
   6258   1.75  dholland int rump___sysimpl___quotactl(const char *, struct quotactl_args *);
   6259   1.75  dholland int
   6260   1.75  dholland rump___sysimpl___quotactl(const char * path, struct quotactl_args * args)
   6261   1.75  dholland {
   6262   1.93     pooka 	register_t retval[2];
   6263   1.75  dholland 	int error = 0;
   6264   1.75  dholland 	int rv = -1;
   6265   1.75  dholland 	struct sys___quotactl_args callarg;
   6266   1.75  dholland 
   6267   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6268   1.75  dholland 	SPARG(&callarg, path) = path;
   6269   1.75  dholland 	SPARG(&callarg, args) = args;
   6270   1.75  dholland 
   6271  1.120  pgoyette 	error = rsys_syscall(SYS___quotactl, &callarg, sizeof(callarg), retval);
   6272   1.75  dholland 	rsys_seterrno(error);
   6273   1.75  dholland 	if (error == 0) {
   6274   1.75  dholland 		if (sizeof(int) > sizeof(register_t))
   6275   1.75  dholland 			rv = *(int *)retval;
   6276   1.75  dholland 		else
   6277   1.75  dholland 			rv = *retval;
   6278   1.75  dholland 	}
   6279   1.75  dholland 	return rv;
   6280   1.75  dholland }
   6281  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6282  1.103     pooka __weak_alias(__quotactl,rump___sysimpl___quotactl);
   6283  1.103     pooka __weak_alias(___quotactl,rump___sysimpl___quotactl);
   6284  1.103     pooka __strong_alias(_sys___quotactl,rump___sysimpl___quotactl);
   6285  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6286   1.75  dholland 
   6287   1.89     pooka int rump___sysimpl_recvmmsg(int, struct mmsghdr *, unsigned int, unsigned int, struct timespec *);
   6288   1.89     pooka int
   6289   1.89     pooka rump___sysimpl_recvmmsg(int s, struct mmsghdr * mmsg, unsigned int vlen, unsigned int flags, struct timespec * timeout)
   6290   1.89     pooka {
   6291   1.93     pooka 	register_t retval[2];
   6292   1.89     pooka 	int error = 0;
   6293   1.89     pooka 	int rv = -1;
   6294   1.89     pooka 	struct sys_recvmmsg_args callarg;
   6295   1.89     pooka 
   6296   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6297   1.89     pooka 	SPARG(&callarg, s) = s;
   6298   1.89     pooka 	SPARG(&callarg, mmsg) = mmsg;
   6299   1.89     pooka 	SPARG(&callarg, vlen) = vlen;
   6300   1.89     pooka 	SPARG(&callarg, flags) = flags;
   6301   1.89     pooka 	SPARG(&callarg, timeout) = timeout;
   6302   1.89     pooka 
   6303  1.120  pgoyette 	error = rsys_syscall(SYS_recvmmsg, &callarg, sizeof(callarg), retval);
   6304   1.89     pooka 	rsys_seterrno(error);
   6305   1.89     pooka 	if (error == 0) {
   6306   1.89     pooka 		if (sizeof(int) > sizeof(register_t))
   6307   1.89     pooka 			rv = *(int *)retval;
   6308   1.89     pooka 		else
   6309   1.89     pooka 			rv = *retval;
   6310   1.89     pooka 	}
   6311   1.89     pooka 	return rv;
   6312   1.89     pooka }
   6313  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6314  1.103     pooka __weak_alias(recvmmsg,rump___sysimpl_recvmmsg);
   6315  1.103     pooka __weak_alias(_recvmmsg,rump___sysimpl_recvmmsg);
   6316  1.103     pooka __strong_alias(_sys_recvmmsg,rump___sysimpl_recvmmsg);
   6317  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6318   1.89     pooka 
   6319   1.89     pooka int rump___sysimpl_sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int);
   6320   1.89     pooka int
   6321   1.89     pooka rump___sysimpl_sendmmsg(int s, struct mmsghdr * mmsg, unsigned int vlen, unsigned int flags)
   6322   1.89     pooka {
   6323   1.93     pooka 	register_t retval[2];
   6324   1.89     pooka 	int error = 0;
   6325   1.89     pooka 	int rv = -1;
   6326   1.89     pooka 	struct sys_sendmmsg_args callarg;
   6327   1.89     pooka 
   6328   1.95     pooka 	memset(&callarg, 0, sizeof(callarg));
   6329   1.89     pooka 	SPARG(&callarg, s) = s;
   6330   1.89     pooka 	SPARG(&callarg, mmsg) = mmsg;
   6331   1.89     pooka 	SPARG(&callarg, vlen) = vlen;
   6332   1.89     pooka 	SPARG(&callarg, flags) = flags;
   6333   1.89     pooka 
   6334  1.120  pgoyette 	error = rsys_syscall(SYS_sendmmsg, &callarg, sizeof(callarg), retval);
   6335   1.89     pooka 	rsys_seterrno(error);
   6336   1.89     pooka 	if (error == 0) {
   6337   1.89     pooka 		if (sizeof(int) > sizeof(register_t))
   6338   1.89     pooka 			rv = *(int *)retval;
   6339   1.89     pooka 		else
   6340   1.89     pooka 			rv = *retval;
   6341   1.89     pooka 	}
   6342   1.89     pooka 	return rv;
   6343   1.89     pooka }
   6344  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6345  1.103     pooka __weak_alias(sendmmsg,rump___sysimpl_sendmmsg);
   6346  1.103     pooka __weak_alias(_sendmmsg,rump___sysimpl_sendmmsg);
   6347  1.103     pooka __strong_alias(_sys_sendmmsg,rump___sysimpl_sendmmsg);
   6348  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6349   1.89     pooka 
   6350   1.98     pooka int rump___sysimpl_clock_nanosleep(clockid_t, int, const struct timespec *, struct timespec *);
   6351   1.98     pooka int
   6352   1.98     pooka rump___sysimpl_clock_nanosleep(clockid_t clock_id, int flags, const struct timespec * rqtp, struct timespec * rmtp)
   6353   1.98     pooka {
   6354   1.98     pooka 	register_t retval[2];
   6355   1.98     pooka 	int rv = -1;
   6356   1.98     pooka 	struct sys_clock_nanosleep_args callarg;
   6357   1.98     pooka 
   6358   1.98     pooka 	memset(&callarg, 0, sizeof(callarg));
   6359   1.98     pooka 	SPARG(&callarg, clock_id) = clock_id;
   6360   1.98     pooka 	SPARG(&callarg, flags) = flags;
   6361   1.98     pooka 	SPARG(&callarg, rqtp) = rqtp;
   6362   1.98     pooka 	SPARG(&callarg, rmtp) = rmtp;
   6363   1.98     pooka 
   6364  1.119  pgoyette 	(void)rsys_syscall(SYS_clock_nanosleep, &callarg, sizeof(callarg), retval);
   6365  1.116  pgoyette 	if (sizeof(int) > sizeof(register_t))
   6366  1.116  pgoyette 		rv = *(int *)retval;
   6367  1.116  pgoyette 	else
   6368  1.116  pgoyette 		rv = *retval;
   6369   1.98     pooka 	return rv;
   6370   1.98     pooka }
   6371  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6372  1.103     pooka __weak_alias(clock_nanosleep,rump___sysimpl_clock_nanosleep);
   6373  1.103     pooka __weak_alias(_clock_nanosleep,rump___sysimpl_clock_nanosleep);
   6374  1.103     pooka __strong_alias(_sys_clock_nanosleep,rump___sysimpl_clock_nanosleep);
   6375  1.103     pooka #endif /* RUMP_KERNEL_IS_LIBC */
   6376   1.98     pooka 
   6377  1.104  dholland int rump___sysimpl_posix_fallocate(int, off_t, off_t);
   6378  1.104  dholland int
   6379  1.104  dholland rump___sysimpl_posix_fallocate(int fd, off_t pos, off_t len)
   6380  1.104  dholland {
   6381  1.104  dholland 	register_t retval[2];
   6382  1.104  dholland 	int rv = -1;
   6383  1.104  dholland 	struct sys_posix_fallocate_args callarg;
   6384  1.104  dholland 
   6385  1.104  dholland 	memset(&callarg, 0, sizeof(callarg));
   6386  1.104  dholland 	SPARG(&callarg, fd) = fd;
   6387  1.104  dholland 	SPARG(&callarg, PAD) = 0;
   6388  1.104  dholland 	SPARG(&callarg, pos) = pos;
   6389  1.104  dholland 	SPARG(&callarg, len) = len;
   6390  1.104  dholland 
   6391  1.119  pgoyette 	(void)rsys_syscall(SYS_posix_fallocate, &callarg, sizeof(callarg), retval);
   6392  1.105  christos 	if (sizeof(int) > sizeof(register_t))
   6393  1.105  christos 		rv = *(int *)retval;
   6394  1.105  christos 	else
   6395  1.105  christos 		rv = *retval;
   6396  1.104  dholland 	return rv;
   6397  1.104  dholland }
   6398  1.104  dholland #ifdef RUMP_KERNEL_IS_LIBC
   6399  1.104  dholland __weak_alias(posix_fallocate,rump___sysimpl_posix_fallocate);
   6400  1.104  dholland __weak_alias(_posix_fallocate,rump___sysimpl_posix_fallocate);
   6401  1.104  dholland __strong_alias(_sys_posix_fallocate,rump___sysimpl_posix_fallocate);
   6402  1.104  dholland #endif /* RUMP_KERNEL_IS_LIBC */
   6403  1.104  dholland 
   6404  1.104  dholland int rump___sysimpl_fdiscard(int, off_t, off_t);
   6405  1.104  dholland int
   6406  1.104  dholland rump___sysimpl_fdiscard(int fd, off_t pos, off_t len)
   6407  1.104  dholland {
   6408  1.104  dholland 	register_t retval[2];
   6409  1.104  dholland 	int error = 0;
   6410  1.104  dholland 	int rv = -1;
   6411  1.104  dholland 	struct sys_fdiscard_args callarg;
   6412  1.104  dholland 
   6413  1.104  dholland 	memset(&callarg, 0, sizeof(callarg));
   6414  1.104  dholland 	SPARG(&callarg, fd) = fd;
   6415  1.104  dholland 	SPARG(&callarg, PAD) = 0;
   6416  1.104  dholland 	SPARG(&callarg, pos) = pos;
   6417  1.104  dholland 	SPARG(&callarg, len) = len;
   6418  1.104  dholland 
   6419  1.120  pgoyette 	error = rsys_syscall(SYS_fdiscard, &callarg, sizeof(callarg), retval);
   6420  1.104  dholland 	rsys_seterrno(error);
   6421  1.104  dholland 	if (error == 0) {
   6422  1.104  dholland 		if (sizeof(int) > sizeof(register_t))
   6423  1.104  dholland 			rv = *(int *)retval;
   6424  1.104  dholland 		else
   6425  1.104  dholland 			rv = *retval;
   6426  1.104  dholland 	}
   6427  1.104  dholland 	return rv;
   6428  1.104  dholland }
   6429  1.104  dholland #ifdef RUMP_KERNEL_IS_LIBC
   6430  1.104  dholland __weak_alias(fdiscard,rump___sysimpl_fdiscard);
   6431  1.104  dholland __weak_alias(_fdiscard,rump___sysimpl_fdiscard);
   6432  1.104  dholland __strong_alias(_sys_fdiscard,rump___sysimpl_fdiscard);
   6433  1.104  dholland #endif /* RUMP_KERNEL_IS_LIBC */
   6434  1.104  dholland 
   6435  1.155  christos int rump___sysimpl_clock_getcpuclockid2(idtype_t, id_t, clockid_t *);
   6436  1.155  christos int
   6437  1.155  christos rump___sysimpl_clock_getcpuclockid2(idtype_t idtype, id_t id, clockid_t * clock_id)
   6438  1.155  christos {
   6439  1.155  christos 	register_t retval[2];
   6440  1.155  christos 	int error = 0;
   6441  1.155  christos 	int rv = -1;
   6442  1.155  christos 	struct sys_clock_getcpuclockid2_args callarg;
   6443  1.155  christos 
   6444  1.155  christos 	memset(&callarg, 0, sizeof(callarg));
   6445  1.155  christos 	SPARG(&callarg, idtype) = idtype;
   6446  1.155  christos 	SPARG(&callarg, id) = id;
   6447  1.155  christos 	SPARG(&callarg, clock_id) = clock_id;
   6448  1.155  christos 
   6449  1.155  christos 	error = rsys_syscall(SYS_clock_getcpuclockid2, &callarg, sizeof(callarg), retval);
   6450  1.155  christos 	rsys_seterrno(error);
   6451  1.155  christos 	if (error == 0) {
   6452  1.155  christos 		if (sizeof(int) > sizeof(register_t))
   6453  1.155  christos 			rv = *(int *)retval;
   6454  1.155  christos 		else
   6455  1.155  christos 			rv = *retval;
   6456  1.155  christos 	}
   6457  1.155  christos 	return rv;
   6458  1.155  christos }
   6459  1.155  christos #ifdef RUMP_KERNEL_IS_LIBC
   6460  1.155  christos __weak_alias(clock_getcpuclockid2,rump___sysimpl_clock_getcpuclockid2);
   6461  1.155  christos __weak_alias(_clock_getcpuclockid2,rump___sysimpl_clock_getcpuclockid2);
   6462  1.155  christos __strong_alias(_sys_clock_getcpuclockid2,rump___sysimpl_clock_getcpuclockid2);
   6463  1.155  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6464  1.155  christos 
   6465  1.142  christos int rump___sysimpl_getvfsstat90(struct statvfs *, size_t, int);
   6466  1.142  christos int
   6467  1.142  christos rump___sysimpl_getvfsstat90(struct statvfs * buf, size_t bufsize, int flags)
   6468  1.142  christos {
   6469  1.142  christos 	register_t retval[2];
   6470  1.142  christos 	int error = 0;
   6471  1.142  christos 	int rv = -1;
   6472  1.142  christos 	struct sys___getvfsstat90_args callarg;
   6473  1.142  christos 
   6474  1.142  christos 	memset(&callarg, 0, sizeof(callarg));
   6475  1.142  christos 	SPARG(&callarg, buf) = buf;
   6476  1.142  christos 	SPARG(&callarg, bufsize) = bufsize;
   6477  1.142  christos 	SPARG(&callarg, flags) = flags;
   6478  1.142  christos 
   6479  1.142  christos 	error = rsys_syscall(SYS___getvfsstat90, &callarg, sizeof(callarg), retval);
   6480  1.142  christos 	rsys_seterrno(error);
   6481  1.142  christos 	if (error == 0) {
   6482  1.142  christos 		if (sizeof(int) > sizeof(register_t))
   6483  1.142  christos 			rv = *(int *)retval;
   6484  1.142  christos 		else
   6485  1.142  christos 			rv = *retval;
   6486  1.142  christos 	}
   6487  1.142  christos 	return rv;
   6488  1.142  christos }
   6489  1.142  christos #ifdef RUMP_KERNEL_IS_LIBC
   6490  1.142  christos __weak_alias(getvfsstat,rump___sysimpl_getvfsstat90);
   6491  1.142  christos __weak_alias(__getvfsstat90,rump___sysimpl_getvfsstat90);
   6492  1.142  christos __weak_alias(___getvfsstat90,rump___sysimpl_getvfsstat90);
   6493  1.142  christos __strong_alias(_sys___getvfsstat90,rump___sysimpl_getvfsstat90);
   6494  1.142  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6495  1.142  christos 
   6496  1.142  christos int rump___sysimpl_statvfs190(const char *, struct statvfs *, int);
   6497  1.142  christos int
   6498  1.142  christos rump___sysimpl_statvfs190(const char * path, struct statvfs * buf, int flags)
   6499  1.142  christos {
   6500  1.142  christos 	register_t retval[2];
   6501  1.142  christos 	int error = 0;
   6502  1.142  christos 	int rv = -1;
   6503  1.142  christos 	struct sys___statvfs190_args callarg;
   6504  1.142  christos 
   6505  1.142  christos 	memset(&callarg, 0, sizeof(callarg));
   6506  1.142  christos 	SPARG(&callarg, path) = path;
   6507  1.142  christos 	SPARG(&callarg, buf) = buf;
   6508  1.142  christos 	SPARG(&callarg, flags) = flags;
   6509  1.142  christos 
   6510  1.142  christos 	error = rsys_syscall(SYS___statvfs190, &callarg, sizeof(callarg), retval);
   6511  1.142  christos 	rsys_seterrno(error);
   6512  1.142  christos 	if (error == 0) {
   6513  1.142  christos 		if (sizeof(int) > sizeof(register_t))
   6514  1.142  christos 			rv = *(int *)retval;
   6515  1.142  christos 		else
   6516  1.142  christos 			rv = *retval;
   6517  1.142  christos 	}
   6518  1.142  christos 	return rv;
   6519  1.142  christos }
   6520  1.142  christos #ifdef RUMP_KERNEL_IS_LIBC
   6521  1.142  christos __weak_alias(statvfs1,rump___sysimpl_statvfs190);
   6522  1.142  christos __weak_alias(__statvfs190,rump___sysimpl_statvfs190);
   6523  1.142  christos __weak_alias(___statvfs190,rump___sysimpl_statvfs190);
   6524  1.142  christos __strong_alias(_sys___statvfs190,rump___sysimpl_statvfs190);
   6525  1.142  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6526  1.142  christos 
   6527  1.142  christos int rump___sysimpl_fstatvfs190(int, struct statvfs *, int);
   6528  1.142  christos int
   6529  1.142  christos rump___sysimpl_fstatvfs190(int fd, struct statvfs * buf, int flags)
   6530  1.142  christos {
   6531  1.142  christos 	register_t retval[2];
   6532  1.142  christos 	int error = 0;
   6533  1.142  christos 	int rv = -1;
   6534  1.142  christos 	struct sys___fstatvfs190_args callarg;
   6535  1.142  christos 
   6536  1.142  christos 	memset(&callarg, 0, sizeof(callarg));
   6537  1.142  christos 	SPARG(&callarg, fd) = fd;
   6538  1.142  christos 	SPARG(&callarg, buf) = buf;
   6539  1.142  christos 	SPARG(&callarg, flags) = flags;
   6540  1.142  christos 
   6541  1.142  christos 	error = rsys_syscall(SYS___fstatvfs190, &callarg, sizeof(callarg), retval);
   6542  1.142  christos 	rsys_seterrno(error);
   6543  1.142  christos 	if (error == 0) {
   6544  1.142  christos 		if (sizeof(int) > sizeof(register_t))
   6545  1.142  christos 			rv = *(int *)retval;
   6546  1.142  christos 		else
   6547  1.142  christos 			rv = *retval;
   6548  1.142  christos 	}
   6549  1.142  christos 	return rv;
   6550  1.142  christos }
   6551  1.142  christos #ifdef RUMP_KERNEL_IS_LIBC
   6552  1.142  christos __weak_alias(fstatvfs1,rump___sysimpl_fstatvfs190);
   6553  1.142  christos __weak_alias(__fstatvfs190,rump___sysimpl_fstatvfs190);
   6554  1.142  christos __weak_alias(___fstatvfs190,rump___sysimpl_fstatvfs190);
   6555  1.142  christos __strong_alias(_sys___fstatvfs190,rump___sysimpl_fstatvfs190);
   6556  1.142  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6557  1.142  christos 
   6558  1.142  christos int rump___sysimpl_fhstatvfs190(const void *, size_t, struct statvfs *, int);
   6559  1.142  christos int
   6560  1.142  christos rump___sysimpl_fhstatvfs190(const void * fhp, size_t fh_size, struct statvfs * buf, int flags)
   6561  1.142  christos {
   6562  1.142  christos 	register_t retval[2];
   6563  1.142  christos 	int error = 0;
   6564  1.142  christos 	int rv = -1;
   6565  1.142  christos 	struct sys___fhstatvfs190_args callarg;
   6566  1.142  christos 
   6567  1.142  christos 	memset(&callarg, 0, sizeof(callarg));
   6568  1.142  christos 	SPARG(&callarg, fhp) = fhp;
   6569  1.142  christos 	SPARG(&callarg, fh_size) = fh_size;
   6570  1.142  christos 	SPARG(&callarg, buf) = buf;
   6571  1.142  christos 	SPARG(&callarg, flags) = flags;
   6572  1.142  christos 
   6573  1.142  christos 	error = rsys_syscall(SYS___fhstatvfs190, &callarg, sizeof(callarg), retval);
   6574  1.142  christos 	rsys_seterrno(error);
   6575  1.142  christos 	if (error == 0) {
   6576  1.142  christos 		if (sizeof(int) > sizeof(register_t))
   6577  1.142  christos 			rv = *(int *)retval;
   6578  1.142  christos 		else
   6579  1.142  christos 			rv = *retval;
   6580  1.142  christos 	}
   6581  1.142  christos 	return rv;
   6582  1.142  christos }
   6583  1.142  christos #ifdef RUMP_KERNEL_IS_LIBC
   6584  1.142  christos __weak_alias(fhstatvfs1,rump___sysimpl_fhstatvfs190);
   6585  1.142  christos __weak_alias(__fhstatvfs190,rump___sysimpl_fhstatvfs190);
   6586  1.142  christos __weak_alias(___fhstatvfs190,rump___sysimpl_fhstatvfs190);
   6587  1.142  christos __strong_alias(_sys___fhstatvfs190,rump___sysimpl_fhstatvfs190);
   6588  1.142  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6589  1.142  christos 
   6590  1.150  christos long rump___sysimpl_lpathconf(const char *, int);
   6591  1.150  christos long
   6592  1.150  christos rump___sysimpl_lpathconf(const char * path, int name)
   6593  1.150  christos {
   6594  1.150  christos 	register_t retval[2];
   6595  1.150  christos 	int error = 0;
   6596  1.150  christos 	long rv = -1;
   6597  1.150  christos 	struct sys_lpathconf_args callarg;
   6598  1.150  christos 
   6599  1.150  christos 	memset(&callarg, 0, sizeof(callarg));
   6600  1.150  christos 	SPARG(&callarg, path) = path;
   6601  1.150  christos 	SPARG(&callarg, name) = name;
   6602  1.150  christos 
   6603  1.150  christos 	error = rsys_syscall(SYS_lpathconf, &callarg, sizeof(callarg), retval);
   6604  1.150  christos 	rsys_seterrno(error);
   6605  1.150  christos 	if (error == 0) {
   6606  1.150  christos 		if (sizeof(long) > sizeof(register_t))
   6607  1.150  christos 			rv = *(long *)retval;
   6608  1.150  christos 		else
   6609  1.150  christos 			rv = *retval;
   6610  1.150  christos 	}
   6611  1.150  christos 	return rv;
   6612  1.150  christos }
   6613  1.150  christos #ifdef RUMP_KERNEL_IS_LIBC
   6614  1.150  christos __weak_alias(lpathconf,rump___sysimpl_lpathconf);
   6615  1.150  christos __weak_alias(_lpathconf,rump___sysimpl_lpathconf);
   6616  1.150  christos __strong_alias(_sys_lpathconf,rump___sysimpl_lpathconf);
   6617  1.150  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6618  1.150  christos 
   6619  1.159  christos int rump___sysimpl_kevent100(int, const struct kevent *, size_t, struct kevent *, size_t, const struct timespec *);
   6620  1.159  christos int
   6621  1.159  christos rump___sysimpl_kevent100(int fd, const struct kevent * changelist, size_t nchanges, struct kevent * eventlist, size_t nevents, const struct timespec * timeout)
   6622  1.159  christos {
   6623  1.159  christos 	register_t retval[2];
   6624  1.159  christos 	int error = 0;
   6625  1.159  christos 	int rv = -1;
   6626  1.159  christos 	struct sys___kevent100_args callarg;
   6627  1.159  christos 
   6628  1.159  christos 	memset(&callarg, 0, sizeof(callarg));
   6629  1.159  christos 	SPARG(&callarg, fd) = fd;
   6630  1.159  christos 	SPARG(&callarg, changelist) = changelist;
   6631  1.159  christos 	SPARG(&callarg, nchanges) = nchanges;
   6632  1.159  christos 	SPARG(&callarg, eventlist) = eventlist;
   6633  1.159  christos 	SPARG(&callarg, nevents) = nevents;
   6634  1.159  christos 	SPARG(&callarg, timeout) = timeout;
   6635  1.159  christos 
   6636  1.159  christos 	error = rsys_syscall(SYS___kevent100, &callarg, sizeof(callarg), retval);
   6637  1.159  christos 	rsys_seterrno(error);
   6638  1.159  christos 	if (error == 0) {
   6639  1.159  christos 		if (sizeof(int) > sizeof(register_t))
   6640  1.159  christos 			rv = *(int *)retval;
   6641  1.159  christos 		else
   6642  1.159  christos 			rv = *retval;
   6643  1.159  christos 	}
   6644  1.159  christos 	return rv;
   6645  1.159  christos }
   6646  1.159  christos #ifdef RUMP_KERNEL_IS_LIBC
   6647  1.159  christos __weak_alias(kevent,rump___sysimpl_kevent100);
   6648  1.159  christos __weak_alias(__kevent100,rump___sysimpl_kevent100);
   6649  1.159  christos __weak_alias(___kevent100,rump___sysimpl_kevent100);
   6650  1.159  christos __strong_alias(_sys___kevent100,rump___sysimpl_kevent100);
   6651  1.159  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6652  1.159  christos 
   6653  1.161  christos int rump___sysimpl_dup3100(int, int, int);
   6654  1.160  christos int
   6655  1.161  christos rump___sysimpl_dup3100(int from, int to, int flags)
   6656  1.160  christos {
   6657  1.160  christos 	register_t retval[2];
   6658  1.160  christos 	int error = 0;
   6659  1.160  christos 	int rv = -1;
   6660  1.161  christos 	struct sys___dup3100_args callarg;
   6661  1.160  christos 
   6662  1.160  christos 	memset(&callarg, 0, sizeof(callarg));
   6663  1.160  christos 	SPARG(&callarg, from) = from;
   6664  1.160  christos 	SPARG(&callarg, to) = to;
   6665  1.160  christos 	SPARG(&callarg, flags) = flags;
   6666  1.160  christos 
   6667  1.161  christos 	error = rsys_syscall(SYS___dup3100, &callarg, sizeof(callarg), retval);
   6668  1.160  christos 	rsys_seterrno(error);
   6669  1.160  christos 	if (error == 0) {
   6670  1.160  christos 		if (sizeof(int) > sizeof(register_t))
   6671  1.160  christos 			rv = *(int *)retval;
   6672  1.160  christos 		else
   6673  1.160  christos 			rv = *retval;
   6674  1.160  christos 	}
   6675  1.160  christos 	return rv;
   6676  1.160  christos }
   6677  1.160  christos #ifdef RUMP_KERNEL_IS_LIBC
   6678  1.161  christos __weak_alias(dup3,rump___sysimpl_dup3100);
   6679  1.161  christos __weak_alias(__dup3100,rump___sysimpl_dup3100);
   6680  1.161  christos __weak_alias(___dup3100,rump___sysimpl_dup3100);
   6681  1.161  christos __strong_alias(_sys___dup3100,rump___sysimpl_dup3100);
   6682  1.160  christos #endif /* RUMP_KERNEL_IS_LIBC */
   6683  1.160  christos 
   6684   1.40     pooka int rump_sys_pipe(int *);
   6685   1.40     pooka int
   6686   1.40     pooka rump_sys_pipe(int *fd)
   6687   1.40     pooka {
   6688   1.93     pooka 	register_t retval[2];
   6689   1.40     pooka 	int error = 0;
   6690   1.40     pooka 
   6691   1.68     pooka 	error = rsys_syscall(SYS_pipe, NULL, 0, retval);
   6692   1.40     pooka 	if (error) {
   6693   1.53     pooka 		rsys_seterrno(error);
   6694   1.40     pooka 	} else {
   6695   1.68     pooka 		fd[0] = retval[0];
   6696   1.68     pooka 		fd[1] = retval[1];
   6697   1.40     pooka 	}
   6698   1.40     pooka 	return error ? -1 : 0;
   6699   1.40     pooka }
   6700  1.103     pooka #ifdef RUMP_KERNEL_IS_LIBC
   6701  1.103     pooka __weak_alias(pipe,rump_sys_pipe);
   6702  1.103     pooka __weak_alias(_pipe,rump_sys_pipe);
   6703  1.103     pooka __strong_alias(_sys_pipe,rump_sys_pipe);
   6704  1.103     pooka #endif
   6705   1.40     pooka 
   6706   1.53     pooka #ifndef RUMP_CLIENT
   6707  1.100     pooka int rumpns_enosys(void);
   6708   1.29     pooka #define	s(type)	sizeof(type)
   6709   1.29     pooka #define	n(type)	(sizeof(type)/sizeof (register_t))
   6710   1.29     pooka #define	ns(type)	n(type), s(type)
   6711   1.29     pooka 
   6712   1.29     pooka struct sysent rump_sysent[] = {
   6713  1.107  christos 	{
   6714  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6715  1.107  christos },		/* 0 = syscall */
   6716  1.107  christos 	{
   6717  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6718  1.107  christos },		/* 1 = exit */
   6719  1.107  christos 	{
   6720  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6721  1.107  christos },		/* 2 = fork */
   6722  1.107  christos 	{
   6723  1.107  christos 		ns(struct sys_read_args),
   6724  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6725  1.107  christos 	},		/* 3 = read */
   6726  1.107  christos 	{
   6727  1.107  christos 		ns(struct sys_write_args),
   6728  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6729  1.107  christos 	},		/* 4 = write */
   6730  1.107  christos 	{
   6731  1.107  christos 		ns(struct sys_open_args),
   6732  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6733  1.107  christos 	},		/* 5 = open */
   6734  1.107  christos 	{
   6735  1.107  christos 		ns(struct sys_close_args),
   6736  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6737  1.107  christos 	},		/* 6 = close */
   6738  1.107  christos 	{
   6739  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6740  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6741  1.107  christos },		/* 7 = wait4 */
   6742  1.107  christos 	{
   6743  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6744  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6745  1.107  christos },		/* 8 = ocreat */
   6746  1.107  christos 	{
   6747  1.107  christos 		ns(struct sys_link_args),
   6748  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6749  1.107  christos 	},		/* 9 = link */
   6750  1.107  christos 	{
   6751  1.107  christos 		ns(struct sys_unlink_args),
   6752  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6753  1.107  christos 	},		/* 10 = unlink */
   6754  1.107  christos 	{
   6755  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6756  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6757  1.107  christos 	},		/* 11 = filler */
   6758  1.107  christos 	{
   6759  1.107  christos 		ns(struct sys_chdir_args),
   6760  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6761  1.107  christos 	},		/* 12 = chdir */
   6762  1.107  christos 	{
   6763  1.107  christos 		ns(struct sys_fchdir_args),
   6764  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6765  1.107  christos 	},		/* 13 = fchdir */
   6766  1.107  christos 	{
   6767  1.107  christos 		ns(struct compat_50_sys_mknod_args),
   6768  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6769  1.107  christos 	},		/* 14 = compat_50_mknod */
   6770  1.107  christos 	{
   6771  1.107  christos 		ns(struct sys_chmod_args),
   6772  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6773  1.107  christos 	},		/* 15 = chmod */
   6774  1.107  christos 	{
   6775  1.107  christos 		ns(struct sys_chown_args),
   6776  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6777  1.107  christos 	},		/* 16 = chown */
   6778  1.107  christos 	{
   6779  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6780  1.107  christos },		/* 17 = break */
   6781  1.107  christos 	{
   6782  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6783  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6784  1.107  christos },		/* 18 = getfsstat */
   6785  1.107  christos 	{
   6786  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6787  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6788  1.107  christos },		/* 19 = olseek */
   6789  1.107  christos 	{
   6790  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6791  1.107  christos 	},		/* 20 = getpid */
   6792  1.107  christos 	{
   6793  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6794  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6795  1.107  christos },		/* 21 = mount */
   6796  1.107  christos 	{
   6797  1.107  christos 		ns(struct sys_unmount_args),
   6798  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6799  1.107  christos 	},		/* 22 = unmount */
   6800  1.107  christos 	{
   6801  1.107  christos 		ns(struct sys_setuid_args),
   6802  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6803  1.107  christos 	},		/* 23 = setuid */
   6804  1.107  christos 	{
   6805  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6806  1.107  christos 	},		/* 24 = getuid */
   6807  1.107  christos 	{
   6808  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6809  1.107  christos 	},		/* 25 = geteuid */
   6810  1.107  christos 	{
   6811  1.130  pgoyette 		.sy_flags = SYCALL_NOSYS,
   6812  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6813  1.107  christos },		/* 26 = ptrace */
   6814  1.107  christos 	{
   6815  1.107  christos 		ns(struct sys_recvmsg_args),
   6816  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6817  1.107  christos 	},		/* 27 = recvmsg */
   6818  1.107  christos 	{
   6819  1.107  christos 		ns(struct sys_sendmsg_args),
   6820  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6821  1.107  christos 	},		/* 28 = sendmsg */
   6822  1.107  christos 	{
   6823  1.107  christos 		ns(struct sys_recvfrom_args),
   6824  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6825  1.107  christos 	},		/* 29 = recvfrom */
   6826  1.107  christos 	{
   6827  1.107  christos 		ns(struct sys_accept_args),
   6828  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6829  1.107  christos 	},		/* 30 = accept */
   6830  1.107  christos 	{
   6831  1.107  christos 		ns(struct sys_getpeername_args),
   6832  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6833  1.107  christos 	},		/* 31 = getpeername */
   6834  1.107  christos 	{
   6835  1.107  christos 		ns(struct sys_getsockname_args),
   6836  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6837  1.107  christos 	},		/* 32 = getsockname */
   6838  1.107  christos 	{
   6839  1.107  christos 		ns(struct sys_access_args),
   6840  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6841  1.107  christos 	},		/* 33 = access */
   6842  1.107  christos 	{
   6843  1.107  christos 		ns(struct sys_chflags_args),
   6844  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6845  1.107  christos 	},		/* 34 = chflags */
   6846  1.107  christos 	{
   6847  1.107  christos 		ns(struct sys_fchflags_args),
   6848  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6849  1.107  christos 	},		/* 35 = fchflags */
   6850  1.107  christos 	{
   6851  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6852  1.107  christos 	},		/* 36 = sync */
   6853  1.107  christos 	{
   6854  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6855  1.107  christos },		/* 37 = kill */
   6856  1.107  christos 	{
   6857  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6858  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6859  1.107  christos },		/* 38 = stat43 */
   6860  1.107  christos 	{
   6861  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6862  1.107  christos 	},		/* 39 = getppid */
   6863  1.107  christos 	{
   6864  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6865  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6866  1.107  christos },		/* 40 = lstat43 */
   6867  1.107  christos 	{
   6868  1.107  christos 		ns(struct sys_dup_args),
   6869  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6870  1.107  christos 	},		/* 41 = dup */
   6871  1.107  christos 	{
   6872  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6873  1.107  christos 	},		/* 42 = pipe */
   6874  1.107  christos 	{
   6875  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6876  1.107  christos 	},		/* 43 = getegid */
   6877  1.107  christos 	{
   6878  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6879  1.107  christos },		/* 44 = profil */
   6880  1.107  christos 	{
   6881  1.107  christos 		ns(struct sys_ktrace_args),
   6882  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6883  1.107  christos 	},		/* 45 = ktrace */
   6884  1.107  christos 	{
   6885  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6886  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6887  1.107  christos },		/* 46 = sigaction13 */
   6888  1.107  christos 	{
   6889  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6890  1.107  christos 	},		/* 47 = getgid */
   6891  1.107  christos 	{
   6892  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6893  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6894  1.107  christos },		/* 48 = sigprocmask13 */
   6895  1.107  christos 	{
   6896  1.107  christos 		ns(struct sys___getlogin_args),
   6897  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6898  1.107  christos 	},		/* 49 = __getlogin */
   6899  1.107  christos 	{
   6900  1.107  christos 		ns(struct sys___setlogin_args),
   6901  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6902  1.107  christos 	},		/* 50 = __setlogin */
   6903  1.107  christos 	{
   6904  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6905  1.107  christos },		/* 51 = acct */
   6906  1.107  christos 	{
   6907  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6908  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6909  1.107  christos },		/* 52 = sigpending13 */
   6910  1.107  christos 	{
   6911  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6912  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6913  1.107  christos },		/* 53 = sigaltstack13 */
   6914  1.107  christos 	{
   6915  1.107  christos 		ns(struct sys_ioctl_args),
   6916  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6917  1.107  christos 	},		/* 54 = ioctl */
   6918  1.107  christos 	{
   6919  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6920  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6921  1.107  christos },		/* 55 = oreboot */
   6922  1.107  christos 	{
   6923  1.107  christos 		ns(struct sys_revoke_args),
   6924  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6925  1.107  christos 	},		/* 56 = revoke */
   6926  1.107  christos 	{
   6927  1.107  christos 		ns(struct sys_symlink_args),
   6928  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6929  1.107  christos 	},		/* 57 = symlink */
   6930  1.107  christos 	{
   6931  1.107  christos 		ns(struct sys_readlink_args),
   6932  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6933  1.107  christos 	},		/* 58 = readlink */
   6934  1.107  christos 	{
   6935  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6936  1.107  christos },		/* 59 = execve */
   6937  1.107  christos 	{
   6938  1.107  christos 		ns(struct sys_umask_args),
   6939  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6940  1.107  christos 	},		/* 60 = umask */
   6941  1.107  christos 	{
   6942  1.107  christos 		ns(struct sys_chroot_args),
   6943  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6944  1.107  christos 	},		/* 61 = chroot */
   6945  1.107  christos 	{
   6946  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6947  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6948  1.107  christos },		/* 62 = fstat43 */
   6949  1.107  christos 	{
   6950  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6951  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6952  1.107  christos },		/* 63 = ogetkerninfo */
   6953  1.107  christos 	{
   6954  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6955  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6956  1.107  christos },		/* 64 = ogetpagesize */
   6957  1.107  christos 	{
   6958  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6959  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6960  1.107  christos },		/* 65 = msync */
   6961  1.107  christos 	{
   6962  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6963  1.107  christos },		/* 66 = vfork */
   6964  1.107  christos 	{
   6965  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6966  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6967  1.107  christos 	},		/* 67 = filler */
   6968  1.107  christos 	{
   6969  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6970  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6971  1.107  christos 	},		/* 68 = filler */
   6972  1.107  christos 	{
   6973  1.135     kamil 		.sy_flags = SYCALL_NOSYS,
   6974  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6975  1.135     kamil 	},		/* 69 = filler */
   6976  1.107  christos 	{
   6977  1.134     kamil 		.sy_flags = SYCALL_NOSYS,
   6978  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6979  1.134     kamil 	},		/* 70 = filler */
   6980  1.107  christos 	{
   6981  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6982  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   6983  1.107  christos },		/* 71 = ommap */
   6984  1.107  christos 	{
   6985  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6986  1.137     kamil },		/* 72 = vadvise */
   6987  1.107  christos 	{
   6988  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6989  1.107  christos },		/* 73 = munmap */
   6990  1.107  christos 	{
   6991  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6992  1.107  christos },		/* 74 = mprotect */
   6993  1.107  christos 	{
   6994  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6995  1.107  christos },		/* 75 = madvise */
   6996  1.107  christos 	{
   6997  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   6998  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   6999  1.107  christos 	},		/* 76 = filler */
   7000  1.107  christos 	{
   7001  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7002  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7003  1.107  christos 	},		/* 77 = filler */
   7004  1.107  christos 	{
   7005  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7006  1.107  christos },		/* 78 = mincore */
   7007  1.107  christos 	{
   7008  1.107  christos 		ns(struct sys_getgroups_args),
   7009  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7010  1.107  christos 	},		/* 79 = getgroups */
   7011  1.107  christos 	{
   7012  1.107  christos 		ns(struct sys_setgroups_args),
   7013  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7014  1.107  christos 	},		/* 80 = setgroups */
   7015  1.107  christos 	{
   7016  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7017  1.107  christos 	},		/* 81 = getpgrp */
   7018  1.107  christos 	{
   7019  1.107  christos 		ns(struct sys_setpgid_args),
   7020  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7021  1.107  christos 	},		/* 82 = setpgid */
   7022  1.107  christos 	{
   7023  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7024  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7025  1.107  christos },		/* 83 = setitimer */
   7026  1.107  christos 	{
   7027  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7028  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7029  1.107  christos },		/* 84 = owait */
   7030  1.107  christos 	{
   7031  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7032  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7033  1.107  christos },		/* 85 = oswapon */
   7034  1.107  christos 	{
   7035  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7036  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7037  1.107  christos },		/* 86 = getitimer */
   7038  1.107  christos 	{
   7039  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7040  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7041  1.107  christos },		/* 87 = ogethostname */
   7042  1.107  christos 	{
   7043  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7044  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7045  1.107  christos },		/* 88 = osethostname */
   7046  1.107  christos 	{
   7047  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7048  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7049  1.107  christos },		/* 89 = ogetdtablesize */
   7050  1.107  christos 	{
   7051  1.107  christos 		ns(struct sys_dup2_args),
   7052  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7053  1.107  christos 	},		/* 90 = dup2 */
   7054  1.107  christos 	{
   7055  1.154  riastrad 		ns(struct sys_getrandom_args),
   7056  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7057  1.154  riastrad 	},		/* 91 = getrandom */
   7058  1.107  christos 	{
   7059  1.107  christos 		ns(struct sys_fcntl_args),
   7060  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7061  1.107  christos 	},		/* 92 = fcntl */
   7062  1.107  christos 	{
   7063  1.107  christos 		ns(struct compat_50_sys_select_args),
   7064  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7065  1.107  christos 	},		/* 93 = compat_50_select */
   7066  1.107  christos 	{
   7067  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7068  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7069  1.107  christos 	},		/* 94 = filler */
   7070  1.107  christos 	{
   7071  1.107  christos 		ns(struct sys_fsync_args),
   7072  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7073  1.107  christos 	},		/* 95 = fsync */
   7074  1.107  christos 	{
   7075  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7076  1.107  christos },		/* 96 = setpriority */
   7077  1.107  christos 	{
   7078  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7079  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7080  1.107  christos },		/* 97 = socket */
   7081  1.107  christos 	{
   7082  1.107  christos 		ns(struct sys_connect_args),
   7083  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7084  1.107  christos 	},		/* 98 = connect */
   7085  1.107  christos 	{
   7086  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7087  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7088  1.107  christos },		/* 99 = oaccept */
   7089  1.107  christos 	{
   7090  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7091  1.107  christos },		/* 100 = getpriority */
   7092  1.107  christos 	{
   7093  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7094  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7095  1.107  christos },		/* 101 = osend */
   7096  1.107  christos 	{
   7097  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7098  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7099  1.107  christos },		/* 102 = orecv */
   7100  1.107  christos 	{
   7101  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7102  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7103  1.107  christos },		/* 103 = sigreturn13 */
   7104  1.107  christos 	{
   7105  1.107  christos 		ns(struct sys_bind_args),
   7106  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7107  1.107  christos 	},		/* 104 = bind */
   7108  1.107  christos 	{
   7109  1.107  christos 		ns(struct sys_setsockopt_args),
   7110  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7111  1.107  christos 	},		/* 105 = setsockopt */
   7112  1.107  christos 	{
   7113  1.107  christos 		ns(struct sys_listen_args),
   7114  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7115  1.107  christos 	},		/* 106 = listen */
   7116  1.107  christos 	{
   7117  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7118  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7119  1.107  christos 	},		/* 107 = filler */
   7120  1.107  christos 	{
   7121  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7122  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7123  1.107  christos },		/* 108 = osigvec */
   7124  1.107  christos 	{
   7125  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7126  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7127  1.107  christos },		/* 109 = osigblock */
   7128  1.107  christos 	{
   7129  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7130  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7131  1.107  christos },		/* 110 = osigsetmask */
   7132  1.107  christos 	{
   7133  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7134  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7135  1.107  christos },		/* 111 = sigsuspend13 */
   7136  1.107  christos 	{
   7137  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7138  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7139  1.107  christos },		/* 112 = osigstack */
   7140  1.107  christos 	{
   7141  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7142  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7143  1.107  christos },		/* 113 = orecvmsg */
   7144  1.107  christos 	{
   7145  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7146  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7147  1.107  christos },		/* 114 = osendmsg */
   7148  1.107  christos 	{
   7149  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7150  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7151  1.107  christos 	},		/* 115 = filler */
   7152  1.107  christos 	{
   7153  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7154  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7155  1.107  christos },		/* 116 = gettimeofday */
   7156  1.107  christos 	{
   7157  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7158  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7159  1.107  christos },		/* 117 = getrusage */
   7160  1.107  christos 	{
   7161  1.107  christos 		ns(struct sys_getsockopt_args),
   7162  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7163  1.107  christos 	},		/* 118 = getsockopt */
   7164  1.107  christos 	{
   7165  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7166  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7167  1.107  christos 	},		/* 119 = filler */
   7168  1.107  christos 	{
   7169  1.107  christos 		ns(struct sys_readv_args),
   7170  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7171  1.107  christos 	},		/* 120 = readv */
   7172  1.107  christos 	{
   7173  1.107  christos 		ns(struct sys_writev_args),
   7174  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7175  1.107  christos 	},		/* 121 = writev */
   7176  1.107  christos 	{
   7177  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7178  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7179  1.107  christos },		/* 122 = settimeofday */
   7180  1.107  christos 	{
   7181  1.107  christos 		ns(struct sys_fchown_args),
   7182  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7183  1.107  christos 	},		/* 123 = fchown */
   7184  1.107  christos 	{
   7185  1.107  christos 		ns(struct sys_fchmod_args),
   7186  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7187  1.107  christos 	},		/* 124 = fchmod */
   7188  1.107  christos 	{
   7189  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7190  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7191  1.107  christos },		/* 125 = orecvfrom */
   7192  1.107  christos 	{
   7193  1.107  christos 		ns(struct sys_setreuid_args),
   7194  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7195  1.107  christos 	},		/* 126 = setreuid */
   7196  1.107  christos 	{
   7197  1.107  christos 		ns(struct sys_setregid_args),
   7198  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7199  1.107  christos 	},		/* 127 = setregid */
   7200  1.107  christos 	{
   7201  1.107  christos 		ns(struct sys_rename_args),
   7202  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7203  1.107  christos 	},		/* 128 = rename */
   7204  1.107  christos 	{
   7205  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7206  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7207  1.107  christos },		/* 129 = otruncate */
   7208  1.107  christos 	{
   7209  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7210  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7211  1.107  christos },		/* 130 = oftruncate */
   7212  1.107  christos 	{
   7213  1.107  christos 		ns(struct sys_flock_args),
   7214  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7215  1.107  christos 	},		/* 131 = flock */
   7216  1.107  christos 	{
   7217  1.107  christos 		ns(struct sys_mkfifo_args),
   7218  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7219  1.107  christos 	},		/* 132 = mkfifo */
   7220  1.107  christos 	{
   7221  1.107  christos 		ns(struct sys_sendto_args),
   7222  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7223  1.107  christos 	},		/* 133 = sendto */
   7224  1.107  christos 	{
   7225  1.107  christos 		ns(struct sys_shutdown_args),
   7226  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7227  1.107  christos 	},		/* 134 = shutdown */
   7228  1.107  christos 	{
   7229  1.107  christos 		ns(struct sys_socketpair_args),
   7230  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7231  1.107  christos 	},		/* 135 = socketpair */
   7232  1.107  christos 	{
   7233  1.107  christos 		ns(struct sys_mkdir_args),
   7234  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7235  1.107  christos 	},		/* 136 = mkdir */
   7236  1.107  christos 	{
   7237  1.107  christos 		ns(struct sys_rmdir_args),
   7238  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7239  1.107  christos 	},		/* 137 = rmdir */
   7240  1.107  christos 	{
   7241  1.107  christos 		ns(struct compat_50_sys_utimes_args),
   7242  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7243  1.107  christos 	},		/* 138 = compat_50_utimes */
   7244  1.107  christos 	{
   7245  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7246  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7247  1.107  christos 	},		/* 139 = filler */
   7248  1.107  christos 	{
   7249  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7250  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7251  1.107  christos },		/* 140 = adjtime */
   7252  1.107  christos 	{
   7253  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7254  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7255  1.107  christos },		/* 141 = ogetpeername */
   7256  1.107  christos 	{
   7257  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7258  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7259  1.107  christos },		/* 142 = ogethostid */
   7260  1.107  christos 	{
   7261  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7262  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7263  1.107  christos },		/* 143 = osethostid */
   7264  1.107  christos 	{
   7265  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7266  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7267  1.107  christos },		/* 144 = ogetrlimit */
   7268  1.107  christos 	{
   7269  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7270  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7271  1.107  christos },		/* 145 = osetrlimit */
   7272  1.107  christos 	{
   7273  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7274  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7275  1.107  christos },		/* 146 = okillpg */
   7276  1.107  christos 	{
   7277  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7278  1.107  christos 	},		/* 147 = setsid */
   7279  1.107  christos 	{
   7280  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7281  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7282  1.107  christos },		/* 148 = quotactl */
   7283  1.107  christos 	{
   7284  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7285  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7286  1.107  christos },		/* 149 = oquota */
   7287  1.107  christos 	{
   7288  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7289  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7290  1.107  christos },		/* 150 = ogetsockname */
   7291  1.107  christos 	{
   7292  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7293  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7294  1.107  christos 	},		/* 151 = filler */
   7295  1.107  christos 	{
   7296  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7297  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7298  1.107  christos 	},		/* 152 = filler */
   7299  1.107  christos 	{
   7300  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7301  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7302  1.107  christos 	},		/* 153 = filler */
   7303  1.107  christos 	{
   7304  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7305  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7306  1.107  christos 	},		/* 154 = filler */
   7307  1.107  christos 	{
   7308  1.107  christos 		ns(struct sys_nfssvc_args),
   7309  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7310  1.107  christos 	},		/* 155 = nfssvc */
   7311  1.107  christos 	{
   7312  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7313  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7314  1.107  christos },		/* 156 = ogetdirentries */
   7315  1.107  christos 	{
   7316  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7317  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7318  1.107  christos },		/* 157 = statfs */
   7319  1.107  christos 	{
   7320  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7321  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7322  1.107  christos },		/* 158 = fstatfs */
   7323  1.107  christos 	{
   7324  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7325  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7326  1.107  christos 	},		/* 159 = filler */
   7327  1.107  christos 	{
   7328  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7329  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7330  1.107  christos 	},		/* 160 = filler */
   7331  1.107  christos 	{
   7332  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7333  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7334  1.107  christos },		/* 161 = getfh */
   7335  1.107  christos 	{
   7336  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7337  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7338  1.107  christos },		/* 162 = ogetdomainname */
   7339  1.107  christos 	{
   7340  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7341  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7342  1.107  christos },		/* 163 = osetdomainname */
   7343  1.107  christos 	{
   7344  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7345  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7346  1.107  christos },		/* 164 = ouname */
   7347  1.107  christos 	{
   7348  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7349  1.107  christos },		/* 165 = sysarch */
   7350  1.107  christos 	{
   7351  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7352  1.149   thorpej },		/* 166 = __futex */
   7353  1.107  christos 	{
   7354  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7355  1.149   thorpej },		/* 167 = __futex_set_robust_list */
   7356  1.107  christos 	{
   7357  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7358  1.149   thorpej },		/* 168 = __futex_get_robust_list */
   7359  1.112  pgoyette #if !defined(_LP64)
   7360  1.107  christos 	{
   7361  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7362  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7363  1.107  christos },		/* 169 = osemsys */
   7364   1.29     pooka #else
   7365  1.107  christos 	{
   7366  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7367  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7368  1.107  christos 	},		/* 169 = filler */
   7369   1.29     pooka #endif
   7370  1.112  pgoyette #if !defined(_LP64)
   7371  1.107  christos 	{
   7372  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7373  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7374  1.107  christos },		/* 170 = omsgsys */
   7375   1.29     pooka #else
   7376  1.107  christos 	{
   7377  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7378  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7379  1.107  christos 	},		/* 170 = filler */
   7380   1.29     pooka #endif
   7381  1.112  pgoyette #if !defined(_LP64)
   7382  1.107  christos 	{
   7383  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7384  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7385  1.107  christos },		/* 171 = oshmsys */
   7386   1.29     pooka #else
   7387  1.107  christos 	{
   7388  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7389  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7390  1.107  christos 	},		/* 171 = filler */
   7391   1.29     pooka #endif
   7392  1.107  christos 	{
   7393  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7394  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7395  1.107  christos 	},		/* 172 = filler */
   7396  1.107  christos 	{
   7397  1.107  christos 		ns(struct sys_pread_args),
   7398  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7399  1.107  christos 	},		/* 173 = pread */
   7400  1.107  christos 	{
   7401  1.107  christos 		ns(struct sys_pwrite_args),
   7402  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7403  1.107  christos 	},		/* 174 = pwrite */
   7404  1.107  christos 	{
   7405  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7406  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7407  1.107  christos },		/* 175 = ntp_gettime */
   7408   1.29     pooka #if defined(NTP) || !defined(_KERNEL_OPT)
   7409  1.107  christos 	{
   7410  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7411  1.107  christos },		/* 176 = ntp_adjtime */
   7412   1.29     pooka #else
   7413  1.107  christos 	{
   7414  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7415  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7416  1.107  christos 	},		/* 176 = filler */
   7417   1.29     pooka #endif
   7418  1.107  christos 	{
   7419  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7420  1.156   thorpej },		/* 177 = timerfd_create */
   7421  1.107  christos 	{
   7422  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7423  1.156   thorpej },		/* 178 = timerfd_settime */
   7424  1.107  christos 	{
   7425  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7426  1.156   thorpej },		/* 179 = timerfd_gettime */
   7427  1.107  christos 	{
   7428  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7429  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7430  1.107  christos 	},		/* 180 = filler */
   7431  1.107  christos 	{
   7432  1.107  christos 		ns(struct sys_setgid_args),
   7433  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7434  1.107  christos 	},		/* 181 = setgid */
   7435  1.107  christos 	{
   7436  1.107  christos 		ns(struct sys_setegid_args),
   7437  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7438  1.107  christos 	},		/* 182 = setegid */
   7439  1.107  christos 	{
   7440  1.107  christos 		ns(struct sys_seteuid_args),
   7441  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7442  1.107  christos 	},		/* 183 = seteuid */
   7443  1.107  christos 	{
   7444  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7445  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7446  1.107  christos },		/* 184 = lfs_bmapv */
   7447  1.107  christos 	{
   7448  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7449  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7450  1.107  christos },		/* 185 = lfs_markv */
   7451  1.107  christos 	{
   7452  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7453  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7454  1.107  christos },		/* 186 = lfs_segclean */
   7455  1.107  christos 	{
   7456  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7457  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7458  1.107  christos },		/* 187 = lfs_segwait */
   7459  1.107  christos 	{
   7460  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7461  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7462  1.107  christos },		/* 188 = stat12 */
   7463  1.107  christos 	{
   7464  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7465  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7466  1.107  christos },		/* 189 = fstat12 */
   7467  1.107  christos 	{
   7468  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7469  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7470  1.107  christos },		/* 190 = lstat12 */
   7471  1.107  christos 	{
   7472  1.107  christos 		ns(struct sys_pathconf_args),
   7473  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7474  1.107  christos 	},		/* 191 = pathconf */
   7475  1.107  christos 	{
   7476  1.107  christos 		ns(struct sys_fpathconf_args),
   7477  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7478  1.107  christos 	},		/* 192 = fpathconf */
   7479  1.107  christos 	{
   7480  1.139       rjs 		ns(struct sys_getsockopt2_args),
   7481  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7482  1.139       rjs 	},		/* 193 = getsockopt2 */
   7483  1.107  christos 	{
   7484  1.107  christos 		ns(struct sys_getrlimit_args),
   7485  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7486  1.107  christos 	},		/* 194 = getrlimit */
   7487  1.107  christos 	{
   7488  1.107  christos 		ns(struct sys_setrlimit_args),
   7489  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7490  1.107  christos 	},		/* 195 = setrlimit */
   7491  1.107  christos 	{
   7492  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7493  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7494  1.107  christos },		/* 196 = getdirentries */
   7495  1.107  christos 	{
   7496  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7497  1.107  christos },		/* 197 = mmap */
   7498  1.107  christos 	{
   7499  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7500  1.107  christos },		/* 198 = __syscall */
   7501  1.107  christos 	{
   7502  1.107  christos 		ns(struct sys_lseek_args),
   7503  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7504  1.107  christos 	},		/* 199 = lseek */
   7505  1.107  christos 	{
   7506  1.107  christos 		ns(struct sys_truncate_args),
   7507  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7508  1.107  christos 	},		/* 200 = truncate */
   7509  1.107  christos 	{
   7510  1.107  christos 		ns(struct sys_ftruncate_args),
   7511  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7512  1.107  christos 	},		/* 201 = ftruncate */
   7513  1.107  christos 	{
   7514  1.107  christos 		ns(struct sys___sysctl_args),
   7515  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7516  1.107  christos 	},		/* 202 = __sysctl */
   7517  1.107  christos 	{
   7518  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7519  1.107  christos },		/* 203 = mlock */
   7520  1.107  christos 	{
   7521  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7522  1.107  christos },		/* 204 = munlock */
   7523  1.107  christos 	{
   7524  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7525  1.107  christos },		/* 205 = undelete */
   7526  1.107  christos 	{
   7527  1.107  christos 		ns(struct compat_50_sys_futimes_args),
   7528  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7529  1.107  christos 	},		/* 206 = compat_50_futimes */
   7530  1.107  christos 	{
   7531  1.107  christos 		ns(struct sys_getpgid_args),
   7532  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7533  1.107  christos 	},		/* 207 = getpgid */
   7534  1.107  christos 	{
   7535  1.107  christos 		ns(struct sys_reboot_args),
   7536  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7537  1.107  christos 	},		/* 208 = reboot */
   7538  1.107  christos 	{
   7539  1.107  christos 		ns(struct sys_poll_args),
   7540  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7541  1.107  christos 	},		/* 209 = poll */
   7542  1.107  christos 	{
   7543  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7544  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7545  1.107  christos },		/* 210 = afssys */
   7546  1.107  christos 	{
   7547  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7548  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7549  1.107  christos 	},		/* 211 = filler */
   7550  1.107  christos 	{
   7551  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7552  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7553  1.107  christos 	},		/* 212 = filler */
   7554  1.107  christos 	{
   7555  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7556  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7557  1.107  christos 	},		/* 213 = filler */
   7558  1.107  christos 	{
   7559  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7560  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7561  1.107  christos 	},		/* 214 = filler */
   7562  1.107  christos 	{
   7563  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7564  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7565  1.107  christos 	},		/* 215 = filler */
   7566  1.107  christos 	{
   7567  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7568  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7569  1.107  christos 	},		/* 216 = filler */
   7570  1.107  christos 	{
   7571  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7572  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7573  1.107  christos 	},		/* 217 = filler */
   7574  1.107  christos 	{
   7575  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7576  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7577  1.107  christos 	},		/* 218 = filler */
   7578  1.107  christos 	{
   7579  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7580  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7581  1.107  christos 	},		/* 219 = filler */
   7582  1.107  christos 	{
   7583  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7584  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7585  1.107  christos },		/* 220 = __semctl */
   7586  1.107  christos 	{
   7587  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7588  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7589  1.107  christos },		/* 221 = semget */
   7590  1.107  christos 	{
   7591  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7592  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7593  1.107  christos },		/* 222 = semop */
   7594  1.107  christos 	{
   7595  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7596  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7597  1.107  christos },		/* 223 = semconfig */
   7598  1.107  christos 	{
   7599  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7600  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7601  1.112  pgoyette },		/* 224 = msgctl */
   7602  1.107  christos 	{
   7603  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7604  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7605  1.112  pgoyette },		/* 225 = msgget */
   7606  1.107  christos 	{
   7607  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7608  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7609  1.112  pgoyette },		/* 226 = msgsnd */
   7610  1.107  christos 	{
   7611  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7612  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7613  1.107  christos },		/* 227 = msgrcv */
   7614  1.107  christos 	{
   7615  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7616  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7617  1.107  christos },		/* 228 = shmat */
   7618  1.107  christos 	{
   7619  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7620  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7621  1.107  christos },		/* 229 = shmctl */
   7622  1.107  christos 	{
   7623  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7624  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7625  1.107  christos },		/* 230 = shmdt */
   7626  1.107  christos 	{
   7627  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7628  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7629  1.107  christos },		/* 231 = shmget */
   7630  1.107  christos 	{
   7631  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7632  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7633  1.107  christos },		/* 232 = clock_gettime */
   7634  1.107  christos 	{
   7635  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7636  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7637  1.107  christos },		/* 233 = clock_settime */
   7638  1.107  christos 	{
   7639  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7640  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7641  1.107  christos },		/* 234 = clock_getres */
   7642  1.107  christos 	{
   7643  1.107  christos 		ns(struct sys_timer_create_args),
   7644  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7645  1.107  christos 	},		/* 235 = timer_create */
   7646  1.107  christos 	{
   7647  1.107  christos 		ns(struct sys_timer_delete_args),
   7648  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7649  1.107  christos 	},		/* 236 = timer_delete */
   7650  1.107  christos 	{
   7651  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7652  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7653  1.107  christos },		/* 237 = timer_settime */
   7654  1.107  christos 	{
   7655  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7656  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7657  1.107  christos },		/* 238 = timer_gettime */
   7658  1.107  christos 	{
   7659  1.107  christos 		ns(struct sys_timer_getoverrun_args),
   7660  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7661  1.107  christos 	},		/* 239 = timer_getoverrun */
   7662  1.107  christos 	{
   7663  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7664  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7665  1.107  christos },		/* 240 = nanosleep */
   7666  1.107  christos 	{
   7667  1.107  christos 		ns(struct sys_fdatasync_args),
   7668  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7669  1.107  christos 	},		/* 241 = fdatasync */
   7670  1.107  christos 	{
   7671  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7672  1.107  christos },		/* 242 = mlockall */
   7673  1.107  christos 	{
   7674  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7675  1.107  christos },		/* 243 = munlockall */
   7676  1.107  christos 	{
   7677  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7678  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7679  1.107  christos },		/* 244 = __sigtimedwait */
   7680  1.107  christos 	{
   7681  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7682  1.107  christos },		/* 245 = sigqueueinfo */
   7683  1.107  christos 	{
   7684  1.107  christos 		ns(struct sys_modctl_args),
   7685  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7686  1.107  christos 	},		/* 246 = modctl */
   7687  1.107  christos 	{
   7688  1.107  christos 		ns(struct sys__ksem_init_args),
   7689  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7690  1.107  christos 	},		/* 247 = _ksem_init */
   7691  1.107  christos 	{
   7692  1.107  christos 		ns(struct sys__ksem_open_args),
   7693  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7694  1.107  christos 	},		/* 248 = _ksem_open */
   7695  1.107  christos 	{
   7696  1.107  christos 		ns(struct sys__ksem_unlink_args),
   7697  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7698  1.107  christos 	},		/* 249 = _ksem_unlink */
   7699  1.107  christos 	{
   7700  1.107  christos 		ns(struct sys__ksem_close_args),
   7701  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7702  1.107  christos 	},		/* 250 = _ksem_close */
   7703  1.107  christos 	{
   7704  1.107  christos 		ns(struct sys__ksem_post_args),
   7705  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7706  1.107  christos 	},		/* 251 = _ksem_post */
   7707  1.107  christos 	{
   7708  1.107  christos 		ns(struct sys__ksem_wait_args),
   7709  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7710  1.107  christos 	},		/* 252 = _ksem_wait */
   7711  1.107  christos 	{
   7712  1.107  christos 		ns(struct sys__ksem_trywait_args),
   7713  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7714  1.107  christos 	},		/* 253 = _ksem_trywait */
   7715  1.107  christos 	{
   7716  1.107  christos 		ns(struct sys__ksem_getvalue_args),
   7717  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7718  1.107  christos 	},		/* 254 = _ksem_getvalue */
   7719  1.107  christos 	{
   7720  1.107  christos 		ns(struct sys__ksem_destroy_args),
   7721  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7722  1.107  christos 	},		/* 255 = _ksem_destroy */
   7723  1.107  christos 	{
   7724  1.107  christos 		ns(struct sys__ksem_timedwait_args),
   7725  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7726  1.107  christos 	},		/* 256 = _ksem_timedwait */
   7727  1.107  christos 	{
   7728  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7729  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7730  1.107  christos },		/* 257 = mq_open */
   7731  1.107  christos 	{
   7732  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7733  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7734  1.107  christos },		/* 258 = mq_close */
   7735  1.107  christos 	{
   7736  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7737  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7738  1.107  christos },		/* 259 = mq_unlink */
   7739  1.107  christos 	{
   7740  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7741  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7742  1.107  christos },		/* 260 = mq_getattr */
   7743  1.107  christos 	{
   7744  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7745  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7746  1.107  christos },		/* 261 = mq_setattr */
   7747  1.107  christos 	{
   7748  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7749  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7750  1.107  christos },		/* 262 = mq_notify */
   7751  1.107  christos 	{
   7752  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7753  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7754  1.107  christos },		/* 263 = mq_send */
   7755  1.107  christos 	{
   7756  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7757  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7758  1.107  christos },		/* 264 = mq_receive */
   7759  1.107  christos 	{
   7760  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7761  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7762  1.107  christos },		/* 265 = mq_timedsend */
   7763  1.107  christos 	{
   7764  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7765  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7766  1.107  christos },		/* 266 = mq_timedreceive */
   7767  1.107  christos 	{
   7768  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7769  1.156   thorpej },		/* 267 = eventfd */
   7770  1.107  christos 	{
   7771  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7772  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7773  1.107  christos 	},		/* 268 = filler */
   7774  1.107  christos 	{
   7775  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7776  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7777  1.107  christos 	},		/* 269 = filler */
   7778  1.107  christos 	{
   7779  1.108    justin 		ns(struct sys___posix_rename_args),
   7780  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7781  1.108    justin 	},		/* 270 = __posix_rename */
   7782  1.107  christos 	{
   7783  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7784  1.107  christos },		/* 271 = swapctl */
   7785  1.107  christos 	{
   7786  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7787  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7788  1.107  christos },		/* 272 = getdents */
   7789  1.107  christos 	{
   7790  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7791  1.107  christos },		/* 273 = minherit */
   7792  1.107  christos 	{
   7793  1.107  christos 		ns(struct sys_lchmod_args),
   7794  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7795  1.107  christos 	},		/* 274 = lchmod */
   7796  1.107  christos 	{
   7797  1.107  christos 		ns(struct sys_lchown_args),
   7798  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7799  1.107  christos 	},		/* 275 = lchown */
   7800  1.107  christos 	{
   7801  1.107  christos 		ns(struct compat_50_sys_lutimes_args),
   7802  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7803  1.107  christos 	},		/* 276 = compat_50_lutimes */
   7804  1.107  christos 	{
   7805  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7806  1.107  christos },		/* 277 = __msync13 */
   7807  1.107  christos 	{
   7808  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7809  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7810  1.107  christos },		/* 278 = __stat13 */
   7811  1.107  christos 	{
   7812  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7813  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7814  1.107  christos },		/* 279 = __fstat13 */
   7815  1.107  christos 	{
   7816  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7817  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7818  1.107  christos },		/* 280 = __lstat13 */
   7819  1.107  christos 	{
   7820  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7821  1.107  christos },		/* 281 = __sigaltstack14 */
   7822  1.107  christos 	{
   7823  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7824  1.107  christos },		/* 282 = __vfork14 */
   7825  1.107  christos 	{
   7826  1.113     pooka 		ns(struct sys___posix_chown_args),
   7827  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7828  1.113     pooka 	},		/* 283 = __posix_chown */
   7829  1.107  christos 	{
   7830  1.113     pooka 		ns(struct sys___posix_fchown_args),
   7831  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7832  1.113     pooka 	},		/* 284 = __posix_fchown */
   7833  1.107  christos 	{
   7834  1.113     pooka 		ns(struct sys___posix_lchown_args),
   7835  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7836  1.113     pooka 	},		/* 285 = __posix_lchown */
   7837  1.107  christos 	{
   7838  1.107  christos 		ns(struct sys_getsid_args),
   7839  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7840  1.107  christos 	},		/* 286 = getsid */
   7841  1.107  christos 	{
   7842  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7843  1.107  christos },		/* 287 = __clone */
   7844  1.107  christos 	{
   7845  1.107  christos 		ns(struct sys_fktrace_args),
   7846  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7847  1.107  christos 	},		/* 288 = fktrace */
   7848  1.107  christos 	{
   7849  1.107  christos 		ns(struct sys_preadv_args),
   7850  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7851  1.107  christos 	},		/* 289 = preadv */
   7852  1.107  christos 	{
   7853  1.107  christos 		ns(struct sys_pwritev_args),
   7854  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7855  1.107  christos 	},		/* 290 = pwritev */
   7856  1.107  christos 	{
   7857  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7858  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7859  1.107  christos },		/* 291 = __sigaction14 */
   7860  1.107  christos 	{
   7861  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7862  1.107  christos },		/* 292 = __sigpending14 */
   7863  1.107  christos 	{
   7864  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7865  1.107  christos },		/* 293 = __sigprocmask14 */
   7866  1.107  christos 	{
   7867  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7868  1.107  christos },		/* 294 = __sigsuspend14 */
   7869  1.107  christos 	{
   7870  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7871  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7872  1.107  christos },		/* 295 = __sigreturn14 */
   7873  1.107  christos 	{
   7874  1.107  christos 		ns(struct sys___getcwd_args),
   7875  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7876  1.107  christos 	},		/* 296 = __getcwd */
   7877  1.107  christos 	{
   7878  1.107  christos 		ns(struct sys_fchroot_args),
   7879  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7880  1.107  christos 	},		/* 297 = fchroot */
   7881  1.107  christos 	{
   7882  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7883  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7884  1.107  christos },		/* 298 = fhopen */
   7885  1.107  christos 	{
   7886  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7887  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7888  1.107  christos },		/* 299 = fhstat */
   7889  1.107  christos 	{
   7890  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7891  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7892  1.107  christos },		/* 300 = fhstatfs */
   7893  1.107  christos 	{
   7894  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7895  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7896  1.107  christos },		/* 301 = ____semctl13 */
   7897  1.107  christos 	{
   7898  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7899  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7900  1.107  christos },		/* 302 = __msgctl13 */
   7901  1.107  christos 	{
   7902  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7903  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7904  1.107  christos },		/* 303 = __shmctl13 */
   7905  1.107  christos 	{
   7906  1.107  christos 		ns(struct sys_lchflags_args),
   7907  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7908  1.107  christos 	},		/* 304 = lchflags */
   7909  1.107  christos 	{
   7910  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7911  1.107  christos 	},		/* 305 = issetugid */
   7912  1.107  christos 	{
   7913  1.107  christos 		ns(struct sys_utrace_args),
   7914  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7915  1.107  christos 	},		/* 306 = utrace */
   7916  1.107  christos 	{
   7917  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7918  1.107  christos },		/* 307 = getcontext */
   7919  1.107  christos 	{
   7920  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7921  1.107  christos },		/* 308 = setcontext */
   7922  1.107  christos 	{
   7923  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7924  1.107  christos },		/* 309 = _lwp_create */
   7925  1.107  christos 	{
   7926  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7927  1.107  christos },		/* 310 = _lwp_exit */
   7928  1.107  christos 	{
   7929  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7930  1.107  christos },		/* 311 = _lwp_self */
   7931  1.107  christos 	{
   7932  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7933  1.107  christos },		/* 312 = _lwp_wait */
   7934  1.107  christos 	{
   7935  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7936  1.107  christos },		/* 313 = _lwp_suspend */
   7937  1.107  christos 	{
   7938  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7939  1.107  christos },		/* 314 = _lwp_continue */
   7940  1.107  christos 	{
   7941  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7942  1.107  christos },		/* 315 = _lwp_wakeup */
   7943  1.107  christos 	{
   7944  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7945  1.107  christos },		/* 316 = _lwp_getprivate */
   7946  1.107  christos 	{
   7947  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7948  1.107  christos },		/* 317 = _lwp_setprivate */
   7949  1.107  christos 	{
   7950  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7951  1.107  christos },		/* 318 = _lwp_kill */
   7952  1.107  christos 	{
   7953  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7954  1.107  christos },		/* 319 = _lwp_detach */
   7955  1.107  christos 	{
   7956  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7957  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7958  1.107  christos },		/* 320 = _lwp_park */
   7959  1.107  christos 	{
   7960  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7961  1.107  christos },		/* 321 = _lwp_unpark */
   7962  1.107  christos 	{
   7963  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7964  1.107  christos },		/* 322 = _lwp_unpark_all */
   7965  1.107  christos 	{
   7966  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7967  1.107  christos },		/* 323 = _lwp_setname */
   7968  1.107  christos 	{
   7969  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7970  1.107  christos },		/* 324 = _lwp_getname */
   7971  1.107  christos 	{
   7972  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7973  1.107  christos },		/* 325 = _lwp_ctl */
   7974  1.107  christos 	{
   7975  1.146   thorpej 		.sy_flags = SYCALL_NOSYS,
   7976  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7977  1.146   thorpej 	},		/* 326 = filler */
   7978  1.107  christos 	{
   7979  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7980  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7981  1.107  christos 	},		/* 327 = filler */
   7982  1.107  christos 	{
   7983  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7984  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7985  1.107  christos 	},		/* 328 = filler */
   7986  1.107  christos 	{
   7987  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   7988  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   7989  1.107  christos 	},		/* 329 = filler */
   7990  1.107  christos 	{
   7991  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7992  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7993  1.107  christos },		/* 330 = sa_register */
   7994  1.107  christos 	{
   7995  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   7996  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   7997  1.107  christos },		/* 331 = sa_stacks */
   7998  1.107  christos 	{
   7999  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   8000  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8001  1.107  christos },		/* 332 = sa_enable */
   8002  1.107  christos 	{
   8003  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   8004  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8005  1.107  christos },		/* 333 = sa_setconcurrency */
   8006  1.107  christos 	{
   8007  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   8008  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8009  1.107  christos },		/* 334 = sa_yield */
   8010  1.107  christos 	{
   8011  1.141  pgoyette 		.sy_flags = SYCALL_NOSYS,
   8012  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8013  1.107  christos },		/* 335 = sa_preempt */
   8014  1.107  christos 	{
   8015  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8016  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8017  1.107  christos 	},		/* 336 = filler */
   8018  1.107  christos 	{
   8019  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8020  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8021  1.107  christos 	},		/* 337 = filler */
   8022  1.107  christos 	{
   8023  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8024  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8025  1.107  christos 	},		/* 338 = filler */
   8026  1.107  christos 	{
   8027  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8028  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8029  1.107  christos 	},		/* 339 = filler */
   8030  1.107  christos 	{
   8031  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8032  1.107  christos },		/* 340 = __sigaction_sigtramp */
   8033  1.107  christos 	{
   8034  1.138      maxv 		.sy_flags = SYCALL_NOSYS,
   8035  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8036  1.138      maxv 	},		/* 341 = filler */
   8037  1.107  christos 	{
   8038  1.138      maxv 		.sy_flags = SYCALL_NOSYS,
   8039  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8040  1.138      maxv 	},		/* 342 = filler */
   8041  1.107  christos 	{
   8042  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8043  1.107  christos },		/* 343 = rasctl */
   8044  1.107  christos 	{
   8045  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8046  1.107  christos 	},		/* 344 = kqueue */
   8047  1.107  christos 	{
   8048  1.107  christos 		ns(struct compat_50_sys_kevent_args),
   8049  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8050  1.107  christos 	},		/* 345 = compat_50_kevent */
   8051  1.107  christos 	{
   8052  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8053  1.107  christos },		/* 346 = _sched_setparam */
   8054  1.107  christos 	{
   8055  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8056  1.107  christos },		/* 347 = _sched_getparam */
   8057  1.107  christos 	{
   8058  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8059  1.107  christos },		/* 348 = _sched_setaffinity */
   8060  1.107  christos 	{
   8061  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8062  1.107  christos },		/* 349 = _sched_getaffinity */
   8063  1.107  christos 	{
   8064  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8065  1.107  christos },		/* 350 = sched_yield */
   8066  1.107  christos 	{
   8067  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8068  1.129  christos },		/* 351 = _sched_protect */
   8069  1.107  christos 	{
   8070  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8071  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8072  1.107  christos 	},		/* 352 = filler */
   8073  1.107  christos 	{
   8074  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8075  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8076  1.107  christos 	},		/* 353 = filler */
   8077  1.107  christos 	{
   8078  1.107  christos 		ns(struct sys_fsync_range_args),
   8079  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8080  1.107  christos 	},		/* 354 = fsync_range */
   8081  1.107  christos 	{
   8082  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8083  1.107  christos },		/* 355 = uuidgen */
   8084  1.107  christos 	{
   8085  1.142  christos 		.sy_flags = SYCALL_NOSYS,
   8086  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8087  1.142  christos },		/* 356 = getvfsstat */
   8088  1.107  christos 	{
   8089  1.142  christos 		.sy_flags = SYCALL_NOSYS,
   8090  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8091  1.142  christos },		/* 357 = statvfs1 */
   8092  1.107  christos 	{
   8093  1.142  christos 		.sy_flags = SYCALL_NOSYS,
   8094  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8095  1.142  christos },		/* 358 = fstatvfs1 */
   8096  1.107  christos 	{
   8097  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8098  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8099  1.107  christos },		/* 359 = fhstatvfs1 */
   8100  1.107  christos 	{
   8101  1.107  christos 		ns(struct sys_extattrctl_args),
   8102  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8103  1.107  christos 	},		/* 360 = extattrctl */
   8104  1.107  christos 	{
   8105  1.107  christos 		ns(struct sys_extattr_set_file_args),
   8106  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8107  1.107  christos 	},		/* 361 = extattr_set_file */
   8108  1.107  christos 	{
   8109  1.107  christos 		ns(struct sys_extattr_get_file_args),
   8110  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8111  1.107  christos 	},		/* 362 = extattr_get_file */
   8112  1.107  christos 	{
   8113  1.107  christos 		ns(struct sys_extattr_delete_file_args),
   8114  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8115  1.107  christos 	},		/* 363 = extattr_delete_file */
   8116  1.107  christos 	{
   8117  1.107  christos 		ns(struct sys_extattr_set_fd_args),
   8118  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8119  1.107  christos 	},		/* 364 = extattr_set_fd */
   8120  1.107  christos 	{
   8121  1.107  christos 		ns(struct sys_extattr_get_fd_args),
   8122  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8123  1.107  christos 	},		/* 365 = extattr_get_fd */
   8124  1.107  christos 	{
   8125  1.107  christos 		ns(struct sys_extattr_delete_fd_args),
   8126  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8127  1.107  christos 	},		/* 366 = extattr_delete_fd */
   8128  1.107  christos 	{
   8129  1.107  christos 		ns(struct sys_extattr_set_link_args),
   8130  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8131  1.107  christos 	},		/* 367 = extattr_set_link */
   8132  1.107  christos 	{
   8133  1.107  christos 		ns(struct sys_extattr_get_link_args),
   8134  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8135  1.107  christos 	},		/* 368 = extattr_get_link */
   8136  1.107  christos 	{
   8137  1.107  christos 		ns(struct sys_extattr_delete_link_args),
   8138  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8139  1.107  christos 	},		/* 369 = extattr_delete_link */
   8140  1.107  christos 	{
   8141  1.107  christos 		ns(struct sys_extattr_list_fd_args),
   8142  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8143  1.107  christos 	},		/* 370 = extattr_list_fd */
   8144  1.107  christos 	{
   8145  1.107  christos 		ns(struct sys_extattr_list_file_args),
   8146  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8147  1.107  christos 	},		/* 371 = extattr_list_file */
   8148  1.107  christos 	{
   8149  1.107  christos 		ns(struct sys_extattr_list_link_args),
   8150  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8151  1.107  christos 	},		/* 372 = extattr_list_link */
   8152  1.107  christos 	{
   8153  1.107  christos 		ns(struct compat_50_sys_pselect_args),
   8154  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8155  1.107  christos 	},		/* 373 = compat_50_pselect */
   8156  1.107  christos 	{
   8157  1.107  christos 		ns(struct compat_50_sys_pollts_args),
   8158  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8159  1.107  christos 	},		/* 374 = compat_50_pollts */
   8160  1.107  christos 	{
   8161  1.107  christos 		ns(struct sys_setxattr_args),
   8162  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8163  1.107  christos 	},		/* 375 = setxattr */
   8164  1.107  christos 	{
   8165  1.107  christos 		ns(struct sys_lsetxattr_args),
   8166  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8167  1.107  christos 	},		/* 376 = lsetxattr */
   8168  1.107  christos 	{
   8169  1.107  christos 		ns(struct sys_fsetxattr_args),
   8170  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8171  1.107  christos 	},		/* 377 = fsetxattr */
   8172  1.107  christos 	{
   8173  1.107  christos 		ns(struct sys_getxattr_args),
   8174  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8175  1.107  christos 	},		/* 378 = getxattr */
   8176  1.107  christos 	{
   8177  1.107  christos 		ns(struct sys_lgetxattr_args),
   8178  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8179  1.107  christos 	},		/* 379 = lgetxattr */
   8180  1.107  christos 	{
   8181  1.107  christos 		ns(struct sys_fgetxattr_args),
   8182  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8183  1.107  christos 	},		/* 380 = fgetxattr */
   8184  1.107  christos 	{
   8185  1.107  christos 		ns(struct sys_listxattr_args),
   8186  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8187  1.107  christos 	},		/* 381 = listxattr */
   8188  1.107  christos 	{
   8189  1.107  christos 		ns(struct sys_llistxattr_args),
   8190  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8191  1.107  christos 	},		/* 382 = llistxattr */
   8192  1.107  christos 	{
   8193  1.107  christos 		ns(struct sys_flistxattr_args),
   8194  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8195  1.107  christos 	},		/* 383 = flistxattr */
   8196  1.107  christos 	{
   8197  1.107  christos 		ns(struct sys_removexattr_args),
   8198  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8199  1.107  christos 	},		/* 384 = removexattr */
   8200  1.107  christos 	{
   8201  1.107  christos 		ns(struct sys_lremovexattr_args),
   8202  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8203  1.107  christos 	},		/* 385 = lremovexattr */
   8204  1.107  christos 	{
   8205  1.107  christos 		ns(struct sys_fremovexattr_args),
   8206  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8207  1.107  christos 	},		/* 386 = fremovexattr */
   8208  1.107  christos 	{
   8209  1.107  christos 		ns(struct compat_50_sys___stat30_args),
   8210  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8211  1.107  christos 	},		/* 387 = compat_50___stat30 */
   8212  1.107  christos 	{
   8213  1.107  christos 		ns(struct compat_50_sys___fstat30_args),
   8214  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8215  1.107  christos 	},		/* 388 = compat_50___fstat30 */
   8216  1.107  christos 	{
   8217  1.107  christos 		ns(struct compat_50_sys___lstat30_args),
   8218  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8219  1.107  christos 	},		/* 389 = compat_50___lstat30 */
   8220  1.107  christos 	{
   8221  1.107  christos 		ns(struct sys___getdents30_args),
   8222  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8223  1.107  christos 	},		/* 390 = __getdents30 */
   8224  1.107  christos 	{
   8225  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8226  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8227  1.107  christos 	},		/* 391 = filler */
   8228  1.107  christos 	{
   8229  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8230  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8231  1.107  christos },		/* 392 = __fhstat30 */
   8232  1.107  christos 	{
   8233  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8234  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8235  1.107  christos },		/* 393 = __ntp_gettime30 */
   8236  1.107  christos 	{
   8237  1.107  christos 		ns(struct sys___socket30_args),
   8238  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8239  1.107  christos 	},		/* 394 = __socket30 */
   8240  1.107  christos 	{
   8241  1.107  christos 		ns(struct sys___getfh30_args),
   8242  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8243  1.107  christos 	},		/* 395 = __getfh30 */
   8244  1.107  christos 	{
   8245  1.107  christos 		ns(struct sys___fhopen40_args),
   8246  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8247  1.107  christos 	},		/* 396 = __fhopen40 */
   8248  1.107  christos 	{
   8249  1.142  christos 		.sy_flags = SYCALL_NOSYS,
   8250  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8251  1.142  christos },		/* 397 = fhstatvfs1 */
   8252  1.107  christos 	{
   8253  1.107  christos 		ns(struct compat_50_sys___fhstat40_args),
   8254  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8255  1.107  christos 	},		/* 398 = compat_50___fhstat40 */
   8256  1.107  christos 	{
   8257  1.107  christos 		ns(struct sys_aio_cancel_args),
   8258  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8259  1.107  christos 	},		/* 399 = aio_cancel */
   8260  1.107  christos 	{
   8261  1.107  christos 		ns(struct sys_aio_error_args),
   8262  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8263  1.107  christos 	},		/* 400 = aio_error */
   8264  1.107  christos 	{
   8265  1.107  christos 		ns(struct sys_aio_fsync_args),
   8266  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8267  1.107  christos 	},		/* 401 = aio_fsync */
   8268  1.107  christos 	{
   8269  1.107  christos 		ns(struct sys_aio_read_args),
   8270  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8271  1.107  christos 	},		/* 402 = aio_read */
   8272  1.107  christos 	{
   8273  1.107  christos 		ns(struct sys_aio_return_args),
   8274  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8275  1.107  christos 	},		/* 403 = aio_return */
   8276  1.107  christos 	{
   8277  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8278  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8279  1.107  christos },		/* 404 = aio_suspend */
   8280  1.107  christos 	{
   8281  1.107  christos 		ns(struct sys_aio_write_args),
   8282  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8283  1.107  christos 	},		/* 405 = aio_write */
   8284  1.107  christos 	{
   8285  1.107  christos 		ns(struct sys_lio_listio_args),
   8286  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8287  1.107  christos 	},		/* 406 = lio_listio */
   8288  1.107  christos 	{
   8289  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8290  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8291  1.107  christos 	},		/* 407 = filler */
   8292  1.107  christos 	{
   8293  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8294  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8295  1.107  christos 	},		/* 408 = filler */
   8296  1.107  christos 	{
   8297  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8298  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8299  1.107  christos 	},		/* 409 = filler */
   8300  1.107  christos 	{
   8301  1.107  christos 		ns(struct sys___mount50_args),
   8302  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8303  1.107  christos 	},		/* 410 = __mount50 */
   8304  1.107  christos 	{
   8305  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8306  1.107  christos },		/* 411 = mremap */
   8307  1.107  christos 	{
   8308  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8309  1.107  christos },		/* 412 = pset_create */
   8310  1.107  christos 	{
   8311  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8312  1.107  christos },		/* 413 = pset_destroy */
   8313  1.107  christos 	{
   8314  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8315  1.107  christos },		/* 414 = pset_assign */
   8316  1.107  christos 	{
   8317  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8318  1.107  christos },		/* 415 = _pset_bind */
   8319  1.107  christos 	{
   8320  1.107  christos 		ns(struct sys___posix_fadvise50_args),
   8321  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8322  1.107  christos 	},		/* 416 = __posix_fadvise50 */
   8323  1.107  christos 	{
   8324  1.107  christos 		ns(struct sys___select50_args),
   8325  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8326  1.107  christos 	},		/* 417 = __select50 */
   8327  1.107  christos 	{
   8328  1.107  christos 		ns(struct sys___gettimeofday50_args),
   8329  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8330  1.107  christos 	},		/* 418 = __gettimeofday50 */
   8331  1.107  christos 	{
   8332  1.107  christos 		ns(struct sys___settimeofday50_args),
   8333  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8334  1.107  christos 	},		/* 419 = __settimeofday50 */
   8335  1.107  christos 	{
   8336  1.107  christos 		ns(struct sys___utimes50_args),
   8337  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8338  1.107  christos 	},		/* 420 = __utimes50 */
   8339  1.107  christos 	{
   8340  1.107  christos 		ns(struct sys___adjtime50_args),
   8341  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8342  1.107  christos 	},		/* 421 = __adjtime50 */
   8343  1.107  christos 	{
   8344  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8345  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8346  1.107  christos },		/* 422 = __lfs_segwait50 */
   8347  1.107  christos 	{
   8348  1.107  christos 		ns(struct sys___futimes50_args),
   8349  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8350  1.107  christos 	},		/* 423 = __futimes50 */
   8351  1.107  christos 	{
   8352  1.107  christos 		ns(struct sys___lutimes50_args),
   8353  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8354  1.107  christos 	},		/* 424 = __lutimes50 */
   8355  1.107  christos 	{
   8356  1.107  christos 		ns(struct sys___setitimer50_args),
   8357  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8358  1.107  christos 	},		/* 425 = __setitimer50 */
   8359  1.107  christos 	{
   8360  1.107  christos 		ns(struct sys___getitimer50_args),
   8361  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8362  1.107  christos 	},		/* 426 = __getitimer50 */
   8363  1.107  christos 	{
   8364  1.107  christos 		ns(struct sys___clock_gettime50_args),
   8365  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8366  1.107  christos 	},		/* 427 = __clock_gettime50 */
   8367  1.107  christos 	{
   8368  1.107  christos 		ns(struct sys___clock_settime50_args),
   8369  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8370  1.107  christos 	},		/* 428 = __clock_settime50 */
   8371  1.107  christos 	{
   8372  1.107  christos 		ns(struct sys___clock_getres50_args),
   8373  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8374  1.107  christos 	},		/* 429 = __clock_getres50 */
   8375  1.107  christos 	{
   8376  1.107  christos 		ns(struct sys___nanosleep50_args),
   8377  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8378  1.107  christos 	},		/* 430 = __nanosleep50 */
   8379  1.107  christos 	{
   8380  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8381  1.107  christos },		/* 431 = ____sigtimedwait50 */
   8382  1.107  christos 	{
   8383  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8384  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8385  1.107  christos },		/* 432 = __mq_timedsend50 */
   8386  1.107  christos 	{
   8387  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8388  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8389  1.107  christos },		/* 433 = __mq_timedreceive50 */
   8390  1.107  christos 	{
   8391  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8392  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8393  1.107  christos },		/* 434 = _lwp_park */
   8394  1.107  christos 	{
   8395  1.159  christos 		ns(struct compat_100_sys___kevent50_args),
   8396  1.159  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8397  1.159  christos 	},		/* 435 = compat_100___kevent50 */
   8398  1.107  christos 	{
   8399  1.107  christos 		ns(struct sys___pselect50_args),
   8400  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8401  1.107  christos 	},		/* 436 = __pselect50 */
   8402  1.107  christos 	{
   8403  1.107  christos 		ns(struct sys___pollts50_args),
   8404  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8405  1.107  christos 	},		/* 437 = __pollts50 */
   8406  1.107  christos 	{
   8407  1.107  christos 		ns(struct sys___aio_suspend50_args),
   8408  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8409  1.107  christos 	},		/* 438 = __aio_suspend50 */
   8410  1.107  christos 	{
   8411  1.107  christos 		ns(struct sys___stat50_args),
   8412  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8413  1.107  christos 	},		/* 439 = __stat50 */
   8414  1.107  christos 	{
   8415  1.107  christos 		ns(struct sys___fstat50_args),
   8416  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8417  1.107  christos 	},		/* 440 = __fstat50 */
   8418  1.107  christos 	{
   8419  1.107  christos 		ns(struct sys___lstat50_args),
   8420  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8421  1.107  christos 	},		/* 441 = __lstat50 */
   8422  1.107  christos 	{
   8423  1.112  pgoyette 		.sy_flags = SYCALL_NOSYS,
   8424  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8425  1.107  christos },		/* 442 = ____semctl50 */
   8426  1.107  christos 	{
   8427  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8428  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8429  1.107  christos },		/* 443 = __shmctl50 */
   8430  1.107  christos 	{
   8431  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8432  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8433  1.107  christos },		/* 444 = __msgctl50 */
   8434  1.107  christos 	{
   8435  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8436  1.107  christos },		/* 445 = __getrusage50 */
   8437  1.107  christos 	{
   8438  1.107  christos 		ns(struct sys___timer_settime50_args),
   8439  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8440  1.107  christos 	},		/* 446 = __timer_settime50 */
   8441  1.107  christos 	{
   8442  1.107  christos 		ns(struct sys___timer_gettime50_args),
   8443  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8444  1.107  christos 	},		/* 447 = __timer_gettime50 */
   8445   1.29     pooka #if defined(NTP) || !defined(_KERNEL_OPT)
   8446  1.107  christos 	{
   8447  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8448  1.107  christos },		/* 448 = __ntp_gettime50 */
   8449   1.29     pooka #else
   8450  1.107  christos 	{
   8451  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8452  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8453  1.107  christos 	},		/* 448 = filler */
   8454   1.29     pooka #endif
   8455  1.107  christos 	{
   8456  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8457  1.107  christos },		/* 449 = __wait450 */
   8458  1.107  christos 	{
   8459  1.107  christos 		ns(struct sys___mknod50_args),
   8460  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8461  1.107  christos 	},		/* 450 = __mknod50 */
   8462  1.107  christos 	{
   8463  1.107  christos 		ns(struct sys___fhstat50_args),
   8464  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8465  1.107  christos 	},		/* 451 = __fhstat50 */
   8466  1.107  christos 	{
   8467  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8468  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8469  1.107  christos 	},		/* 452 = filler */
   8470  1.107  christos 	{
   8471  1.107  christos 		ns(struct sys_pipe2_args),
   8472  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8473  1.107  christos 	},		/* 453 = pipe2 */
   8474  1.107  christos 	{
   8475  1.161  christos 		ns(struct compat_100_sys_dup3_args),
   8476  1.160  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8477  1.161  christos 	},		/* 454 = compat_100_dup3 */
   8478  1.107  christos 	{
   8479  1.107  christos 		ns(struct sys_kqueue1_args),
   8480  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8481  1.107  christos 	},		/* 455 = kqueue1 */
   8482  1.107  christos 	{
   8483  1.107  christos 		ns(struct sys_paccept_args),
   8484  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8485  1.107  christos 	},		/* 456 = paccept */
   8486  1.107  christos 	{
   8487  1.107  christos 		ns(struct sys_linkat_args),
   8488  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8489  1.107  christos 	},		/* 457 = linkat */
   8490  1.107  christos 	{
   8491  1.107  christos 		ns(struct sys_renameat_args),
   8492  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8493  1.107  christos 	},		/* 458 = renameat */
   8494  1.107  christos 	{
   8495  1.107  christos 		ns(struct sys_mkfifoat_args),
   8496  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8497  1.107  christos 	},		/* 459 = mkfifoat */
   8498  1.107  christos 	{
   8499  1.107  christos 		ns(struct sys_mknodat_args),
   8500  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8501  1.107  christos 	},		/* 460 = mknodat */
   8502  1.107  christos 	{
   8503  1.107  christos 		ns(struct sys_mkdirat_args),
   8504  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8505  1.107  christos 	},		/* 461 = mkdirat */
   8506  1.107  christos 	{
   8507  1.107  christos 		ns(struct sys_faccessat_args),
   8508  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8509  1.107  christos 	},		/* 462 = faccessat */
   8510  1.107  christos 	{
   8511  1.107  christos 		ns(struct sys_fchmodat_args),
   8512  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8513  1.107  christos 	},		/* 463 = fchmodat */
   8514  1.107  christos 	{
   8515  1.107  christos 		ns(struct sys_fchownat_args),
   8516  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8517  1.107  christos 	},		/* 464 = fchownat */
   8518  1.107  christos 	{
   8519  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8520  1.107  christos },		/* 465 = fexecve */
   8521  1.107  christos 	{
   8522  1.107  christos 		ns(struct sys_fstatat_args),
   8523  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8524  1.107  christos 	},		/* 466 = fstatat */
   8525  1.107  christos 	{
   8526  1.107  christos 		ns(struct sys_utimensat_args),
   8527  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8528  1.107  christos 	},		/* 467 = utimensat */
   8529  1.107  christos 	{
   8530  1.107  christos 		ns(struct sys_openat_args),
   8531  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8532  1.107  christos 	},		/* 468 = openat */
   8533  1.107  christos 	{
   8534  1.107  christos 		ns(struct sys_readlinkat_args),
   8535  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8536  1.107  christos 	},		/* 469 = readlinkat */
   8537  1.107  christos 	{
   8538  1.107  christos 		ns(struct sys_symlinkat_args),
   8539  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8540  1.107  christos 	},		/* 470 = symlinkat */
   8541  1.107  christos 	{
   8542  1.107  christos 		ns(struct sys_unlinkat_args),
   8543  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8544  1.107  christos 	},		/* 471 = unlinkat */
   8545  1.107  christos 	{
   8546  1.107  christos 		ns(struct sys_futimens_args),
   8547  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8548  1.107  christos 	},		/* 472 = futimens */
   8549  1.107  christos 	{
   8550  1.107  christos 		ns(struct sys___quotactl_args),
   8551  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8552  1.107  christos 	},		/* 473 = __quotactl */
   8553  1.107  christos 	{
   8554  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8555  1.107  christos },		/* 474 = posix_spawn */
   8556  1.107  christos 	{
   8557  1.107  christos 		ns(struct sys_recvmmsg_args),
   8558  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8559  1.107  christos 	},		/* 475 = recvmmsg */
   8560  1.107  christos 	{
   8561  1.107  christos 		ns(struct sys_sendmmsg_args),
   8562  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8563  1.107  christos 	},		/* 476 = sendmmsg */
   8564  1.107  christos 	{
   8565  1.107  christos 		ns(struct sys_clock_nanosleep_args),
   8566  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8567  1.107  christos 	},		/* 477 = clock_nanosleep */
   8568  1.107  christos 	{
   8569  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8570  1.107  christos },		/* 478 = ___lwp_park60 */
   8571  1.107  christos 	{
   8572  1.107  christos 		ns(struct sys_posix_fallocate_args),
   8573  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8574  1.107  christos 	},		/* 479 = posix_fallocate */
   8575  1.107  christos 	{
   8576  1.107  christos 		ns(struct sys_fdiscard_args),
   8577  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8578  1.107  christos 	},		/* 480 = fdiscard */
   8579  1.107  christos 	{
   8580  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8581  1.124  christos },		/* 481 = wait6 */
   8582  1.107  christos 	{
   8583  1.155  christos 		ns(struct sys_clock_getcpuclockid2_args),
   8584  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8585  1.155  christos 	},		/* 482 = clock_getcpuclockid2 */
   8586  1.107  christos 	{
   8587  1.142  christos 		ns(struct sys___getvfsstat90_args),
   8588  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8589  1.142  christos 	},		/* 483 = __getvfsstat90 */
   8590  1.107  christos 	{
   8591  1.142  christos 		ns(struct sys___statvfs190_args),
   8592  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8593  1.142  christos 	},		/* 484 = __statvfs190 */
   8594  1.107  christos 	{
   8595  1.142  christos 		ns(struct sys___fstatvfs190_args),
   8596  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8597  1.142  christos 	},		/* 485 = __fstatvfs190 */
   8598  1.107  christos 	{
   8599  1.142  christos 		ns(struct sys___fhstatvfs190_args),
   8600  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8601  1.142  christos 	},		/* 486 = __fhstatvfs190 */
   8602  1.107  christos 	{
   8603  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8604  1.150  christos },		/* 487 = __acl_get_link */
   8605  1.107  christos 	{
   8606  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8607  1.150  christos },		/* 488 = __acl_set_link */
   8608  1.107  christos 	{
   8609  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8610  1.150  christos },		/* 489 = __acl_delete_link */
   8611  1.107  christos 	{
   8612  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8613  1.150  christos },		/* 490 = __acl_aclcheck_link */
   8614  1.107  christos 	{
   8615  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8616  1.150  christos },		/* 491 = __acl_get_file */
   8617  1.107  christos 	{
   8618  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8619  1.150  christos },		/* 492 = __acl_set_file */
   8620  1.107  christos 	{
   8621  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8622  1.150  christos },		/* 493 = __acl_get_fd */
   8623  1.107  christos 	{
   8624  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8625  1.150  christos },		/* 494 = __acl_set_fd */
   8626  1.107  christos 	{
   8627  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8628  1.150  christos },		/* 495 = __acl_delete_file */
   8629  1.107  christos 	{
   8630  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8631  1.150  christos },		/* 496 = __acl_delete_fd */
   8632  1.107  christos 	{
   8633  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8634  1.150  christos },		/* 497 = __acl_aclcheck_file */
   8635  1.107  christos 	{
   8636  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8637  1.150  christos },		/* 498 = __acl_aclcheck_fd */
   8638  1.107  christos 	{
   8639  1.150  christos 		ns(struct sys_lpathconf_args),
   8640  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8641  1.150  christos 	},		/* 499 = lpathconf */
   8642  1.107  christos 	{
   8643  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8644  1.158  christos },		/* 500 = memfd_create */
   8645  1.107  christos 	{
   8646  1.159  christos 		ns(struct sys___kevent100_args),
   8647  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8648  1.159  christos 	},		/* 501 = __kevent100 */
   8649  1.107  christos 	{
   8650  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8651  1.159  christos },		/* 502 = epoll_create1 */
   8652  1.107  christos 	{
   8653  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8654  1.159  christos },		/* 503 = epoll_ctl */
   8655  1.107  christos 	{
   8656  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8657  1.159  christos },		/* 504 = epoll_pwait2 */
   8658  1.107  christos 	{
   8659  1.161  christos 		ns(struct sys___dup3100_args),
   8660  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8661  1.161  christos 	},		/* 505 = __dup3100 */
   8662  1.107  christos 	{
   8663  1.164  christos 		.sy_flags = SYCALL_NOSYS,
   8664  1.164  christos 		.sy_call = (sy_call_t *)(void *)rumpns_sys_nomodule,
   8665  1.162  christos },		/* 506 = semtimedop */
   8666  1.107  christos 	{
   8667  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8668  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8669  1.107  christos 	},		/* 507 = filler */
   8670  1.107  christos 	{
   8671  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8672  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8673  1.107  christos 	},		/* 508 = filler */
   8674  1.107  christos 	{
   8675  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8676  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8677  1.107  christos 	},		/* 509 = filler */
   8678  1.107  christos 	{
   8679  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8680  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8681  1.107  christos 	},		/* 510 = filler */
   8682  1.107  christos 	{
   8683  1.107  christos 		.sy_flags = SYCALL_NOSYS,
   8684  1.143  christos 		.sy_call = (sy_call_t *)(void *)rumpns_enosys,
   8685  1.107  christos 	},		/* 511 = filler */
   8686   1.29     pooka };
   8687  1.140  pgoyette 
   8688  1.140  pgoyette const uint32_t rump_sysent_nomodbits[] = {
   8689  1.140  pgoyette 	0x042c4180,	/* syscalls   0- 31 */
   8690  1.140  pgoyette 	0xc0b14140,	/* syscalls  32- 63 */
   8691  1.140  pgoyette 	0x23f80083,	/* syscalls  64- 95 */
   8692  1.140  pgoyette 	0x2437f0ea,	/* syscalls  96-127 */
   8693  1.140  pgoyette 	0x7877f406,	/* syscalls 128-159 */
   8694  1.142  christos 	0x7f008e1e,	/* syscalls 160-191 */
   8695  1.140  pgoyette 	0xf0044010,	/* syscalls 192-223 */
   8696  1.140  pgoyette 	0xff9167ff,	/* syscalls 224-255 */
   8697  1.140  pgoyette 	0x01d107ff,	/* syscalls 256-287 */
   8698  1.140  pgoyette 	0x0000fc88,	/* syscalls 288-319 */
   8699  1.142  christos 	0x0200fc01,	/* syscalls 320-351 */
   8700  1.142  christos 	0x006000f0,	/* syscalls 352-383 */
   8701  1.142  christos 	0x007fe338,	/* syscalls 384-415 */
   8702  1.159  christos 	0x1c4f0040,	/* syscalls 416-447 */
   8703  1.160  christos 	0x00000040,	/* syscalls 448-479 */
   8704  1.164  christos 	0x04000000,	/* syscalls 480-511 */
   8705  1.140  pgoyette };
   8706   1.29     pooka CTASSERT(__arraycount(rump_sysent) == SYS_NSYSENT);
   8707   1.90     pooka __strong_alias(rumpns_sysent,rump_sysent);
   8708   1.53     pooka #endif /* RUMP_CLIENT */
   8709