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