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