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