github.com/gogf/gkafka@v1.0.1-0.20190702070843-033a14468069/third/golang.org/x/sys/unix/zsyscall_linux_386.go (about) 1 // go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go 2 // Code generated by the command above; see README.md. DO NOT EDIT. 3 4 // +build linux,386 5 6 package unix 7 8 import ( 9 "syscall" 10 "unsafe" 11 ) 12 13 var _ syscall.Errno 14 15 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 16 17 func 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 pipe(p *[2]_C_int) (err error) { 1662 _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 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 pipe2(p *[2]_C_int, flags int) (err error) { 1672 _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) 1673 if e1 != 0 { 1674 err = errnoErr(e1) 1675 } 1676 return 1677 } 1678 1679 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1680 1681 func Dup2(oldfd int, newfd int) (err error) { 1682 _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) 1683 if e1 != 0 { 1684 err = errnoErr(e1) 1685 } 1686 return 1687 } 1688 1689 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1690 1691 func EpollCreate(size int) (fd int, err error) { 1692 r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) 1693 fd = int(r0) 1694 if e1 != 0 { 1695 err = errnoErr(e1) 1696 } 1697 return 1698 } 1699 1700 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1701 1702 func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { 1703 var _p0 unsafe.Pointer 1704 if len(events) > 0 { 1705 _p0 = unsafe.Pointer(&events[0]) 1706 } else { 1707 _p0 = unsafe.Pointer(&_zero) 1708 } 1709 r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) 1710 n = int(r0) 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 Fadvise(fd int, offset int64, length int64, advice int) (err error) { 1720 _, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice)) 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 Fchown(fd int, uid int, gid int) (err error) { 1730 _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)) 1731 if e1 != 0 { 1732 err = errnoErr(e1) 1733 } 1734 return 1735 } 1736 1737 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1738 1739 func Fstat(fd int, stat *Stat_t) (err error) { 1740 _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) 1741 if e1 != 0 { 1742 err = errnoErr(e1) 1743 } 1744 return 1745 } 1746 1747 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1748 1749 func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { 1750 var _p0 *byte 1751 _p0, err = BytePtrFromString(path) 1752 if err != nil { 1753 return 1754 } 1755 _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) 1756 if e1 != 0 { 1757 err = errnoErr(e1) 1758 } 1759 return 1760 } 1761 1762 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1763 1764 func Ftruncate(fd int, length int64) (err error) { 1765 _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32)) 1766 if e1 != 0 { 1767 err = errnoErr(e1) 1768 } 1769 return 1770 } 1771 1772 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1773 1774 func Getegid() (egid int) { 1775 r0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0) 1776 egid = int(r0) 1777 return 1778 } 1779 1780 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1781 1782 func Geteuid() (euid int) { 1783 r0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0) 1784 euid = int(r0) 1785 return 1786 } 1787 1788 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1789 1790 func Getgid() (gid int) { 1791 r0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0) 1792 gid = int(r0) 1793 return 1794 } 1795 1796 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1797 1798 func Getuid() (uid int) { 1799 r0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0) 1800 uid = int(r0) 1801 return 1802 } 1803 1804 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1805 1806 func InotifyInit() (fd int, err error) { 1807 r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) 1808 fd = int(r0) 1809 if e1 != 0 { 1810 err = errnoErr(e1) 1811 } 1812 return 1813 } 1814 1815 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1816 1817 func Ioperm(from int, num int, on int) (err error) { 1818 _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) 1819 if e1 != 0 { 1820 err = errnoErr(e1) 1821 } 1822 return 1823 } 1824 1825 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1826 1827 func Iopl(level int) (err error) { 1828 _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) 1829 if e1 != 0 { 1830 err = errnoErr(e1) 1831 } 1832 return 1833 } 1834 1835 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1836 1837 func Lchown(path string, uid int, gid int) (err error) { 1838 var _p0 *byte 1839 _p0, err = BytePtrFromString(path) 1840 if err != nil { 1841 return 1842 } 1843 _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) 1844 if e1 != 0 { 1845 err = errnoErr(e1) 1846 } 1847 return 1848 } 1849 1850 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1851 1852 func Lstat(path string, stat *Stat_t) (err error) { 1853 var _p0 *byte 1854 _p0, err = BytePtrFromString(path) 1855 if err != nil { 1856 return 1857 } 1858 _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 1859 if e1 != 0 { 1860 err = errnoErr(e1) 1861 } 1862 return 1863 } 1864 1865 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1866 1867 func Pread(fd int, p []byte, offset int64) (n int, err error) { 1868 var _p0 unsafe.Pointer 1869 if len(p) > 0 { 1870 _p0 = unsafe.Pointer(&p[0]) 1871 } else { 1872 _p0 = unsafe.Pointer(&_zero) 1873 } 1874 r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1875 n = int(r0) 1876 if e1 != 0 { 1877 err = errnoErr(e1) 1878 } 1879 return 1880 } 1881 1882 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1883 1884 func Pwrite(fd int, p []byte, offset int64) (n int, err error) { 1885 var _p0 unsafe.Pointer 1886 if len(p) > 0 { 1887 _p0 = unsafe.Pointer(&p[0]) 1888 } else { 1889 _p0 = unsafe.Pointer(&_zero) 1890 } 1891 r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0) 1892 n = int(r0) 1893 if e1 != 0 { 1894 err = errnoErr(e1) 1895 } 1896 return 1897 } 1898 1899 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1900 1901 func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { 1902 var _p0 *byte 1903 _p0, err = BytePtrFromString(oldpath) 1904 if err != nil { 1905 return 1906 } 1907 var _p1 *byte 1908 _p1, err = BytePtrFromString(newpath) 1909 if err != nil { 1910 return 1911 } 1912 _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) 1913 if e1 != 0 { 1914 err = errnoErr(e1) 1915 } 1916 return 1917 } 1918 1919 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1920 1921 func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 1922 r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) 1923 written = int(r0) 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 Setfsgid(gid int) (err error) { 1933 _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0) 1934 if e1 != 0 { 1935 err = errnoErr(e1) 1936 } 1937 return 1938 } 1939 1940 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1941 1942 func Setfsuid(uid int) (err error) { 1943 _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0) 1944 if e1 != 0 { 1945 err = errnoErr(e1) 1946 } 1947 return 1948 } 1949 1950 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1951 1952 func Setregid(rgid int, egid int) (err error) { 1953 _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0) 1954 if e1 != 0 { 1955 err = errnoErr(e1) 1956 } 1957 return 1958 } 1959 1960 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1961 1962 func Setresgid(rgid int, egid int, sgid int) (err error) { 1963 _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)) 1964 if e1 != 0 { 1965 err = errnoErr(e1) 1966 } 1967 return 1968 } 1969 1970 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1971 1972 func Setresuid(ruid int, euid int, suid int) (err error) { 1973 _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)) 1974 if e1 != 0 { 1975 err = errnoErr(e1) 1976 } 1977 return 1978 } 1979 1980 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1981 1982 func Setreuid(ruid int, euid int) (err error) { 1983 _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0) 1984 if e1 != 0 { 1985 err = errnoErr(e1) 1986 } 1987 return 1988 } 1989 1990 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 1991 1992 func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { 1993 r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) 1994 n = int(r0) 1995 if e1 != 0 { 1996 err = errnoErr(e1) 1997 } 1998 return 1999 } 2000 2001 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2002 2003 func Stat(path string, stat *Stat_t) (err error) { 2004 var _p0 *byte 2005 _p0, err = BytePtrFromString(path) 2006 if err != nil { 2007 return 2008 } 2009 _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) 2010 if e1 != 0 { 2011 err = errnoErr(e1) 2012 } 2013 return 2014 } 2015 2016 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2017 2018 func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { 2019 _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags)) 2020 if e1 != 0 { 2021 err = errnoErr(e1) 2022 } 2023 return 2024 } 2025 2026 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2027 2028 func Truncate(path string, length int64) (err error) { 2029 var _p0 *byte 2030 _p0, err = BytePtrFromString(path) 2031 if err != nil { 2032 return 2033 } 2034 _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32)) 2035 if e1 != 0 { 2036 err = errnoErr(e1) 2037 } 2038 return 2039 } 2040 2041 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2042 2043 func Ustat(dev int, ubuf *Ustat_t) (err error) { 2044 _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) 2045 if e1 != 0 { 2046 err = errnoErr(e1) 2047 } 2048 return 2049 } 2050 2051 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2052 2053 func getgroups(n int, list *_Gid_t) (nn int, err error) { 2054 r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2055 nn = int(r0) 2056 if e1 != 0 { 2057 err = errnoErr(e1) 2058 } 2059 return 2060 } 2061 2062 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2063 2064 func setgroups(n int, list *_Gid_t) (err error) { 2065 _, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0) 2066 if e1 != 0 { 2067 err = errnoErr(e1) 2068 } 2069 return 2070 } 2071 2072 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2073 2074 func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { 2075 r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) 2076 n = int(r0) 2077 if e1 != 0 { 2078 err = errnoErr(e1) 2079 } 2080 return 2081 } 2082 2083 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2084 2085 func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { 2086 r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) 2087 xaddr = uintptr(r0) 2088 if e1 != 0 { 2089 err = errnoErr(e1) 2090 } 2091 return 2092 } 2093 2094 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2095 2096 func Pause() (err error) { 2097 _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) 2098 if e1 != 0 { 2099 err = errnoErr(e1) 2100 } 2101 return 2102 } 2103 2104 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2105 2106 func getrlimit(resource int, rlim *rlimit32) (err error) { 2107 _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2108 if e1 != 0 { 2109 err = errnoErr(e1) 2110 } 2111 return 2112 } 2113 2114 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2115 2116 func setrlimit(resource int, rlim *rlimit32) (err error) { 2117 _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) 2118 if e1 != 0 { 2119 err = errnoErr(e1) 2120 } 2121 return 2122 } 2123 2124 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2125 2126 func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { 2127 var _p0 *byte 2128 _p0, err = BytePtrFromString(path) 2129 if err != nil { 2130 return 2131 } 2132 _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) 2133 if e1 != 0 { 2134 err = errnoErr(e1) 2135 } 2136 return 2137 } 2138 2139 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2140 2141 func Gettimeofday(tv *Timeval) (err error) { 2142 _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) 2143 if e1 != 0 { 2144 err = errnoErr(e1) 2145 } 2146 return 2147 } 2148 2149 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2150 2151 func Time(t *Time_t) (tt Time_t, err error) { 2152 r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) 2153 tt = Time_t(r0) 2154 if e1 != 0 { 2155 err = errnoErr(e1) 2156 } 2157 return 2158 } 2159 2160 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2161 2162 func Utime(path string, buf *Utimbuf) (err error) { 2163 var _p0 *byte 2164 _p0, err = BytePtrFromString(path) 2165 if err != nil { 2166 return 2167 } 2168 _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) 2169 if e1 != 0 { 2170 err = errnoErr(e1) 2171 } 2172 return 2173 } 2174 2175 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2176 2177 func utimes(path string, times *[2]Timeval) (err error) { 2178 var _p0 *byte 2179 _p0, err = BytePtrFromString(path) 2180 if err != nil { 2181 return 2182 } 2183 _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) 2184 if e1 != 0 { 2185 err = errnoErr(e1) 2186 } 2187 return 2188 } 2189 2190 // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT 2191 2192 func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { 2193 r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) 2194 n = int(r0) 2195 if e1 != 0 { 2196 err = errnoErr(e1) 2197 } 2198 return 2199 }