William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 1 | // go run mksyscall.go -tags darwin,amd64,!go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go |
| 2 | // Code generated by the command above; see README.md. DO NOT EDIT. |
| 3 | |
| 4 | // +build darwin,amd64,!go1.12 |
| 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 | |
William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 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 fcntl(fd int, cmd int, arg int) (val int, err error) { |
| 243 | r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)) |
| 244 | val = 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 poll(fds *PollFd, nfds int, timeout int) (n int, err error) { |
| 254 | r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout)) |
| 255 | n = int(r0) |
| 256 | if e1 != 0 { |
| 257 | err = errnoErr(e1) |
| 258 | } |
| 259 | return |
| 260 | } |
| 261 | |
| 262 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 263 | |
| 264 | func Madvise(b []byte, behav int) (err error) { |
| 265 | var _p0 unsafe.Pointer |
| 266 | if len(b) > 0 { |
| 267 | _p0 = unsafe.Pointer(&b[0]) |
| 268 | } else { |
| 269 | _p0 = unsafe.Pointer(&_zero) |
| 270 | } |
| 271 | _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav)) |
| 272 | if e1 != 0 { |
| 273 | err = errnoErr(e1) |
| 274 | } |
| 275 | return |
| 276 | } |
| 277 | |
| 278 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 279 | |
| 280 | func Mlock(b []byte) (err error) { |
| 281 | var _p0 unsafe.Pointer |
| 282 | if len(b) > 0 { |
| 283 | _p0 = unsafe.Pointer(&b[0]) |
| 284 | } else { |
| 285 | _p0 = unsafe.Pointer(&_zero) |
| 286 | } |
| 287 | _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 288 | if e1 != 0 { |
| 289 | err = errnoErr(e1) |
| 290 | } |
| 291 | return |
| 292 | } |
| 293 | |
| 294 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 295 | |
| 296 | func Mlockall(flags int) (err error) { |
| 297 | _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0) |
| 298 | if e1 != 0 { |
| 299 | err = errnoErr(e1) |
| 300 | } |
| 301 | return |
| 302 | } |
| 303 | |
| 304 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 305 | |
| 306 | func Mprotect(b []byte, prot int) (err error) { |
| 307 | var _p0 unsafe.Pointer |
| 308 | if len(b) > 0 { |
| 309 | _p0 = unsafe.Pointer(&b[0]) |
| 310 | } else { |
| 311 | _p0 = unsafe.Pointer(&_zero) |
| 312 | } |
| 313 | _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot)) |
| 314 | if e1 != 0 { |
| 315 | err = errnoErr(e1) |
| 316 | } |
| 317 | return |
| 318 | } |
| 319 | |
| 320 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 321 | |
| 322 | func Msync(b []byte, flags int) (err error) { |
| 323 | var _p0 unsafe.Pointer |
| 324 | if len(b) > 0 { |
| 325 | _p0 = unsafe.Pointer(&b[0]) |
| 326 | } else { |
| 327 | _p0 = unsafe.Pointer(&_zero) |
| 328 | } |
| 329 | _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags)) |
| 330 | if e1 != 0 { |
| 331 | err = errnoErr(e1) |
| 332 | } |
| 333 | return |
| 334 | } |
| 335 | |
| 336 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 337 | |
| 338 | func Munlock(b []byte) (err error) { |
| 339 | var _p0 unsafe.Pointer |
| 340 | if len(b) > 0 { |
| 341 | _p0 = unsafe.Pointer(&b[0]) |
| 342 | } else { |
| 343 | _p0 = unsafe.Pointer(&_zero) |
| 344 | } |
| 345 | _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0) |
| 346 | if e1 != 0 { |
| 347 | err = errnoErr(e1) |
| 348 | } |
| 349 | return |
| 350 | } |
| 351 | |
| 352 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 353 | |
| 354 | func Munlockall() (err error) { |
| 355 | _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0) |
| 356 | if e1 != 0 { |
| 357 | err = errnoErr(e1) |
| 358 | } |
| 359 | return |
| 360 | } |
| 361 | |
| 362 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 363 | |
William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 364 | func getattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { |
| 365 | _, _, e1 := Syscall6(SYS_GETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) |
| 366 | if e1 != 0 { |
| 367 | err = errnoErr(e1) |
| 368 | } |
| 369 | return |
| 370 | } |
| 371 | |
| 372 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 373 | |
| 374 | func pipe() (r int, w int, err error) { |
| 375 | r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0) |
| 376 | r = int(r0) |
| 377 | w = int(r1) |
| 378 | if e1 != 0 { |
| 379 | err = errnoErr(e1) |
| 380 | } |
| 381 | return |
| 382 | } |
| 383 | |
| 384 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 385 | |
| 386 | func getxattr(path string, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { |
| 387 | var _p0 *byte |
| 388 | _p0, err = BytePtrFromString(path) |
| 389 | if err != nil { |
| 390 | return |
| 391 | } |
| 392 | var _p1 *byte |
| 393 | _p1, err = BytePtrFromString(attr) |
| 394 | if err != nil { |
| 395 | return |
| 396 | } |
| 397 | r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) |
| 398 | sz = int(r0) |
| 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 fgetxattr(fd int, attr string, dest *byte, size int, position uint32, options int) (sz int, err error) { |
| 408 | var _p0 *byte |
| 409 | _p0, err = BytePtrFromString(attr) |
| 410 | if err != nil { |
| 411 | return |
| 412 | } |
| 413 | r0, _, e1 := Syscall6(SYS_FGETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(position), uintptr(options)) |
| 414 | sz = int(r0) |
| 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 setxattr(path string, attr string, data *byte, size int, position uint32, options int) (err error) { |
| 424 | var _p0 *byte |
| 425 | _p0, err = BytePtrFromString(path) |
| 426 | if err != nil { |
| 427 | return |
| 428 | } |
| 429 | var _p1 *byte |
| 430 | _p1, err = BytePtrFromString(attr) |
| 431 | if err != nil { |
| 432 | return |
| 433 | } |
| 434 | _, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) |
| 435 | if e1 != 0 { |
| 436 | err = errnoErr(e1) |
| 437 | } |
| 438 | return |
| 439 | } |
| 440 | |
| 441 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 442 | |
| 443 | func fsetxattr(fd int, attr string, data *byte, size int, position uint32, options int) (err error) { |
| 444 | var _p0 *byte |
| 445 | _p0, err = BytePtrFromString(attr) |
| 446 | if err != nil { |
| 447 | return |
| 448 | } |
| 449 | _, _, e1 := Syscall6(SYS_FSETXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(data)), uintptr(size), uintptr(position), uintptr(options)) |
| 450 | if e1 != 0 { |
| 451 | err = errnoErr(e1) |
| 452 | } |
| 453 | return |
| 454 | } |
| 455 | |
| 456 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 457 | |
| 458 | func removexattr(path string, attr string, options int) (err error) { |
| 459 | var _p0 *byte |
| 460 | _p0, err = BytePtrFromString(path) |
| 461 | if err != nil { |
| 462 | return |
| 463 | } |
| 464 | var _p1 *byte |
| 465 | _p1, err = BytePtrFromString(attr) |
| 466 | if err != nil { |
| 467 | return |
| 468 | } |
| 469 | _, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) |
| 470 | if e1 != 0 { |
| 471 | err = errnoErr(e1) |
| 472 | } |
| 473 | return |
| 474 | } |
| 475 | |
| 476 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 477 | |
| 478 | func fremovexattr(fd int, attr string, options int) (err error) { |
| 479 | var _p0 *byte |
| 480 | _p0, err = BytePtrFromString(attr) |
| 481 | if err != nil { |
| 482 | return |
| 483 | } |
| 484 | _, _, e1 := Syscall(SYS_FREMOVEXATTR, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(options)) |
| 485 | if e1 != 0 { |
| 486 | err = errnoErr(e1) |
| 487 | } |
| 488 | return |
| 489 | } |
| 490 | |
| 491 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 492 | |
| 493 | func listxattr(path string, dest *byte, size int, options int) (sz int, err error) { |
| 494 | var _p0 *byte |
| 495 | _p0, err = BytePtrFromString(path) |
| 496 | if err != nil { |
| 497 | return |
| 498 | } |
| 499 | r0, _, e1 := Syscall6(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) |
| 500 | sz = int(r0) |
| 501 | if e1 != 0 { |
| 502 | err = errnoErr(e1) |
| 503 | } |
| 504 | return |
| 505 | } |
| 506 | |
| 507 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 508 | |
| 509 | func flistxattr(fd int, dest *byte, size int, options int) (sz int, err error) { |
| 510 | r0, _, e1 := Syscall6(SYS_FLISTXATTR, uintptr(fd), uintptr(unsafe.Pointer(dest)), uintptr(size), uintptr(options), 0, 0) |
| 511 | sz = int(r0) |
| 512 | if e1 != 0 { |
| 513 | err = errnoErr(e1) |
| 514 | } |
| 515 | return |
| 516 | } |
| 517 | |
| 518 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 519 | |
| 520 | func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) { |
| 521 | _, _, e1 := Syscall6(SYS_SETATTRLIST, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0) |
| 522 | if e1 != 0 { |
| 523 | err = errnoErr(e1) |
| 524 | } |
| 525 | return |
| 526 | } |
| 527 | |
| 528 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 529 | |
| 530 | func kill(pid int, signum int, posix int) (err error) { |
| 531 | _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)) |
| 532 | if e1 != 0 { |
| 533 | err = errnoErr(e1) |
| 534 | } |
| 535 | return |
| 536 | } |
| 537 | |
| 538 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 539 | |
| 540 | func ioctl(fd int, req uint, arg uintptr) (err error) { |
| 541 | _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg)) |
| 542 | if e1 != 0 { |
| 543 | err = errnoErr(e1) |
| 544 | } |
| 545 | return |
| 546 | } |
| 547 | |
| 548 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 549 | |
| 550 | func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { |
| 551 | _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) |
| 552 | if e1 != 0 { |
| 553 | err = errnoErr(e1) |
| 554 | } |
| 555 | return |
| 556 | } |
| 557 | |
| 558 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 559 | |
| 560 | func Access(path string, mode uint32) (err error) { |
| 561 | var _p0 *byte |
| 562 | _p0, err = BytePtrFromString(path) |
| 563 | if err != nil { |
| 564 | return |
| 565 | } |
| 566 | _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 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 Adjtime(delta *Timeval, olddelta *Timeval) (err error) { |
| 576 | _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0) |
| 577 | if e1 != 0 { |
| 578 | err = errnoErr(e1) |
| 579 | } |
| 580 | return |
| 581 | } |
| 582 | |
| 583 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 584 | |
| 585 | func Chdir(path string) (err error) { |
| 586 | var _p0 *byte |
| 587 | _p0, err = BytePtrFromString(path) |
| 588 | if err != nil { |
| 589 | return |
| 590 | } |
| 591 | _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 592 | if e1 != 0 { |
| 593 | err = errnoErr(e1) |
| 594 | } |
| 595 | return |
| 596 | } |
| 597 | |
| 598 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 599 | |
| 600 | func Chflags(path string, flags int) (err error) { |
| 601 | var _p0 *byte |
| 602 | _p0, err = BytePtrFromString(path) |
| 603 | if err != nil { |
| 604 | return |
| 605 | } |
| 606 | _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 607 | if e1 != 0 { |
| 608 | err = errnoErr(e1) |
| 609 | } |
| 610 | return |
| 611 | } |
| 612 | |
| 613 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 614 | |
| 615 | func Chmod(path string, mode uint32) (err error) { |
| 616 | var _p0 *byte |
| 617 | _p0, err = BytePtrFromString(path) |
| 618 | if err != nil { |
| 619 | return |
| 620 | } |
| 621 | _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 622 | if e1 != 0 { |
| 623 | err = errnoErr(e1) |
| 624 | } |
| 625 | return |
| 626 | } |
| 627 | |
| 628 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 629 | |
| 630 | func Chown(path string, uid int, gid int) (err error) { |
| 631 | var _p0 *byte |
| 632 | _p0, err = BytePtrFromString(path) |
| 633 | if err != nil { |
| 634 | return |
| 635 | } |
| 636 | _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 637 | if e1 != 0 { |
| 638 | err = errnoErr(e1) |
| 639 | } |
| 640 | return |
| 641 | } |
| 642 | |
| 643 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 644 | |
| 645 | func Chroot(path string) (err error) { |
| 646 | var _p0 *byte |
| 647 | _p0, err = BytePtrFromString(path) |
| 648 | if err != nil { |
| 649 | return |
| 650 | } |
| 651 | _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 652 | if e1 != 0 { |
| 653 | err = errnoErr(e1) |
| 654 | } |
| 655 | return |
| 656 | } |
| 657 | |
| 658 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 659 | |
| 660 | func Close(fd int) (err error) { |
| 661 | _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0) |
| 662 | if e1 != 0 { |
| 663 | err = errnoErr(e1) |
| 664 | } |
| 665 | return |
| 666 | } |
| 667 | |
| 668 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 669 | |
| 670 | func Dup(fd int) (nfd int, err error) { |
| 671 | r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0) |
| 672 | nfd = int(r0) |
| 673 | if e1 != 0 { |
| 674 | err = errnoErr(e1) |
| 675 | } |
| 676 | return |
| 677 | } |
| 678 | |
| 679 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 680 | |
| 681 | func Dup2(from int, to int) (err error) { |
| 682 | _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0) |
| 683 | if e1 != 0 { |
| 684 | err = errnoErr(e1) |
| 685 | } |
| 686 | return |
| 687 | } |
| 688 | |
| 689 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 690 | |
| 691 | func Exchangedata(path1 string, path2 string, options int) (err error) { |
| 692 | var _p0 *byte |
| 693 | _p0, err = BytePtrFromString(path1) |
| 694 | if err != nil { |
| 695 | return |
| 696 | } |
| 697 | var _p1 *byte |
| 698 | _p1, err = BytePtrFromString(path2) |
| 699 | if err != nil { |
| 700 | return |
| 701 | } |
| 702 | _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(options)) |
| 703 | if e1 != 0 { |
| 704 | err = errnoErr(e1) |
| 705 | } |
| 706 | return |
| 707 | } |
| 708 | |
| 709 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 710 | |
| 711 | func Exit(code int) { |
| 712 | Syscall(SYS_EXIT, uintptr(code), 0, 0) |
| 713 | return |
| 714 | } |
| 715 | |
| 716 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 717 | |
| 718 | func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 719 | var _p0 *byte |
| 720 | _p0, err = BytePtrFromString(path) |
| 721 | if err != nil { |
| 722 | return |
| 723 | } |
| 724 | _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 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 Fchdir(fd int) (err error) { |
| 734 | _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0) |
| 735 | if e1 != 0 { |
| 736 | err = errnoErr(e1) |
| 737 | } |
| 738 | return |
| 739 | } |
| 740 | |
| 741 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 742 | |
| 743 | func Fchflags(fd int, flags int) (err error) { |
| 744 | _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0) |
| 745 | if e1 != 0 { |
| 746 | err = errnoErr(e1) |
| 747 | } |
| 748 | return |
| 749 | } |
| 750 | |
| 751 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 752 | |
| 753 | func Fchmod(fd int, mode uint32) (err error) { |
| 754 | _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0) |
| 755 | if e1 != 0 { |
| 756 | err = errnoErr(e1) |
| 757 | } |
| 758 | return |
| 759 | } |
| 760 | |
| 761 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 762 | |
| 763 | func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) { |
| 764 | var _p0 *byte |
| 765 | _p0, err = BytePtrFromString(path) |
| 766 | if err != nil { |
| 767 | return |
| 768 | } |
| 769 | _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0) |
| 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 Fchown(fd int, uid int, gid int) (err error) { |
| 779 | _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)) |
| 780 | if e1 != 0 { |
| 781 | err = errnoErr(e1) |
| 782 | } |
| 783 | return |
| 784 | } |
| 785 | |
| 786 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 787 | |
| 788 | func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) { |
| 789 | var _p0 *byte |
| 790 | _p0, err = BytePtrFromString(path) |
| 791 | if err != nil { |
| 792 | return |
| 793 | } |
| 794 | _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0) |
| 795 | if e1 != 0 { |
| 796 | err = errnoErr(e1) |
| 797 | } |
| 798 | return |
| 799 | } |
| 800 | |
| 801 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 802 | |
| 803 | func Flock(fd int, how int) (err error) { |
| 804 | _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0) |
| 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 Fpathconf(fd int, name int) (val int, err error) { |
| 814 | r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0) |
| 815 | val = int(r0) |
| 816 | if e1 != 0 { |
| 817 | err = errnoErr(e1) |
| 818 | } |
| 819 | return |
| 820 | } |
| 821 | |
| 822 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 823 | |
| 824 | func Fsync(fd int) (err error) { |
| 825 | _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0) |
| 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 Ftruncate(fd int, length int64) (err error) { |
| 835 | _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 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 Getdtablesize() (size int) { |
| 845 | r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0) |
| 846 | size = int(r0) |
| 847 | return |
| 848 | } |
| 849 | |
| 850 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 851 | |
| 852 | func Getegid() (egid int) { |
| 853 | r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0) |
| 854 | egid = int(r0) |
| 855 | return |
| 856 | } |
| 857 | |
| 858 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 859 | |
| 860 | func Geteuid() (uid int) { |
| 861 | r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0) |
| 862 | uid = int(r0) |
| 863 | return |
| 864 | } |
| 865 | |
| 866 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 867 | |
| 868 | func Getgid() (gid int) { |
| 869 | r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0) |
| 870 | gid = int(r0) |
| 871 | return |
| 872 | } |
| 873 | |
| 874 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 875 | |
| 876 | func Getpgid(pid int) (pgid int, err error) { |
| 877 | r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0) |
| 878 | pgid = int(r0) |
| 879 | if e1 != 0 { |
| 880 | err = errnoErr(e1) |
| 881 | } |
| 882 | return |
| 883 | } |
| 884 | |
| 885 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 886 | |
| 887 | func Getpgrp() (pgrp int) { |
| 888 | r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0) |
| 889 | pgrp = int(r0) |
| 890 | return |
| 891 | } |
| 892 | |
| 893 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 894 | |
| 895 | func Getpid() (pid int) { |
| 896 | r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0) |
| 897 | pid = int(r0) |
| 898 | return |
| 899 | } |
| 900 | |
| 901 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 902 | |
| 903 | func Getppid() (ppid int) { |
| 904 | r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0) |
| 905 | ppid = int(r0) |
| 906 | return |
| 907 | } |
| 908 | |
| 909 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 910 | |
| 911 | func Getpriority(which int, who int) (prio int, err error) { |
| 912 | r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0) |
| 913 | prio = int(r0) |
| 914 | if e1 != 0 { |
| 915 | err = errnoErr(e1) |
| 916 | } |
| 917 | return |
| 918 | } |
| 919 | |
| 920 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 921 | |
| 922 | func Getrlimit(which int, lim *Rlimit) (err error) { |
| 923 | _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 924 | if e1 != 0 { |
| 925 | err = errnoErr(e1) |
| 926 | } |
| 927 | return |
| 928 | } |
| 929 | |
| 930 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 931 | |
| 932 | func Getrusage(who int, rusage *Rusage) (err error) { |
| 933 | _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0) |
| 934 | if e1 != 0 { |
| 935 | err = errnoErr(e1) |
| 936 | } |
| 937 | return |
| 938 | } |
| 939 | |
| 940 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 941 | |
| 942 | func Getsid(pid int) (sid int, err error) { |
| 943 | r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0) |
| 944 | sid = int(r0) |
| 945 | if e1 != 0 { |
| 946 | err = errnoErr(e1) |
| 947 | } |
| 948 | return |
| 949 | } |
| 950 | |
| 951 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 952 | |
| 953 | func Getuid() (uid int) { |
| 954 | r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0) |
| 955 | uid = int(r0) |
| 956 | return |
| 957 | } |
| 958 | |
| 959 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 960 | |
| 961 | func Issetugid() (tainted bool) { |
| 962 | r0, _, _ := RawSyscall(SYS_ISSETUGID, 0, 0, 0) |
| 963 | tainted = bool(r0 != 0) |
| 964 | return |
| 965 | } |
| 966 | |
| 967 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 968 | |
| 969 | func Kqueue() (fd int, err error) { |
| 970 | r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0) |
| 971 | fd = int(r0) |
| 972 | if e1 != 0 { |
| 973 | err = errnoErr(e1) |
| 974 | } |
| 975 | return |
| 976 | } |
| 977 | |
| 978 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 979 | |
| 980 | func Lchown(path string, uid int, gid int) (err error) { |
| 981 | var _p0 *byte |
| 982 | _p0, err = BytePtrFromString(path) |
| 983 | if err != nil { |
| 984 | return |
| 985 | } |
| 986 | _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid)) |
| 987 | if e1 != 0 { |
| 988 | err = errnoErr(e1) |
| 989 | } |
| 990 | return |
| 991 | } |
| 992 | |
| 993 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 994 | |
| 995 | func Link(path string, link string) (err error) { |
| 996 | var _p0 *byte |
| 997 | _p0, err = BytePtrFromString(path) |
| 998 | if err != nil { |
| 999 | return |
| 1000 | } |
| 1001 | var _p1 *byte |
| 1002 | _p1, err = BytePtrFromString(link) |
| 1003 | if err != nil { |
| 1004 | return |
| 1005 | } |
| 1006 | _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1007 | if e1 != 0 { |
| 1008 | err = errnoErr(e1) |
| 1009 | } |
| 1010 | return |
| 1011 | } |
| 1012 | |
| 1013 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1014 | |
| 1015 | func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) { |
| 1016 | var _p0 *byte |
| 1017 | _p0, err = BytePtrFromString(path) |
| 1018 | if err != nil { |
| 1019 | return |
| 1020 | } |
| 1021 | var _p1 *byte |
| 1022 | _p1, err = BytePtrFromString(link) |
| 1023 | if err != nil { |
| 1024 | return |
| 1025 | } |
| 1026 | _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0) |
| 1027 | if e1 != 0 { |
| 1028 | err = errnoErr(e1) |
| 1029 | } |
| 1030 | return |
| 1031 | } |
| 1032 | |
| 1033 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1034 | |
| 1035 | func Listen(s int, backlog int) (err error) { |
| 1036 | _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0) |
| 1037 | if e1 != 0 { |
| 1038 | err = errnoErr(e1) |
| 1039 | } |
| 1040 | return |
| 1041 | } |
| 1042 | |
| 1043 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1044 | |
| 1045 | func Mkdir(path string, mode uint32) (err error) { |
| 1046 | var _p0 *byte |
| 1047 | _p0, err = BytePtrFromString(path) |
| 1048 | if err != nil { |
| 1049 | return |
| 1050 | } |
| 1051 | _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 1052 | if e1 != 0 { |
| 1053 | err = errnoErr(e1) |
| 1054 | } |
| 1055 | return |
| 1056 | } |
| 1057 | |
| 1058 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1059 | |
| 1060 | func Mkdirat(dirfd int, path string, mode uint32) (err error) { |
| 1061 | var _p0 *byte |
| 1062 | _p0, err = BytePtrFromString(path) |
| 1063 | if err != nil { |
| 1064 | return |
| 1065 | } |
| 1066 | _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode)) |
| 1067 | if e1 != 0 { |
| 1068 | err = errnoErr(e1) |
| 1069 | } |
| 1070 | return |
| 1071 | } |
| 1072 | |
| 1073 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1074 | |
| 1075 | func Mkfifo(path string, mode uint32) (err error) { |
| 1076 | var _p0 *byte |
| 1077 | _p0, err = BytePtrFromString(path) |
| 1078 | if err != nil { |
| 1079 | return |
| 1080 | } |
| 1081 | _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0) |
| 1082 | if e1 != 0 { |
| 1083 | err = errnoErr(e1) |
| 1084 | } |
| 1085 | return |
| 1086 | } |
| 1087 | |
| 1088 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1089 | |
| 1090 | func Mknod(path string, mode uint32, dev int) (err error) { |
| 1091 | var _p0 *byte |
| 1092 | _p0, err = BytePtrFromString(path) |
| 1093 | if err != nil { |
| 1094 | return |
| 1095 | } |
| 1096 | _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev)) |
| 1097 | if e1 != 0 { |
| 1098 | err = errnoErr(e1) |
| 1099 | } |
| 1100 | return |
| 1101 | } |
| 1102 | |
| 1103 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1104 | |
| 1105 | func Open(path string, mode int, perm uint32) (fd int, err error) { |
| 1106 | var _p0 *byte |
| 1107 | _p0, err = BytePtrFromString(path) |
| 1108 | if err != nil { |
| 1109 | return |
| 1110 | } |
| 1111 | r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm)) |
| 1112 | fd = int(r0) |
| 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 Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) { |
| 1122 | var _p0 *byte |
| 1123 | _p0, err = BytePtrFromString(path) |
| 1124 | if err != nil { |
| 1125 | return |
| 1126 | } |
| 1127 | r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0) |
| 1128 | fd = int(r0) |
| 1129 | if e1 != 0 { |
| 1130 | err = errnoErr(e1) |
| 1131 | } |
| 1132 | return |
| 1133 | } |
| 1134 | |
| 1135 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1136 | |
| 1137 | func Pathconf(path string, name int) (val int, err error) { |
| 1138 | var _p0 *byte |
| 1139 | _p0, err = BytePtrFromString(path) |
| 1140 | if err != nil { |
| 1141 | return |
| 1142 | } |
| 1143 | r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0) |
| 1144 | val = int(r0) |
| 1145 | if e1 != 0 { |
| 1146 | err = errnoErr(e1) |
| 1147 | } |
| 1148 | return |
| 1149 | } |
| 1150 | |
| 1151 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1152 | |
| 1153 | func Pread(fd int, p []byte, offset int64) (n int, err error) { |
| 1154 | var _p0 unsafe.Pointer |
| 1155 | if len(p) > 0 { |
| 1156 | _p0 = unsafe.Pointer(&p[0]) |
| 1157 | } else { |
| 1158 | _p0 = unsafe.Pointer(&_zero) |
| 1159 | } |
| 1160 | r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 1161 | n = int(r0) |
| 1162 | if e1 != 0 { |
| 1163 | err = errnoErr(e1) |
| 1164 | } |
| 1165 | return |
| 1166 | } |
| 1167 | |
| 1168 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1169 | |
| 1170 | func Pwrite(fd int, p []byte, offset int64) (n int, err error) { |
| 1171 | var _p0 unsafe.Pointer |
| 1172 | if len(p) > 0 { |
| 1173 | _p0 = unsafe.Pointer(&p[0]) |
| 1174 | } else { |
| 1175 | _p0 = unsafe.Pointer(&_zero) |
| 1176 | } |
| 1177 | r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0) |
| 1178 | n = int(r0) |
| 1179 | if e1 != 0 { |
| 1180 | err = errnoErr(e1) |
| 1181 | } |
| 1182 | return |
| 1183 | } |
| 1184 | |
| 1185 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1186 | |
| 1187 | func read(fd int, p []byte) (n int, err error) { |
| 1188 | var _p0 unsafe.Pointer |
| 1189 | if len(p) > 0 { |
| 1190 | _p0 = unsafe.Pointer(&p[0]) |
| 1191 | } else { |
| 1192 | _p0 = unsafe.Pointer(&_zero) |
| 1193 | } |
| 1194 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1195 | n = int(r0) |
| 1196 | if e1 != 0 { |
| 1197 | err = errnoErr(e1) |
| 1198 | } |
| 1199 | return |
| 1200 | } |
| 1201 | |
| 1202 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1203 | |
| 1204 | func Readlink(path string, buf []byte) (n int, err error) { |
| 1205 | var _p0 *byte |
| 1206 | _p0, err = BytePtrFromString(path) |
| 1207 | if err != nil { |
| 1208 | return |
| 1209 | } |
| 1210 | var _p1 unsafe.Pointer |
| 1211 | if len(buf) > 0 { |
| 1212 | _p1 = unsafe.Pointer(&buf[0]) |
| 1213 | } else { |
| 1214 | _p1 = unsafe.Pointer(&_zero) |
| 1215 | } |
| 1216 | r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf))) |
| 1217 | n = int(r0) |
| 1218 | if e1 != 0 { |
| 1219 | err = errnoErr(e1) |
| 1220 | } |
| 1221 | return |
| 1222 | } |
| 1223 | |
| 1224 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1225 | |
| 1226 | func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) { |
| 1227 | var _p0 *byte |
| 1228 | _p0, err = BytePtrFromString(path) |
| 1229 | if err != nil { |
| 1230 | return |
| 1231 | } |
| 1232 | var _p1 unsafe.Pointer |
| 1233 | if len(buf) > 0 { |
| 1234 | _p1 = unsafe.Pointer(&buf[0]) |
| 1235 | } else { |
| 1236 | _p1 = unsafe.Pointer(&_zero) |
| 1237 | } |
| 1238 | r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0) |
| 1239 | n = int(r0) |
| 1240 | if e1 != 0 { |
| 1241 | err = errnoErr(e1) |
| 1242 | } |
| 1243 | return |
| 1244 | } |
| 1245 | |
| 1246 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1247 | |
| 1248 | func Rename(from string, to string) (err error) { |
| 1249 | var _p0 *byte |
| 1250 | _p0, err = BytePtrFromString(from) |
| 1251 | if err != nil { |
| 1252 | return |
| 1253 | } |
| 1254 | var _p1 *byte |
| 1255 | _p1, err = BytePtrFromString(to) |
| 1256 | if err != nil { |
| 1257 | return |
| 1258 | } |
| 1259 | _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1260 | if e1 != 0 { |
| 1261 | err = errnoErr(e1) |
| 1262 | } |
| 1263 | return |
| 1264 | } |
| 1265 | |
| 1266 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1267 | |
| 1268 | func Renameat(fromfd int, from string, tofd int, to string) (err error) { |
| 1269 | var _p0 *byte |
| 1270 | _p0, err = BytePtrFromString(from) |
| 1271 | if err != nil { |
| 1272 | return |
| 1273 | } |
| 1274 | var _p1 *byte |
| 1275 | _p1, err = BytePtrFromString(to) |
| 1276 | if err != nil { |
| 1277 | return |
| 1278 | } |
| 1279 | _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0) |
| 1280 | if e1 != 0 { |
| 1281 | err = errnoErr(e1) |
| 1282 | } |
| 1283 | return |
| 1284 | } |
| 1285 | |
| 1286 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1287 | |
| 1288 | func Revoke(path string) (err error) { |
| 1289 | var _p0 *byte |
| 1290 | _p0, err = BytePtrFromString(path) |
| 1291 | if err != nil { |
| 1292 | return |
| 1293 | } |
| 1294 | _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1295 | if e1 != 0 { |
| 1296 | err = errnoErr(e1) |
| 1297 | } |
| 1298 | return |
| 1299 | } |
| 1300 | |
| 1301 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1302 | |
| 1303 | func Rmdir(path string) (err error) { |
| 1304 | var _p0 *byte |
| 1305 | _p0, err = BytePtrFromString(path) |
| 1306 | if err != nil { |
| 1307 | return |
| 1308 | } |
| 1309 | _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 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 Seek(fd int, offset int64, whence int) (newoffset int64, err error) { |
| 1319 | r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)) |
| 1320 | newoffset = int64(r0) |
| 1321 | if e1 != 0 { |
| 1322 | err = errnoErr(e1) |
| 1323 | } |
| 1324 | return |
| 1325 | } |
| 1326 | |
| 1327 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1328 | |
David Bainbridge | 788e520 | 2019-10-21 18:49:40 +0000 | [diff] [blame] | 1329 | func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) { |
| 1330 | r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0) |
| 1331 | n = int(r0) |
William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 1332 | if e1 != 0 { |
| 1333 | err = errnoErr(e1) |
| 1334 | } |
| 1335 | return |
| 1336 | } |
| 1337 | |
| 1338 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1339 | |
| 1340 | func Setegid(egid int) (err error) { |
| 1341 | _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0) |
| 1342 | if e1 != 0 { |
| 1343 | err = errnoErr(e1) |
| 1344 | } |
| 1345 | return |
| 1346 | } |
| 1347 | |
| 1348 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1349 | |
| 1350 | func Seteuid(euid int) (err error) { |
| 1351 | _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0) |
| 1352 | if e1 != 0 { |
| 1353 | err = errnoErr(e1) |
| 1354 | } |
| 1355 | return |
| 1356 | } |
| 1357 | |
| 1358 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1359 | |
| 1360 | func Setgid(gid int) (err error) { |
| 1361 | _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0) |
| 1362 | if e1 != 0 { |
| 1363 | err = errnoErr(e1) |
| 1364 | } |
| 1365 | return |
| 1366 | } |
| 1367 | |
| 1368 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1369 | |
| 1370 | func Setlogin(name string) (err error) { |
| 1371 | var _p0 *byte |
| 1372 | _p0, err = BytePtrFromString(name) |
| 1373 | if err != nil { |
| 1374 | return |
| 1375 | } |
| 1376 | _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 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 Setpgid(pid int, pgid int) (err error) { |
| 1386 | _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0) |
| 1387 | if e1 != 0 { |
| 1388 | err = errnoErr(e1) |
| 1389 | } |
| 1390 | return |
| 1391 | } |
| 1392 | |
| 1393 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1394 | |
| 1395 | func Setpriority(which int, who int, prio int) (err error) { |
| 1396 | _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)) |
| 1397 | if e1 != 0 { |
| 1398 | err = errnoErr(e1) |
| 1399 | } |
| 1400 | return |
| 1401 | } |
| 1402 | |
| 1403 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1404 | |
| 1405 | func Setprivexec(flag int) (err error) { |
| 1406 | _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0) |
| 1407 | if e1 != 0 { |
| 1408 | err = errnoErr(e1) |
| 1409 | } |
| 1410 | return |
| 1411 | } |
| 1412 | |
| 1413 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1414 | |
| 1415 | func Setregid(rgid int, egid int) (err error) { |
| 1416 | _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0) |
| 1417 | if e1 != 0 { |
| 1418 | err = errnoErr(e1) |
| 1419 | } |
| 1420 | return |
| 1421 | } |
| 1422 | |
| 1423 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1424 | |
| 1425 | func Setreuid(ruid int, euid int) (err error) { |
| 1426 | _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0) |
| 1427 | if e1 != 0 { |
| 1428 | err = errnoErr(e1) |
| 1429 | } |
| 1430 | return |
| 1431 | } |
| 1432 | |
| 1433 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1434 | |
| 1435 | func Setrlimit(which int, lim *Rlimit) (err error) { |
| 1436 | _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0) |
| 1437 | if e1 != 0 { |
| 1438 | err = errnoErr(e1) |
| 1439 | } |
| 1440 | return |
| 1441 | } |
| 1442 | |
| 1443 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1444 | |
| 1445 | func Setsid() (pid int, err error) { |
| 1446 | r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0) |
| 1447 | pid = int(r0) |
| 1448 | if e1 != 0 { |
| 1449 | err = errnoErr(e1) |
| 1450 | } |
| 1451 | return |
| 1452 | } |
| 1453 | |
| 1454 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1455 | |
| 1456 | func Settimeofday(tp *Timeval) (err error) { |
| 1457 | _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) |
| 1458 | if e1 != 0 { |
| 1459 | err = errnoErr(e1) |
| 1460 | } |
| 1461 | return |
| 1462 | } |
| 1463 | |
| 1464 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1465 | |
| 1466 | func Setuid(uid int) (err error) { |
| 1467 | _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0) |
| 1468 | if e1 != 0 { |
| 1469 | err = errnoErr(e1) |
| 1470 | } |
| 1471 | return |
| 1472 | } |
| 1473 | |
| 1474 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1475 | |
| 1476 | func Symlink(path string, link string) (err error) { |
| 1477 | var _p0 *byte |
| 1478 | _p0, err = BytePtrFromString(path) |
| 1479 | if err != nil { |
| 1480 | return |
| 1481 | } |
| 1482 | var _p1 *byte |
| 1483 | _p1, err = BytePtrFromString(link) |
| 1484 | if err != nil { |
| 1485 | return |
| 1486 | } |
| 1487 | _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0) |
| 1488 | if e1 != 0 { |
| 1489 | err = errnoErr(e1) |
| 1490 | } |
| 1491 | return |
| 1492 | } |
| 1493 | |
| 1494 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1495 | |
| 1496 | func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) { |
| 1497 | var _p0 *byte |
| 1498 | _p0, err = BytePtrFromString(oldpath) |
| 1499 | if err != nil { |
| 1500 | return |
| 1501 | } |
| 1502 | var _p1 *byte |
| 1503 | _p1, err = BytePtrFromString(newpath) |
| 1504 | if err != nil { |
| 1505 | return |
| 1506 | } |
| 1507 | _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1))) |
| 1508 | if e1 != 0 { |
| 1509 | err = errnoErr(e1) |
| 1510 | } |
| 1511 | return |
| 1512 | } |
| 1513 | |
| 1514 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1515 | |
| 1516 | func Sync() (err error) { |
| 1517 | _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0) |
| 1518 | if e1 != 0 { |
| 1519 | err = errnoErr(e1) |
| 1520 | } |
| 1521 | return |
| 1522 | } |
| 1523 | |
| 1524 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1525 | |
| 1526 | func Truncate(path string, length int64) (err error) { |
| 1527 | var _p0 *byte |
| 1528 | _p0, err = BytePtrFromString(path) |
| 1529 | if err != nil { |
| 1530 | return |
| 1531 | } |
| 1532 | _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 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 Umask(newmask int) (oldmask int) { |
| 1542 | r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0) |
| 1543 | oldmask = int(r0) |
| 1544 | return |
| 1545 | } |
| 1546 | |
| 1547 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1548 | |
| 1549 | func Undelete(path string) (err error) { |
| 1550 | var _p0 *byte |
| 1551 | _p0, err = BytePtrFromString(path) |
| 1552 | if err != nil { |
| 1553 | return |
| 1554 | } |
| 1555 | _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1556 | if e1 != 0 { |
| 1557 | err = errnoErr(e1) |
| 1558 | } |
| 1559 | return |
| 1560 | } |
| 1561 | |
| 1562 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1563 | |
| 1564 | func Unlink(path string) (err error) { |
| 1565 | var _p0 *byte |
| 1566 | _p0, err = BytePtrFromString(path) |
| 1567 | if err != nil { |
| 1568 | return |
| 1569 | } |
| 1570 | _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0) |
| 1571 | if e1 != 0 { |
| 1572 | err = errnoErr(e1) |
| 1573 | } |
| 1574 | return |
| 1575 | } |
| 1576 | |
| 1577 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1578 | |
| 1579 | func Unlinkat(dirfd int, path string, flags int) (err error) { |
| 1580 | var _p0 *byte |
| 1581 | _p0, err = BytePtrFromString(path) |
| 1582 | if err != nil { |
| 1583 | return |
| 1584 | } |
| 1585 | _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags)) |
| 1586 | if e1 != 0 { |
| 1587 | err = errnoErr(e1) |
| 1588 | } |
| 1589 | return |
| 1590 | } |
| 1591 | |
| 1592 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1593 | |
| 1594 | func Unmount(path string, flags int) (err error) { |
| 1595 | var _p0 *byte |
| 1596 | _p0, err = BytePtrFromString(path) |
| 1597 | if err != nil { |
| 1598 | return |
| 1599 | } |
| 1600 | _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0) |
| 1601 | if e1 != 0 { |
| 1602 | err = errnoErr(e1) |
| 1603 | } |
| 1604 | return |
| 1605 | } |
| 1606 | |
| 1607 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1608 | |
| 1609 | func write(fd int, p []byte) (n int, err error) { |
| 1610 | var _p0 unsafe.Pointer |
| 1611 | if len(p) > 0 { |
| 1612 | _p0 = unsafe.Pointer(&p[0]) |
| 1613 | } else { |
| 1614 | _p0 = unsafe.Pointer(&_zero) |
| 1615 | } |
| 1616 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p))) |
| 1617 | n = int(r0) |
| 1618 | if e1 != 0 { |
| 1619 | err = errnoErr(e1) |
| 1620 | } |
| 1621 | return |
| 1622 | } |
| 1623 | |
| 1624 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1625 | |
| 1626 | func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) { |
| 1627 | r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos)) |
| 1628 | ret = uintptr(r0) |
| 1629 | if e1 != 0 { |
| 1630 | err = errnoErr(e1) |
| 1631 | } |
| 1632 | return |
| 1633 | } |
| 1634 | |
| 1635 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1636 | |
| 1637 | func munmap(addr uintptr, length uintptr) (err error) { |
| 1638 | _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 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 readlen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1648 | r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1649 | n = int(r0) |
| 1650 | if e1 != 0 { |
| 1651 | err = errnoErr(e1) |
| 1652 | } |
| 1653 | return |
| 1654 | } |
| 1655 | |
| 1656 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1657 | |
| 1658 | func writelen(fd int, buf *byte, nbuf int) (n int, err error) { |
| 1659 | r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)) |
| 1660 | n = int(r0) |
| 1661 | if e1 != 0 { |
| 1662 | err = errnoErr(e1) |
| 1663 | } |
| 1664 | return |
| 1665 | } |
| 1666 | |
| 1667 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1668 | |
David Bainbridge | 788e520 | 2019-10-21 18:49:40 +0000 | [diff] [blame] | 1669 | func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { |
| 1670 | var _p0 unsafe.Pointer |
| 1671 | if len(mib) > 0 { |
| 1672 | _p0 = unsafe.Pointer(&mib[0]) |
| 1673 | } else { |
| 1674 | _p0 = unsafe.Pointer(&_zero) |
| 1675 | } |
| 1676 | _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)) |
| 1677 | if e1 != 0 { |
| 1678 | err = errnoErr(e1) |
| 1679 | } |
| 1680 | return |
| 1681 | } |
| 1682 | |
| 1683 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1684 | |
| 1685 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { |
| 1686 | _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0) |
| 1687 | if e1 != 0 { |
| 1688 | err = errnoErr(e1) |
| 1689 | } |
| 1690 | return |
| 1691 | } |
| 1692 | |
| 1693 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1694 | |
William Kurkian | ea86948 | 2019-04-09 15:16:11 -0400 | [diff] [blame] | 1695 | func gettimeofday(tp *Timeval) (sec int64, usec int32, err error) { |
| 1696 | r0, r1, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0) |
| 1697 | sec = int64(r0) |
| 1698 | usec = int32(r1) |
| 1699 | if e1 != 0 { |
| 1700 | err = errnoErr(e1) |
| 1701 | } |
| 1702 | return |
| 1703 | } |
| 1704 | |
| 1705 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1706 | |
| 1707 | func Fstat(fd int, stat *Stat_t) (err error) { |
| 1708 | _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 1709 | if e1 != 0 { |
| 1710 | err = errnoErr(e1) |
| 1711 | } |
| 1712 | return |
| 1713 | } |
| 1714 | |
| 1715 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1716 | |
| 1717 | func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) { |
| 1718 | var _p0 *byte |
| 1719 | _p0, err = BytePtrFromString(path) |
| 1720 | if err != nil { |
| 1721 | return |
| 1722 | } |
| 1723 | _, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0) |
| 1724 | if e1 != 0 { |
| 1725 | err = errnoErr(e1) |
| 1726 | } |
| 1727 | return |
| 1728 | } |
| 1729 | |
| 1730 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1731 | |
| 1732 | func Fstatfs(fd int, stat *Statfs_t) (err error) { |
| 1733 | _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0) |
| 1734 | if e1 != 0 { |
| 1735 | err = errnoErr(e1) |
| 1736 | } |
| 1737 | return |
| 1738 | } |
| 1739 | |
| 1740 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1741 | |
| 1742 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) { |
| 1743 | var _p0 unsafe.Pointer |
| 1744 | if len(buf) > 0 { |
| 1745 | _p0 = unsafe.Pointer(&buf[0]) |
| 1746 | } else { |
| 1747 | _p0 = unsafe.Pointer(&_zero) |
| 1748 | } |
| 1749 | r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0) |
| 1750 | n = int(r0) |
| 1751 | if e1 != 0 { |
| 1752 | err = errnoErr(e1) |
| 1753 | } |
| 1754 | return |
| 1755 | } |
| 1756 | |
| 1757 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1758 | |
| 1759 | func getfsstat(buf unsafe.Pointer, size uintptr, flags int) (n int, err error) { |
| 1760 | r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(buf), uintptr(size), uintptr(flags)) |
| 1761 | n = int(r0) |
| 1762 | if e1 != 0 { |
| 1763 | err = errnoErr(e1) |
| 1764 | } |
| 1765 | return |
| 1766 | } |
| 1767 | |
| 1768 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1769 | |
| 1770 | func Lstat(path string, stat *Stat_t) (err error) { |
| 1771 | var _p0 *byte |
| 1772 | _p0, err = BytePtrFromString(path) |
| 1773 | if err != nil { |
| 1774 | return |
| 1775 | } |
| 1776 | _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1777 | if e1 != 0 { |
| 1778 | err = errnoErr(e1) |
| 1779 | } |
| 1780 | return |
| 1781 | } |
| 1782 | |
| 1783 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1784 | |
| 1785 | func Stat(path string, stat *Stat_t) (err error) { |
| 1786 | var _p0 *byte |
| 1787 | _p0, err = BytePtrFromString(path) |
| 1788 | if err != nil { |
| 1789 | return |
| 1790 | } |
| 1791 | _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1792 | if e1 != 0 { |
| 1793 | err = errnoErr(e1) |
| 1794 | } |
| 1795 | return |
| 1796 | } |
| 1797 | |
| 1798 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT |
| 1799 | |
| 1800 | func Statfs(path string, stat *Statfs_t) (err error) { |
| 1801 | var _p0 *byte |
| 1802 | _p0, err = BytePtrFromString(path) |
| 1803 | if err != nil { |
| 1804 | return |
| 1805 | } |
| 1806 | _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0) |
| 1807 | if e1 != 0 { |
| 1808 | err = errnoErr(e1) |
| 1809 | } |
| 1810 | return |
| 1811 | } |