github.com/s1s1ty/go@v0.0.0-20180207192209-104445e3140f/src/syscall/zsyscall_linux_s390x.go (about) 1 // mksyscall.pl -tags linux,s390x syscall_linux.go syscall_linux_s390x.go 2 // MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT 3 4 // +build linux,s390x 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(len), 0, 0) 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, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 917 n = 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 Dup2(oldfd int, newfd int) (err error) { 1159 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 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 Fchown(fd int, uid int, gid int) (err error) { 1169 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 1170 if e1 != 0 { 1171 err = errnoErr(e1) 1172 } 1173 return 1174 } 1175 1176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1177 1178 func Fstat(fd int, stat *Stat_t) (err error) { 1179 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1180 if e1 != 0 { 1181 err = errnoErr(e1) 1182 } 1183 return 1184 } 1185 1186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1187 1188 func Fstatfs(fd int, buf *Statfs_t) (err error) { 1189 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) 1190 if e1 != 0 { 1191 err = errnoErr(e1) 1192 } 1193 return 1194 } 1195 1196 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1197 1198 func Ftruncate(fd int, length int64) (err error) { 1199 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) 1200 if e1 != 0 { 1201 err = errnoErr(e1) 1202 } 1203 return 1204 } 1205 1206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1207 1208 func Getegid() (egid int) { 1209 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 1210 egid = int(r0) 1211 return 1212 } 1213 1214 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1215 1216 func Geteuid() (euid int) { 1217 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 1218 euid = int(r0) 1219 return 1220 } 1221 1222 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1223 1224 func Getgid() (gid int) { 1225 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 1226 gid = int(r0) 1227 return 1228 } 1229 1230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1231 1232 func Getrlimit(resource int, rlim *Rlimit) (err error) { 1233 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1234 if e1 != 0 { 1235 err = errnoErr(e1) 1236 } 1237 return 1238 } 1239 1240 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1241 1242 func Getuid() (uid int) { 1243 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 1244 uid = int(r0) 1245 return 1246 } 1247 1248 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1249 1250 func InotifyInit() (fd int, err error) { 1251 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1252 fd = int(r0) 1253 if e1 != 0 { 1254 err = errnoErr(e1) 1255 } 1256 return 1257 } 1258 1259 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1260 1261 func Lchown(path string, uid int, gid int) (err error) { 1262 var _p0 *byte 1263 _p0, err = BytePtrFromString(path) 1264 if err != nil { 1265 return 1266 } 1267 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1268 if e1 != 0 { 1269 err = errnoErr(e1) 1270 } 1271 return 1272 } 1273 1274 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1275 1276 func Lstat(path string, stat *Stat_t) (err error) { 1277 var _p0 *byte 1278 _p0, err = BytePtrFromString(path) 1279 if err != nil { 1280 return 1281 } 1282 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1283 if e1 != 0 { 1284 err = errnoErr(e1) 1285 } 1286 return 1287 } 1288 1289 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1290 1291 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1292 var _p0 unsafe.Pointer 1293 if len(p) > 0 { 1294 _p0 = unsafe.Pointer(&p[0]) 1295 } else { 1296 _p0 = unsafe.Pointer(&_zero) 1297 } 1298 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1299 n = int(r0) 1300 if e1 != 0 { 1301 err = errnoErr(e1) 1302 } 1303 return 1304 } 1305 1306 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1307 1308 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1309 var _p0 unsafe.Pointer 1310 if len(p) > 0 { 1311 _p0 = unsafe.Pointer(&p[0]) 1312 } else { 1313 _p0 = unsafe.Pointer(&_zero) 1314 } 1315 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1316 n = int(r0) 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 Seek(fd int, offset int64, whence int) (off int64, err error) { 1326 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) 1327 off = int64(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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1337 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 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 sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1348 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1349 written = int(r0) 1350 if e1 != 0 { 1351 err = errnoErr(e1) 1352 } 1353 return 1354 } 1355 1356 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1357 1358 func Setfsgid(gid int) (err error) { 1359 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) 1360 if e1 != 0 { 1361 err = errnoErr(e1) 1362 } 1363 return 1364 } 1365 1366 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1367 1368 func Setfsuid(uid int) (err error) { 1369 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) 1370 if e1 != 0 { 1371 err = errnoErr(e1) 1372 } 1373 return 1374 } 1375 1376 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1377 1378 func Setregid(rgid int, egid int) (err error) { 1379 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1380 if e1 != 0 { 1381 err = errnoErr(e1) 1382 } 1383 return 1384 } 1385 1386 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1387 1388 func Setresgid(rgid int, egid int, sgid int) (err error) { 1389 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1390 if e1 != 0 { 1391 err = errnoErr(e1) 1392 } 1393 return 1394 } 1395 1396 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1397 1398 func Setresuid(ruid int, euid int, suid int) (err error) { 1399 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1400 if e1 != 0 { 1401 err = errnoErr(e1) 1402 } 1403 return 1404 } 1405 1406 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1407 1408 func Setrlimit(resource int, rlim *Rlimit) (err error) { 1409 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1410 if e1 != 0 { 1411 err = errnoErr(e1) 1412 } 1413 return 1414 } 1415 1416 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1417 1418 func Setreuid(ruid int, euid int) (err error) { 1419 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1420 if e1 != 0 { 1421 err = errnoErr(e1) 1422 } 1423 return 1424 } 1425 1426 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1427 1428 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { 1429 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1430 n = int64(r0) 1431 if e1 != 0 { 1432 err = errnoErr(e1) 1433 } 1434 return 1435 } 1436 1437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1438 1439 func Stat(path string, stat *Stat_t) (err error) { 1440 var _p0 *byte 1441 _p0, err = BytePtrFromString(path) 1442 if err != nil { 1443 return 1444 } 1445 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1446 if e1 != 0 { 1447 err = errnoErr(e1) 1448 } 1449 return 1450 } 1451 1452 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1453 1454 func Statfs(path string, buf *Statfs_t) (err error) { 1455 var _p0 *byte 1456 _p0, err = BytePtrFromString(path) 1457 if err != nil { 1458 return 1459 } 1460 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 1461 if e1 != 0 { 1462 err = errnoErr(e1) 1463 } 1464 return 1465 } 1466 1467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1468 1469 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 1470 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) 1471 if e1 != 0 { 1472 err = errnoErr(e1) 1473 } 1474 return 1475 } 1476 1477 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1478 1479 func Truncate(path string, length int64) (err error) { 1480 var _p0 *byte 1481 _p0, err = BytePtrFromString(path) 1482 if err != nil { 1483 return 1484 } 1485 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) 1486 if e1 != 0 { 1487 err = errnoErr(e1) 1488 } 1489 return 1490 } 1491 1492 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1493 1494 func getgroups(n int, list *_Gid_t) (nn int, err error) { 1495 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1496 nn = int(r0) 1497 if e1 != 0 { 1498 err = errnoErr(e1) 1499 } 1500 return 1501 } 1502 1503 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1504 1505 func setgroups(n int, list *_Gid_t) (err error) { 1506 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 1507 if e1 != 0 { 1508 err = errnoErr(e1) 1509 } 1510 return 1511 } 1512 1513 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1514 1515 func Gettimeofday(tv *Timeval) (err error) { 1516 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1517 if e1 != 0 { 1518 err = errnoErr(e1) 1519 } 1520 return 1521 } 1522 1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1524 1525 func pipe2(p *[2]_C_int, flags int) (err error) { 1526 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1527 if e1 != 0 { 1528 err = errnoErr(e1) 1529 } 1530 return 1531 }