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