diff options
Diffstat (limited to 'vendor/golang.org/x/sys/unix/syscall_openbsd.go')
-rw-r--r-- | vendor/golang.org/x/sys/unix/syscall_openbsd.go | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index 2b9f26a..c8648ec 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go | |||
@@ -43,6 +43,23 @@ func nametomib(name string) (mib []_C_int, err error) { | |||
43 | return nil, EINVAL | 43 | return nil, EINVAL |
44 | } | 44 | } |
45 | 45 | ||
46 | func SysctlClockinfo(name string) (*Clockinfo, error) { | ||
47 | mib, err := sysctlmib(name) | ||
48 | if err != nil { | ||
49 | return nil, err | ||
50 | } | ||
51 | |||
52 | n := uintptr(SizeofClockinfo) | ||
53 | var ci Clockinfo | ||
54 | if err := sysctl(mib, (*byte)(unsafe.Pointer(&ci)), &n, nil, 0); err != nil { | ||
55 | return nil, err | ||
56 | } | ||
57 | if n != SizeofClockinfo { | ||
58 | return nil, EIO | ||
59 | } | ||
60 | return &ci, nil | ||
61 | } | ||
62 | |||
46 | func SysctlUvmexp(name string) (*Uvmexp, error) { | 63 | func SysctlUvmexp(name string) (*Uvmexp, error) { |
47 | mib, err := sysctlmib(name) | 64 | mib, err := sysctlmib(name) |
48 | if err != nil { | 65 | if err != nil { |
@@ -94,6 +111,13 @@ func Getwd() (string, error) { | |||
94 | return string(buf[:n]), nil | 111 | return string(buf[:n]), nil |
95 | } | 112 | } |
96 | 113 | ||
114 | func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | ||
115 | if raceenabled { | ||
116 | raceReleaseMerge(unsafe.Pointer(&ioSync)) | ||
117 | } | ||
118 | return sendfile(outfd, infd, offset, count) | ||
119 | } | ||
120 | |||
97 | // TODO | 121 | // TODO |
98 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { | 122 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { |
99 | return -1, ENOSYS | 123 | return -1, ENOSYS |
@@ -233,6 +257,7 @@ func Uname(uname *Utsname) error { | |||
233 | //sys Fchmod(fd int, mode uint32) (err error) | 257 | //sys Fchmod(fd int, mode uint32) (err error) |
234 | //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) | 258 | //sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) |
235 | //sys Fchown(fd int, uid int, gid int) (err error) | 259 | //sys Fchown(fd int, uid int, gid int) (err error) |
260 | //sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) | ||
236 | //sys Flock(fd int, how int) (err error) | 261 | //sys Flock(fd int, how int) (err error) |
237 | //sys Fpathconf(fd int, name int) (val int, err error) | 262 | //sys Fpathconf(fd int, name int) (val int, err error) |
238 | //sys Fstat(fd int, stat *Stat_t) (err error) | 263 | //sys Fstat(fd int, stat *Stat_t) (err error) |
@@ -259,11 +284,15 @@ func Uname(uname *Utsname) error { | |||
259 | //sys Kqueue() (fd int, err error) | 284 | //sys Kqueue() (fd int, err error) |
260 | //sys Lchown(path string, uid int, gid int) (err error) | 285 | //sys Lchown(path string, uid int, gid int) (err error) |
261 | //sys Link(path string, link string) (err error) | 286 | //sys Link(path string, link string) (err error) |
287 | //sys Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) | ||
262 | //sys Listen(s int, backlog int) (err error) | 288 | //sys Listen(s int, backlog int) (err error) |
263 | //sys Lstat(path string, stat *Stat_t) (err error) | 289 | //sys Lstat(path string, stat *Stat_t) (err error) |
264 | //sys Mkdir(path string, mode uint32) (err error) | 290 | //sys Mkdir(path string, mode uint32) (err error) |
291 | //sys Mkdirat(dirfd int, path string, mode uint32) (err error) | ||
265 | //sys Mkfifo(path string, mode uint32) (err error) | 292 | //sys Mkfifo(path string, mode uint32) (err error) |
293 | //sys Mkfifoat(dirfd int, path string, mode uint32) (err error) | ||
266 | //sys Mknod(path string, mode uint32, dev int) (err error) | 294 | //sys Mknod(path string, mode uint32, dev int) (err error) |
295 | //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) | ||
267 | //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) | 296 | //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) |
268 | //sys Open(path string, mode int, perm uint32) (fd int, err error) | 297 | //sys Open(path string, mode int, perm uint32) (fd int, err error) |
269 | //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) | 298 | //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) |
@@ -272,7 +301,9 @@ func Uname(uname *Utsname) error { | |||
272 | //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) | 301 | //sys Pwrite(fd int, p []byte, offset int64) (n int, err error) |
273 | //sys read(fd int, p []byte) (n int, err error) | 302 | //sys read(fd int, p []byte) (n int, err error) |
274 | //sys Readlink(path string, buf []byte) (n int, err error) | 303 | //sys Readlink(path string, buf []byte) (n int, err error) |
304 | //sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error) | ||
275 | //sys Rename(from string, to string) (err error) | 305 | //sys Rename(from string, to string) (err error) |
306 | //sys Renameat(fromfd int, from string, tofd int, to string) (err error) | ||
276 | //sys Revoke(path string) (err error) | 307 | //sys Revoke(path string) (err error) |
277 | //sys Rmdir(path string) (err error) | 308 | //sys Rmdir(path string) (err error) |
278 | //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK | 309 | //sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK |
@@ -295,10 +326,12 @@ func Uname(uname *Utsname) error { | |||
295 | //sys Stat(path string, stat *Stat_t) (err error) | 326 | //sys Stat(path string, stat *Stat_t) (err error) |
296 | //sys Statfs(path string, stat *Statfs_t) (err error) | 327 | //sys Statfs(path string, stat *Statfs_t) (err error) |
297 | //sys Symlink(path string, link string) (err error) | 328 | //sys Symlink(path string, link string) (err error) |
329 | //sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error) | ||
298 | //sys Sync() (err error) | 330 | //sys Sync() (err error) |
299 | //sys Truncate(path string, length int64) (err error) | 331 | //sys Truncate(path string, length int64) (err error) |
300 | //sys Umask(newmask int) (oldmask int) | 332 | //sys Umask(newmask int) (oldmask int) |
301 | //sys Unlink(path string) (err error) | 333 | //sys Unlink(path string) (err error) |
334 | //sys Unlinkat(dirfd int, path string, flags int) (err error) | ||
302 | //sys Unmount(path string, flags int) (err error) | 335 | //sys Unmount(path string, flags int) (err error) |
303 | //sys write(fd int, p []byte) (n int, err error) | 336 | //sys write(fd int, p []byte) (n int, err error) |
304 | //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) | 337 | //sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) |
@@ -321,15 +354,11 @@ func Uname(uname *Utsname) error { | |||
321 | // clock_settime | 354 | // clock_settime |
322 | // closefrom | 355 | // closefrom |
323 | // execve | 356 | // execve |
324 | // faccessat | ||
325 | // fchmodat | ||
326 | // fchownat | ||
327 | // fcntl | 357 | // fcntl |
328 | // fhopen | 358 | // fhopen |
329 | // fhstat | 359 | // fhstat |
330 | // fhstatfs | 360 | // fhstatfs |
331 | // fork | 361 | // fork |
332 | // fstatat | ||
333 | // futimens | 362 | // futimens |
334 | // getfh | 363 | // getfh |
335 | // getgid | 364 | // getgid |
@@ -343,12 +372,8 @@ func Uname(uname *Utsname) error { | |||
343 | // lfs_markv | 372 | // lfs_markv |
344 | // lfs_segclean | 373 | // lfs_segclean |
345 | // lfs_segwait | 374 | // lfs_segwait |
346 | // linkat | ||
347 | // mincore | 375 | // mincore |
348 | // minherit | 376 | // minherit |
349 | // mkdirat | ||
350 | // mkfifoat | ||
351 | // mknodat | ||
352 | // mount | 377 | // mount |
353 | // mquery | 378 | // mquery |
354 | // msgctl | 379 | // msgctl |
@@ -361,7 +386,6 @@ func Uname(uname *Utsname) error { | |||
361 | // profil | 386 | // profil |
362 | // pwritev | 387 | // pwritev |
363 | // quotactl | 388 | // quotactl |
364 | // readlinkat | ||
365 | // readv | 389 | // readv |
366 | // reboot | 390 | // reboot |
367 | // renameat | 391 | // renameat |
@@ -382,13 +406,11 @@ func Uname(uname *Utsname) error { | |||
382 | // sigprocmask | 406 | // sigprocmask |
383 | // sigreturn | 407 | // sigreturn |
384 | // sigsuspend | 408 | // sigsuspend |
385 | // symlinkat | ||
386 | // sysarch | 409 | // sysarch |
387 | // syscall | 410 | // syscall |
388 | // threxit | 411 | // threxit |
389 | // thrsigdivert | 412 | // thrsigdivert |
390 | // thrsleep | 413 | // thrsleep |
391 | // thrwakeup | 414 | // thrwakeup |
392 | // unlinkat | ||
393 | // vfork | 415 | // vfork |
394 | // writev | 416 | // writev |