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 closedir(dir uintptr) (err error) {
466 _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
467 if e1 != 0 {
468 err = errnoErr(e1)
469 }
470 return
471 }
472
473 var libc_closedir_trampoline_addr uintptr
474
475
476
477
478
479 func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
480 r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
481 res = Errno(r0)
482 return
483 }
484
485 var libc_readdir_r_trampoline_addr uintptr
486
487
488
489
490
491 func pipe(p *[2]int32) (err error) {
492 _, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
493 if e1 != 0 {
494 err = errnoErr(e1)
495 }
496 return
497 }
498
499 var libc_pipe_trampoline_addr uintptr
500
501
502
503
504
505 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
506 var _p0 *byte
507 _p0, err = BytePtrFromString(path)
508 if err != nil {
509 return
510 }
511 var _p1 *byte
512 _p1, err = BytePtrFromString(attr)
513 if err != nil {
514 return
515 }
516 r0, _, e1 := syscall_syscall6(libc_getxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
517 sz = int(r0)
518 if e1 != 0 {
519 err = errnoErr(e1)
520 }
521 return
522 }
523
524 var libc_getxattr_trampoline_addr uintptr
525
526
527
528
529
530 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) {
531 var _p0 *byte
532 _p0, err = BytePtrFromString(attr)
533 if err != nil {
534 return
535 }
536 r0, _, e1 := syscall_syscall6(libc_fgetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options))
537 sz = int(r0)
538 if e1 != 0 {
539 err = errnoErr(e1)
540 }
541 return
542 }
543
544 var libc_fgetxattr_trampoline_addr uintptr
545
546
547
548
549
550 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) {
551 var _p0 *byte
552 _p0, err = BytePtrFromString(path)
553 if err != nil {
554 return
555 }
556 var _p1 *byte
557 _p1, err = BytePtrFromString(attr)
558 if err != nil {
559 return
560 }
561 _, _, e1 := syscall_syscall6(libc_setxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
562 if e1 != 0 {
563 err = errnoErr(e1)
564 }
565 return
566 }
567
568 var libc_setxattr_trampoline_addr uintptr
569
570
571
572
573
574 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) {
575 var _p0 *byte
576 _p0, err = BytePtrFromString(attr)
577 if err != nil {
578 return
579 }
580 _, _, e1 := syscall_syscall6(libc_fsetxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options))
581 if e1 != 0 {
582 err = errnoErr(e1)
583 }
584 return
585 }
586
587 var libc_fsetxattr_trampoline_addr uintptr
588
589
590
591
592
593 func removexattr(path string, attr string, options int) (err error) {
594 var _p0 *byte
595 _p0, err = BytePtrFromString(path)
596 if err != nil {
597 return
598 }
599 var _p1 *byte
600 _p1, err = BytePtrFromString(attr)
601 if err != nil {
602 return
603 }
604 _, _, e1 := syscall_syscall(libc_removexattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
605 if e1 != 0 {
606 err = errnoErr(e1)
607 }
608 return
609 }
610
611 var libc_removexattr_trampoline_addr uintptr
612
613
614
615
616
617 func fremovexattr(fd int, attr string, options int) (err error) {
618 var _p0 *byte
619 _p0, err = BytePtrFromString(attr)
620 if err != nil {
621 return
622 }
623 _, _, e1 := syscall_syscall(libc_fremovexattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options))
624 if e1 != 0 {
625 err = errnoErr(e1)
626 }
627 return
628 }
629
630 var libc_fremovexattr_trampoline_addr uintptr
631
632
633
634
635
636 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) {
637 var _p0 *byte
638 _p0, err = BytePtrFromString(path)
639 if err != nil {
640 return
641 }
642 r0, _, e1 := syscall_syscall6(libc_listxattr_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
643 sz = int(r0)
644 if e1 != 0 {
645 err = errnoErr(e1)
646 }
647 return
648 }
649
650 var libc_listxattr_trampoline_addr uintptr
651
652
653
654
655
656 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) {
657 r0, _, e1 := syscall_syscall6(libc_flistxattr_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0)
658 sz = int(r0)
659 if e1 != 0 {
660 err = errnoErr(e1)
661 }
662 return
663 }
664
665 var libc_flistxattr_trampoline_addr uintptr
666
667
668
669
670
671 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
672 var _p0 *byte
673 _p0, err = BytePtrFromString(path)
674 if err != nil {
675 return
676 }
677 _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
678 if e1 != 0 {
679 err = errnoErr(e1)
680 }
681 return
682 }
683
684 var libc_utimensat_trampoline_addr uintptr
685
686
687
688
689
690 func fcntl(fd int, cmd int, arg int) (val int, err error) {
691 r0, _, e1 := syscall_syscall(libc_fcntl_trampoline_addr, uintptr(fd), uintptr(cmd), uintptr(arg))
692 val = int(r0)
693 if e1 != 0 {
694 err = errnoErr(e1)
695 }
696 return
697 }
698
699 var libc_fcntl_trampoline_addr uintptr
700
701
702
703
704
705 func kill(pid int, signum int, posix int) (err error) {
706 _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), uintptr(posix))
707 if e1 != 0 {
708 err = errnoErr(e1)
709 }
710 return
711 }
712
713 var libc_kill_trampoline_addr uintptr
714
715
716
717
718
719 func ioctl(fd int, req uint, arg uintptr) (err error) {
720 _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
721 if e1 != 0 {
722 err = errnoErr(e1)
723 }
724 return
725 }
726
727 var libc_ioctl_trampoline_addr uintptr
728
729
730
731
732
733 func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) {
734 _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
735 if e1 != 0 {
736 err = errnoErr(e1)
737 }
738 return
739 }
740
741
742
743 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
744 var _p0 unsafe.Pointer
745 if len(mib) > 0 {
746 _p0 = unsafe.Pointer(&mib[0])
747 } else {
748 _p0 = unsafe.Pointer(&_zero)
749 }
750 _, _, 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))
751 if e1 != 0 {
752 err = errnoErr(e1)
753 }
754 return
755 }
756
757 var libc_sysctl_trampoline_addr uintptr
758
759
760
761
762
763 func pthread_chdir_np(path string) (err error) {
764 var _p0 *byte
765 _p0, err = BytePtrFromString(path)
766 if err != nil {
767 return
768 }
769 _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
770 if e1 != 0 {
771 err = errnoErr(e1)
772 }
773 return
774 }
775
776 var libc_pthread_chdir_np_trampoline_addr uintptr
777
778
779
780
781
782 func pthread_fchdir_np(fd int) (err error) {
783 _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0)
784 if e1 != 0 {
785 err = errnoErr(e1)
786 }
787 return
788 }
789
790 var libc_pthread_fchdir_np_trampoline_addr uintptr
791
792
793
794
795
796 func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) {
797 _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags))
798 if e1 != 0 {
799 err = errnoErr(e1)
800 }
801 return
802 }
803
804 var libc_sendfile_trampoline_addr uintptr
805
806
807
808
809
810 func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
811 r0, _, e1 := syscall_syscall(libc_shmat_trampoline_addr, uintptr(id), uintptr(addr), uintptr(flag))
812 ret = uintptr(r0)
813 if e1 != 0 {
814 err = errnoErr(e1)
815 }
816 return
817 }
818
819 var libc_shmat_trampoline_addr uintptr
820
821
822
823
824
825 func shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error) {
826 r0, _, e1 := syscall_syscall(libc_shmctl_trampoline_addr, uintptr(id), uintptr(cmd), uintptr(unsafe.Pointer(buf)))
827 result = int(r0)
828 if e1 != 0 {
829 err = errnoErr(e1)
830 }
831 return
832 }
833
834 var libc_shmctl_trampoline_addr uintptr
835
836
837
838
839
840 func shmdt(addr uintptr) (err error) {
841 _, _, e1 := syscall_syscall(libc_shmdt_trampoline_addr, uintptr(addr), 0, 0)
842 if e1 != 0 {
843 err = errnoErr(e1)
844 }
845 return
846 }
847
848 var libc_shmdt_trampoline_addr uintptr
849
850
851
852
853
854 func shmget(key int, size int, flag int) (id int, err error) {
855 r0, _, e1 := syscall_syscall(libc_shmget_trampoline_addr, uintptr(key), uintptr(size), uintptr(flag))
856 id = int(r0)
857 if e1 != 0 {
858 err = errnoErr(e1)
859 }
860 return
861 }
862
863 var libc_shmget_trampoline_addr uintptr
864
865
866
867
868
869 func Access(path string, mode uint32) (err error) {
870 var _p0 *byte
871 _p0, err = BytePtrFromString(path)
872 if err != nil {
873 return
874 }
875 _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
876 if e1 != 0 {
877 err = errnoErr(e1)
878 }
879 return
880 }
881
882 var libc_access_trampoline_addr uintptr
883
884
885
886
887
888 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
889 _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
890 if e1 != 0 {
891 err = errnoErr(e1)
892 }
893 return
894 }
895
896 var libc_adjtime_trampoline_addr uintptr
897
898
899
900
901
902 func Chdir(path string) (err error) {
903 var _p0 *byte
904 _p0, err = BytePtrFromString(path)
905 if err != nil {
906 return
907 }
908 _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
909 if e1 != 0 {
910 err = errnoErr(e1)
911 }
912 return
913 }
914
915 var libc_chdir_trampoline_addr uintptr
916
917
918
919
920
921 func Chflags(path string, flags int) (err error) {
922 var _p0 *byte
923 _p0, err = BytePtrFromString(path)
924 if err != nil {
925 return
926 }
927 _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
928 if e1 != 0 {
929 err = errnoErr(e1)
930 }
931 return
932 }
933
934 var libc_chflags_trampoline_addr uintptr
935
936
937
938
939
940 func Chmod(path string, mode uint32) (err error) {
941 var _p0 *byte
942 _p0, err = BytePtrFromString(path)
943 if err != nil {
944 return
945 }
946 _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
947 if e1 != 0 {
948 err = errnoErr(e1)
949 }
950 return
951 }
952
953 var libc_chmod_trampoline_addr uintptr
954
955
956
957
958
959 func Chown(path string, uid int, gid int) (err error) {
960 var _p0 *byte
961 _p0, err = BytePtrFromString(path)
962 if err != nil {
963 return
964 }
965 _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
966 if e1 != 0 {
967 err = errnoErr(e1)
968 }
969 return
970 }
971
972 var libc_chown_trampoline_addr uintptr
973
974
975
976
977
978 func Chroot(path string) (err error) {
979 var _p0 *byte
980 _p0, err = BytePtrFromString(path)
981 if err != nil {
982 return
983 }
984 _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
985 if e1 != 0 {
986 err = errnoErr(e1)
987 }
988 return
989 }
990
991 var libc_chroot_trampoline_addr uintptr
992
993
994
995
996
997 func ClockGettime(clockid int32, time *Timespec) (err error) {
998 _, _, e1 := syscall_syscall(libc_clock_gettime_trampoline_addr, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
999 if e1 != 0 {
1000 err = errnoErr(e1)
1001 }
1002 return
1003 }
1004
1005 var libc_clock_gettime_trampoline_addr uintptr
1006
1007
1008
1009
1010
1011 func Close(fd int) (err error) {
1012 _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
1013 if e1 != 0 {
1014 err = errnoErr(e1)
1015 }
1016 return
1017 }
1018
1019 var libc_close_trampoline_addr uintptr
1020
1021
1022
1023
1024
1025 func Clonefile(src string, dst string, flags int) (err error) {
1026 var _p0 *byte
1027 _p0, err = BytePtrFromString(src)
1028 if err != nil {
1029 return
1030 }
1031 var _p1 *byte
1032 _p1, err = BytePtrFromString(dst)
1033 if err != nil {
1034 return
1035 }
1036 _, _, e1 := syscall_syscall(libc_clonefile_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags))
1037 if e1 != 0 {
1038 err = errnoErr(e1)
1039 }
1040 return
1041 }
1042
1043 var libc_clonefile_trampoline_addr uintptr
1044
1045
1046
1047
1048
1049 func Clonefileat(srcDirfd int, src string, dstDirfd int, dst string, flags int) (err error) {
1050 var _p0 *byte
1051 _p0, err = BytePtrFromString(src)
1052 if err != nil {
1053 return
1054 }
1055 var _p1 *byte
1056 _p1, err = BytePtrFromString(dst)
1057 if err != nil {
1058 return
1059 }
1060 _, _, e1 := syscall_syscall6(libc_clonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1061 if e1 != 0 {
1062 err = errnoErr(e1)
1063 }
1064 return
1065 }
1066
1067 var libc_clonefileat_trampoline_addr uintptr
1068
1069
1070
1071
1072
1073 func Dup(fd int) (nfd int, err error) {
1074 r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
1075 nfd = int(r0)
1076 if e1 != 0 {
1077 err = errnoErr(e1)
1078 }
1079 return
1080 }
1081
1082 var libc_dup_trampoline_addr uintptr
1083
1084
1085
1086
1087
1088 func Dup2(from int, to int) (err error) {
1089 _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
1090 if e1 != 0 {
1091 err = errnoErr(e1)
1092 }
1093 return
1094 }
1095
1096 var libc_dup2_trampoline_addr uintptr
1097
1098
1099
1100
1101
1102 func Exchangedata(path1 string, path2 string, options int) (err error) {
1103 var _p0 *byte
1104 _p0, err = BytePtrFromString(path1)
1105 if err != nil {
1106 return
1107 }
1108 var _p1 *byte
1109 _p1, err = BytePtrFromString(path2)
1110 if err != nil {
1111 return
1112 }
1113 _, _, e1 := syscall_syscall(libc_exchangedata_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options))
1114 if e1 != 0 {
1115 err = errnoErr(e1)
1116 }
1117 return
1118 }
1119
1120 var libc_exchangedata_trampoline_addr uintptr
1121
1122
1123
1124
1125
1126 func Exit(code int) {
1127 syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
1128 return
1129 }
1130
1131 var libc_exit_trampoline_addr uintptr
1132
1133
1134
1135
1136
1137 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
1138 var _p0 *byte
1139 _p0, err = BytePtrFromString(path)
1140 if err != nil {
1141 return
1142 }
1143 _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1144 if e1 != 0 {
1145 err = errnoErr(e1)
1146 }
1147 return
1148 }
1149
1150 var libc_faccessat_trampoline_addr uintptr
1151
1152
1153
1154
1155
1156 func Fchdir(fd int) (err error) {
1157 _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
1158 if e1 != 0 {
1159 err = errnoErr(e1)
1160 }
1161 return
1162 }
1163
1164 var libc_fchdir_trampoline_addr uintptr
1165
1166
1167
1168
1169
1170 func Fchflags(fd int, flags int) (err error) {
1171 _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
1172 if e1 != 0 {
1173 err = errnoErr(e1)
1174 }
1175 return
1176 }
1177
1178 var libc_fchflags_trampoline_addr uintptr
1179
1180
1181
1182
1183
1184 func Fchmod(fd int, mode uint32) (err error) {
1185 _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
1186 if e1 != 0 {
1187 err = errnoErr(e1)
1188 }
1189 return
1190 }
1191
1192 var libc_fchmod_trampoline_addr uintptr
1193
1194
1195
1196
1197
1198 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
1199 var _p0 *byte
1200 _p0, err = BytePtrFromString(path)
1201 if err != nil {
1202 return
1203 }
1204 _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
1205 if e1 != 0 {
1206 err = errnoErr(e1)
1207 }
1208 return
1209 }
1210
1211 var libc_fchmodat_trampoline_addr uintptr
1212
1213
1214
1215
1216
1217 func Fchown(fd int, uid int, gid int) (err error) {
1218 _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
1219 if e1 != 0 {
1220 err = errnoErr(e1)
1221 }
1222 return
1223 }
1224
1225 var libc_fchown_trampoline_addr uintptr
1226
1227
1228
1229
1230
1231 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
1232 var _p0 *byte
1233 _p0, err = BytePtrFromString(path)
1234 if err != nil {
1235 return
1236 }
1237 _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
1238 if e1 != 0 {
1239 err = errnoErr(e1)
1240 }
1241 return
1242 }
1243
1244 var libc_fchownat_trampoline_addr uintptr
1245
1246
1247
1248
1249
1250 func Fclonefileat(srcDirfd int, dstDirfd int, dst string, flags int) (err error) {
1251 var _p0 *byte
1252 _p0, err = BytePtrFromString(dst)
1253 if err != nil {
1254 return
1255 }
1256 _, _, e1 := syscall_syscall6(libc_fclonefileat_trampoline_addr, uintptr(srcDirfd), uintptr(dstDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0, 0)
1257 if e1 != 0 {
1258 err = errnoErr(e1)
1259 }
1260 return
1261 }
1262
1263 var libc_fclonefileat_trampoline_addr uintptr
1264
1265
1266
1267
1268
1269 func Flock(fd int, how int) (err error) {
1270 _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
1271 if e1 != 0 {
1272 err = errnoErr(e1)
1273 }
1274 return
1275 }
1276
1277 var libc_flock_trampoline_addr uintptr
1278
1279
1280
1281
1282
1283 func Fpathconf(fd int, name int) (val int, err error) {
1284 r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
1285 val = int(r0)
1286 if e1 != 0 {
1287 err = errnoErr(e1)
1288 }
1289 return
1290 }
1291
1292 var libc_fpathconf_trampoline_addr uintptr
1293
1294
1295
1296
1297
1298 func Fsync(fd int) (err error) {
1299 _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
1300 if e1 != 0 {
1301 err = errnoErr(e1)
1302 }
1303 return
1304 }
1305
1306 var libc_fsync_trampoline_addr uintptr
1307
1308
1309
1310
1311
1312 func Ftruncate(fd int, length int64) (err error) {
1313 _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
1314 if e1 != 0 {
1315 err = errnoErr(e1)
1316 }
1317 return
1318 }
1319
1320 var libc_ftruncate_trampoline_addr uintptr
1321
1322
1323
1324
1325
1326 func Getcwd(buf []byte) (n int, err error) {
1327 var _p0 unsafe.Pointer
1328 if len(buf) > 0 {
1329 _p0 = unsafe.Pointer(&buf[0])
1330 } else {
1331 _p0 = unsafe.Pointer(&_zero)
1332 }
1333 r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
1334 n = int(r0)
1335 if e1 != 0 {
1336 err = errnoErr(e1)
1337 }
1338 return
1339 }
1340
1341 var libc_getcwd_trampoline_addr uintptr
1342
1343
1344
1345
1346
1347 func Getdtablesize() (size int) {
1348 r0, _, _ := syscall_syscall(libc_getdtablesize_trampoline_addr, 0, 0, 0)
1349 size = int(r0)
1350 return
1351 }
1352
1353 var libc_getdtablesize_trampoline_addr uintptr
1354
1355
1356
1357
1358
1359 func Getegid() (egid int) {
1360 r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
1361 egid = int(r0)
1362 return
1363 }
1364
1365 var libc_getegid_trampoline_addr uintptr
1366
1367
1368
1369
1370
1371 func Geteuid() (uid int) {
1372 r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
1373 uid = int(r0)
1374 return
1375 }
1376
1377 var libc_geteuid_trampoline_addr uintptr
1378
1379
1380
1381
1382
1383 func Getgid() (gid int) {
1384 r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
1385 gid = int(r0)
1386 return
1387 }
1388
1389 var libc_getgid_trampoline_addr uintptr
1390
1391
1392
1393
1394
1395 func Getpgid(pid int) (pgid int, err error) {
1396 r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
1397 pgid = int(r0)
1398 if e1 != 0 {
1399 err = errnoErr(e1)
1400 }
1401 return
1402 }
1403
1404 var libc_getpgid_trampoline_addr uintptr
1405
1406
1407
1408
1409
1410 func Getpgrp() (pgrp int) {
1411 r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
1412 pgrp = int(r0)
1413 return
1414 }
1415
1416 var libc_getpgrp_trampoline_addr uintptr
1417
1418
1419
1420
1421
1422 func Getpid() (pid int) {
1423 r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
1424 pid = int(r0)
1425 return
1426 }
1427
1428 var libc_getpid_trampoline_addr uintptr
1429
1430
1431
1432
1433
1434 func Getppid() (ppid int) {
1435 r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
1436 ppid = int(r0)
1437 return
1438 }
1439
1440 var libc_getppid_trampoline_addr uintptr
1441
1442
1443
1444
1445
1446 func Getpriority(which int, who int) (prio int, err error) {
1447 r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
1448 prio = int(r0)
1449 if e1 != 0 {
1450 err = errnoErr(e1)
1451 }
1452 return
1453 }
1454
1455 var libc_getpriority_trampoline_addr uintptr
1456
1457
1458
1459
1460
1461 func Getrlimit(which int, lim *Rlimit) (err error) {
1462 _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
1463 if e1 != 0 {
1464 err = errnoErr(e1)
1465 }
1466 return
1467 }
1468
1469 var libc_getrlimit_trampoline_addr uintptr
1470
1471
1472
1473
1474
1475 func Getrusage(who int, rusage *Rusage) (err error) {
1476 _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
1477 if e1 != 0 {
1478 err = errnoErr(e1)
1479 }
1480 return
1481 }
1482
1483 var libc_getrusage_trampoline_addr uintptr
1484
1485
1486
1487
1488
1489 func Getsid(pid int) (sid int, err error) {
1490 r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
1491 sid = int(r0)
1492 if e1 != 0 {
1493 err = errnoErr(e1)
1494 }
1495 return
1496 }
1497
1498 var libc_getsid_trampoline_addr uintptr
1499
1500
1501
1502
1503
1504 func Gettimeofday(tp *Timeval) (err error) {
1505 _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
1506 if e1 != 0 {
1507 err = errnoErr(e1)
1508 }
1509 return
1510 }
1511
1512 var libc_gettimeofday_trampoline_addr uintptr
1513
1514
1515
1516
1517
1518 func Getuid() (uid int) {
1519 r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
1520 uid = int(r0)
1521 return
1522 }
1523
1524 var libc_getuid_trampoline_addr uintptr
1525
1526
1527
1528
1529
1530 func Issetugid() (tainted bool) {
1531 r0, _, _ := syscall_rawSyscall(libc_issetugid_trampoline_addr, 0, 0, 0)
1532 tainted = bool(r0 != 0)
1533 return
1534 }
1535
1536 var libc_issetugid_trampoline_addr uintptr
1537
1538
1539
1540
1541
1542 func Kqueue() (fd int, err error) {
1543 r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
1544 fd = int(r0)
1545 if e1 != 0 {
1546 err = errnoErr(e1)
1547 }
1548 return
1549 }
1550
1551 var libc_kqueue_trampoline_addr uintptr
1552
1553
1554
1555
1556
1557 func Lchown(path string, uid int, gid int) (err error) {
1558 var _p0 *byte
1559 _p0, err = BytePtrFromString(path)
1560 if err != nil {
1561 return
1562 }
1563 _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
1564 if e1 != 0 {
1565 err = errnoErr(e1)
1566 }
1567 return
1568 }
1569
1570 var libc_lchown_trampoline_addr uintptr
1571
1572
1573
1574
1575
1576 func Link(path string, link string) (err error) {
1577 var _p0 *byte
1578 _p0, err = BytePtrFromString(path)
1579 if err != nil {
1580 return
1581 }
1582 var _p1 *byte
1583 _p1, err = BytePtrFromString(link)
1584 if err != nil {
1585 return
1586 }
1587 _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1588 if e1 != 0 {
1589 err = errnoErr(e1)
1590 }
1591 return
1592 }
1593
1594 var libc_link_trampoline_addr uintptr
1595
1596
1597
1598
1599
1600 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
1601 var _p0 *byte
1602 _p0, err = BytePtrFromString(path)
1603 if err != nil {
1604 return
1605 }
1606 var _p1 *byte
1607 _p1, err = BytePtrFromString(link)
1608 if err != nil {
1609 return
1610 }
1611 _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
1612 if e1 != 0 {
1613 err = errnoErr(e1)
1614 }
1615 return
1616 }
1617
1618 var libc_linkat_trampoline_addr uintptr
1619
1620
1621
1622
1623
1624 func Listen(s int, backlog int) (err error) {
1625 _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
1626 if e1 != 0 {
1627 err = errnoErr(e1)
1628 }
1629 return
1630 }
1631
1632 var libc_listen_trampoline_addr uintptr
1633
1634
1635
1636
1637
1638 func Mkdir(path string, mode uint32) (err error) {
1639 var _p0 *byte
1640 _p0, err = BytePtrFromString(path)
1641 if err != nil {
1642 return
1643 }
1644 _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1645 if e1 != 0 {
1646 err = errnoErr(e1)
1647 }
1648 return
1649 }
1650
1651 var libc_mkdir_trampoline_addr uintptr
1652
1653
1654
1655
1656
1657 func Mkdirat(dirfd int, path string, mode uint32) (err error) {
1658 var _p0 *byte
1659 _p0, err = BytePtrFromString(path)
1660 if err != nil {
1661 return
1662 }
1663 _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
1664 if e1 != 0 {
1665 err = errnoErr(e1)
1666 }
1667 return
1668 }
1669
1670 var libc_mkdirat_trampoline_addr uintptr
1671
1672
1673
1674
1675
1676 func Mkfifo(path string, mode uint32) (err error) {
1677 var _p0 *byte
1678 _p0, err = BytePtrFromString(path)
1679 if err != nil {
1680 return
1681 }
1682 _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
1683 if e1 != 0 {
1684 err = errnoErr(e1)
1685 }
1686 return
1687 }
1688
1689 var libc_mkfifo_trampoline_addr uintptr
1690
1691
1692
1693
1694
1695 func Mknod(path string, mode uint32, dev int) (err error) {
1696 var _p0 *byte
1697 _p0, err = BytePtrFromString(path)
1698 if err != nil {
1699 return
1700 }
1701 _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
1702 if e1 != 0 {
1703 err = errnoErr(e1)
1704 }
1705 return
1706 }
1707
1708 var libc_mknod_trampoline_addr uintptr
1709
1710
1711
1712
1713
1714 func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
1715 var _p0 *byte
1716 _p0, err = BytePtrFromString(fsType)
1717 if err != nil {
1718 return
1719 }
1720 var _p1 *byte
1721 _p1, err = BytePtrFromString(dir)
1722 if err != nil {
1723 return
1724 }
1725 _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
1726 if e1 != 0 {
1727 err = errnoErr(e1)
1728 }
1729 return
1730 }
1731
1732 var libc_mount_trampoline_addr uintptr
1733
1734
1735
1736
1737
1738 func Open(path string, mode int, perm uint32) (fd int, err error) {
1739 var _p0 *byte
1740 _p0, err = BytePtrFromString(path)
1741 if err != nil {
1742 return
1743 }
1744 r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
1745 fd = int(r0)
1746 if e1 != 0 {
1747 err = errnoErr(e1)
1748 }
1749 return
1750 }
1751
1752 var libc_open_trampoline_addr uintptr
1753
1754
1755
1756
1757
1758 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
1759 var _p0 *byte
1760 _p0, err = BytePtrFromString(path)
1761 if err != nil {
1762 return
1763 }
1764 r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
1765 fd = int(r0)
1766 if e1 != 0 {
1767 err = errnoErr(e1)
1768 }
1769 return
1770 }
1771
1772 var libc_openat_trampoline_addr uintptr
1773
1774
1775
1776
1777
1778 func Pathconf(path string, name int) (val int, err error) {
1779 var _p0 *byte
1780 _p0, err = BytePtrFromString(path)
1781 if err != nil {
1782 return
1783 }
1784 r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
1785 val = int(r0)
1786 if e1 != 0 {
1787 err = errnoErr(e1)
1788 }
1789 return
1790 }
1791
1792 var libc_pathconf_trampoline_addr uintptr
1793
1794
1795
1796
1797
1798 func pread(fd int, p []byte, offset int64) (n int, err error) {
1799 var _p0 unsafe.Pointer
1800 if len(p) > 0 {
1801 _p0 = unsafe.Pointer(&p[0])
1802 } else {
1803 _p0 = unsafe.Pointer(&_zero)
1804 }
1805 r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1806 n = int(r0)
1807 if e1 != 0 {
1808 err = errnoErr(e1)
1809 }
1810 return
1811 }
1812
1813 var libc_pread_trampoline_addr uintptr
1814
1815
1816
1817
1818
1819 func pwrite(fd int, p []byte, offset int64) (n int, err error) {
1820 var _p0 unsafe.Pointer
1821 if len(p) > 0 {
1822 _p0 = unsafe.Pointer(&p[0])
1823 } else {
1824 _p0 = unsafe.Pointer(&_zero)
1825 }
1826 r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
1827 n = int(r0)
1828 if e1 != 0 {
1829 err = errnoErr(e1)
1830 }
1831 return
1832 }
1833
1834 var libc_pwrite_trampoline_addr uintptr
1835
1836
1837
1838
1839
1840 func read(fd int, p []byte) (n int, err error) {
1841 var _p0 unsafe.Pointer
1842 if len(p) > 0 {
1843 _p0 = unsafe.Pointer(&p[0])
1844 } else {
1845 _p0 = unsafe.Pointer(&_zero)
1846 }
1847 r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
1848 n = int(r0)
1849 if e1 != 0 {
1850 err = errnoErr(e1)
1851 }
1852 return
1853 }
1854
1855 var libc_read_trampoline_addr uintptr
1856
1857
1858
1859
1860
1861 func Readlink(path string, buf []byte) (n int, err error) {
1862 var _p0 *byte
1863 _p0, err = BytePtrFromString(path)
1864 if err != nil {
1865 return
1866 }
1867 var _p1 unsafe.Pointer
1868 if len(buf) > 0 {
1869 _p1 = unsafe.Pointer(&buf[0])
1870 } else {
1871 _p1 = unsafe.Pointer(&_zero)
1872 }
1873 r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
1874 n = int(r0)
1875 if e1 != 0 {
1876 err = errnoErr(e1)
1877 }
1878 return
1879 }
1880
1881 var libc_readlink_trampoline_addr uintptr
1882
1883
1884
1885
1886
1887 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
1888 var _p0 *byte
1889 _p0, err = BytePtrFromString(path)
1890 if err != nil {
1891 return
1892 }
1893 var _p1 unsafe.Pointer
1894 if len(buf) > 0 {
1895 _p1 = unsafe.Pointer(&buf[0])
1896 } else {
1897 _p1 = unsafe.Pointer(&_zero)
1898 }
1899 r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
1900 n = int(r0)
1901 if e1 != 0 {
1902 err = errnoErr(e1)
1903 }
1904 return
1905 }
1906
1907 var libc_readlinkat_trampoline_addr uintptr
1908
1909
1910
1911
1912
1913 func Rename(from string, to string) (err error) {
1914 var _p0 *byte
1915 _p0, err = BytePtrFromString(from)
1916 if err != nil {
1917 return
1918 }
1919 var _p1 *byte
1920 _p1, err = BytePtrFromString(to)
1921 if err != nil {
1922 return
1923 }
1924 _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
1925 if e1 != 0 {
1926 err = errnoErr(e1)
1927 }
1928 return
1929 }
1930
1931 var libc_rename_trampoline_addr uintptr
1932
1933
1934
1935
1936
1937 func Renameat(fromfd int, from string, tofd int, to string) (err error) {
1938 var _p0 *byte
1939 _p0, err = BytePtrFromString(from)
1940 if err != nil {
1941 return
1942 }
1943 var _p1 *byte
1944 _p1, err = BytePtrFromString(to)
1945 if err != nil {
1946 return
1947 }
1948 _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
1949 if e1 != 0 {
1950 err = errnoErr(e1)
1951 }
1952 return
1953 }
1954
1955 var libc_renameat_trampoline_addr uintptr
1956
1957
1958
1959
1960
1961 func Revoke(path string) (err error) {
1962 var _p0 *byte
1963 _p0, err = BytePtrFromString(path)
1964 if err != nil {
1965 return
1966 }
1967 _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
1968 if e1 != 0 {
1969 err = errnoErr(e1)
1970 }
1971 return
1972 }
1973
1974 var libc_revoke_trampoline_addr uintptr
1975
1976
1977
1978
1979
1980 func Rmdir(path string) (err error) {
1981 var _p0 *byte
1982 _p0, err = BytePtrFromString(path)
1983 if err != nil {
1984 return
1985 }
1986 _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
1987 if e1 != 0 {
1988 err = errnoErr(e1)
1989 }
1990 return
1991 }
1992
1993 var libc_rmdir_trampoline_addr uintptr
1994
1995
1996
1997
1998
1999 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
2000 r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
2001 newoffset = int64(r0)
2002 if e1 != 0 {
2003 err = errnoErr(e1)
2004 }
2005 return
2006 }
2007
2008 var libc_lseek_trampoline_addr uintptr
2009
2010
2011
2012
2013
2014 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
2015 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)
2016 n = int(r0)
2017 if e1 != 0 {
2018 err = errnoErr(e1)
2019 }
2020 return
2021 }
2022
2023 var libc_select_trampoline_addr uintptr
2024
2025
2026
2027
2028
2029 func Setattrlist(path string, attrlist *Attrlist, attrBuf []byte, options int) (err error) {
2030 var _p0 *byte
2031 _p0, err = BytePtrFromString(path)
2032 if err != nil {
2033 return
2034 }
2035 var _p1 unsafe.Pointer
2036 if len(attrBuf) > 0 {
2037 _p1 = unsafe.Pointer(&attrBuf[0])
2038 } else {
2039 _p1 = unsafe.Pointer(&_zero)
2040 }
2041 _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(attrlist)), uintptr(_p1), uintptr(len(attrBuf)), uintptr(options), 0)
2042 if e1 != 0 {
2043 err = errnoErr(e1)
2044 }
2045 return
2046 }
2047
2048 var libc_setattrlist_trampoline_addr uintptr
2049
2050
2051
2052
2053
2054 func Setegid(egid int) (err error) {
2055 _, _, e1 := syscall_syscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
2056 if e1 != 0 {
2057 err = errnoErr(e1)
2058 }
2059 return
2060 }
2061
2062 var libc_setegid_trampoline_addr uintptr
2063
2064
2065
2066
2067
2068 func Seteuid(euid int) (err error) {
2069 _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
2070 if e1 != 0 {
2071 err = errnoErr(e1)
2072 }
2073 return
2074 }
2075
2076 var libc_seteuid_trampoline_addr uintptr
2077
2078
2079
2080
2081
2082 func Setgid(gid int) (err error) {
2083 _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
2084 if e1 != 0 {
2085 err = errnoErr(e1)
2086 }
2087 return
2088 }
2089
2090 var libc_setgid_trampoline_addr uintptr
2091
2092
2093
2094
2095
2096 func Setlogin(name string) (err error) {
2097 var _p0 *byte
2098 _p0, err = BytePtrFromString(name)
2099 if err != nil {
2100 return
2101 }
2102 _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
2103 if e1 != 0 {
2104 err = errnoErr(e1)
2105 }
2106 return
2107 }
2108
2109 var libc_setlogin_trampoline_addr uintptr
2110
2111
2112
2113
2114
2115 func Setpgid(pid int, pgid int) (err error) {
2116 _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
2117 if e1 != 0 {
2118 err = errnoErr(e1)
2119 }
2120 return
2121 }
2122
2123 var libc_setpgid_trampoline_addr uintptr
2124
2125
2126
2127
2128
2129 func Setpriority(which int, who int, prio int) (err error) {
2130 _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
2131 if e1 != 0 {
2132 err = errnoErr(e1)
2133 }
2134 return
2135 }
2136
2137 var libc_setpriority_trampoline_addr uintptr
2138
2139
2140
2141
2142
2143 func Setprivexec(flag int) (err error) {
2144 _, _, e1 := syscall_syscall(libc_setprivexec_trampoline_addr, uintptr(flag), 0, 0)
2145 if e1 != 0 {
2146 err = errnoErr(e1)
2147 }
2148 return
2149 }
2150
2151 var libc_setprivexec_trampoline_addr uintptr
2152
2153
2154
2155
2156
2157 func Setregid(rgid int, egid int) (err error) {
2158 _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
2159 if e1 != 0 {
2160 err = errnoErr(e1)
2161 }
2162 return
2163 }
2164
2165 var libc_setregid_trampoline_addr uintptr
2166
2167
2168
2169
2170
2171 func Setreuid(ruid int, euid int) (err error) {
2172 _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
2173 if e1 != 0 {
2174 err = errnoErr(e1)
2175 }
2176 return
2177 }
2178
2179 var libc_setreuid_trampoline_addr uintptr
2180
2181
2182
2183
2184
2185 func Setsid() (pid int, err error) {
2186 r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
2187 pid = int(r0)
2188 if e1 != 0 {
2189 err = errnoErr(e1)
2190 }
2191 return
2192 }
2193
2194 var libc_setsid_trampoline_addr uintptr
2195
2196
2197
2198
2199
2200 func Settimeofday(tp *Timeval) (err error) {
2201 _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
2202 if e1 != 0 {
2203 err = errnoErr(e1)
2204 }
2205 return
2206 }
2207
2208 var libc_settimeofday_trampoline_addr uintptr
2209
2210
2211
2212
2213
2214 func Setuid(uid int) (err error) {
2215 _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
2216 if e1 != 0 {
2217 err = errnoErr(e1)
2218 }
2219 return
2220 }
2221
2222 var libc_setuid_trampoline_addr uintptr
2223
2224
2225
2226
2227
2228 func Symlink(path string, link string) (err error) {
2229 var _p0 *byte
2230 _p0, err = BytePtrFromString(path)
2231 if err != nil {
2232 return
2233 }
2234 var _p1 *byte
2235 _p1, err = BytePtrFromString(link)
2236 if err != nil {
2237 return
2238 }
2239 _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
2240 if e1 != 0 {
2241 err = errnoErr(e1)
2242 }
2243 return
2244 }
2245
2246 var libc_symlink_trampoline_addr uintptr
2247
2248
2249
2250
2251
2252 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
2253 var _p0 *byte
2254 _p0, err = BytePtrFromString(oldpath)
2255 if err != nil {
2256 return
2257 }
2258 var _p1 *byte
2259 _p1, err = BytePtrFromString(newpath)
2260 if err != nil {
2261 return
2262 }
2263 _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
2264 if e1 != 0 {
2265 err = errnoErr(e1)
2266 }
2267 return
2268 }
2269
2270 var libc_symlinkat_trampoline_addr uintptr
2271
2272
2273
2274
2275
2276 func Sync() (err error) {
2277 _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
2278 if e1 != 0 {
2279 err = errnoErr(e1)
2280 }
2281 return
2282 }
2283
2284 var libc_sync_trampoline_addr uintptr
2285
2286
2287
2288
2289
2290 func Truncate(path string, length int64) (err error) {
2291 var _p0 *byte
2292 _p0, err = BytePtrFromString(path)
2293 if err != nil {
2294 return
2295 }
2296 _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
2297 if e1 != 0 {
2298 err = errnoErr(e1)
2299 }
2300 return
2301 }
2302
2303 var libc_truncate_trampoline_addr uintptr
2304
2305
2306
2307
2308
2309 func Umask(newmask int) (oldmask int) {
2310 r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
2311 oldmask = int(r0)
2312 return
2313 }
2314
2315 var libc_umask_trampoline_addr uintptr
2316
2317
2318
2319
2320
2321 func Undelete(path string) (err error) {
2322 var _p0 *byte
2323 _p0, err = BytePtrFromString(path)
2324 if err != nil {
2325 return
2326 }
2327 _, _, e1 := syscall_syscall(libc_undelete_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
2328 if e1 != 0 {
2329 err = errnoErr(e1)
2330 }
2331 return
2332 }
2333
2334 var libc_undelete_trampoline_addr uintptr
2335
2336
2337
2338
2339
2340 func Unlink(path string) (err error) {
2341 var _p0 *byte
2342 _p0, err = BytePtrFromString(path)
2343 if err != nil {
2344 return
2345 }
2346 _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
2347 if e1 != 0 {
2348 err = errnoErr(e1)
2349 }
2350 return
2351 }
2352
2353 var libc_unlink_trampoline_addr uintptr
2354
2355
2356
2357
2358
2359 func Unlinkat(dirfd int, path string, flags int) (err error) {
2360 var _p0 *byte
2361 _p0, err = BytePtrFromString(path)
2362 if err != nil {
2363 return
2364 }
2365 _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
2366 if e1 != 0 {
2367 err = errnoErr(e1)
2368 }
2369 return
2370 }
2371
2372 var libc_unlinkat_trampoline_addr uintptr
2373
2374
2375
2376
2377
2378 func Unmount(path string, flags int) (err error) {
2379 var _p0 *byte
2380 _p0, err = BytePtrFromString(path)
2381 if err != nil {
2382 return
2383 }
2384 _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
2385 if e1 != 0 {
2386 err = errnoErr(e1)
2387 }
2388 return
2389 }
2390
2391 var libc_unmount_trampoline_addr uintptr
2392
2393
2394
2395
2396
2397 func write(fd int, p []byte) (n int, err error) {
2398 var _p0 unsafe.Pointer
2399 if len(p) > 0 {
2400 _p0 = unsafe.Pointer(&p[0])
2401 } else {
2402 _p0 = unsafe.Pointer(&_zero)
2403 }
2404 r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
2405 n = int(r0)
2406 if e1 != 0 {
2407 err = errnoErr(e1)
2408 }
2409 return
2410 }
2411
2412 var libc_write_trampoline_addr uintptr
2413
2414
2415
2416
2417
2418 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
2419 r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
2420 ret = uintptr(r0)
2421 if e1 != 0 {
2422 err = errnoErr(e1)
2423 }
2424 return
2425 }
2426
2427 var libc_mmap_trampoline_addr uintptr
2428
2429
2430
2431
2432
2433 func munmap(addr uintptr, length uintptr) (err error) {
2434 _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
2435 if e1 != 0 {
2436 err = errnoErr(e1)
2437 }
2438 return
2439 }
2440
2441 var libc_munmap_trampoline_addr uintptr
2442
2443
2444
2445
2446
2447 func Fstat(fd int, stat *Stat_t) (err error) {
2448 _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2449 if e1 != 0 {
2450 err = errnoErr(e1)
2451 }
2452 return
2453 }
2454
2455 var libc_fstat_trampoline_addr uintptr
2456
2457
2458
2459
2460
2461 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
2462 var _p0 *byte
2463 _p0, err = BytePtrFromString(path)
2464 if err != nil {
2465 return
2466 }
2467 _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
2468 if e1 != 0 {
2469 err = errnoErr(e1)
2470 }
2471 return
2472 }
2473
2474 var libc_fstatat_trampoline_addr uintptr
2475
2476
2477
2478
2479
2480 func Fstatfs(fd int, stat *Statfs_t) (err error) {
2481 _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
2482 if e1 != 0 {
2483 err = errnoErr(e1)
2484 }
2485 return
2486 }
2487
2488 var libc_fstatfs_trampoline_addr uintptr
2489
2490
2491
2492
2493
2494 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) {
2495 r0, _, e1 := syscall_syscall(libc_getfsstat_trampoline_addr, uintptr(buf), uintptr(size), uintptr(flags))
2496 n = int(r0)
2497 if e1 != 0 {
2498 err = errnoErr(e1)
2499 }
2500 return
2501 }
2502
2503 var libc_getfsstat_trampoline_addr uintptr
2504
2505
2506
2507
2508
2509 func Lstat(path string, stat *Stat_t) (err error) {
2510 var _p0 *byte
2511 _p0, err = BytePtrFromString(path)
2512 if err != nil {
2513 return
2514 }
2515 _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2516 if e1 != 0 {
2517 err = errnoErr(e1)
2518 }
2519 return
2520 }
2521
2522 var libc_lstat_trampoline_addr uintptr
2523
2524
2525
2526
2527
2528 func ptrace1(request int, pid int, addr uintptr, data uintptr) (err error) {
2529 _, _, e1 := syscall_syscall6(libc_ptrace_trampoline_addr, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
2530 if e1 != 0 {
2531 err = errnoErr(e1)
2532 }
2533 return
2534 }
2535
2536 var libc_ptrace_trampoline_addr uintptr
2537
2538
2539
2540
2541
2542 func Stat(path string, stat *Stat_t) (err error) {
2543 var _p0 *byte
2544 _p0, err = BytePtrFromString(path)
2545 if err != nil {
2546 return
2547 }
2548 _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2549 if e1 != 0 {
2550 err = errnoErr(e1)
2551 }
2552 return
2553 }
2554
2555 var libc_stat_trampoline_addr uintptr
2556
2557
2558
2559
2560
2561 func Statfs(path string, stat *Statfs_t) (err error) {
2562 var _p0 *byte
2563 _p0, err = BytePtrFromString(path)
2564 if err != nil {
2565 return
2566 }
2567 _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
2568 if e1 != 0 {
2569 err = errnoErr(e1)
2570 }
2571 return
2572 }
2573
2574 var libc_statfs_trampoline_addr uintptr
2575
2576
2577
View as plain text