Matteo Scandolo | a428586 | 2020-12-01 18:10:10 -0800 | [diff] [blame^] | 1 | // go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build openbsd,arm64 |
| 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 getgroups(ngid int, gid *_Gid_t) (n int, err error) { |
| 18 | r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0) |
| 19 | n = 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 setgroups(ngid int, gid *_Gid_t) (err error) { |
| 29 | _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 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 wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) { |
| 39 | r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0) |
| 40 | wpid = int(r0) |
| 41 | if e1 != 0 { |
| 42 | err = errnoErr(e1) |
| 43 | } |
| 44 | return |
| 45 | } |
| 46 | |
| 47 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 48 | |
| 49 | func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) { |
| 50 | r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 51 | fd = int(r0) |
| 52 | if e1 != 0 { |
| 53 | err = errnoErr(e1) |
| 54 | } |
| 55 | return |
| 56 | } |
| 57 | |
| 58 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 59 | |
| 60 | func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 61 | _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 62 | if e1 != 0 { |
| 63 | err = errnoErr(e1) |
| 64 | } |
| 65 | return |
| 66 | } |
| 67 | |
| 68 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 69 | |
| 70 | func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) { |
| 71 | _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)) |
| 72 | if e1 != 0 { |
| 73 | err = errnoErr(e1) |
| 74 | } |
| 75 | return |
| 76 | } |
| 77 | |
| 78 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 79 | |
| 80 | func socket(domain int, typ int, proto int) (fd int, err error) { |
| 81 | r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)) |
| 82 | fd = int(r0) |
| 83 | if e1 != 0 { |
| 84 | err = errnoErr(e1) |
| 85 | } |
| 86 | return |
| 87 | } |
| 88 | |
| 89 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 90 | |
| 91 | func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) { |
| 92 | _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0) |
| 93 | if e1 != 0 { |
| 94 | err = errnoErr(e1) |
| 95 | } |
| 96 | return |
| 97 | } |
| 98 | |
| 99 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 100 | |
| 101 | func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) { |
| 102 | _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0) |
| 103 | if e1 != 0 { |
| 104 | err = errnoErr(e1) |
| 105 | } |
| 106 | return |
| 107 | } |
| 108 | |
| 109 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 110 | |
| 111 | func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 112 | _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 113 | if e1 != 0 { |
| 114 | err = errnoErr(e1) |
| 115 | } |
| 116 | return |
| 117 | } |
| 118 | |
| 119 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 120 | |
| 121 | func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) { |
| 122 | _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))) |
| 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 Shutdown(s int, how int) (err error) { |
| 132 | _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 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 socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) { |
| 142 | _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 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 recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) { |
| 152 | var _p0 unsafe.Pointer |
| 153 | if len(p) > 0 { |
| 154 | _p0 = unsafe.Pointer(&p[0]) |
| 155 | } else { |
| 156 | _p0 = unsafe.Pointer(&_zero) |
| 157 | } |
| 158 | r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))) |
| 159 | n = int(r0) |
| 160 | if e1 != 0 { |
| 161 | err = errnoErr(e1) |
| 162 | } |
| 163 | return |
| 164 | } |
| 165 | |
| 166 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 167 | |
| 168 | func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) { |
| 169 | var _p0 unsafe.Pointer |
| 170 | if len(buf) > 0 { |
| 171 | _p0 = unsafe.Pointer(&buf[0]) |
| 172 | } else { |
| 173 | _p0 = unsafe.Pointer(&_zero) |
| 174 | } |
| 175 | _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen)) |
| 176 | if e1 != 0 { |
| 177 | err = errnoErr(e1) |
| 178 | } |
| 179 | return |
| 180 | } |
| 181 | |
| 182 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 183 | |
| 184 | func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 185 | r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 186 | n = int(r0) |
| 187 | if e1 != 0 { |
| 188 | err = errnoErr(e1) |
| 189 | } |
| 190 | return |
| 191 | } |
| 192 | |
| 193 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 194 | |
| 195 | func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) { |
| 196 | r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)) |
| 197 | n = int(r0) |
| 198 | if e1 != 0 { |
| 199 | err = errnoErr(e1) |
| 200 | } |
| 201 | return |
| 202 | } |
| 203 | |
| 204 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 205 | |
| 206 | func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) { |
| 207 | r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))) |
| 208 | n = int(r0) |
| 209 | if e1 != 0 { |
| 210 | err = errnoErr(e1) |
| 211 | } |
| 212 | return |
| 213 | } |
| 214 | |
| 215 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 216 | |
| 217 | func utimes(path string, timeval *[2]Timeval) (err error) { |
| 218 | var _p0 *byte |
| 219 | _p0, err = BytePtrFromString(path) |
| 220 | if err != nil { |
| 221 | return |
| 222 | } |
| 223 | _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0) |
| 224 | if e1 != 0 { |
| 225 | err = errnoErr(e1) |
| 226 | } |
| 227 | return |
| 228 | } |
| 229 | |
| 230 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 231 | |
| 232 | func futimes(fd int, timeval *[2]Timeval) (err error) { |
| 233 | _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0) |
| 234 | if e1 != 0 { |
| 235 | err = errnoErr(e1) |
| 236 | } |
| 237 | return |
| 238 | } |
| 239 | |
| 240 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 241 | |
| 242 | func poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 243 | r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
| 244 | n = int(r0) |
| 245 | if e1 != 0 { |
| 246 | err = errnoErr(e1) |
| 247 | } |
| 248 | return |
| 249 | } |
| 250 | |
| 251 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 252 | |
| 253 | func Madvise(b []byte, behav int) (err error) { |
| 254 | var _p0 unsafe.Pointer |
| 255 | if len(b) > 0 { |
| 256 | _p0 = unsafe.Pointer(&b[0]) |
| 257 | } else { |
| 258 | _p0 = unsafe.Pointer(&_zero) |
| 259 | } |
| 260 | _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) |
| 261 | if e1 != 0 { |
| 262 | err = errnoErr(e1) |
| 263 | } |
| 264 | return |
| 265 | } |
| 266 | |
| 267 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 268 | |
| 269 | func Mlock(b []byte) (err error) { |
| 270 | var _p0 unsafe.Pointer |
| 271 | if len(b) > 0 { |
| 272 | _p0 = unsafe.Pointer(&b[0]) |
| 273 | } else { |
| 274 | _p0 = unsafe.Pointer(&_zero) |
| 275 | } |
| 276 | _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 277 | if e1 != 0 { |
| 278 | err = errnoErr(e1) |
| 279 | } |
| 280 | return |
| 281 | } |
| 282 | |
| 283 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 284 | |
| 285 | func Mlockall(flags int) (err error) { |
| 286 | _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) |
| 287 | if e1 != 0 { |
| 288 | err = errnoErr(e1) |
| 289 | } |
| 290 | return |
| 291 | } |
| 292 | |
| 293 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 294 | |
| 295 | func Mprotect(b []byte, prot int) (err error) { |
| 296 | var _p0 unsafe.Pointer |
| 297 | if len(b) > 0 { |
| 298 | _p0 = unsafe.Pointer(&b[0]) |
| 299 | } else { |
| 300 | _p0 = unsafe.Pointer(&_zero) |
| 301 | } |
| 302 | _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) |
| 303 | if e1 != 0 { |
| 304 | err = errnoErr(e1) |
| 305 | } |
| 306 | return |
| 307 | } |
| 308 | |
| 309 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 310 | |
| 311 | func Msync(b []byte, flags int) (err error) { |
| 312 | var _p0 unsafe.Pointer |
| 313 | if len(b) > 0 { |
| 314 | _p0 = unsafe.Pointer(&b[0]) |
| 315 | } else { |
| 316 | _p0 = unsafe.Pointer(&_zero) |
| 317 | } |
| 318 | _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) |
| 319 | if e1 != 0 { |
| 320 | err = errnoErr(e1) |
| 321 | } |
| 322 | return |
| 323 | } |
| 324 | |
| 325 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 326 | |
| 327 | func Munlock(b []byte) (err error) { |
| 328 | var _p0 unsafe.Pointer |
| 329 | if len(b) > 0 { |
| 330 | _p0 = unsafe.Pointer(&b[0]) |
| 331 | } else { |
| 332 | _p0 = unsafe.Pointer(&_zero) |
| 333 | } |
| 334 | _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 335 | if e1 != 0 { |
| 336 | err = errnoErr(e1) |
| 337 | } |
| 338 | return |
| 339 | } |
| 340 | |
| 341 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 342 | |
| 343 | func Munlockall() (err error) { |
| 344 | _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) |
| 345 | if e1 != 0 { |
| 346 | err = errnoErr(e1) |
| 347 | } |
| 348 | return |
| 349 | } |
| 350 | |
| 351 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 352 | |
| 353 | func pipe2(p *[2]_C_int, flags int) (err error) { |
| 354 | _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0) |
| 355 | if e1 != 0 { |
| 356 | err = errnoErr(e1) |
| 357 | } |
| 358 | return |
| 359 | } |
| 360 | |
| 361 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 362 | |
| 363 | func Getdents(fd int, buf []byte) (n int, err error) { |
| 364 | var _p0 unsafe.Pointer |
| 365 | if len(buf) > 0 { |
| 366 | _p0 = unsafe.Pointer(&buf[0]) |
| 367 | } else { |
| 368 | _p0 = unsafe.Pointer(&_zero) |
| 369 | } |
| 370 | r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) |
| 371 | n = int(r0) |
| 372 | if e1 != 0 { |
| 373 | err = errnoErr(e1) |
| 374 | } |
| 375 | return |
| 376 | } |
| 377 | |
| 378 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 379 | |
| 380 | func Getcwd(buf []byte) (n int, err error) { |
| 381 | var _p0 unsafe.Pointer |
| 382 | if len(buf) > 0 { |
| 383 | _p0 = unsafe.Pointer(&buf[0]) |
| 384 | } else { |
| 385 | _p0 = unsafe.Pointer(&_zero) |
| 386 | } |
| 387 | r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) |
| 388 | n = int(r0) |
| 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 ioctl(fd int, req uint, arg uintptr) (err error) { |
| 398 | _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) |
| 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 sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
| 408 | var _p0 unsafe.Pointer |
| 409 | if len(mib) > 0 { |
| 410 | _p0 = unsafe.Pointer(&mib[0]) |
| 411 | } else { |
| 412 | _p0 = unsafe.Pointer(&_zero) |
| 413 | } |
| 414 | _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) |
| 415 | if e1 != 0 { |
| 416 | err = errnoErr(e1) |
| 417 | } |
| 418 | return |
| 419 | } |
| 420 | |
| 421 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 422 | |
| 423 | func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) { |
| 424 | r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0) |
| 425 | n = int(r0) |
| 426 | if e1 != 0 { |
| 427 | err = errnoErr(e1) |
| 428 | } |
| 429 | return |
| 430 | } |
| 431 | |
| 432 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 433 | |
| 434 | func Access(path string, mode uint32) (err error) { |
| 435 | var _p0 *byte |
| 436 | _p0, err = BytePtrFromString(path) |
| 437 | if err != nil { |
| 438 | return |
| 439 | } |
| 440 | _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 441 | if e1 != 0 { |
| 442 | err = errnoErr(e1) |
| 443 | } |
| 444 | return |
| 445 | } |
| 446 | |
| 447 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 448 | |
| 449 | func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { |
| 450 | _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) |
| 451 | if e1 != 0 { |
| 452 | err = errnoErr(e1) |
| 453 | } |
| 454 | return |
| 455 | } |
| 456 | |
| 457 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 458 | |
| 459 | func Chdir(path string) (err error) { |
| 460 | var _p0 *byte |
| 461 | _p0, err = BytePtrFromString(path) |
| 462 | if err != nil { |
| 463 | return |
| 464 | } |
| 465 | _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 466 | if e1 != 0 { |
| 467 | err = errnoErr(e1) |
| 468 | } |
| 469 | return |
| 470 | } |
| 471 | |
| 472 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 473 | |
| 474 | func Chflags(path string, flags int) (err error) { |
| 475 | var _p0 *byte |
| 476 | _p0, err = BytePtrFromString(path) |
| 477 | if err != nil { |
| 478 | return |
| 479 | } |
| 480 | _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 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 Chmod(path string, mode uint32) (err error) { |
| 490 | var _p0 *byte |
| 491 | _p0, err = BytePtrFromString(path) |
| 492 | if err != nil { |
| 493 | return |
| 494 | } |
| 495 | _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 496 | if e1 != 0 { |
| 497 | err = errnoErr(e1) |
| 498 | } |
| 499 | return |
| 500 | } |
| 501 | |
| 502 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 503 | |
| 504 | func Chown(path string, uid int, gid int) (err error) { |
| 505 | var _p0 *byte |
| 506 | _p0, err = BytePtrFromString(path) |
| 507 | if err != nil { |
| 508 | return |
| 509 | } |
| 510 | _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 511 | if e1 != 0 { |
| 512 | err = errnoErr(e1) |
| 513 | } |
| 514 | return |
| 515 | } |
| 516 | |
| 517 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 518 | |
| 519 | func Chroot(path string) (err error) { |
| 520 | var _p0 *byte |
| 521 | _p0, err = BytePtrFromString(path) |
| 522 | if err != nil { |
| 523 | return |
| 524 | } |
| 525 | _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 526 | if e1 != 0 { |
| 527 | err = errnoErr(e1) |
| 528 | } |
| 529 | return |
| 530 | } |
| 531 | |
| 532 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 533 | |
| 534 | func Close(fd int) (err error) { |
| 535 | _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) |
| 536 | if e1 != 0 { |
| 537 | err = errnoErr(e1) |
| 538 | } |
| 539 | return |
| 540 | } |
| 541 | |
| 542 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 543 | |
| 544 | func Dup(fd int) (nfd int, err error) { |
| 545 | r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) |
| 546 | nfd = int(r0) |
| 547 | if e1 != 0 { |
| 548 | err = errnoErr(e1) |
| 549 | } |
| 550 | return |
| 551 | } |
| 552 | |
| 553 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 554 | |
| 555 | func Dup2(from int, to int) (err error) { |
| 556 | _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) |
| 557 | if e1 != 0 { |
| 558 | err = errnoErr(e1) |
| 559 | } |
| 560 | return |
| 561 | } |
| 562 | |
| 563 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 564 | |
| 565 | func Dup3(from int, to int, flags int) (err error) { |
| 566 | _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) |
| 567 | if e1 != 0 { |
| 568 | err = errnoErr(e1) |
| 569 | } |
| 570 | return |
| 571 | } |
| 572 | |
| 573 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 574 | |
| 575 | func Exit(code int) { |
| 576 | Syscall(SYS_EXIT, uintptr(code), 0, 0) |
| 577 | return |
| 578 | } |
| 579 | |
| 580 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 581 | |
| 582 | func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 583 | var _p0 *byte |
| 584 | _p0, err = BytePtrFromString(path) |
| 585 | if err != nil { |
| 586 | return |
| 587 | } |
| 588 | _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 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 Fchdir(fd int) (err error) { |
| 598 | _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) |
| 599 | if e1 != 0 { |
| 600 | err = errnoErr(e1) |
| 601 | } |
| 602 | return |
| 603 | } |
| 604 | |
| 605 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 606 | |
| 607 | func Fchflags(fd int, flags int) (err error) { |
| 608 | _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) |
| 609 | if e1 != 0 { |
| 610 | err = errnoErr(e1) |
| 611 | } |
| 612 | return |
| 613 | } |
| 614 | |
| 615 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 616 | |
| 617 | func Fchmod(fd int, mode uint32) (err error) { |
| 618 | _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) |
| 619 | if e1 != 0 { |
| 620 | err = errnoErr(e1) |
| 621 | } |
| 622 | return |
| 623 | } |
| 624 | |
| 625 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 626 | |
| 627 | func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 628 | var _p0 *byte |
| 629 | _p0, err = BytePtrFromString(path) |
| 630 | if err != nil { |
| 631 | return |
| 632 | } |
| 633 | _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
| 634 | if e1 != 0 { |
| 635 | err = errnoErr(e1) |
| 636 | } |
| 637 | return |
| 638 | } |
| 639 | |
| 640 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 641 | |
| 642 | func Fchown(fd int, uid int, gid int) (err error) { |
| 643 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 644 | if e1 != 0 { |
| 645 | err = errnoErr(e1) |
| 646 | } |
| 647 | return |
| 648 | } |
| 649 | |
| 650 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 651 | |
| 652 | func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 653 | var _p0 *byte |
| 654 | _p0, err = BytePtrFromString(path) |
| 655 | if err != nil { |
| 656 | return |
| 657 | } |
| 658 | _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) |
| 659 | if e1 != 0 { |
| 660 | err = errnoErr(e1) |
| 661 | } |
| 662 | return |
| 663 | } |
| 664 | |
| 665 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 666 | |
| 667 | func Flock(fd int, how int) (err error) { |
| 668 | _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) |
| 669 | if e1 != 0 { |
| 670 | err = errnoErr(e1) |
| 671 | } |
| 672 | return |
| 673 | } |
| 674 | |
| 675 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 676 | |
| 677 | func Fpathconf(fd int, name int) (val int, err error) { |
| 678 | r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) |
| 679 | val = int(r0) |
| 680 | if e1 != 0 { |
| 681 | err = errnoErr(e1) |
| 682 | } |
| 683 | return |
| 684 | } |
| 685 | |
| 686 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 687 | |
| 688 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 689 | _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { |
| 699 | var _p0 *byte |
| 700 | _p0, err = BytePtrFromString(path) |
| 701 | if err != nil { |
| 702 | return |
| 703 | } |
| 704 | _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 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 Fstatfs(fd int, stat *Statfs_t) (err error) { |
| 714 | _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 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 | |
| 723 | func Fsync(fd int) (err error) { |
| 724 | _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 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 Ftruncate(fd int, length int64) (err error) { |
| 734 | _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length)) |
| 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 Getegid() (egid int) { |
| 744 | r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) |
| 745 | egid = int(r0) |
| 746 | return |
| 747 | } |
| 748 | |
| 749 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 750 | |
| 751 | func Geteuid() (uid int) { |
| 752 | r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) |
| 753 | uid = int(r0) |
| 754 | return |
| 755 | } |
| 756 | |
| 757 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 758 | |
| 759 | func Getgid() (gid int) { |
| 760 | r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) |
| 761 | gid = int(r0) |
| 762 | return |
| 763 | } |
| 764 | |
| 765 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 766 | |
| 767 | func Getpgid(pid int) (pgid int, err error) { |
| 768 | r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) |
| 769 | pgid = int(r0) |
| 770 | if e1 != 0 { |
| 771 | err = errnoErr(e1) |
| 772 | } |
| 773 | return |
| 774 | } |
| 775 | |
| 776 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 777 | |
| 778 | func Getpgrp() (pgrp int) { |
| 779 | r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) |
| 780 | pgrp = int(r0) |
| 781 | return |
| 782 | } |
| 783 | |
| 784 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 785 | |
| 786 | func Getpid() (pid int) { |
| 787 | r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) |
| 788 | pid = int(r0) |
| 789 | return |
| 790 | } |
| 791 | |
| 792 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 793 | |
| 794 | func Getppid() (ppid int) { |
| 795 | r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) |
| 796 | ppid = int(r0) |
| 797 | return |
| 798 | } |
| 799 | |
| 800 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 801 | |
| 802 | func Getpriority(which int, who int) (prio int, err error) { |
| 803 | r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) |
| 804 | prio = int(r0) |
| 805 | if e1 != 0 { |
| 806 | err = errnoErr(e1) |
| 807 | } |
| 808 | return |
| 809 | } |
| 810 | |
| 811 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 812 | |
| 813 | func Getrlimit(which int, lim *Rlimit) (err error) { |
| 814 | _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 815 | if e1 != 0 { |
| 816 | err = errnoErr(e1) |
| 817 | } |
| 818 | return |
| 819 | } |
| 820 | |
| 821 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 822 | |
| 823 | func Getrtable() (rtable int, err error) { |
| 824 | r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0) |
| 825 | rtable = int(r0) |
| 826 | if e1 != 0 { |
| 827 | err = errnoErr(e1) |
| 828 | } |
| 829 | return |
| 830 | } |
| 831 | |
| 832 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 833 | |
| 834 | func Getrusage(who int, rusage *Rusage) (err error) { |
| 835 | _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) |
| 836 | if e1 != 0 { |
| 837 | err = errnoErr(e1) |
| 838 | } |
| 839 | return |
| 840 | } |
| 841 | |
| 842 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 843 | |
| 844 | func Getsid(pid int) (sid int, err error) { |
| 845 | r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) |
| 846 | sid = int(r0) |
| 847 | if e1 != 0 { |
| 848 | err = errnoErr(e1) |
| 849 | } |
| 850 | return |
| 851 | } |
| 852 | |
| 853 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 854 | |
| 855 | func Gettimeofday(tv *Timeval) (err error) { |
| 856 | _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| 857 | if e1 != 0 { |
| 858 | err = errnoErr(e1) |
| 859 | } |
| 860 | return |
| 861 | } |
| 862 | |
| 863 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 864 | |
| 865 | func Getuid() (uid int) { |
| 866 | r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) |
| 867 | uid = int(r0) |
| 868 | return |
| 869 | } |
| 870 | |
| 871 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 872 | |
| 873 | func Issetugid() (tainted bool) { |
| 874 | r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) |
| 875 | tainted = bool(r0 != 0) |
| 876 | return |
| 877 | } |
| 878 | |
| 879 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 880 | |
| 881 | func Kill(pid int, signum syscall.Signal) (err error) { |
| 882 | _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) |
| 883 | if e1 != 0 { |
| 884 | err = errnoErr(e1) |
| 885 | } |
| 886 | return |
| 887 | } |
| 888 | |
| 889 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 890 | |
| 891 | func Kqueue() (fd int, err error) { |
| 892 | r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) |
| 893 | fd = int(r0) |
| 894 | if e1 != 0 { |
| 895 | err = errnoErr(e1) |
| 896 | } |
| 897 | return |
| 898 | } |
| 899 | |
| 900 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 901 | |
| 902 | func Lchown(path string, uid int, gid int) (err error) { |
| 903 | var _p0 *byte |
| 904 | _p0, err = BytePtrFromString(path) |
| 905 | if err != nil { |
| 906 | return |
| 907 | } |
| 908 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 909 | if e1 != 0 { |
| 910 | err = errnoErr(e1) |
| 911 | } |
| 912 | return |
| 913 | } |
| 914 | |
| 915 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 916 | |
| 917 | func Link(path string, link string) (err error) { |
| 918 | var _p0 *byte |
| 919 | _p0, err = BytePtrFromString(path) |
| 920 | if err != nil { |
| 921 | return |
| 922 | } |
| 923 | var _p1 *byte |
| 924 | _p1, err = BytePtrFromString(link) |
| 925 | if err != nil { |
| 926 | return |
| 927 | } |
| 928 | _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 929 | if e1 != 0 { |
| 930 | err = errnoErr(e1) |
| 931 | } |
| 932 | return |
| 933 | } |
| 934 | |
| 935 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 936 | |
| 937 | func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { |
| 938 | var _p0 *byte |
| 939 | _p0, err = BytePtrFromString(path) |
| 940 | if err != nil { |
| 941 | return |
| 942 | } |
| 943 | var _p1 *byte |
| 944 | _p1, err = BytePtrFromString(link) |
| 945 | if err != nil { |
| 946 | return |
| 947 | } |
| 948 | _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) |
| 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 Listen(s int, backlog int) (err error) { |
| 958 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) |
| 959 | if e1 != 0 { |
| 960 | err = errnoErr(e1) |
| 961 | } |
| 962 | return |
| 963 | } |
| 964 | |
| 965 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 966 | |
| 967 | func Lstat(path string, stat *Stat_t) (err error) { |
| 968 | var _p0 *byte |
| 969 | _p0, err = BytePtrFromString(path) |
| 970 | if err != nil { |
| 971 | return |
| 972 | } |
| 973 | _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 974 | if e1 != 0 { |
| 975 | err = errnoErr(e1) |
| 976 | } |
| 977 | return |
| 978 | } |
| 979 | |
| 980 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 981 | |
| 982 | func Mkdir(path string, mode uint32) (err error) { |
| 983 | var _p0 *byte |
| 984 | _p0, err = BytePtrFromString(path) |
| 985 | if err != nil { |
| 986 | return |
| 987 | } |
| 988 | _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 989 | if e1 != 0 { |
| 990 | err = errnoErr(e1) |
| 991 | } |
| 992 | return |
| 993 | } |
| 994 | |
| 995 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 996 | |
| 997 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 998 | var _p0 *byte |
| 999 | _p0, err = BytePtrFromString(path) |
| 1000 | if err != nil { |
| 1001 | return |
| 1002 | } |
| 1003 | _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1004 | if e1 != 0 { |
| 1005 | err = errnoErr(e1) |
| 1006 | } |
| 1007 | return |
| 1008 | } |
| 1009 | |
| 1010 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1011 | |
| 1012 | func Mkfifo(path string, mode uint32) (err error) { |
| 1013 | var _p0 *byte |
| 1014 | _p0, err = BytePtrFromString(path) |
| 1015 | if err != nil { |
| 1016 | return |
| 1017 | } |
| 1018 | _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 1019 | if e1 != 0 { |
| 1020 | err = errnoErr(e1) |
| 1021 | } |
| 1022 | return |
| 1023 | } |
| 1024 | |
| 1025 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1026 | |
| 1027 | func Mkfifoat(dirfd int, path string, mode uint32) (err error) { |
| 1028 | var _p0 *byte |
| 1029 | _p0, err = BytePtrFromString(path) |
| 1030 | if err != nil { |
| 1031 | return |
| 1032 | } |
| 1033 | _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1034 | if e1 != 0 { |
| 1035 | err = errnoErr(e1) |
| 1036 | } |
| 1037 | return |
| 1038 | } |
| 1039 | |
| 1040 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1041 | |
| 1042 | func Mknod(path string, mode uint32, dev int) (err error) { |
| 1043 | var _p0 *byte |
| 1044 | _p0, err = BytePtrFromString(path) |
| 1045 | if err != nil { |
| 1046 | return |
| 1047 | } |
| 1048 | _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) |
| 1049 | if e1 != 0 { |
| 1050 | err = errnoErr(e1) |
| 1051 | } |
| 1052 | return |
| 1053 | } |
| 1054 | |
| 1055 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1056 | |
| 1057 | func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { |
| 1058 | var _p0 *byte |
| 1059 | _p0, err = BytePtrFromString(path) |
| 1060 | if err != nil { |
| 1061 | return |
| 1062 | } |
| 1063 | _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) |
| 1064 | if e1 != 0 { |
| 1065 | err = errnoErr(e1) |
| 1066 | } |
| 1067 | return |
| 1068 | } |
| 1069 | |
| 1070 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1071 | |
| 1072 | func Nanosleep(time *Timespec, leftover *Timespec) (err error) { |
| 1073 | _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) |
| 1074 | if e1 != 0 { |
| 1075 | err = errnoErr(e1) |
| 1076 | } |
| 1077 | return |
| 1078 | } |
| 1079 | |
| 1080 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1081 | |
| 1082 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 1083 | var _p0 *byte |
| 1084 | _p0, err = BytePtrFromString(path) |
| 1085 | if err != nil { |
| 1086 | return |
| 1087 | } |
| 1088 | r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) |
| 1089 | fd = int(r0) |
| 1090 | if e1 != 0 { |
| 1091 | err = errnoErr(e1) |
| 1092 | } |
| 1093 | return |
| 1094 | } |
| 1095 | |
| 1096 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1097 | |
| 1098 | func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { |
| 1099 | var _p0 *byte |
| 1100 | _p0, err = BytePtrFromString(path) |
| 1101 | if err != nil { |
| 1102 | return |
| 1103 | } |
| 1104 | r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) |
| 1105 | fd = int(r0) |
| 1106 | if e1 != 0 { |
| 1107 | err = errnoErr(e1) |
| 1108 | } |
| 1109 | return |
| 1110 | } |
| 1111 | |
| 1112 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1113 | |
| 1114 | func Pathconf(path string, name int) (val int, err error) { |
| 1115 | var _p0 *byte |
| 1116 | _p0, err = BytePtrFromString(path) |
| 1117 | if err != nil { |
| 1118 | return |
| 1119 | } |
| 1120 | r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) |
| 1121 | val = int(r0) |
| 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 Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 1131 | var _p0 unsafe.Pointer |
| 1132 | if len(p) > 0 { |
| 1133 | _p0 = unsafe.Pointer(&p[0]) |
| 1134 | } else { |
| 1135 | _p0 = unsafe.Pointer(&_zero) |
| 1136 | } |
| 1137 | r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) |
| 1138 | n = int(r0) |
| 1139 | if e1 != 0 { |
| 1140 | err = errnoErr(e1) |
| 1141 | } |
| 1142 | return |
| 1143 | } |
| 1144 | |
| 1145 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1146 | |
| 1147 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 1148 | var _p0 unsafe.Pointer |
| 1149 | if len(p) > 0 { |
| 1150 | _p0 = unsafe.Pointer(&p[0]) |
| 1151 | } else { |
| 1152 | _p0 = unsafe.Pointer(&_zero) |
| 1153 | } |
| 1154 | r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0) |
| 1155 | n = int(r0) |
| 1156 | if e1 != 0 { |
| 1157 | err = errnoErr(e1) |
| 1158 | } |
| 1159 | return |
| 1160 | } |
| 1161 | |
| 1162 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1163 | |
| 1164 | func read(fd int, p []byte) (n int, err error) { |
| 1165 | var _p0 unsafe.Pointer |
| 1166 | if len(p) > 0 { |
| 1167 | _p0 = unsafe.Pointer(&p[0]) |
| 1168 | } else { |
| 1169 | _p0 = unsafe.Pointer(&_zero) |
| 1170 | } |
| 1171 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1172 | n = int(r0) |
| 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 Readlink(path string, buf []byte) (n int, err error) { |
| 1182 | var _p0 *byte |
| 1183 | _p0, err = BytePtrFromString(path) |
| 1184 | if err != nil { |
| 1185 | return |
| 1186 | } |
| 1187 | var _p1 unsafe.Pointer |
| 1188 | if len(buf) > 0 { |
| 1189 | _p1 = unsafe.Pointer(&buf[0]) |
| 1190 | } else { |
| 1191 | _p1 = unsafe.Pointer(&_zero) |
| 1192 | } |
| 1193 | r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) |
| 1194 | n = int(r0) |
| 1195 | if e1 != 0 { |
| 1196 | err = errnoErr(e1) |
| 1197 | } |
| 1198 | return |
| 1199 | } |
| 1200 | |
| 1201 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1202 | |
| 1203 | func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { |
| 1204 | var _p0 *byte |
| 1205 | _p0, err = BytePtrFromString(path) |
| 1206 | if err != nil { |
| 1207 | return |
| 1208 | } |
| 1209 | var _p1 unsafe.Pointer |
| 1210 | if len(buf) > 0 { |
| 1211 | _p1 = unsafe.Pointer(&buf[0]) |
| 1212 | } else { |
| 1213 | _p1 = unsafe.Pointer(&_zero) |
| 1214 | } |
| 1215 | r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) |
| 1216 | n = int(r0) |
| 1217 | if e1 != 0 { |
| 1218 | err = errnoErr(e1) |
| 1219 | } |
| 1220 | return |
| 1221 | } |
| 1222 | |
| 1223 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1224 | |
| 1225 | func Rename(from string, to string) (err error) { |
| 1226 | var _p0 *byte |
| 1227 | _p0, err = BytePtrFromString(from) |
| 1228 | if err != nil { |
| 1229 | return |
| 1230 | } |
| 1231 | var _p1 *byte |
| 1232 | _p1, err = BytePtrFromString(to) |
| 1233 | if err != nil { |
| 1234 | return |
| 1235 | } |
| 1236 | _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1237 | if e1 != 0 { |
| 1238 | err = errnoErr(e1) |
| 1239 | } |
| 1240 | return |
| 1241 | } |
| 1242 | |
| 1243 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1244 | |
| 1245 | func Renameat(fromfd int, from string, tofd int, to string) (err error) { |
| 1246 | var _p0 *byte |
| 1247 | _p0, err = BytePtrFromString(from) |
| 1248 | if err != nil { |
| 1249 | return |
| 1250 | } |
| 1251 | var _p1 *byte |
| 1252 | _p1, err = BytePtrFromString(to) |
| 1253 | if err != nil { |
| 1254 | return |
| 1255 | } |
| 1256 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 1257 | if e1 != 0 { |
| 1258 | err = errnoErr(e1) |
| 1259 | } |
| 1260 | return |
| 1261 | } |
| 1262 | |
| 1263 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1264 | |
| 1265 | func Revoke(path string) (err error) { |
| 1266 | var _p0 *byte |
| 1267 | _p0, err = BytePtrFromString(path) |
| 1268 | if err != nil { |
| 1269 | return |
| 1270 | } |
| 1271 | _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1272 | if e1 != 0 { |
| 1273 | err = errnoErr(e1) |
| 1274 | } |
| 1275 | return |
| 1276 | } |
| 1277 | |
| 1278 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1279 | |
| 1280 | func Rmdir(path string) (err error) { |
| 1281 | var _p0 *byte |
| 1282 | _p0, err = BytePtrFromString(path) |
| 1283 | if err != nil { |
| 1284 | return |
| 1285 | } |
| 1286 | _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1287 | if e1 != 0 { |
| 1288 | err = errnoErr(e1) |
| 1289 | } |
| 1290 | return |
| 1291 | } |
| 1292 | |
| 1293 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1294 | |
| 1295 | func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { |
| 1296 | r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0) |
| 1297 | newoffset = int64(r0) |
| 1298 | if e1 != 0 { |
| 1299 | err = errnoErr(e1) |
| 1300 | } |
| 1301 | return |
| 1302 | } |
| 1303 | |
| 1304 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1305 | |
| 1306 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 1307 | r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| 1308 | n = int(r0) |
| 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 Setegid(egid int) (err error) { |
| 1318 | _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) |
| 1319 | if e1 != 0 { |
| 1320 | err = errnoErr(e1) |
| 1321 | } |
| 1322 | return |
| 1323 | } |
| 1324 | |
| 1325 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1326 | |
| 1327 | func Seteuid(euid int) (err error) { |
| 1328 | _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) |
| 1329 | if e1 != 0 { |
| 1330 | err = errnoErr(e1) |
| 1331 | } |
| 1332 | return |
| 1333 | } |
| 1334 | |
| 1335 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1336 | |
| 1337 | func Setgid(gid int) (err error) { |
| 1338 | _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) |
| 1339 | if e1 != 0 { |
| 1340 | err = errnoErr(e1) |
| 1341 | } |
| 1342 | return |
| 1343 | } |
| 1344 | |
| 1345 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1346 | |
| 1347 | func Setlogin(name string) (err error) { |
| 1348 | var _p0 *byte |
| 1349 | _p0, err = BytePtrFromString(name) |
| 1350 | if err != nil { |
| 1351 | return |
| 1352 | } |
| 1353 | _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1354 | if e1 != 0 { |
| 1355 | err = errnoErr(e1) |
| 1356 | } |
| 1357 | return |
| 1358 | } |
| 1359 | |
| 1360 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1361 | |
| 1362 | func Setpgid(pid int, pgid int) (err error) { |
| 1363 | _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) |
| 1364 | if e1 != 0 { |
| 1365 | err = errnoErr(e1) |
| 1366 | } |
| 1367 | return |
| 1368 | } |
| 1369 | |
| 1370 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1371 | |
| 1372 | func Setpriority(which int, who int, prio int) (err error) { |
| 1373 | _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) |
| 1374 | if e1 != 0 { |
| 1375 | err = errnoErr(e1) |
| 1376 | } |
| 1377 | return |
| 1378 | } |
| 1379 | |
| 1380 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1381 | |
| 1382 | func Setregid(rgid int, egid int) (err error) { |
| 1383 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 1384 | if e1 != 0 { |
| 1385 | err = errnoErr(e1) |
| 1386 | } |
| 1387 | return |
| 1388 | } |
| 1389 | |
| 1390 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1391 | |
| 1392 | func Setreuid(ruid int, euid int) (err error) { |
| 1393 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) |
| 1394 | if e1 != 0 { |
| 1395 | err = errnoErr(e1) |
| 1396 | } |
| 1397 | return |
| 1398 | } |
| 1399 | |
| 1400 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1401 | |
| 1402 | func Setresgid(rgid int, egid int, sgid int) (err error) { |
| 1403 | _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)) |
| 1404 | if e1 != 0 { |
| 1405 | err = errnoErr(e1) |
| 1406 | } |
| 1407 | return |
| 1408 | } |
| 1409 | |
| 1410 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1411 | |
| 1412 | func Setresuid(ruid int, euid int, suid int) (err error) { |
| 1413 | _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)) |
| 1414 | if e1 != 0 { |
| 1415 | err = errnoErr(e1) |
| 1416 | } |
| 1417 | return |
| 1418 | } |
| 1419 | |
| 1420 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1421 | |
| 1422 | func Setrlimit(which int, lim *Rlimit) (err error) { |
| 1423 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 1424 | if e1 != 0 { |
| 1425 | err = errnoErr(e1) |
| 1426 | } |
| 1427 | return |
| 1428 | } |
| 1429 | |
| 1430 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1431 | |
| 1432 | func Setrtable(rtable int) (err error) { |
| 1433 | _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0) |
| 1434 | if e1 != 0 { |
| 1435 | err = errnoErr(e1) |
| 1436 | } |
| 1437 | return |
| 1438 | } |
| 1439 | |
| 1440 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1441 | |
| 1442 | func Setsid() (pid int, err error) { |
| 1443 | r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) |
| 1444 | pid = int(r0) |
| 1445 | if e1 != 0 { |
| 1446 | err = errnoErr(e1) |
| 1447 | } |
| 1448 | return |
| 1449 | } |
| 1450 | |
| 1451 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1452 | |
| 1453 | func Settimeofday(tp *Timeval) (err error) { |
| 1454 | _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) |
| 1455 | if e1 != 0 { |
| 1456 | err = errnoErr(e1) |
| 1457 | } |
| 1458 | return |
| 1459 | } |
| 1460 | |
| 1461 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1462 | |
| 1463 | func Setuid(uid int) (err error) { |
| 1464 | _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) |
| 1465 | if e1 != 0 { |
| 1466 | err = errnoErr(e1) |
| 1467 | } |
| 1468 | return |
| 1469 | } |
| 1470 | |
| 1471 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1472 | |
| 1473 | func Stat(path string, stat *Stat_t) (err error) { |
| 1474 | var _p0 *byte |
| 1475 | _p0, err = BytePtrFromString(path) |
| 1476 | if err != nil { |
| 1477 | return |
| 1478 | } |
| 1479 | _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1480 | if e1 != 0 { |
| 1481 | err = errnoErr(e1) |
| 1482 | } |
| 1483 | return |
| 1484 | } |
| 1485 | |
| 1486 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1487 | |
| 1488 | func Statfs(path string, stat *Statfs_t) (err error) { |
| 1489 | var _p0 *byte |
| 1490 | _p0, err = BytePtrFromString(path) |
| 1491 | if err != nil { |
| 1492 | return |
| 1493 | } |
| 1494 | _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1495 | if e1 != 0 { |
| 1496 | err = errnoErr(e1) |
| 1497 | } |
| 1498 | return |
| 1499 | } |
| 1500 | |
| 1501 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1502 | |
| 1503 | func Symlink(path string, link string) (err error) { |
| 1504 | var _p0 *byte |
| 1505 | _p0, err = BytePtrFromString(path) |
| 1506 | if err != nil { |
| 1507 | return |
| 1508 | } |
| 1509 | var _p1 *byte |
| 1510 | _p1, err = BytePtrFromString(link) |
| 1511 | if err != nil { |
| 1512 | return |
| 1513 | } |
| 1514 | _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1515 | if e1 != 0 { |
| 1516 | err = errnoErr(e1) |
| 1517 | } |
| 1518 | return |
| 1519 | } |
| 1520 | |
| 1521 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1522 | |
| 1523 | func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { |
| 1524 | var _p0 *byte |
| 1525 | _p0, err = BytePtrFromString(oldpath) |
| 1526 | if err != nil { |
| 1527 | return |
| 1528 | } |
| 1529 | var _p1 *byte |
| 1530 | _p1, err = BytePtrFromString(newpath) |
| 1531 | if err != nil { |
| 1532 | return |
| 1533 | } |
| 1534 | _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) |
| 1535 | if e1 != 0 { |
| 1536 | err = errnoErr(e1) |
| 1537 | } |
| 1538 | return |
| 1539 | } |
| 1540 | |
| 1541 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1542 | |
| 1543 | func Sync() (err error) { |
| 1544 | _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) |
| 1545 | if e1 != 0 { |
| 1546 | err = errnoErr(e1) |
| 1547 | } |
| 1548 | return |
| 1549 | } |
| 1550 | |
| 1551 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1552 | |
| 1553 | func Truncate(path string, length int64) (err error) { |
| 1554 | var _p0 *byte |
| 1555 | _p0, err = BytePtrFromString(path) |
| 1556 | if err != nil { |
| 1557 | return |
| 1558 | } |
| 1559 | _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length)) |
| 1560 | if e1 != 0 { |
| 1561 | err = errnoErr(e1) |
| 1562 | } |
| 1563 | return |
| 1564 | } |
| 1565 | |
| 1566 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1567 | |
| 1568 | func Umask(newmask int) (oldmask int) { |
| 1569 | r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) |
| 1570 | oldmask = int(r0) |
| 1571 | return |
| 1572 | } |
| 1573 | |
| 1574 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1575 | |
| 1576 | func Unlink(path string) (err error) { |
| 1577 | var _p0 *byte |
| 1578 | _p0, err = BytePtrFromString(path) |
| 1579 | if err != nil { |
| 1580 | return |
| 1581 | } |
| 1582 | _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1583 | if e1 != 0 { |
| 1584 | err = errnoErr(e1) |
| 1585 | } |
| 1586 | return |
| 1587 | } |
| 1588 | |
| 1589 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1590 | |
| 1591 | func Unlinkat(dirfd int, path string, flags int) (err error) { |
| 1592 | var _p0 *byte |
| 1593 | _p0, err = BytePtrFromString(path) |
| 1594 | if err != nil { |
| 1595 | return |
| 1596 | } |
| 1597 | _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) |
| 1598 | if e1 != 0 { |
| 1599 | err = errnoErr(e1) |
| 1600 | } |
| 1601 | return |
| 1602 | } |
| 1603 | |
| 1604 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1605 | |
| 1606 | func Unmount(path string, flags int) (err error) { |
| 1607 | var _p0 *byte |
| 1608 | _p0, err = BytePtrFromString(path) |
| 1609 | if err != nil { |
| 1610 | return |
| 1611 | } |
| 1612 | _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 1613 | if e1 != 0 { |
| 1614 | err = errnoErr(e1) |
| 1615 | } |
| 1616 | return |
| 1617 | } |
| 1618 | |
| 1619 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1620 | |
| 1621 | func write(fd int, p []byte) (n int, err error) { |
| 1622 | var _p0 unsafe.Pointer |
| 1623 | if len(p) > 0 { |
| 1624 | _p0 = unsafe.Pointer(&p[0]) |
| 1625 | } else { |
| 1626 | _p0 = unsafe.Pointer(&_zero) |
| 1627 | } |
| 1628 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1629 | n = int(r0) |
| 1630 | if e1 != 0 { |
| 1631 | err = errnoErr(e1) |
| 1632 | } |
| 1633 | return |
| 1634 | } |
| 1635 | |
| 1636 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1637 | |
| 1638 | func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { |
| 1639 | r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0) |
| 1640 | ret = uintptr(r0) |
| 1641 | if e1 != 0 { |
| 1642 | err = errnoErr(e1) |
| 1643 | } |
| 1644 | return |
| 1645 | } |
| 1646 | |
| 1647 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1648 | |
| 1649 | func munmap(addr uintptr, length uintptr) (err error) { |
| 1650 | _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) |
| 1651 | if e1 != 0 { |
| 1652 | err = errnoErr(e1) |
| 1653 | } |
| 1654 | return |
| 1655 | } |
| 1656 | |
| 1657 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1658 | |
| 1659 | func readlen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1660 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1661 | n = int(r0) |
| 1662 | if e1 != 0 { |
| 1663 | err = errnoErr(e1) |
| 1664 | } |
| 1665 | return |
| 1666 | } |
| 1667 | |
| 1668 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1669 | |
| 1670 | func writelen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1671 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1672 | n = int(r0) |
| 1673 | if e1 != 0 { |
| 1674 | err = errnoErr(e1) |
| 1675 | } |
| 1676 | return |
| 1677 | } |
| 1678 | |
| 1679 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1680 | |
| 1681 | func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { |
| 1682 | var _p0 *byte |
| 1683 | _p0, err = BytePtrFromString(path) |
| 1684 | if err != nil { |
| 1685 | return |
| 1686 | } |
| 1687 | _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) |
| 1688 | if e1 != 0 { |
| 1689 | err = errnoErr(e1) |
| 1690 | } |
| 1691 | return |
| 1692 | } |