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