Dinesh Belwalkar | e63f7f9 | 2019-11-22 23:11:16 +0000 | [diff] [blame^] | 1 | // go run mksyscall.go -tags linux,ppc64le syscall_linux.go syscall_linux_ppc64x.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build linux,ppc64le |
| 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(dirFd), uintptr(unsafe.Pointer(pathname)), 0) |
| 30 | if e1 != 0 { |
| 31 | err = errnoErr(e1) |
| 32 | } |
| 33 | return |
| 34 | } |
| 35 | |
| 36 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 37 | |
| 38 | func 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 Chdir(path string) (err error) { |
| 412 | var _p0 *byte |
| 413 | _p0, err = BytePtrFromString(path) |
| 414 | if err != nil { |
| 415 | return |
| 416 | } |
| 417 | _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 418 | if e1 != 0 { |
| 419 | err = errnoErr(e1) |
| 420 | } |
| 421 | return |
| 422 | } |
| 423 | |
| 424 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 425 | |
| 426 | func Chroot(path string) (err error) { |
| 427 | var _p0 *byte |
| 428 | _p0, err = BytePtrFromString(path) |
| 429 | if err != nil { |
| 430 | return |
| 431 | } |
| 432 | _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 433 | if e1 != 0 { |
| 434 | err = errnoErr(e1) |
| 435 | } |
| 436 | return |
| 437 | } |
| 438 | |
| 439 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 440 | |
| 441 | func ClockGetres(clockid int32, res *Timespec) (err error) { |
| 442 | _, _, e1 := Syscall(SYS_CLOCK_GETRES, uintptr(clockid), uintptr(unsafe.Pointer(res)), 0) |
| 443 | if e1 != 0 { |
| 444 | err = errnoErr(e1) |
| 445 | } |
| 446 | return |
| 447 | } |
| 448 | |
| 449 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 450 | |
| 451 | func ClockGettime(clockid int32, time *Timespec) (err error) { |
| 452 | _, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 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 ClockNanosleep(clockid int32, flags int, request *Timespec, remain *Timespec) (err error) { |
| 462 | _, _, e1 := Syscall6(SYS_CLOCK_NANOSLEEP, uintptr(clockid), uintptr(flags), uintptr(unsafe.Pointer(request)), uintptr(unsafe.Pointer(remain)), 0, 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 Close(fd int) (err error) { |
| 472 | _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 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 CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) { |
| 482 | r0, _, e1 := Syscall6(SYS_COPY_FILE_RANGE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) |
| 483 | n = int(r0) |
| 484 | if e1 != 0 { |
| 485 | err = errnoErr(e1) |
| 486 | } |
| 487 | return |
| 488 | } |
| 489 | |
| 490 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 491 | |
| 492 | func DeleteModule(name string, flags int) (err error) { |
| 493 | var _p0 *byte |
| 494 | _p0, err = BytePtrFromString(name) |
| 495 | if err != nil { |
| 496 | return |
| 497 | } |
| 498 | _, _, e1 := Syscall(SYS_DELETE_MODULE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 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 Dup(oldfd int) (fd int, err error) { |
| 508 | r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 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 Dup3(oldfd int, newfd int, flags int) (err error) { |
| 519 | _, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags)) |
| 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 EpollCreate1(flag int) (fd int, err error) { |
| 529 | r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 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 EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) { |
| 540 | _, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0) |
| 541 | if e1 != 0 { |
| 542 | err = errnoErr(e1) |
| 543 | } |
| 544 | return |
| 545 | } |
| 546 | |
| 547 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 548 | |
| 549 | func Eventfd(initval uint, flags int) (fd int, err error) { |
| 550 | r0, _, e1 := Syscall(SYS_EVENTFD2, uintptr(initval), uintptr(flags), 0) |
| 551 | fd = int(r0) |
| 552 | if e1 != 0 { |
| 553 | err = errnoErr(e1) |
| 554 | } |
| 555 | return |
| 556 | } |
| 557 | |
| 558 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 559 | |
| 560 | func Exit(code int) { |
| 561 | SyscallNoError(SYS_EXIT_GROUP, uintptr(code), 0, 0) |
| 562 | return |
| 563 | } |
| 564 | |
| 565 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 566 | |
| 567 | func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { |
| 568 | _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) |
| 569 | if e1 != 0 { |
| 570 | err = errnoErr(e1) |
| 571 | } |
| 572 | return |
| 573 | } |
| 574 | |
| 575 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 576 | |
| 577 | func Fchdir(fd int) (err error) { |
| 578 | _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) |
| 579 | if e1 != 0 { |
| 580 | err = errnoErr(e1) |
| 581 | } |
| 582 | return |
| 583 | } |
| 584 | |
| 585 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 586 | |
| 587 | func Fchmod(fd int, mode uint32) (err error) { |
| 588 | _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) |
| 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 Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 598 | var _p0 *byte |
| 599 | _p0, err = BytePtrFromString(path) |
| 600 | if err != nil { |
| 601 | return |
| 602 | } |
| 603 | _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 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 fcntl(fd int, cmd int, arg int) (val int, err error) { |
| 613 | r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) |
| 614 | val = 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 Fdatasync(fd int) (err error) { |
| 624 | _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0) |
| 625 | if e1 != 0 { |
| 626 | err = errnoErr(e1) |
| 627 | } |
| 628 | return |
| 629 | } |
| 630 | |
| 631 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 632 | |
| 633 | func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) { |
| 634 | var _p0 *byte |
| 635 | _p0, err = BytePtrFromString(attr) |
| 636 | if err != nil { |
| 637 | return |
| 638 | } |
| 639 | var _p1 unsafe.Pointer |
| 640 | if len(dest) > 0 { |
| 641 | _p1 = unsafe.Pointer(&dest[0]) |
| 642 | } else { |
| 643 | _p1 = unsafe.Pointer(&_zero) |
| 644 | } |
| 645 | r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), 0, 0) |
| 646 | sz = int(r0) |
| 647 | if e1 != 0 { |
| 648 | err = errnoErr(e1) |
| 649 | } |
| 650 | return |
| 651 | } |
| 652 | |
| 653 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 654 | |
| 655 | func FinitModule(fd int, params string, flags int) (err error) { |
| 656 | var _p0 *byte |
| 657 | _p0, err = BytePtrFromString(params) |
| 658 | if err != nil { |
| 659 | return |
| 660 | } |
| 661 | _, _, e1 := Syscall(SYS_FINIT_MODULE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) |
| 662 | if e1 != 0 { |
| 663 | err = errnoErr(e1) |
| 664 | } |
| 665 | return |
| 666 | } |
| 667 | |
| 668 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 669 | |
| 670 | func Flistxattr(fd int, dest []byte) (sz int, err error) { |
| 671 | var _p0 unsafe.Pointer |
| 672 | if len(dest) > 0 { |
| 673 | _p0 = unsafe.Pointer(&dest[0]) |
| 674 | } else { |
| 675 | _p0 = unsafe.Pointer(&_zero) |
| 676 | } |
| 677 | r0, _, e1 := Syscall(SYS_FLISTXATTR, uintptr(fd), uintptr(_p0), uintptr(len(dest))) |
| 678 | sz = int(r0) |
| 679 | if e1 != 0 { |
| 680 | err = errnoErr(e1) |
| 681 | } |
| 682 | return |
| 683 | } |
| 684 | |
| 685 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 686 | |
| 687 | func Flock(fd int, how int) (err error) { |
| 688 | _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) |
| 689 | if e1 != 0 { |
| 690 | err = errnoErr(e1) |
| 691 | } |
| 692 | return |
| 693 | } |
| 694 | |
| 695 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 696 | |
| 697 | func Fremovexattr(fd int, attr string) (err error) { |
| 698 | var _p0 *byte |
| 699 | _p0, err = BytePtrFromString(attr) |
| 700 | if err != nil { |
| 701 | return |
| 702 | } |
| 703 | _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), 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 Fsetxattr(fd int, attr string, dest []byte, flags int) (err error) { |
| 713 | var _p0 *byte |
| 714 | _p0, err = BytePtrFromString(attr) |
| 715 | if err != nil { |
| 716 | return |
| 717 | } |
| 718 | var _p1 unsafe.Pointer |
| 719 | if len(dest) > 0 { |
| 720 | _p1 = unsafe.Pointer(&dest[0]) |
| 721 | } else { |
| 722 | _p1 = unsafe.Pointer(&_zero) |
| 723 | } |
| 724 | _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)), uintptr(flags), 0) |
| 725 | if e1 != 0 { |
| 726 | err = errnoErr(e1) |
| 727 | } |
| 728 | return |
| 729 | } |
| 730 | |
| 731 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 732 | |
| 733 | func Fsync(fd int) (err error) { |
| 734 | _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) |
| 735 | if e1 != 0 { |
| 736 | err = errnoErr(e1) |
| 737 | } |
| 738 | return |
| 739 | } |
| 740 | |
| 741 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 742 | |
| 743 | func Getdents(fd int, buf []byte) (n int, err error) { |
| 744 | var _p0 unsafe.Pointer |
| 745 | if len(buf) > 0 { |
| 746 | _p0 = unsafe.Pointer(&buf[0]) |
| 747 | } else { |
| 748 | _p0 = unsafe.Pointer(&_zero) |
| 749 | } |
| 750 | r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf))) |
| 751 | n = int(r0) |
| 752 | if e1 != 0 { |
| 753 | err = errnoErr(e1) |
| 754 | } |
| 755 | return |
| 756 | } |
| 757 | |
| 758 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 759 | |
| 760 | func Getpgid(pid int) (pgid int, err error) { |
| 761 | r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) |
| 762 | pgid = int(r0) |
| 763 | if e1 != 0 { |
| 764 | err = errnoErr(e1) |
| 765 | } |
| 766 | return |
| 767 | } |
| 768 | |
| 769 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 770 | |
| 771 | func Getpid() (pid int) { |
| 772 | r0, _ := RawSyscallNoError(SYS_GETPID, 0, 0, 0) |
| 773 | pid = int(r0) |
| 774 | return |
| 775 | } |
| 776 | |
| 777 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 778 | |
| 779 | func Getppid() (ppid int) { |
| 780 | r0, _ := RawSyscallNoError(SYS_GETPPID, 0, 0, 0) |
| 781 | ppid = int(r0) |
| 782 | return |
| 783 | } |
| 784 | |
| 785 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 786 | |
| 787 | func Getpriority(which int, who int) (prio int, err error) { |
| 788 | r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) |
| 789 | prio = int(r0) |
| 790 | if e1 != 0 { |
| 791 | err = errnoErr(e1) |
| 792 | } |
| 793 | return |
| 794 | } |
| 795 | |
| 796 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 797 | |
| 798 | func Getrandom(buf []byte, flags int) (n int, err error) { |
| 799 | var _p0 unsafe.Pointer |
| 800 | if len(buf) > 0 { |
| 801 | _p0 = unsafe.Pointer(&buf[0]) |
| 802 | } else { |
| 803 | _p0 = unsafe.Pointer(&_zero) |
| 804 | } |
| 805 | r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags)) |
| 806 | n = 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 Getrusage(who int, rusage *Rusage) (err error) { |
| 816 | _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) |
| 817 | if e1 != 0 { |
| 818 | err = errnoErr(e1) |
| 819 | } |
| 820 | return |
| 821 | } |
| 822 | |
| 823 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 824 | |
| 825 | func Getsid(pid int) (sid int, err error) { |
| 826 | r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) |
| 827 | sid = int(r0) |
| 828 | if e1 != 0 { |
| 829 | err = errnoErr(e1) |
| 830 | } |
| 831 | return |
| 832 | } |
| 833 | |
| 834 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 835 | |
| 836 | func Gettid() (tid int) { |
| 837 | r0, _ := RawSyscallNoError(SYS_GETTID, 0, 0, 0) |
| 838 | tid = int(r0) |
| 839 | return |
| 840 | } |
| 841 | |
| 842 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 843 | |
| 844 | func Getxattr(path string, attr string, dest []byte) (sz int, err error) { |
| 845 | var _p0 *byte |
| 846 | _p0, err = BytePtrFromString(path) |
| 847 | if err != nil { |
| 848 | return |
| 849 | } |
| 850 | var _p1 *byte |
| 851 | _p1, err = BytePtrFromString(attr) |
| 852 | if err != nil { |
| 853 | return |
| 854 | } |
| 855 | var _p2 unsafe.Pointer |
| 856 | if len(dest) > 0 { |
| 857 | _p2 = unsafe.Pointer(&dest[0]) |
| 858 | } else { |
| 859 | _p2 = unsafe.Pointer(&_zero) |
| 860 | } |
| 861 | r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) |
| 862 | sz = int(r0) |
| 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 InitModule(moduleImage []byte, params string) (err error) { |
| 872 | var _p0 unsafe.Pointer |
| 873 | if len(moduleImage) > 0 { |
| 874 | _p0 = unsafe.Pointer(&moduleImage[0]) |
| 875 | } else { |
| 876 | _p0 = unsafe.Pointer(&_zero) |
| 877 | } |
| 878 | var _p1 *byte |
| 879 | _p1, err = BytePtrFromString(params) |
| 880 | if err != nil { |
| 881 | return |
| 882 | } |
| 883 | _, _, e1 := Syscall(SYS_INIT_MODULE, uintptr(_p0), uintptr(len(moduleImage)), uintptr(unsafe.Pointer(_p1))) |
| 884 | if e1 != 0 { |
| 885 | err = errnoErr(e1) |
| 886 | } |
| 887 | return |
| 888 | } |
| 889 | |
| 890 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 891 | |
| 892 | func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) { |
| 893 | var _p0 *byte |
| 894 | _p0, err = BytePtrFromString(pathname) |
| 895 | if err != nil { |
| 896 | return |
| 897 | } |
| 898 | r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask)) |
| 899 | watchdesc = int(r0) |
| 900 | if e1 != 0 { |
| 901 | err = errnoErr(e1) |
| 902 | } |
| 903 | return |
| 904 | } |
| 905 | |
| 906 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 907 | |
| 908 | func InotifyInit1(flags int) (fd int, err error) { |
| 909 | r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0) |
| 910 | fd = int(r0) |
| 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 InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) { |
| 920 | r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0) |
| 921 | success = int(r0) |
| 922 | if e1 != 0 { |
| 923 | err = errnoErr(e1) |
| 924 | } |
| 925 | return |
| 926 | } |
| 927 | |
| 928 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 929 | |
| 930 | func Kill(pid int, sig syscall.Signal) (err error) { |
| 931 | _, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0) |
| 932 | if e1 != 0 { |
| 933 | err = errnoErr(e1) |
| 934 | } |
| 935 | return |
| 936 | } |
| 937 | |
| 938 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 939 | |
| 940 | func Klogctl(typ int, buf []byte) (n int, err error) { |
| 941 | var _p0 unsafe.Pointer |
| 942 | if len(buf) > 0 { |
| 943 | _p0 = unsafe.Pointer(&buf[0]) |
| 944 | } else { |
| 945 | _p0 = unsafe.Pointer(&_zero) |
| 946 | } |
| 947 | r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf))) |
| 948 | n = int(r0) |
| 949 | if e1 != 0 { |
| 950 | err = errnoErr(e1) |
| 951 | } |
| 952 | return |
| 953 | } |
| 954 | |
| 955 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 956 | |
| 957 | func Lgetxattr(path string, attr string, dest []byte) (sz int, err error) { |
| 958 | var _p0 *byte |
| 959 | _p0, err = BytePtrFromString(path) |
| 960 | if err != nil { |
| 961 | return |
| 962 | } |
| 963 | var _p1 *byte |
| 964 | _p1, err = BytePtrFromString(attr) |
| 965 | if err != nil { |
| 966 | return |
| 967 | } |
| 968 | var _p2 unsafe.Pointer |
| 969 | if len(dest) > 0 { |
| 970 | _p2 = unsafe.Pointer(&dest[0]) |
| 971 | } else { |
| 972 | _p2 = unsafe.Pointer(&_zero) |
| 973 | } |
| 974 | r0, _, e1 := Syscall6(SYS_LGETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0) |
| 975 | sz = int(r0) |
| 976 | if e1 != 0 { |
| 977 | err = errnoErr(e1) |
| 978 | } |
| 979 | return |
| 980 | } |
| 981 | |
| 982 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 983 | |
| 984 | func Listxattr(path string, dest []byte) (sz int, err error) { |
| 985 | var _p0 *byte |
| 986 | _p0, err = BytePtrFromString(path) |
| 987 | if err != nil { |
| 988 | return |
| 989 | } |
| 990 | var _p1 unsafe.Pointer |
| 991 | if len(dest) > 0 { |
| 992 | _p1 = unsafe.Pointer(&dest[0]) |
| 993 | } else { |
| 994 | _p1 = unsafe.Pointer(&_zero) |
| 995 | } |
| 996 | r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) |
| 997 | sz = int(r0) |
| 998 | if e1 != 0 { |
| 999 | err = errnoErr(e1) |
| 1000 | } |
| 1001 | return |
| 1002 | } |
| 1003 | |
| 1004 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1005 | |
| 1006 | func Llistxattr(path string, dest []byte) (sz int, err error) { |
| 1007 | var _p0 *byte |
| 1008 | _p0, err = BytePtrFromString(path) |
| 1009 | if err != nil { |
| 1010 | return |
| 1011 | } |
| 1012 | var _p1 unsafe.Pointer |
| 1013 | if len(dest) > 0 { |
| 1014 | _p1 = unsafe.Pointer(&dest[0]) |
| 1015 | } else { |
| 1016 | _p1 = unsafe.Pointer(&_zero) |
| 1017 | } |
| 1018 | r0, _, e1 := Syscall(SYS_LLISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest))) |
| 1019 | sz = int(r0) |
| 1020 | if e1 != 0 { |
| 1021 | err = errnoErr(e1) |
| 1022 | } |
| 1023 | return |
| 1024 | } |
| 1025 | |
| 1026 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1027 | |
| 1028 | func Lremovexattr(path string, attr string) (err error) { |
| 1029 | var _p0 *byte |
| 1030 | _p0, err = BytePtrFromString(path) |
| 1031 | if err != nil { |
| 1032 | return |
| 1033 | } |
| 1034 | var _p1 *byte |
| 1035 | _p1, err = BytePtrFromString(attr) |
| 1036 | if err != nil { |
| 1037 | return |
| 1038 | } |
| 1039 | _, _, e1 := Syscall(SYS_LREMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 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 Lsetxattr(path string, attr string, data []byte, flags int) (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 | var _p2 unsafe.Pointer |
| 1060 | if len(data) > 0 { |
| 1061 | _p2 = unsafe.Pointer(&data[0]) |
| 1062 | } else { |
| 1063 | _p2 = unsafe.Pointer(&_zero) |
| 1064 | } |
| 1065 | _, _, e1 := Syscall6(SYS_LSETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) |
| 1066 | if e1 != 0 { |
| 1067 | err = errnoErr(e1) |
| 1068 | } |
| 1069 | return |
| 1070 | } |
| 1071 | |
| 1072 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1073 | |
| 1074 | func MemfdCreate(name string, flags int) (fd int, err error) { |
| 1075 | var _p0 *byte |
| 1076 | _p0, err = BytePtrFromString(name) |
| 1077 | if err != nil { |
| 1078 | return |
| 1079 | } |
| 1080 | r0, _, e1 := Syscall(SYS_MEMFD_CREATE, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 1081 | fd = int(r0) |
| 1082 | if e1 != 0 { |
| 1083 | err = errnoErr(e1) |
| 1084 | } |
| 1085 | return |
| 1086 | } |
| 1087 | |
| 1088 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1089 | |
| 1090 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 1091 | var _p0 *byte |
| 1092 | _p0, err = BytePtrFromString(path) |
| 1093 | if err != nil { |
| 1094 | return |
| 1095 | } |
| 1096 | _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1097 | if e1 != 0 { |
| 1098 | err = errnoErr(e1) |
| 1099 | } |
| 1100 | return |
| 1101 | } |
| 1102 | |
| 1103 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1104 | |
| 1105 | func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { |
| 1106 | var _p0 *byte |
| 1107 | _p0, err = BytePtrFromString(path) |
| 1108 | if err != nil { |
| 1109 | return |
| 1110 | } |
| 1111 | _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) |
| 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 Nanosleep(time *Timespec, leftover *Timespec) (err error) { |
| 1121 | _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) |
| 1122 | if e1 != 0 { |
| 1123 | err = errnoErr(e1) |
| 1124 | } |
| 1125 | return |
| 1126 | } |
| 1127 | |
| 1128 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1129 | |
| 1130 | func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) { |
| 1131 | r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0) |
| 1132 | fd = int(r0) |
| 1133 | if e1 != 0 { |
| 1134 | err = errnoErr(e1) |
| 1135 | } |
| 1136 | return |
| 1137 | } |
| 1138 | |
| 1139 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1140 | |
| 1141 | func PivotRoot(newroot string, putold string) (err error) { |
| 1142 | var _p0 *byte |
| 1143 | _p0, err = BytePtrFromString(newroot) |
| 1144 | if err != nil { |
| 1145 | return |
| 1146 | } |
| 1147 | var _p1 *byte |
| 1148 | _p1, err = BytePtrFromString(putold) |
| 1149 | if err != nil { |
| 1150 | return |
| 1151 | } |
| 1152 | _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 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 prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) { |
| 1162 | _, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(newlimit)), uintptr(unsafe.Pointer(old)), 0, 0) |
| 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 Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) { |
| 1172 | _, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 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 Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { |
| 1182 | 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))) |
| 1183 | n = int(r0) |
| 1184 | if e1 != 0 { |
| 1185 | err = errnoErr(e1) |
| 1186 | } |
| 1187 | return |
| 1188 | } |
| 1189 | |
| 1190 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1191 | |
| 1192 | func read(fd int, p []byte) (n int, err error) { |
| 1193 | var _p0 unsafe.Pointer |
| 1194 | if len(p) > 0 { |
| 1195 | _p0 = unsafe.Pointer(&p[0]) |
| 1196 | } else { |
| 1197 | _p0 = unsafe.Pointer(&_zero) |
| 1198 | } |
| 1199 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1200 | n = int(r0) |
| 1201 | if e1 != 0 { |
| 1202 | err = errnoErr(e1) |
| 1203 | } |
| 1204 | return |
| 1205 | } |
| 1206 | |
| 1207 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1208 | |
| 1209 | func Removexattr(path string, attr string) (err error) { |
| 1210 | var _p0 *byte |
| 1211 | _p0, err = BytePtrFromString(path) |
| 1212 | if err != nil { |
| 1213 | return |
| 1214 | } |
| 1215 | var _p1 *byte |
| 1216 | _p1, err = BytePtrFromString(attr) |
| 1217 | if err != nil { |
| 1218 | return |
| 1219 | } |
| 1220 | _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 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 Renameat2(olddirfd int, oldpath string, newdirfd int, newpath string, flags uint) (err error) { |
| 1230 | var _p0 *byte |
| 1231 | _p0, err = BytePtrFromString(oldpath) |
| 1232 | if err != nil { |
| 1233 | return |
| 1234 | } |
| 1235 | var _p1 *byte |
| 1236 | _p1, err = BytePtrFromString(newpath) |
| 1237 | if err != nil { |
| 1238 | return |
| 1239 | } |
| 1240 | _, _, e1 := Syscall6(SYS_RENAMEAT2, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 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 RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error) { |
| 1250 | var _p0 *byte |
| 1251 | _p0, err = BytePtrFromString(keyType) |
| 1252 | if err != nil { |
| 1253 | return |
| 1254 | } |
| 1255 | var _p1 *byte |
| 1256 | _p1, err = BytePtrFromString(description) |
| 1257 | if err != nil { |
| 1258 | return |
| 1259 | } |
| 1260 | var _p2 *byte |
| 1261 | _p2, err = BytePtrFromString(callback) |
| 1262 | if err != nil { |
| 1263 | return |
| 1264 | } |
| 1265 | r0, _, e1 := Syscall6(SYS_REQUEST_KEY, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(destRingid), 0, 0) |
| 1266 | id = int(r0) |
| 1267 | if e1 != 0 { |
| 1268 | err = errnoErr(e1) |
| 1269 | } |
| 1270 | return |
| 1271 | } |
| 1272 | |
| 1273 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1274 | |
| 1275 | func Setdomainname(p []byte) (err error) { |
| 1276 | var _p0 unsafe.Pointer |
| 1277 | if len(p) > 0 { |
| 1278 | _p0 = unsafe.Pointer(&p[0]) |
| 1279 | } else { |
| 1280 | _p0 = unsafe.Pointer(&_zero) |
| 1281 | } |
| 1282 | _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0) |
| 1283 | if e1 != 0 { |
| 1284 | err = errnoErr(e1) |
| 1285 | } |
| 1286 | return |
| 1287 | } |
| 1288 | |
| 1289 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1290 | |
| 1291 | func Sethostname(p []byte) (err error) { |
| 1292 | var _p0 unsafe.Pointer |
| 1293 | if len(p) > 0 { |
| 1294 | _p0 = unsafe.Pointer(&p[0]) |
| 1295 | } else { |
| 1296 | _p0 = unsafe.Pointer(&_zero) |
| 1297 | } |
| 1298 | _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0) |
| 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 Setpgid(pid int, pgid int) (err error) { |
| 1308 | _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 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 Setsid() (pid int, err error) { |
| 1318 | r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) |
| 1319 | pid = int(r0) |
| 1320 | if e1 != 0 { |
| 1321 | err = errnoErr(e1) |
| 1322 | } |
| 1323 | return |
| 1324 | } |
| 1325 | |
| 1326 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1327 | |
| 1328 | func Settimeofday(tv *Timeval) (err error) { |
| 1329 | _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| 1330 | if e1 != 0 { |
| 1331 | err = errnoErr(e1) |
| 1332 | } |
| 1333 | return |
| 1334 | } |
| 1335 | |
| 1336 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1337 | |
| 1338 | func Setns(fd int, nstype int) (err error) { |
| 1339 | _, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0) |
| 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 Setpriority(which int, who int, prio int) (err error) { |
| 1349 | _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) |
| 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 Setxattr(path string, attr string, data []byte, flags int) (err error) { |
| 1359 | var _p0 *byte |
| 1360 | _p0, err = BytePtrFromString(path) |
| 1361 | if err != nil { |
| 1362 | return |
| 1363 | } |
| 1364 | var _p1 *byte |
| 1365 | _p1, err = BytePtrFromString(attr) |
| 1366 | if err != nil { |
| 1367 | return |
| 1368 | } |
| 1369 | var _p2 unsafe.Pointer |
| 1370 | if len(data) > 0 { |
| 1371 | _p2 = unsafe.Pointer(&data[0]) |
| 1372 | } else { |
| 1373 | _p2 = unsafe.Pointer(&_zero) |
| 1374 | } |
| 1375 | _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0) |
| 1376 | if e1 != 0 { |
| 1377 | err = errnoErr(e1) |
| 1378 | } |
| 1379 | return |
| 1380 | } |
| 1381 | |
| 1382 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1383 | |
| 1384 | func Signalfd(fd int, mask *Sigset_t, flags int) { |
| 1385 | SyscallNoError(SYS_SIGNALFD4, uintptr(fd), uintptr(unsafe.Pointer(mask)), uintptr(flags)) |
| 1386 | return |
| 1387 | } |
| 1388 | |
| 1389 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1390 | |
| 1391 | func Statx(dirfd int, path string, flags int, mask int, stat *Statx_t) (err error) { |
| 1392 | var _p0 *byte |
| 1393 | _p0, err = BytePtrFromString(path) |
| 1394 | if err != nil { |
| 1395 | return |
| 1396 | } |
| 1397 | _, _, e1 := Syscall6(SYS_STATX, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mask), uintptr(unsafe.Pointer(stat)), 0) |
| 1398 | if e1 != 0 { |
| 1399 | err = errnoErr(e1) |
| 1400 | } |
| 1401 | return |
| 1402 | } |
| 1403 | |
| 1404 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1405 | |
| 1406 | func Sync() { |
| 1407 | SyscallNoError(SYS_SYNC, 0, 0, 0) |
| 1408 | return |
| 1409 | } |
| 1410 | |
| 1411 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1412 | |
| 1413 | func Syncfs(fd int) (err error) { |
| 1414 | _, _, e1 := Syscall(SYS_SYNCFS, uintptr(fd), 0, 0) |
| 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 Sysinfo(info *Sysinfo_t) (err error) { |
| 1424 | _, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0) |
| 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 Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { |
| 1434 | r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) |
| 1435 | n = int64(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 Tgkill(tgid int, tid int, sig syscall.Signal) (err error) { |
| 1445 | _, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)) |
| 1446 | if e1 != 0 { |
| 1447 | err = errnoErr(e1) |
| 1448 | } |
| 1449 | return |
| 1450 | } |
| 1451 | |
| 1452 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1453 | |
| 1454 | func Times(tms *Tms) (ticks uintptr, err error) { |
| 1455 | r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0) |
| 1456 | ticks = uintptr(r0) |
| 1457 | if e1 != 0 { |
| 1458 | err = errnoErr(e1) |
| 1459 | } |
| 1460 | return |
| 1461 | } |
| 1462 | |
| 1463 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1464 | |
| 1465 | func Umask(mask int) (oldmask int) { |
| 1466 | r0, _ := RawSyscallNoError(SYS_UMASK, uintptr(mask), 0, 0) |
| 1467 | oldmask = int(r0) |
| 1468 | return |
| 1469 | } |
| 1470 | |
| 1471 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1472 | |
| 1473 | func Uname(buf *Utsname) (err error) { |
| 1474 | _, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0) |
| 1475 | if e1 != 0 { |
| 1476 | err = errnoErr(e1) |
| 1477 | } |
| 1478 | return |
| 1479 | } |
| 1480 | |
| 1481 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1482 | |
| 1483 | func Unmount(target string, flags int) (err error) { |
| 1484 | var _p0 *byte |
| 1485 | _p0, err = BytePtrFromString(target) |
| 1486 | if err != nil { |
| 1487 | return |
| 1488 | } |
| 1489 | _, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 1490 | if e1 != 0 { |
| 1491 | err = errnoErr(e1) |
| 1492 | } |
| 1493 | return |
| 1494 | } |
| 1495 | |
| 1496 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1497 | |
| 1498 | func Unshare(flags int) (err error) { |
| 1499 | _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0) |
| 1500 | if e1 != 0 { |
| 1501 | err = errnoErr(e1) |
| 1502 | } |
| 1503 | return |
| 1504 | } |
| 1505 | |
| 1506 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1507 | |
| 1508 | func write(fd int, p []byte) (n int, err error) { |
| 1509 | var _p0 unsafe.Pointer |
| 1510 | if len(p) > 0 { |
| 1511 | _p0 = unsafe.Pointer(&p[0]) |
| 1512 | } else { |
| 1513 | _p0 = unsafe.Pointer(&_zero) |
| 1514 | } |
| 1515 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 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 exitThread(code int) (err error) { |
| 1526 | _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0) |
| 1527 | if e1 != 0 { |
| 1528 | err = errnoErr(e1) |
| 1529 | } |
| 1530 | return |
| 1531 | } |
| 1532 | |
| 1533 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1534 | |
| 1535 | func readlen(fd int, p *byte, np int) (n int, err error) { |
| 1536 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) |
| 1537 | n = int(r0) |
| 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 writelen(fd int, p *byte, np int) (n int, err error) { |
| 1547 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)) |
| 1548 | n = int(r0) |
| 1549 | if e1 != 0 { |
| 1550 | err = errnoErr(e1) |
| 1551 | } |
| 1552 | return |
| 1553 | } |
| 1554 | |
| 1555 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1556 | |
| 1557 | func munmap(addr uintptr, length uintptr) (err error) { |
| 1558 | _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) |
| 1559 | if e1 != 0 { |
| 1560 | err = errnoErr(e1) |
| 1561 | } |
| 1562 | return |
| 1563 | } |
| 1564 | |
| 1565 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1566 | |
| 1567 | func Madvise(b []byte, advice int) (err error) { |
| 1568 | var _p0 unsafe.Pointer |
| 1569 | if len(b) > 0 { |
| 1570 | _p0 = unsafe.Pointer(&b[0]) |
| 1571 | } else { |
| 1572 | _p0 = unsafe.Pointer(&_zero) |
| 1573 | } |
| 1574 | _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice)) |
| 1575 | if e1 != 0 { |
| 1576 | err = errnoErr(e1) |
| 1577 | } |
| 1578 | return |
| 1579 | } |
| 1580 | |
| 1581 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1582 | |
| 1583 | func Mprotect(b []byte, prot int) (err error) { |
| 1584 | var _p0 unsafe.Pointer |
| 1585 | if len(b) > 0 { |
| 1586 | _p0 = unsafe.Pointer(&b[0]) |
| 1587 | } else { |
| 1588 | _p0 = unsafe.Pointer(&_zero) |
| 1589 | } |
| 1590 | _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) |
| 1591 | if e1 != 0 { |
| 1592 | err = errnoErr(e1) |
| 1593 | } |
| 1594 | return |
| 1595 | } |
| 1596 | |
| 1597 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1598 | |
| 1599 | func Mlock(b []byte) (err error) { |
| 1600 | var _p0 unsafe.Pointer |
| 1601 | if len(b) > 0 { |
| 1602 | _p0 = unsafe.Pointer(&b[0]) |
| 1603 | } else { |
| 1604 | _p0 = unsafe.Pointer(&_zero) |
| 1605 | } |
| 1606 | _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 1607 | if e1 != 0 { |
| 1608 | err = errnoErr(e1) |
| 1609 | } |
| 1610 | return |
| 1611 | } |
| 1612 | |
| 1613 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1614 | |
| 1615 | func Mlockall(flags int) (err error) { |
| 1616 | _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) |
| 1617 | if e1 != 0 { |
| 1618 | err = errnoErr(e1) |
| 1619 | } |
| 1620 | return |
| 1621 | } |
| 1622 | |
| 1623 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1624 | |
| 1625 | func Msync(b []byte, flags int) (err error) { |
| 1626 | var _p0 unsafe.Pointer |
| 1627 | if len(b) > 0 { |
| 1628 | _p0 = unsafe.Pointer(&b[0]) |
| 1629 | } else { |
| 1630 | _p0 = unsafe.Pointer(&_zero) |
| 1631 | } |
| 1632 | _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) |
| 1633 | if e1 != 0 { |
| 1634 | err = errnoErr(e1) |
| 1635 | } |
| 1636 | return |
| 1637 | } |
| 1638 | |
| 1639 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1640 | |
| 1641 | func Munlock(b []byte) (err error) { |
| 1642 | var _p0 unsafe.Pointer |
| 1643 | if len(b) > 0 { |
| 1644 | _p0 = unsafe.Pointer(&b[0]) |
| 1645 | } else { |
| 1646 | _p0 = unsafe.Pointer(&_zero) |
| 1647 | } |
| 1648 | _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 1649 | if e1 != 0 { |
| 1650 | err = errnoErr(e1) |
| 1651 | } |
| 1652 | return |
| 1653 | } |
| 1654 | |
| 1655 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1656 | |
| 1657 | func Munlockall() (err error) { |
| 1658 | _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) |
| 1659 | if e1 != 0 { |
| 1660 | err = errnoErr(e1) |
| 1661 | } |
| 1662 | return |
| 1663 | } |
| 1664 | |
| 1665 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1666 | |
| 1667 | func faccessat(dirfd int, path string, mode uint32) (err error) { |
| 1668 | var _p0 *byte |
| 1669 | _p0, err = BytePtrFromString(path) |
| 1670 | if err != nil { |
| 1671 | return |
| 1672 | } |
| 1673 | _, _, e1 := Syscall(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1674 | if e1 != 0 { |
| 1675 | err = errnoErr(e1) |
| 1676 | } |
| 1677 | return |
| 1678 | } |
| 1679 | |
| 1680 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1681 | |
| 1682 | func nameToHandleAt(dirFD int, pathname string, fh *fileHandle, mountID *_C_int, flags int) (err error) { |
| 1683 | var _p0 *byte |
| 1684 | _p0, err = BytePtrFromString(pathname) |
| 1685 | if err != nil { |
| 1686 | return |
| 1687 | } |
| 1688 | _, _, e1 := Syscall6(SYS_NAME_TO_HANDLE_AT, uintptr(dirFD), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(fh)), uintptr(unsafe.Pointer(mountID)), uintptr(flags), 0) |
| 1689 | if e1 != 0 { |
| 1690 | err = errnoErr(e1) |
| 1691 | } |
| 1692 | return |
| 1693 | } |
| 1694 | |
| 1695 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1696 | |
| 1697 | func openByHandleAt(mountFD int, fh *fileHandle, flags int) (fd int, err error) { |
| 1698 | r0, _, e1 := Syscall(SYS_OPEN_BY_HANDLE_AT, uintptr(mountFD), uintptr(unsafe.Pointer(fh)), uintptr(flags)) |
| 1699 | fd = int(r0) |
| 1700 | if e1 != 0 { |
| 1701 | err = errnoErr(e1) |
| 1702 | } |
| 1703 | return |
| 1704 | } |
| 1705 | |
| 1706 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1707 | |
| 1708 | func Dup2(oldfd int, newfd int) (err error) { |
| 1709 | _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) |
| 1710 | if e1 != 0 { |
| 1711 | err = errnoErr(e1) |
| 1712 | } |
| 1713 | return |
| 1714 | } |
| 1715 | |
| 1716 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1717 | |
| 1718 | func EpollCreate(size int) (fd int, err error) { |
| 1719 | r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) |
| 1720 | fd = int(r0) |
| 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 EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { |
| 1730 | var _p0 unsafe.Pointer |
| 1731 | if len(events) > 0 { |
| 1732 | _p0 = unsafe.Pointer(&events[0]) |
| 1733 | } else { |
| 1734 | _p0 = unsafe.Pointer(&_zero) |
| 1735 | } |
| 1736 | r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) |
| 1737 | n = int(r0) |
| 1738 | if e1 != 0 { |
| 1739 | err = errnoErr(e1) |
| 1740 | } |
| 1741 | return |
| 1742 | } |
| 1743 | |
| 1744 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1745 | |
| 1746 | func Fadvise(fd int, offset int64, length int64, advice int) (err error) { |
| 1747 | _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) |
| 1748 | if e1 != 0 { |
| 1749 | err = errnoErr(e1) |
| 1750 | } |
| 1751 | return |
| 1752 | } |
| 1753 | |
| 1754 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1755 | |
| 1756 | func Fchown(fd int, uid int, gid int) (err error) { |
| 1757 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 1758 | if e1 != 0 { |
| 1759 | err = errnoErr(e1) |
| 1760 | } |
| 1761 | return |
| 1762 | } |
| 1763 | |
| 1764 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1765 | |
| 1766 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 1767 | _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 1768 | if e1 != 0 { |
| 1769 | err = errnoErr(e1) |
| 1770 | } |
| 1771 | return |
| 1772 | } |
| 1773 | |
| 1774 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1775 | |
| 1776 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { |
| 1777 | var _p0 *byte |
| 1778 | _p0, err = BytePtrFromString(path) |
| 1779 | if err != nil { |
| 1780 | return |
| 1781 | } |
| 1782 | _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| 1783 | if e1 != 0 { |
| 1784 | err = errnoErr(e1) |
| 1785 | } |
| 1786 | return |
| 1787 | } |
| 1788 | |
| 1789 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1790 | |
| 1791 | func Fstatfs(fd int, buf *Statfs_t) (err error) { |
| 1792 | _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) |
| 1793 | if e1 != 0 { |
| 1794 | err = errnoErr(e1) |
| 1795 | } |
| 1796 | return |
| 1797 | } |
| 1798 | |
| 1799 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1800 | |
| 1801 | func Ftruncate(fd int, length int64) (err error) { |
| 1802 | _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) |
| 1803 | if e1 != 0 { |
| 1804 | err = errnoErr(e1) |
| 1805 | } |
| 1806 | return |
| 1807 | } |
| 1808 | |
| 1809 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1810 | |
| 1811 | func Getegid() (egid int) { |
| 1812 | r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) |
| 1813 | egid = int(r0) |
| 1814 | return |
| 1815 | } |
| 1816 | |
| 1817 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1818 | |
| 1819 | func Geteuid() (euid int) { |
| 1820 | r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) |
| 1821 | euid = int(r0) |
| 1822 | return |
| 1823 | } |
| 1824 | |
| 1825 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1826 | |
| 1827 | func Getgid() (gid int) { |
| 1828 | r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) |
| 1829 | gid = int(r0) |
| 1830 | return |
| 1831 | } |
| 1832 | |
| 1833 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1834 | |
| 1835 | func Getrlimit(resource int, rlim *Rlimit) (err error) { |
| 1836 | _, _, e1 := RawSyscall(SYS_UGETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 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 Getuid() (uid int) { |
| 1846 | r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) |
| 1847 | uid = int(r0) |
| 1848 | return |
| 1849 | } |
| 1850 | |
| 1851 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1852 | |
| 1853 | func InotifyInit() (fd int, err error) { |
| 1854 | r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) |
| 1855 | fd = int(r0) |
| 1856 | if e1 != 0 { |
| 1857 | err = errnoErr(e1) |
| 1858 | } |
| 1859 | return |
| 1860 | } |
| 1861 | |
| 1862 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1863 | |
| 1864 | func Ioperm(from int, num int, on int) (err error) { |
| 1865 | _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) |
| 1866 | if e1 != 0 { |
| 1867 | err = errnoErr(e1) |
| 1868 | } |
| 1869 | return |
| 1870 | } |
| 1871 | |
| 1872 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1873 | |
| 1874 | func Iopl(level int) (err error) { |
| 1875 | _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) |
| 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 Lchown(path string, uid int, gid int) (err error) { |
| 1885 | var _p0 *byte |
| 1886 | _p0, err = BytePtrFromString(path) |
| 1887 | if err != nil { |
| 1888 | return |
| 1889 | } |
| 1890 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 1891 | if e1 != 0 { |
| 1892 | err = errnoErr(e1) |
| 1893 | } |
| 1894 | return |
| 1895 | } |
| 1896 | |
| 1897 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1898 | |
| 1899 | func Listen(s int, n int) (err error) { |
| 1900 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) |
| 1901 | if e1 != 0 { |
| 1902 | err = errnoErr(e1) |
| 1903 | } |
| 1904 | return |
| 1905 | } |
| 1906 | |
| 1907 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1908 | |
| 1909 | func Lstat(path string, stat *Stat_t) (err error) { |
| 1910 | var _p0 *byte |
| 1911 | _p0, err = BytePtrFromString(path) |
| 1912 | if err != nil { |
| 1913 | return |
| 1914 | } |
| 1915 | _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1916 | if e1 != 0 { |
| 1917 | err = errnoErr(e1) |
| 1918 | } |
| 1919 | return |
| 1920 | } |
| 1921 | |
| 1922 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1923 | |
| 1924 | func Pause() (err error) { |
| 1925 | _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) |
| 1926 | if e1 != 0 { |
| 1927 | err = errnoErr(e1) |
| 1928 | } |
| 1929 | return |
| 1930 | } |
| 1931 | |
| 1932 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1933 | |
| 1934 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 1935 | var _p0 unsafe.Pointer |
| 1936 | if len(p) > 0 { |
| 1937 | _p0 = unsafe.Pointer(&p[0]) |
| 1938 | } else { |
| 1939 | _p0 = unsafe.Pointer(&_zero) |
| 1940 | } |
| 1941 | r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 1942 | n = int(r0) |
| 1943 | if e1 != 0 { |
| 1944 | err = errnoErr(e1) |
| 1945 | } |
| 1946 | return |
| 1947 | } |
| 1948 | |
| 1949 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1950 | |
| 1951 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 1952 | var _p0 unsafe.Pointer |
| 1953 | if len(p) > 0 { |
| 1954 | _p0 = unsafe.Pointer(&p[0]) |
| 1955 | } else { |
| 1956 | _p0 = unsafe.Pointer(&_zero) |
| 1957 | } |
| 1958 | r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 1959 | n = int(r0) |
| 1960 | if e1 != 0 { |
| 1961 | err = errnoErr(e1) |
| 1962 | } |
| 1963 | return |
| 1964 | } |
| 1965 | |
| 1966 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1967 | |
| 1968 | func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { |
| 1969 | var _p0 *byte |
| 1970 | _p0, err = BytePtrFromString(oldpath) |
| 1971 | if err != nil { |
| 1972 | return |
| 1973 | } |
| 1974 | var _p1 *byte |
| 1975 | _p1, err = BytePtrFromString(newpath) |
| 1976 | if err != nil { |
| 1977 | return |
| 1978 | } |
| 1979 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 1980 | if e1 != 0 { |
| 1981 | err = errnoErr(e1) |
| 1982 | } |
| 1983 | return |
| 1984 | } |
| 1985 | |
| 1986 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1987 | |
| 1988 | func Seek(fd int, offset int64, whence int) (off int64, err error) { |
| 1989 | r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) |
| 1990 | off = int64(r0) |
| 1991 | if e1 != 0 { |
| 1992 | err = errnoErr(e1) |
| 1993 | } |
| 1994 | return |
| 1995 | } |
| 1996 | |
| 1997 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1998 | |
| 1999 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 2000 | r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| 2001 | n = int(r0) |
| 2002 | if e1 != 0 { |
| 2003 | err = errnoErr(e1) |
| 2004 | } |
| 2005 | return |
| 2006 | } |
| 2007 | |
| 2008 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2009 | |
| 2010 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
| 2011 | r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) |
| 2012 | written = int(r0) |
| 2013 | if e1 != 0 { |
| 2014 | err = errnoErr(e1) |
| 2015 | } |
| 2016 | return |
| 2017 | } |
| 2018 | |
| 2019 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2020 | |
| 2021 | func Setfsgid(gid int) (err error) { |
| 2022 | _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) |
| 2023 | if e1 != 0 { |
| 2024 | err = errnoErr(e1) |
| 2025 | } |
| 2026 | return |
| 2027 | } |
| 2028 | |
| 2029 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2030 | |
| 2031 | func Setfsuid(uid int) (err error) { |
| 2032 | _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) |
| 2033 | if e1 != 0 { |
| 2034 | err = errnoErr(e1) |
| 2035 | } |
| 2036 | return |
| 2037 | } |
| 2038 | |
| 2039 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2040 | |
| 2041 | func Setregid(rgid int, egid int) (err error) { |
| 2042 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 2043 | if e1 != 0 { |
| 2044 | err = errnoErr(e1) |
| 2045 | } |
| 2046 | return |
| 2047 | } |
| 2048 | |
| 2049 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2050 | |
| 2051 | func Setresgid(rgid int, egid int, sgid int) (err error) { |
| 2052 | _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) |
| 2053 | if e1 != 0 { |
| 2054 | err = errnoErr(e1) |
| 2055 | } |
| 2056 | return |
| 2057 | } |
| 2058 | |
| 2059 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2060 | |
| 2061 | func Setresuid(ruid int, euid int, suid int) (err error) { |
| 2062 | _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) |
| 2063 | if e1 != 0 { |
| 2064 | err = errnoErr(e1) |
| 2065 | } |
| 2066 | return |
| 2067 | } |
| 2068 | |
| 2069 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2070 | |
| 2071 | func Setrlimit(resource int, rlim *Rlimit) (err error) { |
| 2072 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 2073 | if e1 != 0 { |
| 2074 | err = errnoErr(e1) |
| 2075 | } |
| 2076 | return |
| 2077 | } |
| 2078 | |
| 2079 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2080 | |
| 2081 | func Setreuid(ruid int, euid int) (err error) { |
| 2082 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) |
| 2083 | if e1 != 0 { |
| 2084 | err = errnoErr(e1) |
| 2085 | } |
| 2086 | return |
| 2087 | } |
| 2088 | |
| 2089 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2090 | |
| 2091 | func Shutdown(fd int, how int) (err error) { |
| 2092 | _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) |
| 2093 | if e1 != 0 { |
| 2094 | err = errnoErr(e1) |
| 2095 | } |
| 2096 | return |
| 2097 | } |
| 2098 | |
| 2099 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2100 | |
| 2101 | func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { |
| 2102 | r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) |
| 2103 | n = int64(r0) |
| 2104 | if e1 != 0 { |
| 2105 | err = errnoErr(e1) |
| 2106 | } |
| 2107 | return |
| 2108 | } |
| 2109 | |
| 2110 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2111 | |
| 2112 | func Stat(path string, stat *Stat_t) (err error) { |
| 2113 | var _p0 *byte |
| 2114 | _p0, err = BytePtrFromString(path) |
| 2115 | if err != nil { |
| 2116 | return |
| 2117 | } |
| 2118 | _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 2119 | if e1 != 0 { |
| 2120 | err = errnoErr(e1) |
| 2121 | } |
| 2122 | return |
| 2123 | } |
| 2124 | |
| 2125 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2126 | |
| 2127 | func Statfs(path string, buf *Statfs_t) (err error) { |
| 2128 | var _p0 *byte |
| 2129 | _p0, err = BytePtrFromString(path) |
| 2130 | if err != nil { |
| 2131 | return |
| 2132 | } |
| 2133 | _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| 2134 | if e1 != 0 { |
| 2135 | err = errnoErr(e1) |
| 2136 | } |
| 2137 | return |
| 2138 | } |
| 2139 | |
| 2140 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2141 | |
| 2142 | func Truncate(path string, length int64) (err error) { |
| 2143 | var _p0 *byte |
| 2144 | _p0, err = BytePtrFromString(path) |
| 2145 | if err != nil { |
| 2146 | return |
| 2147 | } |
| 2148 | _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) |
| 2149 | if e1 != 0 { |
| 2150 | err = errnoErr(e1) |
| 2151 | } |
| 2152 | return |
| 2153 | } |
| 2154 | |
| 2155 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2156 | |
| 2157 | func Ustat(dev int, ubuf *Ustat_t) (err error) { |
| 2158 | _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) |
| 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 accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
| 2168 | r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 2169 | fd = int(r0) |
| 2170 | if e1 != 0 { |
| 2171 | err = errnoErr(e1) |
| 2172 | } |
| 2173 | return |
| 2174 | } |
| 2175 | |
| 2176 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2177 | |
| 2178 | func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { |
| 2179 | r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) |
| 2180 | fd = int(r0) |
| 2181 | if e1 != 0 { |
| 2182 | err = errnoErr(e1) |
| 2183 | } |
| 2184 | return |
| 2185 | } |
| 2186 | |
| 2187 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2188 | |
| 2189 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 2190 | _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 2191 | if e1 != 0 { |
| 2192 | err = errnoErr(e1) |
| 2193 | } |
| 2194 | return |
| 2195 | } |
| 2196 | |
| 2197 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2198 | |
| 2199 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 2200 | _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 2201 | if e1 != 0 { |
| 2202 | err = errnoErr(e1) |
| 2203 | } |
| 2204 | return |
| 2205 | } |
| 2206 | |
| 2207 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2208 | |
| 2209 | func getgroups(n int, list *_Gid_t) (nn int, err error) { |
| 2210 | r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 2211 | nn = int(r0) |
| 2212 | if e1 != 0 { |
| 2213 | err = errnoErr(e1) |
| 2214 | } |
| 2215 | return |
| 2216 | } |
| 2217 | |
| 2218 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2219 | |
| 2220 | func setgroups(n int, list *_Gid_t) (err error) { |
| 2221 | _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 2222 | if e1 != 0 { |
| 2223 | err = errnoErr(e1) |
| 2224 | } |
| 2225 | return |
| 2226 | } |
| 2227 | |
| 2228 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2229 | |
| 2230 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
| 2231 | _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) |
| 2232 | if e1 != 0 { |
| 2233 | err = errnoErr(e1) |
| 2234 | } |
| 2235 | return |
| 2236 | } |
| 2237 | |
| 2238 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2239 | |
| 2240 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
| 2241 | _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) |
| 2242 | if e1 != 0 { |
| 2243 | err = errnoErr(e1) |
| 2244 | } |
| 2245 | return |
| 2246 | } |
| 2247 | |
| 2248 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2249 | |
| 2250 | func socket(domain int, typ int, proto int) (fd int, err error) { |
| 2251 | r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) |
| 2252 | fd = int(r0) |
| 2253 | if e1 != 0 { |
| 2254 | err = errnoErr(e1) |
| 2255 | } |
| 2256 | return |
| 2257 | } |
| 2258 | |
| 2259 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2260 | |
| 2261 | func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
| 2262 | _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) |
| 2263 | if e1 != 0 { |
| 2264 | err = errnoErr(e1) |
| 2265 | } |
| 2266 | return |
| 2267 | } |
| 2268 | |
| 2269 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2270 | |
| 2271 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 2272 | _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 2273 | if e1 != 0 { |
| 2274 | err = errnoErr(e1) |
| 2275 | } |
| 2276 | return |
| 2277 | } |
| 2278 | |
| 2279 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2280 | |
| 2281 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 2282 | _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 2283 | if e1 != 0 { |
| 2284 | err = errnoErr(e1) |
| 2285 | } |
| 2286 | return |
| 2287 | } |
| 2288 | |
| 2289 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2290 | |
| 2291 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 2292 | var _p0 unsafe.Pointer |
| 2293 | if len(p) > 0 { |
| 2294 | _p0 = unsafe.Pointer(&p[0]) |
| 2295 | } else { |
| 2296 | _p0 = unsafe.Pointer(&_zero) |
| 2297 | } |
| 2298 | r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) |
| 2299 | n = int(r0) |
| 2300 | if e1 != 0 { |
| 2301 | err = errnoErr(e1) |
| 2302 | } |
| 2303 | return |
| 2304 | } |
| 2305 | |
| 2306 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2307 | |
| 2308 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 2309 | var _p0 unsafe.Pointer |
| 2310 | if len(buf) > 0 { |
| 2311 | _p0 = unsafe.Pointer(&buf[0]) |
| 2312 | } else { |
| 2313 | _p0 = unsafe.Pointer(&_zero) |
| 2314 | } |
| 2315 | _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) |
| 2316 | if e1 != 0 { |
| 2317 | err = errnoErr(e1) |
| 2318 | } |
| 2319 | return |
| 2320 | } |
| 2321 | |
| 2322 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2323 | |
| 2324 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 2325 | r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 2326 | n = int(r0) |
| 2327 | if e1 != 0 { |
| 2328 | err = errnoErr(e1) |
| 2329 | } |
| 2330 | return |
| 2331 | } |
| 2332 | |
| 2333 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2334 | |
| 2335 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 2336 | r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 2337 | n = int(r0) |
| 2338 | if e1 != 0 { |
| 2339 | err = errnoErr(e1) |
| 2340 | } |
| 2341 | return |
| 2342 | } |
| 2343 | |
| 2344 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2345 | |
| 2346 | func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { |
| 2347 | r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) |
| 2348 | xaddr = uintptr(r0) |
| 2349 | if e1 != 0 { |
| 2350 | err = errnoErr(e1) |
| 2351 | } |
| 2352 | return |
| 2353 | } |
| 2354 | |
| 2355 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2356 | |
| 2357 | func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { |
| 2358 | var _p0 *byte |
| 2359 | _p0, err = BytePtrFromString(path) |
| 2360 | if err != nil { |
| 2361 | return |
| 2362 | } |
| 2363 | _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) |
| 2364 | if e1 != 0 { |
| 2365 | err = errnoErr(e1) |
| 2366 | } |
| 2367 | return |
| 2368 | } |
| 2369 | |
| 2370 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2371 | |
| 2372 | func Gettimeofday(tv *Timeval) (err error) { |
| 2373 | _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| 2374 | if e1 != 0 { |
| 2375 | err = errnoErr(e1) |
| 2376 | } |
| 2377 | return |
| 2378 | } |
| 2379 | |
| 2380 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2381 | |
| 2382 | func Time(t *Time_t) (tt Time_t, err error) { |
| 2383 | r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0) |
| 2384 | tt = Time_t(r0) |
| 2385 | if e1 != 0 { |
| 2386 | err = errnoErr(e1) |
| 2387 | } |
| 2388 | return |
| 2389 | } |
| 2390 | |
| 2391 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2392 | |
| 2393 | func Utime(path string, buf *Utimbuf) (err error) { |
| 2394 | var _p0 *byte |
| 2395 | _p0, err = BytePtrFromString(path) |
| 2396 | if err != nil { |
| 2397 | return |
| 2398 | } |
| 2399 | _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| 2400 | if e1 != 0 { |
| 2401 | err = errnoErr(e1) |
| 2402 | } |
| 2403 | return |
| 2404 | } |
| 2405 | |
| 2406 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2407 | |
| 2408 | func utimes(path string, times *[2]Timeval) (err error) { |
| 2409 | var _p0 *byte |
| 2410 | _p0, err = BytePtrFromString(path) |
| 2411 | if err != nil { |
| 2412 | return |
| 2413 | } |
| 2414 | _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) |
| 2415 | if e1 != 0 { |
| 2416 | err = errnoErr(e1) |
| 2417 | } |
| 2418 | return |
| 2419 | } |
| 2420 | |
| 2421 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2422 | |
| 2423 | func pipe(p *[2]_C_int) (err error) { |
| 2424 | _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) |
| 2425 | if e1 != 0 { |
| 2426 | err = errnoErr(e1) |
| 2427 | } |
| 2428 | return |
| 2429 | } |
| 2430 | |
| 2431 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2432 | |
| 2433 | func pipe2(p *[2]_C_int, flags int) (err error) { |
| 2434 | _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) |
| 2435 | if e1 != 0 { |
| 2436 | err = errnoErr(e1) |
| 2437 | } |
| 2438 | return |
| 2439 | } |
| 2440 | |
| 2441 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2442 | |
| 2443 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 2444 | r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
| 2445 | n = int(r0) |
| 2446 | if e1 != 0 { |
| 2447 | err = errnoErr(e1) |
| 2448 | } |
| 2449 | return |
| 2450 | } |
| 2451 | |
| 2452 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2453 | |
| 2454 | func syncFileRange2(fd int, flags int, off int64, n int64) (err error) { |
| 2455 | _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE2, uintptr(fd), uintptr(flags), uintptr(off), uintptr(n), 0, 0) |
| 2456 | if e1 != 0 { |
| 2457 | err = errnoErr(e1) |
| 2458 | } |
| 2459 | return |
| 2460 | } |
| 2461 | |
| 2462 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 2463 | |
| 2464 | func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { |
| 2465 | var _p0 *byte |
| 2466 | _p0, err = BytePtrFromString(cmdline) |
| 2467 | if err != nil { |
| 2468 | return |
| 2469 | } |
| 2470 | _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 2471 | if e1 != 0 { |
| 2472 | err = errnoErr(e1) |
| 2473 | } |
| 2474 | return |
| 2475 | } |