github.com/Andyfoo/golang/x/sys@v0.0.0-20190901054642-57c1bf301704/unix/zsyscall_darwin_arm64.1_11.go (about) 1 // go run mksyscall.go -tags darwin,arm64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build darwin,arm64,!go1.12 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 ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 381 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 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 getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { 391 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 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 pipe() (r int, w int, err error) { 401 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) 402 r = int(r0) 403 w = int(r1) 404 if e1 != 0 { 405 err = errnoErr(e1) 406 } 407 return 408 } 409 410 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 411 412 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { 413 var _p0 *byte 414 _p0, err = BytePtrFromString(path) 415 if err != nil { 416 return 417 } 418 var _p1 *byte 419 _p1, err = BytePtrFromString(attr) 420 if err != nil { 421 return 422 } 423 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) 424 sz = int(r0) 425 if e1 != 0 { 426 err = errnoErr(e1) 427 } 428 return 429 } 430 431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 432 433 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { 434 var _p0 *byte 435 _p0, err = BytePtrFromString(attr) 436 if err != nil { 437 return 438 } 439 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) 440 sz = int(r0) 441 if e1 != 0 { 442 err = errnoErr(e1) 443 } 444 return 445 } 446 447 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 448 449 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) { 450 var _p0 *byte 451 _p0, err = BytePtrFromString(path) 452 if err != nil { 453 return 454 } 455 var _p1 *byte 456 _p1, err = BytePtrFromString(attr) 457 if err != nil { 458 return 459 } 460 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) 461 if e1 != 0 { 462 err = errnoErr(e1) 463 } 464 return 465 } 466 467 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 468 469 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { 470 var _p0 *byte 471 _p0, err = BytePtrFromString(attr) 472 if err != nil { 473 return 474 } 475 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) 476 if e1 != 0 { 477 err = errnoErr(e1) 478 } 479 return 480 } 481 482 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 483 484 func removexattr(path string, attr string, options int) (err error) { 485 var _p0 *byte 486 _p0, err = BytePtrFromString(path) 487 if err != nil { 488 return 489 } 490 var _p1 *byte 491 _p1, err = BytePtrFromString(attr) 492 if err != nil { 493 return 494 } 495 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) 496 if e1 != 0 { 497 err = errnoErr(e1) 498 } 499 return 500 } 501 502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 503 504 func fremovexattr(fd int, attr string, options int) (err error) { 505 var _p0 *byte 506 _p0, err = BytePtrFromString(attr) 507 if err != nil { 508 return 509 } 510 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) 511 if e1 != 0 { 512 err = errnoErr(e1) 513 } 514 return 515 } 516 517 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 518 519 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { 520 var _p0 *byte 521 _p0, err = BytePtrFromString(path) 522 if err != nil { 523 return 524 } 525 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) 526 sz = int(r0) 527 if e1 != 0 { 528 err = errnoErr(e1) 529 } 530 return 531 } 532 533 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 534 535 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { 536 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) 537 sz = int(r0) 538 if e1 != 0 { 539 err = errnoErr(e1) 540 } 541 return 542 } 543 544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 545 546 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { 547 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) 548 if e1 != 0 { 549 err = errnoErr(e1) 550 } 551 return 552 } 553 554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 555 556 func kill(pid int, signum int, posix int) (err error) { 557 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) 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 ioctl(fd int, req uint, arg uintptr) (err error) { 567 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { 577 _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) 578 if e1 != 0 { 579 err = errnoErr(e1) 580 } 581 return 582 } 583 584 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 585 586 func Access(path string, mode uint32) (err error) { 587 var _p0 *byte 588 _p0, err = BytePtrFromString(path) 589 if err != nil { 590 return 591 } 592 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 593 if e1 != 0 { 594 err = errnoErr(e1) 595 } 596 return 597 } 598 599 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 600 601 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 602 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) 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 Chdir(path string) (err error) { 612 var _p0 *byte 613 _p0, err = BytePtrFromString(path) 614 if err != nil { 615 return 616 } 617 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 618 if e1 != 0 { 619 err = errnoErr(e1) 620 } 621 return 622 } 623 624 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 625 626 func Chflags(path string, flags int) (err error) { 627 var _p0 *byte 628 _p0, err = BytePtrFromString(path) 629 if err != nil { 630 return 631 } 632 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 633 if e1 != 0 { 634 err = errnoErr(e1) 635 } 636 return 637 } 638 639 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 640 641 func Chmod(path string, mode uint32) (err error) { 642 var _p0 *byte 643 _p0, err = BytePtrFromString(path) 644 if err != nil { 645 return 646 } 647 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 648 if e1 != 0 { 649 err = errnoErr(e1) 650 } 651 return 652 } 653 654 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 655 656 func Chown(path string, uid int, gid int) (err error) { 657 var _p0 *byte 658 _p0, err = BytePtrFromString(path) 659 if err != nil { 660 return 661 } 662 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 663 if e1 != 0 { 664 err = errnoErr(e1) 665 } 666 return 667 } 668 669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 670 671 func Chroot(path string) (err error) { 672 var _p0 *byte 673 _p0, err = BytePtrFromString(path) 674 if err != nil { 675 return 676 } 677 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 678 if e1 != 0 { 679 err = errnoErr(e1) 680 } 681 return 682 } 683 684 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 685 686 func Close(fd int) (err error) { 687 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 688 if e1 != 0 { 689 err = errnoErr(e1) 690 } 691 return 692 } 693 694 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 695 696 func Dup(fd int) (nfd int, err error) { 697 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 698 nfd = int(r0) 699 if e1 != 0 { 700 err = errnoErr(e1) 701 } 702 return 703 } 704 705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 706 707 func Dup2(from int, to int) (err error) { 708 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) 709 if e1 != 0 { 710 err = errnoErr(e1) 711 } 712 return 713 } 714 715 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 716 717 func Exchangedata(path1 string, path2 string, options int) (err error) { 718 var _p0 *byte 719 _p0, err = BytePtrFromString(path1) 720 if err != nil { 721 return 722 } 723 var _p1 *byte 724 _p1, err = BytePtrFromString(path2) 725 if err != nil { 726 return 727 } 728 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) 729 if e1 != 0 { 730 err = errnoErr(e1) 731 } 732 return 733 } 734 735 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 736 737 func Exit(code int) { 738 Syscall(SYS_EXIT, uintptr(code), 0, 0) 739 return 740 } 741 742 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 743 744 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 745 var _p0 *byte 746 _p0, err = BytePtrFromString(path) 747 if err != nil { 748 return 749 } 750 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 751 if e1 != 0 { 752 err = errnoErr(e1) 753 } 754 return 755 } 756 757 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 758 759 func Fchdir(fd int) (err error) { 760 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 761 if e1 != 0 { 762 err = errnoErr(e1) 763 } 764 return 765 } 766 767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 768 769 func Fchflags(fd int, flags int) (err error) { 770 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) 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 Fchmod(fd int, mode uint32) (err error) { 780 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) 781 if e1 != 0 { 782 err = errnoErr(e1) 783 } 784 return 785 } 786 787 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 788 789 func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 790 var _p0 *byte 791 _p0, err = BytePtrFromString(path) 792 if err != nil { 793 return 794 } 795 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 796 if e1 != 0 { 797 err = errnoErr(e1) 798 } 799 return 800 } 801 802 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 803 804 func Fchown(fd int, uid int, gid int) (err error) { 805 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 815 var _p0 *byte 816 _p0, err = BytePtrFromString(path) 817 if err != nil { 818 return 819 } 820 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 821 if e1 != 0 { 822 err = errnoErr(e1) 823 } 824 return 825 } 826 827 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 828 829 func Flock(fd int, how int) (err error) { 830 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) 831 if e1 != 0 { 832 err = errnoErr(e1) 833 } 834 return 835 } 836 837 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 838 839 func Fpathconf(fd int, name int) (val int, err error) { 840 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 841 val = int(r0) 842 if e1 != 0 { 843 err = errnoErr(e1) 844 } 845 return 846 } 847 848 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 849 850 func Fsync(fd int) (err error) { 851 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 852 if e1 != 0 { 853 err = errnoErr(e1) 854 } 855 return 856 } 857 858 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 859 860 func Ftruncate(fd int, length int64) (err error) { 861 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) 862 if e1 != 0 { 863 err = errnoErr(e1) 864 } 865 return 866 } 867 868 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 869 870 func Getdtablesize() (size int) { 871 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) 872 size = int(r0) 873 return 874 } 875 876 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 877 878 func Getegid() (egid int) { 879 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 880 egid = int(r0) 881 return 882 } 883 884 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 885 886 func Geteuid() (uid int) { 887 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 888 uid = int(r0) 889 return 890 } 891 892 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 893 894 func Getgid() (gid int) { 895 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 896 gid = int(r0) 897 return 898 } 899 900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 901 902 func Getpgid(pid int) (pgid int, err error) { 903 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 904 pgid = int(r0) 905 if e1 != 0 { 906 err = errnoErr(e1) 907 } 908 return 909 } 910 911 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 912 913 func Getpgrp() (pgrp int) { 914 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 915 pgrp = int(r0) 916 return 917 } 918 919 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 920 921 func Getpid() (pid int) { 922 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 923 pid = int(r0) 924 return 925 } 926 927 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 928 929 func Getppid() (ppid int) { 930 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 931 ppid = int(r0) 932 return 933 } 934 935 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 936 937 func Getpriority(which int, who int) (prio int, err error) { 938 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 939 prio = int(r0) 940 if e1 != 0 { 941 err = errnoErr(e1) 942 } 943 return 944 } 945 946 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 947 948 func Getrlimit(which int, lim *Rlimit) (err error) { 949 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Getrusage(who int, rusage *Rusage) (err error) { 959 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Getsid(pid int) (sid int, err error) { 969 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 970 sid = int(r0) 971 if e1 != 0 { 972 err = errnoErr(e1) 973 } 974 return 975 } 976 977 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 978 979 func Getuid() (uid int) { 980 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 981 uid = int(r0) 982 return 983 } 984 985 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 986 987 func Issetugid() (tainted bool) { 988 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) 989 tainted = bool(r0 != 0) 990 return 991 } 992 993 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 994 995 func Kqueue() (fd int, err error) { 996 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 997 fd = int(r0) 998 if e1 != 0 { 999 err = errnoErr(e1) 1000 } 1001 return 1002 } 1003 1004 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1005 1006 func Lchown(path string, uid int, gid int) (err error) { 1007 var _p0 *byte 1008 _p0, err = BytePtrFromString(path) 1009 if err != nil { 1010 return 1011 } 1012 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1013 if e1 != 0 { 1014 err = errnoErr(e1) 1015 } 1016 return 1017 } 1018 1019 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1020 1021 func Link(path string, link string) (err error) { 1022 var _p0 *byte 1023 _p0, err = BytePtrFromString(path) 1024 if err != nil { 1025 return 1026 } 1027 var _p1 *byte 1028 _p1, err = BytePtrFromString(link) 1029 if err != nil { 1030 return 1031 } 1032 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1033 if e1 != 0 { 1034 err = errnoErr(e1) 1035 } 1036 return 1037 } 1038 1039 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1040 1041 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { 1042 var _p0 *byte 1043 _p0, err = BytePtrFromString(path) 1044 if err != nil { 1045 return 1046 } 1047 var _p1 *byte 1048 _p1, err = BytePtrFromString(link) 1049 if err != nil { 1050 return 1051 } 1052 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 1053 if e1 != 0 { 1054 err = errnoErr(e1) 1055 } 1056 return 1057 } 1058 1059 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1060 1061 func Listen(s int, backlog int) (err error) { 1062 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) 1063 if e1 != 0 { 1064 err = errnoErr(e1) 1065 } 1066 return 1067 } 1068 1069 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1070 1071 func Mkdir(path string, mode uint32) (err error) { 1072 var _p0 *byte 1073 _p0, err = BytePtrFromString(path) 1074 if err != nil { 1075 return 1076 } 1077 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1078 if e1 != 0 { 1079 err = errnoErr(e1) 1080 } 1081 return 1082 } 1083 1084 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1085 1086 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1087 var _p0 *byte 1088 _p0, err = BytePtrFromString(path) 1089 if err != nil { 1090 return 1091 } 1092 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1093 if e1 != 0 { 1094 err = errnoErr(e1) 1095 } 1096 return 1097 } 1098 1099 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1100 1101 func Mkfifo(path string, mode uint32) (err error) { 1102 var _p0 *byte 1103 _p0, err = BytePtrFromString(path) 1104 if err != nil { 1105 return 1106 } 1107 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1108 if e1 != 0 { 1109 err = errnoErr(e1) 1110 } 1111 return 1112 } 1113 1114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1115 1116 func Mknod(path string, mode uint32, dev int) (err error) { 1117 var _p0 *byte 1118 _p0, err = BytePtrFromString(path) 1119 if err != nil { 1120 return 1121 } 1122 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 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 Open(path string, mode int, perm uint32) (fd int, err error) { 1132 var _p0 *byte 1133 _p0, err = BytePtrFromString(path) 1134 if err != nil { 1135 return 1136 } 1137 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 1138 fd = int(r0) 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 Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { 1148 var _p0 *byte 1149 _p0, err = BytePtrFromString(path) 1150 if err != nil { 1151 return 1152 } 1153 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) 1154 fd = int(r0) 1155 if e1 != 0 { 1156 err = errnoErr(e1) 1157 } 1158 return 1159 } 1160 1161 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1162 1163 func Pathconf(path string, name int) (val int, err error) { 1164 var _p0 *byte 1165 _p0, err = BytePtrFromString(path) 1166 if err != nil { 1167 return 1168 } 1169 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 1170 val = int(r0) 1171 if e1 != 0 { 1172 err = errnoErr(e1) 1173 } 1174 return 1175 } 1176 1177 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1178 1179 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1180 var _p0 unsafe.Pointer 1181 if len(p) > 0 { 1182 _p0 = unsafe.Pointer(&p[0]) 1183 } else { 1184 _p0 = unsafe.Pointer(&_zero) 1185 } 1186 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1187 n = int(r0) 1188 if e1 != 0 { 1189 err = errnoErr(e1) 1190 } 1191 return 1192 } 1193 1194 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1195 1196 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1197 var _p0 unsafe.Pointer 1198 if len(p) > 0 { 1199 _p0 = unsafe.Pointer(&p[0]) 1200 } else { 1201 _p0 = unsafe.Pointer(&_zero) 1202 } 1203 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) 1204 n = int(r0) 1205 if e1 != 0 { 1206 err = errnoErr(e1) 1207 } 1208 return 1209 } 1210 1211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1212 1213 func read(fd int, p []byte) (n int, err error) { 1214 var _p0 unsafe.Pointer 1215 if len(p) > 0 { 1216 _p0 = unsafe.Pointer(&p[0]) 1217 } else { 1218 _p0 = unsafe.Pointer(&_zero) 1219 } 1220 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1221 n = int(r0) 1222 if e1 != 0 { 1223 err = errnoErr(e1) 1224 } 1225 return 1226 } 1227 1228 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1229 1230 func Readlink(path string, buf []byte) (n int, err error) { 1231 var _p0 *byte 1232 _p0, err = BytePtrFromString(path) 1233 if err != nil { 1234 return 1235 } 1236 var _p1 unsafe.Pointer 1237 if len(buf) > 0 { 1238 _p1 = unsafe.Pointer(&buf[0]) 1239 } else { 1240 _p1 = unsafe.Pointer(&_zero) 1241 } 1242 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 1243 n = int(r0) 1244 if e1 != 0 { 1245 err = errnoErr(e1) 1246 } 1247 return 1248 } 1249 1250 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1251 1252 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 1253 var _p0 *byte 1254 _p0, err = BytePtrFromString(path) 1255 if err != nil { 1256 return 1257 } 1258 var _p1 unsafe.Pointer 1259 if len(buf) > 0 { 1260 _p1 = unsafe.Pointer(&buf[0]) 1261 } else { 1262 _p1 = unsafe.Pointer(&_zero) 1263 } 1264 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 1265 n = int(r0) 1266 if e1 != 0 { 1267 err = errnoErr(e1) 1268 } 1269 return 1270 } 1271 1272 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1273 1274 func Rename(from string, to string) (err error) { 1275 var _p0 *byte 1276 _p0, err = BytePtrFromString(from) 1277 if err != nil { 1278 return 1279 } 1280 var _p1 *byte 1281 _p1, err = BytePtrFromString(to) 1282 if err != nil { 1283 return 1284 } 1285 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1286 if e1 != 0 { 1287 err = errnoErr(e1) 1288 } 1289 return 1290 } 1291 1292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1293 1294 func Renameat(fromfd int, from string, tofd int, to string) (err error) { 1295 var _p0 *byte 1296 _p0, err = BytePtrFromString(from) 1297 if err != nil { 1298 return 1299 } 1300 var _p1 *byte 1301 _p1, err = BytePtrFromString(to) 1302 if err != nil { 1303 return 1304 } 1305 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1306 if e1 != 0 { 1307 err = errnoErr(e1) 1308 } 1309 return 1310 } 1311 1312 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1313 1314 func Revoke(path string) (err error) { 1315 var _p0 *byte 1316 _p0, err = BytePtrFromString(path) 1317 if err != nil { 1318 return 1319 } 1320 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1321 if e1 != 0 { 1322 err = errnoErr(e1) 1323 } 1324 return 1325 } 1326 1327 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1328 1329 func Rmdir(path string) (err error) { 1330 var _p0 *byte 1331 _p0, err = BytePtrFromString(path) 1332 if err != nil { 1333 return 1334 } 1335 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 1336 if e1 != 0 { 1337 err = errnoErr(e1) 1338 } 1339 return 1340 } 1341 1342 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1343 1344 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1345 r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) 1346 newoffset = int64(r0) 1347 if e1 != 0 { 1348 err = errnoErr(e1) 1349 } 1350 return 1351 } 1352 1353 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1354 1355 func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { 1356 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1357 if e1 != 0 { 1358 err = errnoErr(e1) 1359 } 1360 return 1361 } 1362 1363 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1364 1365 func Setegid(egid int) (err error) { 1366 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 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 Seteuid(euid int) (err error) { 1376 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 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 Setgid(gid int) (err error) { 1386 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) 1387 if e1 != 0 { 1388 err = errnoErr(e1) 1389 } 1390 return 1391 } 1392 1393 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1394 1395 func Setlogin(name string) (err error) { 1396 var _p0 *byte 1397 _p0, err = BytePtrFromString(name) 1398 if err != nil { 1399 return 1400 } 1401 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1402 if e1 != 0 { 1403 err = errnoErr(e1) 1404 } 1405 return 1406 } 1407 1408 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1409 1410 func Setpgid(pid int, pgid int) (err error) { 1411 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1412 if e1 != 0 { 1413 err = errnoErr(e1) 1414 } 1415 return 1416 } 1417 1418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1419 1420 func Setpriority(which int, who int, prio int) (err error) { 1421 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1422 if e1 != 0 { 1423 err = errnoErr(e1) 1424 } 1425 return 1426 } 1427 1428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1429 1430 func Setprivexec(flag int) (err error) { 1431 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) 1432 if e1 != 0 { 1433 err = errnoErr(e1) 1434 } 1435 return 1436 } 1437 1438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1439 1440 func Setregid(rgid int, egid int) (err error) { 1441 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 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 Setreuid(ruid int, euid int) (err error) { 1451 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1452 if e1 != 0 { 1453 err = errnoErr(e1) 1454 } 1455 return 1456 } 1457 1458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1459 1460 func Setrlimit(which int, lim *Rlimit) (err error) { 1461 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 1462 if e1 != 0 { 1463 err = errnoErr(e1) 1464 } 1465 return 1466 } 1467 1468 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1469 1470 func Setsid() (pid int, err error) { 1471 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1472 pid = int(r0) 1473 if e1 != 0 { 1474 err = errnoErr(e1) 1475 } 1476 return 1477 } 1478 1479 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1480 1481 func Settimeofday(tp *Timeval) (err error) { 1482 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1483 if e1 != 0 { 1484 err = errnoErr(e1) 1485 } 1486 return 1487 } 1488 1489 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1490 1491 func Setuid(uid int) (err error) { 1492 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) 1493 if e1 != 0 { 1494 err = errnoErr(e1) 1495 } 1496 return 1497 } 1498 1499 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1500 1501 func Symlink(path string, link string) (err error) { 1502 var _p0 *byte 1503 _p0, err = BytePtrFromString(path) 1504 if err != nil { 1505 return 1506 } 1507 var _p1 *byte 1508 _p1, err = BytePtrFromString(link) 1509 if err != nil { 1510 return 1511 } 1512 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1513 if e1 != 0 { 1514 err = errnoErr(e1) 1515 } 1516 return 1517 } 1518 1519 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1520 1521 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1522 var _p0 *byte 1523 _p0, err = BytePtrFromString(oldpath) 1524 if err != nil { 1525 return 1526 } 1527 var _p1 *byte 1528 _p1, err = BytePtrFromString(newpath) 1529 if err != nil { 1530 return 1531 } 1532 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1533 if e1 != 0 { 1534 err = errnoErr(e1) 1535 } 1536 return 1537 } 1538 1539 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1540 1541 func Sync() (err error) { 1542 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 1543 if e1 != 0 { 1544 err = errnoErr(e1) 1545 } 1546 return 1547 } 1548 1549 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1550 1551 func Truncate(path string, length int64) (err error) { 1552 var _p0 *byte 1553 _p0, err = BytePtrFromString(path) 1554 if err != nil { 1555 return 1556 } 1557 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) 1558 if e1 != 0 { 1559 err = errnoErr(e1) 1560 } 1561 return 1562 } 1563 1564 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1565 1566 func Umask(newmask int) (oldmask int) { 1567 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1568 oldmask = int(r0) 1569 return 1570 } 1571 1572 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1573 1574 func Undelete(path string) (err error) { 1575 var _p0 *byte 1576 _p0, err = BytePtrFromString(path) 1577 if err != nil { 1578 return 1579 } 1580 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1581 if e1 != 0 { 1582 err = errnoErr(e1) 1583 } 1584 return 1585 } 1586 1587 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1588 1589 func Unlink(path string) (err error) { 1590 var _p0 *byte 1591 _p0, err = BytePtrFromString(path) 1592 if err != nil { 1593 return 1594 } 1595 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1596 if e1 != 0 { 1597 err = errnoErr(e1) 1598 } 1599 return 1600 } 1601 1602 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1603 1604 func Unlinkat(dirfd int, path string, flags int) (err error) { 1605 var _p0 *byte 1606 _p0, err = BytePtrFromString(path) 1607 if err != nil { 1608 return 1609 } 1610 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 1611 if e1 != 0 { 1612 err = errnoErr(e1) 1613 } 1614 return 1615 } 1616 1617 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1618 1619 func Unmount(path string, flags int) (err error) { 1620 var _p0 *byte 1621 _p0, err = BytePtrFromString(path) 1622 if err != nil { 1623 return 1624 } 1625 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1626 if e1 != 0 { 1627 err = errnoErr(e1) 1628 } 1629 return 1630 } 1631 1632 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1633 1634 func write(fd int, p []byte) (n int, err error) { 1635 var _p0 unsafe.Pointer 1636 if len(p) > 0 { 1637 _p0 = unsafe.Pointer(&p[0]) 1638 } else { 1639 _p0 = unsafe.Pointer(&_zero) 1640 } 1641 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1642 n = int(r0) 1643 if e1 != 0 { 1644 err = errnoErr(e1) 1645 } 1646 return 1647 } 1648 1649 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1650 1651 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1652 r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) 1653 ret = uintptr(r0) 1654 if e1 != 0 { 1655 err = errnoErr(e1) 1656 } 1657 return 1658 } 1659 1660 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1661 1662 func munmap(addr uintptr, length uintptr) (err error) { 1663 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1664 if e1 != 0 { 1665 err = errnoErr(e1) 1666 } 1667 return 1668 } 1669 1670 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1671 1672 func readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1673 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1674 n = int(r0) 1675 if e1 != 0 { 1676 err = errnoErr(e1) 1677 } 1678 return 1679 } 1680 1681 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1682 1683 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1684 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1685 n = int(r0) 1686 if e1 != 0 { 1687 err = errnoErr(e1) 1688 } 1689 return 1690 } 1691 1692 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1693 1694 func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { 1695 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1696 sec = int64(r0) 1697 usec = int32(r1) 1698 if e1 != 0 { 1699 err = errnoErr(e1) 1700 } 1701 return 1702 } 1703 1704 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1705 1706 func Fstat(fd int, stat *Stat_t) (err error) { 1707 _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1708 if e1 != 0 { 1709 err = errnoErr(e1) 1710 } 1711 return 1712 } 1713 1714 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1715 1716 func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { 1717 var _p0 *byte 1718 _p0, err = BytePtrFromString(path) 1719 if err != nil { 1720 return 1721 } 1722 _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 1723 if e1 != 0 { 1724 err = errnoErr(e1) 1725 } 1726 return 1727 } 1728 1729 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1730 1731 func Fstatfs(fd int, stat *Statfs_t) (err error) { 1732 _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1733 if e1 != 0 { 1734 err = errnoErr(e1) 1735 } 1736 return 1737 } 1738 1739 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1740 1741 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { 1742 r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(buf), uintptr(size), uintptr(flags)) 1743 n = int(r0) 1744 if e1 != 0 { 1745 err = errnoErr(e1) 1746 } 1747 return 1748 } 1749 1750 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1751 1752 func Lstat(path string, stat *Stat_t) (err error) { 1753 var _p0 *byte 1754 _p0, err = BytePtrFromString(path) 1755 if err != nil { 1756 return 1757 } 1758 _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1759 if e1 != 0 { 1760 err = errnoErr(e1) 1761 } 1762 return 1763 } 1764 1765 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1766 1767 func Stat(path string, stat *Stat_t) (err error) { 1768 var _p0 *byte 1769 _p0, err = BytePtrFromString(path) 1770 if err != nil { 1771 return 1772 } 1773 _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1774 if e1 != 0 { 1775 err = errnoErr(e1) 1776 } 1777 return 1778 } 1779 1780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1781 1782 func Statfs(path string, stat *Statfs_t) (err error) { 1783 var _p0 *byte 1784 _p0, err = BytePtrFromString(path) 1785 if err != nil { 1786 return 1787 } 1788 _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1789 if e1 != 0 { 1790 err = errnoErr(e1) 1791 } 1792 return 1793 }