1
2
3
4
5
6 package unix
7
8 import (
9 "syscall"
10 "unsafe"
11 )
12
13 var _ syscall.Errno
14
15
16
17 func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
18 r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
19 n = int(r0)
20 if e1 != 0 {
21 err = errnoErr(e1)
22 }
23 return
24 }
25
26 var libc_getgroups_trampoline_addr uintptr
27
28
29
30
31
32 func setgroups(ngid int, gid *_Gid_t) (err error) {
33 _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
34 if e1 != 0 {
35 err = errnoErr(e1)
36 }
37 return
38 }
39
40 var libc_setgroups_trampoline_addr uintptr
41
42
43
44
45
46 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
47 r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
48 wpid = int(r0)
49 if e1 != 0 {
50 err = errnoErr(e1)
51 }
52 return
53 }
54
55 var libc_wait4_trampoline_addr uintptr
56
57
58
59
60
61 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
62 r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
63 fd = int(r0)
64 if e1 != 0 {
65 err = errnoErr(e1)
66 }
67 return
68 }
69
70 var libc_accept_trampoline_addr uintptr
71
72
73
74
75
76 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
77 _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
78 if e1 != 0 {
79 err = errnoErr(e1)
80 }
81 return
82 }
83
84 var libc_bind_trampoline_addr uintptr
85
86
87
88
89
90 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
91 _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
92 if e1 != 0 {
93 err = errnoErr(e1)
94 }
95 return
96 }
97
98 var libc_connect_trampoline_addr uintptr
99
100
101
102
103
104 func socket(domain int, typ int, proto int) (fd int, err error) {
105 r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
106 fd = int(r0)
107 if e1 != 0 {
108 err = errnoErr(e1)
109 }
110 return
111 }
112
113 var libc_socket_trampoline_addr uintptr
114
115
116
117
118
119 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
120 _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
121 if e1 != 0 {
122 err = errnoErr(e1)
123 }
124 return
125 }
126
127 var libc_getsockopt_trampoline_addr uintptr
128
129
130
131
132
133 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
134 _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
135 if e1 != 0 {
136 err = errnoErr(e1)
137 }
138 return
139 }
140
141 var libc_setsockopt_trampoline_addr uintptr
142
143
144
145
146
147 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
148 _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
149 if e1 != 0 {
150 err = errnoErr(e1)
151 }
152 return
153 }
154
155 var libc_getpeername_trampoline_addr uintptr
156
157
158
159
160
161 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
162 _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
163 if e1 != 0 {
164 err = errnoErr(e1)
165 }
166 return
167 }
168
169 var libc_getsockname_trampoline_addr uintptr
170
171
172
173
174
175 func Shutdown(s int, how int) (err error) {
176 _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
177 if e1 != 0 {
178 err = errnoErr(e1)
179 }
180 return
181 }
182
183 var libc_shutdown_trampoline_addr uintptr
184
185
186
187
188
189 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
190 _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
191 if e1 != 0 {
192 err = errnoErr(e1)
193 }
194 return
195 }
196
197 var libc_socketpair_trampoline_addr uintptr
198
199
200
201
202
203 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
204 var _p0 unsafe.Pointer
205 if len(p) > 0 {
206 _p0 = unsafe.Pointer(&p[0])
207 } else {
208 _p0 = unsafe.Pointer(&_zero)
209 }
210 r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
211 n = int(r0)
212 if e1 != 0 {
213 err = errnoErr(e1)
214 }
215 return
216 }
217
218 var libc_recvfrom_trampoline_addr uintptr
219
220
221
222
223
224 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
225 var _p0 unsafe.Pointer
226 if len(buf) > 0 {
227 _p0 = unsafe.Pointer(&buf[0])
228 } else {
229 _p0 = unsafe.Pointer(&_zero)
230 }
231 _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
232 if e1 != 0 {
233 err = errnoErr(e1)
234 }
235 return
236 }
237
238 var libc_sendto_trampoline_addr uintptr
239
240
241
242
243
244 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
245 r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
246 n = int(r0)
247 if e1 != 0 {
248 err = errnoErr(e1)
249 }
250 return
251 }
252
253 var libc_recvmsg_trampoline_addr uintptr
254
255
256
257
258
259 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
260 r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
261 n = int(r0)
262 if e1 != 0 {
263 err = errnoErr(e1)
264 }
265 return
266 }
267
268 var libc_sendmsg_trampoline_addr uintptr
269
270
271
272
273
274 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
275 r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
276 n = int(r0)
277 if e1 != 0 {
278 err = errnoErr(e1)
279 }
280 return
281 }
282
283 var libc_kevent_trampoline_addr uintptr
284
285
286
287
288
289 func utimes(path string, timeval *[2]Timeval) (err error) {
290 var _p0 *byte
291 _p0, err = BytePtrFromString(path)
292 if err != nil {
293 return
294 }
295 _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
296 if e1 != 0 {
297 err = errnoErr(e1)
298 }
299 return
300 }
301
302 var libc_utimes_trampoline_addr uintptr
303
304
305
306
307
308 func futimes(fd int, timeval *[2]Timeval) (err error) {
309 _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
310 if e1 != 0 {
311 err = errnoErr(e1)
312 }
313 return
314 }
315
316 var libc_futimes_trampoline_addr uintptr
317
318
319
320
321
322 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
323 r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
324 n = int(r0)
325 if e1 != 0 {
326 err = errnoErr(e1)
327 }
328 return
329 }
330
331 var libc_poll_trampoline_addr uintptr
332
333
334
335
336
337 func Madvise(b []byte, behav int) (err error) {
338 var _p0 unsafe.Pointer
339 if len(b) > 0 {
340 _p0 = unsafe.Pointer(&b[0])
341 } else {
342 _p0 = unsafe.Pointer(&_zero)
343 }
344 _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
345 if e1 != 0 {
346 err = errnoErr(e1)
347 }
348 return
349 }
350
351 var libc_madvise_trampoline_addr uintptr
352
353
354
355
356
357 func Mlock(b []byte) (err error) {
358 var _p0 unsafe.Pointer
359 if len(b) > 0 {
360 _p0 = unsafe.Pointer(&b[0])
361 } else {
362 _p0 = unsafe.Pointer(&_zero)
363 }
364 _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
365 if e1 != 0 {
366 err = errnoErr(e1)
367 }
368 return
369 }
370
371 var libc_mlock_trampoline_addr uintptr
372
373
374
375
376
377 func Mlockall(flags int) (err error) {
378 _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
379 if e1 != 0 {
380 err = errnoErr(e1)
381 }
382 return
383 }
384
385 var libc_mlockall_trampoline_addr uintptr
386
387
388
389
390
391 func Mprotect(b []byte, prot int) (err error) {
392 var _p0 unsafe.Pointer
393 if len(b) > 0 {
394 _p0 = unsafe.Pointer(&b[0])
395 } else {
396 _p0 = unsafe.Pointer(&_zero)
397 }
398 _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
399 if e1 != 0 {
400 err = errnoErr(e1)
401 }
402 return
403 }
404
405 var libc_mprotect_trampoline_addr uintptr
406
407
408
409
410
411 func Msync(b []byte, flags int) (err error) {
412 var _p0 unsafe.Pointer
413 if len(b) > 0 {
414 _p0 = unsafe.Pointer(&b[0])
415 } else {
416 _p0 = unsafe.Pointer(&_zero)
417 }
418 _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
419 if e1 != 0 {
420 err = errnoErr(e1)
421 }
422 return
423 }
424
425 var libc_msync_trampoline_addr uintptr
426
427
428
429
430
431 func Munlock(b []byte) (err error) {
432 var _p0 unsafe.Pointer
433 if len(b) > 0 {
434 _p0 = unsafe.Pointer(&b[0])
435 } else {
436 _p0 = unsafe.Pointer(&_zero)
437 }
438 _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
439 if e1 != 0 {
440 err = errnoErr(e1)
441 }
442 return
443 }
444
445 var libc_munlock_trampoline_addr uintptr
446
447
448
449
450
451 func Munlockall() (err error) {
452 _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
453 if e1 != 0 {
454 err = errnoErr(e1)
455 }
456 return
457 }
458
459 var libc_munlockall_trampoline_addr uintptr
460
461
462
463
464
465 func pipe2(p *[2]_C_int, flags int) (err error) {
466 _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 var libc_pipe2_trampoline_addr uintptr
474
475
476
477
478
479 func Getdents(fd int, buf []byte) (n int, err error) {
480 var _p0 unsafe.Pointer
481 if len(buf) > 0 {
482 _p0 = unsafe.Pointer(&buf[0])
483 } else {
484 _p0 = unsafe.Pointer(&_zero)
485 }
486 r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
487 n = int(r0)
488 if e1 != 0 {
489 err = errnoErr(e1)
490 }
491 return
492 }
493
494 var libc_getdents_trampoline_addr uintptr
495
496
497
498
499
500 func Getcwd(buf []byte) (n int, err error) {
501 var _p0 unsafe.Pointer
502 if len(buf) > 0 {
503 _p0 = unsafe.Pointer(&buf[0])
504 } else {
505 _p0 = unsafe.Pointer(&_zero)
506 }
507 r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
508 n = int(r0)
509 if e1 != 0 {
510 err = errnoErr(e1)
511 }
512 return
513 }
514
515 var libc_getcwd_trampoline_addr uintptr
516
517
518
519
520
521 func getresuid(ruid *_C_int, euid *_C_int, suid *_C_int) {
522 syscall_rawSyscall(libc_getresuid_trampoline_addr, uintptr(unsafe.Pointer(ruid)), uintptr(unsafe.Pointer(euid)), uintptr(unsafe.Pointer(suid)))
523 return
524 }
525
526 var libc_getresuid_trampoline_addr uintptr
527
528
529
530
531
532 func getresgid(rgid *_C_int, egid *_C_int, sgid *_C_int) {
533 syscall_rawSyscall(libc_getresgid_trampoline_addr, uintptr(unsafe.Pointer(rgid)), uintptr(unsafe.Pointer(egid)), uintptr(unsafe.Pointer(sgid)))
534 return
535 }
536
537 var libc_getresgid_trampoline_addr uintptr
538
539
540
541
542
543 func ioctl(fd int, req uint, arg uintptr) (err error) {
544 _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
545 if e1 != 0 {
546 err = errnoErr(e1)
547 }
548 return
549 }
550
551 var libc_ioctl_trampoline_addr uintptr
552
553
554
555
556
557 func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
558 _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
559 if e1 != 0 {
560 err = errnoErr(e1)
561 }
562 return
563 }
564
565
566
567 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
568 var _p0 unsafe.Pointer
569 if len(mib) > 0 {
570 _p0 = unsafe.Pointer(&mib[0])
571 } else {
572 _p0 = unsafe.Pointer(&_zero)
573 }
574 _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
575 if e1 != 0 {
576 err = errnoErr(e1)
577 }
578 return
579 }
580
581 var libc_sysctl_trampoline_addr uintptr
582
583
584
585
586
587 func fcntl(fd int, cmd int, arg int) (n int, err error) {
588 r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
589 n = int(r0)
590 if e1 != 0 {
591 err = errnoErr(e1)
592 }
593 return
594 }
595
596 var libc_fcntl_trampoline_addr uintptr
597
598
599
600
601
602 func fcntlPtr(fd int, cmd int, arg unsafe.Pointer) (n int, err error) {
603 r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
604 n = int(r0)
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
610
611
612
613 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
614 r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
615 n = int(r0)
616 if e1 != 0 {
617 err = errnoErr(e1)
618 }
619 return
620 }
621
622 var libc_ppoll_trampoline_addr uintptr
623
624
625
626
627
628 func Access(path string, mode uint32) (err error) {
629 var _p0 *byte
630 _p0, err = BytePtrFromString(path)
631 if err != nil {
632 return
633 }
634 _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
635 if e1 != 0 {
636 err = errnoErr(e1)
637 }
638 return
639 }
640
641 var libc_access_trampoline_addr uintptr
642
643
644
645
646
647 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
648 _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
649 if e1 != 0 {
650 err = errnoErr(e1)
651 }
652 return
653 }
654
655 var libc_adjtime_trampoline_addr uintptr
656
657
658
659
660
661 func Chdir(path string) (err error) {
662 var _p0 *byte
663 _p0, err = BytePtrFromString(path)
664 if err != nil {
665 return
666 }
667 _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
668 if e1 != 0 {
669 err = errnoErr(e1)
670 }
671 return
672 }
673
674 var libc_chdir_trampoline_addr uintptr
675
676
677
678
679
680 func Chflags(path string, flags int) (err error) {
681 var _p0 *byte
682 _p0, err = BytePtrFromString(path)
683 if err != nil {
684 return
685 }
686 _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
687 if e1 != 0 {
688 err = errnoErr(e1)
689 }
690 return
691 }
692
693 var libc_chflags_trampoline_addr uintptr
694
695
696
697
698
699 func Chmod(path string, mode uint32) (err error) {
700 var _p0 *byte
701 _p0, err = BytePtrFromString(path)
702 if err != nil {
703 return
704 }
705 _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
706 if e1 != 0 {
707 err = errnoErr(e1)
708 }
709 return
710 }
711
712 var libc_chmod_trampoline_addr uintptr
713
714
715
716
717
718 func Chown(path string, uid int, gid int) (err error) {
719 var _p0 *byte
720 _p0, err = BytePtrFromString(path)
721 if err != nil {
722 return
723 }
724 _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
725 if e1 != 0 {
726 err = errnoErr(e1)
727 }
728 return
729 }
730
731 var libc_chown_trampoline_addr uintptr
732
733
734
735
736
737 func Chroot(path string) (err error) {
738 var _p0 *byte
739 _p0, err = BytePtrFromString(path)
740 if err != nil {
741 return
742 }
743 _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
744 if e1 != 0 {
745 err = errnoErr(e1)
746 }
747 return
748 }
749
750 var libc_chroot_trampoline_addr uintptr
751
752
753
754
755
756 func ClockGettime(clockid int32, time *Timespec) (err error) {
757 _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
758 if e1 != 0 {
759 err = errnoErr(e1)
760 }
761 return
762 }
763
764 var libc_clock_gettime_trampoline_addr uintptr
765
766
767
768
769
770 func Close(fd int) (err error) {
771 _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
772 if e1 != 0 {
773 err = errnoErr(e1)
774 }
775 return
776 }
777
778 var libc_close_trampoline_addr uintptr
779
780
781
782
783
784 func Dup(fd int) (nfd int, err error) {
785 r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
786 nfd = int(r0)
787 if e1 != 0 {
788 err = errnoErr(e1)
789 }
790 return
791 }
792
793 var libc_dup_trampoline_addr uintptr
794
795
796
797
798
799 func Dup2(from int, to int) (err error) {
800 _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
801 if e1 != 0 {
802 err = errnoErr(e1)
803 }
804 return
805 }
806
807 var libc_dup2_trampoline_addr uintptr
808
809
810
811
812
813 func Dup3(from int, to int, flags int) (err error) {
814 _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
815 if e1 != 0 {
816 err = errnoErr(e1)
817 }
818 return
819 }
820
821 var libc_dup3_trampoline_addr uintptr
822
823
824
825
826
827 func Exit(code int) {
828 syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
829 return
830 }
831
832 var libc_exit_trampoline_addr uintptr
833
834
835
836
837
838 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
839 var _p0 *byte
840 _p0, err = BytePtrFromString(path)
841 if err != nil {
842 return
843 }
844 _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
845 if e1 != 0 {
846 err = errnoErr(e1)
847 }
848 return
849 }
850
851 var libc_faccessat_trampoline_addr uintptr
852
853
854
855
856
857 func Fchdir(fd int) (err error) {
858 _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
859 if e1 != 0 {
860 err = errnoErr(e1)
861 }
862 return
863 }
864
865 var libc_fchdir_trampoline_addr uintptr
866
867
868
869
870
871 func Fchflags(fd int, flags int) (err error) {
872 _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
873 if e1 != 0 {
874 err = errnoErr(e1)
875 }
876 return
877 }
878
879 var libc_fchflags_trampoline_addr uintptr
880
881
882
883
884
885 func Fchmod(fd int, mode uint32) (err error) {
886 _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
887 if e1 != 0 {
888 err = errnoErr(e1)
889 }
890 return
891 }
892
893 var libc_fchmod_trampoline_addr uintptr
894
895
896
897
898
899 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
900 var _p0 *byte
901 _p0, err = BytePtrFromString(path)
902 if err != nil {
903 return
904 }
905 _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
906 if e1 != 0 {
907 err = errnoErr(e1)
908 }
909 return
910 }
911
912 var libc_fchmodat_trampoline_addr uintptr
913
914
915
916
917
918 func Fchown(fd int, uid int, gid int) (err error) {
919 _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
920 if e1 != 0 {
921 err = errnoErr(e1)
922 }
923 return
924 }
925
926 var libc_fchown_trampoline_addr uintptr
927
928
929
930
931
932 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
933 var _p0 *byte
934 _p0, err = BytePtrFromString(path)
935 if err != nil {
936 return
937 }
938 _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
939 if e1 != 0 {
940 err = errnoErr(e1)
941 }
942 return
943 }
944
945 var libc_fchownat_trampoline_addr uintptr
946
947
948
949
950
951 func Flock(fd int, how int) (err error) {
952 _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
953 if e1 != 0 {
954 err = errnoErr(e1)
955 }
956 return
957 }
958
959 var libc_flock_trampoline_addr uintptr
960
961
962
963
964
965 func Fpathconf(fd int, name int) (val int, err error) {
966 r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
967 val = int(r0)
968 if e1 != 0 {
969 err = errnoErr(e1)
970 }
971 return
972 }
973
974 var libc_fpathconf_trampoline_addr uintptr
975
976
977
978
979
980 func Fstat(fd int, stat *Stat_t) (err error) {
981 _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
982 if e1 != 0 {
983 err = errnoErr(e1)
984 }
985 return
986 }
987
988 var libc_fstat_trampoline_addr uintptr
989
990
991
992
993
994 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
995 var _p0 *byte
996 _p0, err = BytePtrFromString(path)
997 if err != nil {
998 return
999 }
1000 _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
1001 if e1 != 0 {
1002 err = errnoErr(e1)
1003 }
1004 return
1005 }
1006
1007 var libc_fstatat_trampoline_addr uintptr
1008
1009
1010
1011
1012
1013 func Fstatfs(fd int, stat *Statfs_t) (err error) {
1014 _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
1015 if e1 != 0 {
1016 err = errnoErr(e1)
1017 }
1018 return
1019 }
1020
1021 var libc_fstatfs_trampoline_addr uintptr
1022
1023
1024
1025
1026
1027 func Fsync(fd int) (err error) {
1028 _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
1029 if e1 != 0 {
1030 err = errnoErr(e1)
1031 }
1032 return
1033 }
1034
1035 var libc_fsync_trampoline_addr uintptr
1036
1037
1038
1039
1040
1041 func Ftruncate(fd int, length int64) (err error) {
1042 _, _, e1 := syscall_syscall6(libc_ftruncate_trampoline_addr, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
1043 if e1 != 0 {
1044 err = errnoErr(e1)
1045 }
1046 return
1047 }
1048
1049 var libc_ftruncate_trampoline_addr uintptr
1050
1051
1052
1053
1054
1055 func Getegid() (egid int) {
1056 r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
1057 egid = int(r0)
1058 return
1059 }
1060
1061 var libc_getegid_trampoline_addr uintptr
1062
1063
1064
1065
1066
1067 func Geteuid() (uid int) {
1068 r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
1069 uid = int(r0)
1070 return
1071 }
1072
1073 var libc_geteuid_trampoline_addr uintptr
1074
1075
1076
1077
1078
1079 func Getgid() (gid int) {
1080 r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
1081 gid = int(r0)
1082 return
1083 }
1084
1085 var libc_getgid_trampoline_addr uintptr
1086
1087
1088
1089
1090
1091 func Getpgid(pid int) (pgid int, err error) {
1092 r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
1093 pgid = int(r0)
1094 if e1 != 0 {
1095 err = errnoErr(e1)
1096 }
1097 return
1098 }
1099
1100 var libc_getpgid_trampoline_addr uintptr
1101
1102
1103
1104
1105
1106 func Getpgrp() (pgrp int) {
1107 r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
1108 pgrp = int(r0)
1109 return
1110 }
1111
1112 var libc_getpgrp_trampoline_addr uintptr
1113
1114
1115
1116
1117
1118 func Getpid() (pid int) {
1119 r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
1120 pid = int(r0)
1121 return
1122 }
1123
1124 var libc_getpid_trampoline_addr uintptr
1125
1126
1127
1128
1129
1130 func Getppid() (ppid int) {
1131 r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
1132 ppid = int(r0)
1133 return
1134 }
1135
1136 var libc_getppid_trampoline_addr uintptr
1137
1138
1139
1140
1141
1142 func Getpriority(which int, who int) (prio int, err error) {
1143 r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
1144 prio = int(r0)
1145 if e1 != 0 {
1146 err = errnoErr(e1)
1147 }
1148 return
1149 }
1150
1151 var libc_getpriority_trampoline_addr uintptr
1152
1153
1154
1155
1156
1157 func Getrlimit(which int, lim *Rlimit) (err error) {
1158 _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1159 if e1 != 0 {
1160 err = errnoErr(e1)
1161 }
1162 return
1163 }
1164
1165 var libc_getrlimit_trampoline_addr uintptr
1166
1167
1168
1169
1170
1171 func Getrtable() (rtable int, err error) {
1172 r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
1173 rtable = int(r0)
1174 if e1 != 0 {
1175 err = errnoErr(e1)
1176 }
1177 return
1178 }
1179
1180 var libc_getrtable_trampoline_addr uintptr
1181
1182
1183
1184
1185
1186 func Getrusage(who int, rusage *Rusage) (err error) {
1187 _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1188 if e1 != 0 {
1189 err = errnoErr(e1)
1190 }
1191 return
1192 }
1193
1194 var libc_getrusage_trampoline_addr uintptr
1195
1196
1197
1198
1199
1200 func Getsid(pid int) (sid int, err error) {
1201 r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
1202 sid = int(r0)
1203 if e1 != 0 {
1204 err = errnoErr(e1)
1205 }
1206 return
1207 }
1208
1209 var libc_getsid_trampoline_addr uintptr
1210
1211
1212
1213
1214
1215 func Gettimeofday(tv *Timeval) (err error) {
1216 _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
1217 if e1 != 0 {
1218 err = errnoErr(e1)
1219 }
1220 return
1221 }
1222
1223 var libc_gettimeofday_trampoline_addr uintptr
1224
1225
1226
1227
1228
1229 func Getuid() (uid int) {
1230 r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
1231 uid = int(r0)
1232 return
1233 }
1234
1235 var libc_getuid_trampoline_addr uintptr
1236
1237
1238
1239
1240
1241 func Issetugid() (tainted bool) {
1242 r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
1243 tainted = bool(r0 != 0)
1244 return
1245 }
1246
1247 var libc_issetugid_trampoline_addr uintptr
1248
1249
1250
1251
1252
1253 func Kill(pid int, signum syscall.Signal) (err error) {
1254 _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
1255 if e1 != 0 {
1256 err = errnoErr(e1)
1257 }
1258 return
1259 }
1260
1261 var libc_kill_trampoline_addr uintptr
1262
1263
1264
1265
1266
1267 func Kqueue() (fd int, err error) {
1268 r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
1269 fd = int(r0)
1270 if e1 != 0 {
1271 err = errnoErr(e1)
1272 }
1273 return
1274 }
1275
1276 var libc_kqueue_trampoline_addr uintptr
1277
1278
1279
1280
1281
1282 func Lchown(path string, uid int, gid int) (err error) {
1283 var _p0 *byte
1284 _p0, err = BytePtrFromString(path)
1285 if err != nil {
1286 return
1287 }
1288 _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1289 if e1 != 0 {
1290 err = errnoErr(e1)
1291 }
1292 return
1293 }
1294
1295 var libc_lchown_trampoline_addr uintptr
1296
1297
1298
1299
1300
1301 func Link(path string, link string) (err error) {
1302 var _p0 *byte
1303 _p0, err = BytePtrFromString(path)
1304 if err != nil {
1305 return
1306 }
1307 var _p1 *byte
1308 _p1, err = BytePtrFromString(link)
1309 if err != nil {
1310 return
1311 }
1312 _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1313 if e1 != 0 {
1314 err = errnoErr(e1)
1315 }
1316 return
1317 }
1318
1319 var libc_link_trampoline_addr uintptr
1320
1321
1322
1323
1324
1325 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1326 var _p0 *byte
1327 _p0, err = BytePtrFromString(path)
1328 if err != nil {
1329 return
1330 }
1331 var _p1 *byte
1332 _p1, err = BytePtrFromString(link)
1333 if err != nil {
1334 return
1335 }
1336 _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1337 if e1 != 0 {
1338 err = errnoErr(e1)
1339 }
1340 return
1341 }
1342
1343 var libc_linkat_trampoline_addr uintptr
1344
1345
1346
1347
1348
1349 func Listen(s int, backlog int) (err error) {
1350 _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
1351 if e1 != 0 {
1352 err = errnoErr(e1)
1353 }
1354 return
1355 }
1356
1357 var libc_listen_trampoline_addr uintptr
1358
1359
1360
1361
1362
1363 func Lstat(path string, stat *Stat_t) (err error) {
1364 var _p0 *byte
1365 _p0, err = BytePtrFromString(path)
1366 if err != nil {
1367 return
1368 }
1369 _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
1370 if e1 != 0 {
1371 err = errnoErr(e1)
1372 }
1373 return
1374 }
1375
1376 var libc_lstat_trampoline_addr uintptr
1377
1378
1379
1380
1381
1382 func Mkdir(path string, mode uint32) (err error) {
1383 var _p0 *byte
1384 _p0, err = BytePtrFromString(path)
1385 if err != nil {
1386 return
1387 }
1388 _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1389 if e1 != 0 {
1390 err = errnoErr(e1)
1391 }
1392 return
1393 }
1394
1395 var libc_mkdir_trampoline_addr uintptr
1396
1397
1398
1399
1400
1401 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1402 var _p0 *byte
1403 _p0, err = BytePtrFromString(path)
1404 if err != nil {
1405 return
1406 }
1407 _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1408 if e1 != 0 {
1409 err = errnoErr(e1)
1410 }
1411 return
1412 }
1413
1414 var libc_mkdirat_trampoline_addr uintptr
1415
1416
1417
1418
1419
1420 func Mkfifo(path string, mode uint32) (err error) {
1421 var _p0 *byte
1422 _p0, err = BytePtrFromString(path)
1423 if err != nil {
1424 return
1425 }
1426 _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1427 if e1 != 0 {
1428 err = errnoErr(e1)
1429 }
1430 return
1431 }
1432
1433 var libc_mkfifo_trampoline_addr uintptr
1434
1435
1436
1437
1438
1439 func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
1440 var _p0 *byte
1441 _p0, err = BytePtrFromString(path)
1442 if err != nil {
1443 return
1444 }
1445 _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1446 if e1 != 0 {
1447 err = errnoErr(e1)
1448 }
1449 return
1450 }
1451
1452 var libc_mkfifoat_trampoline_addr uintptr
1453
1454
1455
1456
1457
1458 func Mknod(path string, mode uint32, dev int) (err error) {
1459 var _p0 *byte
1460 _p0, err = BytePtrFromString(path)
1461 if err != nil {
1462 return
1463 }
1464 _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1465 if e1 != 0 {
1466 err = errnoErr(e1)
1467 }
1468 return
1469 }
1470
1471 var libc_mknod_trampoline_addr uintptr
1472
1473
1474
1475
1476
1477 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
1478 var _p0 *byte
1479 _p0, err = BytePtrFromString(path)
1480 if err != nil {
1481 return
1482 }
1483 _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
1484 if e1 != 0 {
1485 err = errnoErr(e1)
1486 }
1487 return
1488 }
1489
1490 var libc_mknodat_trampoline_addr uintptr
1491
1492
1493
1494
1495
1496 func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
1497 var _p0 *byte
1498 _p0, err = BytePtrFromString(fsType)
1499 if err != nil {
1500 return
1501 }
1502 var _p1 *byte
1503 _p1, err = BytePtrFromString(dir)
1504 if err != nil {
1505 return
1506 }
1507 _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
1508 if e1 != 0 {
1509 err = errnoErr(e1)
1510 }
1511 return
1512 }
1513
1514 var libc_mount_trampoline_addr uintptr
1515
1516
1517
1518
1519
1520 func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
1521 _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
1522 if e1 != 0 {
1523 err = errnoErr(e1)
1524 }
1525 return
1526 }
1527
1528 var libc_nanosleep_trampoline_addr uintptr
1529
1530
1531
1532
1533
1534 func Open(path string, mode int, perm uint32) (fd int, err error) {
1535 var _p0 *byte
1536 _p0, err = BytePtrFromString(path)
1537 if err != nil {
1538 return
1539 }
1540 r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1541 fd = int(r0)
1542 if e1 != 0 {
1543 err = errnoErr(e1)
1544 }
1545 return
1546 }
1547
1548 var libc_open_trampoline_addr uintptr
1549
1550
1551
1552
1553
1554 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1555 var _p0 *byte
1556 _p0, err = BytePtrFromString(path)
1557 if err != nil {
1558 return
1559 }
1560 r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1561 fd = int(r0)
1562 if e1 != 0 {
1563 err = errnoErr(e1)
1564 }
1565 return
1566 }
1567
1568 var libc_openat_trampoline_addr uintptr
1569
1570
1571
1572
1573
1574 func Pathconf(path string, name int) (val int, err error) {
1575 var _p0 *byte
1576 _p0, err = BytePtrFromString(path)
1577 if err != nil {
1578 return
1579 }
1580 r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1581 val = int(r0)
1582 if e1 != 0 {
1583 err = errnoErr(e1)
1584 }
1585 return
1586 }
1587
1588 var libc_pathconf_trampoline_addr uintptr
1589
1590
1591
1592
1593
1594 func pread(fd int, p []byte, offset int64) (n int, err error) {
1595 var _p0 unsafe.Pointer
1596 if len(p) > 0 {
1597 _p0 = unsafe.Pointer(&p[0])
1598 } else {
1599 _p0 = unsafe.Pointer(&_zero)
1600 }
1601 r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
1602 n = int(r0)
1603 if e1 != 0 {
1604 err = errnoErr(e1)
1605 }
1606 return
1607 }
1608
1609 var libc_pread_trampoline_addr uintptr
1610
1611
1612
1613
1614
1615 func pwrite(fd int, p []byte, offset int64) (n int, err error) {
1616 var _p0 unsafe.Pointer
1617 if len(p) > 0 {
1618 _p0 = unsafe.Pointer(&p[0])
1619 } else {
1620 _p0 = unsafe.Pointer(&_zero)
1621 }
1622 r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
1623 n = int(r0)
1624 if e1 != 0 {
1625 err = errnoErr(e1)
1626 }
1627 return
1628 }
1629
1630 var libc_pwrite_trampoline_addr uintptr
1631
1632
1633
1634
1635
1636 func read(fd int, p []byte) (n int, err error) {
1637 var _p0 unsafe.Pointer
1638 if len(p) > 0 {
1639 _p0 = unsafe.Pointer(&p[0])
1640 } else {
1641 _p0 = unsafe.Pointer(&_zero)
1642 }
1643 r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1644 n = int(r0)
1645 if e1 != 0 {
1646 err = errnoErr(e1)
1647 }
1648 return
1649 }
1650
1651 var libc_read_trampoline_addr uintptr
1652
1653
1654
1655
1656
1657 func Readlink(path string, buf []byte) (n int, err error) {
1658 var _p0 *byte
1659 _p0, err = BytePtrFromString(path)
1660 if err != nil {
1661 return
1662 }
1663 var _p1 unsafe.Pointer
1664 if len(buf) > 0 {
1665 _p1 = unsafe.Pointer(&buf[0])
1666 } else {
1667 _p1 = unsafe.Pointer(&_zero)
1668 }
1669 r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1670 n = int(r0)
1671 if e1 != 0 {
1672 err = errnoErr(e1)
1673 }
1674 return
1675 }
1676
1677 var libc_readlink_trampoline_addr uintptr
1678
1679
1680
1681
1682
1683 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1684 var _p0 *byte
1685 _p0, err = BytePtrFromString(path)
1686 if err != nil {
1687 return
1688 }
1689 var _p1 unsafe.Pointer
1690 if len(buf) > 0 {
1691 _p1 = unsafe.Pointer(&buf[0])
1692 } else {
1693 _p1 = unsafe.Pointer(&_zero)
1694 }
1695 r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1696 n = int(r0)
1697 if e1 != 0 {
1698 err = errnoErr(e1)
1699 }
1700 return
1701 }
1702
1703 var libc_readlinkat_trampoline_addr uintptr
1704
1705
1706
1707
1708
1709 func Rename(from string, to string) (err error) {
1710 var _p0 *byte
1711 _p0, err = BytePtrFromString(from)
1712 if err != nil {
1713 return
1714 }
1715 var _p1 *byte
1716 _p1, err = BytePtrFromString(to)
1717 if err != nil {
1718 return
1719 }
1720 _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1721 if e1 != 0 {
1722 err = errnoErr(e1)
1723 }
1724 return
1725 }
1726
1727 var libc_rename_trampoline_addr uintptr
1728
1729
1730
1731
1732
1733 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1734 var _p0 *byte
1735 _p0, err = BytePtrFromString(from)
1736 if err != nil {
1737 return
1738 }
1739 var _p1 *byte
1740 _p1, err = BytePtrFromString(to)
1741 if err != nil {
1742 return
1743 }
1744 _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1745 if e1 != 0 {
1746 err = errnoErr(e1)
1747 }
1748 return
1749 }
1750
1751 var libc_renameat_trampoline_addr uintptr
1752
1753
1754
1755
1756
1757 func Revoke(path string) (err error) {
1758 var _p0 *byte
1759 _p0, err = BytePtrFromString(path)
1760 if err != nil {
1761 return
1762 }
1763 _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
1764 if e1 != 0 {
1765 err = errnoErr(e1)
1766 }
1767 return
1768 }
1769
1770 var libc_revoke_trampoline_addr uintptr
1771
1772
1773
1774
1775
1776 func Rmdir(path string) (err error) {
1777 var _p0 *byte
1778 _p0, err = BytePtrFromString(path)
1779 if err != nil {
1780 return
1781 }
1782 _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
1783 if e1 != 0 {
1784 err = errnoErr(e1)
1785 }
1786 return
1787 }
1788
1789 var libc_rmdir_trampoline_addr uintptr
1790
1791
1792
1793
1794
1795 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
1796 r0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
1797 newoffset = int64(int64(r1)<<32 | int64(r0))
1798 if e1 != 0 {
1799 err = errnoErr(e1)
1800 }
1801 return
1802 }
1803
1804 var libc_lseek_trampoline_addr uintptr
1805
1806
1807
1808
1809
1810 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
1811 r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
1812 n = int(r0)
1813 if e1 != 0 {
1814 err = errnoErr(e1)
1815 }
1816 return
1817 }
1818
1819 var libc_select_trampoline_addr uintptr
1820
1821
1822
1823
1824
1825 func Setegid(egid int) (err error) {
1826 _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
1827 if e1 != 0 {
1828 err = errnoErr(e1)
1829 }
1830 return
1831 }
1832
1833 var libc_setegid_trampoline_addr uintptr
1834
1835
1836
1837
1838
1839 func Seteuid(euid int) (err error) {
1840 _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
1841 if e1 != 0 {
1842 err = errnoErr(e1)
1843 }
1844 return
1845 }
1846
1847 var libc_seteuid_trampoline_addr uintptr
1848
1849
1850
1851
1852
1853 func Setgid(gid int) (err error) {
1854 _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
1855 if e1 != 0 {
1856 err = errnoErr(e1)
1857 }
1858 return
1859 }
1860
1861 var libc_setgid_trampoline_addr uintptr
1862
1863
1864
1865
1866
1867 func Setlogin(name string) (err error) {
1868 var _p0 *byte
1869 _p0, err = BytePtrFromString(name)
1870 if err != nil {
1871 return
1872 }
1873 _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
1874 if e1 != 0 {
1875 err = errnoErr(e1)
1876 }
1877 return
1878 }
1879
1880 var libc_setlogin_trampoline_addr uintptr
1881
1882
1883
1884
1885
1886 func Setpgid(pid int, pgid int) (err error) {
1887 _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
1888 if e1 != 0 {
1889 err = errnoErr(e1)
1890 }
1891 return
1892 }
1893
1894 var libc_setpgid_trampoline_addr uintptr
1895
1896
1897
1898
1899
1900 func Setpriority(which int, who int, prio int) (err error) {
1901 _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
1902 if e1 != 0 {
1903 err = errnoErr(e1)
1904 }
1905 return
1906 }
1907
1908 var libc_setpriority_trampoline_addr uintptr
1909
1910
1911
1912
1913
1914 func Setregid(rgid int, egid int) (err error) {
1915 _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
1916 if e1 != 0 {
1917 err = errnoErr(e1)
1918 }
1919 return
1920 }
1921
1922 var libc_setregid_trampoline_addr uintptr
1923
1924
1925
1926
1927
1928 func Setreuid(ruid int, euid int) (err error) {
1929 _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
1930 if e1 != 0 {
1931 err = errnoErr(e1)
1932 }
1933 return
1934 }
1935
1936 var libc_setreuid_trampoline_addr uintptr
1937
1938
1939
1940
1941
1942 func Setresgid(rgid int, egid int, sgid int) (err error) {
1943 _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
1944 if e1 != 0 {
1945 err = errnoErr(e1)
1946 }
1947 return
1948 }
1949
1950 var libc_setresgid_trampoline_addr uintptr
1951
1952
1953
1954
1955
1956 func Setresuid(ruid int, euid int, suid int) (err error) {
1957 _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
1958 if e1 != 0 {
1959 err = errnoErr(e1)
1960 }
1961 return
1962 }
1963
1964 var libc_setresuid_trampoline_addr uintptr
1965
1966
1967
1968
1969
1970 func Setrtable(rtable int) (err error) {
1971 _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
1972 if e1 != 0 {
1973 err = errnoErr(e1)
1974 }
1975 return
1976 }
1977
1978 var libc_setrtable_trampoline_addr uintptr
1979
1980
1981
1982
1983
1984 func Setsid() (pid int, err error) {
1985 r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
1986 pid = int(r0)
1987 if e1 != 0 {
1988 err = errnoErr(e1)
1989 }
1990 return
1991 }
1992
1993 var libc_setsid_trampoline_addr uintptr
1994
1995
1996
1997
1998
1999 func Settimeofday(tp *Timeval) (err error) {
2000 _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
2001 if e1 != 0 {
2002 err = errnoErr(e1)
2003 }
2004 return
2005 }
2006
2007 var libc_settimeofday_trampoline_addr uintptr
2008
2009
2010
2011
2012
2013 func Setuid(uid int) (err error) {
2014 _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
2015 if e1 != 0 {
2016 err = errnoErr(e1)
2017 }
2018 return
2019 }
2020
2021 var libc_setuid_trampoline_addr uintptr
2022
2023
2024
2025
2026
2027 func Stat(path string, stat *Stat_t) (err error) {
2028 var _p0 *byte
2029 _p0, err = BytePtrFromString(path)
2030 if err != nil {
2031 return
2032 }
2033 _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2034 if e1 != 0 {
2035 err = errnoErr(e1)
2036 }
2037 return
2038 }
2039
2040 var libc_stat_trampoline_addr uintptr
2041
2042
2043
2044
2045
2046 func Statfs(path string, stat *Statfs_t) (err error) {
2047 var _p0 *byte
2048 _p0, err = BytePtrFromString(path)
2049 if err != nil {
2050 return
2051 }
2052 _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2053 if e1 != 0 {
2054 err = errnoErr(e1)
2055 }
2056 return
2057 }
2058
2059 var libc_statfs_trampoline_addr uintptr
2060
2061
2062
2063
2064
2065 func Symlink(path string, link string) (err error) {
2066 var _p0 *byte
2067 _p0, err = BytePtrFromString(path)
2068 if err != nil {
2069 return
2070 }
2071 var _p1 *byte
2072 _p1, err = BytePtrFromString(link)
2073 if err != nil {
2074 return
2075 }
2076 _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2077 if e1 != 0 {
2078 err = errnoErr(e1)
2079 }
2080 return
2081 }
2082
2083 var libc_symlink_trampoline_addr uintptr
2084
2085
2086
2087
2088
2089 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
2090 var _p0 *byte
2091 _p0, err = BytePtrFromString(oldpath)
2092 if err != nil {
2093 return
2094 }
2095 var _p1 *byte
2096 _p1, err = BytePtrFromString(newpath)
2097 if err != nil {
2098 return
2099 }
2100 _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2101 if e1 != 0 {
2102 err = errnoErr(e1)
2103 }
2104 return
2105 }
2106
2107 var libc_symlinkat_trampoline_addr uintptr
2108
2109
2110
2111
2112
2113 func Sync() (err error) {
2114 _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
2115 if e1 != 0 {
2116 err = errnoErr(e1)
2117 }
2118 return
2119 }
2120
2121 var libc_sync_trampoline_addr uintptr
2122
2123
2124
2125
2126
2127 func Truncate(path string, length int64) (err error) {
2128 var _p0 *byte
2129 _p0, err = BytePtrFromString(path)
2130 if err != nil {
2131 return
2132 }
2133 _, _, e1 := syscall_syscall6(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
2134 if e1 != 0 {
2135 err = errnoErr(e1)
2136 }
2137 return
2138 }
2139
2140 var libc_truncate_trampoline_addr uintptr
2141
2142
2143
2144
2145
2146 func Umask(newmask int) (oldmask int) {
2147 r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
2148 oldmask = int(r0)
2149 return
2150 }
2151
2152 var libc_umask_trampoline_addr uintptr
2153
2154
2155
2156
2157
2158 func Unlink(path string) (err error) {
2159 var _p0 *byte
2160 _p0, err = BytePtrFromString(path)
2161 if err != nil {
2162 return
2163 }
2164 _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
2165 if e1 != 0 {
2166 err = errnoErr(e1)
2167 }
2168 return
2169 }
2170
2171 var libc_unlink_trampoline_addr uintptr
2172
2173
2174
2175
2176
2177 func Unlinkat(dirfd int, path string, flags int) (err error) {
2178 var _p0 *byte
2179 _p0, err = BytePtrFromString(path)
2180 if err != nil {
2181 return
2182 }
2183 _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2184 if e1 != 0 {
2185 err = errnoErr(e1)
2186 }
2187 return
2188 }
2189
2190 var libc_unlinkat_trampoline_addr uintptr
2191
2192
2193
2194
2195
2196 func Unmount(path string, flags int) (err error) {
2197 var _p0 *byte
2198 _p0, err = BytePtrFromString(path)
2199 if err != nil {
2200 return
2201 }
2202 _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2203 if e1 != 0 {
2204 err = errnoErr(e1)
2205 }
2206 return
2207 }
2208
2209 var libc_unmount_trampoline_addr uintptr
2210
2211
2212
2213
2214
2215 func write(fd int, p []byte) (n int, err error) {
2216 var _p0 unsafe.Pointer
2217 if len(p) > 0 {
2218 _p0 = unsafe.Pointer(&p[0])
2219 } else {
2220 _p0 = unsafe.Pointer(&_zero)
2221 }
2222 r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
2223 n = int(r0)
2224 if e1 != 0 {
2225 err = errnoErr(e1)
2226 }
2227 return
2228 }
2229
2230 var libc_write_trampoline_addr uintptr
2231
2232
2233
2234
2235
2236 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
2237 r0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
2238 ret = uintptr(r0)
2239 if e1 != 0 {
2240 err = errnoErr(e1)
2241 }
2242 return
2243 }
2244
2245 var libc_mmap_trampoline_addr uintptr
2246
2247
2248
2249
2250
2251 func munmap(addr uintptr, length uintptr) (err error) {
2252 _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
2253 if e1 != 0 {
2254 err = errnoErr(e1)
2255 }
2256 return
2257 }
2258
2259 var libc_munmap_trampoline_addr uintptr
2260
2261
2262
2263
2264
2265 func getfsstat(stat *Statfs_t, bufsize uintptr, flags int) (n int, err error) {
2266 r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(unsafe.Pointer(stat)), uintptr(bufsize), uintptr(flags))
2267 n = int(r0)
2268 if e1 != 0 {
2269 err = errnoErr(e1)
2270 }
2271 return
2272 }
2273
2274 var libc_getfsstat_trampoline_addr uintptr
2275
2276
2277
2278
2279
2280 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
2281 var _p0 *byte
2282 _p0, err = BytePtrFromString(path)
2283 if err != nil {
2284 return
2285 }
2286 _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
2287 if e1 != 0 {
2288 err = errnoErr(e1)
2289 }
2290 return
2291 }
2292
2293 var libc_utimensat_trampoline_addr uintptr
2294
2295
2296
2297
2298
2299 func pledge(promises *byte, execpromises *byte) (err error) {
2300 _, _, e1 := syscall_syscall(libc_pledge_trampoline_addr, uintptr(unsafe.Pointer(promises)), uintptr(unsafe.Pointer(execpromises)), 0)
2301 if e1 != 0 {
2302 err = errnoErr(e1)
2303 }
2304 return
2305 }
2306
2307 var libc_pledge_trampoline_addr uintptr
2308
2309
2310
2311
2312
2313 func unveil(path *byte, flags *byte) (err error) {
2314 _, _, e1 := syscall_syscall(libc_unveil_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(flags)), 0)
2315 if e1 != 0 {
2316 err = errnoErr(e1)
2317 }
2318 return
2319 }
2320
2321 var libc_unveil_trampoline_addr uintptr
2322
2323
2324
View as plain text