github.com/Andyfoo/golang/x/sys@v0.0.0-20190901054642-57c1bf301704/unix/zsyscall_darwin_386.1_11.go (about) 1 // go run mksyscall.go -l32 -tags darwin,386,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_386.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build darwin,386,!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 getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { 381 _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 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 pipe() (r int, w int, err error) { 391 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) 392 r = int(r0) 393 w = int(r1) 394 if e1 != 0 { 395 err = errnoErr(e1) 396 } 397 return 398 } 399 400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 401 402 func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { 403 var _p0 *byte 404 _p0, err = BytePtrFromString(path) 405 if err != nil { 406 return 407 } 408 var _p1 *byte 409 _p1, err = BytePtrFromString(attr) 410 if err != nil { 411 return 412 } 413 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) 414 sz = int(r0) 415 if e1 != 0 { 416 err = errnoErr(e1) 417 } 418 return 419 } 420 421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 422 423 func fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { 424 var _p0 *byte 425 _p0, err = BytePtrFromString(attr) 426 if err != nil { 427 return 428 } 429 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) 430 sz = int(r0) 431 if e1 != 0 { 432 err = errnoErr(e1) 433 } 434 return 435 } 436 437 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 438 439 func setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) { 440 var _p0 *byte 441 _p0, err = BytePtrFromString(path) 442 if err != nil { 443 return 444 } 445 var _p1 *byte 446 _p1, err = BytePtrFromString(attr) 447 if err != nil { 448 return 449 } 450 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) 451 if e1 != 0 { 452 err = errnoErr(e1) 453 } 454 return 455 } 456 457 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 458 459 func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { 460 var _p0 *byte 461 _p0, err = BytePtrFromString(attr) 462 if err != nil { 463 return 464 } 465 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) 466 if e1 != 0 { 467 err = errnoErr(e1) 468 } 469 return 470 } 471 472 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 473 474 func removexattr(path string, attr string, options int) (err error) { 475 var _p0 *byte 476 _p0, err = BytePtrFromString(path) 477 if err != nil { 478 return 479 } 480 var _p1 *byte 481 _p1, err = BytePtrFromString(attr) 482 if err != nil { 483 return 484 } 485 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) 486 if e1 != 0 { 487 err = errnoErr(e1) 488 } 489 return 490 } 491 492 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 493 494 func fremovexattr(fd int, attr string, options int) (err error) { 495 var _p0 *byte 496 _p0, err = BytePtrFromString(attr) 497 if err != nil { 498 return 499 } 500 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) 501 if e1 != 0 { 502 err = errnoErr(e1) 503 } 504 return 505 } 506 507 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 508 509 func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { 510 var _p0 *byte 511 _p0, err = BytePtrFromString(path) 512 if err != nil { 513 return 514 } 515 r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) 516 sz = int(r0) 517 if e1 != 0 { 518 err = errnoErr(e1) 519 } 520 return 521 } 522 523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 524 525 func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { 526 r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) 527 sz = int(r0) 528 if e1 != 0 { 529 err = errnoErr(e1) 530 } 531 return 532 } 533 534 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 535 536 func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { 537 _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) 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 kill(pid int, signum int, posix int) (err error) { 547 _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) 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 ioctl(fd int, req uint, arg uintptr) (err error) { 557 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 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 sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { 567 _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(offset>>32), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags), 0, 0) 568 if e1 != 0 { 569 err = errnoErr(e1) 570 } 571 return 572 } 573 574 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 575 576 func Access(path string, mode uint32) (err error) { 577 var _p0 *byte 578 _p0, err = BytePtrFromString(path) 579 if err != nil { 580 return 581 } 582 _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 583 if e1 != 0 { 584 err = errnoErr(e1) 585 } 586 return 587 } 588 589 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 590 591 func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { 592 _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 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 Chdir(path string) (err error) { 602 var _p0 *byte 603 _p0, err = BytePtrFromString(path) 604 if err != nil { 605 return 606 } 607 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 608 if e1 != 0 { 609 err = errnoErr(e1) 610 } 611 return 612 } 613 614 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 615 616 func Chflags(path string, flags int) (err error) { 617 var _p0 *byte 618 _p0, err = BytePtrFromString(path) 619 if err != nil { 620 return 621 } 622 _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 623 if e1 != 0 { 624 err = errnoErr(e1) 625 } 626 return 627 } 628 629 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 630 631 func Chmod(path string, mode uint32) (err error) { 632 var _p0 *byte 633 _p0, err = BytePtrFromString(path) 634 if err != nil { 635 return 636 } 637 _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 638 if e1 != 0 { 639 err = errnoErr(e1) 640 } 641 return 642 } 643 644 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 645 646 func Chown(path string, uid int, gid int) (err error) { 647 var _p0 *byte 648 _p0, err = BytePtrFromString(path) 649 if err != nil { 650 return 651 } 652 _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 653 if e1 != 0 { 654 err = errnoErr(e1) 655 } 656 return 657 } 658 659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 660 661 func Chroot(path string) (err error) { 662 var _p0 *byte 663 _p0, err = BytePtrFromString(path) 664 if err != nil { 665 return 666 } 667 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 668 if e1 != 0 { 669 err = errnoErr(e1) 670 } 671 return 672 } 673 674 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 675 676 func Close(fd int) (err error) { 677 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 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 Dup(fd int) (nfd int, err error) { 687 r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) 688 nfd = int(r0) 689 if e1 != 0 { 690 err = errnoErr(e1) 691 } 692 return 693 } 694 695 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 696 697 func Dup2(from int, to int) (err error) { 698 _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) 699 if e1 != 0 { 700 err = errnoErr(e1) 701 } 702 return 703 } 704 705 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 706 707 func Exchangedata(path1 string, path2 string, options int) (err error) { 708 var _p0 *byte 709 _p0, err = BytePtrFromString(path1) 710 if err != nil { 711 return 712 } 713 var _p1 *byte 714 _p1, err = BytePtrFromString(path2) 715 if err != nil { 716 return 717 } 718 _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) 719 if e1 != 0 { 720 err = errnoErr(e1) 721 } 722 return 723 } 724 725 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 726 727 func Exit(code int) { 728 Syscall(SYS_EXIT, uintptr(code), 0, 0) 729 return 730 } 731 732 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 733 734 func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { 735 var _p0 *byte 736 _p0, err = BytePtrFromString(path) 737 if err != nil { 738 return 739 } 740 _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 741 if e1 != 0 { 742 err = errnoErr(e1) 743 } 744 return 745 } 746 747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 748 749 func Fchdir(fd int) (err error) { 750 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 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 Fchflags(fd int, flags int) (err error) { 760 _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 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 Fchmod(fd int, mode uint32) (err error) { 770 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { 780 var _p0 *byte 781 _p0, err = BytePtrFromString(path) 782 if err != nil { 783 return 784 } 785 _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) 786 if e1 != 0 { 787 err = errnoErr(e1) 788 } 789 return 790 } 791 792 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 793 794 func Fchown(fd int, uid int, gid int) (err error) { 795 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 805 var _p0 *byte 806 _p0, err = BytePtrFromString(path) 807 if err != nil { 808 return 809 } 810 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) 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 Flock(fd int, how int) (err error) { 820 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 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 Fpathconf(fd int, name int) (val int, err error) { 830 r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) 831 val = int(r0) 832 if e1 != 0 { 833 err = errnoErr(e1) 834 } 835 return 836 } 837 838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 839 840 func Fsync(fd int) (err error) { 841 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 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 Ftruncate(fd int, length int64) (err error) { 851 _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length>>32)) 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 Getdtablesize() (size int) { 861 r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) 862 size = int(r0) 863 return 864 } 865 866 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 867 868 func Getegid() (egid int) { 869 r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) 870 egid = int(r0) 871 return 872 } 873 874 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 875 876 func Geteuid() (uid int) { 877 r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) 878 uid = int(r0) 879 return 880 } 881 882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 883 884 func Getgid() (gid int) { 885 r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) 886 gid = int(r0) 887 return 888 } 889 890 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 891 892 func Getpgid(pid int) (pgid int, err error) { 893 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 894 pgid = int(r0) 895 if e1 != 0 { 896 err = errnoErr(e1) 897 } 898 return 899 } 900 901 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 902 903 func Getpgrp() (pgrp int) { 904 r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) 905 pgrp = int(r0) 906 return 907 } 908 909 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 910 911 func Getpid() (pid int) { 912 r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) 913 pid = int(r0) 914 return 915 } 916 917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 918 919 func Getppid() (ppid int) { 920 r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) 921 ppid = int(r0) 922 return 923 } 924 925 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 926 927 func Getpriority(which int, who int) (prio int, err error) { 928 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 929 prio = int(r0) 930 if e1 != 0 { 931 err = errnoErr(e1) 932 } 933 return 934 } 935 936 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 937 938 func Getrlimit(which int, lim *Rlimit) (err error) { 939 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) 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 Getrusage(who int, rusage *Rusage) (err error) { 949 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Getsid(pid int) (sid int, err error) { 959 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 960 sid = int(r0) 961 if e1 != 0 { 962 err = errnoErr(e1) 963 } 964 return 965 } 966 967 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 968 969 func Getuid() (uid int) { 970 r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) 971 uid = int(r0) 972 return 973 } 974 975 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 976 977 func Issetugid() (tainted bool) { 978 r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) 979 tainted = bool(r0 != 0) 980 return 981 } 982 983 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 984 985 func Kqueue() (fd int, err error) { 986 r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) 987 fd = int(r0) 988 if e1 != 0 { 989 err = errnoErr(e1) 990 } 991 return 992 } 993 994 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 995 996 func Lchown(path string, uid int, gid int) (err error) { 997 var _p0 *byte 998 _p0, err = BytePtrFromString(path) 999 if err != nil { 1000 return 1001 } 1002 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1003 if e1 != 0 { 1004 err = errnoErr(e1) 1005 } 1006 return 1007 } 1008 1009 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1010 1011 func Link(path string, link string) (err error) { 1012 var _p0 *byte 1013 _p0, err = BytePtrFromString(path) 1014 if err != nil { 1015 return 1016 } 1017 var _p1 *byte 1018 _p1, err = BytePtrFromString(link) 1019 if err != nil { 1020 return 1021 } 1022 _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1023 if e1 != 0 { 1024 err = errnoErr(e1) 1025 } 1026 return 1027 } 1028 1029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1030 1031 func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { 1032 var _p0 *byte 1033 _p0, err = BytePtrFromString(path) 1034 if err != nil { 1035 return 1036 } 1037 var _p1 *byte 1038 _p1, err = BytePtrFromString(link) 1039 if err != nil { 1040 return 1041 } 1042 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 1043 if e1 != 0 { 1044 err = errnoErr(e1) 1045 } 1046 return 1047 } 1048 1049 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1050 1051 func Listen(s int, backlog int) (err error) { 1052 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 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 Mkdir(path string, mode uint32) (err error) { 1062 var _p0 *byte 1063 _p0, err = BytePtrFromString(path) 1064 if err != nil { 1065 return 1066 } 1067 _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1068 if e1 != 0 { 1069 err = errnoErr(e1) 1070 } 1071 return 1072 } 1073 1074 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1075 1076 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1077 var _p0 *byte 1078 _p0, err = BytePtrFromString(path) 1079 if err != nil { 1080 return 1081 } 1082 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1083 if e1 != 0 { 1084 err = errnoErr(e1) 1085 } 1086 return 1087 } 1088 1089 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1090 1091 func Mkfifo(path string, mode uint32) (err error) { 1092 var _p0 *byte 1093 _p0, err = BytePtrFromString(path) 1094 if err != nil { 1095 return 1096 } 1097 _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) 1098 if e1 != 0 { 1099 err = errnoErr(e1) 1100 } 1101 return 1102 } 1103 1104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1105 1106 func Mknod(path string, mode uint32, dev int) (err error) { 1107 var _p0 *byte 1108 _p0, err = BytePtrFromString(path) 1109 if err != nil { 1110 return 1111 } 1112 _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) 1113 if e1 != 0 { 1114 err = errnoErr(e1) 1115 } 1116 return 1117 } 1118 1119 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1120 1121 func Open(path string, mode int, perm uint32) (fd int, err error) { 1122 var _p0 *byte 1123 _p0, err = BytePtrFromString(path) 1124 if err != nil { 1125 return 1126 } 1127 r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) 1128 fd = int(r0) 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 Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { 1138 var _p0 *byte 1139 _p0, err = BytePtrFromString(path) 1140 if err != nil { 1141 return 1142 } 1143 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) 1144 fd = int(r0) 1145 if e1 != 0 { 1146 err = errnoErr(e1) 1147 } 1148 return 1149 } 1150 1151 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1152 1153 func Pathconf(path string, name int) (val int, err error) { 1154 var _p0 *byte 1155 _p0, err = BytePtrFromString(path) 1156 if err != nil { 1157 return 1158 } 1159 r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) 1160 val = int(r0) 1161 if e1 != 0 { 1162 err = errnoErr(e1) 1163 } 1164 return 1165 } 1166 1167 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1168 1169 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1170 var _p0 unsafe.Pointer 1171 if len(p) > 0 { 1172 _p0 = unsafe.Pointer(&p[0]) 1173 } else { 1174 _p0 = unsafe.Pointer(&_zero) 1175 } 1176 r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1177 n = int(r0) 1178 if e1 != 0 { 1179 err = errnoErr(e1) 1180 } 1181 return 1182 } 1183 1184 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1185 1186 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1187 var _p0 unsafe.Pointer 1188 if len(p) > 0 { 1189 _p0 = unsafe.Pointer(&p[0]) 1190 } else { 1191 _p0 = unsafe.Pointer(&_zero) 1192 } 1193 r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1194 n = int(r0) 1195 if e1 != 0 { 1196 err = errnoErr(e1) 1197 } 1198 return 1199 } 1200 1201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1202 1203 func read(fd int, p []byte) (n int, err error) { 1204 var _p0 unsafe.Pointer 1205 if len(p) > 0 { 1206 _p0 = unsafe.Pointer(&p[0]) 1207 } else { 1208 _p0 = unsafe.Pointer(&_zero) 1209 } 1210 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1211 n = int(r0) 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 Readlink(path string, buf []byte) (n int, err error) { 1221 var _p0 *byte 1222 _p0, err = BytePtrFromString(path) 1223 if err != nil { 1224 return 1225 } 1226 var _p1 unsafe.Pointer 1227 if len(buf) > 0 { 1228 _p1 = unsafe.Pointer(&buf[0]) 1229 } else { 1230 _p1 = unsafe.Pointer(&_zero) 1231 } 1232 r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) 1233 n = int(r0) 1234 if e1 != 0 { 1235 err = errnoErr(e1) 1236 } 1237 return 1238 } 1239 1240 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1241 1242 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 1243 var _p0 *byte 1244 _p0, err = BytePtrFromString(path) 1245 if err != nil { 1246 return 1247 } 1248 var _p1 unsafe.Pointer 1249 if len(buf) > 0 { 1250 _p1 = unsafe.Pointer(&buf[0]) 1251 } else { 1252 _p1 = unsafe.Pointer(&_zero) 1253 } 1254 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 1255 n = int(r0) 1256 if e1 != 0 { 1257 err = errnoErr(e1) 1258 } 1259 return 1260 } 1261 1262 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1263 1264 func Rename(from string, to string) (err error) { 1265 var _p0 *byte 1266 _p0, err = BytePtrFromString(from) 1267 if err != nil { 1268 return 1269 } 1270 var _p1 *byte 1271 _p1, err = BytePtrFromString(to) 1272 if err != nil { 1273 return 1274 } 1275 _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1276 if e1 != 0 { 1277 err = errnoErr(e1) 1278 } 1279 return 1280 } 1281 1282 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1283 1284 func Renameat(fromfd int, from string, tofd int, to string) (err error) { 1285 var _p0 *byte 1286 _p0, err = BytePtrFromString(from) 1287 if err != nil { 1288 return 1289 } 1290 var _p1 *byte 1291 _p1, err = BytePtrFromString(to) 1292 if err != nil { 1293 return 1294 } 1295 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1296 if e1 != 0 { 1297 err = errnoErr(e1) 1298 } 1299 return 1300 } 1301 1302 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1303 1304 func Revoke(path string) (err error) { 1305 var _p0 *byte 1306 _p0, err = BytePtrFromString(path) 1307 if err != nil { 1308 return 1309 } 1310 _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1311 if e1 != 0 { 1312 err = errnoErr(e1) 1313 } 1314 return 1315 } 1316 1317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1318 1319 func Rmdir(path string) (err error) { 1320 var _p0 *byte 1321 _p0, err = BytePtrFromString(path) 1322 if err != nil { 1323 return 1324 } 1325 _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 1326 if e1 != 0 { 1327 err = errnoErr(e1) 1328 } 1329 return 1330 } 1331 1332 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1333 1334 func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { 1335 r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0) 1336 newoffset = int64(int64(r1)<<32 | int64(r0)) 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 Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) { 1346 _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 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 Setegid(egid int) (err error) { 1356 _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 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 Seteuid(euid int) (err error) { 1366 _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 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 Setgid(gid int) (err error) { 1376 _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 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 Setlogin(name string) (err error) { 1386 var _p0 *byte 1387 _p0, err = BytePtrFromString(name) 1388 if err != nil { 1389 return 1390 } 1391 _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) 1392 if e1 != 0 { 1393 err = errnoErr(e1) 1394 } 1395 return 1396 } 1397 1398 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1399 1400 func Setpgid(pid int, pgid int) (err error) { 1401 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 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 Setpriority(which int, who int, prio int) (err error) { 1411 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 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 Setprivexec(flag int) (err error) { 1421 _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) 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 Setregid(rgid int, egid int) (err error) { 1431 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 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 Setreuid(ruid int, euid int) (err error) { 1441 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 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 Setrlimit(which int, lim *Rlimit) (err error) { 1451 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 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 Setsid() (pid int, err error) { 1461 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1462 pid = int(r0) 1463 if e1 != 0 { 1464 err = errnoErr(e1) 1465 } 1466 return 1467 } 1468 1469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1470 1471 func Settimeofday(tp *Timeval) (err error) { 1472 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 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 Setuid(uid int) (err error) { 1482 _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 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 Symlink(path string, link string) (err error) { 1492 var _p0 *byte 1493 _p0, err = BytePtrFromString(path) 1494 if err != nil { 1495 return 1496 } 1497 var _p1 *byte 1498 _p1, err = BytePtrFromString(link) 1499 if err != nil { 1500 return 1501 } 1502 _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1503 if e1 != 0 { 1504 err = errnoErr(e1) 1505 } 1506 return 1507 } 1508 1509 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1510 1511 func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 1512 var _p0 *byte 1513 _p0, err = BytePtrFromString(oldpath) 1514 if err != nil { 1515 return 1516 } 1517 var _p1 *byte 1518 _p1, err = BytePtrFromString(newpath) 1519 if err != nil { 1520 return 1521 } 1522 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 1523 if e1 != 0 { 1524 err = errnoErr(e1) 1525 } 1526 return 1527 } 1528 1529 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1530 1531 func Sync() (err error) { 1532 _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) 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 Truncate(path string, length int64) (err error) { 1542 var _p0 *byte 1543 _p0, err = BytePtrFromString(path) 1544 if err != nil { 1545 return 1546 } 1547 _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) 1548 if e1 != 0 { 1549 err = errnoErr(e1) 1550 } 1551 return 1552 } 1553 1554 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1555 1556 func Umask(newmask int) (oldmask int) { 1557 r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) 1558 oldmask = int(r0) 1559 return 1560 } 1561 1562 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1563 1564 func Undelete(path string) (err error) { 1565 var _p0 *byte 1566 _p0, err = BytePtrFromString(path) 1567 if err != nil { 1568 return 1569 } 1570 _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) 1571 if e1 != 0 { 1572 err = errnoErr(e1) 1573 } 1574 return 1575 } 1576 1577 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1578 1579 func Unlink(path string) (err error) { 1580 var _p0 *byte 1581 _p0, err = BytePtrFromString(path) 1582 if err != nil { 1583 return 1584 } 1585 _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) 1586 if e1 != 0 { 1587 err = errnoErr(e1) 1588 } 1589 return 1590 } 1591 1592 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1593 1594 func Unlinkat(dirfd int, path string, flags int) (err error) { 1595 var _p0 *byte 1596 _p0, err = BytePtrFromString(path) 1597 if err != nil { 1598 return 1599 } 1600 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 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 Unmount(path string, flags int) (err error) { 1610 var _p0 *byte 1611 _p0, err = BytePtrFromString(path) 1612 if err != nil { 1613 return 1614 } 1615 _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1616 if e1 != 0 { 1617 err = errnoErr(e1) 1618 } 1619 return 1620 } 1621 1622 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1623 1624 func write(fd int, p []byte) (n int, err error) { 1625 var _p0 unsafe.Pointer 1626 if len(p) > 0 { 1627 _p0 = unsafe.Pointer(&p[0]) 1628 } else { 1629 _p0 = unsafe.Pointer(&_zero) 1630 } 1631 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1632 n = int(r0) 1633 if e1 != 0 { 1634 err = errnoErr(e1) 1635 } 1636 return 1637 } 1638 1639 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1640 1641 func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { 1642 r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0) 1643 ret = uintptr(r0) 1644 if e1 != 0 { 1645 err = errnoErr(e1) 1646 } 1647 return 1648 } 1649 1650 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1651 1652 func munmap(addr uintptr, length uintptr) (err error) { 1653 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 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 readlen(fd int, buf *byte, nbuf int) (n int, err error) { 1663 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1664 n = int(r0) 1665 if e1 != 0 { 1666 err = errnoErr(e1) 1667 } 1668 return 1669 } 1670 1671 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1672 1673 func writelen(fd int, buf *byte, nbuf int) (n int, err error) { 1674 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) 1675 n = int(r0) 1676 if e1 != 0 { 1677 err = errnoErr(e1) 1678 } 1679 return 1680 } 1681 1682 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1683 1684 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 1685 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 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 int32, usec int32, err error) { 1695 r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) 1696 sec = int32(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_FSTAT64, 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_FSTATAT64, 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_FSTATFS64, 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 Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { 1742 var _p0 unsafe.Pointer 1743 if len(buf) > 0 { 1744 _p0 = unsafe.Pointer(&buf[0]) 1745 } else { 1746 _p0 = unsafe.Pointer(&_zero) 1747 } 1748 r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) 1749 n = int(r0) 1750 if e1 != 0 { 1751 err = errnoErr(e1) 1752 } 1753 return 1754 } 1755 1756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1757 1758 func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { 1759 r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags)) 1760 n = int(r0) 1761 if e1 != 0 { 1762 err = errnoErr(e1) 1763 } 1764 return 1765 } 1766 1767 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1768 1769 func Lstat(path string, stat *Stat_t) (err error) { 1770 var _p0 *byte 1771 _p0, err = BytePtrFromString(path) 1772 if err != nil { 1773 return 1774 } 1775 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1776 if e1 != 0 { 1777 err = errnoErr(e1) 1778 } 1779 return 1780 } 1781 1782 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1783 1784 func Stat(path string, stat *Stat_t) (err error) { 1785 var _p0 *byte 1786 _p0, err = BytePtrFromString(path) 1787 if err != nil { 1788 return 1789 } 1790 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1791 if e1 != 0 { 1792 err = errnoErr(e1) 1793 } 1794 return 1795 } 1796 1797 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1798 1799 func Statfs(path string, stat *Statfs_t) (err error) { 1800 var _p0 *byte 1801 _p0, err = BytePtrFromString(path) 1802 if err != nil { 1803 return 1804 } 1805 _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1806 if e1 != 0 { 1807 err = errnoErr(e1) 1808 } 1809 return 1810 }