github.com/likebike/go--@v0.0.0-20190911215757-0bd925d16e96/go/src/syscall/zsyscall_linux_arm.go (about) 1 // mksyscall.pl -l32 -arm -tags linux,arm syscall_linux.go syscall_linux_arm.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build linux,arm 5 6 package syscall 7 8 import "unsafe" 9 10 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 11 12 func linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { 13 var _p0 *byte 14 _p0, err = BytePtrFromString(oldpath) 15 if err != nil { 16 return 17 } 18 var _p1 *byte 19 _p1, err = BytePtrFromString(newpath) 20 if err != nil { 21 return 22 } 23 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 24 if e1 != 0 { 25 err = errnoErr(e1) 26 } 27 return 28 } 29 30 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 32 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 33 var _p0 *byte 34 _p0, err = BytePtrFromString(path) 35 if err != nil { 36 return 37 } 38 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 39 fd = int(r0) 40 if e1 != 0 { 41 err = errnoErr(e1) 42 } 43 return 44 } 45 46 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 47 48 func readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 49 var _p0 *byte 50 _p0, err = BytePtrFromString(path) 51 if err != nil { 52 return 53 } 54 var _p1 unsafe.Pointer 55 if len(buf) > 0 { 56 _p1 = unsafe.Pointer(&buf[0]) 57 } else { 58 _p1 = unsafe.Pointer(&_zero) 59 } 60 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 61 n = int(r0) 62 if e1 != 0 { 63 err = errnoErr(e1) 64 } 65 return 66 } 67 68 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 69 70 func symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 71 var _p0 *byte 72 _p0, err = BytePtrFromString(oldpath) 73 if err != nil { 74 return 75 } 76 var _p1 *byte 77 _p1, err = BytePtrFromString(newpath) 78 if err != nil { 79 return 80 } 81 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 82 if e1 != 0 { 83 err = errnoErr(e1) 84 } 85 return 86 } 87 88 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 89 90 func unlinkat(dirfd int, path string, flags int) (err error) { 91 var _p0 *byte 92 _p0, err = BytePtrFromString(path) 93 if err != nil { 94 return 95 } 96 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 97 if e1 != 0 { 98 err = errnoErr(e1) 99 } 100 return 101 } 102 103 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 104 105 func utimes(path string, times *[2]Timeval) (err error) { 106 var _p0 *byte 107 _p0, err = BytePtrFromString(path) 108 if err != nil { 109 return 110 } 111 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 112 if e1 != 0 { 113 err = errnoErr(e1) 114 } 115 return 116 } 117 118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 119 120 func utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error) { 121 var _p0 *byte 122 _p0, err = BytePtrFromString(path) 123 if err != nil { 124 return 125 } 126 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flag), 0, 0) 127 if e1 != 0 { 128 err = errnoErr(e1) 129 } 130 return 131 } 132 133 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 134 135 func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) { 136 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times))) 137 if e1 != 0 { 138 err = errnoErr(e1) 139 } 140 return 141 } 142 143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 144 145 func Getcwd(buf []byte) (n int, err error) { 146 var _p0 unsafe.Pointer 147 if len(buf) > 0 { 148 _p0 = unsafe.Pointer(&buf[0]) 149 } else { 150 _p0 = unsafe.Pointer(&_zero) 151 } 152 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 153 n = int(r0) 154 if e1 != 0 { 155 err = errnoErr(e1) 156 } 157 return 158 } 159 160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 161 162 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 163 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 164 wpid = int(r0) 165 if e1 != 0 { 166 err = errnoErr(e1) 167 } 168 return 169 } 170 171 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 172 173 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 174 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 175 if e1 != 0 { 176 err = errnoErr(e1) 177 } 178 return 179 } 180 181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 182 183 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { 184 var _p0 *byte 185 _p0, err = BytePtrFromString(arg) 186 if err != nil { 187 return 188 } 189 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) 190 if e1 != 0 { 191 err = errnoErr(e1) 192 } 193 return 194 } 195 196 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 197 198 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { 199 var _p0 *byte 200 _p0, err = BytePtrFromString(source) 201 if err != nil { 202 return 203 } 204 var _p1 *byte 205 _p1, err = BytePtrFromString(target) 206 if err != nil { 207 return 208 } 209 var _p2 *byte 210 _p2, err = BytePtrFromString(fstype) 211 if err != nil { 212 return 213 } 214 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) 215 if e1 != 0 { 216 err = errnoErr(e1) 217 } 218 return 219 } 220 221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 222 223 func Acct(path string) (err error) { 224 var _p0 *byte 225 _p0, err = BytePtrFromString(path) 226 if err != nil { 227 return 228 } 229 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) 230 if e1 != 0 { 231 err = errnoErr(e1) 232 } 233 return 234 } 235 236 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 237 238 func Adjtimex(buf *Timex) (state int, err error) { 239 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) 240 state = int(r0) 241 if e1 != 0 { 242 err = errnoErr(e1) 243 } 244 return 245 } 246 247 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 248 249 func Chdir(path string) (err error) { 250 var _p0 *byte 251 _p0, err = BytePtrFromString(path) 252 if err != nil { 253 return 254 } 255 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 256 if e1 != 0 { 257 err = errnoErr(e1) 258 } 259 return 260 } 261 262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 263 264 func Chroot(path string) (err error) { 265 var _p0 *byte 266 _p0, err = BytePtrFromString(path) 267 if err != nil { 268 return 269 } 270 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 271 if e1 != 0 { 272 err = errnoErr(e1) 273 } 274 return 275 } 276 277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 278 279 func Close(fd int) (err error) { 280 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 281 if e1 != 0 { 282 err = errnoErr(e1) 283 } 284 return 285 } 286 287 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 288 289 func Dup(oldfd int) (fd int, err error) { 290 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) 291 fd = int(r0) 292 if e1 != 0 { 293 err = errnoErr(e1) 294 } 295 return 296 } 297 298 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 299 300 func Dup3(oldfd int, newfd int, flags int) (err error) { 301 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) 302 if e1 != 0 { 303 err = errnoErr(e1) 304 } 305 return 306 } 307 308 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 309 310 func EpollCreate(size int) (fd int, err error) { 311 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) 312 fd = int(r0) 313 if e1 != 0 { 314 err = errnoErr(e1) 315 } 316 return 317 } 318 319 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 320 321 func EpollCreate1(flag int) (fd int, err error) { 322 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) 323 fd = int(r0) 324 if e1 != 0 { 325 err = errnoErr(e1) 326 } 327 return 328 } 329 330 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 331 332 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { 333 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) 334 if e1 != 0 { 335 err = errnoErr(e1) 336 } 337 return 338 } 339 340 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 341 342 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 343 var _p0 unsafe.Pointer 344 if len(events) > 0 { 345 _p0 = unsafe.Pointer(&events[0]) 346 } else { 347 _p0 = unsafe.Pointer(&_zero) 348 } 349 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 350 n = int(r0) 351 if e1 != 0 { 352 err = errnoErr(e1) 353 } 354 return 355 } 356 357 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 358 359 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 360 var _p0 *byte 361 _p0, err = BytePtrFromString(path) 362 if err != nil { 363 return 364 } 365 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 366 if e1 != 0 { 367 err = errnoErr(e1) 368 } 369 return 370 } 371 372 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 373 374 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 375 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) 376 if e1 != 0 { 377 err = errnoErr(e1) 378 } 379 return 380 } 381 382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 383 384 func Fchdir(fd int) (err error) { 385 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 386 if e1 != 0 { 387 err = errnoErr(e1) 388 } 389 return 390 } 391 392 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 393 394 func Fchmod(fd int, mode uint32) (err error) { 395 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 396 if e1 != 0 { 397 err = errnoErr(e1) 398 } 399 return 400 } 401 402 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 403 404 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 405 var _p0 *byte 406 _p0, err = BytePtrFromString(path) 407 if err != nil { 408 return 409 } 410 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 411 if e1 != 0 { 412 err = errnoErr(e1) 413 } 414 return 415 } 416 417 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 418 419 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 420 var _p0 *byte 421 _p0, err = BytePtrFromString(path) 422 if err != nil { 423 return 424 } 425 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 426 if e1 != 0 { 427 err = errnoErr(e1) 428 } 429 return 430 } 431 432 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 433 434 func fcntl(fd int, cmd int, arg int) (val int, err error) { 435 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 436 val = int(r0) 437 if e1 != 0 { 438 err = errnoErr(e1) 439 } 440 return 441 } 442 443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 444 445 func Fdatasync(fd int) (err error) { 446 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 447 if e1 != 0 { 448 err = errnoErr(e1) 449 } 450 return 451 } 452 453 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 454 455 func Flock(fd int, how int) (err error) { 456 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 457 if e1 != 0 { 458 err = errnoErr(e1) 459 } 460 return 461 } 462 463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 464 465 func Fsync(fd int) (err error) { 466 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 467 if e1 != 0 { 468 err = errnoErr(e1) 469 } 470 return 471 } 472 473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 474 475 func Getdents(fd int, buf []byte) (n int, err error) { 476 var _p0 unsafe.Pointer 477 if len(buf) > 0 { 478 _p0 = unsafe.Pointer(&buf[0]) 479 } else { 480 _p0 = unsafe.Pointer(&_zero) 481 } 482 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 483 n = int(r0) 484 if e1 != 0 { 485 err = errnoErr(e1) 486 } 487 return 488 } 489 490 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 491 492 func Getpgid(pid int) (pgid int, err error) { 493 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 494 pgid = int(r0) 495 if e1 != 0 { 496 err = errnoErr(e1) 497 } 498 return 499 } 500 501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 502 503 func Getpid() (pid int) { 504 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 505 pid = int(r0) 506 return 507 } 508 509 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 510 511 func Getppid() (ppid int) { 512 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 513 ppid = int(r0) 514 return 515 } 516 517 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 518 519 func Getpriority(which int, who int) (prio int, err error) { 520 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 521 prio = int(r0) 522 if e1 != 0 { 523 err = errnoErr(e1) 524 } 525 return 526 } 527 528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 529 530 func Getrusage(who int, rusage *Rusage) (err error) { 531 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 532 if e1 != 0 { 533 err = errnoErr(e1) 534 } 535 return 536 } 537 538 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 539 540 func Gettid() (tid int) { 541 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) 542 tid = int(r0) 543 return 544 } 545 546 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 547 548 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 549 var _p0 *byte 550 _p0, err = BytePtrFromString(path) 551 if err != nil { 552 return 553 } 554 var _p1 *byte 555 _p1, err = BytePtrFromString(attr) 556 if err != nil { 557 return 558 } 559 var _p2 unsafe.Pointer 560 if len(dest) > 0 { 561 _p2 = unsafe.Pointer(&dest[0]) 562 } else { 563 _p2 = unsafe.Pointer(&_zero) 564 } 565 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 566 sz = int(r0) 567 if e1 != 0 { 568 err = errnoErr(e1) 569 } 570 return 571 } 572 573 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 574 575 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 576 var _p0 *byte 577 _p0, err = BytePtrFromString(pathname) 578 if err != nil { 579 return 580 } 581 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 582 watchdesc = int(r0) 583 if e1 != 0 { 584 err = errnoErr(e1) 585 } 586 return 587 } 588 589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 590 591 func InotifyInit1(flags int) (fd int, err error) { 592 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 593 fd = int(r0) 594 if e1 != 0 { 595 err = errnoErr(e1) 596 } 597 return 598 } 599 600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 601 602 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 603 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 604 success = int(r0) 605 if e1 != 0 { 606 err = errnoErr(e1) 607 } 608 return 609 } 610 611 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 612 613 func Kill(pid int, sig Signal) (err error) { 614 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 615 if e1 != 0 { 616 err = errnoErr(e1) 617 } 618 return 619 } 620 621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 622 623 func Klogctl(typ int, buf []byte) (n int, err error) { 624 var _p0 unsafe.Pointer 625 if len(buf) > 0 { 626 _p0 = unsafe.Pointer(&buf[0]) 627 } else { 628 _p0 = unsafe.Pointer(&_zero) 629 } 630 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 631 n = int(r0) 632 if e1 != 0 { 633 err = errnoErr(e1) 634 } 635 return 636 } 637 638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 639 640 func Listxattr(path string, dest []byte) (sz int, err error) { 641 var _p0 *byte 642 _p0, err = BytePtrFromString(path) 643 if err != nil { 644 return 645 } 646 var _p1 unsafe.Pointer 647 if len(dest) > 0 { 648 _p1 = unsafe.Pointer(&dest[0]) 649 } else { 650 _p1 = unsafe.Pointer(&_zero) 651 } 652 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 653 sz = int(r0) 654 if e1 != 0 { 655 err = errnoErr(e1) 656 } 657 return 658 } 659 660 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 661 662 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 663 var _p0 *byte 664 _p0, err = BytePtrFromString(path) 665 if err != nil { 666 return 667 } 668 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 669 if e1 != 0 { 670 err = errnoErr(e1) 671 } 672 return 673 } 674 675 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 676 677 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 678 var _p0 *byte 679 _p0, err = BytePtrFromString(path) 680 if err != nil { 681 return 682 } 683 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 684 if e1 != 0 { 685 err = errnoErr(e1) 686 } 687 return 688 } 689 690 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 691 692 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 693 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 694 if e1 != 0 { 695 err = errnoErr(e1) 696 } 697 return 698 } 699 700 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 701 702 func Pause() (err error) { 703 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 704 if e1 != 0 { 705 err = errnoErr(e1) 706 } 707 return 708 } 709 710 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 711 712 func PivotRoot(newroot string, putold string) (err error) { 713 var _p0 *byte 714 _p0, err = BytePtrFromString(newroot) 715 if err != nil { 716 return 717 } 718 var _p1 *byte 719 _p1, err = BytePtrFromString(putold) 720 if err != nil { 721 return 722 } 723 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 724 if e1 != 0 { 725 err = errnoErr(e1) 726 } 727 return 728 } 729 730 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 731 732 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { 733 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) 734 if e1 != 0 { 735 err = errnoErr(e1) 736 } 737 return 738 } 739 740 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 741 742 func read(fd int, p []byte) (n int, err error) { 743 var _p0 unsafe.Pointer 744 if len(p) > 0 { 745 _p0 = unsafe.Pointer(&p[0]) 746 } else { 747 _p0 = unsafe.Pointer(&_zero) 748 } 749 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 750 n = int(r0) 751 if e1 != 0 { 752 err = errnoErr(e1) 753 } 754 return 755 } 756 757 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 758 759 func Removexattr(path string, attr string) (err error) { 760 var _p0 *byte 761 _p0, err = BytePtrFromString(path) 762 if err != nil { 763 return 764 } 765 var _p1 *byte 766 _p1, err = BytePtrFromString(attr) 767 if err != nil { 768 return 769 } 770 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 771 if e1 != 0 { 772 err = errnoErr(e1) 773 } 774 return 775 } 776 777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 778 779 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 780 var _p0 *byte 781 _p0, err = BytePtrFromString(oldpath) 782 if err != nil { 783 return 784 } 785 var _p1 *byte 786 _p1, err = BytePtrFromString(newpath) 787 if err != nil { 788 return 789 } 790 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 791 if e1 != 0 { 792 err = errnoErr(e1) 793 } 794 return 795 } 796 797 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 798 799 func Setdomainname(p []byte) (err error) { 800 var _p0 unsafe.Pointer 801 if len(p) > 0 { 802 _p0 = unsafe.Pointer(&p[0]) 803 } else { 804 _p0 = unsafe.Pointer(&_zero) 805 } 806 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 807 if e1 != 0 { 808 err = errnoErr(e1) 809 } 810 return 811 } 812 813 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 814 815 func Sethostname(p []byte) (err error) { 816 var _p0 unsafe.Pointer 817 if len(p) > 0 { 818 _p0 = unsafe.Pointer(&p[0]) 819 } else { 820 _p0 = unsafe.Pointer(&_zero) 821 } 822 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 823 if e1 != 0 { 824 err = errnoErr(e1) 825 } 826 return 827 } 828 829 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 830 831 func Setpgid(pid int, pgid int) (err error) { 832 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 833 if e1 != 0 { 834 err = errnoErr(e1) 835 } 836 return 837 } 838 839 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 840 841 func Setsid() (pid int, err error) { 842 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 843 pid = int(r0) 844 if e1 != 0 { 845 err = errnoErr(e1) 846 } 847 return 848 } 849 850 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 851 852 func Settimeofday(tv *Timeval) (err error) { 853 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 854 if e1 != 0 { 855 err = errnoErr(e1) 856 } 857 return 858 } 859 860 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 861 862 func Setpriority(which int, who int, prio int) (err error) { 863 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 864 if e1 != 0 { 865 err = errnoErr(e1) 866 } 867 return 868 } 869 870 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 871 872 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 873 var _p0 *byte 874 _p0, err = BytePtrFromString(path) 875 if err != nil { 876 return 877 } 878 var _p1 *byte 879 _p1, err = BytePtrFromString(attr) 880 if err != nil { 881 return 882 } 883 var _p2 unsafe.Pointer 884 if len(data) > 0 { 885 _p2 = unsafe.Pointer(&data[0]) 886 } else { 887 _p2 = unsafe.Pointer(&_zero) 888 } 889 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 890 if e1 != 0 { 891 err = errnoErr(e1) 892 } 893 return 894 } 895 896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 897 898 func Sync() { 899 Syscall(SYS_SYNC, 0, 0, 0) 900 return 901 } 902 903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 904 905 func Sysinfo(info *Sysinfo_t) (err error) { 906 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 907 if e1 != 0 { 908 err = errnoErr(e1) 909 } 910 return 911 } 912 913 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 914 915 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 916 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 917 n = int64(int64(r1)<<32 | int64(r0)) 918 if e1 != 0 { 919 err = errnoErr(e1) 920 } 921 return 922 } 923 924 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 925 926 func Tgkill(tgid int, tid int, sig Signal) (err error) { 927 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 928 if e1 != 0 { 929 err = errnoErr(e1) 930 } 931 return 932 } 933 934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 935 936 func Times(tms *Tms) (ticks uintptr, err error) { 937 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 938 ticks = uintptr(r0) 939 if e1 != 0 { 940 err = errnoErr(e1) 941 } 942 return 943 } 944 945 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 946 947 func Umask(mask int) (oldmask int) { 948 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) 949 oldmask = int(r0) 950 return 951 } 952 953 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 954 955 func Uname(buf *Utsname) (err error) { 956 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 957 if e1 != 0 { 958 err = errnoErr(e1) 959 } 960 return 961 } 962 963 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 964 965 func Unmount(target string, flags int) (err error) { 966 var _p0 *byte 967 _p0, err = BytePtrFromString(target) 968 if err != nil { 969 return 970 } 971 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 972 if e1 != 0 { 973 err = errnoErr(e1) 974 } 975 return 976 } 977 978 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 979 980 func Unshare(flags int) (err error) { 981 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 982 if e1 != 0 { 983 err = errnoErr(e1) 984 } 985 return 986 } 987 988 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 989 990 func Ustat(dev int, ubuf *Ustat_t) (err error) { 991 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 992 if e1 != 0 { 993 err = errnoErr(e1) 994 } 995 return 996 } 997 998 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 999 1000 func Utime(path string, buf *Utimbuf) (err error) { 1001 var _p0 *byte 1002 _p0, err = BytePtrFromString(path) 1003 if err != nil { 1004 return 1005 } 1006 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1007 if e1 != 0 { 1008 err = errnoErr(e1) 1009 } 1010 return 1011 } 1012 1013 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1014 1015 func write(fd int, p []byte) (n int, err error) { 1016 var _p0 unsafe.Pointer 1017 if len(p) > 0 { 1018 _p0 = unsafe.Pointer(&p[0]) 1019 } else { 1020 _p0 = unsafe.Pointer(&_zero) 1021 } 1022 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1023 n = int(r0) 1024 if e1 != 0 { 1025 err = errnoErr(e1) 1026 } 1027 return 1028 } 1029 1030 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1031 1032 func exitThread(code int) (err error) { 1033 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1034 if e1 != 0 { 1035 err = errnoErr(e1) 1036 } 1037 return 1038 } 1039 1040 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1041 1042 func readlen(fd int, p *byte, np int) (n int, err error) { 1043 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1044 n = int(r0) 1045 if e1 != 0 { 1046 err = errnoErr(e1) 1047 } 1048 return 1049 } 1050 1051 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1052 1053 func writelen(fd int, p *byte, np int) (n int, err error) { 1054 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1055 n = int(r0) 1056 if e1 != 0 { 1057 err = errnoErr(e1) 1058 } 1059 return 1060 } 1061 1062 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1063 1064 func munmap(addr uintptr, length uintptr) (err error) { 1065 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1066 if e1 != 0 { 1067 err = errnoErr(e1) 1068 } 1069 return 1070 } 1071 1072 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1073 1074 func Madvise(b []byte, advice int) (err error) { 1075 var _p0 unsafe.Pointer 1076 if len(b) > 0 { 1077 _p0 = unsafe.Pointer(&b[0]) 1078 } else { 1079 _p0 = unsafe.Pointer(&_zero) 1080 } 1081 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1082 if e1 != 0 { 1083 err = errnoErr(e1) 1084 } 1085 return 1086 } 1087 1088 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1089 1090 func Mprotect(b []byte, prot int) (err error) { 1091 var _p0 unsafe.Pointer 1092 if len(b) > 0 { 1093 _p0 = unsafe.Pointer(&b[0]) 1094 } else { 1095 _p0 = unsafe.Pointer(&_zero) 1096 } 1097 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 1098 if e1 != 0 { 1099 err = errnoErr(e1) 1100 } 1101 return 1102 } 1103 1104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1105 1106 func Mlock(b []byte) (err error) { 1107 var _p0 unsafe.Pointer 1108 if len(b) > 0 { 1109 _p0 = unsafe.Pointer(&b[0]) 1110 } else { 1111 _p0 = unsafe.Pointer(&_zero) 1112 } 1113 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 1114 if e1 != 0 { 1115 err = errnoErr(e1) 1116 } 1117 return 1118 } 1119 1120 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1121 1122 func Munlock(b []byte) (err error) { 1123 var _p0 unsafe.Pointer 1124 if len(b) > 0 { 1125 _p0 = unsafe.Pointer(&b[0]) 1126 } else { 1127 _p0 = unsafe.Pointer(&_zero) 1128 } 1129 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1130 if e1 != 0 { 1131 err = errnoErr(e1) 1132 } 1133 return 1134 } 1135 1136 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1137 1138 func Mlockall(flags int) (err error) { 1139 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 1140 if e1 != 0 { 1141 err = errnoErr(e1) 1142 } 1143 return 1144 } 1145 1146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1147 1148 func Munlockall() (err error) { 1149 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1150 if e1 != 0 { 1151 err = errnoErr(e1) 1152 } 1153 return 1154 } 1155 1156 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1157 1158 func pipe2(p *[2]_C_int, flags int) (err error) { 1159 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1160 if e1 != 0 { 1161 err = errnoErr(e1) 1162 } 1163 return 1164 } 1165 1166 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1167 1168 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 1169 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1170 fd = int(r0) 1171 if e1 != 0 { 1172 err = errnoErr(e1) 1173 } 1174 return 1175 } 1176 1177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1178 1179 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 1180 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1181 fd = int(r0) 1182 if e1 != 0 { 1183 err = errnoErr(e1) 1184 } 1185 return 1186 } 1187 1188 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1189 1190 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1191 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 1192 if e1 != 0 { 1193 err = errnoErr(e1) 1194 } 1195 return 1196 } 1197 1198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1199 1200 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1201 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 1202 if e1 != 0 { 1203 err = errnoErr(e1) 1204 } 1205 return 1206 } 1207 1208 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1209 1210 func getgroups(n int, list *_Gid_t) (nn int, err error) { 1211 r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1212 nn = int(r0) 1213 if e1 != 0 { 1214 err = errnoErr(e1) 1215 } 1216 return 1217 } 1218 1219 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1220 1221 func setgroups(n int, list *_Gid_t) (err error) { 1222 _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1223 if e1 != 0 { 1224 err = errnoErr(e1) 1225 } 1226 return 1227 } 1228 1229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1230 1231 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1232 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1233 if e1 != 0 { 1234 err = errnoErr(e1) 1235 } 1236 return 1237 } 1238 1239 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1240 1241 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1242 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1243 if e1 != 0 { 1244 err = errnoErr(e1) 1245 } 1246 return 1247 } 1248 1249 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1250 1251 func socket(domain int, typ int, proto int) (fd int, err error) { 1252 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 1253 fd = int(r0) 1254 if e1 != 0 { 1255 err = errnoErr(e1) 1256 } 1257 return 1258 } 1259 1260 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1261 1262 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1263 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1264 if e1 != 0 { 1265 err = errnoErr(e1) 1266 } 1267 return 1268 } 1269 1270 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1271 1272 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1273 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1274 if e1 != 0 { 1275 err = errnoErr(e1) 1276 } 1277 return 1278 } 1279 1280 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1281 1282 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1283 var _p0 unsafe.Pointer 1284 if len(p) > 0 { 1285 _p0 = unsafe.Pointer(&p[0]) 1286 } else { 1287 _p0 = unsafe.Pointer(&_zero) 1288 } 1289 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1290 n = int(r0) 1291 if e1 != 0 { 1292 err = errnoErr(e1) 1293 } 1294 return 1295 } 1296 1297 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1298 1299 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1300 var _p0 unsafe.Pointer 1301 if len(buf) > 0 { 1302 _p0 = unsafe.Pointer(&buf[0]) 1303 } else { 1304 _p0 = unsafe.Pointer(&_zero) 1305 } 1306 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1307 if e1 != 0 { 1308 err = errnoErr(e1) 1309 } 1310 return 1311 } 1312 1313 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1314 1315 func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) { 1316 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0) 1317 if e1 != 0 { 1318 err = errnoErr(e1) 1319 } 1320 return 1321 } 1322 1323 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1324 1325 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1326 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1327 n = int(r0) 1328 if e1 != 0 { 1329 err = errnoErr(e1) 1330 } 1331 return 1332 } 1333 1334 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1335 1336 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1337 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1338 n = int(r0) 1339 if e1 != 0 { 1340 err = errnoErr(e1) 1341 } 1342 return 1343 } 1344 1345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1346 1347 func Dup2(oldfd int, newfd int) (err error) { 1348 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1349 if e1 != 0 { 1350 err = errnoErr(e1) 1351 } 1352 return 1353 } 1354 1355 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1356 1357 func Fchown(fd int, uid int, gid int) (err error) { 1358 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) 1359 if e1 != 0 { 1360 err = errnoErr(e1) 1361 } 1362 return 1363 } 1364 1365 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1366 1367 func Fstat(fd int, stat *Stat_t) (err error) { 1368 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1369 if e1 != 0 { 1370 err = errnoErr(e1) 1371 } 1372 return 1373 } 1374 1375 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1376 1377 func Getegid() (egid int) { 1378 r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0) 1379 egid = int(r0) 1380 return 1381 } 1382 1383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1384 1385 func Geteuid() (euid int) { 1386 r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0) 1387 euid = int(r0) 1388 return 1389 } 1390 1391 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1392 1393 func Getgid() (gid int) { 1394 r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0) 1395 gid = int(r0) 1396 return 1397 } 1398 1399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1400 1401 func Getuid() (uid int) { 1402 r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0) 1403 uid = int(r0) 1404 return 1405 } 1406 1407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1408 1409 func InotifyInit() (fd int, err error) { 1410 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1411 fd = int(r0) 1412 if e1 != 0 { 1413 err = errnoErr(e1) 1414 } 1415 return 1416 } 1417 1418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1419 1420 func Lchown(path string, uid int, gid int) (err error) { 1421 var _p0 *byte 1422 _p0, err = BytePtrFromString(path) 1423 if err != nil { 1424 return 1425 } 1426 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1427 if e1 != 0 { 1428 err = errnoErr(e1) 1429 } 1430 return 1431 } 1432 1433 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1434 1435 func Listen(s int, n int) (err error) { 1436 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1437 if e1 != 0 { 1438 err = errnoErr(e1) 1439 } 1440 return 1441 } 1442 1443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1444 1445 func Lstat(path string, stat *Stat_t) (err error) { 1446 var _p0 *byte 1447 _p0, err = BytePtrFromString(path) 1448 if err != nil { 1449 return 1450 } 1451 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1452 if e1 != 0 { 1453 err = errnoErr(e1) 1454 } 1455 return 1456 } 1457 1458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1459 1460 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1461 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1462 written = int(r0) 1463 if e1 != 0 { 1464 err = errnoErr(e1) 1465 } 1466 return 1467 } 1468 1469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1470 1471 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1472 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1473 n = int(r0) 1474 if e1 != 0 { 1475 err = errnoErr(e1) 1476 } 1477 return 1478 } 1479 1480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1481 1482 func Setfsgid(gid int) (err error) { 1483 _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) 1484 if e1 != 0 { 1485 err = errnoErr(e1) 1486 } 1487 return 1488 } 1489 1490 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1491 1492 func Setfsuid(uid int) (err error) { 1493 _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) 1494 if e1 != 0 { 1495 err = errnoErr(e1) 1496 } 1497 return 1498 } 1499 1500 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1501 1502 func Setregid(rgid int, egid int) (err error) { 1503 _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) 1504 if e1 != 0 { 1505 err = errnoErr(e1) 1506 } 1507 return 1508 } 1509 1510 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1511 1512 func Setresgid(rgid int, egid int, sgid int) (err error) { 1513 _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1514 if e1 != 0 { 1515 err = errnoErr(e1) 1516 } 1517 return 1518 } 1519 1520 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1521 1522 func Setresuid(ruid int, euid int, suid int) (err error) { 1523 _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) 1524 if e1 != 0 { 1525 err = errnoErr(e1) 1526 } 1527 return 1528 } 1529 1530 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1531 1532 func Setreuid(ruid int, euid int) (err error) { 1533 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) 1534 if e1 != 0 { 1535 err = errnoErr(e1) 1536 } 1537 return 1538 } 1539 1540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1541 1542 func Shutdown(fd int, how int) (err error) { 1543 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 1544 if e1 != 0 { 1545 err = errnoErr(e1) 1546 } 1547 return 1548 } 1549 1550 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1551 1552 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 1553 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1554 n = int(r0) 1555 if e1 != 0 { 1556 err = errnoErr(e1) 1557 } 1558 return 1559 } 1560 1561 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1562 1563 func Stat(path string, stat *Stat_t) (err error) { 1564 var _p0 *byte 1565 _p0, err = BytePtrFromString(path) 1566 if err != nil { 1567 return 1568 } 1569 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1570 if e1 != 0 { 1571 err = errnoErr(e1) 1572 } 1573 return 1574 } 1575 1576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1577 1578 func Gettimeofday(tv *Timeval) (err error) { 1579 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1580 if e1 != 0 { 1581 err = errnoErr(e1) 1582 } 1583 return 1584 } 1585 1586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1587 1588 func Time(t *Time_t) (tt Time_t, err error) { 1589 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 1590 tt = Time_t(r0) 1591 if e1 != 0 { 1592 err = errnoErr(e1) 1593 } 1594 return 1595 } 1596 1597 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1598 1599 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1600 var _p0 unsafe.Pointer 1601 if len(p) > 0 { 1602 _p0 = unsafe.Pointer(&p[0]) 1603 } else { 1604 _p0 = unsafe.Pointer(&_zero) 1605 } 1606 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 1607 n = int(r0) 1608 if e1 != 0 { 1609 err = errnoErr(e1) 1610 } 1611 return 1612 } 1613 1614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1615 1616 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1617 var _p0 unsafe.Pointer 1618 if len(p) > 0 { 1619 _p0 = unsafe.Pointer(&p[0]) 1620 } else { 1621 _p0 = unsafe.Pointer(&_zero) 1622 } 1623 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 1624 n = int(r0) 1625 if e1 != 0 { 1626 err = errnoErr(e1) 1627 } 1628 return 1629 } 1630 1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1632 1633 func Truncate(path string, length int64) (err error) { 1634 var _p0 *byte 1635 _p0, err = BytePtrFromString(path) 1636 if err != nil { 1637 return 1638 } 1639 _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) 1640 if e1 != 0 { 1641 err = errnoErr(e1) 1642 } 1643 return 1644 } 1645 1646 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1647 1648 func Ftruncate(fd int, length int64) (err error) { 1649 _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) 1650 if e1 != 0 { 1651 err = errnoErr(e1) 1652 } 1653 return 1654 } 1655 1656 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1657 1658 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { 1659 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) 1660 xaddr = uintptr(r0) 1661 if e1 != 0 { 1662 err = errnoErr(e1) 1663 } 1664 return 1665 } 1666 1667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1668 1669 func getrlimit(resource int, rlim *rlimit32) (err error) { 1670 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1671 if e1 != 0 { 1672 err = errnoErr(e1) 1673 } 1674 return 1675 } 1676 1677 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1678 1679 func setrlimit(resource int, rlim *rlimit32) (err error) { 1680 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1681 if e1 != 0 { 1682 err = errnoErr(e1) 1683 } 1684 return 1685 }