github.com/mangodowner/go-gm@v0.0.0-20180818020936-8baa2bd4408c/src/syscall/zsyscall_linux_ppc64.go (about) 1 // mksyscall.pl -tags linux,ppc64 syscall_linux.go syscall_linux_ppc64x.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build linux,ppc64 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) (err error) { 121 var _p0 *byte 122 _p0, err = BytePtrFromString(path) 123 if err != nil { 124 return 125 } 126 _, _, e1 := Syscall(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 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 Exit(code int) { 360 Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0) 361 return 362 } 363 364 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 365 366 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 367 var _p0 *byte 368 _p0, err = BytePtrFromString(path) 369 if err != nil { 370 return 371 } 372 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 373 if e1 != 0 { 374 err = errnoErr(e1) 375 } 376 return 377 } 378 379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 380 381 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 382 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) 383 if e1 != 0 { 384 err = errnoErr(e1) 385 } 386 return 387 } 388 389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 390 391 func Fchdir(fd int) (err error) { 392 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 393 if e1 != 0 { 394 err = errnoErr(e1) 395 } 396 return 397 } 398 399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 400 401 func Fchmod(fd int, mode uint32) (err error) { 402 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 403 if e1 != 0 { 404 err = errnoErr(e1) 405 } 406 return 407 } 408 409 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 410 411 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 412 var _p0 *byte 413 _p0, err = BytePtrFromString(path) 414 if err != nil { 415 return 416 } 417 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 418 if e1 != 0 { 419 err = errnoErr(e1) 420 } 421 return 422 } 423 424 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 425 426 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 427 var _p0 *byte 428 _p0, err = BytePtrFromString(path) 429 if err != nil { 430 return 431 } 432 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 433 if e1 != 0 { 434 err = errnoErr(e1) 435 } 436 return 437 } 438 439 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 440 441 func fcntl(fd int, cmd int, arg int) (val int, err error) { 442 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 443 val = int(r0) 444 if e1 != 0 { 445 err = errnoErr(e1) 446 } 447 return 448 } 449 450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 451 452 func Fdatasync(fd int) (err error) { 453 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 454 if e1 != 0 { 455 err = errnoErr(e1) 456 } 457 return 458 } 459 460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 461 462 func Flock(fd int, how int) (err error) { 463 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 464 if e1 != 0 { 465 err = errnoErr(e1) 466 } 467 return 468 } 469 470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 471 472 func Fsync(fd int) (err error) { 473 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 474 if e1 != 0 { 475 err = errnoErr(e1) 476 } 477 return 478 } 479 480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 481 482 func Getdents(fd int, buf []byte) (n int, err error) { 483 var _p0 unsafe.Pointer 484 if len(buf) > 0 { 485 _p0 = unsafe.Pointer(&buf[0]) 486 } else { 487 _p0 = unsafe.Pointer(&_zero) 488 } 489 r0, _, e1 := Syscall(_SYS_getdents, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 490 n = int(r0) 491 if e1 != 0 { 492 err = errnoErr(e1) 493 } 494 return 495 } 496 497 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 498 499 func Getpgid(pid int) (pgid int, err error) { 500 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 501 pgid = int(r0) 502 if e1 != 0 { 503 err = errnoErr(e1) 504 } 505 return 506 } 507 508 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 509 510 func Getpid() (pid int) { 511 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 512 pid = int(r0) 513 return 514 } 515 516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 517 518 func Getppid() (ppid int) { 519 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 520 ppid = int(r0) 521 return 522 } 523 524 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 525 526 func Getpriority(which int, who int) (prio int, err error) { 527 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 528 prio = int(r0) 529 if e1 != 0 { 530 err = errnoErr(e1) 531 } 532 return 533 } 534 535 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 536 537 func Getrusage(who int, rusage *Rusage) (err error) { 538 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 539 if e1 != 0 { 540 err = errnoErr(e1) 541 } 542 return 543 } 544 545 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 546 547 func Gettid() (tid int) { 548 r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0) 549 tid = int(r0) 550 return 551 } 552 553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 554 555 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 556 var _p0 *byte 557 _p0, err = BytePtrFromString(path) 558 if err != nil { 559 return 560 } 561 var _p1 *byte 562 _p1, err = BytePtrFromString(attr) 563 if err != nil { 564 return 565 } 566 var _p2 unsafe.Pointer 567 if len(dest) > 0 { 568 _p2 = unsafe.Pointer(&dest[0]) 569 } else { 570 _p2 = unsafe.Pointer(&_zero) 571 } 572 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 573 sz = int(r0) 574 if e1 != 0 { 575 err = errnoErr(e1) 576 } 577 return 578 } 579 580 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 581 582 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 583 var _p0 *byte 584 _p0, err = BytePtrFromString(pathname) 585 if err != nil { 586 return 587 } 588 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 589 watchdesc = int(r0) 590 if e1 != 0 { 591 err = errnoErr(e1) 592 } 593 return 594 } 595 596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 597 598 func InotifyInit1(flags int) (fd int, err error) { 599 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 600 fd = int(r0) 601 if e1 != 0 { 602 err = errnoErr(e1) 603 } 604 return 605 } 606 607 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 608 609 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 610 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 611 success = int(r0) 612 if e1 != 0 { 613 err = errnoErr(e1) 614 } 615 return 616 } 617 618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 619 620 func Kill(pid int, sig Signal) (err error) { 621 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 622 if e1 != 0 { 623 err = errnoErr(e1) 624 } 625 return 626 } 627 628 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 629 630 func Klogctl(typ int, buf []byte) (n int, err error) { 631 var _p0 unsafe.Pointer 632 if len(buf) > 0 { 633 _p0 = unsafe.Pointer(&buf[0]) 634 } else { 635 _p0 = unsafe.Pointer(&_zero) 636 } 637 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 638 n = int(r0) 639 if e1 != 0 { 640 err = errnoErr(e1) 641 } 642 return 643 } 644 645 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 646 647 func Listxattr(path string, dest []byte) (sz int, err error) { 648 var _p0 *byte 649 _p0, err = BytePtrFromString(path) 650 if err != nil { 651 return 652 } 653 var _p1 unsafe.Pointer 654 if len(dest) > 0 { 655 _p1 = unsafe.Pointer(&dest[0]) 656 } else { 657 _p1 = unsafe.Pointer(&_zero) 658 } 659 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 660 sz = int(r0) 661 if e1 != 0 { 662 err = errnoErr(e1) 663 } 664 return 665 } 666 667 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 668 669 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 670 var _p0 *byte 671 _p0, err = BytePtrFromString(path) 672 if err != nil { 673 return 674 } 675 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 676 if e1 != 0 { 677 err = errnoErr(e1) 678 } 679 return 680 } 681 682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 683 684 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 685 var _p0 *byte 686 _p0, err = BytePtrFromString(path) 687 if err != nil { 688 return 689 } 690 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 691 if e1 != 0 { 692 err = errnoErr(e1) 693 } 694 return 695 } 696 697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 698 699 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 700 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 701 if e1 != 0 { 702 err = errnoErr(e1) 703 } 704 return 705 } 706 707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 708 709 func Pause() (err error) { 710 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 711 if e1 != 0 { 712 err = errnoErr(e1) 713 } 714 return 715 } 716 717 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 718 719 func PivotRoot(newroot string, putold string) (err error) { 720 var _p0 *byte 721 _p0, err = BytePtrFromString(newroot) 722 if err != nil { 723 return 724 } 725 var _p1 *byte 726 _p1, err = BytePtrFromString(putold) 727 if err != nil { 728 return 729 } 730 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 731 if e1 != 0 { 732 err = errnoErr(e1) 733 } 734 return 735 } 736 737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 738 739 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { 740 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) 741 if e1 != 0 { 742 err = errnoErr(e1) 743 } 744 return 745 } 746 747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 748 749 func read(fd int, p []byte) (n int, err error) { 750 var _p0 unsafe.Pointer 751 if len(p) > 0 { 752 _p0 = unsafe.Pointer(&p[0]) 753 } else { 754 _p0 = unsafe.Pointer(&_zero) 755 } 756 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 757 n = int(r0) 758 if e1 != 0 { 759 err = errnoErr(e1) 760 } 761 return 762 } 763 764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 765 766 func Removexattr(path string, attr string) (err error) { 767 var _p0 *byte 768 _p0, err = BytePtrFromString(path) 769 if err != nil { 770 return 771 } 772 var _p1 *byte 773 _p1, err = BytePtrFromString(attr) 774 if err != nil { 775 return 776 } 777 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 778 if e1 != 0 { 779 err = errnoErr(e1) 780 } 781 return 782 } 783 784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 785 786 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 787 var _p0 *byte 788 _p0, err = BytePtrFromString(oldpath) 789 if err != nil { 790 return 791 } 792 var _p1 *byte 793 _p1, err = BytePtrFromString(newpath) 794 if err != nil { 795 return 796 } 797 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 798 if e1 != 0 { 799 err = errnoErr(e1) 800 } 801 return 802 } 803 804 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 805 806 func Setdomainname(p []byte) (err error) { 807 var _p0 unsafe.Pointer 808 if len(p) > 0 { 809 _p0 = unsafe.Pointer(&p[0]) 810 } else { 811 _p0 = unsafe.Pointer(&_zero) 812 } 813 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 814 if e1 != 0 { 815 err = errnoErr(e1) 816 } 817 return 818 } 819 820 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 821 822 func Sethostname(p []byte) (err error) { 823 var _p0 unsafe.Pointer 824 if len(p) > 0 { 825 _p0 = unsafe.Pointer(&p[0]) 826 } else { 827 _p0 = unsafe.Pointer(&_zero) 828 } 829 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 830 if e1 != 0 { 831 err = errnoErr(e1) 832 } 833 return 834 } 835 836 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 837 838 func Setpgid(pid int, pgid int) (err error) { 839 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 840 if e1 != 0 { 841 err = errnoErr(e1) 842 } 843 return 844 } 845 846 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 847 848 func Setsid() (pid int, err error) { 849 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 850 pid = int(r0) 851 if e1 != 0 { 852 err = errnoErr(e1) 853 } 854 return 855 } 856 857 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 858 859 func Settimeofday(tv *Timeval) (err error) { 860 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 861 if e1 != 0 { 862 err = errnoErr(e1) 863 } 864 return 865 } 866 867 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 868 869 func Setpriority(which int, who int, prio int) (err error) { 870 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 871 if e1 != 0 { 872 err = errnoErr(e1) 873 } 874 return 875 } 876 877 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 878 879 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 880 var _p0 *byte 881 _p0, err = BytePtrFromString(path) 882 if err != nil { 883 return 884 } 885 var _p1 *byte 886 _p1, err = BytePtrFromString(attr) 887 if err != nil { 888 return 889 } 890 var _p2 unsafe.Pointer 891 if len(data) > 0 { 892 _p2 = unsafe.Pointer(&data[0]) 893 } else { 894 _p2 = unsafe.Pointer(&_zero) 895 } 896 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 897 if e1 != 0 { 898 err = errnoErr(e1) 899 } 900 return 901 } 902 903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 904 905 func Sync() { 906 Syscall(SYS_SYNC, 0, 0, 0) 907 return 908 } 909 910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 911 912 func Sysinfo(info *Sysinfo_t) (err error) { 913 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 914 if e1 != 0 { 915 err = errnoErr(e1) 916 } 917 return 918 } 919 920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 921 922 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 923 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 924 n = int64(r0) 925 if e1 != 0 { 926 err = errnoErr(e1) 927 } 928 return 929 } 930 931 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 932 933 func Tgkill(tgid int, tid int, sig Signal) (err error) { 934 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 935 if e1 != 0 { 936 err = errnoErr(e1) 937 } 938 return 939 } 940 941 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 942 943 func Times(tms *Tms) (ticks uintptr, err error) { 944 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 945 ticks = uintptr(r0) 946 if e1 != 0 { 947 err = errnoErr(e1) 948 } 949 return 950 } 951 952 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 953 954 func Umask(mask int) (oldmask int) { 955 r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0) 956 oldmask = int(r0) 957 return 958 } 959 960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 961 962 func Uname(buf *Utsname) (err error) { 963 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 964 if e1 != 0 { 965 err = errnoErr(e1) 966 } 967 return 968 } 969 970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 971 972 func Unmount(target string, flags int) (err error) { 973 var _p0 *byte 974 _p0, err = BytePtrFromString(target) 975 if err != nil { 976 return 977 } 978 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 979 if e1 != 0 { 980 err = errnoErr(e1) 981 } 982 return 983 } 984 985 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 986 987 func Unshare(flags int) (err error) { 988 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 989 if e1 != 0 { 990 err = errnoErr(e1) 991 } 992 return 993 } 994 995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 996 997 func Ustat(dev int, ubuf *Ustat_t) (err error) { 998 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 999 if e1 != 0 { 1000 err = errnoErr(e1) 1001 } 1002 return 1003 } 1004 1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1006 1007 func Utime(path string, buf *Utimbuf) (err error) { 1008 var _p0 *byte 1009 _p0, err = BytePtrFromString(path) 1010 if err != nil { 1011 return 1012 } 1013 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1014 if e1 != 0 { 1015 err = errnoErr(e1) 1016 } 1017 return 1018 } 1019 1020 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1021 1022 func write(fd int, p []byte) (n int, err error) { 1023 var _p0 unsafe.Pointer 1024 if len(p) > 0 { 1025 _p0 = unsafe.Pointer(&p[0]) 1026 } else { 1027 _p0 = unsafe.Pointer(&_zero) 1028 } 1029 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1030 n = int(r0) 1031 if e1 != 0 { 1032 err = errnoErr(e1) 1033 } 1034 return 1035 } 1036 1037 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1038 1039 func exitThread(code int) (err error) { 1040 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1041 if e1 != 0 { 1042 err = errnoErr(e1) 1043 } 1044 return 1045 } 1046 1047 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1048 1049 func readlen(fd int, p *byte, np int) (n int, err error) { 1050 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1051 n = int(r0) 1052 if e1 != 0 { 1053 err = errnoErr(e1) 1054 } 1055 return 1056 } 1057 1058 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1059 1060 func writelen(fd int, p *byte, np int) (n int, err error) { 1061 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1062 n = int(r0) 1063 if e1 != 0 { 1064 err = errnoErr(e1) 1065 } 1066 return 1067 } 1068 1069 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1070 1071 func munmap(addr uintptr, length uintptr) (err error) { 1072 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1073 if e1 != 0 { 1074 err = errnoErr(e1) 1075 } 1076 return 1077 } 1078 1079 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1080 1081 func Madvise(b []byte, advice int) (err error) { 1082 var _p0 unsafe.Pointer 1083 if len(b) > 0 { 1084 _p0 = unsafe.Pointer(&b[0]) 1085 } else { 1086 _p0 = unsafe.Pointer(&_zero) 1087 } 1088 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1089 if e1 != 0 { 1090 err = errnoErr(e1) 1091 } 1092 return 1093 } 1094 1095 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1096 1097 func Mprotect(b []byte, prot int) (err error) { 1098 var _p0 unsafe.Pointer 1099 if len(b) > 0 { 1100 _p0 = unsafe.Pointer(&b[0]) 1101 } else { 1102 _p0 = unsafe.Pointer(&_zero) 1103 } 1104 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 1105 if e1 != 0 { 1106 err = errnoErr(e1) 1107 } 1108 return 1109 } 1110 1111 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1112 1113 func Mlock(b []byte) (err error) { 1114 var _p0 unsafe.Pointer 1115 if len(b) > 0 { 1116 _p0 = unsafe.Pointer(&b[0]) 1117 } else { 1118 _p0 = unsafe.Pointer(&_zero) 1119 } 1120 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 1121 if e1 != 0 { 1122 err = errnoErr(e1) 1123 } 1124 return 1125 } 1126 1127 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1128 1129 func Munlock(b []byte) (err error) { 1130 var _p0 unsafe.Pointer 1131 if len(b) > 0 { 1132 _p0 = unsafe.Pointer(&b[0]) 1133 } else { 1134 _p0 = unsafe.Pointer(&_zero) 1135 } 1136 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1137 if e1 != 0 { 1138 err = errnoErr(e1) 1139 } 1140 return 1141 } 1142 1143 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1144 1145 func Mlockall(flags int) (err error) { 1146 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 1147 if e1 != 0 { 1148 err = errnoErr(e1) 1149 } 1150 return 1151 } 1152 1153 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1154 1155 func Munlockall() (err error) { 1156 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1157 if e1 != 0 { 1158 err = errnoErr(e1) 1159 } 1160 return 1161 } 1162 1163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1164 1165 func Dup2(oldfd int, newfd int) (err error) { 1166 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1167 if e1 != 0 { 1168 err = errnoErr(e1) 1169 } 1170 return 1171 } 1172 1173 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1174 1175 func Fchown(fd int, uid int, gid int) (err error) { 1176 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 1177 if e1 != 0 { 1178 err = errnoErr(e1) 1179 } 1180 return 1181 } 1182 1183 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1184 1185 func Fstat(fd int, stat *Stat_t) (err error) { 1186 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1187 if e1 != 0 { 1188 err = errnoErr(e1) 1189 } 1190 return 1191 } 1192 1193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1194 1195 func Fstatfs(fd int, buf *Statfs_t) (err error) { 1196 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) 1197 if e1 != 0 { 1198 err = errnoErr(e1) 1199 } 1200 return 1201 } 1202 1203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1204 1205 func Ftruncate(fd int, length int64) (err error) { 1206 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) 1207 if e1 != 0 { 1208 err = errnoErr(e1) 1209 } 1210 return 1211 } 1212 1213 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1214 1215 func Getegid() (egid int) { 1216 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 1217 egid = int(r0) 1218 return 1219 } 1220 1221 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1222 1223 func Geteuid() (euid int) { 1224 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 1225 euid = int(r0) 1226 return 1227 } 1228 1229 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1230 1231 func Getgid() (gid int) { 1232 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 1233 gid = int(r0) 1234 return 1235 } 1236 1237 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1238 1239 func Getrlimit(resource int, rlim *Rlimit) (err error) { 1240 _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1241 if e1 != 0 { 1242 err = errnoErr(e1) 1243 } 1244 return 1245 } 1246 1247 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1248 1249 func Getuid() (uid int) { 1250 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 1251 uid = int(r0) 1252 return 1253 } 1254 1255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1256 1257 func InotifyInit() (fd int, err error) { 1258 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1259 fd = int(r0) 1260 if e1 != 0 { 1261 err = errnoErr(e1) 1262 } 1263 return 1264 } 1265 1266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1267 1268 func Ioperm(from int, num int, on int) (err error) { 1269 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) 1270 if e1 != 0 { 1271 err = errnoErr(e1) 1272 } 1273 return 1274 } 1275 1276 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1277 1278 func Iopl(level int) (err error) { 1279 _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) 1280 if e1 != 0 { 1281 err = errnoErr(e1) 1282 } 1283 return 1284 } 1285 1286 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1287 1288 func Lchown(path string, uid int, gid int) (err error) { 1289 var _p0 *byte 1290 _p0, err = BytePtrFromString(path) 1291 if err != nil { 1292 return 1293 } 1294 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1295 if e1 != 0 { 1296 err = errnoErr(e1) 1297 } 1298 return 1299 } 1300 1301 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1302 1303 func Listen(s int, n int) (err error) { 1304 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1305 if e1 != 0 { 1306 err = errnoErr(e1) 1307 } 1308 return 1309 } 1310 1311 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1312 1313 func Lstat(path string, stat *Stat_t) (err error) { 1314 var _p0 *byte 1315 _p0, err = BytePtrFromString(path) 1316 if err != nil { 1317 return 1318 } 1319 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1320 if e1 != 0 { 1321 err = errnoErr(e1) 1322 } 1323 return 1324 } 1325 1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1327 1328 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1329 var _p0 unsafe.Pointer 1330 if len(p) > 0 { 1331 _p0 = unsafe.Pointer(&p[0]) 1332 } else { 1333 _p0 = unsafe.Pointer(&_zero) 1334 } 1335 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1336 n = int(r0) 1337 if e1 != 0 { 1338 err = errnoErr(e1) 1339 } 1340 return 1341 } 1342 1343 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1344 1345 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1346 var _p0 unsafe.Pointer 1347 if len(p) > 0 { 1348 _p0 = unsafe.Pointer(&p[0]) 1349 } else { 1350 _p0 = unsafe.Pointer(&_zero) 1351 } 1352 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1353 n = int(r0) 1354 if e1 != 0 { 1355 err = errnoErr(e1) 1356 } 1357 return 1358 } 1359 1360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1361 1362 func Seek(fd int, offset int64, whence int) (off int64, err error) { 1363 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) 1364 off = int64(r0) 1365 if e1 != 0 { 1366 err = errnoErr(e1) 1367 } 1368 return 1369 } 1370 1371 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1372 1373 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1374 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1375 n = int(r0) 1376 if e1 != 0 { 1377 err = errnoErr(e1) 1378 } 1379 return 1380 } 1381 1382 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1383 1384 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1385 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1386 written = int(r0) 1387 if e1 != 0 { 1388 err = errnoErr(e1) 1389 } 1390 return 1391 } 1392 1393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1394 1395 func Setfsgid(gid int) (err error) { 1396 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) 1397 if e1 != 0 { 1398 err = errnoErr(e1) 1399 } 1400 return 1401 } 1402 1403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1404 1405 func Setfsuid(uid int) (err error) { 1406 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) 1407 if e1 != 0 { 1408 err = errnoErr(e1) 1409 } 1410 return 1411 } 1412 1413 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1414 1415 func Setregid(rgid int, egid int) (err error) { 1416 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1417 if e1 != 0 { 1418 err = errnoErr(e1) 1419 } 1420 return 1421 } 1422 1423 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1424 1425 func Setresgid(rgid int, egid int, sgid int) (err error) { 1426 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 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 Setresuid(ruid int, euid int, suid int) (err error) { 1436 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 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 Setrlimit(resource int, rlim *Rlimit) (err error) { 1446 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1447 if e1 != 0 { 1448 err = errnoErr(e1) 1449 } 1450 return 1451 } 1452 1453 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1454 1455 func Setreuid(ruid int, euid int) (err error) { 1456 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1457 if e1 != 0 { 1458 err = errnoErr(e1) 1459 } 1460 return 1461 } 1462 1463 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1464 1465 func Shutdown(fd int, how int) (err error) { 1466 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 1467 if e1 != 0 { 1468 err = errnoErr(e1) 1469 } 1470 return 1471 } 1472 1473 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1474 1475 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { 1476 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1477 n = int64(r0) 1478 if e1 != 0 { 1479 err = errnoErr(e1) 1480 } 1481 return 1482 } 1483 1484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1485 1486 func Stat(path string, stat *Stat_t) (err error) { 1487 var _p0 *byte 1488 _p0, err = BytePtrFromString(path) 1489 if err != nil { 1490 return 1491 } 1492 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1493 if e1 != 0 { 1494 err = errnoErr(e1) 1495 } 1496 return 1497 } 1498 1499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1500 1501 func Statfs(path string, buf *Statfs_t) (err error) { 1502 var _p0 *byte 1503 _p0, err = BytePtrFromString(path) 1504 if err != nil { 1505 return 1506 } 1507 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1508 if e1 != 0 { 1509 err = errnoErr(e1) 1510 } 1511 return 1512 } 1513 1514 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1515 1516 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 1517 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) 1518 if e1 != 0 { 1519 err = errnoErr(e1) 1520 } 1521 return 1522 } 1523 1524 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1525 1526 func Truncate(path string, length int64) (err error) { 1527 var _p0 *byte 1528 _p0, err = BytePtrFromString(path) 1529 if err != nil { 1530 return 1531 } 1532 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) 1533 if e1 != 0 { 1534 err = errnoErr(e1) 1535 } 1536 return 1537 } 1538 1539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1540 1541 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 1542 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1543 fd = int(r0) 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 accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 1553 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1554 fd = 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 bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1564 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 1565 if e1 != 0 { 1566 err = errnoErr(e1) 1567 } 1568 return 1569 } 1570 1571 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1572 1573 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 1574 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 1575 if e1 != 0 { 1576 err = errnoErr(e1) 1577 } 1578 return 1579 } 1580 1581 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1582 1583 func getgroups(n int, list *_Gid_t) (nn int, err error) { 1584 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1585 nn = int(r0) 1586 if e1 != 0 { 1587 err = errnoErr(e1) 1588 } 1589 return 1590 } 1591 1592 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1593 1594 func setgroups(n int, list *_Gid_t) (err error) { 1595 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1596 if e1 != 0 { 1597 err = errnoErr(e1) 1598 } 1599 return 1600 } 1601 1602 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1603 1604 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 1605 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 1606 if e1 != 0 { 1607 err = errnoErr(e1) 1608 } 1609 return 1610 } 1611 1612 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1613 1614 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 1615 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 1616 if e1 != 0 { 1617 err = errnoErr(e1) 1618 } 1619 return 1620 } 1621 1622 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1623 1624 func socket(domain int, typ int, proto int) (fd int, err error) { 1625 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 1626 fd = int(r0) 1627 if e1 != 0 { 1628 err = errnoErr(e1) 1629 } 1630 return 1631 } 1632 1633 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1634 1635 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 1636 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 1637 if e1 != 0 { 1638 err = errnoErr(e1) 1639 } 1640 return 1641 } 1642 1643 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1644 1645 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1646 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1647 if e1 != 0 { 1648 err = errnoErr(e1) 1649 } 1650 return 1651 } 1652 1653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1654 1655 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 1656 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1657 if e1 != 0 { 1658 err = errnoErr(e1) 1659 } 1660 return 1661 } 1662 1663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1664 1665 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 1666 var _p0 unsafe.Pointer 1667 if len(p) > 0 { 1668 _p0 = unsafe.Pointer(&p[0]) 1669 } else { 1670 _p0 = unsafe.Pointer(&_zero) 1671 } 1672 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 1673 n = int(r0) 1674 if e1 != 0 { 1675 err = errnoErr(e1) 1676 } 1677 return 1678 } 1679 1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1681 1682 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 1683 var _p0 unsafe.Pointer 1684 if len(buf) > 0 { 1685 _p0 = unsafe.Pointer(&buf[0]) 1686 } else { 1687 _p0 = unsafe.Pointer(&_zero) 1688 } 1689 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 1690 if e1 != 0 { 1691 err = errnoErr(e1) 1692 } 1693 return 1694 } 1695 1696 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1697 1698 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1699 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1700 n = int(r0) 1701 if e1 != 0 { 1702 err = errnoErr(e1) 1703 } 1704 return 1705 } 1706 1707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1708 1709 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 1710 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 1711 n = int(r0) 1712 if e1 != 0 { 1713 err = errnoErr(e1) 1714 } 1715 return 1716 } 1717 1718 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1719 1720 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { 1721 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) 1722 xaddr = uintptr(r0) 1723 if e1 != 0 { 1724 err = errnoErr(e1) 1725 } 1726 return 1727 } 1728 1729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1730 1731 func Gettimeofday(tv *Timeval) (err error) { 1732 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1733 if e1 != 0 { 1734 err = errnoErr(e1) 1735 } 1736 return 1737 } 1738 1739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1740 1741 func Time(t *Time_t) (tt Time_t, err error) { 1742 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 1743 tt = Time_t(r0) 1744 if e1 != 0 { 1745 err = errnoErr(e1) 1746 } 1747 return 1748 } 1749 1750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1751 1752 func pipe2(p *[2]_C_int, flags int) (err error) { 1753 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1754 if e1 != 0 { 1755 err = errnoErr(e1) 1756 } 1757 return 1758 }