github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/proto_vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go (about) 1 // go run mksyscall.go -l32 -tags freebsd,386 syscall_bsd.go syscall_freebsd.go syscall_freebsd_386.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build freebsd,386 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 pipe2(p *[2]_C_int, flags int) (err error) { 381 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 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 ptrace(request int, pid int, addr uintptr, data int) (err error) { 391 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 392 if e1 != 0 { 393 err = errnoErr(e1) 394 } 395 return 396 } 397 398 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 399 400 func Getcwd(buf []byte) (n int, err error) { 401 var _p0 unsafe.Pointer 402 if len(buf) > 0 { 403 _p0 = unsafe.Pointer(&buf[0]) 404 } else { 405 _p0 = unsafe.Pointer(&_zero) 406 } 407 r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 408 n = int(r0) 409 if e1 != 0 { 410 err = errnoErr(e1) 411 } 412 return 413 } 414 415 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 416 417 func ioctl(fd int, req uint, arg uintptr) (err error) { 418 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 419 if e1 != 0 { 420 err = errnoErr(e1) 421 } 422 return 423 } 424 425 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 426 427 func Access(path string, mode uint32) (err error) { 428 var _p0 *byte 429 _p0, err = BytePtrFromString(path) 430 if err != nil { 431 return 432 } 433 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 434 if e1 != 0 { 435 err = errnoErr(e1) 436 } 437 return 438 } 439 440 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 441 442 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 443 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) 444 if e1 != 0 { 445 err = errnoErr(e1) 446 } 447 return 448 } 449 450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 451 452 func CapEnter() (err error) { 453 _, _, e1 := Syscall(SYS_CAP_ENTER, 0, 0, 0) 454 if e1 != 0 { 455 err = errnoErr(e1) 456 } 457 return 458 } 459 460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 461 462 func capRightsGet(version int, fd int, rightsp *CapRights) (err error) { 463 _, _, e1 := Syscall(SYS___CAP_RIGHTS_GET, uintptr(version), uintptr(fd), uintptr(unsafe.Pointer(rightsp))) 464 if e1 != 0 { 465 err = errnoErr(e1) 466 } 467 return 468 } 469 470 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 471 472 func capRightsLimit(fd int, rightsp *CapRights) (err error) { 473 _, _, e1 := Syscall(SYS_CAP_RIGHTS_LIMIT, uintptr(fd), uintptr(unsafe.Pointer(rightsp)), 0) 474 if e1 != 0 { 475 err = errnoErr(e1) 476 } 477 return 478 } 479 480 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 481 482 func Chdir(path string) (err error) { 483 var _p0 *byte 484 _p0, err = BytePtrFromString(path) 485 if err != nil { 486 return 487 } 488 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 489 if e1 != 0 { 490 err = errnoErr(e1) 491 } 492 return 493 } 494 495 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 496 497 func Chflags(path string, flags int) (err error) { 498 var _p0 *byte 499 _p0, err = BytePtrFromString(path) 500 if err != nil { 501 return 502 } 503 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 504 if e1 != 0 { 505 err = errnoErr(e1) 506 } 507 return 508 } 509 510 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 511 512 func Chmod(path string, mode uint32) (err error) { 513 var _p0 *byte 514 _p0, err = BytePtrFromString(path) 515 if err != nil { 516 return 517 } 518 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 519 if e1 != 0 { 520 err = errnoErr(e1) 521 } 522 return 523 } 524 525 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 526 527 func Chown(path string, uid int, gid int) (err error) { 528 var _p0 *byte 529 _p0, err = BytePtrFromString(path) 530 if err != nil { 531 return 532 } 533 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 534 if e1 != 0 { 535 err = errnoErr(e1) 536 } 537 return 538 } 539 540 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 541 542 func Chroot(path string) (err error) { 543 var _p0 *byte 544 _p0, err = BytePtrFromString(path) 545 if err != nil { 546 return 547 } 548 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 549 if e1 != 0 { 550 err = errnoErr(e1) 551 } 552 return 553 } 554 555 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 556 557 func Close(fd int) (err error) { 558 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 559 if e1 != 0 { 560 err = errnoErr(e1) 561 } 562 return 563 } 564 565 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 566 567 func Dup(fd int) (nfd int, err error) { 568 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 569 nfd = int(r0) 570 if e1 != 0 { 571 err = errnoErr(e1) 572 } 573 return 574 } 575 576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 577 578 func Dup2(from int, to int) (err error) { 579 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) 580 if e1 != 0 { 581 err = errnoErr(e1) 582 } 583 return 584 } 585 586 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 587 588 func Exit(code int) { 589 Syscall(SYS_EXIT, uintptr(code), 0, 0) 590 return 591 } 592 593 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 594 595 func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 596 var _p0 *byte 597 _p0, err = BytePtrFromString(attrname) 598 if err != nil { 599 return 600 } 601 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) 602 ret = int(r0) 603 if e1 != 0 { 604 err = errnoErr(e1) 605 } 606 return 607 } 608 609 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 610 611 func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 612 var _p0 *byte 613 _p0, err = BytePtrFromString(attrname) 614 if err != nil { 615 return 616 } 617 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) 618 ret = int(r0) 619 if e1 != 0 { 620 err = errnoErr(e1) 621 } 622 return 623 } 624 625 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 626 627 func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { 628 var _p0 *byte 629 _p0, err = BytePtrFromString(attrname) 630 if err != nil { 631 return 632 } 633 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) 634 if e1 != 0 { 635 err = errnoErr(e1) 636 } 637 return 638 } 639 640 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 641 642 func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { 643 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) 644 ret = int(r0) 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 ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 654 var _p0 *byte 655 _p0, err = BytePtrFromString(file) 656 if err != nil { 657 return 658 } 659 var _p1 *byte 660 _p1, err = BytePtrFromString(attrname) 661 if err != nil { 662 return 663 } 664 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) 665 ret = int(r0) 666 if e1 != 0 { 667 err = errnoErr(e1) 668 } 669 return 670 } 671 672 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 673 674 func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 675 var _p0 *byte 676 _p0, err = BytePtrFromString(file) 677 if err != nil { 678 return 679 } 680 var _p1 *byte 681 _p1, err = BytePtrFromString(attrname) 682 if err != nil { 683 return 684 } 685 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) 686 ret = int(r0) 687 if e1 != 0 { 688 err = errnoErr(e1) 689 } 690 return 691 } 692 693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 694 695 func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { 696 var _p0 *byte 697 _p0, err = BytePtrFromString(file) 698 if err != nil { 699 return 700 } 701 var _p1 *byte 702 _p1, err = BytePtrFromString(attrname) 703 if err != nil { 704 return 705 } 706 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) 707 if e1 != 0 { 708 err = errnoErr(e1) 709 } 710 return 711 } 712 713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 714 715 func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { 716 var _p0 *byte 717 _p0, err = BytePtrFromString(file) 718 if err != nil { 719 return 720 } 721 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) 722 ret = int(r0) 723 if e1 != 0 { 724 err = errnoErr(e1) 725 } 726 return 727 } 728 729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 730 731 func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 732 var _p0 *byte 733 _p0, err = BytePtrFromString(link) 734 if err != nil { 735 return 736 } 737 var _p1 *byte 738 _p1, err = BytePtrFromString(attrname) 739 if err != nil { 740 return 741 } 742 r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) 743 ret = int(r0) 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 ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { 753 var _p0 *byte 754 _p0, err = BytePtrFromString(link) 755 if err != nil { 756 return 757 } 758 var _p1 *byte 759 _p1, err = BytePtrFromString(attrname) 760 if err != nil { 761 return 762 } 763 r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) 764 ret = int(r0) 765 if e1 != 0 { 766 err = errnoErr(e1) 767 } 768 return 769 } 770 771 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 772 773 func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { 774 var _p0 *byte 775 _p0, err = BytePtrFromString(link) 776 if err != nil { 777 return 778 } 779 var _p1 *byte 780 _p1, err = BytePtrFromString(attrname) 781 if err != nil { 782 return 783 } 784 _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) 785 if e1 != 0 { 786 err = errnoErr(e1) 787 } 788 return 789 } 790 791 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 792 793 func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { 794 var _p0 *byte 795 _p0, err = BytePtrFromString(link) 796 if err != nil { 797 return 798 } 799 r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) 800 ret = int(r0) 801 if e1 != 0 { 802 err = errnoErr(e1) 803 } 804 return 805 } 806 807 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 808 809 func Fadvise(fd int, offset int64, length int64, advice int) (err error) { 810 _, _, e1 := Syscall6(SYS_POSIX_FADVISE, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) 811 if e1 != 0 { 812 err = errnoErr(e1) 813 } 814 return 815 } 816 817 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 818 819 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 820 var _p0 *byte 821 _p0, err = BytePtrFromString(path) 822 if err != nil { 823 return 824 } 825 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 826 if e1 != 0 { 827 err = errnoErr(e1) 828 } 829 return 830 } 831 832 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 833 834 func Fchdir(fd int) (err error) { 835 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 836 if e1 != 0 { 837 err = errnoErr(e1) 838 } 839 return 840 } 841 842 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 843 844 func Fchflags(fd int, flags int) (err error) { 845 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) 846 if e1 != 0 { 847 err = errnoErr(e1) 848 } 849 return 850 } 851 852 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 853 854 func Fchmod(fd int, mode uint32) (err error) { 855 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 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 Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 865 var _p0 *byte 866 _p0, err = BytePtrFromString(path) 867 if err != nil { 868 return 869 } 870 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 871 if e1 != 0 { 872 err = errnoErr(e1) 873 } 874 return 875 } 876 877 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 878 879 func Fchown(fd int, uid int, gid int) (err error) { 880 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 881 if e1 != 0 { 882 err = errnoErr(e1) 883 } 884 return 885 } 886 887 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 888 889 func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 890 var _p0 *byte 891 _p0, err = BytePtrFromString(path) 892 if err != nil { 893 return 894 } 895 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 896 if e1 != 0 { 897 err = errnoErr(e1) 898 } 899 return 900 } 901 902 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 903 904 func Flock(fd int, how int) (err error) { 905 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 906 if e1 != 0 { 907 err = errnoErr(e1) 908 } 909 return 910 } 911 912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 913 914 func Fpathconf(fd int, name int) (val int, err error) { 915 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 916 val = int(r0) 917 if e1 != 0 { 918 err = errnoErr(e1) 919 } 920 return 921 } 922 923 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 924 925 func fstat(fd int, stat *stat_freebsd11_t) (err error) { 926 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 927 if e1 != 0 { 928 err = errnoErr(e1) 929 } 930 return 931 } 932 933 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 934 935 func fstat_freebsd12(fd int, stat *Stat_t) (err error) { 936 _, _, e1 := Syscall(SYS_FSTAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 937 if e1 != 0 { 938 err = errnoErr(e1) 939 } 940 return 941 } 942 943 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 944 945 func fstatat(fd int, path string, stat *stat_freebsd11_t, flags int) (err error) { 946 var _p0 *byte 947 _p0, err = BytePtrFromString(path) 948 if err != nil { 949 return 950 } 951 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 952 if e1 != 0 { 953 err = errnoErr(e1) 954 } 955 return 956 } 957 958 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 959 960 func fstatat_freebsd12(fd int, path string, stat *Stat_t, flags int) (err error) { 961 var _p0 *byte 962 _p0, err = BytePtrFromString(path) 963 if err != nil { 964 return 965 } 966 _, _, e1 := Syscall6(SYS_FSTATAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 967 if e1 != 0 { 968 err = errnoErr(e1) 969 } 970 return 971 } 972 973 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 974 975 func fstatfs(fd int, stat *statfs_freebsd11_t) (err error) { 976 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 977 if e1 != 0 { 978 err = errnoErr(e1) 979 } 980 return 981 } 982 983 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 984 985 func fstatfs_freebsd12(fd int, stat *Statfs_t) (err error) { 986 _, _, e1 := Syscall(SYS_FSTATFS_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 987 if e1 != 0 { 988 err = errnoErr(e1) 989 } 990 return 991 } 992 993 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 994 995 func Fsync(fd int) (err error) { 996 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 997 if e1 != 0 { 998 err = errnoErr(e1) 999 } 1000 return 1001 } 1002 1003 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1004 1005 func Ftruncate(fd int, length int64) (err error) { 1006 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) 1007 if e1 != 0 { 1008 err = errnoErr(e1) 1009 } 1010 return 1011 } 1012 1013 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1014 1015 func getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 1016 var _p0 unsafe.Pointer 1017 if len(buf) > 0 { 1018 _p0 = unsafe.Pointer(&buf[0]) 1019 } else { 1020 _p0 = unsafe.Pointer(&_zero) 1021 } 1022 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 1023 n = int(r0) 1024 if e1 != 0 { 1025 err = errnoErr(e1) 1026 } 1027 return 1028 } 1029 1030 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1031 1032 func getdirentries_freebsd12(fd int, buf []byte, basep *uint64) (n int, err error) { 1033 var _p0 unsafe.Pointer 1034 if len(buf) > 0 { 1035 _p0 = unsafe.Pointer(&buf[0]) 1036 } else { 1037 _p0 = unsafe.Pointer(&_zero) 1038 } 1039 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES_FREEBSD12, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 1040 n = int(r0) 1041 if e1 != 0 { 1042 err = errnoErr(e1) 1043 } 1044 return 1045 } 1046 1047 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1048 1049 func Getdtablesize() (size int) { 1050 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) 1051 size = int(r0) 1052 return 1053 } 1054 1055 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1056 1057 func Getegid() (egid int) { 1058 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 1059 egid = int(r0) 1060 return 1061 } 1062 1063 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1064 1065 func Geteuid() (uid int) { 1066 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 1067 uid = int(r0) 1068 return 1069 } 1070 1071 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1072 1073 func Getgid() (gid int) { 1074 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 1075 gid = int(r0) 1076 return 1077 } 1078 1079 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1080 1081 func Getpgid(pid int) (pgid int, err error) { 1082 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 1083 pgid = int(r0) 1084 if e1 != 0 { 1085 err = errnoErr(e1) 1086 } 1087 return 1088 } 1089 1090 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1091 1092 func Getpgrp() (pgrp int) { 1093 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 1094 pgrp = int(r0) 1095 return 1096 } 1097 1098 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1099 1100 func Getpid() (pid int) { 1101 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 1102 pid = int(r0) 1103 return 1104 } 1105 1106 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1107 1108 func Getppid() (ppid int) { 1109 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 1110 ppid = int(r0) 1111 return 1112 } 1113 1114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1115 1116 func Getpriority(which int, who int) (prio int, err error) { 1117 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 1118 prio = int(r0) 1119 if e1 != 0 { 1120 err = errnoErr(e1) 1121 } 1122 return 1123 } 1124 1125 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1126 1127 func Getrlimit(which int, lim *Rlimit) (err error) { 1128 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 1129 if e1 != 0 { 1130 err = errnoErr(e1) 1131 } 1132 return 1133 } 1134 1135 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1136 1137 func Getrusage(who int, rusage *Rusage) (err error) { 1138 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) 1139 if e1 != 0 { 1140 err = errnoErr(e1) 1141 } 1142 return 1143 } 1144 1145 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1146 1147 func Getsid(pid int) (sid int, err error) { 1148 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 1149 sid = int(r0) 1150 if e1 != 0 { 1151 err = errnoErr(e1) 1152 } 1153 return 1154 } 1155 1156 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1157 1158 func Gettimeofday(tv *Timeval) (err error) { 1159 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1160 if e1 != 0 { 1161 err = errnoErr(e1) 1162 } 1163 return 1164 } 1165 1166 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1167 1168 func Getuid() (uid int) { 1169 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 1170 uid = int(r0) 1171 return 1172 } 1173 1174 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1175 1176 func Issetugid() (tainted bool) { 1177 r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) 1178 tainted = bool(r0 != 0) 1179 return 1180 } 1181 1182 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1183 1184 func Kill(pid int, signum syscall.Signal) (err error) { 1185 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) 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 Kqueue() (fd int, err error) { 1195 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 1196 fd = int(r0) 1197 if e1 != 0 { 1198 err = errnoErr(e1) 1199 } 1200 return 1201 } 1202 1203 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1204 1205 func Lchown(path string, uid int, gid int) (err error) { 1206 var _p0 *byte 1207 _p0, err = BytePtrFromString(path) 1208 if err != nil { 1209 return 1210 } 1211 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1212 if e1 != 0 { 1213 err = errnoErr(e1) 1214 } 1215 return 1216 } 1217 1218 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1219 1220 func Link(path string, link string) (err error) { 1221 var _p0 *byte 1222 _p0, err = BytePtrFromString(path) 1223 if err != nil { 1224 return 1225 } 1226 var _p1 *byte 1227 _p1, err = BytePtrFromString(link) 1228 if err != nil { 1229 return 1230 } 1231 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1232 if e1 != 0 { 1233 err = errnoErr(e1) 1234 } 1235 return 1236 } 1237 1238 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1239 1240 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { 1241 var _p0 *byte 1242 _p0, err = BytePtrFromString(path) 1243 if err != nil { 1244 return 1245 } 1246 var _p1 *byte 1247 _p1, err = BytePtrFromString(link) 1248 if err != nil { 1249 return 1250 } 1251 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 1252 if e1 != 0 { 1253 err = errnoErr(e1) 1254 } 1255 return 1256 } 1257 1258 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1259 1260 func Listen(s int, backlog int) (err error) { 1261 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) 1262 if e1 != 0 { 1263 err = errnoErr(e1) 1264 } 1265 return 1266 } 1267 1268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1269 1270 func lstat(path string, stat *stat_freebsd11_t) (err error) { 1271 var _p0 *byte 1272 _p0, err = BytePtrFromString(path) 1273 if err != nil { 1274 return 1275 } 1276 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1277 if e1 != 0 { 1278 err = errnoErr(e1) 1279 } 1280 return 1281 } 1282 1283 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1284 1285 func Mkdir(path string, mode uint32) (err error) { 1286 var _p0 *byte 1287 _p0, err = BytePtrFromString(path) 1288 if err != nil { 1289 return 1290 } 1291 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1292 if e1 != 0 { 1293 err = errnoErr(e1) 1294 } 1295 return 1296 } 1297 1298 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1299 1300 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1301 var _p0 *byte 1302 _p0, err = BytePtrFromString(path) 1303 if err != nil { 1304 return 1305 } 1306 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1307 if e1 != 0 { 1308 err = errnoErr(e1) 1309 } 1310 return 1311 } 1312 1313 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1314 1315 func Mkfifo(path string, mode uint32) (err error) { 1316 var _p0 *byte 1317 _p0, err = BytePtrFromString(path) 1318 if err != nil { 1319 return 1320 } 1321 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1322 if e1 != 0 { 1323 err = errnoErr(e1) 1324 } 1325 return 1326 } 1327 1328 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1329 1330 func mknod(path string, mode uint32, dev int) (err error) { 1331 var _p0 *byte 1332 _p0, err = BytePtrFromString(path) 1333 if err != nil { 1334 return 1335 } 1336 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 1337 if e1 != 0 { 1338 err = errnoErr(e1) 1339 } 1340 return 1341 } 1342 1343 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1344 1345 func mknodat(fd int, path string, mode uint32, dev int) (err error) { 1346 var _p0 *byte 1347 _p0, err = BytePtrFromString(path) 1348 if err != nil { 1349 return 1350 } 1351 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1352 if e1 != 0 { 1353 err = errnoErr(e1) 1354 } 1355 return 1356 } 1357 1358 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1359 1360 func mknodat_freebsd12(fd int, path string, mode uint32, dev uint64) (err error) { 1361 var _p0 *byte 1362 _p0, err = BytePtrFromString(path) 1363 if err != nil { 1364 return 1365 } 1366 _, _, e1 := Syscall6(SYS_MKNODAT_FREEBSD12, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1367 if e1 != 0 { 1368 err = errnoErr(e1) 1369 } 1370 return 1371 } 1372 1373 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1374 1375 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1376 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1377 if e1 != 0 { 1378 err = errnoErr(e1) 1379 } 1380 return 1381 } 1382 1383 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1384 1385 func Open(path string, mode int, perm uint32) (fd int, err error) { 1386 var _p0 *byte 1387 _p0, err = BytePtrFromString(path) 1388 if err != nil { 1389 return 1390 } 1391 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 1392 fd = int(r0) 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 Openat(fdat int, path string, mode int, perm uint32) (fd int, err error) { 1402 var _p0 *byte 1403 _p0, err = BytePtrFromString(path) 1404 if err != nil { 1405 return 1406 } 1407 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(fdat), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) 1408 fd = int(r0) 1409 if e1 != 0 { 1410 err = errnoErr(e1) 1411 } 1412 return 1413 } 1414 1415 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1416 1417 func Pathconf(path string, name int) (val int, err error) { 1418 var _p0 *byte 1419 _p0, err = BytePtrFromString(path) 1420 if err != nil { 1421 return 1422 } 1423 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 1424 val = int(r0) 1425 if e1 != 0 { 1426 err = errnoErr(e1) 1427 } 1428 return 1429 } 1430 1431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1432 1433 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1434 var _p0 unsafe.Pointer 1435 if len(p) > 0 { 1436 _p0 = unsafe.Pointer(&p[0]) 1437 } else { 1438 _p0 = unsafe.Pointer(&_zero) 1439 } 1440 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1441 n = int(r0) 1442 if e1 != 0 { 1443 err = errnoErr(e1) 1444 } 1445 return 1446 } 1447 1448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1449 1450 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1451 var _p0 unsafe.Pointer 1452 if len(p) > 0 { 1453 _p0 = unsafe.Pointer(&p[0]) 1454 } else { 1455 _p0 = unsafe.Pointer(&_zero) 1456 } 1457 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1458 n = int(r0) 1459 if e1 != 0 { 1460 err = errnoErr(e1) 1461 } 1462 return 1463 } 1464 1465 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1466 1467 func read(fd int, p []byte) (n int, err error) { 1468 var _p0 unsafe.Pointer 1469 if len(p) > 0 { 1470 _p0 = unsafe.Pointer(&p[0]) 1471 } else { 1472 _p0 = unsafe.Pointer(&_zero) 1473 } 1474 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1475 n = int(r0) 1476 if e1 != 0 { 1477 err = errnoErr(e1) 1478 } 1479 return 1480 } 1481 1482 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1483 1484 func Readlink(path string, buf []byte) (n int, err error) { 1485 var _p0 *byte 1486 _p0, err = BytePtrFromString(path) 1487 if err != nil { 1488 return 1489 } 1490 var _p1 unsafe.Pointer 1491 if len(buf) > 0 { 1492 _p1 = unsafe.Pointer(&buf[0]) 1493 } else { 1494 _p1 = unsafe.Pointer(&_zero) 1495 } 1496 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 1497 n = int(r0) 1498 if e1 != 0 { 1499 err = errnoErr(e1) 1500 } 1501 return 1502 } 1503 1504 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1505 1506 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 1507 var _p0 *byte 1508 _p0, err = BytePtrFromString(path) 1509 if err != nil { 1510 return 1511 } 1512 var _p1 unsafe.Pointer 1513 if len(buf) > 0 { 1514 _p1 = unsafe.Pointer(&buf[0]) 1515 } else { 1516 _p1 = unsafe.Pointer(&_zero) 1517 } 1518 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 1519 n = int(r0) 1520 if e1 != 0 { 1521 err = errnoErr(e1) 1522 } 1523 return 1524 } 1525 1526 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1527 1528 func Rename(from string, to string) (err error) { 1529 var _p0 *byte 1530 _p0, err = BytePtrFromString(from) 1531 if err != nil { 1532 return 1533 } 1534 var _p1 *byte 1535 _p1, err = BytePtrFromString(to) 1536 if err != nil { 1537 return 1538 } 1539 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1540 if e1 != 0 { 1541 err = errnoErr(e1) 1542 } 1543 return 1544 } 1545 1546 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1547 1548 func Renameat(fromfd int, from string, tofd int, to string) (err error) { 1549 var _p0 *byte 1550 _p0, err = BytePtrFromString(from) 1551 if err != nil { 1552 return 1553 } 1554 var _p1 *byte 1555 _p1, err = BytePtrFromString(to) 1556 if err != nil { 1557 return 1558 } 1559 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 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 Revoke(path string) (err error) { 1569 var _p0 *byte 1570 _p0, err = BytePtrFromString(path) 1571 if err != nil { 1572 return 1573 } 1574 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1575 if e1 != 0 { 1576 err = errnoErr(e1) 1577 } 1578 return 1579 } 1580 1581 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1582 1583 func Rmdir(path string) (err error) { 1584 var _p0 *byte 1585 _p0, err = BytePtrFromString(path) 1586 if err != nil { 1587 return 1588 } 1589 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 1590 if e1 != 0 { 1591 err = errnoErr(e1) 1592 } 1593 return 1594 } 1595 1596 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1597 1598 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1599 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) 1600 newoffset = int64(int64(r1)<<32 | int64(r0)) 1601 if e1 != 0 { 1602 err = errnoErr(e1) 1603 } 1604 return 1605 } 1606 1607 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1608 1609 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1610 r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1611 n = int(r0) 1612 if e1 != 0 { 1613 err = errnoErr(e1) 1614 } 1615 return 1616 } 1617 1618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1619 1620 func Setegid(egid int) (err error) { 1621 _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) 1622 if e1 != 0 { 1623 err = errnoErr(e1) 1624 } 1625 return 1626 } 1627 1628 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1629 1630 func Seteuid(euid int) (err error) { 1631 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) 1632 if e1 != 0 { 1633 err = errnoErr(e1) 1634 } 1635 return 1636 } 1637 1638 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1639 1640 func Setgid(gid int) (err error) { 1641 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 1642 if e1 != 0 { 1643 err = errnoErr(e1) 1644 } 1645 return 1646 } 1647 1648 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1649 1650 func Setlogin(name string) (err error) { 1651 var _p0 *byte 1652 _p0, err = BytePtrFromString(name) 1653 if err != nil { 1654 return 1655 } 1656 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1657 if e1 != 0 { 1658 err = errnoErr(e1) 1659 } 1660 return 1661 } 1662 1663 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1664 1665 func Setpgid(pid int, pgid int) (err error) { 1666 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1667 if e1 != 0 { 1668 err = errnoErr(e1) 1669 } 1670 return 1671 } 1672 1673 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1674 1675 func Setpriority(which int, who int, prio int) (err error) { 1676 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1677 if e1 != 0 { 1678 err = errnoErr(e1) 1679 } 1680 return 1681 } 1682 1683 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1684 1685 func Setregid(rgid int, egid int) (err error) { 1686 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1687 if e1 != 0 { 1688 err = errnoErr(e1) 1689 } 1690 return 1691 } 1692 1693 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1694 1695 func Setreuid(ruid int, euid int) (err error) { 1696 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1697 if e1 != 0 { 1698 err = errnoErr(e1) 1699 } 1700 return 1701 } 1702 1703 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1704 1705 func Setresgid(rgid int, egid int, sgid int) (err error) { 1706 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1707 if e1 != 0 { 1708 err = errnoErr(e1) 1709 } 1710 return 1711 } 1712 1713 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1714 1715 func Setresuid(ruid int, euid int, suid int) (err error) { 1716 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1717 if e1 != 0 { 1718 err = errnoErr(e1) 1719 } 1720 return 1721 } 1722 1723 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1724 1725 func Setrlimit(which int, lim *Rlimit) (err error) { 1726 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 1727 if e1 != 0 { 1728 err = errnoErr(e1) 1729 } 1730 return 1731 } 1732 1733 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1734 1735 func Setsid() (pid int, err error) { 1736 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1737 pid = int(r0) 1738 if e1 != 0 { 1739 err = errnoErr(e1) 1740 } 1741 return 1742 } 1743 1744 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1745 1746 func Settimeofday(tp *Timeval) (err error) { 1747 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1748 if e1 != 0 { 1749 err = errnoErr(e1) 1750 } 1751 return 1752 } 1753 1754 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1755 1756 func Setuid(uid int) (err error) { 1757 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1758 if e1 != 0 { 1759 err = errnoErr(e1) 1760 } 1761 return 1762 } 1763 1764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1765 1766 func stat(path string, stat *stat_freebsd11_t) (err error) { 1767 var _p0 *byte 1768 _p0, err = BytePtrFromString(path) 1769 if err != nil { 1770 return 1771 } 1772 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1773 if e1 != 0 { 1774 err = errnoErr(e1) 1775 } 1776 return 1777 } 1778 1779 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1780 1781 func statfs(path string, stat *statfs_freebsd11_t) (err error) { 1782 var _p0 *byte 1783 _p0, err = BytePtrFromString(path) 1784 if err != nil { 1785 return 1786 } 1787 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1788 if e1 != 0 { 1789 err = errnoErr(e1) 1790 } 1791 return 1792 } 1793 1794 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1795 1796 func statfs_freebsd12(path string, stat *Statfs_t) (err error) { 1797 var _p0 *byte 1798 _p0, err = BytePtrFromString(path) 1799 if err != nil { 1800 return 1801 } 1802 _, _, e1 := Syscall(SYS_STATFS_FREEBSD12, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1803 if e1 != 0 { 1804 err = errnoErr(e1) 1805 } 1806 return 1807 } 1808 1809 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1810 1811 func Symlink(path string, link string) (err error) { 1812 var _p0 *byte 1813 _p0, err = BytePtrFromString(path) 1814 if err != nil { 1815 return 1816 } 1817 var _p1 *byte 1818 _p1, err = BytePtrFromString(link) 1819 if err != nil { 1820 return 1821 } 1822 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1823 if e1 != 0 { 1824 err = errnoErr(e1) 1825 } 1826 return 1827 } 1828 1829 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1830 1831 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1832 var _p0 *byte 1833 _p0, err = BytePtrFromString(oldpath) 1834 if err != nil { 1835 return 1836 } 1837 var _p1 *byte 1838 _p1, err = BytePtrFromString(newpath) 1839 if err != nil { 1840 return 1841 } 1842 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1843 if e1 != 0 { 1844 err = errnoErr(e1) 1845 } 1846 return 1847 } 1848 1849 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1850 1851 func Sync() (err error) { 1852 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1853 if e1 != 0 { 1854 err = errnoErr(e1) 1855 } 1856 return 1857 } 1858 1859 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1860 1861 func Truncate(path string, length int64) (err error) { 1862 var _p0 *byte 1863 _p0, err = BytePtrFromString(path) 1864 if err != nil { 1865 return 1866 } 1867 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) 1868 if e1 != 0 { 1869 err = errnoErr(e1) 1870 } 1871 return 1872 } 1873 1874 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1875 1876 func Umask(newmask int) (oldmask int) { 1877 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1878 oldmask = int(r0) 1879 return 1880 } 1881 1882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1883 1884 func Undelete(path string) (err error) { 1885 var _p0 *byte 1886 _p0, err = BytePtrFromString(path) 1887 if err != nil { 1888 return 1889 } 1890 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1891 if e1 != 0 { 1892 err = errnoErr(e1) 1893 } 1894 return 1895 } 1896 1897 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1898 1899 func Unlink(path string) (err error) { 1900 var _p0 *byte 1901 _p0, err = BytePtrFromString(path) 1902 if err != nil { 1903 return 1904 } 1905 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1906 if e1 != 0 { 1907 err = errnoErr(e1) 1908 } 1909 return 1910 } 1911 1912 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1913 1914 func Unlinkat(dirfd int, path string, flags int) (err error) { 1915 var _p0 *byte 1916 _p0, err = BytePtrFromString(path) 1917 if err != nil { 1918 return 1919 } 1920 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 1921 if e1 != 0 { 1922 err = errnoErr(e1) 1923 } 1924 return 1925 } 1926 1927 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1928 1929 func Unmount(path string, flags int) (err error) { 1930 var _p0 *byte 1931 _p0, err = BytePtrFromString(path) 1932 if err != nil { 1933 return 1934 } 1935 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1936 if e1 != 0 { 1937 err = errnoErr(e1) 1938 } 1939 return 1940 } 1941 1942 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1943 1944 func write(fd int, p []byte) (n int, err error) { 1945 var _p0 unsafe.Pointer 1946 if len(p) > 0 { 1947 _p0 = unsafe.Pointer(&p[0]) 1948 } else { 1949 _p0 = unsafe.Pointer(&_zero) 1950 } 1951 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1952 n = int(r0) 1953 if e1 != 0 { 1954 err = errnoErr(e1) 1955 } 1956 return 1957 } 1958 1959 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1960 1961 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1962 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) 1963 ret = uintptr(r0) 1964 if e1 != 0 { 1965 err = errnoErr(e1) 1966 } 1967 return 1968 } 1969 1970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1971 1972 func munmap(addr uintptr, length uintptr) (err error) { 1973 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1974 if e1 != 0 { 1975 err = errnoErr(e1) 1976 } 1977 return 1978 } 1979 1980 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1981 1982 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1983 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1984 n = int(r0) 1985 if e1 != 0 { 1986 err = errnoErr(e1) 1987 } 1988 return 1989 } 1990 1991 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1992 1993 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1994 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1995 n = int(r0) 1996 if e1 != 0 { 1997 err = errnoErr(e1) 1998 } 1999 return 2000 } 2001 2002 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2003 2004 func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) { 2005 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 2006 nfd = int(r0) 2007 if e1 != 0 { 2008 err = errnoErr(e1) 2009 } 2010 return 2011 } 2012 2013 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2014 2015 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 2016 var _p0 *byte 2017 _p0, err = BytePtrFromString(path) 2018 if err != nil { 2019 return 2020 } 2021 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 2022 if e1 != 0 { 2023 err = errnoErr(e1) 2024 } 2025 return 2026 }