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