github.com/Andyfoo/golang/x/sys@v0.0.0-20190901054642-57c1bf301704/unix/zsyscall_openbsd_arm.go (about) 1 // go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build openbsd,arm 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(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 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) 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), uintptr(offset>>32)) 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), uintptr(offset>>32)) 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, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) 1298 newoffset = int64(int64(r1)<<32 | 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(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { 1308 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1309 if e1 != 0 { 1310 err = errnoErr(e1) 1311 } 1312 return 1313 } 1314 1315 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1316 1317 func Setegid(egid int) (err error) { 1318 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) 1319 if e1 != 0 { 1320 err = errnoErr(e1) 1321 } 1322 return 1323 } 1324 1325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1326 1327 func Seteuid(euid int) (err error) { 1328 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) 1329 if e1 != 0 { 1330 err = errnoErr(e1) 1331 } 1332 return 1333 } 1334 1335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1336 1337 func Setgid(gid int) (err error) { 1338 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 1339 if e1 != 0 { 1340 err = errnoErr(e1) 1341 } 1342 return 1343 } 1344 1345 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1346 1347 func Setlogin(name string) (err error) { 1348 var _p0 *byte 1349 _p0, err = BytePtrFromString(name) 1350 if err != nil { 1351 return 1352 } 1353 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1354 if e1 != 0 { 1355 err = errnoErr(e1) 1356 } 1357 return 1358 } 1359 1360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1361 1362 func Setpgid(pid int, pgid int) (err error) { 1363 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1364 if e1 != 0 { 1365 err = errnoErr(e1) 1366 } 1367 return 1368 } 1369 1370 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1371 1372 func Setpriority(which int, who int, prio int) (err error) { 1373 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1374 if e1 != 0 { 1375 err = errnoErr(e1) 1376 } 1377 return 1378 } 1379 1380 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1381 1382 func Setregid(rgid int, egid int) (err error) { 1383 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1384 if e1 != 0 { 1385 err = errnoErr(e1) 1386 } 1387 return 1388 } 1389 1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1391 1392 func Setreuid(ruid int, euid int) (err error) { 1393 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1394 if e1 != 0 { 1395 err = errnoErr(e1) 1396 } 1397 return 1398 } 1399 1400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1401 1402 func Setresgid(rgid int, egid int, sgid int) (err error) { 1403 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 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 Setresuid(ruid int, euid int, suid int) (err error) { 1413 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 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 Setrlimit(which int, lim *Rlimit) (err error) { 1423 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setrtable(rtable int) (err error) { 1433 _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) 1434 if e1 != 0 { 1435 err = errnoErr(e1) 1436 } 1437 return 1438 } 1439 1440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1441 1442 func Setsid() (pid int, err error) { 1443 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1444 pid = int(r0) 1445 if e1 != 0 { 1446 err = errnoErr(e1) 1447 } 1448 return 1449 } 1450 1451 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1452 1453 func Settimeofday(tp *Timeval) (err error) { 1454 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1455 if e1 != 0 { 1456 err = errnoErr(e1) 1457 } 1458 return 1459 } 1460 1461 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1462 1463 func Setuid(uid int) (err error) { 1464 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1465 if e1 != 0 { 1466 err = errnoErr(e1) 1467 } 1468 return 1469 } 1470 1471 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1472 1473 func Stat(path string, stat *Stat_t) (err error) { 1474 var _p0 *byte 1475 _p0, err = BytePtrFromString(path) 1476 if err != nil { 1477 return 1478 } 1479 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1480 if e1 != 0 { 1481 err = errnoErr(e1) 1482 } 1483 return 1484 } 1485 1486 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1487 1488 func Statfs(path string, stat *Statfs_t) (err error) { 1489 var _p0 *byte 1490 _p0, err = BytePtrFromString(path) 1491 if err != nil { 1492 return 1493 } 1494 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1495 if e1 != 0 { 1496 err = errnoErr(e1) 1497 } 1498 return 1499 } 1500 1501 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1502 1503 func Symlink(path string, link string) (err error) { 1504 var _p0 *byte 1505 _p0, err = BytePtrFromString(path) 1506 if err != nil { 1507 return 1508 } 1509 var _p1 *byte 1510 _p1, err = BytePtrFromString(link) 1511 if err != nil { 1512 return 1513 } 1514 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1515 if e1 != 0 { 1516 err = errnoErr(e1) 1517 } 1518 return 1519 } 1520 1521 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1522 1523 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1524 var _p0 *byte 1525 _p0, err = BytePtrFromString(oldpath) 1526 if err != nil { 1527 return 1528 } 1529 var _p1 *byte 1530 _p1, err = BytePtrFromString(newpath) 1531 if err != nil { 1532 return 1533 } 1534 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1535 if e1 != 0 { 1536 err = errnoErr(e1) 1537 } 1538 return 1539 } 1540 1541 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1542 1543 func Sync() (err error) { 1544 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1545 if e1 != 0 { 1546 err = errnoErr(e1) 1547 } 1548 return 1549 } 1550 1551 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1552 1553 func Truncate(path string, length int64) (err error) { 1554 var _p0 *byte 1555 _p0, err = BytePtrFromString(path) 1556 if err != nil { 1557 return 1558 } 1559 _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) 1560 if e1 != 0 { 1561 err = errnoErr(e1) 1562 } 1563 return 1564 } 1565 1566 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1567 1568 func Umask(newmask int) (oldmask int) { 1569 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1570 oldmask = int(r0) 1571 return 1572 } 1573 1574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1575 1576 func Unlink(path string) (err error) { 1577 var _p0 *byte 1578 _p0, err = BytePtrFromString(path) 1579 if err != nil { 1580 return 1581 } 1582 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1583 if e1 != 0 { 1584 err = errnoErr(e1) 1585 } 1586 return 1587 } 1588 1589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1590 1591 func Unlinkat(dirfd int, path string, flags int) (err error) { 1592 var _p0 *byte 1593 _p0, err = BytePtrFromString(path) 1594 if err != nil { 1595 return 1596 } 1597 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 1598 if e1 != 0 { 1599 err = errnoErr(e1) 1600 } 1601 return 1602 } 1603 1604 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1605 1606 func Unmount(path string, flags int) (err error) { 1607 var _p0 *byte 1608 _p0, err = BytePtrFromString(path) 1609 if err != nil { 1610 return 1611 } 1612 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1613 if e1 != 0 { 1614 err = errnoErr(e1) 1615 } 1616 return 1617 } 1618 1619 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1620 1621 func write(fd int, p []byte) (n int, err error) { 1622 var _p0 unsafe.Pointer 1623 if len(p) > 0 { 1624 _p0 = unsafe.Pointer(&p[0]) 1625 } else { 1626 _p0 = unsafe.Pointer(&_zero) 1627 } 1628 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1629 n = int(r0) 1630 if e1 != 0 { 1631 err = errnoErr(e1) 1632 } 1633 return 1634 } 1635 1636 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1637 1638 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1639 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) 1640 ret = uintptr(r0) 1641 if e1 != 0 { 1642 err = errnoErr(e1) 1643 } 1644 return 1645 } 1646 1647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1648 1649 func munmap(addr uintptr, length uintptr) (err error) { 1650 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1651 if e1 != 0 { 1652 err = errnoErr(e1) 1653 } 1654 return 1655 } 1656 1657 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1658 1659 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1660 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1661 n = int(r0) 1662 if e1 != 0 { 1663 err = errnoErr(e1) 1664 } 1665 return 1666 } 1667 1668 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1669 1670 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1671 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1672 n = int(r0) 1673 if e1 != 0 { 1674 err = errnoErr(e1) 1675 } 1676 return 1677 } 1678 1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1680 1681 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 1682 var _p0 *byte 1683 _p0, err = BytePtrFromString(path) 1684 if err != nil { 1685 return 1686 } 1687 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 1688 if e1 != 0 { 1689 err = errnoErr(e1) 1690 } 1691 return 1692 }