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