github.com/go-xe2/third@v1.0.3/golang.org/x/sys/unix/zsyscall_linux_mipsle.go (about) 1 // go run mksyscall.go -l32 -arm -tags linux,mipsle syscall_linux.go syscall_linux_mipsx.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build linux,mipsle 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 fchmodat(dirfd int, path string, mode uint32) (err error) { 18 var _p0 *byte 19 _p0, err = BytePtrFromString(path) 20 if err != nil { 21 return 22 } 23 _, _, e1 := Syscall(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 24 if e1 != 0 { 25 err = errnoErr(e1) 26 } 27 return 28 } 29 30 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 31 32 func ioctl(fd int, req uint, arg uintptr) (err error) { 33 _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) 34 if e1 != 0 { 35 err = errnoErr(e1) 36 } 37 return 38 } 39 40 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 41 42 func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) { 43 var _p0 *byte 44 _p0, err = BytePtrFromString(oldpath) 45 if err != nil { 46 return 47 } 48 var _p1 *byte 49 _p1, err = BytePtrFromString(newpath) 50 if err != nil { 51 return 52 } 53 _, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 54 if e1 != 0 { 55 err = errnoErr(e1) 56 } 57 return 58 } 59 60 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 61 62 func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) { 63 var _p0 *byte 64 _p0, err = BytePtrFromString(path) 65 if err != nil { 66 return 67 } 68 r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0) 69 fd = int(r0) 70 if e1 != 0 { 71 err = errnoErr(e1) 72 } 73 return 74 } 75 76 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 77 78 func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 79 r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) 80 n = int(r0) 81 if e1 != 0 { 82 err = errnoErr(e1) 83 } 84 return 85 } 86 87 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 88 89 func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { 90 var _p0 *byte 91 _p0, err = BytePtrFromString(path) 92 if err != nil { 93 return 94 } 95 var _p1 unsafe.Pointer 96 if len(buf) > 0 { 97 _p1 = unsafe.Pointer(&buf[0]) 98 } else { 99 _p1 = unsafe.Pointer(&_zero) 100 } 101 r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) 102 n = int(r0) 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 Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { 112 var _p0 *byte 113 _p0, err = BytePtrFromString(oldpath) 114 if err != nil { 115 return 116 } 117 var _p1 *byte 118 _p1, err = BytePtrFromString(newpath) 119 if err != nil { 120 return 121 } 122 _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) 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 Unlinkat(dirfd int, path string, flags int) (err error) { 132 var _p0 *byte 133 _p0, err = BytePtrFromString(path) 134 if err != nil { 135 return 136 } 137 _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 138 if e1 != 0 { 139 err = errnoErr(e1) 140 } 141 return 142 } 143 144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 145 146 func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { 147 var _p0 *byte 148 _p0, err = BytePtrFromString(path) 149 if err != nil { 150 return 151 } 152 _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) 153 if e1 != 0 { 154 err = errnoErr(e1) 155 } 156 return 157 } 158 159 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 160 161 func Getcwd(buf []byte) (n int, err error) { 162 var _p0 unsafe.Pointer 163 if len(buf) > 0 { 164 _p0 = unsafe.Pointer(&buf[0]) 165 } else { 166 _p0 = unsafe.Pointer(&_zero) 167 } 168 r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0) 169 n = int(r0) 170 if e1 != 0 { 171 err = errnoErr(e1) 172 } 173 return 174 } 175 176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 177 178 func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { 179 r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) 180 wpid = int(r0) 181 if e1 != 0 { 182 err = errnoErr(e1) 183 } 184 return 185 } 186 187 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 188 189 func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) { 190 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 191 ret = int(r0) 192 if e1 != 0 { 193 err = errnoErr(e1) 194 } 195 return 196 } 197 198 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 199 200 func KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) { 201 var _p0 unsafe.Pointer 202 if len(buf) > 0 { 203 _p0 = unsafe.Pointer(&buf[0]) 204 } else { 205 _p0 = unsafe.Pointer(&_zero) 206 } 207 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(buf)), uintptr(arg5), 0) 208 ret = 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 keyctlJoin(cmd int, arg2 string) (ret int, err error) { 218 var _p0 *byte 219 _p0, err = BytePtrFromString(arg2) 220 if err != nil { 221 return 222 } 223 r0, _, e1 := Syscall(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0) 224 ret = int(r0) 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 keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) { 234 var _p0 *byte 235 _p0, err = BytePtrFromString(arg3) 236 if err != nil { 237 return 238 } 239 var _p1 *byte 240 _p1, err = BytePtrFromString(arg4) 241 if err != nil { 242 return 243 } 244 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(arg5), 0) 245 ret = int(r0) 246 if e1 != 0 { 247 err = errnoErr(e1) 248 } 249 return 250 } 251 252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 253 254 func keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) { 255 var _p0 unsafe.Pointer 256 if len(payload) > 0 { 257 _p0 = unsafe.Pointer(&payload[0]) 258 } else { 259 _p0 = unsafe.Pointer(&_zero) 260 } 261 _, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(_p0), uintptr(len(payload)), uintptr(arg5), 0) 262 if e1 != 0 { 263 err = errnoErr(e1) 264 } 265 return 266 } 267 268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 269 270 func keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) { 271 var _p0 unsafe.Pointer 272 if len(buf) > 0 { 273 _p0 = unsafe.Pointer(&buf[0]) 274 } else { 275 _p0 = unsafe.Pointer(&_zero) 276 } 277 r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(unsafe.Pointer(arg2)), uintptr(_p0), uintptr(len(buf)), 0, 0) 278 ret = int(r0) 279 if e1 != 0 { 280 err = errnoErr(e1) 281 } 282 return 283 } 284 285 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 286 287 func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 288 _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) 289 if e1 != 0 { 290 err = errnoErr(e1) 291 } 292 return 293 } 294 295 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 296 297 func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) { 298 var _p0 *byte 299 _p0, err = BytePtrFromString(arg) 300 if err != nil { 301 return 302 } 303 _, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 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 mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) { 313 var _p0 *byte 314 _p0, err = BytePtrFromString(source) 315 if err != nil { 316 return 317 } 318 var _p1 *byte 319 _p1, err = BytePtrFromString(target) 320 if err != nil { 321 return 322 } 323 var _p2 *byte 324 _p2, err = BytePtrFromString(fstype) 325 if err != nil { 326 return 327 } 328 _, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0) 329 if e1 != 0 { 330 err = errnoErr(e1) 331 } 332 return 333 } 334 335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 336 337 func Acct(path string) (err error) { 338 var _p0 *byte 339 _p0, err = BytePtrFromString(path) 340 if err != nil { 341 return 342 } 343 _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0) 344 if e1 != 0 { 345 err = errnoErr(e1) 346 } 347 return 348 } 349 350 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 351 352 func AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error) { 353 var _p0 *byte 354 _p0, err = BytePtrFromString(keyType) 355 if err != nil { 356 return 357 } 358 var _p1 *byte 359 _p1, err = BytePtrFromString(description) 360 if err != nil { 361 return 362 } 363 var _p2 unsafe.Pointer 364 if len(payload) > 0 { 365 _p2 = unsafe.Pointer(&payload[0]) 366 } else { 367 _p2 = unsafe.Pointer(&_zero) 368 } 369 r0, _, e1 := Syscall6(SYS_ADD_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(payload)), uintptr(ringid), 0) 370 id = int(r0) 371 if e1 != 0 { 372 err = errnoErr(e1) 373 } 374 return 375 } 376 377 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 378 379 func Adjtimex(buf *Timex) (state int, err error) { 380 r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0) 381 state = int(r0) 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 Chdir(path string) (err error) { 391 var _p0 *byte 392 _p0, err = BytePtrFromString(path) 393 if err != nil { 394 return 395 } 396 _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) 397 if e1 != 0 { 398 err = errnoErr(e1) 399 } 400 return 401 } 402 403 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 404 405 func Chroot(path string) (err error) { 406 var _p0 *byte 407 _p0, err = BytePtrFromString(path) 408 if err != nil { 409 return 410 } 411 _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) 412 if e1 != 0 { 413 err = errnoErr(e1) 414 } 415 return 416 } 417 418 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 419 420 func ClockGetres(clockid int32, res *Timespec) (err error) { 421 _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) 422 if e1 != 0 { 423 err = errnoErr(e1) 424 } 425 return 426 } 427 428 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 429 430 func ClockGettime(clockid int32, time *Timespec) (err error) { 431 _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0) 432 if e1 != 0 { 433 err = errnoErr(e1) 434 } 435 return 436 } 437 438 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 439 440 func ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { 441 _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 0) 442 if e1 != 0 { 443 err = errnoErr(e1) 444 } 445 return 446 } 447 448 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 449 450 func Close(fd int) (err error) { 451 _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) 452 if e1 != 0 { 453 err = errnoErr(e1) 454 } 455 return 456 } 457 458 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 459 460 func CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 461 r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 462 n = int(r0) 463 if e1 != 0 { 464 err = errnoErr(e1) 465 } 466 return 467 } 468 469 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 470 471 func DeleteModule(name string, flags int) (err error) { 472 var _p0 *byte 473 _p0, err = BytePtrFromString(name) 474 if err != nil { 475 return 476 } 477 _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 478 if e1 != 0 { 479 err = errnoErr(e1) 480 } 481 return 482 } 483 484 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 485 486 func Dup(oldfd int) (fd int, err error) { 487 r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0) 488 fd = int(r0) 489 if e1 != 0 { 490 err = errnoErr(e1) 491 } 492 return 493 } 494 495 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 496 497 func Dup3(oldfd int, newfd int, flags int) (err error) { 498 _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) 499 if e1 != 0 { 500 err = errnoErr(e1) 501 } 502 return 503 } 504 505 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 506 507 func EpollCreate1(flag int) (fd int, err error) { 508 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0) 509 fd = int(r0) 510 if e1 != 0 { 511 err = errnoErr(e1) 512 } 513 return 514 } 515 516 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 517 518 func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { 519 _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) 520 if e1 != 0 { 521 err = errnoErr(e1) 522 } 523 return 524 } 525 526 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 527 528 func Eventfd(initval uint, flags int) (fd int, err error) { 529 r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) 530 fd = int(r0) 531 if e1 != 0 { 532 err = errnoErr(e1) 533 } 534 return 535 } 536 537 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 538 539 func Exit(code int) { 540 SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) 541 return 542 } 543 544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 545 546 func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { 547 _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32)) 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 Fchdir(fd int) (err error) { 557 _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) 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 Fchmod(fd int, mode uint32) (err error) { 567 _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { 577 var _p0 *byte 578 _p0, err = BytePtrFromString(path) 579 if err != nil { 580 return 581 } 582 _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 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 fcntl(fd int, cmd int, arg int) (val int, err error) { 592 r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) 593 val = int(r0) 594 if e1 != 0 { 595 err = errnoErr(e1) 596 } 597 return 598 } 599 600 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 601 602 func Fdatasync(fd int) (err error) { 603 _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) 604 if e1 != 0 { 605 err = errnoErr(e1) 606 } 607 return 608 } 609 610 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 611 612 func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { 613 var _p0 *byte 614 _p0, err = BytePtrFromString(attr) 615 if err != nil { 616 return 617 } 618 var _p1 unsafe.Pointer 619 if len(dest) > 0 { 620 _p1 = unsafe.Pointer(&dest[0]) 621 } else { 622 _p1 = unsafe.Pointer(&_zero) 623 } 624 r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) 625 sz = int(r0) 626 if e1 != 0 { 627 err = errnoErr(e1) 628 } 629 return 630 } 631 632 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 633 634 func FinitModule(fd int, params string, flags int) (err error) { 635 var _p0 *byte 636 _p0, err = BytePtrFromString(params) 637 if err != nil { 638 return 639 } 640 _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) 641 if e1 != 0 { 642 err = errnoErr(e1) 643 } 644 return 645 } 646 647 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 648 649 func Flistxattr(fd int, dest []byte) (sz int, err error) { 650 var _p0 unsafe.Pointer 651 if len(dest) > 0 { 652 _p0 = unsafe.Pointer(&dest[0]) 653 } else { 654 _p0 = unsafe.Pointer(&_zero) 655 } 656 r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) 657 sz = int(r0) 658 if e1 != 0 { 659 err = errnoErr(e1) 660 } 661 return 662 } 663 664 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 665 666 func Flock(fd int, how int) (err error) { 667 _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 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 Fremovexattr(fd int, attr string) (err error) { 677 var _p0 *byte 678 _p0, err = BytePtrFromString(attr) 679 if err != nil { 680 return 681 } 682 _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 0) 683 if e1 != 0 { 684 err = errnoErr(e1) 685 } 686 return 687 } 688 689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 690 691 func Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { 692 var _p0 *byte 693 _p0, err = BytePtrFromString(attr) 694 if err != nil { 695 return 696 } 697 var _p1 unsafe.Pointer 698 if len(dest) > 0 { 699 _p1 = unsafe.Pointer(&dest[0]) 700 } else { 701 _p1 = unsafe.Pointer(&_zero) 702 } 703 _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) 704 if e1 != 0 { 705 err = errnoErr(e1) 706 } 707 return 708 } 709 710 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 711 712 func Fsync(fd int) (err error) { 713 _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) 714 if e1 != 0 { 715 err = errnoErr(e1) 716 } 717 return 718 } 719 720 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 721 722 func Getdents(fd int, buf []byte) (n int, err error) { 723 var _p0 unsafe.Pointer 724 if len(buf) > 0 { 725 _p0 = unsafe.Pointer(&buf[0]) 726 } else { 727 _p0 = unsafe.Pointer(&_zero) 728 } 729 r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) 730 n = int(r0) 731 if e1 != 0 { 732 err = errnoErr(e1) 733 } 734 return 735 } 736 737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 738 739 func Getpgid(pid int) (pgid int, err error) { 740 r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) 741 pgid = int(r0) 742 if e1 != 0 { 743 err = errnoErr(e1) 744 } 745 return 746 } 747 748 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 749 750 func Getpid() (pid int) { 751 r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) 752 pid = int(r0) 753 return 754 } 755 756 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 757 758 func Getppid() (ppid int) { 759 r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) 760 ppid = int(r0) 761 return 762 } 763 764 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 765 766 func Getpriority(which int, who int) (prio int, err error) { 767 r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) 768 prio = int(r0) 769 if e1 != 0 { 770 err = errnoErr(e1) 771 } 772 return 773 } 774 775 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 776 777 func Getrandom(buf []byte, flags int) (n int, err error) { 778 var _p0 unsafe.Pointer 779 if len(buf) > 0 { 780 _p0 = unsafe.Pointer(&buf[0]) 781 } else { 782 _p0 = unsafe.Pointer(&_zero) 783 } 784 r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) 785 n = int(r0) 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 Getrusage(who int, rusage *Rusage) (err error) { 795 _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Getsid(pid int) (sid int, err error) { 805 r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) 806 sid = int(r0) 807 if e1 != 0 { 808 err = errnoErr(e1) 809 } 810 return 811 } 812 813 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 814 815 func Gettid() (tid int) { 816 r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) 817 tid = int(r0) 818 return 819 } 820 821 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 822 823 func Getxattr(path string, attr string, dest []byte) (sz int, err error) { 824 var _p0 *byte 825 _p0, err = BytePtrFromString(path) 826 if err != nil { 827 return 828 } 829 var _p1 *byte 830 _p1, err = BytePtrFromString(attr) 831 if err != nil { 832 return 833 } 834 var _p2 unsafe.Pointer 835 if len(dest) > 0 { 836 _p2 = unsafe.Pointer(&dest[0]) 837 } else { 838 _p2 = unsafe.Pointer(&_zero) 839 } 840 r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 841 sz = 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 InitModule(moduleImage []byte, params string) (err error) { 851 var _p0 unsafe.Pointer 852 if len(moduleImage) > 0 { 853 _p0 = unsafe.Pointer(&moduleImage[0]) 854 } else { 855 _p0 = unsafe.Pointer(&_zero) 856 } 857 var _p1 *byte 858 _p1, err = BytePtrFromString(params) 859 if err != nil { 860 return 861 } 862 _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) 863 if e1 != 0 { 864 err = errnoErr(e1) 865 } 866 return 867 } 868 869 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 870 871 func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { 872 var _p0 *byte 873 _p0, err = BytePtrFromString(pathname) 874 if err != nil { 875 return 876 } 877 r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) 878 watchdesc = int(r0) 879 if e1 != 0 { 880 err = errnoErr(e1) 881 } 882 return 883 } 884 885 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 886 887 func InotifyInit1(flags int) (fd int, err error) { 888 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) 889 fd = int(r0) 890 if e1 != 0 { 891 err = errnoErr(e1) 892 } 893 return 894 } 895 896 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 897 898 func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { 899 r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) 900 success = int(r0) 901 if e1 != 0 { 902 err = errnoErr(e1) 903 } 904 return 905 } 906 907 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 908 909 func Kill(pid int, sig syscall.Signal) (err error) { 910 _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) 911 if e1 != 0 { 912 err = errnoErr(e1) 913 } 914 return 915 } 916 917 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 918 919 func Klogctl(typ int, buf []byte) (n int, err error) { 920 var _p0 unsafe.Pointer 921 if len(buf) > 0 { 922 _p0 = unsafe.Pointer(&buf[0]) 923 } else { 924 _p0 = unsafe.Pointer(&_zero) 925 } 926 r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) 927 n = int(r0) 928 if e1 != 0 { 929 err = errnoErr(e1) 930 } 931 return 932 } 933 934 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 935 936 func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { 937 var _p0 *byte 938 _p0, err = BytePtrFromString(path) 939 if err != nil { 940 return 941 } 942 var _p1 *byte 943 _p1, err = BytePtrFromString(attr) 944 if err != nil { 945 return 946 } 947 var _p2 unsafe.Pointer 948 if len(dest) > 0 { 949 _p2 = unsafe.Pointer(&dest[0]) 950 } else { 951 _p2 = unsafe.Pointer(&_zero) 952 } 953 r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) 954 sz = int(r0) 955 if e1 != 0 { 956 err = errnoErr(e1) 957 } 958 return 959 } 960 961 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 962 963 func Listxattr(path string, dest []byte) (sz int, err error) { 964 var _p0 *byte 965 _p0, err = BytePtrFromString(path) 966 if err != nil { 967 return 968 } 969 var _p1 unsafe.Pointer 970 if len(dest) > 0 { 971 _p1 = unsafe.Pointer(&dest[0]) 972 } else { 973 _p1 = unsafe.Pointer(&_zero) 974 } 975 r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 976 sz = int(r0) 977 if e1 != 0 { 978 err = errnoErr(e1) 979 } 980 return 981 } 982 983 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 984 985 func Llistxattr(path string, dest []byte) (sz int, err error) { 986 var _p0 *byte 987 _p0, err = BytePtrFromString(path) 988 if err != nil { 989 return 990 } 991 var _p1 unsafe.Pointer 992 if len(dest) > 0 { 993 _p1 = unsafe.Pointer(&dest[0]) 994 } else { 995 _p1 = unsafe.Pointer(&_zero) 996 } 997 r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) 998 sz = int(r0) 999 if e1 != 0 { 1000 err = errnoErr(e1) 1001 } 1002 return 1003 } 1004 1005 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1006 1007 func Lremovexattr(path string, attr string) (err error) { 1008 var _p0 *byte 1009 _p0, err = BytePtrFromString(path) 1010 if err != nil { 1011 return 1012 } 1013 var _p1 *byte 1014 _p1, err = BytePtrFromString(attr) 1015 if err != nil { 1016 return 1017 } 1018 _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1019 if e1 != 0 { 1020 err = errnoErr(e1) 1021 } 1022 return 1023 } 1024 1025 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1026 1027 func Lsetxattr(path string, attr string, data []byte, flags int) (err error) { 1028 var _p0 *byte 1029 _p0, err = BytePtrFromString(path) 1030 if err != nil { 1031 return 1032 } 1033 var _p1 *byte 1034 _p1, err = BytePtrFromString(attr) 1035 if err != nil { 1036 return 1037 } 1038 var _p2 unsafe.Pointer 1039 if len(data) > 0 { 1040 _p2 = unsafe.Pointer(&data[0]) 1041 } else { 1042 _p2 = unsafe.Pointer(&_zero) 1043 } 1044 _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 1045 if e1 != 0 { 1046 err = errnoErr(e1) 1047 } 1048 return 1049 } 1050 1051 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1052 1053 func MemfdCreate(name string, flags int) (fd int, err error) { 1054 var _p0 *byte 1055 _p0, err = BytePtrFromString(name) 1056 if err != nil { 1057 return 1058 } 1059 r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1060 fd = int(r0) 1061 if e1 != 0 { 1062 err = errnoErr(e1) 1063 } 1064 return 1065 } 1066 1067 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1068 1069 func Mkdirat(dirfd int, path string, mode uint32) (err error) { 1070 var _p0 *byte 1071 _p0, err = BytePtrFromString(path) 1072 if err != nil { 1073 return 1074 } 1075 _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1076 if e1 != 0 { 1077 err = errnoErr(e1) 1078 } 1079 return 1080 } 1081 1082 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1083 1084 func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { 1085 var _p0 *byte 1086 _p0, err = BytePtrFromString(path) 1087 if err != nil { 1088 return 1089 } 1090 _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) 1091 if e1 != 0 { 1092 err = errnoErr(e1) 1093 } 1094 return 1095 } 1096 1097 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1098 1099 func Nanosleep(time *Timespec, leftover *Timespec) (err error) { 1100 _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) 1101 if e1 != 0 { 1102 err = errnoErr(e1) 1103 } 1104 return 1105 } 1106 1107 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1108 1109 func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { 1110 r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) 1111 fd = int(r0) 1112 if e1 != 0 { 1113 err = errnoErr(e1) 1114 } 1115 return 1116 } 1117 1118 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1119 1120 func PivotRoot(newroot string, putold string) (err error) { 1121 var _p0 *byte 1122 _p0, err = BytePtrFromString(newroot) 1123 if err != nil { 1124 return 1125 } 1126 var _p1 *byte 1127 _p1, err = BytePtrFromString(putold) 1128 if err != nil { 1129 return 1130 } 1131 _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1132 if e1 != 0 { 1133 err = errnoErr(e1) 1134 } 1135 return 1136 } 1137 1138 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1139 1140 func prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { 1141 _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) 1142 if e1 != 0 { 1143 err = errnoErr(e1) 1144 } 1145 return 1146 } 1147 1148 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1149 1150 func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { 1151 _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0) 1152 if e1 != 0 { 1153 err = errnoErr(e1) 1154 } 1155 return 1156 } 1157 1158 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1159 1160 func Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { 1161 r0, _, e1 := Syscall6(SYS_PSELECT6, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask))) 1162 n = int(r0) 1163 if e1 != 0 { 1164 err = errnoErr(e1) 1165 } 1166 return 1167 } 1168 1169 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1170 1171 func read(fd int, p []byte) (n int, err error) { 1172 var _p0 unsafe.Pointer 1173 if len(p) > 0 { 1174 _p0 = unsafe.Pointer(&p[0]) 1175 } else { 1176 _p0 = unsafe.Pointer(&_zero) 1177 } 1178 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1179 n = int(r0) 1180 if e1 != 0 { 1181 err = errnoErr(e1) 1182 } 1183 return 1184 } 1185 1186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1187 1188 func Removexattr(path string, attr string) (err error) { 1189 var _p0 *byte 1190 _p0, err = BytePtrFromString(path) 1191 if err != nil { 1192 return 1193 } 1194 var _p1 *byte 1195 _p1, err = BytePtrFromString(attr) 1196 if err != nil { 1197 return 1198 } 1199 _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) 1200 if e1 != 0 { 1201 err = errnoErr(e1) 1202 } 1203 return 1204 } 1205 1206 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1207 1208 func Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { 1209 var _p0 *byte 1210 _p0, err = BytePtrFromString(oldpath) 1211 if err != nil { 1212 return 1213 } 1214 var _p1 *byte 1215 _p1, err = BytePtrFromString(newpath) 1216 if err != nil { 1217 return 1218 } 1219 _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) 1220 if e1 != 0 { 1221 err = errnoErr(e1) 1222 } 1223 return 1224 } 1225 1226 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1227 1228 func RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { 1229 var _p0 *byte 1230 _p0, err = BytePtrFromString(keyType) 1231 if err != nil { 1232 return 1233 } 1234 var _p1 *byte 1235 _p1, err = BytePtrFromString(description) 1236 if err != nil { 1237 return 1238 } 1239 var _p2 *byte 1240 _p2, err = BytePtrFromString(callback) 1241 if err != nil { 1242 return 1243 } 1244 r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) 1245 id = int(r0) 1246 if e1 != 0 { 1247 err = errnoErr(e1) 1248 } 1249 return 1250 } 1251 1252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1253 1254 func Setdomainname(p []byte) (err error) { 1255 var _p0 unsafe.Pointer 1256 if len(p) > 0 { 1257 _p0 = unsafe.Pointer(&p[0]) 1258 } else { 1259 _p0 = unsafe.Pointer(&_zero) 1260 } 1261 _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) 1262 if e1 != 0 { 1263 err = errnoErr(e1) 1264 } 1265 return 1266 } 1267 1268 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1269 1270 func Sethostname(p []byte) (err error) { 1271 var _p0 unsafe.Pointer 1272 if len(p) > 0 { 1273 _p0 = unsafe.Pointer(&p[0]) 1274 } else { 1275 _p0 = unsafe.Pointer(&_zero) 1276 } 1277 _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) 1278 if e1 != 0 { 1279 err = errnoErr(e1) 1280 } 1281 return 1282 } 1283 1284 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1285 1286 func Setpgid(pid int, pgid int) (err error) { 1287 _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) 1288 if e1 != 0 { 1289 err = errnoErr(e1) 1290 } 1291 return 1292 } 1293 1294 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1295 1296 func Setsid() (pid int, err error) { 1297 r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) 1298 pid = int(r0) 1299 if e1 != 0 { 1300 err = errnoErr(e1) 1301 } 1302 return 1303 } 1304 1305 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1306 1307 func Settimeofday(tv *Timeval) (err error) { 1308 _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 1309 if e1 != 0 { 1310 err = errnoErr(e1) 1311 } 1312 return 1313 } 1314 1315 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1316 1317 func Setns(fd int, nstype int) (err error) { 1318 _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) 1319 if e1 != 0 { 1320 err = errnoErr(e1) 1321 } 1322 return 1323 } 1324 1325 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1326 1327 func Setpriority(which int, who int, prio int) (err error) { 1328 _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) 1329 if e1 != 0 { 1330 err = errnoErr(e1) 1331 } 1332 return 1333 } 1334 1335 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1336 1337 func Setxattr(path string, attr string, data []byte, flags int) (err error) { 1338 var _p0 *byte 1339 _p0, err = BytePtrFromString(path) 1340 if err != nil { 1341 return 1342 } 1343 var _p1 *byte 1344 _p1, err = BytePtrFromString(attr) 1345 if err != nil { 1346 return 1347 } 1348 var _p2 unsafe.Pointer 1349 if len(data) > 0 { 1350 _p2 = unsafe.Pointer(&data[0]) 1351 } else { 1352 _p2 = unsafe.Pointer(&_zero) 1353 } 1354 _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) 1355 if e1 != 0 { 1356 err = errnoErr(e1) 1357 } 1358 return 1359 } 1360 1361 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1362 1363 func Signalfd(fd int, mask *Sigset_t, flags int) { 1364 SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags)) 1365 return 1366 } 1367 1368 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1369 1370 func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { 1371 var _p0 *byte 1372 _p0, err = BytePtrFromString(path) 1373 if err != nil { 1374 return 1375 } 1376 _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 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 Sync() { 1386 SyscallNoError(SYS_SYNC, 0, 0, 0) 1387 return 1388 } 1389 1390 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1391 1392 func Syncfs(fd int) (err error) { 1393 _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) 1394 if e1 != 0 { 1395 err = errnoErr(e1) 1396 } 1397 return 1398 } 1399 1400 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1401 1402 func Sysinfo(info *Sysinfo_t) (err error) { 1403 _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) 1404 if e1 != 0 { 1405 err = errnoErr(e1) 1406 } 1407 return 1408 } 1409 1410 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1411 1412 func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { 1413 r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) 1414 n = int64(int64(r1)<<32 | int64(r0)) 1415 if e1 != 0 { 1416 err = errnoErr(e1) 1417 } 1418 return 1419 } 1420 1421 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1422 1423 func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { 1424 _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) 1425 if e1 != 0 { 1426 err = errnoErr(e1) 1427 } 1428 return 1429 } 1430 1431 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1432 1433 func Times(tms *Tms) (ticks uintptr, err error) { 1434 r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) 1435 ticks = uintptr(r0) 1436 if e1 != 0 { 1437 err = errnoErr(e1) 1438 } 1439 return 1440 } 1441 1442 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1443 1444 func Umask(mask int) (oldmask int) { 1445 r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) 1446 oldmask = int(r0) 1447 return 1448 } 1449 1450 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1451 1452 func Uname(buf *Utsname) (err error) { 1453 _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) 1454 if e1 != 0 { 1455 err = errnoErr(e1) 1456 } 1457 return 1458 } 1459 1460 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1461 1462 func Unmount(target string, flags int) (err error) { 1463 var _p0 *byte 1464 _p0, err = BytePtrFromString(target) 1465 if err != nil { 1466 return 1467 } 1468 _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) 1469 if e1 != 0 { 1470 err = errnoErr(e1) 1471 } 1472 return 1473 } 1474 1475 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1476 1477 func Unshare(flags int) (err error) { 1478 _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) 1479 if e1 != 0 { 1480 err = errnoErr(e1) 1481 } 1482 return 1483 } 1484 1485 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1486 1487 func write(fd int, p []byte) (n int, err error) { 1488 var _p0 unsafe.Pointer 1489 if len(p) > 0 { 1490 _p0 = unsafe.Pointer(&p[0]) 1491 } else { 1492 _p0 = unsafe.Pointer(&_zero) 1493 } 1494 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) 1495 n = int(r0) 1496 if e1 != 0 { 1497 err = errnoErr(e1) 1498 } 1499 return 1500 } 1501 1502 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1503 1504 func exitThread(code int) (err error) { 1505 _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) 1506 if e1 != 0 { 1507 err = errnoErr(e1) 1508 } 1509 return 1510 } 1511 1512 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1513 1514 func readlen(fd int, p *byte, np int) (n int, err error) { 1515 r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1516 n = int(r0) 1517 if e1 != 0 { 1518 err = errnoErr(e1) 1519 } 1520 return 1521 } 1522 1523 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1524 1525 func writelen(fd int, p *byte, np int) (n int, err error) { 1526 r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) 1527 n = int(r0) 1528 if e1 != 0 { 1529 err = errnoErr(e1) 1530 } 1531 return 1532 } 1533 1534 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1535 1536 func munmap(addr uintptr, length uintptr) (err error) { 1537 _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) 1538 if e1 != 0 { 1539 err = errnoErr(e1) 1540 } 1541 return 1542 } 1543 1544 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1545 1546 func Madvise(b []byte, advice int) (err error) { 1547 var _p0 unsafe.Pointer 1548 if len(b) > 0 { 1549 _p0 = unsafe.Pointer(&b[0]) 1550 } else { 1551 _p0 = unsafe.Pointer(&_zero) 1552 } 1553 _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) 1554 if e1 != 0 { 1555 err = errnoErr(e1) 1556 } 1557 return 1558 } 1559 1560 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1561 1562 func Mprotect(b []byte, prot int) (err error) { 1563 var _p0 unsafe.Pointer 1564 if len(b) > 0 { 1565 _p0 = unsafe.Pointer(&b[0]) 1566 } else { 1567 _p0 = unsafe.Pointer(&_zero) 1568 } 1569 _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) 1570 if e1 != 0 { 1571 err = errnoErr(e1) 1572 } 1573 return 1574 } 1575 1576 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1577 1578 func Mlock(b []byte) (err error) { 1579 var _p0 unsafe.Pointer 1580 if len(b) > 0 { 1581 _p0 = unsafe.Pointer(&b[0]) 1582 } else { 1583 _p0 = unsafe.Pointer(&_zero) 1584 } 1585 _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 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 Mlockall(flags int) (err error) { 1595 _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 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 Msync(b []byte, flags int) (err error) { 1605 var _p0 unsafe.Pointer 1606 if len(b) > 0 { 1607 _p0 = unsafe.Pointer(&b[0]) 1608 } else { 1609 _p0 = unsafe.Pointer(&_zero) 1610 } 1611 _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) 1612 if e1 != 0 { 1613 err = errnoErr(e1) 1614 } 1615 return 1616 } 1617 1618 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1619 1620 func Munlock(b []byte) (err error) { 1621 var _p0 unsafe.Pointer 1622 if len(b) > 0 { 1623 _p0 = unsafe.Pointer(&b[0]) 1624 } else { 1625 _p0 = unsafe.Pointer(&_zero) 1626 } 1627 _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) 1628 if e1 != 0 { 1629 err = errnoErr(e1) 1630 } 1631 return 1632 } 1633 1634 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1635 1636 func Munlockall() (err error) { 1637 _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) 1638 if e1 != 0 { 1639 err = errnoErr(e1) 1640 } 1641 return 1642 } 1643 1644 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1645 1646 func faccessat(dirfd int, path string, mode uint32) (err error) { 1647 var _p0 *byte 1648 _p0, err = BytePtrFromString(path) 1649 if err != nil { 1650 return 1651 } 1652 _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) 1653 if e1 != 0 { 1654 err = errnoErr(e1) 1655 } 1656 return 1657 } 1658 1659 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1660 1661 func Dup2(oldfd int, newfd int) (err error) { 1662 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1663 if e1 != 0 { 1664 err = errnoErr(e1) 1665 } 1666 return 1667 } 1668 1669 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1670 1671 func EpollCreate(size int) (fd int, err error) { 1672 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) 1673 fd = int(r0) 1674 if e1 != 0 { 1675 err = errnoErr(e1) 1676 } 1677 return 1678 } 1679 1680 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1681 1682 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 1683 var _p0 unsafe.Pointer 1684 if len(events) > 0 { 1685 _p0 = unsafe.Pointer(&events[0]) 1686 } else { 1687 _p0 = unsafe.Pointer(&_zero) 1688 } 1689 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 1690 n = int(r0) 1691 if e1 != 0 { 1692 err = errnoErr(e1) 1693 } 1694 return 1695 } 1696 1697 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1698 1699 func Fadvise(fd int, offset int64, length int64, advice int) (err error) { 1700 _, _, e1 := Syscall9(SYS_FADVISE64, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0) 1701 if e1 != 0 { 1702 err = errnoErr(e1) 1703 } 1704 return 1705 } 1706 1707 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1708 1709 func Fchown(fd int, uid int, gid int) (err error) { 1710 _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) 1711 if e1 != 0 { 1712 err = errnoErr(e1) 1713 } 1714 return 1715 } 1716 1717 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1718 1719 func Ftruncate(fd int, length int64) (err error) { 1720 _, _, e1 := Syscall6(SYS_FTRUNCATE64, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) 1721 if e1 != 0 { 1722 err = errnoErr(e1) 1723 } 1724 return 1725 } 1726 1727 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1728 1729 func Getegid() (egid int) { 1730 r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) 1731 egid = int(r0) 1732 return 1733 } 1734 1735 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1736 1737 func Geteuid() (euid int) { 1738 r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) 1739 euid = int(r0) 1740 return 1741 } 1742 1743 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1744 1745 func Getgid() (gid int) { 1746 r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) 1747 gid = int(r0) 1748 return 1749 } 1750 1751 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1752 1753 func Getuid() (uid int) { 1754 r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) 1755 uid = int(r0) 1756 return 1757 } 1758 1759 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1760 1761 func Lchown(path string, uid int, gid int) (err error) { 1762 var _p0 *byte 1763 _p0, err = BytePtrFromString(path) 1764 if err != nil { 1765 return 1766 } 1767 _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1768 if e1 != 0 { 1769 err = errnoErr(e1) 1770 } 1771 return 1772 } 1773 1774 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1775 1776 func Listen(s int, n int) (err error) { 1777 _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) 1778 if e1 != 0 { 1779 err = errnoErr(e1) 1780 } 1781 return 1782 } 1783 1784 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1785 1786 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1787 var _p0 unsafe.Pointer 1788 if len(p) > 0 { 1789 _p0 = unsafe.Pointer(&p[0]) 1790 } else { 1791 _p0 = unsafe.Pointer(&_zero) 1792 } 1793 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 1794 n = int(r0) 1795 if e1 != 0 { 1796 err = errnoErr(e1) 1797 } 1798 return 1799 } 1800 1801 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1802 1803 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1804 var _p0 unsafe.Pointer 1805 if len(p) > 0 { 1806 _p0 = unsafe.Pointer(&p[0]) 1807 } else { 1808 _p0 = unsafe.Pointer(&_zero) 1809 } 1810 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) 1811 n = int(r0) 1812 if e1 != 0 { 1813 err = errnoErr(e1) 1814 } 1815 return 1816 } 1817 1818 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1819 1820 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 1821 var _p0 *byte 1822 _p0, err = BytePtrFromString(oldpath) 1823 if err != nil { 1824 return 1825 } 1826 var _p1 *byte 1827 _p1, err = BytePtrFromString(newpath) 1828 if err != nil { 1829 return 1830 } 1831 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1832 if e1 != 0 { 1833 err = errnoErr(e1) 1834 } 1835 return 1836 } 1837 1838 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1839 1840 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 1841 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 1842 n = int(r0) 1843 if e1 != 0 { 1844 err = errnoErr(e1) 1845 } 1846 return 1847 } 1848 1849 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1850 1851 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1852 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1853 written = int(r0) 1854 if e1 != 0 { 1855 err = errnoErr(e1) 1856 } 1857 return 1858 } 1859 1860 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1861 1862 func Setfsgid(gid int) (err error) { 1863 _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) 1864 if e1 != 0 { 1865 err = errnoErr(e1) 1866 } 1867 return 1868 } 1869 1870 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1871 1872 func Setfsuid(uid int) (err error) { 1873 _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) 1874 if e1 != 0 { 1875 err = errnoErr(e1) 1876 } 1877 return 1878 } 1879 1880 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1881 1882 func Setregid(rgid int, egid int) (err error) { 1883 _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) 1884 if e1 != 0 { 1885 err = errnoErr(e1) 1886 } 1887 return 1888 } 1889 1890 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1891 1892 func Setresgid(rgid int, egid int, sgid int) (err error) { 1893 _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1894 if e1 != 0 { 1895 err = errnoErr(e1) 1896 } 1897 return 1898 } 1899 1900 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1901 1902 func Setresuid(ruid int, euid int, suid int) (err error) { 1903 _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) 1904 if e1 != 0 { 1905 err = errnoErr(e1) 1906 } 1907 return 1908 } 1909 1910 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1911 1912 func Setreuid(ruid int, euid int) (err error) { 1913 _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) 1914 if e1 != 0 { 1915 err = errnoErr(e1) 1916 } 1917 return 1918 } 1919 1920 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1921 1922 func Shutdown(fd int, how int) (err error) { 1923 _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) 1924 if e1 != 0 { 1925 err = errnoErr(e1) 1926 } 1927 return 1928 } 1929 1930 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1931 1932 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 1933 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1934 n = int(r0) 1935 if e1 != 0 { 1936 err = errnoErr(e1) 1937 } 1938 return 1939 } 1940 1941 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1942 1943 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 1944 _, _, e1 := Syscall9(SYS_SYNC_FILE_RANGE, uintptr(fd), 0, uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags), 0, 0) 1945 if e1 != 0 { 1946 err = errnoErr(e1) 1947 } 1948 return 1949 } 1950 1951 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1952 1953 func Truncate(path string, length int64) (err error) { 1954 var _p0 *byte 1955 _p0, err = BytePtrFromString(path) 1956 if err != nil { 1957 return 1958 } 1959 _, _, e1 := Syscall6(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) 1960 if e1 != 0 { 1961 err = errnoErr(e1) 1962 } 1963 return 1964 } 1965 1966 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1967 1968 func Ustat(dev int, ubuf *Ustat_t) (err error) { 1969 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 1970 if e1 != 0 { 1971 err = errnoErr(e1) 1972 } 1973 return 1974 } 1975 1976 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1977 1978 func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { 1979 r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 1980 fd = int(r0) 1981 if e1 != 0 { 1982 err = errnoErr(e1) 1983 } 1984 return 1985 } 1986 1987 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1988 1989 func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { 1990 r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) 1991 fd = int(r0) 1992 if e1 != 0 { 1993 err = errnoErr(e1) 1994 } 1995 return 1996 } 1997 1998 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1999 2000 func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 2001 _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) 2002 if e1 != 0 { 2003 err = errnoErr(e1) 2004 } 2005 return 2006 } 2007 2008 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2009 2010 func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { 2011 _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) 2012 if e1 != 0 { 2013 err = errnoErr(e1) 2014 } 2015 return 2016 } 2017 2018 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2019 2020 func getgroups(n int, list *_Gid_t) (nn int, err error) { 2021 r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2022 nn = int(r0) 2023 if e1 != 0 { 2024 err = errnoErr(e1) 2025 } 2026 return 2027 } 2028 2029 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2030 2031 func setgroups(n int, list *_Gid_t) (err error) { 2032 _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2033 if e1 != 0 { 2034 err = errnoErr(e1) 2035 } 2036 return 2037 } 2038 2039 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2040 2041 func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { 2042 _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) 2043 if e1 != 0 { 2044 err = errnoErr(e1) 2045 } 2046 return 2047 } 2048 2049 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2050 2051 func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { 2052 _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) 2053 if e1 != 0 { 2054 err = errnoErr(e1) 2055 } 2056 return 2057 } 2058 2059 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2060 2061 func socket(domain int, typ int, proto int) (fd int, err error) { 2062 r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) 2063 fd = int(r0) 2064 if e1 != 0 { 2065 err = errnoErr(e1) 2066 } 2067 return 2068 } 2069 2070 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2071 2072 func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { 2073 _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) 2074 if e1 != 0 { 2075 err = errnoErr(e1) 2076 } 2077 return 2078 } 2079 2080 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2081 2082 func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 2083 _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 2084 if e1 != 0 { 2085 err = errnoErr(e1) 2086 } 2087 return 2088 } 2089 2090 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2091 2092 func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { 2093 _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) 2094 if e1 != 0 { 2095 err = errnoErr(e1) 2096 } 2097 return 2098 } 2099 2100 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2101 2102 func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { 2103 var _p0 unsafe.Pointer 2104 if len(p) > 0 { 2105 _p0 = unsafe.Pointer(&p[0]) 2106 } else { 2107 _p0 = unsafe.Pointer(&_zero) 2108 } 2109 r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) 2110 n = int(r0) 2111 if e1 != 0 { 2112 err = errnoErr(e1) 2113 } 2114 return 2115 } 2116 2117 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2118 2119 func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { 2120 var _p0 unsafe.Pointer 2121 if len(buf) > 0 { 2122 _p0 = unsafe.Pointer(&buf[0]) 2123 } else { 2124 _p0 = unsafe.Pointer(&_zero) 2125 } 2126 _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) 2127 if e1 != 0 { 2128 err = errnoErr(e1) 2129 } 2130 return 2131 } 2132 2133 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2134 2135 func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { 2136 r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 2137 n = int(r0) 2138 if e1 != 0 { 2139 err = errnoErr(e1) 2140 } 2141 return 2142 } 2143 2144 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2145 2146 func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { 2147 r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) 2148 n = int(r0) 2149 if e1 != 0 { 2150 err = errnoErr(e1) 2151 } 2152 return 2153 } 2154 2155 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2156 2157 func InotifyInit() (fd int, err error) { 2158 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 2159 fd = int(r0) 2160 if e1 != 0 { 2161 err = errnoErr(e1) 2162 } 2163 return 2164 } 2165 2166 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2167 2168 func Ioperm(from int, num int, on int) (err error) { 2169 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) 2170 if e1 != 0 { 2171 err = errnoErr(e1) 2172 } 2173 return 2174 } 2175 2176 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2177 2178 func Iopl(level int) (err error) { 2179 _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) 2180 if e1 != 0 { 2181 err = errnoErr(e1) 2182 } 2183 return 2184 } 2185 2186 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2187 2188 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { 2189 var _p0 *byte 2190 _p0, err = BytePtrFromString(path) 2191 if err != nil { 2192 return 2193 } 2194 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 2195 if e1 != 0 { 2196 err = errnoErr(e1) 2197 } 2198 return 2199 } 2200 2201 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2202 2203 func Gettimeofday(tv *Timeval) (err error) { 2204 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 2205 if e1 != 0 { 2206 err = errnoErr(e1) 2207 } 2208 return 2209 } 2210 2211 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2212 2213 func Time(t *Time_t) (tt Time_t, err error) { 2214 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 2215 tt = Time_t(r0) 2216 if e1 != 0 { 2217 err = errnoErr(e1) 2218 } 2219 return 2220 } 2221 2222 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2223 2224 func Utime(path string, buf *Utimbuf) (err error) { 2225 var _p0 *byte 2226 _p0, err = BytePtrFromString(path) 2227 if err != nil { 2228 return 2229 } 2230 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 2231 if e1 != 0 { 2232 err = errnoErr(e1) 2233 } 2234 return 2235 } 2236 2237 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2238 2239 func utimes(path string, times *[2]Timeval) (err error) { 2240 var _p0 *byte 2241 _p0, err = BytePtrFromString(path) 2242 if err != nil { 2243 return 2244 } 2245 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 2246 if e1 != 0 { 2247 err = errnoErr(e1) 2248 } 2249 return 2250 } 2251 2252 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2253 2254 func Lstat(path string, stat *Stat_t) (err error) { 2255 var _p0 *byte 2256 _p0, err = BytePtrFromString(path) 2257 if err != nil { 2258 return 2259 } 2260 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 2261 if e1 != 0 { 2262 err = errnoErr(e1) 2263 } 2264 return 2265 } 2266 2267 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2268 2269 func Fstat(fd int, stat *Stat_t) (err error) { 2270 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 2271 if e1 != 0 { 2272 err = errnoErr(e1) 2273 } 2274 return 2275 } 2276 2277 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2278 2279 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { 2280 var _p0 *byte 2281 _p0, err = BytePtrFromString(path) 2282 if err != nil { 2283 return 2284 } 2285 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 2286 if e1 != 0 { 2287 err = errnoErr(e1) 2288 } 2289 return 2290 } 2291 2292 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2293 2294 func Stat(path string, stat *Stat_t) (err error) { 2295 var _p0 *byte 2296 _p0, err = BytePtrFromString(path) 2297 if err != nil { 2298 return 2299 } 2300 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 2301 if e1 != 0 { 2302 err = errnoErr(e1) 2303 } 2304 return 2305 } 2306 2307 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2308 2309 func Pause() (err error) { 2310 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 2311 if e1 != 0 { 2312 err = errnoErr(e1) 2313 } 2314 return 2315 } 2316 2317 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2318 2319 func pipe2(p *[2]_C_int, flags int) (err error) { 2320 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 2321 if e1 != 0 { 2322 err = errnoErr(e1) 2323 } 2324 return 2325 } 2326 2327 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2328 2329 func pipe() (p1 int, p2 int, err error) { 2330 r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) 2331 p1 = int(r0) 2332 p2 = int(r1) 2333 if e1 != 0 { 2334 err = errnoErr(e1) 2335 } 2336 return 2337 } 2338 2339 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2340 2341 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { 2342 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) 2343 xaddr = uintptr(r0) 2344 if e1 != 0 { 2345 err = errnoErr(e1) 2346 } 2347 return 2348 } 2349 2350 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2351 2352 func getrlimit(resource int, rlim *rlimit32) (err error) { 2353 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2354 if e1 != 0 { 2355 err = errnoErr(e1) 2356 } 2357 return 2358 } 2359 2360 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2361 2362 func setrlimit(resource int, rlim *rlimit32) (err error) { 2363 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2364 if e1 != 0 { 2365 err = errnoErr(e1) 2366 } 2367 return 2368 } 2369 2370 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2371 2372 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 2373 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 2374 n = int(r0) 2375 if e1 != 0 { 2376 err = errnoErr(e1) 2377 } 2378 return 2379 }