github.com/go-xe2/third@v1.0.3/golang.org/x/sys/unix/zsyscall_linux_sparc64.go (about) 1 // go run mksyscall.go -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build linux,sparc64 5 6 package unix 7 8 import ( 9 "syscall" 10 "unsafe" 11 ) 12 13 var _ syscall.Errno 14 15 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 17 func fchmodat(dirfd int, path string, mode uint32) (err error) { 18 var _p0 *byte 19 _p0, err = BytePtrFromString(path) 20 if err != nil { 21 return 22 } 23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 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 ioctl(fd int, req uint, arg uintptr) (err error) { 33 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 34 if e1 != 0 { 35 err = errnoErr(e1) 36 } 37 return 38 } 39 40 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 41 42 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { 43 var _p0 *byte 44 _p0, err = BytePtrFromString(oldpath) 45 if err != nil { 46 return 47 } 48 var _p1 *byte 49 _p1, err = BytePtrFromString(newpath) 50 if err != nil { 51 return 52 } 53 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 54 if e1 != 0 { 55 err = errnoErr(e1) 56 } 57 return 58 } 59 60 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 61 62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 63 var _p0 *byte 64 _p0, err = BytePtrFromString(path) 65 if err != nil { 66 return 67 } 68 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 69 fd = int(r0) 70 if e1 != 0 { 71 err = errnoErr(e1) 72 } 73 return 74 } 75 76 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 77 78 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 79 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) 80 n = int(r0) 81 if e1 != 0 { 82 err = errnoErr(e1) 83 } 84 return 85 } 86 87 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 88 89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 90 var _p0 *byte 91 _p0, err = BytePtrFromString(path) 92 if err != nil { 93 return 94 } 95 var _p1 unsafe.Pointer 96 if len(buf) > 0 { 97 _p1 = unsafe.Pointer(&buf[0]) 98 } else { 99 _p1 = unsafe.Pointer(&_zero) 100 } 101 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 102 n = int(r0) 103 if e1 != 0 { 104 err = errnoErr(e1) 105 } 106 return 107 } 108 109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 110 111 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 112 var _p0 *byte 113 _p0, err = BytePtrFromString(oldpath) 114 if err != nil { 115 return 116 } 117 var _p1 *byte 118 _p1, err = BytePtrFromString(newpath) 119 if err != nil { 120 return 121 } 122 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 123 if e1 != 0 { 124 err = errnoErr(e1) 125 } 126 return 127 } 128 129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 130 131 func Unlinkat(dirfd int, path string, flags int) (err error) { 132 var _p0 *byte 133 _p0, err = BytePtrFromString(path) 134 if err != nil { 135 return 136 } 137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 138 if e1 != 0 { 139 err = errnoErr(e1) 140 } 141 return 142 } 143 144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 145 146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 147 var _p0 *byte 148 _p0, err = BytePtrFromString(path) 149 if err != nil { 150 return 151 } 152 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 153 if e1 != 0 { 154 err = errnoErr(e1) 155 } 156 return 157 } 158 159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 160 161 func Getcwd(buf []byte) (n int, err error) { 162 var _p0 unsafe.Pointer 163 if len(buf) > 0 { 164 _p0 = unsafe.Pointer(&buf[0]) 165 } else { 166 _p0 = unsafe.Pointer(&_zero) 167 } 168 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 169 n = int(r0) 170 if e1 != 0 { 171 err = errnoErr(e1) 172 } 173 return 174 } 175 176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 177 178 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 179 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 180 wpid = int(r0) 181 if e1 != 0 { 182 err = errnoErr(e1) 183 } 184 return 185 } 186 187 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 188 189 func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { 190 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 191 ret = int(r0) 192 if e1 != 0 { 193 err = errnoErr(e1) 194 } 195 return 196 } 197 198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 199 200 func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { 201 var _p0 unsafe.Pointer 202 if len(buf) > 0 { 203 _p0 = unsafe.Pointer(&buf[0]) 204 } else { 205 _p0 = unsafe.Pointer(&_zero) 206 } 207 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) 208 ret = int(r0) 209 if e1 != 0 { 210 err = errnoErr(e1) 211 } 212 return 213 } 214 215 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 216 217 func keyctlJoin(cmd int, arg2 string) (ret int, err error) { 218 var _p0 *byte 219 _p0, err = BytePtrFromString(arg2) 220 if err != nil { 221 return 222 } 223 r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) 224 ret = int(r0) 225 if e1 != 0 { 226 err = errnoErr(e1) 227 } 228 return 229 } 230 231 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 232 233 func keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { 234 var _p0 *byte 235 _p0, err = BytePtrFromString(arg3) 236 if err != nil { 237 return 238 } 239 var _p1 *byte 240 _p1, err = BytePtrFromString(arg4) 241 if err != nil { 242 return 243 } 244 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) 245 ret = int(r0) 246 if e1 != 0 { 247 err = errnoErr(e1) 248 } 249 return 250 } 251 252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 253 254 func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { 255 var _p0 unsafe.Pointer 256 if len(payload) > 0 { 257 _p0 = unsafe.Pointer(&payload[0]) 258 } else { 259 _p0 = unsafe.Pointer(&_zero) 260 } 261 _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) 262 if e1 != 0 { 263 err = errnoErr(e1) 264 } 265 return 266 } 267 268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 269 270 func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { 271 var _p0 unsafe.Pointer 272 if len(buf) > 0 { 273 _p0 = unsafe.Pointer(&buf[0]) 274 } else { 275 _p0 = unsafe.Pointer(&_zero) 276 } 277 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) 278 ret = int(r0) 279 if e1 != 0 { 280 err = errnoErr(e1) 281 } 282 return 283 } 284 285 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 286 287 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 288 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 289 if e1 != 0 { 290 err = errnoErr(e1) 291 } 292 return 293 } 294 295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 296 297 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { 298 var _p0 *byte 299 _p0, err = BytePtrFromString(arg) 300 if err != nil { 301 return 302 } 303 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0) 304 if e1 != 0 { 305 err = errnoErr(e1) 306 } 307 return 308 } 309 310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 311 312 func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { 313 var _p0 *byte 314 _p0, err = BytePtrFromString(source) 315 if err != nil { 316 return 317 } 318 var _p1 *byte 319 _p1, err = BytePtrFromString(target) 320 if err != nil { 321 return 322 } 323 var _p2 *byte 324 _p2, err = BytePtrFromString(fstype) 325 if err != nil { 326 return 327 } 328 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) 329 if e1 != 0 { 330 err = errnoErr(e1) 331 } 332 return 333 } 334 335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 336 337 func Acct(path string) (err error) { 338 var _p0 *byte 339 _p0, err = BytePtrFromString(path) 340 if err != nil { 341 return 342 } 343 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) 344 if e1 != 0 { 345 err = errnoErr(e1) 346 } 347 return 348 } 349 350 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 351 352 func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { 353 var _p0 *byte 354 _p0, err = BytePtrFromString(keyType) 355 if err != nil { 356 return 357 } 358 var _p1 *byte 359 _p1, err = BytePtrFromString(description) 360 if err != nil { 361 return 362 } 363 var _p2 unsafe.Pointer 364 if len(payload) > 0 { 365 _p2 = unsafe.Pointer(&payload[0]) 366 } else { 367 _p2 = unsafe.Pointer(&_zero) 368 } 369 r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) 370 id = int(r0) 371 if e1 != 0 { 372 err = errnoErr(e1) 373 } 374 return 375 } 376 377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 378 379 func Adjtimex(buf *Timex) (state int, err error) { 380 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) 381 state = int(r0) 382 if e1 != 0 { 383 err = errnoErr(e1) 384 } 385 return 386 } 387 388 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 389 390 func Chdir(path string) (err error) { 391 var _p0 *byte 392 _p0, err = BytePtrFromString(path) 393 if err != nil { 394 return 395 } 396 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 397 if e1 != 0 { 398 err = errnoErr(e1) 399 } 400 return 401 } 402 403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 404 405 func Chroot(path string) (err error) { 406 var _p0 *byte 407 _p0, err = BytePtrFromString(path) 408 if err != nil { 409 return 410 } 411 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 412 if e1 != 0 { 413 err = errnoErr(e1) 414 } 415 return 416 } 417 418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 419 420 func ClockGetres(clockid int32, res *Timespec) (err error) { 421 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) 422 if e1 != 0 { 423 err = errnoErr(e1) 424 } 425 return 426 } 427 428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 429 430 func ClockGettime(clockid int32, time *Timespec) (err error) { 431 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) 432 if e1 != 0 { 433 err = errnoErr(e1) 434 } 435 return 436 } 437 438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 439 440 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { 441 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) 442 if e1 != 0 { 443 err = errnoErr(e1) 444 } 445 return 446 } 447 448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 449 450 func Close(fd int) (err error) { 451 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 452 if e1 != 0 { 453 err = errnoErr(e1) 454 } 455 return 456 } 457 458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 459 460 func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 461 r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 462 n = int(r0) 463 if e1 != 0 { 464 err = errnoErr(e1) 465 } 466 return 467 } 468 469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 470 471 func DeleteModule(name string, flags int) (err error) { 472 var _p0 *byte 473 _p0, err = BytePtrFromString(name) 474 if err != nil { 475 return 476 } 477 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 478 if e1 != 0 { 479 err = errnoErr(e1) 480 } 481 return 482 } 483 484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 485 486 func Dup(oldfd int) (fd int, err error) { 487 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) 488 fd = int(r0) 489 if e1 != 0 { 490 err = errnoErr(e1) 491 } 492 return 493 } 494 495 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 496 497 func Dup3(oldfd int, newfd int, flags int) (err error) { 498 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) 499 if e1 != 0 { 500 err = errnoErr(e1) 501 } 502 return 503 } 504 505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 506 507 func EpollCreate1(flag int) (fd int, err error) { 508 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) 509 fd = int(r0) 510 if e1 != 0 { 511 err = errnoErr(e1) 512 } 513 return 514 } 515 516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 517 518 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { 519 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) 520 if e1 != 0 { 521 err = errnoErr(e1) 522 } 523 return 524 } 525 526 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 527 528 func Eventfd(initval uint, flags int) (fd int, err error) { 529 r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) 530 fd = int(r0) 531 if e1 != 0 { 532 err = errnoErr(e1) 533 } 534 return 535 } 536 537 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 538 539 func Exit(code int) { 540 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) 541 return 542 } 543 544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 545 546 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 547 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) 548 if e1 != 0 { 549 err = errnoErr(e1) 550 } 551 return 552 } 553 554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 555 556 func Fchdir(fd int) (err error) { 557 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 558 if e1 != 0 { 559 err = errnoErr(e1) 560 } 561 return 562 } 563 564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 565 566 func Fchmod(fd int, mode uint32) (err error) { 567 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 568 if e1 != 0 { 569 err = errnoErr(e1) 570 } 571 return 572 } 573 574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 575 576 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 577 var _p0 *byte 578 _p0, err = BytePtrFromString(path) 579 if err != nil { 580 return 581 } 582 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 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 fcntl(fd int, cmd int, arg int) (val int, err error) { 592 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 593 val = 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 Fdatasync(fd int) (err error) { 603 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 604 if e1 != 0 { 605 err = errnoErr(e1) 606 } 607 return 608 } 609 610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 611 612 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { 613 var _p0 *byte 614 _p0, err = BytePtrFromString(attr) 615 if err != nil { 616 return 617 } 618 var _p1 unsafe.Pointer 619 if len(dest) > 0 { 620 _p1 = unsafe.Pointer(&dest[0]) 621 } else { 622 _p1 = unsafe.Pointer(&_zero) 623 } 624 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) 625 sz = int(r0) 626 if e1 != 0 { 627 err = errnoErr(e1) 628 } 629 return 630 } 631 632 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 633 634 func FinitModule(fd int, params string, flags int) (err error) { 635 var _p0 *byte 636 _p0, err = BytePtrFromString(params) 637 if err != nil { 638 return 639 } 640 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 641 if e1 != 0 { 642 err = errnoErr(e1) 643 } 644 return 645 } 646 647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 648 649 func Flistxattr(fd int, dest []byte) (sz int, err error) { 650 var _p0 unsafe.Pointer 651 if len(dest) > 0 { 652 _p0 = unsafe.Pointer(&dest[0]) 653 } else { 654 _p0 = unsafe.Pointer(&_zero) 655 } 656 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) 657 sz = int(r0) 658 if e1 != 0 { 659 err = errnoErr(e1) 660 } 661 return 662 } 663 664 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 665 666 func Flock(fd int, how int) (err error) { 667 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 668 if e1 != 0 { 669 err = errnoErr(e1) 670 } 671 return 672 } 673 674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 675 676 func Fremovexattr(fd int, attr string) (err error) { 677 var _p0 *byte 678 _p0, err = BytePtrFromString(attr) 679 if err != nil { 680 return 681 } 682 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) 683 if e1 != 0 { 684 err = errnoErr(e1) 685 } 686 return 687 } 688 689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 690 691 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { 692 var _p0 *byte 693 _p0, err = BytePtrFromString(attr) 694 if err != nil { 695 return 696 } 697 var _p1 unsafe.Pointer 698 if len(dest) > 0 { 699 _p1 = unsafe.Pointer(&dest[0]) 700 } else { 701 _p1 = unsafe.Pointer(&_zero) 702 } 703 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 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 Fsync(fd int) (err error) { 713 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 714 if e1 != 0 { 715 err = errnoErr(e1) 716 } 717 return 718 } 719 720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 721 722 func Getdents(fd int, buf []byte) (n int, err error) { 723 var _p0 unsafe.Pointer 724 if len(buf) > 0 { 725 _p0 = unsafe.Pointer(&buf[0]) 726 } else { 727 _p0 = unsafe.Pointer(&_zero) 728 } 729 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 730 n = int(r0) 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 Getpgid(pid int) (pgid int, err error) { 740 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 741 pgid = int(r0) 742 if e1 != 0 { 743 err = errnoErr(e1) 744 } 745 return 746 } 747 748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 749 750 func Getpid() (pid int) { 751 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) 752 pid = int(r0) 753 return 754 } 755 756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 757 758 func Getppid() (ppid int) { 759 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) 760 ppid = int(r0) 761 return 762 } 763 764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 765 766 func Getpriority(which int, who int) (prio int, err error) { 767 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 768 prio = int(r0) 769 if e1 != 0 { 770 err = errnoErr(e1) 771 } 772 return 773 } 774 775 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 776 777 func Getrandom(buf []byte, flags int) (n int, err error) { 778 var _p0 unsafe.Pointer 779 if len(buf) > 0 { 780 _p0 = unsafe.Pointer(&buf[0]) 781 } else { 782 _p0 = unsafe.Pointer(&_zero) 783 } 784 r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) 785 n = int(r0) 786 if e1 != 0 { 787 err = errnoErr(e1) 788 } 789 return 790 } 791 792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 793 794 func Getrusage(who int, rusage *Rusage) (err error) { 795 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 796 if e1 != 0 { 797 err = errnoErr(e1) 798 } 799 return 800 } 801 802 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 803 804 func Getsid(pid int) (sid int, err error) { 805 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 806 sid = int(r0) 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 Gettid() (tid int) { 816 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) 817 tid = int(r0) 818 return 819 } 820 821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 822 823 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 824 var _p0 *byte 825 _p0, err = BytePtrFromString(path) 826 if err != nil { 827 return 828 } 829 var _p1 *byte 830 _p1, err = BytePtrFromString(attr) 831 if err != nil { 832 return 833 } 834 var _p2 unsafe.Pointer 835 if len(dest) > 0 { 836 _p2 = unsafe.Pointer(&dest[0]) 837 } else { 838 _p2 = unsafe.Pointer(&_zero) 839 } 840 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 841 sz = int(r0) 842 if e1 != 0 { 843 err = errnoErr(e1) 844 } 845 return 846 } 847 848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 849 850 func InitModule(moduleImage []byte, params string) (err error) { 851 var _p0 unsafe.Pointer 852 if len(moduleImage) > 0 { 853 _p0 = unsafe.Pointer(&moduleImage[0]) 854 } else { 855 _p0 = unsafe.Pointer(&_zero) 856 } 857 var _p1 *byte 858 _p1, err = BytePtrFromString(params) 859 if err != nil { 860 return 861 } 862 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) 863 if e1 != 0 { 864 err = errnoErr(e1) 865 } 866 return 867 } 868 869 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 870 871 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 872 var _p0 *byte 873 _p0, err = BytePtrFromString(pathname) 874 if err != nil { 875 return 876 } 877 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 878 watchdesc = int(r0) 879 if e1 != 0 { 880 err = errnoErr(e1) 881 } 882 return 883 } 884 885 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 886 887 func InotifyInit1(flags int) (fd int, err error) { 888 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 889 fd = int(r0) 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 899 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 900 success = int(r0) 901 if e1 != 0 { 902 err = errnoErr(e1) 903 } 904 return 905 } 906 907 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 908 909 func Kill(pid int, sig syscall.Signal) (err error) { 910 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 911 if e1 != 0 { 912 err = errnoErr(e1) 913 } 914 return 915 } 916 917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 918 919 func Klogctl(typ int, buf []byte) (n int, err error) { 920 var _p0 unsafe.Pointer 921 if len(buf) > 0 { 922 _p0 = unsafe.Pointer(&buf[0]) 923 } else { 924 _p0 = unsafe.Pointer(&_zero) 925 } 926 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 927 n = int(r0) 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 Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { 937 var _p0 *byte 938 _p0, err = BytePtrFromString(path) 939 if err != nil { 940 return 941 } 942 var _p1 *byte 943 _p1, err = BytePtrFromString(attr) 944 if err != nil { 945 return 946 } 947 var _p2 unsafe.Pointer 948 if len(dest) > 0 { 949 _p2 = unsafe.Pointer(&dest[0]) 950 } else { 951 _p2 = unsafe.Pointer(&_zero) 952 } 953 r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 954 sz = int(r0) 955 if e1 != 0 { 956 err = errnoErr(e1) 957 } 958 return 959 } 960 961 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 962 963 func Listxattr(path string, dest []byte) (sz int, err error) { 964 var _p0 *byte 965 _p0, err = BytePtrFromString(path) 966 if err != nil { 967 return 968 } 969 var _p1 unsafe.Pointer 970 if len(dest) > 0 { 971 _p1 = unsafe.Pointer(&dest[0]) 972 } else { 973 _p1 = unsafe.Pointer(&_zero) 974 } 975 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 976 sz = int(r0) 977 if e1 != 0 { 978 err = errnoErr(e1) 979 } 980 return 981 } 982 983 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 984 985 func Llistxattr(path string, dest []byte) (sz int, err error) { 986 var _p0 *byte 987 _p0, err = BytePtrFromString(path) 988 if err != nil { 989 return 990 } 991 var _p1 unsafe.Pointer 992 if len(dest) > 0 { 993 _p1 = unsafe.Pointer(&dest[0]) 994 } else { 995 _p1 = unsafe.Pointer(&_zero) 996 } 997 r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 998 sz = int(r0) 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 Lremovexattr(path string, attr string) (err error) { 1008 var _p0 *byte 1009 _p0, err = BytePtrFromString(path) 1010 if err != nil { 1011 return 1012 } 1013 var _p1 *byte 1014 _p1, err = BytePtrFromString(attr) 1015 if err != nil { 1016 return 1017 } 1018 _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1019 if e1 != 0 { 1020 err = errnoErr(e1) 1021 } 1022 return 1023 } 1024 1025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1026 1027 func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { 1028 var _p0 *byte 1029 _p0, err = BytePtrFromString(path) 1030 if err != nil { 1031 return 1032 } 1033 var _p1 *byte 1034 _p1, err = BytePtrFromString(attr) 1035 if err != nil { 1036 return 1037 } 1038 var _p2 unsafe.Pointer 1039 if len(data) > 0 { 1040 _p2 = unsafe.Pointer(&data[0]) 1041 } else { 1042 _p2 = unsafe.Pointer(&_zero) 1043 } 1044 _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 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 MemfdCreate(name string, flags int) (fd int, err error) { 1054 var _p0 *byte 1055 _p0, err = BytePtrFromString(name) 1056 if err != nil { 1057 return 1058 } 1059 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1060 fd = int(r0) 1061 if e1 != 0 { 1062 err = errnoErr(e1) 1063 } 1064 return 1065 } 1066 1067 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1068 1069 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1070 var _p0 *byte 1071 _p0, err = BytePtrFromString(path) 1072 if err != nil { 1073 return 1074 } 1075 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1076 if e1 != 0 { 1077 err = errnoErr(e1) 1078 } 1079 return 1080 } 1081 1082 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1083 1084 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 1085 var _p0 *byte 1086 _p0, err = BytePtrFromString(path) 1087 if err != nil { 1088 return 1089 } 1090 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1091 if e1 != 0 { 1092 err = errnoErr(e1) 1093 } 1094 return 1095 } 1096 1097 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1098 1099 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1100 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1101 if e1 != 0 { 1102 err = errnoErr(e1) 1103 } 1104 return 1105 } 1106 1107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1108 1109 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { 1110 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) 1111 fd = int(r0) 1112 if e1 != 0 { 1113 err = errnoErr(e1) 1114 } 1115 return 1116 } 1117 1118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1119 1120 func PivotRoot(newroot string, putold string) (err error) { 1121 var _p0 *byte 1122 _p0, err = BytePtrFromString(newroot) 1123 if err != nil { 1124 return 1125 } 1126 var _p1 *byte 1127 _p1, err = BytePtrFromString(putold) 1128 if err != nil { 1129 return 1130 } 1131 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1132 if e1 != 0 { 1133 err = errnoErr(e1) 1134 } 1135 return 1136 } 1137 1138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1139 1140 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { 1141 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) 1142 if e1 != 0 { 1143 err = errnoErr(e1) 1144 } 1145 return 1146 } 1147 1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1149 1150 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { 1151 _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 1152 if e1 != 0 { 1153 err = errnoErr(e1) 1154 } 1155 return 1156 } 1157 1158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1159 1160 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 1161 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) 1162 n = int(r0) 1163 if e1 != 0 { 1164 err = errnoErr(e1) 1165 } 1166 return 1167 } 1168 1169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1170 1171 func read(fd int, p []byte) (n int, err error) { 1172 var _p0 unsafe.Pointer 1173 if len(p) > 0 { 1174 _p0 = unsafe.Pointer(&p[0]) 1175 } else { 1176 _p0 = unsafe.Pointer(&_zero) 1177 } 1178 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1179 n = int(r0) 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 Removexattr(path string, attr string) (err error) { 1189 var _p0 *byte 1190 _p0, err = BytePtrFromString(path) 1191 if err != nil { 1192 return 1193 } 1194 var _p1 *byte 1195 _p1, err = BytePtrFromString(attr) 1196 if err != nil { 1197 return 1198 } 1199 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 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 Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { 1209 var _p0 *byte 1210 _p0, err = BytePtrFromString(oldpath) 1211 if err != nil { 1212 return 1213 } 1214 var _p1 *byte 1215 _p1, err = BytePtrFromString(newpath) 1216 if err != nil { 1217 return 1218 } 1219 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 1220 if e1 != 0 { 1221 err = errnoErr(e1) 1222 } 1223 return 1224 } 1225 1226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1227 1228 func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { 1229 var _p0 *byte 1230 _p0, err = BytePtrFromString(keyType) 1231 if err != nil { 1232 return 1233 } 1234 var _p1 *byte 1235 _p1, err = BytePtrFromString(description) 1236 if err != nil { 1237 return 1238 } 1239 var _p2 *byte 1240 _p2, err = BytePtrFromString(callback) 1241 if err != nil { 1242 return 1243 } 1244 r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) 1245 id = int(r0) 1246 if e1 != 0 { 1247 err = errnoErr(e1) 1248 } 1249 return 1250 } 1251 1252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1253 1254 func Setdomainname(p []byte) (err error) { 1255 var _p0 unsafe.Pointer 1256 if len(p) > 0 { 1257 _p0 = unsafe.Pointer(&p[0]) 1258 } else { 1259 _p0 = unsafe.Pointer(&_zero) 1260 } 1261 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 1262 if e1 != 0 { 1263 err = errnoErr(e1) 1264 } 1265 return 1266 } 1267 1268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1269 1270 func Sethostname(p []byte) (err error) { 1271 var _p0 unsafe.Pointer 1272 if len(p) > 0 { 1273 _p0 = unsafe.Pointer(&p[0]) 1274 } else { 1275 _p0 = unsafe.Pointer(&_zero) 1276 } 1277 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 1278 if e1 != 0 { 1279 err = errnoErr(e1) 1280 } 1281 return 1282 } 1283 1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1285 1286 func Setpgid(pid int, pgid int) (err error) { 1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1288 if e1 != 0 { 1289 err = errnoErr(e1) 1290 } 1291 return 1292 } 1293 1294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1295 1296 func Setsid() (pid int, err error) { 1297 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1298 pid = int(r0) 1299 if e1 != 0 { 1300 err = errnoErr(e1) 1301 } 1302 return 1303 } 1304 1305 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1306 1307 func Settimeofday(tv *Timeval) (err error) { 1308 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1309 if e1 != 0 { 1310 err = errnoErr(e1) 1311 } 1312 return 1313 } 1314 1315 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1316 1317 func Setns(fd int, nstype int) (err error) { 1318 _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) 1319 if e1 != 0 { 1320 err = errnoErr(e1) 1321 } 1322 return 1323 } 1324 1325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1326 1327 func Setpriority(which int, who int, prio int) (err error) { 1328 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1329 if e1 != 0 { 1330 err = errnoErr(e1) 1331 } 1332 return 1333 } 1334 1335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1336 1337 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 1338 var _p0 *byte 1339 _p0, err = BytePtrFromString(path) 1340 if err != nil { 1341 return 1342 } 1343 var _p1 *byte 1344 _p1, err = BytePtrFromString(attr) 1345 if err != nil { 1346 return 1347 } 1348 var _p2 unsafe.Pointer 1349 if len(data) > 0 { 1350 _p2 = unsafe.Pointer(&data[0]) 1351 } else { 1352 _p2 = unsafe.Pointer(&_zero) 1353 } 1354 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 1355 if e1 != 0 { 1356 err = errnoErr(e1) 1357 } 1358 return 1359 } 1360 1361 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1362 1363 func Signalfd(fd int, mask *Sigset_t, flags int) { 1364 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags)) 1365 return 1366 } 1367 1368 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1369 1370 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { 1371 var _p0 *byte 1372 _p0, err = BytePtrFromString(path) 1373 if err != nil { 1374 return 1375 } 1376 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) 1377 if e1 != 0 { 1378 err = errnoErr(e1) 1379 } 1380 return 1381 } 1382 1383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1384 1385 func Sync() { 1386 SyscallNoError(SYS_SYNC, 0, 0, 0) 1387 return 1388 } 1389 1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1391 1392 func Syncfs(fd int) (err error) { 1393 _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) 1394 if e1 != 0 { 1395 err = errnoErr(e1) 1396 } 1397 return 1398 } 1399 1400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1401 1402 func Sysinfo(info *Sysinfo_t) (err error) { 1403 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 1404 if e1 != 0 { 1405 err = errnoErr(e1) 1406 } 1407 return 1408 } 1409 1410 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1411 1412 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 1413 r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 1414 n = int64(r0) 1415 if e1 != 0 { 1416 err = errnoErr(e1) 1417 } 1418 return 1419 } 1420 1421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1422 1423 func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { 1424 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 1425 if e1 != 0 { 1426 err = errnoErr(e1) 1427 } 1428 return 1429 } 1430 1431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1432 1433 func Times(tms *Tms) (ticks uintptr, err error) { 1434 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 1435 ticks = uintptr(r0) 1436 if e1 != 0 { 1437 err = errnoErr(e1) 1438 } 1439 return 1440 } 1441 1442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1443 1444 func Umask(mask int) (oldmask int) { 1445 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) 1446 oldmask = int(r0) 1447 return 1448 } 1449 1450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1451 1452 func Uname(buf *Utsname) (err error) { 1453 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 1454 if e1 != 0 { 1455 err = errnoErr(e1) 1456 } 1457 return 1458 } 1459 1460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1461 1462 func Unmount(target string, flags int) (err error) { 1463 var _p0 *byte 1464 _p0, err = BytePtrFromString(target) 1465 if err != nil { 1466 return 1467 } 1468 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1469 if e1 != 0 { 1470 err = errnoErr(e1) 1471 } 1472 return 1473 } 1474 1475 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1476 1477 func Unshare(flags int) (err error) { 1478 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 1479 if e1 != 0 { 1480 err = errnoErr(e1) 1481 } 1482 return 1483 } 1484 1485 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1486 1487 func write(fd int, p []byte) (n int, err error) { 1488 var _p0 unsafe.Pointer 1489 if len(p) > 0 { 1490 _p0 = unsafe.Pointer(&p[0]) 1491 } else { 1492 _p0 = unsafe.Pointer(&_zero) 1493 } 1494 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1495 n = int(r0) 1496 if e1 != 0 { 1497 err = errnoErr(e1) 1498 } 1499 return 1500 } 1501 1502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1503 1504 func exitThread(code int) (err error) { 1505 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1506 if e1 != 0 { 1507 err = errnoErr(e1) 1508 } 1509 return 1510 } 1511 1512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1513 1514 func readlen(fd int, p *byte, np int) (n int, err error) { 1515 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1516 n = int(r0) 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 writelen(fd int, p *byte, np int) (n int, err error) { 1526 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1527 n = int(r0) 1528 if e1 != 0 { 1529 err = errnoErr(e1) 1530 } 1531 return 1532 } 1533 1534 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1535 1536 func munmap(addr uintptr, length uintptr) (err error) { 1537 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1538 if e1 != 0 { 1539 err = errnoErr(e1) 1540 } 1541 return 1542 } 1543 1544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1545 1546 func Madvise(b []byte, advice int) (err error) { 1547 var _p0 unsafe.Pointer 1548 if len(b) > 0 { 1549 _p0 = unsafe.Pointer(&b[0]) 1550 } else { 1551 _p0 = unsafe.Pointer(&_zero) 1552 } 1553 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1554 if e1 != 0 { 1555 err = errnoErr(e1) 1556 } 1557 return 1558 } 1559 1560 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1561 1562 func Mprotect(b []byte, prot int) (err error) { 1563 var _p0 unsafe.Pointer 1564 if len(b) > 0 { 1565 _p0 = unsafe.Pointer(&b[0]) 1566 } else { 1567 _p0 = unsafe.Pointer(&_zero) 1568 } 1569 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 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 Mlock(b []byte) (err error) { 1579 var _p0 unsafe.Pointer 1580 if len(b) > 0 { 1581 _p0 = unsafe.Pointer(&b[0]) 1582 } else { 1583 _p0 = unsafe.Pointer(&_zero) 1584 } 1585 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 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 Mlockall(flags int) (err error) { 1595 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 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 Msync(b []byte, flags int) (err error) { 1605 var _p0 unsafe.Pointer 1606 if len(b) > 0 { 1607 _p0 = unsafe.Pointer(&b[0]) 1608 } else { 1609 _p0 = unsafe.Pointer(&_zero) 1610 } 1611 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 1612 if e1 != 0 { 1613 err = errnoErr(e1) 1614 } 1615 return 1616 } 1617 1618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1619 1620 func Munlock(b []byte) (err error) { 1621 var _p0 unsafe.Pointer 1622 if len(b) > 0 { 1623 _p0 = unsafe.Pointer(&b[0]) 1624 } else { 1625 _p0 = unsafe.Pointer(&_zero) 1626 } 1627 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1628 if e1 != 0 { 1629 err = errnoErr(e1) 1630 } 1631 return 1632 } 1633 1634 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1635 1636 func Munlockall() (err error) { 1637 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1638 if e1 != 0 { 1639 err = errnoErr(e1) 1640 } 1641 return 1642 } 1643 1644 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1645 1646 func faccessat(dirfd int, path string, mode uint32) (err error) { 1647 var _p0 *byte 1648 _p0, err = BytePtrFromString(path) 1649 if err != nil { 1650 return 1651 } 1652 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1653 if e1 != 0 { 1654 err = errnoErr(e1) 1655 } 1656 return 1657 } 1658 1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1660 1661 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 1662 var _p0 unsafe.Pointer 1663 if len(events) > 0 { 1664 _p0 = unsafe.Pointer(&events[0]) 1665 } else { 1666 _p0 = unsafe.Pointer(&_zero) 1667 } 1668 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 1669 n = int(r0) 1670 if e1 != 0 { 1671 err = errnoErr(e1) 1672 } 1673 return 1674 } 1675 1676 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1677 1678 func Fadvise(fd int, offset int64, length int64, advice int) (err error) { 1679 _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) 1680 if e1 != 0 { 1681 err = errnoErr(e1) 1682 } 1683 return 1684 } 1685 1686 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1687 1688 func Dup2(oldfd int, newfd int) (err error) { 1689 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 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 Fchown(fd int, uid int, gid int) (err error) { 1699 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 1700 if e1 != 0 { 1701 err = errnoErr(e1) 1702 } 1703 return 1704 } 1705 1706 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1707 1708 func Fstat(fd int, stat *Stat_t) (err error) { 1709 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1710 if e1 != 0 { 1711 err = errnoErr(e1) 1712 } 1713 return 1714 } 1715 1716 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1717 1718 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { 1719 var _p0 *byte 1720 _p0, err = BytePtrFromString(path) 1721 if err != nil { 1722 return 1723 } 1724 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 1725 if e1 != 0 { 1726 err = errnoErr(e1) 1727 } 1728 return 1729 } 1730 1731 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1732 1733 func Fstatfs(fd int, buf *Statfs_t) (err error) { 1734 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) 1735 if e1 != 0 { 1736 err = errnoErr(e1) 1737 } 1738 return 1739 } 1740 1741 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1742 1743 func Ftruncate(fd int, length int64) (err error) { 1744 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) 1745 if e1 != 0 { 1746 err = errnoErr(e1) 1747 } 1748 return 1749 } 1750 1751 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1752 1753 func Getegid() (egid int) { 1754 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) 1755 egid = int(r0) 1756 return 1757 } 1758 1759 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1760 1761 func Geteuid() (euid int) { 1762 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) 1763 euid = int(r0) 1764 return 1765 } 1766 1767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1768 1769 func Getgid() (gid int) { 1770 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) 1771 gid = int(r0) 1772 return 1773 } 1774 1775 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1776 1777 func Getrlimit(resource int, rlim *Rlimit) (err error) { 1778 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1779 if e1 != 0 { 1780 err = errnoErr(e1) 1781 } 1782 return 1783 } 1784 1785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1786 1787 func Getuid() (uid int) { 1788 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) 1789 uid = int(r0) 1790 return 1791 } 1792 1793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1794 1795 func InotifyInit() (fd int, err error) { 1796 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1797 fd = int(r0) 1798 if e1 != 0 { 1799 err = errnoErr(e1) 1800 } 1801 return 1802 } 1803 1804 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1805 1806 func Lchown(path string, uid int, gid int) (err error) { 1807 var _p0 *byte 1808 _p0, err = BytePtrFromString(path) 1809 if err != nil { 1810 return 1811 } 1812 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1813 if e1 != 0 { 1814 err = errnoErr(e1) 1815 } 1816 return 1817 } 1818 1819 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1820 1821 func Listen(s int, n int) (err error) { 1822 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1823 if e1 != 0 { 1824 err = errnoErr(e1) 1825 } 1826 return 1827 } 1828 1829 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1830 1831 func Lstat(path string, stat *Stat_t) (err error) { 1832 var _p0 *byte 1833 _p0, err = BytePtrFromString(path) 1834 if err != nil { 1835 return 1836 } 1837 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1838 if e1 != 0 { 1839 err = errnoErr(e1) 1840 } 1841 return 1842 } 1843 1844 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1845 1846 func Pause() (err error) { 1847 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 1848 if e1 != 0 { 1849 err = errnoErr(e1) 1850 } 1851 return 1852 } 1853 1854 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1855 1856 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1857 var _p0 unsafe.Pointer 1858 if len(p) > 0 { 1859 _p0 = unsafe.Pointer(&p[0]) 1860 } else { 1861 _p0 = unsafe.Pointer(&_zero) 1862 } 1863 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1864 n = int(r0) 1865 if e1 != 0 { 1866 err = errnoErr(e1) 1867 } 1868 return 1869 } 1870 1871 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1872 1873 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1874 var _p0 unsafe.Pointer 1875 if len(p) > 0 { 1876 _p0 = unsafe.Pointer(&p[0]) 1877 } else { 1878 _p0 = unsafe.Pointer(&_zero) 1879 } 1880 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1881 n = int(r0) 1882 if e1 != 0 { 1883 err = errnoErr(e1) 1884 } 1885 return 1886 } 1887 1888 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1889 1890 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 1891 var _p0 *byte 1892 _p0, err = BytePtrFromString(oldpath) 1893 if err != nil { 1894 return 1895 } 1896 var _p1 *byte 1897 _p1, err = BytePtrFromString(newpath) 1898 if err != nil { 1899 return 1900 } 1901 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1902 if e1 != 0 { 1903 err = errnoErr(e1) 1904 } 1905 return 1906 } 1907 1908 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1909 1910 func Seek(fd int, offset int64, whence int) (off int64, err error) { 1911 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) 1912 off = int64(r0) 1913 if e1 != 0 { 1914 err = errnoErr(e1) 1915 } 1916 return 1917 } 1918 1919 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1920 1921 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1922 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1923 n = int(r0) 1924 if e1 != 0 { 1925 err = errnoErr(e1) 1926 } 1927 return 1928 } 1929 1930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1931 1932 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1933 r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1934 written = int(r0) 1935 if e1 != 0 { 1936 err = errnoErr(e1) 1937 } 1938 return 1939 } 1940 1941 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1942 1943 func Setfsgid(gid int) (err error) { 1944 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) 1945 if e1 != 0 { 1946 err = errnoErr(e1) 1947 } 1948 return 1949 } 1950 1951 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1952 1953 func Setfsuid(uid int) (err error) { 1954 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) 1955 if e1 != 0 { 1956 err = errnoErr(e1) 1957 } 1958 return 1959 } 1960 1961 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1962 1963 func Setregid(rgid int, egid int) (err error) { 1964 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1965 if e1 != 0 { 1966 err = errnoErr(e1) 1967 } 1968 return 1969 } 1970 1971 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1972 1973 func Setresgid(rgid int, egid int, sgid int) (err error) { 1974 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1975 if e1 != 0 { 1976 err = errnoErr(e1) 1977 } 1978 return 1979 } 1980 1981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1982 1983 func Setresuid(ruid int, euid int, suid int) (err error) { 1984 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1985 if e1 != 0 { 1986 err = errnoErr(e1) 1987 } 1988 return 1989 } 1990 1991 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1992 1993 func Setrlimit(resource int, rlim *Rlimit) (err error) { 1994 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 1995 if e1 != 0 { 1996 err = errnoErr(e1) 1997 } 1998 return 1999 } 2000 2001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2002 2003 func Setreuid(ruid int, euid int) (err error) { 2004 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 2005 if e1 != 0 { 2006 err = errnoErr(e1) 2007 } 2008 return 2009 } 2010 2011 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2012 2013 func Shutdown(fd int, how int) (err error) { 2014 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 2015 if e1 != 0 { 2016 err = errnoErr(e1) 2017 } 2018 return 2019 } 2020 2021 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2022 2023 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { 2024 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 2025 n = int64(r0) 2026 if e1 != 0 { 2027 err = errnoErr(e1) 2028 } 2029 return 2030 } 2031 2032 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2033 2034 func Stat(path string, stat *Stat_t) (err error) { 2035 var _p0 *byte 2036 _p0, err = BytePtrFromString(path) 2037 if err != nil { 2038 return 2039 } 2040 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 2041 if e1 != 0 { 2042 err = errnoErr(e1) 2043 } 2044 return 2045 } 2046 2047 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2048 2049 func Statfs(path string, buf *Statfs_t) (err error) { 2050 var _p0 *byte 2051 _p0, err = BytePtrFromString(path) 2052 if err != nil { 2053 return 2054 } 2055 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 2056 if e1 != 0 { 2057 err = errnoErr(e1) 2058 } 2059 return 2060 } 2061 2062 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2063 2064 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 2065 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) 2066 if e1 != 0 { 2067 err = errnoErr(e1) 2068 } 2069 return 2070 } 2071 2072 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2073 2074 func Truncate(path string, length int64) (err error) { 2075 var _p0 *byte 2076 _p0, err = BytePtrFromString(path) 2077 if err != nil { 2078 return 2079 } 2080 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) 2081 if e1 != 0 { 2082 err = errnoErr(e1) 2083 } 2084 return 2085 } 2086 2087 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2088 2089 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 2090 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 2091 fd = int(r0) 2092 if e1 != 0 { 2093 err = errnoErr(e1) 2094 } 2095 return 2096 } 2097 2098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2099 2100 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 2101 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 2102 fd = int(r0) 2103 if e1 != 0 { 2104 err = errnoErr(e1) 2105 } 2106 return 2107 } 2108 2109 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2110 2111 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 2112 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 2113 if e1 != 0 { 2114 err = errnoErr(e1) 2115 } 2116 return 2117 } 2118 2119 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2120 2121 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 2122 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 2123 if e1 != 0 { 2124 err = errnoErr(e1) 2125 } 2126 return 2127 } 2128 2129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2130 2131 func getgroups(n int, list *_Gid_t) (nn int, err error) { 2132 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2133 nn = int(r0) 2134 if e1 != 0 { 2135 err = errnoErr(e1) 2136 } 2137 return 2138 } 2139 2140 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2141 2142 func setgroups(n int, list *_Gid_t) (err error) { 2143 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2144 if e1 != 0 { 2145 err = errnoErr(e1) 2146 } 2147 return 2148 } 2149 2150 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2151 2152 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 2153 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 2154 if e1 != 0 { 2155 err = errnoErr(e1) 2156 } 2157 return 2158 } 2159 2160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2161 2162 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 2163 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 2164 if e1 != 0 { 2165 err = errnoErr(e1) 2166 } 2167 return 2168 } 2169 2170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2171 2172 func socket(domain int, typ int, proto int) (fd int, err error) { 2173 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 2174 fd = int(r0) 2175 if e1 != 0 { 2176 err = errnoErr(e1) 2177 } 2178 return 2179 } 2180 2181 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2182 2183 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 2184 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 2185 if e1 != 0 { 2186 err = errnoErr(e1) 2187 } 2188 return 2189 } 2190 2191 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2192 2193 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 2194 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 2195 if e1 != 0 { 2196 err = errnoErr(e1) 2197 } 2198 return 2199 } 2200 2201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2202 2203 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 2204 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 2205 if e1 != 0 { 2206 err = errnoErr(e1) 2207 } 2208 return 2209 } 2210 2211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2212 2213 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 2214 var _p0 unsafe.Pointer 2215 if len(p) > 0 { 2216 _p0 = unsafe.Pointer(&p[0]) 2217 } else { 2218 _p0 = unsafe.Pointer(&_zero) 2219 } 2220 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 2221 n = int(r0) 2222 if e1 != 0 { 2223 err = errnoErr(e1) 2224 } 2225 return 2226 } 2227 2228 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2229 2230 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 2231 var _p0 unsafe.Pointer 2232 if len(buf) > 0 { 2233 _p0 = unsafe.Pointer(&buf[0]) 2234 } else { 2235 _p0 = unsafe.Pointer(&_zero) 2236 } 2237 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 2238 if e1 != 0 { 2239 err = errnoErr(e1) 2240 } 2241 return 2242 } 2243 2244 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2245 2246 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 2247 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 2248 n = int(r0) 2249 if e1 != 0 { 2250 err = errnoErr(e1) 2251 } 2252 return 2253 } 2254 2255 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2256 2257 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 2258 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 2259 n = int(r0) 2260 if e1 != 0 { 2261 err = errnoErr(e1) 2262 } 2263 return 2264 } 2265 2266 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2267 2268 func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { 2269 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) 2270 xaddr = uintptr(r0) 2271 if e1 != 0 { 2272 err = errnoErr(e1) 2273 } 2274 return 2275 } 2276 2277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2278 2279 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { 2280 var _p0 *byte 2281 _p0, err = BytePtrFromString(path) 2282 if err != nil { 2283 return 2284 } 2285 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 2286 if e1 != 0 { 2287 err = errnoErr(e1) 2288 } 2289 return 2290 } 2291 2292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2293 2294 func Gettimeofday(tv *Timeval) (err error) { 2295 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 2296 if e1 != 0 { 2297 err = errnoErr(e1) 2298 } 2299 return 2300 } 2301 2302 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2303 2304 func Utime(path string, buf *Utimbuf) (err error) { 2305 var _p0 *byte 2306 _p0, err = BytePtrFromString(path) 2307 if err != nil { 2308 return 2309 } 2310 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 2311 if e1 != 0 { 2312 err = errnoErr(e1) 2313 } 2314 return 2315 } 2316 2317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2318 2319 func utimes(path string, times *[2]Timeval) (err error) { 2320 var _p0 *byte 2321 _p0, err = BytePtrFromString(path) 2322 if err != nil { 2323 return 2324 } 2325 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 2326 if e1 != 0 { 2327 err = errnoErr(e1) 2328 } 2329 return 2330 } 2331 2332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2333 2334 func pipe(p *[2]_C_int) (err error) { 2335 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) 2336 if e1 != 0 { 2337 err = errnoErr(e1) 2338 } 2339 return 2340 } 2341 2342 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2343 2344 func pipe2(p *[2]_C_int, flags int) (err error) { 2345 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 2346 if e1 != 0 { 2347 err = errnoErr(e1) 2348 } 2349 return 2350 } 2351 2352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2353 2354 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 2355 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 2356 n = int(r0) 2357 if e1 != 0 { 2358 err = errnoErr(e1) 2359 } 2360 return 2361 }