github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/proto_vendor/golang.org/x/sys/unix/zsyscall_dragonfly_amd64.go (about) 1 // go run mksyscall.go -dragonfly -tags dragonfly,amd64 syscall_bsd.go syscall_dragonfly.go syscall_dragonfly_amd64.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build dragonfly,amd64 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 sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { 218 var _p0 unsafe.Pointer 219 if len(mib) > 0 { 220 _p0 = unsafe.Pointer(&mib[0]) 221 } else { 222 _p0 = unsafe.Pointer(&_zero) 223 } 224 _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) 225 if e1 != 0 { 226 err = errnoErr(e1) 227 } 228 return 229 } 230 231 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 232 233 func utimes(path string, timeval *[2]Timeval) (err error) { 234 var _p0 *byte 235 _p0, err = BytePtrFromString(path) 236 if err != nil { 237 return 238 } 239 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) 240 if e1 != 0 { 241 err = errnoErr(e1) 242 } 243 return 244 } 245 246 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 247 248 func futimes(fd int, timeval *[2]Timeval) (err error) { 249 _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) 250 if e1 != 0 { 251 err = errnoErr(e1) 252 } 253 return 254 } 255 256 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 257 258 func fcntl(fd int, cmd int, arg int) (val int, err error) { 259 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 260 val = int(r0) 261 if e1 != 0 { 262 err = errnoErr(e1) 263 } 264 return 265 } 266 267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 268 269 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 270 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 271 n = int(r0) 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 Madvise(b []byte, behav int) (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_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) 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 Mlock(b []byte) (err error) { 297 var _p0 unsafe.Pointer 298 if len(b) > 0 { 299 _p0 = unsafe.Pointer(&b[0]) 300 } else { 301 _p0 = unsafe.Pointer(&_zero) 302 } 303 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) 304 if e1 != 0 { 305 err = errnoErr(e1) 306 } 307 return 308 } 309 310 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 311 312 func Mlockall(flags int) (err error) { 313 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) 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 Mprotect(b []byte, prot 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_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 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 Msync(b []byte, flags int) (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_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 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 Munlock(b []byte) (err error) { 355 var _p0 unsafe.Pointer 356 if len(b) > 0 { 357 _p0 = unsafe.Pointer(&b[0]) 358 } else { 359 _p0 = unsafe.Pointer(&_zero) 360 } 361 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 362 if e1 != 0 { 363 err = errnoErr(e1) 364 } 365 return 366 } 367 368 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 369 370 func Munlockall() (err error) { 371 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 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() (r int, w int, err error) { 381 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) 382 r = int(r0) 383 w = int(r1) 384 if e1 != 0 { 385 err = errnoErr(e1) 386 } 387 return 388 } 389 390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 391 392 func extpread(fd int, p []byte, flags int, offset int64) (n int, err error) { 393 var _p0 unsafe.Pointer 394 if len(p) > 0 { 395 _p0 = unsafe.Pointer(&p[0]) 396 } else { 397 _p0 = unsafe.Pointer(&_zero) 398 } 399 r0, _, e1 := Syscall6(SYS_EXTPREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) 400 n = int(r0) 401 if e1 != 0 { 402 err = errnoErr(e1) 403 } 404 return 405 } 406 407 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 408 409 func extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error) { 410 var _p0 unsafe.Pointer 411 if len(p) > 0 { 412 _p0 = unsafe.Pointer(&p[0]) 413 } else { 414 _p0 = unsafe.Pointer(&_zero) 415 } 416 r0, _, e1 := Syscall6(SYS_EXTPWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(offset), 0) 417 n = int(r0) 418 if e1 != 0 { 419 err = errnoErr(e1) 420 } 421 return 422 } 423 424 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 425 426 func Getcwd(buf []byte) (n int, err error) { 427 var _p0 unsafe.Pointer 428 if len(buf) > 0 { 429 _p0 = unsafe.Pointer(&buf[0]) 430 } else { 431 _p0 = unsafe.Pointer(&_zero) 432 } 433 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 434 n = int(r0) 435 if e1 != 0 { 436 err = errnoErr(e1) 437 } 438 return 439 } 440 441 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 442 443 func ioctl(fd int, req uint, arg uintptr) (err error) { 444 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 445 if e1 != 0 { 446 err = errnoErr(e1) 447 } 448 return 449 } 450 451 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 452 453 func Access(path string, mode uint32) (err error) { 454 var _p0 *byte 455 _p0, err = BytePtrFromString(path) 456 if err != nil { 457 return 458 } 459 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 460 if e1 != 0 { 461 err = errnoErr(e1) 462 } 463 return 464 } 465 466 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 467 468 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 469 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) 470 if e1 != 0 { 471 err = errnoErr(e1) 472 } 473 return 474 } 475 476 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 477 478 func Chdir(path string) (err error) { 479 var _p0 *byte 480 _p0, err = BytePtrFromString(path) 481 if err != nil { 482 return 483 } 484 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 485 if e1 != 0 { 486 err = errnoErr(e1) 487 } 488 return 489 } 490 491 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 492 493 func Chflags(path string, flags int) (err error) { 494 var _p0 *byte 495 _p0, err = BytePtrFromString(path) 496 if err != nil { 497 return 498 } 499 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 500 if e1 != 0 { 501 err = errnoErr(e1) 502 } 503 return 504 } 505 506 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 507 508 func Chmod(path string, mode uint32) (err error) { 509 var _p0 *byte 510 _p0, err = BytePtrFromString(path) 511 if err != nil { 512 return 513 } 514 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 515 if e1 != 0 { 516 err = errnoErr(e1) 517 } 518 return 519 } 520 521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 522 523 func Chown(path string, uid int, gid int) (err error) { 524 var _p0 *byte 525 _p0, err = BytePtrFromString(path) 526 if err != nil { 527 return 528 } 529 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 530 if e1 != 0 { 531 err = errnoErr(e1) 532 } 533 return 534 } 535 536 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 537 538 func Chroot(path string) (err error) { 539 var _p0 *byte 540 _p0, err = BytePtrFromString(path) 541 if err != nil { 542 return 543 } 544 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 545 if e1 != 0 { 546 err = errnoErr(e1) 547 } 548 return 549 } 550 551 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 552 553 func Close(fd int) (err error) { 554 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 555 if e1 != 0 { 556 err = errnoErr(e1) 557 } 558 return 559 } 560 561 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 562 563 func Dup(fd int) (nfd int, err error) { 564 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 565 nfd = int(r0) 566 if e1 != 0 { 567 err = errnoErr(e1) 568 } 569 return 570 } 571 572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 573 574 func Dup2(from int, to int) (err error) { 575 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) 576 if e1 != 0 { 577 err = errnoErr(e1) 578 } 579 return 580 } 581 582 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 583 584 func Exit(code int) { 585 Syscall(SYS_EXIT, uintptr(code), 0, 0) 586 return 587 } 588 589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 590 591 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 592 var _p0 *byte 593 _p0, err = BytePtrFromString(path) 594 if err != nil { 595 return 596 } 597 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 598 if e1 != 0 { 599 err = errnoErr(e1) 600 } 601 return 602 } 603 604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 605 606 func Fchdir(fd int) (err error) { 607 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 608 if e1 != 0 { 609 err = errnoErr(e1) 610 } 611 return 612 } 613 614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 615 616 func Fchflags(fd int, flags int) (err error) { 617 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) 618 if e1 != 0 { 619 err = errnoErr(e1) 620 } 621 return 622 } 623 624 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 625 626 func Fchmod(fd int, mode uint32) (err error) { 627 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 628 if e1 != 0 { 629 err = errnoErr(e1) 630 } 631 return 632 } 633 634 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 635 636 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 637 var _p0 *byte 638 _p0, err = BytePtrFromString(path) 639 if err != nil { 640 return 641 } 642 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 643 if e1 != 0 { 644 err = errnoErr(e1) 645 } 646 return 647 } 648 649 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 650 651 func Fchown(fd int, uid int, gid int) (err error) { 652 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 653 if e1 != 0 { 654 err = errnoErr(e1) 655 } 656 return 657 } 658 659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 660 661 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 662 var _p0 *byte 663 _p0, err = BytePtrFromString(path) 664 if err != nil { 665 return 666 } 667 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 668 if e1 != 0 { 669 err = errnoErr(e1) 670 } 671 return 672 } 673 674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 675 676 func Flock(fd int, how int) (err error) { 677 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 678 if e1 != 0 { 679 err = errnoErr(e1) 680 } 681 return 682 } 683 684 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 685 686 func Fpathconf(fd int, name int) (val int, err error) { 687 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 688 val = int(r0) 689 if e1 != 0 { 690 err = errnoErr(e1) 691 } 692 return 693 } 694 695 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 696 697 func Fstat(fd int, stat *Stat_t) (err error) { 698 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 699 if e1 != 0 { 700 err = errnoErr(e1) 701 } 702 return 703 } 704 705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 706 707 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { 708 var _p0 *byte 709 _p0, err = BytePtrFromString(path) 710 if err != nil { 711 return 712 } 713 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 714 if e1 != 0 { 715 err = errnoErr(e1) 716 } 717 return 718 } 719 720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 721 722 func Fstatfs(fd int, stat *Statfs_t) (err error) { 723 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 724 if e1 != 0 { 725 err = errnoErr(e1) 726 } 727 return 728 } 729 730 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 731 732 func Fsync(fd int) (err error) { 733 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 734 if e1 != 0 { 735 err = errnoErr(e1) 736 } 737 return 738 } 739 740 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 741 742 func Ftruncate(fd int, length int64) (err error) { 743 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) 744 if e1 != 0 { 745 err = errnoErr(e1) 746 } 747 return 748 } 749 750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 751 752 func Getdents(fd int, buf []byte) (n int, err error) { 753 var _p0 unsafe.Pointer 754 if len(buf) > 0 { 755 _p0 = unsafe.Pointer(&buf[0]) 756 } else { 757 _p0 = unsafe.Pointer(&_zero) 758 } 759 r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 760 n = int(r0) 761 if e1 != 0 { 762 err = errnoErr(e1) 763 } 764 return 765 } 766 767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 768 769 func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 770 var _p0 unsafe.Pointer 771 if len(buf) > 0 { 772 _p0 = unsafe.Pointer(&buf[0]) 773 } else { 774 _p0 = unsafe.Pointer(&_zero) 775 } 776 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 777 n = int(r0) 778 if e1 != 0 { 779 err = errnoErr(e1) 780 } 781 return 782 } 783 784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 785 786 func Getdtablesize() (size int) { 787 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) 788 size = int(r0) 789 return 790 } 791 792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 793 794 func Getegid() (egid int) { 795 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 796 egid = int(r0) 797 return 798 } 799 800 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 801 802 func Geteuid() (uid int) { 803 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 804 uid = int(r0) 805 return 806 } 807 808 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 809 810 func Getgid() (gid int) { 811 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 812 gid = int(r0) 813 return 814 } 815 816 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 817 818 func Getpgid(pid int) (pgid int, err error) { 819 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 820 pgid = int(r0) 821 if e1 != 0 { 822 err = errnoErr(e1) 823 } 824 return 825 } 826 827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 828 829 func Getpgrp() (pgrp int) { 830 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 831 pgrp = int(r0) 832 return 833 } 834 835 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 836 837 func Getpid() (pid int) { 838 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 839 pid = int(r0) 840 return 841 } 842 843 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 844 845 func Getppid() (ppid int) { 846 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 847 ppid = int(r0) 848 return 849 } 850 851 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 852 853 func Getpriority(which int, who int) (prio int, err error) { 854 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 855 prio = int(r0) 856 if e1 != 0 { 857 err = errnoErr(e1) 858 } 859 return 860 } 861 862 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 863 864 func Getrlimit(which int, lim *Rlimit) (err error) { 865 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 866 if e1 != 0 { 867 err = errnoErr(e1) 868 } 869 return 870 } 871 872 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 873 874 func Getrusage(who int, rusage *Rusage) (err error) { 875 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 876 if e1 != 0 { 877 err = errnoErr(e1) 878 } 879 return 880 } 881 882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 883 884 func Getsid(pid int) (sid int, err error) { 885 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 886 sid = int(r0) 887 if e1 != 0 { 888 err = errnoErr(e1) 889 } 890 return 891 } 892 893 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 894 895 func Gettimeofday(tv *Timeval) (err error) { 896 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 897 if e1 != 0 { 898 err = errnoErr(e1) 899 } 900 return 901 } 902 903 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 904 905 func Getuid() (uid int) { 906 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 907 uid = int(r0) 908 return 909 } 910 911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 912 913 func Issetugid() (tainted bool) { 914 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) 915 tainted = bool(r0 != 0) 916 return 917 } 918 919 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 920 921 func Kill(pid int, signum syscall.Signal) (err error) { 922 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) 923 if e1 != 0 { 924 err = errnoErr(e1) 925 } 926 return 927 } 928 929 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 930 931 func Kqueue() (fd int, err error) { 932 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 933 fd = int(r0) 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 Lchown(path string, uid int, gid int) (err error) { 943 var _p0 *byte 944 _p0, err = BytePtrFromString(path) 945 if err != nil { 946 return 947 } 948 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 949 if e1 != 0 { 950 err = errnoErr(e1) 951 } 952 return 953 } 954 955 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 956 957 func Link(path string, link string) (err error) { 958 var _p0 *byte 959 _p0, err = BytePtrFromString(path) 960 if err != nil { 961 return 962 } 963 var _p1 *byte 964 _p1, err = BytePtrFromString(link) 965 if err != nil { 966 return 967 } 968 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 969 if e1 != 0 { 970 err = errnoErr(e1) 971 } 972 return 973 } 974 975 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 976 977 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { 978 var _p0 *byte 979 _p0, err = BytePtrFromString(path) 980 if err != nil { 981 return 982 } 983 var _p1 *byte 984 _p1, err = BytePtrFromString(link) 985 if err != nil { 986 return 987 } 988 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 989 if e1 != 0 { 990 err = errnoErr(e1) 991 } 992 return 993 } 994 995 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 996 997 func Listen(s int, backlog int) (err error) { 998 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) 999 if e1 != 0 { 1000 err = errnoErr(e1) 1001 } 1002 return 1003 } 1004 1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1006 1007 func Lstat(path string, stat *Stat_t) (err error) { 1008 var _p0 *byte 1009 _p0, err = BytePtrFromString(path) 1010 if err != nil { 1011 return 1012 } 1013 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1014 if e1 != 0 { 1015 err = errnoErr(e1) 1016 } 1017 return 1018 } 1019 1020 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1021 1022 func Mkdir(path string, mode uint32) (err error) { 1023 var _p0 *byte 1024 _p0, err = BytePtrFromString(path) 1025 if err != nil { 1026 return 1027 } 1028 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1029 if e1 != 0 { 1030 err = errnoErr(e1) 1031 } 1032 return 1033 } 1034 1035 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1036 1037 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1038 var _p0 *byte 1039 _p0, err = BytePtrFromString(path) 1040 if err != nil { 1041 return 1042 } 1043 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1044 if e1 != 0 { 1045 err = errnoErr(e1) 1046 } 1047 return 1048 } 1049 1050 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1051 1052 func Mkfifo(path string, mode uint32) (err error) { 1053 var _p0 *byte 1054 _p0, err = BytePtrFromString(path) 1055 if err != nil { 1056 return 1057 } 1058 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1059 if e1 != 0 { 1060 err = errnoErr(e1) 1061 } 1062 return 1063 } 1064 1065 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1066 1067 func Mknod(path string, mode uint32, dev int) (err error) { 1068 var _p0 *byte 1069 _p0, err = BytePtrFromString(path) 1070 if err != nil { 1071 return 1072 } 1073 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 1074 if e1 != 0 { 1075 err = errnoErr(e1) 1076 } 1077 return 1078 } 1079 1080 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1081 1082 func Mknodat(fd int, path string, mode uint32, dev int) (err error) { 1083 var _p0 *byte 1084 _p0, err = BytePtrFromString(path) 1085 if err != nil { 1086 return 1087 } 1088 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1089 if e1 != 0 { 1090 err = errnoErr(e1) 1091 } 1092 return 1093 } 1094 1095 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1096 1097 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1098 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1099 if e1 != 0 { 1100 err = errnoErr(e1) 1101 } 1102 return 1103 } 1104 1105 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1106 1107 func Open(path string, mode int, perm uint32) (fd int, err error) { 1108 var _p0 *byte 1109 _p0, err = BytePtrFromString(path) 1110 if err != nil { 1111 return 1112 } 1113 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 1114 fd = int(r0) 1115 if e1 != 0 { 1116 err = errnoErr(e1) 1117 } 1118 return 1119 } 1120 1121 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1122 1123 func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { 1124 var _p0 *byte 1125 _p0, err = BytePtrFromString(path) 1126 if err != nil { 1127 return 1128 } 1129 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) 1130 fd = int(r0) 1131 if e1 != 0 { 1132 err = errnoErr(e1) 1133 } 1134 return 1135 } 1136 1137 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1138 1139 func Pathconf(path string, name int) (val int, err error) { 1140 var _p0 *byte 1141 _p0, err = BytePtrFromString(path) 1142 if err != nil { 1143 return 1144 } 1145 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 1146 val = int(r0) 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 read(fd int, p []byte) (n int, err error) { 1156 var _p0 unsafe.Pointer 1157 if len(p) > 0 { 1158 _p0 = unsafe.Pointer(&p[0]) 1159 } else { 1160 _p0 = unsafe.Pointer(&_zero) 1161 } 1162 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1163 n = int(r0) 1164 if e1 != 0 { 1165 err = errnoErr(e1) 1166 } 1167 return 1168 } 1169 1170 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1171 1172 func Readlink(path string, buf []byte) (n int, err error) { 1173 var _p0 *byte 1174 _p0, err = BytePtrFromString(path) 1175 if err != nil { 1176 return 1177 } 1178 var _p1 unsafe.Pointer 1179 if len(buf) > 0 { 1180 _p1 = unsafe.Pointer(&buf[0]) 1181 } else { 1182 _p1 = unsafe.Pointer(&_zero) 1183 } 1184 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 1185 n = int(r0) 1186 if e1 != 0 { 1187 err = errnoErr(e1) 1188 } 1189 return 1190 } 1191 1192 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1193 1194 func Rename(from string, to string) (err error) { 1195 var _p0 *byte 1196 _p0, err = BytePtrFromString(from) 1197 if err != nil { 1198 return 1199 } 1200 var _p1 *byte 1201 _p1, err = BytePtrFromString(to) 1202 if err != nil { 1203 return 1204 } 1205 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1206 if e1 != 0 { 1207 err = errnoErr(e1) 1208 } 1209 return 1210 } 1211 1212 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1213 1214 func Renameat(fromfd int, from string, tofd int, to string) (err error) { 1215 var _p0 *byte 1216 _p0, err = BytePtrFromString(from) 1217 if err != nil { 1218 return 1219 } 1220 var _p1 *byte 1221 _p1, err = BytePtrFromString(to) 1222 if err != nil { 1223 return 1224 } 1225 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1226 if e1 != 0 { 1227 err = errnoErr(e1) 1228 } 1229 return 1230 } 1231 1232 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1233 1234 func Revoke(path string) (err error) { 1235 var _p0 *byte 1236 _p0, err = BytePtrFromString(path) 1237 if err != nil { 1238 return 1239 } 1240 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1241 if e1 != 0 { 1242 err = errnoErr(e1) 1243 } 1244 return 1245 } 1246 1247 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1248 1249 func Rmdir(path string) (err error) { 1250 var _p0 *byte 1251 _p0, err = BytePtrFromString(path) 1252 if err != nil { 1253 return 1254 } 1255 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 1256 if e1 != 0 { 1257 err = errnoErr(e1) 1258 } 1259 return 1260 } 1261 1262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1263 1264 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1265 r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) 1266 newoffset = int64(r0) 1267 if e1 != 0 { 1268 err = errnoErr(e1) 1269 } 1270 return 1271 } 1272 1273 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1274 1275 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1276 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1277 n = int(r0) 1278 if e1 != 0 { 1279 err = errnoErr(e1) 1280 } 1281 return 1282 } 1283 1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1285 1286 func Setegid(egid int) (err error) { 1287 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 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 Seteuid(euid int) (err error) { 1297 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) 1298 if e1 != 0 { 1299 err = errnoErr(e1) 1300 } 1301 return 1302 } 1303 1304 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1305 1306 func Setgid(gid int) (err error) { 1307 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 1308 if e1 != 0 { 1309 err = errnoErr(e1) 1310 } 1311 return 1312 } 1313 1314 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1315 1316 func Setlogin(name string) (err error) { 1317 var _p0 *byte 1318 _p0, err = BytePtrFromString(name) 1319 if err != nil { 1320 return 1321 } 1322 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1323 if e1 != 0 { 1324 err = errnoErr(e1) 1325 } 1326 return 1327 } 1328 1329 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1330 1331 func Setpgid(pid int, pgid int) (err error) { 1332 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 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 Setpriority(which int, who int, prio int) (err error) { 1342 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1343 if e1 != 0 { 1344 err = errnoErr(e1) 1345 } 1346 return 1347 } 1348 1349 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1350 1351 func Setregid(rgid int, egid int) (err error) { 1352 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1353 if e1 != 0 { 1354 err = errnoErr(e1) 1355 } 1356 return 1357 } 1358 1359 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1360 1361 func Setreuid(ruid int, euid int) (err error) { 1362 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1363 if e1 != 0 { 1364 err = errnoErr(e1) 1365 } 1366 return 1367 } 1368 1369 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1370 1371 func Setresgid(rgid int, egid int, sgid int) (err error) { 1372 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1373 if e1 != 0 { 1374 err = errnoErr(e1) 1375 } 1376 return 1377 } 1378 1379 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1380 1381 func Setresuid(ruid int, euid int, suid int) (err error) { 1382 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1383 if e1 != 0 { 1384 err = errnoErr(e1) 1385 } 1386 return 1387 } 1388 1389 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1390 1391 func Setrlimit(which int, lim *Rlimit) (err error) { 1392 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 1393 if e1 != 0 { 1394 err = errnoErr(e1) 1395 } 1396 return 1397 } 1398 1399 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1400 1401 func Setsid() (pid int, err error) { 1402 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1403 pid = int(r0) 1404 if e1 != 0 { 1405 err = errnoErr(e1) 1406 } 1407 return 1408 } 1409 1410 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1411 1412 func Settimeofday(tp *Timeval) (err error) { 1413 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1414 if e1 != 0 { 1415 err = errnoErr(e1) 1416 } 1417 return 1418 } 1419 1420 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1421 1422 func Setuid(uid int) (err error) { 1423 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1424 if e1 != 0 { 1425 err = errnoErr(e1) 1426 } 1427 return 1428 } 1429 1430 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1431 1432 func Stat(path string, stat *Stat_t) (err error) { 1433 var _p0 *byte 1434 _p0, err = BytePtrFromString(path) 1435 if err != nil { 1436 return 1437 } 1438 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1439 if e1 != 0 { 1440 err = errnoErr(e1) 1441 } 1442 return 1443 } 1444 1445 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1446 1447 func Statfs(path string, stat *Statfs_t) (err error) { 1448 var _p0 *byte 1449 _p0, err = BytePtrFromString(path) 1450 if err != nil { 1451 return 1452 } 1453 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1454 if e1 != 0 { 1455 err = errnoErr(e1) 1456 } 1457 return 1458 } 1459 1460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1461 1462 func Symlink(path string, link string) (err error) { 1463 var _p0 *byte 1464 _p0, err = BytePtrFromString(path) 1465 if err != nil { 1466 return 1467 } 1468 var _p1 *byte 1469 _p1, err = BytePtrFromString(link) 1470 if err != nil { 1471 return 1472 } 1473 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1474 if e1 != 0 { 1475 err = errnoErr(e1) 1476 } 1477 return 1478 } 1479 1480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1481 1482 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1483 var _p0 *byte 1484 _p0, err = BytePtrFromString(oldpath) 1485 if err != nil { 1486 return 1487 } 1488 var _p1 *byte 1489 _p1, err = BytePtrFromString(newpath) 1490 if err != nil { 1491 return 1492 } 1493 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1494 if e1 != 0 { 1495 err = errnoErr(e1) 1496 } 1497 return 1498 } 1499 1500 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1501 1502 func Sync() (err error) { 1503 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1504 if e1 != 0 { 1505 err = errnoErr(e1) 1506 } 1507 return 1508 } 1509 1510 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1511 1512 func Truncate(path string, length int64) (err error) { 1513 var _p0 *byte 1514 _p0, err = BytePtrFromString(path) 1515 if err != nil { 1516 return 1517 } 1518 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) 1519 if e1 != 0 { 1520 err = errnoErr(e1) 1521 } 1522 return 1523 } 1524 1525 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1526 1527 func Umask(newmask int) (oldmask int) { 1528 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1529 oldmask = int(r0) 1530 return 1531 } 1532 1533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1534 1535 func Undelete(path string) (err error) { 1536 var _p0 *byte 1537 _p0, err = BytePtrFromString(path) 1538 if err != nil { 1539 return 1540 } 1541 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1542 if e1 != 0 { 1543 err = errnoErr(e1) 1544 } 1545 return 1546 } 1547 1548 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1549 1550 func Unlink(path string) (err error) { 1551 var _p0 *byte 1552 _p0, err = BytePtrFromString(path) 1553 if err != nil { 1554 return 1555 } 1556 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1557 if e1 != 0 { 1558 err = errnoErr(e1) 1559 } 1560 return 1561 } 1562 1563 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1564 1565 func Unlinkat(dirfd int, path string, flags int) (err error) { 1566 var _p0 *byte 1567 _p0, err = BytePtrFromString(path) 1568 if err != nil { 1569 return 1570 } 1571 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 1572 if e1 != 0 { 1573 err = errnoErr(e1) 1574 } 1575 return 1576 } 1577 1578 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1579 1580 func Unmount(path string, flags int) (err error) { 1581 var _p0 *byte 1582 _p0, err = BytePtrFromString(path) 1583 if err != nil { 1584 return 1585 } 1586 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1587 if e1 != 0 { 1588 err = errnoErr(e1) 1589 } 1590 return 1591 } 1592 1593 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1594 1595 func write(fd int, p []byte) (n int, err error) { 1596 var _p0 unsafe.Pointer 1597 if len(p) > 0 { 1598 _p0 = unsafe.Pointer(&p[0]) 1599 } else { 1600 _p0 = unsafe.Pointer(&_zero) 1601 } 1602 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1603 n = int(r0) 1604 if e1 != 0 { 1605 err = errnoErr(e1) 1606 } 1607 return 1608 } 1609 1610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1611 1612 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1613 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) 1614 ret = uintptr(r0) 1615 if e1 != 0 { 1616 err = errnoErr(e1) 1617 } 1618 return 1619 } 1620 1621 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1622 1623 func munmap(addr uintptr, length uintptr) (err error) { 1624 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1625 if e1 != 0 { 1626 err = errnoErr(e1) 1627 } 1628 return 1629 } 1630 1631 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1632 1633 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1634 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1635 n = int(r0) 1636 if e1 != 0 { 1637 err = errnoErr(e1) 1638 } 1639 return 1640 } 1641 1642 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1643 1644 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1645 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1646 n = int(r0) 1647 if e1 != 0 { 1648 err = errnoErr(e1) 1649 } 1650 return 1651 } 1652 1653 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1654 1655 func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { 1656 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1657 nfd = int(r0) 1658 if e1 != 0 { 1659 err = errnoErr(e1) 1660 } 1661 return 1662 } 1663 1664 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1665 1666 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 1667 var _p0 *byte 1668 _p0, err = BytePtrFromString(path) 1669 if err != nil { 1670 return 1671 } 1672 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 1673 if e1 != 0 { 1674 err = errnoErr(e1) 1675 } 1676 return 1677 }