David K. Bainbridge | c415efe | 2021-08-19 13:05:21 +0000 | [diff] [blame^] | 1 | // go run mksyscall.go -b32 -tags linux,ppc syscall_linux.go syscall_linux_ppc.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | //go:build linux && ppc |
| 5 | // +build linux,ppc |
| 6 | |
| 7 | package unix |
| 8 | |
| 9 | import ( |
| 10 | "syscall" |
| 11 | "unsafe" |
| 12 | ) |
| 13 | |
| 14 | var _ syscall.Errno |
| 15 | |
| 16 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 17 | |
| 18 | func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { |
| 19 | _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask>>32), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname))) |
| 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 Fallocate(fd int, mode uint32, off int64, len int64) (err error) { |
| 29 | _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off>>32), uintptr(off), uintptr(len>>32), uintptr(len)) |
| 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { |
| 39 | r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) |
| 40 | n = int64(int64(r0)<<32 | int64(r1)) |
| 41 | if e1 != 0 { |
| 42 | err = errnoErr(e1) |
| 43 | } |
| 44 | return |
| 45 | } |
| 46 | |
| 47 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 48 | |
| 49 | func dup2(oldfd int, newfd int) (err error) { |
| 50 | _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) |
| 51 | if e1 != 0 { |
| 52 | err = errnoErr(e1) |
| 53 | } |
| 54 | return |
| 55 | } |
| 56 | |
| 57 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 58 | |
| 59 | func EpollCreate(size int) (fd int, err error) { |
| 60 | r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) |
| 61 | fd = int(r0) |
| 62 | if e1 != 0 { |
| 63 | err = errnoErr(e1) |
| 64 | } |
| 65 | return |
| 66 | } |
| 67 | |
| 68 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 69 | |
| 70 | func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { |
| 71 | var _p0 unsafe.Pointer |
| 72 | if len(events) > 0 { |
| 73 | _p0 = unsafe.Pointer(&events[0]) |
| 74 | } else { |
| 75 | _p0 = unsafe.Pointer(&_zero) |
| 76 | } |
| 77 | r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) |
| 78 | n = int(r0) |
| 79 | if e1 != 0 { |
| 80 | err = errnoErr(e1) |
| 81 | } |
| 82 | return |
| 83 | } |
| 84 | |
| 85 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 86 | |
| 87 | func Fchown(fd int, uid int, gid int) (err error) { |
| 88 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 89 | if e1 != 0 { |
| 90 | err = errnoErr(e1) |
| 91 | } |
| 92 | return |
| 93 | } |
| 94 | |
| 95 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 96 | |
| 97 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 98 | _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 99 | if e1 != 0 { |
| 100 | err = errnoErr(e1) |
| 101 | } |
| 102 | return |
| 103 | } |
| 104 | |
| 105 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 106 | |
| 107 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { |
| 108 | var _p0 *byte |
| 109 | _p0, err = BytePtrFromString(path) |
| 110 | if err != nil { |
| 111 | return |
| 112 | } |
| 113 | _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| 114 | if e1 != 0 { |
| 115 | err = errnoErr(e1) |
| 116 | } |
| 117 | return |
| 118 | } |
| 119 | |
| 120 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 121 | |
| 122 | func Ftruncate(fd int, length int64) (err error) { |
| 123 | _, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length>>32), uintptr(length)) |
| 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 Getegid() (egid int) { |
| 133 | r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) |
| 134 | egid = int(r0) |
| 135 | return |
| 136 | } |
| 137 | |
| 138 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 139 | |
| 140 | func Geteuid() (euid int) { |
| 141 | r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) |
| 142 | euid = int(r0) |
| 143 | return |
| 144 | } |
| 145 | |
| 146 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 147 | |
| 148 | func Getgid() (gid int) { |
| 149 | r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) |
| 150 | gid = int(r0) |
| 151 | return |
| 152 | } |
| 153 | |
| 154 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 155 | |
| 156 | func Getuid() (uid int) { |
| 157 | r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) |
| 158 | uid = int(r0) |
| 159 | return |
| 160 | } |
| 161 | |
| 162 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 163 | |
| 164 | func InotifyInit() (fd int, err error) { |
| 165 | r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) |
| 166 | fd = int(r0) |
| 167 | if e1 != 0 { |
| 168 | err = errnoErr(e1) |
| 169 | } |
| 170 | return |
| 171 | } |
| 172 | |
| 173 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 174 | |
| 175 | func Ioperm(from int, num int, on int) (err error) { |
| 176 | _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) |
| 177 | if e1 != 0 { |
| 178 | err = errnoErr(e1) |
| 179 | } |
| 180 | return |
| 181 | } |
| 182 | |
| 183 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 184 | |
| 185 | func Iopl(level int) (err error) { |
| 186 | _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) |
| 187 | if e1 != 0 { |
| 188 | err = errnoErr(e1) |
| 189 | } |
| 190 | return |
| 191 | } |
| 192 | |
| 193 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 194 | |
| 195 | func Lchown(path string, uid int, gid int) (err error) { |
| 196 | var _p0 *byte |
| 197 | _p0, err = BytePtrFromString(path) |
| 198 | if err != nil { |
| 199 | return |
| 200 | } |
| 201 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 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 Listen(s int, n int) (err error) { |
| 211 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) |
| 212 | if e1 != 0 { |
| 213 | err = errnoErr(e1) |
| 214 | } |
| 215 | return |
| 216 | } |
| 217 | |
| 218 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 219 | |
| 220 | func Lstat(path string, stat *Stat_t) (err error) { |
| 221 | var _p0 *byte |
| 222 | _p0, err = BytePtrFromString(path) |
| 223 | if err != nil { |
| 224 | return |
| 225 | } |
| 226 | _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 227 | if e1 != 0 { |
| 228 | err = errnoErr(e1) |
| 229 | } |
| 230 | return |
| 231 | } |
| 232 | |
| 233 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 234 | |
| 235 | func Pause() (err error) { |
| 236 | _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) |
| 237 | if e1 != 0 { |
| 238 | err = errnoErr(e1) |
| 239 | } |
| 240 | return |
| 241 | } |
| 242 | |
| 243 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 244 | |
| 245 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 246 | var _p0 unsafe.Pointer |
| 247 | if len(p) > 0 { |
| 248 | _p0 = unsafe.Pointer(&p[0]) |
| 249 | } else { |
| 250 | _p0 = unsafe.Pointer(&_zero) |
| 251 | } |
| 252 | r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0) |
| 253 | n = int(r0) |
| 254 | if e1 != 0 { |
| 255 | err = errnoErr(e1) |
| 256 | } |
| 257 | return |
| 258 | } |
| 259 | |
| 260 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 261 | |
| 262 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 263 | var _p0 unsafe.Pointer |
| 264 | if len(p) > 0 { |
| 265 | _p0 = unsafe.Pointer(&p[0]) |
| 266 | } else { |
| 267 | _p0 = unsafe.Pointer(&_zero) |
| 268 | } |
| 269 | r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset>>32), uintptr(offset), 0) |
| 270 | n = int(r0) |
| 271 | if e1 != 0 { |
| 272 | err = errnoErr(e1) |
| 273 | } |
| 274 | return |
| 275 | } |
| 276 | |
| 277 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 278 | |
| 279 | func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { |
| 280 | var _p0 *byte |
| 281 | _p0, err = BytePtrFromString(oldpath) |
| 282 | if err != nil { |
| 283 | return |
| 284 | } |
| 285 | var _p1 *byte |
| 286 | _p1, err = BytePtrFromString(newpath) |
| 287 | if err != nil { |
| 288 | return |
| 289 | } |
| 290 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 291 | if e1 != 0 { |
| 292 | err = errnoErr(e1) |
| 293 | } |
| 294 | return |
| 295 | } |
| 296 | |
| 297 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 298 | |
| 299 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 300 | r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| 301 | n = int(r0) |
| 302 | if e1 != 0 { |
| 303 | err = errnoErr(e1) |
| 304 | } |
| 305 | return |
| 306 | } |
| 307 | |
| 308 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 309 | |
| 310 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
| 311 | r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) |
| 312 | written = int(r0) |
| 313 | if e1 != 0 { |
| 314 | err = errnoErr(e1) |
| 315 | } |
| 316 | return |
| 317 | } |
| 318 | |
| 319 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 320 | |
| 321 | func setfsgid(gid int) (prev int, err error) { |
| 322 | r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) |
| 323 | prev = int(r0) |
| 324 | if e1 != 0 { |
| 325 | err = errnoErr(e1) |
| 326 | } |
| 327 | return |
| 328 | } |
| 329 | |
| 330 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 331 | |
| 332 | func setfsuid(uid int) (prev int, err error) { |
| 333 | r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) |
| 334 | prev = int(r0) |
| 335 | if e1 != 0 { |
| 336 | err = errnoErr(e1) |
| 337 | } |
| 338 | return |
| 339 | } |
| 340 | |
| 341 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 342 | |
| 343 | func Setregid(rgid int, egid int) (err error) { |
| 344 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 345 | if e1 != 0 { |
| 346 | err = errnoErr(e1) |
| 347 | } |
| 348 | return |
| 349 | } |
| 350 | |
| 351 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 352 | |
| 353 | func Setresgid(rgid int, egid int, sgid int) (err error) { |
| 354 | _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) |
| 355 | if e1 != 0 { |
| 356 | err = errnoErr(e1) |
| 357 | } |
| 358 | return |
| 359 | } |
| 360 | |
| 361 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 362 | |
| 363 | func Setresuid(ruid int, euid int, suid int) (err error) { |
| 364 | _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) |
| 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 Setreuid(ruid int, euid int) (err error) { |
| 374 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) |
| 375 | if e1 != 0 { |
| 376 | err = errnoErr(e1) |
| 377 | } |
| 378 | return |
| 379 | } |
| 380 | |
| 381 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 382 | |
| 383 | func Shutdown(fd int, how int) (err error) { |
| 384 | _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) |
| 385 | if e1 != 0 { |
| 386 | err = errnoErr(e1) |
| 387 | } |
| 388 | return |
| 389 | } |
| 390 | |
| 391 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 392 | |
| 393 | func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { |
| 394 | r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) |
| 395 | n = int(r0) |
| 396 | if e1 != 0 { |
| 397 | err = errnoErr(e1) |
| 398 | } |
| 399 | return |
| 400 | } |
| 401 | |
| 402 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 403 | |
| 404 | func Stat(path string, stat *Stat_t) (err error) { |
| 405 | var _p0 *byte |
| 406 | _p0, err = BytePtrFromString(path) |
| 407 | if err != nil { |
| 408 | return |
| 409 | } |
| 410 | _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 411 | if e1 != 0 { |
| 412 | err = errnoErr(e1) |
| 413 | } |
| 414 | return |
| 415 | } |
| 416 | |
| 417 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 418 | |
| 419 | func Truncate(path string, length int64) (err error) { |
| 420 | var _p0 *byte |
| 421 | _p0, err = BytePtrFromString(path) |
| 422 | if err != nil { |
| 423 | return |
| 424 | } |
| 425 | _, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length>>32), uintptr(length)) |
| 426 | if e1 != 0 { |
| 427 | err = errnoErr(e1) |
| 428 | } |
| 429 | return |
| 430 | } |
| 431 | |
| 432 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 433 | |
| 434 | func Ustat(dev int, ubuf *Ustat_t) (err error) { |
| 435 | _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) |
| 436 | if e1 != 0 { |
| 437 | err = errnoErr(e1) |
| 438 | } |
| 439 | return |
| 440 | } |
| 441 | |
| 442 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 443 | |
| 444 | func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
| 445 | r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 446 | fd = int(r0) |
| 447 | if e1 != 0 { |
| 448 | err = errnoErr(e1) |
| 449 | } |
| 450 | return |
| 451 | } |
| 452 | |
| 453 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 454 | |
| 455 | func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { |
| 456 | r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) |
| 457 | fd = int(r0) |
| 458 | if e1 != 0 { |
| 459 | err = errnoErr(e1) |
| 460 | } |
| 461 | return |
| 462 | } |
| 463 | |
| 464 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 465 | |
| 466 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 467 | _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 468 | if e1 != 0 { |
| 469 | err = errnoErr(e1) |
| 470 | } |
| 471 | return |
| 472 | } |
| 473 | |
| 474 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 475 | |
| 476 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 477 | _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 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 getgroups(n int, list *_Gid_t) (nn int, err error) { |
| 487 | r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 488 | nn = 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 setgroups(n int, list *_Gid_t) (err error) { |
| 498 | _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 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 getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
| 508 | _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) |
| 509 | if e1 != 0 { |
| 510 | err = errnoErr(e1) |
| 511 | } |
| 512 | return |
| 513 | } |
| 514 | |
| 515 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 516 | |
| 517 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
| 518 | _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 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 socket(domain int, typ int, proto int) (fd int, err error) { |
| 528 | r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) |
| 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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
| 539 | _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) |
| 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 getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 549 | _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 550 | if e1 != 0 { |
| 551 | err = errnoErr(e1) |
| 552 | } |
| 553 | return |
| 554 | } |
| 555 | |
| 556 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 557 | |
| 558 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 559 | _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 560 | if e1 != 0 { |
| 561 | err = errnoErr(e1) |
| 562 | } |
| 563 | return |
| 564 | } |
| 565 | |
| 566 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 567 | |
| 568 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 569 | var _p0 unsafe.Pointer |
| 570 | if len(p) > 0 { |
| 571 | _p0 = unsafe.Pointer(&p[0]) |
| 572 | } else { |
| 573 | _p0 = unsafe.Pointer(&_zero) |
| 574 | } |
| 575 | r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) |
| 576 | n = int(r0) |
| 577 | if e1 != 0 { |
| 578 | err = errnoErr(e1) |
| 579 | } |
| 580 | return |
| 581 | } |
| 582 | |
| 583 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 584 | |
| 585 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 586 | var _p0 unsafe.Pointer |
| 587 | if len(buf) > 0 { |
| 588 | _p0 = unsafe.Pointer(&buf[0]) |
| 589 | } else { |
| 590 | _p0 = unsafe.Pointer(&_zero) |
| 591 | } |
| 592 | _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) |
| 593 | if e1 != 0 { |
| 594 | err = errnoErr(e1) |
| 595 | } |
| 596 | return |
| 597 | } |
| 598 | |
| 599 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 600 | |
| 601 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 602 | r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 603 | n = int(r0) |
| 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 sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 613 | r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 614 | n = int(r0) |
| 615 | if e1 != 0 { |
| 616 | err = errnoErr(e1) |
| 617 | } |
| 618 | return |
| 619 | } |
| 620 | |
| 621 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 622 | |
| 623 | func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { |
| 624 | var _p0 *byte |
| 625 | _p0, err = BytePtrFromString(path) |
| 626 | if err != nil { |
| 627 | return |
| 628 | } |
| 629 | _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) |
| 630 | if e1 != 0 { |
| 631 | err = errnoErr(e1) |
| 632 | } |
| 633 | return |
| 634 | } |
| 635 | |
| 636 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 637 | |
| 638 | func Gettimeofday(tv *Timeval) (err error) { |
| 639 | _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| 640 | if e1 != 0 { |
| 641 | err = errnoErr(e1) |
| 642 | } |
| 643 | return |
| 644 | } |
| 645 | |
| 646 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 647 | |
| 648 | func Time(t *Time_t) (tt Time_t, err error) { |
| 649 | r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) |
| 650 | tt = Time_t(r0) |
| 651 | if e1 != 0 { |
| 652 | err = errnoErr(e1) |
| 653 | } |
| 654 | return |
| 655 | } |
| 656 | |
| 657 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 658 | |
| 659 | func Utime(path string, buf *Utimbuf) (err error) { |
| 660 | var _p0 *byte |
| 661 | _p0, err = BytePtrFromString(path) |
| 662 | if err != nil { |
| 663 | return |
| 664 | } |
| 665 | _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| 666 | if e1 != 0 { |
| 667 | err = errnoErr(e1) |
| 668 | } |
| 669 | return |
| 670 | } |
| 671 | |
| 672 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 673 | |
| 674 | func utimes(path string, times *[2]Timeval) (err error) { |
| 675 | var _p0 *byte |
| 676 | _p0, err = BytePtrFromString(path) |
| 677 | if err != nil { |
| 678 | return |
| 679 | } |
| 680 | _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) |
| 681 | if e1 != 0 { |
| 682 | err = errnoErr(e1) |
| 683 | } |
| 684 | return |
| 685 | } |
| 686 | |
| 687 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 688 | |
| 689 | func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) { |
| 690 | r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset)) |
| 691 | xaddr = uintptr(r0) |
| 692 | if e1 != 0 { |
| 693 | err = errnoErr(e1) |
| 694 | } |
| 695 | return |
| 696 | } |
| 697 | |
| 698 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 699 | |
| 700 | func getrlimit(resource int, rlim *rlimit32) (err error) { |
| 701 | _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 702 | if e1 != 0 { |
| 703 | err = errnoErr(e1) |
| 704 | } |
| 705 | return |
| 706 | } |
| 707 | |
| 708 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 709 | |
| 710 | func setrlimit(resource int, rlim *rlimit32) (err error) { |
| 711 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 712 | if e1 != 0 { |
| 713 | err = errnoErr(e1) |
| 714 | } |
| 715 | return |
| 716 | } |
| 717 | |
| 718 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 719 | |
| 720 | func pipe(p *[2]_C_int) (err error) { |
| 721 | _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) |
| 722 | if e1 != 0 { |
| 723 | err = errnoErr(e1) |
| 724 | } |
| 725 | return |
| 726 | } |
| 727 | |
| 728 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 729 | |
| 730 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 731 | r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
| 732 | n = int(r0) |
| 733 | if e1 != 0 { |
| 734 | err = errnoErr(e1) |
| 735 | } |
| 736 | return |
| 737 | } |
| 738 | |
| 739 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 740 | |
| 741 | func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { |
| 742 | _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off>>32), uintptr(off), uintptr(n>>32), uintptr(n)) |
| 743 | if e1 != 0 { |
| 744 | err = errnoErr(e1) |
| 745 | } |
| 746 | return |
| 747 | } |
| 748 | |
| 749 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 750 | |
| 751 | func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { |
| 752 | var _p0 *byte |
| 753 | _p0, err = BytePtrFromString(cmdline) |
| 754 | if err != nil { |
| 755 | return |
| 756 | } |
| 757 | _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 758 | if e1 != 0 { |
| 759 | err = errnoErr(e1) |
| 760 | } |
| 761 | return |
| 762 | } |