Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | // go run mksyscall.go -tags linux,amd64 syscall_linux.go syscall_linux_amd64.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build linux,amd64 |
| 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 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 17 | func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) { |
| 18 | _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0) |
| 19 | if e1 != 0 { |
| 20 | err = errnoErr(e1) |
| 21 | } |
| 22 | return |
| 23 | } |
| 24 | |
| 25 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 26 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 27 | func Fallocate(fd int, mode uint32, off int64, len int64) (err error) { |
| 28 | _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0) |
| 29 | if e1 != 0 { |
| 30 | err = errnoErr(e1) |
| 31 | } |
| 32 | return |
| 33 | } |
| 34 | |
| 35 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 36 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 37 | func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) { |
| 38 | r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0) |
| 39 | n = int64(r0) |
| 40 | if e1 != 0 { |
| 41 | err = errnoErr(e1) |
| 42 | } |
| 43 | return |
| 44 | } |
| 45 | |
| 46 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 47 | |
Andrea Campanella | aec20bd | 2021-02-25 12:41:34 +0100 | [diff] [blame^] | 48 | func dup2(oldfd int, newfd int) (err error) { |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 49 | _, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0) |
| 50 | if e1 != 0 { |
| 51 | err = errnoErr(e1) |
| 52 | } |
| 53 | return |
| 54 | } |
| 55 | |
| 56 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 57 | |
| 58 | func EpollCreate(size int) (fd int, err error) { |
| 59 | r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0) |
| 60 | fd = int(r0) |
| 61 | if e1 != 0 { |
| 62 | err = errnoErr(e1) |
| 63 | } |
| 64 | return |
| 65 | } |
| 66 | |
| 67 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 68 | |
| 69 | func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) { |
| 70 | var _p0 unsafe.Pointer |
| 71 | if len(events) > 0 { |
| 72 | _p0 = unsafe.Pointer(&events[0]) |
| 73 | } else { |
| 74 | _p0 = unsafe.Pointer(&_zero) |
| 75 | } |
| 76 | r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0) |
| 77 | n = int(r0) |
| 78 | if e1 != 0 { |
| 79 | err = errnoErr(e1) |
| 80 | } |
| 81 | return |
| 82 | } |
| 83 | |
| 84 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 85 | |
| 86 | func Fadvise(fd int, offset int64, length int64, advice int) (err error) { |
| 87 | _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0) |
| 88 | if e1 != 0 { |
| 89 | err = errnoErr(e1) |
| 90 | } |
| 91 | return |
| 92 | } |
| 93 | |
| 94 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 95 | |
| 96 | func Fchown(fd int, uid int, gid int) (err error) { |
| 97 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 98 | if e1 != 0 { |
| 99 | err = errnoErr(e1) |
| 100 | } |
| 101 | return |
| 102 | } |
| 103 | |
| 104 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 105 | |
| 106 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 107 | _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 108 | if e1 != 0 { |
| 109 | err = errnoErr(e1) |
| 110 | } |
| 111 | return |
| 112 | } |
| 113 | |
| 114 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 115 | |
| 116 | func Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) { |
| 117 | var _p0 *byte |
| 118 | _p0, err = BytePtrFromString(path) |
| 119 | if err != nil { |
| 120 | return |
| 121 | } |
| 122 | _, _, e1 := Syscall6(SYS_NEWFSTATAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| 123 | if e1 != 0 { |
| 124 | err = errnoErr(e1) |
| 125 | } |
| 126 | return |
| 127 | } |
| 128 | |
| 129 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 130 | |
| 131 | func Fstatfs(fd int, buf *Statfs_t) (err error) { |
| 132 | _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0) |
| 133 | if e1 != 0 { |
| 134 | err = errnoErr(e1) |
| 135 | } |
| 136 | return |
| 137 | } |
| 138 | |
| 139 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 140 | |
| 141 | func Ftruncate(fd int, length int64) (err error) { |
| 142 | _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0) |
| 143 | if e1 != 0 { |
| 144 | err = errnoErr(e1) |
| 145 | } |
| 146 | return |
| 147 | } |
| 148 | |
| 149 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 150 | |
| 151 | func Getegid() (egid int) { |
| 152 | r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0) |
| 153 | egid = int(r0) |
| 154 | return |
| 155 | } |
| 156 | |
| 157 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 158 | |
| 159 | func Geteuid() (euid int) { |
| 160 | r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0) |
| 161 | euid = int(r0) |
| 162 | return |
| 163 | } |
| 164 | |
| 165 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 166 | |
| 167 | func Getgid() (gid int) { |
| 168 | r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0) |
| 169 | gid = int(r0) |
| 170 | return |
| 171 | } |
| 172 | |
| 173 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 174 | |
| 175 | func Getrlimit(resource int, rlim *Rlimit) (err error) { |
| 176 | _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 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 Getuid() (uid int) { |
| 186 | r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0) |
| 187 | uid = int(r0) |
| 188 | return |
| 189 | } |
| 190 | |
| 191 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 192 | |
| 193 | func inotifyInit() (fd int, err error) { |
| 194 | r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0) |
| 195 | fd = int(r0) |
| 196 | if e1 != 0 { |
| 197 | err = errnoErr(e1) |
| 198 | } |
| 199 | return |
| 200 | } |
| 201 | |
| 202 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 203 | |
| 204 | func Ioperm(from int, num int, on int) (err error) { |
| 205 | _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)) |
| 206 | if e1 != 0 { |
| 207 | err = errnoErr(e1) |
| 208 | } |
| 209 | return |
| 210 | } |
| 211 | |
| 212 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 213 | |
| 214 | func Iopl(level int) (err error) { |
| 215 | _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0) |
| 216 | if e1 != 0 { |
| 217 | err = errnoErr(e1) |
| 218 | } |
| 219 | return |
| 220 | } |
| 221 | |
| 222 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 223 | |
| 224 | func Lchown(path string, uid int, gid int) (err error) { |
| 225 | var _p0 *byte |
| 226 | _p0, err = BytePtrFromString(path) |
| 227 | if err != nil { |
| 228 | return |
| 229 | } |
| 230 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 231 | if e1 != 0 { |
| 232 | err = errnoErr(e1) |
| 233 | } |
| 234 | return |
| 235 | } |
| 236 | |
| 237 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 238 | |
| 239 | func Listen(s int, n int) (err error) { |
| 240 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0) |
| 241 | if e1 != 0 { |
| 242 | err = errnoErr(e1) |
| 243 | } |
| 244 | return |
| 245 | } |
| 246 | |
| 247 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 248 | |
| 249 | func Pause() (err error) { |
| 250 | _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0) |
| 251 | if e1 != 0 { |
| 252 | err = errnoErr(e1) |
| 253 | } |
| 254 | return |
| 255 | } |
| 256 | |
| 257 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 258 | |
| 259 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 260 | var _p0 unsafe.Pointer |
| 261 | if len(p) > 0 { |
| 262 | _p0 = unsafe.Pointer(&p[0]) |
| 263 | } else { |
| 264 | _p0 = unsafe.Pointer(&_zero) |
| 265 | } |
| 266 | r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 267 | n = int(r0) |
| 268 | if e1 != 0 { |
| 269 | err = errnoErr(e1) |
| 270 | } |
| 271 | return |
| 272 | } |
| 273 | |
| 274 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 275 | |
| 276 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 277 | var _p0 unsafe.Pointer |
| 278 | if len(p) > 0 { |
| 279 | _p0 = unsafe.Pointer(&p[0]) |
| 280 | } else { |
| 281 | _p0 = unsafe.Pointer(&_zero) |
| 282 | } |
| 283 | r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 284 | n = int(r0) |
| 285 | if e1 != 0 { |
| 286 | err = errnoErr(e1) |
| 287 | } |
| 288 | return |
| 289 | } |
| 290 | |
| 291 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 292 | |
| 293 | func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) { |
| 294 | var _p0 *byte |
| 295 | _p0, err = BytePtrFromString(oldpath) |
| 296 | if err != nil { |
| 297 | return |
| 298 | } |
| 299 | var _p1 *byte |
| 300 | _p1, err = BytePtrFromString(newpath) |
| 301 | if err != nil { |
| 302 | return |
| 303 | } |
| 304 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 305 | if e1 != 0 { |
| 306 | err = errnoErr(e1) |
| 307 | } |
| 308 | return |
| 309 | } |
| 310 | |
| 311 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 312 | |
| 313 | func Seek(fd int, offset int64, whence int) (off int64, err error) { |
| 314 | r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) |
| 315 | off = int64(r0) |
| 316 | if e1 != 0 { |
| 317 | err = errnoErr(e1) |
| 318 | } |
| 319 | return |
| 320 | } |
| 321 | |
| 322 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 323 | |
| 324 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
| 325 | r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0) |
| 326 | written = int(r0) |
| 327 | if e1 != 0 { |
| 328 | err = errnoErr(e1) |
| 329 | } |
| 330 | return |
| 331 | } |
| 332 | |
| 333 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 334 | |
| 335 | func setfsgid(gid int) (prev int, err error) { |
| 336 | r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0) |
| 337 | prev = int(r0) |
| 338 | if e1 != 0 { |
| 339 | err = errnoErr(e1) |
| 340 | } |
| 341 | return |
| 342 | } |
| 343 | |
| 344 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 345 | |
| 346 | func setfsuid(uid int) (prev int, err error) { |
| 347 | r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0) |
| 348 | prev = int(r0) |
| 349 | if e1 != 0 { |
| 350 | err = errnoErr(e1) |
| 351 | } |
| 352 | return |
| 353 | } |
| 354 | |
| 355 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 356 | |
| 357 | func Setregid(rgid int, egid int) (err error) { |
| 358 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 359 | if e1 != 0 { |
| 360 | err = errnoErr(e1) |
| 361 | } |
| 362 | return |
| 363 | } |
| 364 | |
| 365 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 366 | |
| 367 | func Setresgid(rgid int, egid int, sgid int) (err error) { |
| 368 | _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) |
| 369 | if e1 != 0 { |
| 370 | err = errnoErr(e1) |
| 371 | } |
| 372 | return |
| 373 | } |
| 374 | |
| 375 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 376 | |
| 377 | func Setresuid(ruid int, euid int, suid int) (err error) { |
| 378 | _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) |
| 379 | if e1 != 0 { |
| 380 | err = errnoErr(e1) |
| 381 | } |
| 382 | return |
| 383 | } |
| 384 | |
| 385 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 386 | |
| 387 | func Setrlimit(resource int, rlim *Rlimit) (err error) { |
| 388 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0) |
| 389 | if e1 != 0 { |
| 390 | err = errnoErr(e1) |
| 391 | } |
| 392 | return |
| 393 | } |
| 394 | |
| 395 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 396 | |
| 397 | func Setreuid(ruid int, euid int) (err error) { |
| 398 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) |
| 399 | if e1 != 0 { |
| 400 | err = errnoErr(e1) |
| 401 | } |
| 402 | return |
| 403 | } |
| 404 | |
| 405 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 406 | |
| 407 | func Shutdown(fd int, how int) (err error) { |
| 408 | _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0) |
| 409 | if e1 != 0 { |
| 410 | err = errnoErr(e1) |
| 411 | } |
| 412 | return |
| 413 | } |
| 414 | |
| 415 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 416 | |
| 417 | func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) { |
| 418 | r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)) |
| 419 | n = int64(r0) |
| 420 | if e1 != 0 { |
| 421 | err = errnoErr(e1) |
| 422 | } |
| 423 | return |
| 424 | } |
| 425 | |
| 426 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 427 | |
| 428 | func Statfs(path string, buf *Statfs_t) (err error) { |
| 429 | var _p0 *byte |
| 430 | _p0, err = BytePtrFromString(path) |
| 431 | if err != nil { |
| 432 | return |
| 433 | } |
| 434 | _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| 435 | if e1 != 0 { |
| 436 | err = errnoErr(e1) |
| 437 | } |
| 438 | return |
| 439 | } |
| 440 | |
| 441 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 442 | |
| 443 | func SyncFileRange(fd int, off int64, n int64, flags int) (err error) { |
| 444 | _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0) |
| 445 | if e1 != 0 { |
| 446 | err = errnoErr(e1) |
| 447 | } |
| 448 | return |
| 449 | } |
| 450 | |
| 451 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 452 | |
| 453 | func Truncate(path string, length int64) (err error) { |
| 454 | var _p0 *byte |
| 455 | _p0, err = BytePtrFromString(path) |
| 456 | if err != nil { |
| 457 | return |
| 458 | } |
| 459 | _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0) |
| 460 | if e1 != 0 { |
| 461 | err = errnoErr(e1) |
| 462 | } |
| 463 | return |
| 464 | } |
| 465 | |
| 466 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 467 | |
| 468 | func Ustat(dev int, ubuf *Ustat_t) (err error) { |
| 469 | _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0) |
| 470 | if e1 != 0 { |
| 471 | err = errnoErr(e1) |
| 472 | } |
| 473 | return |
| 474 | } |
| 475 | |
| 476 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 477 | |
| 478 | func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
| 479 | r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 480 | fd = int(r0) |
| 481 | if e1 != 0 { |
| 482 | err = errnoErr(e1) |
| 483 | } |
| 484 | return |
| 485 | } |
| 486 | |
| 487 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 488 | |
| 489 | func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) { |
| 490 | r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0) |
| 491 | fd = int(r0) |
| 492 | if e1 != 0 { |
| 493 | err = errnoErr(e1) |
| 494 | } |
| 495 | return |
| 496 | } |
| 497 | |
| 498 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 499 | |
| 500 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 501 | _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 502 | if e1 != 0 { |
| 503 | err = errnoErr(e1) |
| 504 | } |
| 505 | return |
| 506 | } |
| 507 | |
| 508 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 509 | |
| 510 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 511 | _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 512 | if e1 != 0 { |
| 513 | err = errnoErr(e1) |
| 514 | } |
| 515 | return |
| 516 | } |
| 517 | |
| 518 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 519 | |
| 520 | func getgroups(n int, list *_Gid_t) (nn int, err error) { |
| 521 | r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 522 | nn = int(r0) |
| 523 | if e1 != 0 { |
| 524 | err = errnoErr(e1) |
| 525 | } |
| 526 | return |
| 527 | } |
| 528 | |
| 529 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 530 | |
| 531 | func setgroups(n int, list *_Gid_t) (err error) { |
| 532 | _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0) |
| 533 | if e1 != 0 { |
| 534 | err = errnoErr(e1) |
| 535 | } |
| 536 | return |
| 537 | } |
| 538 | |
| 539 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 540 | |
| 541 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
| 542 | _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) |
| 543 | if e1 != 0 { |
| 544 | err = errnoErr(e1) |
| 545 | } |
| 546 | return |
| 547 | } |
| 548 | |
| 549 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 550 | |
| 551 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
| 552 | _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) |
| 553 | if e1 != 0 { |
| 554 | err = errnoErr(e1) |
| 555 | } |
| 556 | return |
| 557 | } |
| 558 | |
| 559 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 560 | |
| 561 | func socket(domain int, typ int, proto int) (fd int, err error) { |
| 562 | r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) |
| 563 | fd = int(r0) |
| 564 | if e1 != 0 { |
| 565 | err = errnoErr(e1) |
| 566 | } |
| 567 | return |
| 568 | } |
| 569 | |
| 570 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 571 | |
| 572 | func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
| 573 | _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0) |
| 574 | if e1 != 0 { |
| 575 | err = errnoErr(e1) |
| 576 | } |
| 577 | return |
| 578 | } |
| 579 | |
| 580 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 581 | |
| 582 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 583 | _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 584 | if e1 != 0 { |
| 585 | err = errnoErr(e1) |
| 586 | } |
| 587 | return |
| 588 | } |
| 589 | |
| 590 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 591 | |
| 592 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 593 | _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 594 | if e1 != 0 { |
| 595 | err = errnoErr(e1) |
| 596 | } |
| 597 | return |
| 598 | } |
| 599 | |
| 600 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 601 | |
| 602 | func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 603 | var _p0 unsafe.Pointer |
| 604 | if len(p) > 0 { |
| 605 | _p0 = unsafe.Pointer(&p[0]) |
| 606 | } else { |
| 607 | _p0 = unsafe.Pointer(&_zero) |
| 608 | } |
| 609 | r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) |
| 610 | n = int(r0) |
| 611 | if e1 != 0 { |
| 612 | err = errnoErr(e1) |
| 613 | } |
| 614 | return |
| 615 | } |
| 616 | |
| 617 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 618 | |
| 619 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 620 | var _p0 unsafe.Pointer |
| 621 | if len(buf) > 0 { |
| 622 | _p0 = unsafe.Pointer(&buf[0]) |
| 623 | } else { |
| 624 | _p0 = unsafe.Pointer(&_zero) |
| 625 | } |
| 626 | _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) |
| 627 | if e1 != 0 { |
| 628 | err = errnoErr(e1) |
| 629 | } |
| 630 | return |
| 631 | } |
| 632 | |
| 633 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 634 | |
| 635 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 636 | r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 637 | n = int(r0) |
| 638 | if e1 != 0 { |
| 639 | err = errnoErr(e1) |
| 640 | } |
| 641 | return |
| 642 | } |
| 643 | |
| 644 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 645 | |
| 646 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 647 | r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 648 | n = int(r0) |
| 649 | if e1 != 0 { |
| 650 | err = errnoErr(e1) |
| 651 | } |
| 652 | return |
| 653 | } |
| 654 | |
| 655 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 656 | |
| 657 | func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) { |
| 658 | r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)) |
| 659 | xaddr = uintptr(r0) |
| 660 | if e1 != 0 { |
| 661 | err = errnoErr(e1) |
| 662 | } |
| 663 | return |
| 664 | } |
| 665 | |
| 666 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 667 | |
| 668 | func futimesat(dirfd int, path string, times *[2]Timeval) (err error) { |
| 669 | var _p0 *byte |
| 670 | _p0, err = BytePtrFromString(path) |
| 671 | if err != nil { |
| 672 | return |
| 673 | } |
| 674 | _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times))) |
| 675 | if e1 != 0 { |
| 676 | err = errnoErr(e1) |
| 677 | } |
| 678 | return |
| 679 | } |
| 680 | |
| 681 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 682 | |
| 683 | func Utime(path string, buf *Utimbuf) (err error) { |
| 684 | var _p0 *byte |
| 685 | _p0, err = BytePtrFromString(path) |
| 686 | if err != nil { |
| 687 | return |
| 688 | } |
| 689 | _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0) |
| 690 | if e1 != 0 { |
| 691 | err = errnoErr(e1) |
| 692 | } |
| 693 | return |
| 694 | } |
| 695 | |
| 696 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 697 | |
| 698 | func utimes(path string, times *[2]Timeval) (err error) { |
| 699 | var _p0 *byte |
| 700 | _p0, err = BytePtrFromString(path) |
| 701 | if err != nil { |
| 702 | return |
| 703 | } |
| 704 | _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0) |
| 705 | if e1 != 0 { |
| 706 | err = errnoErr(e1) |
| 707 | } |
| 708 | return |
| 709 | } |
| 710 | |
| 711 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 712 | |
| 713 | func pipe(p *[2]_C_int) (err error) { |
| 714 | _, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0) |
| 715 | if e1 != 0 { |
| 716 | err = errnoErr(e1) |
| 717 | } |
| 718 | return |
| 719 | } |
| 720 | |
| 721 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 722 | |
Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 723 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 724 | r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
| 725 | n = int(r0) |
| 726 | if e1 != 0 { |
| 727 | err = errnoErr(e1) |
| 728 | } |
| 729 | return |
| 730 | } |
| 731 | |
| 732 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 733 | |
| 734 | func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) { |
| 735 | var _p0 *byte |
| 736 | _p0, err = BytePtrFromString(cmdline) |
| 737 | if err != nil { |
| 738 | return |
| 739 | } |
| 740 | _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 741 | if e1 != 0 { |
| 742 | err = errnoErr(e1) |
| 743 | } |
| 744 | return |
| 745 | } |