Holger Hildebrandt | fa07499 | 2020-03-27 15:42:06 +0000 | [diff] [blame] | 1 | // go run mksyscall.go -l32 -netbsd -tags netbsd,386 syscall_bsd.go syscall_netbsd.go syscall_netbsd_386.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build netbsd,386 |
| 5 | |
| 6 | package unix |
| 7 | |
| 8 | import ( |
| 9 | "syscall" |
| 10 | "unsafe" |
| 11 | ) |
| 12 | |
| 13 | var _ syscall.Errno |
| 14 | |
| 15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 16 | |
| 17 | func 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 pipe() (fd1 int, fd2 int, err error) { |
| 354 | r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) |
| 355 | fd1 = int(r0) |
| 356 | fd2 = int(r1) |
| 357 | if e1 != 0 { |
| 358 | err = errnoErr(e1) |
| 359 | } |
| 360 | return |
| 361 | } |
| 362 | |
| 363 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 364 | |
| 365 | func Getdents(fd int, buf []byte) (n int, err error) { |
| 366 | var _p0 unsafe.Pointer |
| 367 | if len(buf) > 0 { |
| 368 | _p0 = unsafe.Pointer(&buf[0]) |
| 369 | } else { |
| 370 | _p0 = unsafe.Pointer(&_zero) |
| 371 | } |
| 372 | r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf))) |
| 373 | n = int(r0) |
| 374 | if e1 != 0 { |
| 375 | err = errnoErr(e1) |
| 376 | } |
| 377 | return |
| 378 | } |
| 379 | |
| 380 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 381 | |
| 382 | func Getcwd(buf []byte) (n int, err error) { |
| 383 | var _p0 unsafe.Pointer |
| 384 | if len(buf) > 0 { |
| 385 | _p0 = unsafe.Pointer(&buf[0]) |
| 386 | } else { |
| 387 | _p0 = unsafe.Pointer(&_zero) |
| 388 | } |
| 389 | r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0) |
| 390 | n = int(r0) |
| 391 | if e1 != 0 { |
| 392 | err = errnoErr(e1) |
| 393 | } |
| 394 | return |
| 395 | } |
| 396 | |
| 397 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 398 | |
| 399 | func ioctl(fd int, req uint, arg uintptr) (err error) { |
| 400 | _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) |
| 401 | if e1 != 0 { |
| 402 | err = errnoErr(e1) |
| 403 | } |
| 404 | return |
| 405 | } |
| 406 | |
| 407 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 408 | |
| 409 | func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
| 410 | var _p0 unsafe.Pointer |
| 411 | if len(mib) > 0 { |
| 412 | _p0 = unsafe.Pointer(&mib[0]) |
| 413 | } else { |
| 414 | _p0 = unsafe.Pointer(&_zero) |
| 415 | } |
| 416 | _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) |
| 417 | if e1 != 0 { |
| 418 | err = errnoErr(e1) |
| 419 | } |
| 420 | return |
| 421 | } |
| 422 | |
| 423 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 424 | |
| 425 | func Access(path string, mode uint32) (err error) { |
| 426 | var _p0 *byte |
| 427 | _p0, err = BytePtrFromString(path) |
| 428 | if err != nil { |
| 429 | return |
| 430 | } |
| 431 | _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 432 | if e1 != 0 { |
| 433 | err = errnoErr(e1) |
| 434 | } |
| 435 | return |
| 436 | } |
| 437 | |
| 438 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 439 | |
| 440 | func Adjtime(delta *Timeval, olddelta *Timeval) (err error) { |
| 441 | _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) |
| 442 | if e1 != 0 { |
| 443 | err = errnoErr(e1) |
| 444 | } |
| 445 | return |
| 446 | } |
| 447 | |
| 448 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 449 | |
| 450 | func Chdir(path string) (err error) { |
| 451 | var _p0 *byte |
| 452 | _p0, err = BytePtrFromString(path) |
| 453 | if err != nil { |
| 454 | return |
| 455 | } |
| 456 | _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 457 | if e1 != 0 { |
| 458 | err = errnoErr(e1) |
| 459 | } |
| 460 | return |
| 461 | } |
| 462 | |
| 463 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 464 | |
| 465 | func Chflags(path string, flags int) (err error) { |
| 466 | var _p0 *byte |
| 467 | _p0, err = BytePtrFromString(path) |
| 468 | if err != nil { |
| 469 | return |
| 470 | } |
| 471 | _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 472 | if e1 != 0 { |
| 473 | err = errnoErr(e1) |
| 474 | } |
| 475 | return |
| 476 | } |
| 477 | |
| 478 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 479 | |
| 480 | func Chmod(path string, mode uint32) (err error) { |
| 481 | var _p0 *byte |
| 482 | _p0, err = BytePtrFromString(path) |
| 483 | if err != nil { |
| 484 | return |
| 485 | } |
| 486 | _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 487 | if e1 != 0 { |
| 488 | err = errnoErr(e1) |
| 489 | } |
| 490 | return |
| 491 | } |
| 492 | |
| 493 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 494 | |
| 495 | func Chown(path string, uid int, gid int) (err error) { |
| 496 | var _p0 *byte |
| 497 | _p0, err = BytePtrFromString(path) |
| 498 | if err != nil { |
| 499 | return |
| 500 | } |
| 501 | _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 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 Chroot(path string) (err error) { |
| 511 | var _p0 *byte |
| 512 | _p0, err = BytePtrFromString(path) |
| 513 | if err != nil { |
| 514 | return |
| 515 | } |
| 516 | _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 517 | if e1 != 0 { |
| 518 | err = errnoErr(e1) |
| 519 | } |
| 520 | return |
| 521 | } |
| 522 | |
| 523 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 524 | |
| 525 | func Close(fd int) (err error) { |
| 526 | _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) |
| 527 | if e1 != 0 { |
| 528 | err = errnoErr(e1) |
| 529 | } |
| 530 | return |
| 531 | } |
| 532 | |
| 533 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 534 | |
| 535 | func Dup(fd int) (nfd int, err error) { |
| 536 | r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) |
| 537 | nfd = int(r0) |
| 538 | if e1 != 0 { |
| 539 | err = errnoErr(e1) |
| 540 | } |
| 541 | return |
| 542 | } |
| 543 | |
| 544 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 545 | |
| 546 | func Dup2(from int, to int) (err error) { |
| 547 | _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) |
| 548 | if e1 != 0 { |
| 549 | err = errnoErr(e1) |
| 550 | } |
| 551 | return |
| 552 | } |
| 553 | |
| 554 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 555 | |
| 556 | func Dup3(from int, to int, flags int) (err error) { |
| 557 | _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags)) |
| 558 | if e1 != 0 { |
| 559 | err = errnoErr(e1) |
| 560 | } |
| 561 | return |
| 562 | } |
| 563 | |
| 564 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 565 | |
| 566 | func Exit(code int) { |
| 567 | Syscall(SYS_EXIT, uintptr(code), 0, 0) |
| 568 | return |
| 569 | } |
| 570 | |
| 571 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 572 | |
| 573 | func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 574 | var _p0 *byte |
| 575 | _p0, err = BytePtrFromString(attrname) |
| 576 | if err != nil { |
| 577 | return |
| 578 | } |
| 579 | r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) |
| 580 | ret = int(r0) |
| 581 | if e1 != 0 { |
| 582 | err = errnoErr(e1) |
| 583 | } |
| 584 | return |
| 585 | } |
| 586 | |
| 587 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 588 | |
| 589 | func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 590 | var _p0 *byte |
| 591 | _p0, err = BytePtrFromString(attrname) |
| 592 | if err != nil { |
| 593 | return |
| 594 | } |
| 595 | r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0) |
| 596 | ret = int(r0) |
| 597 | if e1 != 0 { |
| 598 | err = errnoErr(e1) |
| 599 | } |
| 600 | return |
| 601 | } |
| 602 | |
| 603 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 604 | |
| 605 | func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) { |
| 606 | var _p0 *byte |
| 607 | _p0, err = BytePtrFromString(attrname) |
| 608 | if err != nil { |
| 609 | return |
| 610 | } |
| 611 | _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0))) |
| 612 | if e1 != 0 { |
| 613 | err = errnoErr(e1) |
| 614 | } |
| 615 | return |
| 616 | } |
| 617 | |
| 618 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 619 | |
| 620 | func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { |
| 621 | r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) |
| 622 | ret = int(r0) |
| 623 | if e1 != 0 { |
| 624 | err = errnoErr(e1) |
| 625 | } |
| 626 | return |
| 627 | } |
| 628 | |
| 629 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 630 | |
| 631 | func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 632 | var _p0 *byte |
| 633 | _p0, err = BytePtrFromString(file) |
| 634 | if err != nil { |
| 635 | return |
| 636 | } |
| 637 | var _p1 *byte |
| 638 | _p1, err = BytePtrFromString(attrname) |
| 639 | if err != nil { |
| 640 | return |
| 641 | } |
| 642 | r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) |
| 643 | ret = int(r0) |
| 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 ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 653 | var _p0 *byte |
| 654 | _p0, err = BytePtrFromString(file) |
| 655 | if err != nil { |
| 656 | return |
| 657 | } |
| 658 | var _p1 *byte |
| 659 | _p1, err = BytePtrFromString(attrname) |
| 660 | if err != nil { |
| 661 | return |
| 662 | } |
| 663 | r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) |
| 664 | ret = int(r0) |
| 665 | if e1 != 0 { |
| 666 | err = errnoErr(e1) |
| 667 | } |
| 668 | return |
| 669 | } |
| 670 | |
| 671 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 672 | |
| 673 | func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) { |
| 674 | var _p0 *byte |
| 675 | _p0, err = BytePtrFromString(file) |
| 676 | if err != nil { |
| 677 | return |
| 678 | } |
| 679 | var _p1 *byte |
| 680 | _p1, err = BytePtrFromString(attrname) |
| 681 | if err != nil { |
| 682 | return |
| 683 | } |
| 684 | _, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) |
| 685 | if e1 != 0 { |
| 686 | err = errnoErr(e1) |
| 687 | } |
| 688 | return |
| 689 | } |
| 690 | |
| 691 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 692 | |
| 693 | func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { |
| 694 | var _p0 *byte |
| 695 | _p0, err = BytePtrFromString(file) |
| 696 | if err != nil { |
| 697 | return |
| 698 | } |
| 699 | r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) |
| 700 | ret = int(r0) |
| 701 | if e1 != 0 { |
| 702 | err = errnoErr(e1) |
| 703 | } |
| 704 | return |
| 705 | } |
| 706 | |
| 707 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 708 | |
| 709 | func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 710 | var _p0 *byte |
| 711 | _p0, err = BytePtrFromString(link) |
| 712 | if err != nil { |
| 713 | return |
| 714 | } |
| 715 | var _p1 *byte |
| 716 | _p1, err = BytePtrFromString(attrname) |
| 717 | if err != nil { |
| 718 | return |
| 719 | } |
| 720 | r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) |
| 721 | ret = int(r0) |
| 722 | if e1 != 0 { |
| 723 | err = errnoErr(e1) |
| 724 | } |
| 725 | return |
| 726 | } |
| 727 | |
| 728 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 729 | |
| 730 | func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) { |
| 731 | var _p0 *byte |
| 732 | _p0, err = BytePtrFromString(link) |
| 733 | if err != nil { |
| 734 | return |
| 735 | } |
| 736 | var _p1 *byte |
| 737 | _p1, err = BytePtrFromString(attrname) |
| 738 | if err != nil { |
| 739 | return |
| 740 | } |
| 741 | r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0) |
| 742 | ret = int(r0) |
| 743 | if e1 != 0 { |
| 744 | err = errnoErr(e1) |
| 745 | } |
| 746 | return |
| 747 | } |
| 748 | |
| 749 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 750 | |
| 751 | func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) { |
| 752 | var _p0 *byte |
| 753 | _p0, err = BytePtrFromString(link) |
| 754 | if err != nil { |
| 755 | return |
| 756 | } |
| 757 | var _p1 *byte |
| 758 | _p1, err = BytePtrFromString(attrname) |
| 759 | if err != nil { |
| 760 | return |
| 761 | } |
| 762 | _, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1))) |
| 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 ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) { |
| 772 | var _p0 *byte |
| 773 | _p0, err = BytePtrFromString(link) |
| 774 | if err != nil { |
| 775 | return |
| 776 | } |
| 777 | r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0) |
| 778 | ret = int(r0) |
| 779 | if e1 != 0 { |
| 780 | err = errnoErr(e1) |
| 781 | } |
| 782 | return |
| 783 | } |
| 784 | |
| 785 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 786 | |
| 787 | func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 788 | var _p0 *byte |
| 789 | _p0, err = BytePtrFromString(path) |
| 790 | if err != nil { |
| 791 | return |
| 792 | } |
| 793 | _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
| 794 | if e1 != 0 { |
| 795 | err = errnoErr(e1) |
| 796 | } |
| 797 | return |
| 798 | } |
| 799 | |
| 800 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 801 | |
| 802 | func Fadvise(fd int, offset int64, length int64, advice int) (err error) { |
| 803 | _, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), 0, uintptr(length), uintptr(length>>32), uintptr(advice), 0) |
| 804 | if e1 != 0 { |
| 805 | err = errnoErr(e1) |
| 806 | } |
| 807 | return |
| 808 | } |
| 809 | |
| 810 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 811 | |
| 812 | func Fchdir(fd int) (err error) { |
| 813 | _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) |
| 814 | if e1 != 0 { |
| 815 | err = errnoErr(e1) |
| 816 | } |
| 817 | return |
| 818 | } |
| 819 | |
| 820 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 821 | |
| 822 | func Fchflags(fd int, flags int) (err error) { |
| 823 | _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) |
| 824 | if e1 != 0 { |
| 825 | err = errnoErr(e1) |
| 826 | } |
| 827 | return |
| 828 | } |
| 829 | |
| 830 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 831 | |
| 832 | func Fchmod(fd int, mode uint32) (err error) { |
| 833 | _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) |
| 834 | if e1 != 0 { |
| 835 | err = errnoErr(e1) |
| 836 | } |
| 837 | return |
| 838 | } |
| 839 | |
| 840 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 841 | |
| 842 | func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 843 | var _p0 *byte |
| 844 | _p0, err = BytePtrFromString(path) |
| 845 | if err != nil { |
| 846 | return |
| 847 | } |
| 848 | _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
| 849 | if e1 != 0 { |
| 850 | err = errnoErr(e1) |
| 851 | } |
| 852 | return |
| 853 | } |
| 854 | |
| 855 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 856 | |
| 857 | func Fchown(fd int, uid int, gid int) (err error) { |
| 858 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 859 | if e1 != 0 { |
| 860 | err = errnoErr(e1) |
| 861 | } |
| 862 | return |
| 863 | } |
| 864 | |
| 865 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 866 | |
| 867 | func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 868 | var _p0 *byte |
| 869 | _p0, err = BytePtrFromString(path) |
| 870 | if err != nil { |
| 871 | return |
| 872 | } |
| 873 | _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) |
| 874 | if e1 != 0 { |
| 875 | err = errnoErr(e1) |
| 876 | } |
| 877 | return |
| 878 | } |
| 879 | |
| 880 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 881 | |
| 882 | func Flock(fd int, how int) (err error) { |
| 883 | _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) |
| 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 Fpathconf(fd int, name int) (val int, err error) { |
| 893 | r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) |
| 894 | val = int(r0) |
| 895 | if e1 != 0 { |
| 896 | err = errnoErr(e1) |
| 897 | } |
| 898 | return |
| 899 | } |
| 900 | |
| 901 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 902 | |
| 903 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 904 | _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 905 | if e1 != 0 { |
| 906 | err = errnoErr(e1) |
| 907 | } |
| 908 | return |
| 909 | } |
| 910 | |
| 911 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 912 | |
| 913 | func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { |
| 914 | var _p0 *byte |
| 915 | _p0, err = BytePtrFromString(path) |
| 916 | if err != nil { |
| 917 | return |
| 918 | } |
| 919 | _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| 920 | if e1 != 0 { |
| 921 | err = errnoErr(e1) |
| 922 | } |
| 923 | return |
| 924 | } |
| 925 | |
| 926 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 927 | |
| 928 | func Fstatvfs1(fd int, buf *Statvfs_t, flags int) (err error) { |
| 929 | _, _, e1 := Syscall(SYS_FSTATVFS1, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(flags)) |
| 930 | if e1 != 0 { |
| 931 | err = errnoErr(e1) |
| 932 | } |
| 933 | return |
| 934 | } |
| 935 | |
| 936 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 937 | |
| 938 | func Fsync(fd int) (err error) { |
| 939 | _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) |
| 940 | if e1 != 0 { |
| 941 | err = errnoErr(e1) |
| 942 | } |
| 943 | return |
| 944 | } |
| 945 | |
| 946 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 947 | |
| 948 | func Ftruncate(fd int, length int64) (err error) { |
| 949 | _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0) |
| 950 | if e1 != 0 { |
| 951 | err = errnoErr(e1) |
| 952 | } |
| 953 | return |
| 954 | } |
| 955 | |
| 956 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 957 | |
| 958 | func Getegid() (egid int) { |
| 959 | r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) |
| 960 | egid = int(r0) |
| 961 | return |
| 962 | } |
| 963 | |
| 964 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 965 | |
| 966 | func Geteuid() (uid int) { |
| 967 | r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) |
| 968 | uid = int(r0) |
| 969 | return |
| 970 | } |
| 971 | |
| 972 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 973 | |
| 974 | func Getgid() (gid int) { |
| 975 | r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) |
| 976 | gid = int(r0) |
| 977 | return |
| 978 | } |
| 979 | |
| 980 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 981 | |
| 982 | func Getpgid(pid int) (pgid int, err error) { |
| 983 | r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) |
| 984 | pgid = int(r0) |
| 985 | if e1 != 0 { |
| 986 | err = errnoErr(e1) |
| 987 | } |
| 988 | return |
| 989 | } |
| 990 | |
| 991 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 992 | |
| 993 | func Getpgrp() (pgrp int) { |
| 994 | r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) |
| 995 | pgrp = int(r0) |
| 996 | return |
| 997 | } |
| 998 | |
| 999 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1000 | |
| 1001 | func Getpid() (pid int) { |
| 1002 | r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) |
| 1003 | pid = int(r0) |
| 1004 | return |
| 1005 | } |
| 1006 | |
| 1007 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1008 | |
| 1009 | func Getppid() (ppid int) { |
| 1010 | r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) |
| 1011 | ppid = int(r0) |
| 1012 | return |
| 1013 | } |
| 1014 | |
| 1015 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1016 | |
| 1017 | func Getpriority(which int, who int) (prio int, err error) { |
| 1018 | r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) |
| 1019 | prio = 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 Getrlimit(which int, lim *Rlimit) (err error) { |
| 1029 | _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 1030 | if e1 != 0 { |
| 1031 | err = errnoErr(e1) |
| 1032 | } |
| 1033 | return |
| 1034 | } |
| 1035 | |
| 1036 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1037 | |
| 1038 | func Getrusage(who int, rusage *Rusage) (err error) { |
| 1039 | _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 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 Getsid(pid int) (sid int, err error) { |
| 1049 | r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) |
| 1050 | sid = int(r0) |
| 1051 | if e1 != 0 { |
| 1052 | err = errnoErr(e1) |
| 1053 | } |
| 1054 | return |
| 1055 | } |
| 1056 | |
| 1057 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1058 | |
| 1059 | func Gettimeofday(tv *Timeval) (err error) { |
| 1060 | _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0) |
| 1061 | if e1 != 0 { |
| 1062 | err = errnoErr(e1) |
| 1063 | } |
| 1064 | return |
| 1065 | } |
| 1066 | |
| 1067 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1068 | |
| 1069 | func Getuid() (uid int) { |
| 1070 | r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) |
| 1071 | uid = int(r0) |
| 1072 | return |
| 1073 | } |
| 1074 | |
| 1075 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1076 | |
| 1077 | func Issetugid() (tainted bool) { |
| 1078 | r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0) |
| 1079 | tainted = bool(r0 != 0) |
| 1080 | return |
| 1081 | } |
| 1082 | |
| 1083 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1084 | |
| 1085 | func Kill(pid int, signum syscall.Signal) (err error) { |
| 1086 | _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0) |
| 1087 | if e1 != 0 { |
| 1088 | err = errnoErr(e1) |
| 1089 | } |
| 1090 | return |
| 1091 | } |
| 1092 | |
| 1093 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1094 | |
| 1095 | func Kqueue() (fd int, err error) { |
| 1096 | r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) |
| 1097 | fd = int(r0) |
| 1098 | if e1 != 0 { |
| 1099 | err = errnoErr(e1) |
| 1100 | } |
| 1101 | return |
| 1102 | } |
| 1103 | |
| 1104 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1105 | |
| 1106 | func Lchown(path string, uid int, gid int) (err error) { |
| 1107 | var _p0 *byte |
| 1108 | _p0, err = BytePtrFromString(path) |
| 1109 | if err != nil { |
| 1110 | return |
| 1111 | } |
| 1112 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 1113 | if e1 != 0 { |
| 1114 | err = errnoErr(e1) |
| 1115 | } |
| 1116 | return |
| 1117 | } |
| 1118 | |
| 1119 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1120 | |
| 1121 | func Link(path string, link string) (err error) { |
| 1122 | var _p0 *byte |
| 1123 | _p0, err = BytePtrFromString(path) |
| 1124 | if err != nil { |
| 1125 | return |
| 1126 | } |
| 1127 | var _p1 *byte |
| 1128 | _p1, err = BytePtrFromString(link) |
| 1129 | if err != nil { |
| 1130 | return |
| 1131 | } |
| 1132 | _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 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 Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { |
| 1142 | var _p0 *byte |
| 1143 | _p0, err = BytePtrFromString(path) |
| 1144 | if err != nil { |
| 1145 | return |
| 1146 | } |
| 1147 | var _p1 *byte |
| 1148 | _p1, err = BytePtrFromString(link) |
| 1149 | if err != nil { |
| 1150 | return |
| 1151 | } |
| 1152 | _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 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 Listen(s int, backlog int) (err error) { |
| 1162 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 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 Lstat(path string, stat *Stat_t) (err error) { |
| 1172 | var _p0 *byte |
| 1173 | _p0, err = BytePtrFromString(path) |
| 1174 | if err != nil { |
| 1175 | return |
| 1176 | } |
| 1177 | _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1178 | if e1 != 0 { |
| 1179 | err = errnoErr(e1) |
| 1180 | } |
| 1181 | return |
| 1182 | } |
| 1183 | |
| 1184 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1185 | |
| 1186 | func Mkdir(path string, mode uint32) (err error) { |
| 1187 | var _p0 *byte |
| 1188 | _p0, err = BytePtrFromString(path) |
| 1189 | if err != nil { |
| 1190 | return |
| 1191 | } |
| 1192 | _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 1193 | if e1 != 0 { |
| 1194 | err = errnoErr(e1) |
| 1195 | } |
| 1196 | return |
| 1197 | } |
| 1198 | |
| 1199 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1200 | |
| 1201 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 1202 | var _p0 *byte |
| 1203 | _p0, err = BytePtrFromString(path) |
| 1204 | if err != nil { |
| 1205 | return |
| 1206 | } |
| 1207 | _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1208 | if e1 != 0 { |
| 1209 | err = errnoErr(e1) |
| 1210 | } |
| 1211 | return |
| 1212 | } |
| 1213 | |
| 1214 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1215 | |
| 1216 | func Mkfifo(path string, mode uint32) (err error) { |
| 1217 | var _p0 *byte |
| 1218 | _p0, err = BytePtrFromString(path) |
| 1219 | if err != nil { |
| 1220 | return |
| 1221 | } |
| 1222 | _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 1223 | if e1 != 0 { |
| 1224 | err = errnoErr(e1) |
| 1225 | } |
| 1226 | return |
| 1227 | } |
| 1228 | |
| 1229 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1230 | |
| 1231 | func Mkfifoat(dirfd int, path string, mode uint32) (err error) { |
| 1232 | var _p0 *byte |
| 1233 | _p0, err = BytePtrFromString(path) |
| 1234 | if err != nil { |
| 1235 | return |
| 1236 | } |
| 1237 | _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1238 | if e1 != 0 { |
| 1239 | err = errnoErr(e1) |
| 1240 | } |
| 1241 | return |
| 1242 | } |
| 1243 | |
| 1244 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1245 | |
| 1246 | func Mknod(path string, mode uint32, dev int) (err error) { |
| 1247 | var _p0 *byte |
| 1248 | _p0, err = BytePtrFromString(path) |
| 1249 | if err != nil { |
| 1250 | return |
| 1251 | } |
| 1252 | _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) |
| 1253 | if e1 != 0 { |
| 1254 | err = errnoErr(e1) |
| 1255 | } |
| 1256 | return |
| 1257 | } |
| 1258 | |
| 1259 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1260 | |
| 1261 | func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) { |
| 1262 | var _p0 *byte |
| 1263 | _p0, err = BytePtrFromString(path) |
| 1264 | if err != nil { |
| 1265 | return |
| 1266 | } |
| 1267 | _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0) |
| 1268 | if e1 != 0 { |
| 1269 | err = errnoErr(e1) |
| 1270 | } |
| 1271 | return |
| 1272 | } |
| 1273 | |
| 1274 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1275 | |
| 1276 | func Nanosleep(time *Timespec, leftover *Timespec) (err error) { |
| 1277 | _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) |
| 1278 | if e1 != 0 { |
| 1279 | err = errnoErr(e1) |
| 1280 | } |
| 1281 | return |
| 1282 | } |
| 1283 | |
| 1284 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1285 | |
| 1286 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 1287 | var _p0 *byte |
| 1288 | _p0, err = BytePtrFromString(path) |
| 1289 | if err != nil { |
| 1290 | return |
| 1291 | } |
| 1292 | r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) |
| 1293 | fd = int(r0) |
| 1294 | if e1 != 0 { |
| 1295 | err = errnoErr(e1) |
| 1296 | } |
| 1297 | return |
| 1298 | } |
| 1299 | |
| 1300 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1301 | |
| 1302 | func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { |
| 1303 | var _p0 *byte |
| 1304 | _p0, err = BytePtrFromString(path) |
| 1305 | if err != nil { |
| 1306 | return |
| 1307 | } |
| 1308 | r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) |
| 1309 | fd = int(r0) |
| 1310 | if e1 != 0 { |
| 1311 | err = errnoErr(e1) |
| 1312 | } |
| 1313 | return |
| 1314 | } |
| 1315 | |
| 1316 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1317 | |
| 1318 | func Pathconf(path string, name int) (val int, err error) { |
| 1319 | var _p0 *byte |
| 1320 | _p0, err = BytePtrFromString(path) |
| 1321 | if err != nil { |
| 1322 | return |
| 1323 | } |
| 1324 | r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) |
| 1325 | val = int(r0) |
| 1326 | if e1 != 0 { |
| 1327 | err = errnoErr(e1) |
| 1328 | } |
| 1329 | return |
| 1330 | } |
| 1331 | |
| 1332 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1333 | |
| 1334 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 1335 | var _p0 unsafe.Pointer |
| 1336 | if len(p) > 0 { |
| 1337 | _p0 = unsafe.Pointer(&p[0]) |
| 1338 | } else { |
| 1339 | _p0 = unsafe.Pointer(&_zero) |
| 1340 | } |
| 1341 | r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) |
| 1342 | n = int(r0) |
| 1343 | if e1 != 0 { |
| 1344 | err = errnoErr(e1) |
| 1345 | } |
| 1346 | return |
| 1347 | } |
| 1348 | |
| 1349 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1350 | |
| 1351 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 1352 | var _p0 unsafe.Pointer |
| 1353 | if len(p) > 0 { |
| 1354 | _p0 = unsafe.Pointer(&p[0]) |
| 1355 | } else { |
| 1356 | _p0 = unsafe.Pointer(&_zero) |
| 1357 | } |
| 1358 | r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32)) |
| 1359 | n = int(r0) |
| 1360 | if e1 != 0 { |
| 1361 | err = errnoErr(e1) |
| 1362 | } |
| 1363 | return |
| 1364 | } |
| 1365 | |
| 1366 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1367 | |
| 1368 | func read(fd int, p []byte) (n int, err error) { |
| 1369 | var _p0 unsafe.Pointer |
| 1370 | if len(p) > 0 { |
| 1371 | _p0 = unsafe.Pointer(&p[0]) |
| 1372 | } else { |
| 1373 | _p0 = unsafe.Pointer(&_zero) |
| 1374 | } |
| 1375 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1376 | n = int(r0) |
| 1377 | if e1 != 0 { |
| 1378 | err = errnoErr(e1) |
| 1379 | } |
| 1380 | return |
| 1381 | } |
| 1382 | |
| 1383 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1384 | |
| 1385 | func Readlink(path string, buf []byte) (n int, err error) { |
| 1386 | var _p0 *byte |
| 1387 | _p0, err = BytePtrFromString(path) |
| 1388 | if err != nil { |
| 1389 | return |
| 1390 | } |
| 1391 | var _p1 unsafe.Pointer |
| 1392 | if len(buf) > 0 { |
| 1393 | _p1 = unsafe.Pointer(&buf[0]) |
| 1394 | } else { |
| 1395 | _p1 = unsafe.Pointer(&_zero) |
| 1396 | } |
| 1397 | r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) |
| 1398 | n = int(r0) |
| 1399 | if e1 != 0 { |
| 1400 | err = errnoErr(e1) |
| 1401 | } |
| 1402 | return |
| 1403 | } |
| 1404 | |
| 1405 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1406 | |
| 1407 | func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { |
| 1408 | var _p0 *byte |
| 1409 | _p0, err = BytePtrFromString(path) |
| 1410 | if err != nil { |
| 1411 | return |
| 1412 | } |
| 1413 | var _p1 unsafe.Pointer |
| 1414 | if len(buf) > 0 { |
| 1415 | _p1 = unsafe.Pointer(&buf[0]) |
| 1416 | } else { |
| 1417 | _p1 = unsafe.Pointer(&_zero) |
| 1418 | } |
| 1419 | r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) |
| 1420 | n = int(r0) |
| 1421 | if e1 != 0 { |
| 1422 | err = errnoErr(e1) |
| 1423 | } |
| 1424 | return |
| 1425 | } |
| 1426 | |
| 1427 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1428 | |
| 1429 | func Rename(from string, to string) (err error) { |
| 1430 | var _p0 *byte |
| 1431 | _p0, err = BytePtrFromString(from) |
| 1432 | if err != nil { |
| 1433 | return |
| 1434 | } |
| 1435 | var _p1 *byte |
| 1436 | _p1, err = BytePtrFromString(to) |
| 1437 | if err != nil { |
| 1438 | return |
| 1439 | } |
| 1440 | _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1441 | if e1 != 0 { |
| 1442 | err = errnoErr(e1) |
| 1443 | } |
| 1444 | return |
| 1445 | } |
| 1446 | |
| 1447 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1448 | |
| 1449 | func Renameat(fromfd int, from string, tofd int, to string) (err error) { |
| 1450 | var _p0 *byte |
| 1451 | _p0, err = BytePtrFromString(from) |
| 1452 | if err != nil { |
| 1453 | return |
| 1454 | } |
| 1455 | var _p1 *byte |
| 1456 | _p1, err = BytePtrFromString(to) |
| 1457 | if err != nil { |
| 1458 | return |
| 1459 | } |
| 1460 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 1461 | if e1 != 0 { |
| 1462 | err = errnoErr(e1) |
| 1463 | } |
| 1464 | return |
| 1465 | } |
| 1466 | |
| 1467 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1468 | |
| 1469 | func Revoke(path string) (err error) { |
| 1470 | var _p0 *byte |
| 1471 | _p0, err = BytePtrFromString(path) |
| 1472 | if err != nil { |
| 1473 | return |
| 1474 | } |
| 1475 | _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1476 | if e1 != 0 { |
| 1477 | err = errnoErr(e1) |
| 1478 | } |
| 1479 | return |
| 1480 | } |
| 1481 | |
| 1482 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1483 | |
| 1484 | func Rmdir(path string) (err error) { |
| 1485 | var _p0 *byte |
| 1486 | _p0, err = BytePtrFromString(path) |
| 1487 | if err != nil { |
| 1488 | return |
| 1489 | } |
| 1490 | _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1491 | if e1 != 0 { |
| 1492 | err = errnoErr(e1) |
| 1493 | } |
| 1494 | return |
| 1495 | } |
| 1496 | |
| 1497 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1498 | |
| 1499 | func Seek(fd int, offset int64, whence int) (newoffset int64, err error) { |
| 1500 | r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0) |
| 1501 | newoffset = int64(int64(r1)<<32 | int64(r0)) |
| 1502 | if e1 != 0 { |
| 1503 | err = errnoErr(e1) |
| 1504 | } |
| 1505 | return |
| 1506 | } |
| 1507 | |
| 1508 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1509 | |
| 1510 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 1511 | r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| 1512 | n = int(r0) |
| 1513 | if e1 != 0 { |
| 1514 | err = errnoErr(e1) |
| 1515 | } |
| 1516 | return |
| 1517 | } |
| 1518 | |
| 1519 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1520 | |
| 1521 | func Setegid(egid int) (err error) { |
| 1522 | _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0) |
| 1523 | if e1 != 0 { |
| 1524 | err = errnoErr(e1) |
| 1525 | } |
| 1526 | return |
| 1527 | } |
| 1528 | |
| 1529 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1530 | |
| 1531 | func Seteuid(euid int) (err error) { |
| 1532 | _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) |
| 1533 | if e1 != 0 { |
| 1534 | err = errnoErr(e1) |
| 1535 | } |
| 1536 | return |
| 1537 | } |
| 1538 | |
| 1539 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1540 | |
| 1541 | func Setgid(gid int) (err error) { |
| 1542 | _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) |
| 1543 | if e1 != 0 { |
| 1544 | err = errnoErr(e1) |
| 1545 | } |
| 1546 | return |
| 1547 | } |
| 1548 | |
| 1549 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1550 | |
| 1551 | func Setpgid(pid int, pgid int) (err error) { |
| 1552 | _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) |
| 1553 | if e1 != 0 { |
| 1554 | err = errnoErr(e1) |
| 1555 | } |
| 1556 | return |
| 1557 | } |
| 1558 | |
| 1559 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1560 | |
| 1561 | func Setpriority(which int, who int, prio int) (err error) { |
| 1562 | _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) |
| 1563 | if e1 != 0 { |
| 1564 | err = errnoErr(e1) |
| 1565 | } |
| 1566 | return |
| 1567 | } |
| 1568 | |
| 1569 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1570 | |
| 1571 | func Setregid(rgid int, egid int) (err error) { |
| 1572 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 1573 | if e1 != 0 { |
| 1574 | err = errnoErr(e1) |
| 1575 | } |
| 1576 | return |
| 1577 | } |
| 1578 | |
| 1579 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1580 | |
| 1581 | func Setreuid(ruid int, euid int) (err error) { |
| 1582 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 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 Setrlimit(which int, lim *Rlimit) (err error) { |
| 1592 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 1593 | if e1 != 0 { |
| 1594 | err = errnoErr(e1) |
| 1595 | } |
| 1596 | return |
| 1597 | } |
| 1598 | |
| 1599 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1600 | |
| 1601 | func Setsid() (pid int, err error) { |
| 1602 | r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) |
| 1603 | pid = int(r0) |
| 1604 | if e1 != 0 { |
| 1605 | err = errnoErr(e1) |
| 1606 | } |
| 1607 | return |
| 1608 | } |
| 1609 | |
| 1610 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1611 | |
| 1612 | func Settimeofday(tp *Timeval) (err error) { |
| 1613 | _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) |
| 1614 | if e1 != 0 { |
| 1615 | err = errnoErr(e1) |
| 1616 | } |
| 1617 | return |
| 1618 | } |
| 1619 | |
| 1620 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1621 | |
| 1622 | func Setuid(uid int) (err error) { |
| 1623 | _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) |
| 1624 | if e1 != 0 { |
| 1625 | err = errnoErr(e1) |
| 1626 | } |
| 1627 | return |
| 1628 | } |
| 1629 | |
| 1630 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1631 | |
| 1632 | func Stat(path string, stat *Stat_t) (err error) { |
| 1633 | var _p0 *byte |
| 1634 | _p0, err = BytePtrFromString(path) |
| 1635 | if err != nil { |
| 1636 | return |
| 1637 | } |
| 1638 | _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1639 | if e1 != 0 { |
| 1640 | err = errnoErr(e1) |
| 1641 | } |
| 1642 | return |
| 1643 | } |
| 1644 | |
| 1645 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1646 | |
| 1647 | func Statvfs1(path string, buf *Statvfs_t, flags int) (err error) { |
| 1648 | var _p0 *byte |
| 1649 | _p0, err = BytePtrFromString(path) |
| 1650 | if err != nil { |
| 1651 | return |
| 1652 | } |
| 1653 | _, _, e1 := Syscall(SYS_STATVFS1, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), uintptr(flags)) |
| 1654 | if e1 != 0 { |
| 1655 | err = errnoErr(e1) |
| 1656 | } |
| 1657 | return |
| 1658 | } |
| 1659 | |
| 1660 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1661 | |
| 1662 | func Symlink(path string, link string) (err error) { |
| 1663 | var _p0 *byte |
| 1664 | _p0, err = BytePtrFromString(path) |
| 1665 | if err != nil { |
| 1666 | return |
| 1667 | } |
| 1668 | var _p1 *byte |
| 1669 | _p1, err = BytePtrFromString(link) |
| 1670 | if err != nil { |
| 1671 | return |
| 1672 | } |
| 1673 | _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 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 Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { |
| 1683 | var _p0 *byte |
| 1684 | _p0, err = BytePtrFromString(oldpath) |
| 1685 | if err != nil { |
| 1686 | return |
| 1687 | } |
| 1688 | var _p1 *byte |
| 1689 | _p1, err = BytePtrFromString(newpath) |
| 1690 | if err != nil { |
| 1691 | return |
| 1692 | } |
| 1693 | _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) |
| 1694 | if e1 != 0 { |
| 1695 | err = errnoErr(e1) |
| 1696 | } |
| 1697 | return |
| 1698 | } |
| 1699 | |
| 1700 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1701 | |
| 1702 | func Sync() (err error) { |
| 1703 | _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) |
| 1704 | if e1 != 0 { |
| 1705 | err = errnoErr(e1) |
| 1706 | } |
| 1707 | return |
| 1708 | } |
| 1709 | |
| 1710 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1711 | |
| 1712 | func Truncate(path string, length int64) (err error) { |
| 1713 | var _p0 *byte |
| 1714 | _p0, err = BytePtrFromString(path) |
| 1715 | if err != nil { |
| 1716 | return |
| 1717 | } |
| 1718 | _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0) |
| 1719 | if e1 != 0 { |
| 1720 | err = errnoErr(e1) |
| 1721 | } |
| 1722 | return |
| 1723 | } |
| 1724 | |
| 1725 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1726 | |
| 1727 | func Umask(newmask int) (oldmask int) { |
| 1728 | r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) |
| 1729 | oldmask = int(r0) |
| 1730 | return |
| 1731 | } |
| 1732 | |
| 1733 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1734 | |
| 1735 | func Unlink(path string) (err error) { |
| 1736 | var _p0 *byte |
| 1737 | _p0, err = BytePtrFromString(path) |
| 1738 | if err != nil { |
| 1739 | return |
| 1740 | } |
| 1741 | _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1742 | if e1 != 0 { |
| 1743 | err = errnoErr(e1) |
| 1744 | } |
| 1745 | return |
| 1746 | } |
| 1747 | |
| 1748 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1749 | |
| 1750 | func Unlinkat(dirfd int, path string, flags int) (err error) { |
| 1751 | var _p0 *byte |
| 1752 | _p0, err = BytePtrFromString(path) |
| 1753 | if err != nil { |
| 1754 | return |
| 1755 | } |
| 1756 | _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) |
| 1757 | if e1 != 0 { |
| 1758 | err = errnoErr(e1) |
| 1759 | } |
| 1760 | return |
| 1761 | } |
| 1762 | |
| 1763 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1764 | |
| 1765 | func Unmount(path string, flags int) (err error) { |
| 1766 | var _p0 *byte |
| 1767 | _p0, err = BytePtrFromString(path) |
| 1768 | if err != nil { |
| 1769 | return |
| 1770 | } |
| 1771 | _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 1772 | if e1 != 0 { |
| 1773 | err = errnoErr(e1) |
| 1774 | } |
| 1775 | return |
| 1776 | } |
| 1777 | |
| 1778 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1779 | |
| 1780 | func write(fd int, p []byte) (n int, err error) { |
| 1781 | var _p0 unsafe.Pointer |
| 1782 | if len(p) > 0 { |
| 1783 | _p0 = unsafe.Pointer(&p[0]) |
| 1784 | } else { |
| 1785 | _p0 = unsafe.Pointer(&_zero) |
| 1786 | } |
| 1787 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1788 | n = int(r0) |
| 1789 | if e1 != 0 { |
| 1790 | err = errnoErr(e1) |
| 1791 | } |
| 1792 | return |
| 1793 | } |
| 1794 | |
| 1795 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1796 | |
| 1797 | func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { |
| 1798 | r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0) |
| 1799 | ret = uintptr(r0) |
| 1800 | if e1 != 0 { |
| 1801 | err = errnoErr(e1) |
| 1802 | } |
| 1803 | return |
| 1804 | } |
| 1805 | |
| 1806 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1807 | |
| 1808 | func munmap(addr uintptr, length uintptr) (err error) { |
| 1809 | _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0) |
| 1810 | if e1 != 0 { |
| 1811 | err = errnoErr(e1) |
| 1812 | } |
| 1813 | return |
| 1814 | } |
| 1815 | |
| 1816 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1817 | |
| 1818 | func readlen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1819 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1820 | n = int(r0) |
| 1821 | if e1 != 0 { |
| 1822 | err = errnoErr(e1) |
| 1823 | } |
| 1824 | return |
| 1825 | } |
| 1826 | |
| 1827 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1828 | |
| 1829 | func writelen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1830 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1831 | n = int(r0) |
| 1832 | if e1 != 0 { |
| 1833 | err = errnoErr(e1) |
| 1834 | } |
| 1835 | return |
| 1836 | } |
| 1837 | |
| 1838 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1839 | |
| 1840 | func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) { |
| 1841 | var _p0 *byte |
| 1842 | _p0, err = BytePtrFromString(path) |
| 1843 | if err != nil { |
| 1844 | return |
| 1845 | } |
| 1846 | _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0) |
| 1847 | if e1 != 0 { |
| 1848 | err = errnoErr(e1) |
| 1849 | } |
| 1850 | return |
| 1851 | } |