github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/proto_vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go (about) 1 // go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build openbsd,arm64 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 getgroups(ngid int, gid *_Gid_t) (n int, err error) { 18 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) 19 n = 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 setgroups(ngid int, gid *_Gid_t) (err error) { 29 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 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 wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 39 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 40 wpid = int(r0) 41 if e1 != 0 { 42 err = errnoErr(e1) 43 } 44 return 45 } 46 47 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 48 49 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 50 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 51 fd = int(r0) 52 if e1 != 0 { 53 err = errnoErr(e1) 54 } 55 return 56 } 57 58 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 59 60 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 61 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 62 if e1 != 0 { 63 err = errnoErr(e1) 64 } 65 return 66 } 67 68 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 69 70 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 71 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 72 if e1 != 0 { 73 err = errnoErr(e1) 74 } 75 return 76 } 77 78 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 79 80 func socket(domain int, typ int, proto int) (fd int, err error) { 81 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 82 fd = int(r0) 83 if e1 != 0 { 84 err = errnoErr(e1) 85 } 86 return 87 } 88 89 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 90 91 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 92 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 93 if e1 != 0 { 94 err = errnoErr(e1) 95 } 96 return 97 } 98 99 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 100 101 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 102 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 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 getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 112 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 113 if e1 != 0 { 114 err = errnoErr(e1) 115 } 116 return 117 } 118 119 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 120 121 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 122 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 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 Shutdown(s int, how int) (err error) { 132 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0) 133 if e1 != 0 { 134 err = errnoErr(e1) 135 } 136 return 137 } 138 139 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 140 141 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 142 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 143 if e1 != 0 { 144 err = errnoErr(e1) 145 } 146 return 147 } 148 149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 150 151 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 152 var _p0 unsafe.Pointer 153 if len(p) > 0 { 154 _p0 = unsafe.Pointer(&p[0]) 155 } else { 156 _p0 = unsafe.Pointer(&_zero) 157 } 158 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 159 n = int(r0) 160 if e1 != 0 { 161 err = errnoErr(e1) 162 } 163 return 164 } 165 166 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 167 168 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 169 var _p0 unsafe.Pointer 170 if len(buf) > 0 { 171 _p0 = unsafe.Pointer(&buf[0]) 172 } else { 173 _p0 = unsafe.Pointer(&_zero) 174 } 175 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 176 if e1 != 0 { 177 err = errnoErr(e1) 178 } 179 return 180 } 181 182 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 183 184 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 185 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 186 n = int(r0) 187 if e1 != 0 { 188 err = errnoErr(e1) 189 } 190 return 191 } 192 193 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 194 195 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 196 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 197 n = int(r0) 198 if e1 != 0 { 199 err = errnoErr(e1) 200 } 201 return 202 } 203 204 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 205 206 func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { 207 r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) 208 n = 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 utimes(path string, timeval *[2]Timeval) (err error) { 218 var _p0 *byte 219 _p0, err = BytePtrFromString(path) 220 if err != nil { 221 return 222 } 223 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) 224 if e1 != 0 { 225 err = errnoErr(e1) 226 } 227 return 228 } 229 230 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 231 232 func futimes(fd int, timeval *[2]Timeval) (err error) { 233 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) 234 if e1 != 0 { 235 err = errnoErr(e1) 236 } 237 return 238 } 239 240 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 241 242 func fcntl(fd int, cmd int, arg int) (val int, err error) { 243 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 244 val = int(r0) 245 if e1 != 0 { 246 err = errnoErr(e1) 247 } 248 return 249 } 250 251 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 252 253 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 254 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 255 n = int(r0) 256 if e1 != 0 { 257 err = errnoErr(e1) 258 } 259 return 260 } 261 262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 263 264 func Madvise(b []byte, behav int) (err error) { 265 var _p0 unsafe.Pointer 266 if len(b) > 0 { 267 _p0 = unsafe.Pointer(&b[0]) 268 } else { 269 _p0 = unsafe.Pointer(&_zero) 270 } 271 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) 272 if e1 != 0 { 273 err = errnoErr(e1) 274 } 275 return 276 } 277 278 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 279 280 func Mlock(b []byte) (err error) { 281 var _p0 unsafe.Pointer 282 if len(b) > 0 { 283 _p0 = unsafe.Pointer(&b[0]) 284 } else { 285 _p0 = unsafe.Pointer(&_zero) 286 } 287 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 288 if e1 != 0 { 289 err = errnoErr(e1) 290 } 291 return 292 } 293 294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 295 296 func Mlockall(flags int) (err error) { 297 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 298 if e1 != 0 { 299 err = errnoErr(e1) 300 } 301 return 302 } 303 304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 305 306 func Mprotect(b []byte, prot int) (err error) { 307 var _p0 unsafe.Pointer 308 if len(b) > 0 { 309 _p0 = unsafe.Pointer(&b[0]) 310 } else { 311 _p0 = unsafe.Pointer(&_zero) 312 } 313 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 314 if e1 != 0 { 315 err = errnoErr(e1) 316 } 317 return 318 } 319 320 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 321 322 func Msync(b []byte, flags int) (err error) { 323 var _p0 unsafe.Pointer 324 if len(b) > 0 { 325 _p0 = unsafe.Pointer(&b[0]) 326 } else { 327 _p0 = unsafe.Pointer(&_zero) 328 } 329 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 Munlock(b []byte) (err error) { 339 var _p0 unsafe.Pointer 340 if len(b) > 0 { 341 _p0 = unsafe.Pointer(&b[0]) 342 } else { 343 _p0 = unsafe.Pointer(&_zero) 344 } 345 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 346 if e1 != 0 { 347 err = errnoErr(e1) 348 } 349 return 350 } 351 352 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 353 354 func Munlockall() (err error) { 355 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 356 if e1 != 0 { 357 err = errnoErr(e1) 358 } 359 return 360 } 361 362 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 363 364 func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { 365 var _p0 unsafe.Pointer 366 if len(mib) > 0 { 367 _p0 = unsafe.Pointer(&mib[0]) 368 } else { 369 _p0 = unsafe.Pointer(&_zero) 370 } 371 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) 372 if e1 != 0 { 373 err = errnoErr(e1) 374 } 375 return 376 } 377 378 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 379 380 func pipe(p *[2]_C_int) (err error) { 381 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) 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 Getdents(fd int, buf []byte) (n int, err error) { 391 var _p0 unsafe.Pointer 392 if len(buf) > 0 { 393 _p0 = unsafe.Pointer(&buf[0]) 394 } else { 395 _p0 = unsafe.Pointer(&_zero) 396 } 397 r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 398 n = int(r0) 399 if e1 != 0 { 400 err = errnoErr(e1) 401 } 402 return 403 } 404 405 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 406 407 func Getcwd(buf []byte) (n int, err error) { 408 var _p0 unsafe.Pointer 409 if len(buf) > 0 { 410 _p0 = unsafe.Pointer(&buf[0]) 411 } else { 412 _p0 = unsafe.Pointer(&_zero) 413 } 414 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 415 n = int(r0) 416 if e1 != 0 { 417 err = errnoErr(e1) 418 } 419 return 420 } 421 422 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 423 424 func ioctl(fd int, req uint, arg uintptr) (err error) { 425 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 426 if e1 != 0 { 427 err = errnoErr(e1) 428 } 429 return 430 } 431 432 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 433 434 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 435 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) 436 n = int(r0) 437 if e1 != 0 { 438 err = errnoErr(e1) 439 } 440 return 441 } 442 443 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 444 445 func Access(path string, mode uint32) (err error) { 446 var _p0 *byte 447 _p0, err = BytePtrFromString(path) 448 if err != nil { 449 return 450 } 451 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 461 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) 462 if e1 != 0 { 463 err = errnoErr(e1) 464 } 465 return 466 } 467 468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 469 470 func Chdir(path string) (err error) { 471 var _p0 *byte 472 _p0, err = BytePtrFromString(path) 473 if err != nil { 474 return 475 } 476 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 477 if e1 != 0 { 478 err = errnoErr(e1) 479 } 480 return 481 } 482 483 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 484 485 func Chflags(path string, flags int) (err error) { 486 var _p0 *byte 487 _p0, err = BytePtrFromString(path) 488 if err != nil { 489 return 490 } 491 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 492 if e1 != 0 { 493 err = errnoErr(e1) 494 } 495 return 496 } 497 498 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 499 500 func Chmod(path string, mode uint32) (err error) { 501 var _p0 *byte 502 _p0, err = BytePtrFromString(path) 503 if err != nil { 504 return 505 } 506 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 507 if e1 != 0 { 508 err = errnoErr(e1) 509 } 510 return 511 } 512 513 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 514 515 func Chown(path string, uid int, gid int) (err error) { 516 var _p0 *byte 517 _p0, err = BytePtrFromString(path) 518 if err != nil { 519 return 520 } 521 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 522 if e1 != 0 { 523 err = errnoErr(e1) 524 } 525 return 526 } 527 528 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 529 530 func Chroot(path string) (err error) { 531 var _p0 *byte 532 _p0, err = BytePtrFromString(path) 533 if err != nil { 534 return 535 } 536 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 537 if e1 != 0 { 538 err = errnoErr(e1) 539 } 540 return 541 } 542 543 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 544 545 func Close(fd int) (err error) { 546 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 547 if e1 != 0 { 548 err = errnoErr(e1) 549 } 550 return 551 } 552 553 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 554 555 func Dup(fd int) (nfd int, err error) { 556 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 557 nfd = int(r0) 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 Dup2(from int, to int) (err error) { 567 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 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 Exit(code int) { 577 Syscall(SYS_EXIT, uintptr(code), 0, 0) 578 return 579 } 580 581 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 582 583 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 584 var _p0 *byte 585 _p0, err = BytePtrFromString(path) 586 if err != nil { 587 return 588 } 589 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 590 if e1 != 0 { 591 err = errnoErr(e1) 592 } 593 return 594 } 595 596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 597 598 func Fchdir(fd int) (err error) { 599 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 600 if e1 != 0 { 601 err = errnoErr(e1) 602 } 603 return 604 } 605 606 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 607 608 func Fchflags(fd int, flags int) (err error) { 609 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) 610 if e1 != 0 { 611 err = errnoErr(e1) 612 } 613 return 614 } 615 616 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 617 618 func Fchmod(fd int, mode uint32) (err error) { 619 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 620 if e1 != 0 { 621 err = errnoErr(e1) 622 } 623 return 624 } 625 626 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 627 628 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 629 var _p0 *byte 630 _p0, err = BytePtrFromString(path) 631 if err != nil { 632 return 633 } 634 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 635 if e1 != 0 { 636 err = errnoErr(e1) 637 } 638 return 639 } 640 641 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 642 643 func Fchown(fd int, uid int, gid int) (err error) { 644 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 645 if e1 != 0 { 646 err = errnoErr(e1) 647 } 648 return 649 } 650 651 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 652 653 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 654 var _p0 *byte 655 _p0, err = BytePtrFromString(path) 656 if err != nil { 657 return 658 } 659 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 660 if e1 != 0 { 661 err = errnoErr(e1) 662 } 663 return 664 } 665 666 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 667 668 func Flock(fd int, how int) (err error) { 669 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 670 if e1 != 0 { 671 err = errnoErr(e1) 672 } 673 return 674 } 675 676 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 677 678 func Fpathconf(fd int, name int) (val int, err error) { 679 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 680 val = int(r0) 681 if e1 != 0 { 682 err = errnoErr(e1) 683 } 684 return 685 } 686 687 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 688 689 func Fstat(fd int, stat *Stat_t) (err error) { 690 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 691 if e1 != 0 { 692 err = errnoErr(e1) 693 } 694 return 695 } 696 697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 698 699 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { 700 var _p0 *byte 701 _p0, err = BytePtrFromString(path) 702 if err != nil { 703 return 704 } 705 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 706 if e1 != 0 { 707 err = errnoErr(e1) 708 } 709 return 710 } 711 712 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 713 714 func Fstatfs(fd int, stat *Statfs_t) (err error) { 715 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 716 if e1 != 0 { 717 err = errnoErr(e1) 718 } 719 return 720 } 721 722 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 723 724 func Fsync(fd int) (err error) { 725 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 726 if e1 != 0 { 727 err = errnoErr(e1) 728 } 729 return 730 } 731 732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 733 734 func Ftruncate(fd int, length int64) (err error) { 735 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) 736 if e1 != 0 { 737 err = errnoErr(e1) 738 } 739 return 740 } 741 742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 743 744 func Getegid() (egid int) { 745 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 746 egid = int(r0) 747 return 748 } 749 750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 751 752 func Geteuid() (uid int) { 753 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 754 uid = int(r0) 755 return 756 } 757 758 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 759 760 func Getgid() (gid int) { 761 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 762 gid = int(r0) 763 return 764 } 765 766 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 767 768 func Getpgid(pid int) (pgid int, err error) { 769 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 770 pgid = int(r0) 771 if e1 != 0 { 772 err = errnoErr(e1) 773 } 774 return 775 } 776 777 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 778 779 func Getpgrp() (pgrp int) { 780 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 781 pgrp = int(r0) 782 return 783 } 784 785 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 786 787 func Getpid() (pid int) { 788 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 789 pid = int(r0) 790 return 791 } 792 793 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 794 795 func Getppid() (ppid int) { 796 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 797 ppid = int(r0) 798 return 799 } 800 801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 802 803 func Getpriority(which int, who int) (prio int, err error) { 804 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 805 prio = int(r0) 806 if e1 != 0 { 807 err = errnoErr(e1) 808 } 809 return 810 } 811 812 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 813 814 func Getrlimit(which int, lim *Rlimit) (err error) { 815 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 816 if e1 != 0 { 817 err = errnoErr(e1) 818 } 819 return 820 } 821 822 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 823 824 func Getrtable() (rtable int, err error) { 825 r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0) 826 rtable = int(r0) 827 if e1 != 0 { 828 err = errnoErr(e1) 829 } 830 return 831 } 832 833 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 834 835 func Getrusage(who int, rusage *Rusage) (err error) { 836 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 837 if e1 != 0 { 838 err = errnoErr(e1) 839 } 840 return 841 } 842 843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 844 845 func Getsid(pid int) (sid int, err error) { 846 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 847 sid = int(r0) 848 if e1 != 0 { 849 err = errnoErr(e1) 850 } 851 return 852 } 853 854 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 855 856 func Gettimeofday(tv *Timeval) (err error) { 857 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 858 if e1 != 0 { 859 err = errnoErr(e1) 860 } 861 return 862 } 863 864 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 865 866 func Getuid() (uid int) { 867 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 868 uid = int(r0) 869 return 870 } 871 872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 873 874 func Issetugid() (tainted bool) { 875 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) 876 tainted = bool(r0 != 0) 877 return 878 } 879 880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 881 882 func Kill(pid int, signum syscall.Signal) (err error) { 883 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) 884 if e1 != 0 { 885 err = errnoErr(e1) 886 } 887 return 888 } 889 890 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 891 892 func Kqueue() (fd int, err error) { 893 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 894 fd = int(r0) 895 if e1 != 0 { 896 err = errnoErr(e1) 897 } 898 return 899 } 900 901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 902 903 func Lchown(path string, uid int, gid int) (err error) { 904 var _p0 *byte 905 _p0, err = BytePtrFromString(path) 906 if err != nil { 907 return 908 } 909 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 910 if e1 != 0 { 911 err = errnoErr(e1) 912 } 913 return 914 } 915 916 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 917 918 func Link(path string, link string) (err error) { 919 var _p0 *byte 920 _p0, err = BytePtrFromString(path) 921 if err != nil { 922 return 923 } 924 var _p1 *byte 925 _p1, err = BytePtrFromString(link) 926 if err != nil { 927 return 928 } 929 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 930 if e1 != 0 { 931 err = errnoErr(e1) 932 } 933 return 934 } 935 936 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 937 938 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { 939 var _p0 *byte 940 _p0, err = BytePtrFromString(path) 941 if err != nil { 942 return 943 } 944 var _p1 *byte 945 _p1, err = BytePtrFromString(link) 946 if err != nil { 947 return 948 } 949 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 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 Listen(s int, backlog int) (err error) { 959 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) 960 if e1 != 0 { 961 err = errnoErr(e1) 962 } 963 return 964 } 965 966 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 967 968 func Lstat(path string, stat *Stat_t) (err error) { 969 var _p0 *byte 970 _p0, err = BytePtrFromString(path) 971 if err != nil { 972 return 973 } 974 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 975 if e1 != 0 { 976 err = errnoErr(e1) 977 } 978 return 979 } 980 981 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 982 983 func Mkdir(path string, mode uint32) (err error) { 984 var _p0 *byte 985 _p0, err = BytePtrFromString(path) 986 if err != nil { 987 return 988 } 989 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 990 if e1 != 0 { 991 err = errnoErr(e1) 992 } 993 return 994 } 995 996 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 997 998 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 999 var _p0 *byte 1000 _p0, err = BytePtrFromString(path) 1001 if err != nil { 1002 return 1003 } 1004 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1005 if e1 != 0 { 1006 err = errnoErr(e1) 1007 } 1008 return 1009 } 1010 1011 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1012 1013 func Mkfifo(path string, mode uint32) (err error) { 1014 var _p0 *byte 1015 _p0, err = BytePtrFromString(path) 1016 if err != nil { 1017 return 1018 } 1019 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1020 if e1 != 0 { 1021 err = errnoErr(e1) 1022 } 1023 return 1024 } 1025 1026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1027 1028 func Mkfifoat(dirfd int, path string, mode uint32) (err error) { 1029 var _p0 *byte 1030 _p0, err = BytePtrFromString(path) 1031 if err != nil { 1032 return 1033 } 1034 _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1035 if e1 != 0 { 1036 err = errnoErr(e1) 1037 } 1038 return 1039 } 1040 1041 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1042 1043 func Mknod(path string, mode uint32, dev int) (err error) { 1044 var _p0 *byte 1045 _p0, err = BytePtrFromString(path) 1046 if err != nil { 1047 return 1048 } 1049 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 1050 if e1 != 0 { 1051 err = errnoErr(e1) 1052 } 1053 return 1054 } 1055 1056 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1057 1058 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 1059 var _p0 *byte 1060 _p0, err = BytePtrFromString(path) 1061 if err != nil { 1062 return 1063 } 1064 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1065 if e1 != 0 { 1066 err = errnoErr(e1) 1067 } 1068 return 1069 } 1070 1071 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1072 1073 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1074 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1075 if e1 != 0 { 1076 err = errnoErr(e1) 1077 } 1078 return 1079 } 1080 1081 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1082 1083 func Open(path string, mode int, perm uint32) (fd int, err error) { 1084 var _p0 *byte 1085 _p0, err = BytePtrFromString(path) 1086 if err != nil { 1087 return 1088 } 1089 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 1090 fd = int(r0) 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 Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { 1100 var _p0 *byte 1101 _p0, err = BytePtrFromString(path) 1102 if err != nil { 1103 return 1104 } 1105 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) 1106 fd = int(r0) 1107 if e1 != 0 { 1108 err = errnoErr(e1) 1109 } 1110 return 1111 } 1112 1113 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1114 1115 func Pathconf(path string, name int) (val int, err error) { 1116 var _p0 *byte 1117 _p0, err = BytePtrFromString(path) 1118 if err != nil { 1119 return 1120 } 1121 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 1122 val = int(r0) 1123 if e1 != 0 { 1124 err = errnoErr(e1) 1125 } 1126 return 1127 } 1128 1129 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1130 1131 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1132 var _p0 unsafe.Pointer 1133 if len(p) > 0 { 1134 _p0 = unsafe.Pointer(&p[0]) 1135 } else { 1136 _p0 = unsafe.Pointer(&_zero) 1137 } 1138 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) 1139 n = int(r0) 1140 if e1 != 0 { 1141 err = errnoErr(e1) 1142 } 1143 return 1144 } 1145 1146 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1147 1148 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1149 var _p0 unsafe.Pointer 1150 if len(p) > 0 { 1151 _p0 = unsafe.Pointer(&p[0]) 1152 } else { 1153 _p0 = unsafe.Pointer(&_zero) 1154 } 1155 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) 1156 n = int(r0) 1157 if e1 != 0 { 1158 err = errnoErr(e1) 1159 } 1160 return 1161 } 1162 1163 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1164 1165 func read(fd int, p []byte) (n int, err error) { 1166 var _p0 unsafe.Pointer 1167 if len(p) > 0 { 1168 _p0 = unsafe.Pointer(&p[0]) 1169 } else { 1170 _p0 = unsafe.Pointer(&_zero) 1171 } 1172 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1173 n = int(r0) 1174 if e1 != 0 { 1175 err = errnoErr(e1) 1176 } 1177 return 1178 } 1179 1180 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1181 1182 func Readlink(path string, buf []byte) (n int, err error) { 1183 var _p0 *byte 1184 _p0, err = BytePtrFromString(path) 1185 if err != nil { 1186 return 1187 } 1188 var _p1 unsafe.Pointer 1189 if len(buf) > 0 { 1190 _p1 = unsafe.Pointer(&buf[0]) 1191 } else { 1192 _p1 = unsafe.Pointer(&_zero) 1193 } 1194 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 1195 n = int(r0) 1196 if e1 != 0 { 1197 err = errnoErr(e1) 1198 } 1199 return 1200 } 1201 1202 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1203 1204 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 1205 var _p0 *byte 1206 _p0, err = BytePtrFromString(path) 1207 if err != nil { 1208 return 1209 } 1210 var _p1 unsafe.Pointer 1211 if len(buf) > 0 { 1212 _p1 = unsafe.Pointer(&buf[0]) 1213 } else { 1214 _p1 = unsafe.Pointer(&_zero) 1215 } 1216 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 1217 n = int(r0) 1218 if e1 != 0 { 1219 err = errnoErr(e1) 1220 } 1221 return 1222 } 1223 1224 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1225 1226 func Rename(from string, to string) (err error) { 1227 var _p0 *byte 1228 _p0, err = BytePtrFromString(from) 1229 if err != nil { 1230 return 1231 } 1232 var _p1 *byte 1233 _p1, err = BytePtrFromString(to) 1234 if err != nil { 1235 return 1236 } 1237 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1238 if e1 != 0 { 1239 err = errnoErr(e1) 1240 } 1241 return 1242 } 1243 1244 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1245 1246 func Renameat(fromfd int, from string, tofd int, to string) (err error) { 1247 var _p0 *byte 1248 _p0, err = BytePtrFromString(from) 1249 if err != nil { 1250 return 1251 } 1252 var _p1 *byte 1253 _p1, err = BytePtrFromString(to) 1254 if err != nil { 1255 return 1256 } 1257 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1258 if e1 != 0 { 1259 err = errnoErr(e1) 1260 } 1261 return 1262 } 1263 1264 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1265 1266 func Revoke(path string) (err error) { 1267 var _p0 *byte 1268 _p0, err = BytePtrFromString(path) 1269 if err != nil { 1270 return 1271 } 1272 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1273 if e1 != 0 { 1274 err = errnoErr(e1) 1275 } 1276 return 1277 } 1278 1279 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1280 1281 func Rmdir(path string) (err error) { 1282 var _p0 *byte 1283 _p0, err = BytePtrFromString(path) 1284 if err != nil { 1285 return 1286 } 1287 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1297 r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) 1298 newoffset = int64(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 Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1308 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1309 n = int(r0) 1310 if e1 != 0 { 1311 err = errnoErr(e1) 1312 } 1313 return 1314 } 1315 1316 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1317 1318 func Setegid(egid int) (err error) { 1319 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) 1320 if e1 != 0 { 1321 err = errnoErr(e1) 1322 } 1323 return 1324 } 1325 1326 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1327 1328 func Seteuid(euid int) (err error) { 1329 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) 1330 if e1 != 0 { 1331 err = errnoErr(e1) 1332 } 1333 return 1334 } 1335 1336 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1337 1338 func Setgid(gid int) (err error) { 1339 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 1340 if e1 != 0 { 1341 err = errnoErr(e1) 1342 } 1343 return 1344 } 1345 1346 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1347 1348 func Setlogin(name string) (err error) { 1349 var _p0 *byte 1350 _p0, err = BytePtrFromString(name) 1351 if err != nil { 1352 return 1353 } 1354 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 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 Setpgid(pid int, pgid int) (err error) { 1364 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1365 if e1 != 0 { 1366 err = errnoErr(e1) 1367 } 1368 return 1369 } 1370 1371 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1372 1373 func Setpriority(which int, who int, prio int) (err error) { 1374 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1375 if e1 != 0 { 1376 err = errnoErr(e1) 1377 } 1378 return 1379 } 1380 1381 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1382 1383 func Setregid(rgid int, egid int) (err error) { 1384 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1385 if e1 != 0 { 1386 err = errnoErr(e1) 1387 } 1388 return 1389 } 1390 1391 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1392 1393 func Setreuid(ruid int, euid int) (err error) { 1394 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1395 if e1 != 0 { 1396 err = errnoErr(e1) 1397 } 1398 return 1399 } 1400 1401 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1402 1403 func Setresgid(rgid int, egid int, sgid int) (err error) { 1404 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1405 if e1 != 0 { 1406 err = errnoErr(e1) 1407 } 1408 return 1409 } 1410 1411 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1412 1413 func Setresuid(ruid int, euid int, suid int) (err error) { 1414 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 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 Setrlimit(which int, lim *Rlimit) (err error) { 1424 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 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 Setrtable(rtable int) (err error) { 1434 _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) 1435 if e1 != 0 { 1436 err = errnoErr(e1) 1437 } 1438 return 1439 } 1440 1441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1442 1443 func Setsid() (pid int, err error) { 1444 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1445 pid = int(r0) 1446 if e1 != 0 { 1447 err = errnoErr(e1) 1448 } 1449 return 1450 } 1451 1452 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1453 1454 func Settimeofday(tp *Timeval) (err error) { 1455 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1456 if e1 != 0 { 1457 err = errnoErr(e1) 1458 } 1459 return 1460 } 1461 1462 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1463 1464 func Setuid(uid int) (err error) { 1465 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1466 if e1 != 0 { 1467 err = errnoErr(e1) 1468 } 1469 return 1470 } 1471 1472 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1473 1474 func Stat(path string, stat *Stat_t) (err error) { 1475 var _p0 *byte 1476 _p0, err = BytePtrFromString(path) 1477 if err != nil { 1478 return 1479 } 1480 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1481 if e1 != 0 { 1482 err = errnoErr(e1) 1483 } 1484 return 1485 } 1486 1487 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1488 1489 func Statfs(path string, stat *Statfs_t) (err error) { 1490 var _p0 *byte 1491 _p0, err = BytePtrFromString(path) 1492 if err != nil { 1493 return 1494 } 1495 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 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 Symlink(path string, link string) (err error) { 1505 var _p0 *byte 1506 _p0, err = BytePtrFromString(path) 1507 if err != nil { 1508 return 1509 } 1510 var _p1 *byte 1511 _p1, err = BytePtrFromString(link) 1512 if err != nil { 1513 return 1514 } 1515 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1516 if e1 != 0 { 1517 err = errnoErr(e1) 1518 } 1519 return 1520 } 1521 1522 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1523 1524 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1525 var _p0 *byte 1526 _p0, err = BytePtrFromString(oldpath) 1527 if err != nil { 1528 return 1529 } 1530 var _p1 *byte 1531 _p1, err = BytePtrFromString(newpath) 1532 if err != nil { 1533 return 1534 } 1535 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1536 if e1 != 0 { 1537 err = errnoErr(e1) 1538 } 1539 return 1540 } 1541 1542 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1543 1544 func Sync() (err error) { 1545 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1546 if e1 != 0 { 1547 err = errnoErr(e1) 1548 } 1549 return 1550 } 1551 1552 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1553 1554 func Truncate(path string, length int64) (err error) { 1555 var _p0 *byte 1556 _p0, err = BytePtrFromString(path) 1557 if err != nil { 1558 return 1559 } 1560 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) 1561 if e1 != 0 { 1562 err = errnoErr(e1) 1563 } 1564 return 1565 } 1566 1567 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1568 1569 func Umask(newmask int) (oldmask int) { 1570 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1571 oldmask = int(r0) 1572 return 1573 } 1574 1575 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1576 1577 func Unlink(path string) (err error) { 1578 var _p0 *byte 1579 _p0, err = BytePtrFromString(path) 1580 if err != nil { 1581 return 1582 } 1583 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1584 if e1 != 0 { 1585 err = errnoErr(e1) 1586 } 1587 return 1588 } 1589 1590 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1591 1592 func Unlinkat(dirfd int, path string, flags int) (err error) { 1593 var _p0 *byte 1594 _p0, err = BytePtrFromString(path) 1595 if err != nil { 1596 return 1597 } 1598 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 1599 if e1 != 0 { 1600 err = errnoErr(e1) 1601 } 1602 return 1603 } 1604 1605 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1606 1607 func Unmount(path string, flags int) (err error) { 1608 var _p0 *byte 1609 _p0, err = BytePtrFromString(path) 1610 if err != nil { 1611 return 1612 } 1613 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1614 if e1 != 0 { 1615 err = errnoErr(e1) 1616 } 1617 return 1618 } 1619 1620 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1621 1622 func write(fd int, p []byte) (n int, err error) { 1623 var _p0 unsafe.Pointer 1624 if len(p) > 0 { 1625 _p0 = unsafe.Pointer(&p[0]) 1626 } else { 1627 _p0 = unsafe.Pointer(&_zero) 1628 } 1629 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1630 n = int(r0) 1631 if e1 != 0 { 1632 err = errnoErr(e1) 1633 } 1634 return 1635 } 1636 1637 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1638 1639 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1640 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) 1641 ret = uintptr(r0) 1642 if e1 != 0 { 1643 err = errnoErr(e1) 1644 } 1645 return 1646 } 1647 1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1649 1650 func munmap(addr uintptr, length uintptr) (err error) { 1651 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1652 if e1 != 0 { 1653 err = errnoErr(e1) 1654 } 1655 return 1656 } 1657 1658 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1659 1660 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1661 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1662 n = int(r0) 1663 if e1 != 0 { 1664 err = errnoErr(e1) 1665 } 1666 return 1667 } 1668 1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1670 1671 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1672 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1673 n = int(r0) 1674 if e1 != 0 { 1675 err = errnoErr(e1) 1676 } 1677 return 1678 } 1679 1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1681 1682 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 1683 var _p0 *byte 1684 _p0, err = BytePtrFromString(path) 1685 if err != nil { 1686 return 1687 } 1688 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 1689 if e1 != 0 { 1690 err = errnoErr(e1) 1691 } 1692 return 1693 }