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