2014-09-17 00:36:53 +04:00
|
|
|
// mksyscall.pl -l32 syscall_linux.go syscall_linux_386.go
|
2014-08-12 01:48:46 +04:00
|
|
|
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
|
|
|
2015-05-17 04:52:17 +03:00
|
|
|
// +build 386,linux
|
|
|
|
|
2014-08-12 02:58:26 +04:00
|
|
|
package unix
|
2014-08-12 01:48:46 +04:00
|
|
|
|
2014-10-06 23:02:17 +04:00
|
|
|
import (
|
|
|
|
"syscall"
|
|
|
|
"unsafe"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ syscall.Errno
|
2014-08-12 01:48:46 +04:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-03-22 22:29:55 +03:00
|
|
|
func Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error) {
|
2014-08-12 01:48:46 +04:00
|
|
|
var _p0 *byte
|
2015-05-13 23:50:00 +03:00
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
2014-08-12 01:48:46 +04:00
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2015-05-13 23:50:00 +03:00
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_LINKAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2015-05-13 23:50:00 +03:00
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags), uintptr(mode), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-06-14 07:58:28 +03:00
|
|
|
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
|
2016-06-02 11:11:10 +03:00
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-10-06 05:47:49 +03:00
|
|
|
func readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
|
2015-05-13 23:50:00 +03:00
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
|
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
n = int(r0)
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-10-06 05:47:49 +03:00
|
|
|
func symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
|
2015-05-13 23:50:00 +03:00
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
|
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-10-06 05:47:49 +03:00
|
|
|
func unlinkat(dirfd int, path string, flags int) (err error) {
|
2015-05-13 23:50:00 +03:00
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
|
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func utimes(path string, times *[2]Timeval) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-04-28 21:47:47 +03:00
|
|
|
func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
|
2014-08-12 01:48:46 +04:00
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
2015-04-28 21:47:47 +03:00
|
|
|
_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func futimesat(dirfd int, path *byte, times *[2]Timeval) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(path)), uintptr(unsafe.Pointer(times)))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getcwd(buf []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
|
|
|
|
wpid = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(arg)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_REBOOT, uintptr(magic1), uintptr(magic2), uintptr(cmd), uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func mount(source string, target string, fstype string, flags uintptr, data *byte) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(source)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(target)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 *byte
|
|
|
|
_p2, err = BytePtrFromString(fstype)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(unsafe.Pointer(_p2)), uintptr(flags), uintptr(unsafe.Pointer(data)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
|
|
|
use(unsafe.Pointer(_p2))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Acct(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Adjtimex(buf *Timex) (state int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0)
|
|
|
|
state = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chdir(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Chroot(path string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-07 02:04:10 +03:00
|
|
|
func ClockGettime(clockid int32, time *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOCK_GETTIME, uintptr(clockid), uintptr(unsafe.Pointer(time)), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func Close(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup(oldfd int) (fd int, err error) {
|
2015-03-26 20:28:08 +03:00
|
|
|
r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0)
|
2014-08-12 01:48:46 +04:00
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup3(oldfd int, newfd int, flags int) (err error) {
|
2015-03-26 20:28:08 +03:00
|
|
|
_, _, e1 := Syscall(SYS_DUP3, uintptr(oldfd), uintptr(newfd), uintptr(flags))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func EpollCreate(size int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func EpollCreate1(flag int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_EPOLL_CREATE1, uintptr(flag), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Exit(code int) {
|
|
|
|
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchdir(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchmod(fd int, mode uint32) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func fcntl(fd int, cmd int, arg int) (val int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
|
|
|
|
val = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fdatasync(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Flock(fd int, how int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fsync(fd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getdents(fd int, buf []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpgid(pid int) (pgid int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
|
|
|
|
pgid = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpid() (pid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
|
|
|
|
pid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getppid() (ppid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
|
|
|
|
ppid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getpriority(which int, who int) (prio int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
|
|
|
|
prio = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Gettid() (tid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETTID, 0, 0, 0)
|
|
|
|
tid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getxattr(path string, attr string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_GETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(dest)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(pathname)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_INOTIFY_ADD_WATCH, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(mask))
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
watchdesc = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyInit1(flags int) (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT1, uintptr(flags), 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func InotifyRmWatch(fd int, watchdesc uint32) (success int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_INOTIFY_RM_WATCH, uintptr(fd), uintptr(watchdesc), 0)
|
|
|
|
success = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-15 20:57:24 +04:00
|
|
|
func Kill(pid int, sig syscall.Signal) (err error) {
|
2014-08-12 01:48:46 +04:00
|
|
|
_, _, e1 := RawSyscall(SYS_KILL, uintptr(pid), uintptr(sig), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Klogctl(typ int, buf []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(buf) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&buf[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(_p0), uintptr(len(buf)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Listxattr(path string, dest []byte) (sz int, err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 unsafe.Pointer
|
|
|
|
if len(dest) > 0 {
|
|
|
|
_p1 = unsafe.Pointer(&dest[0])
|
|
|
|
} else {
|
|
|
|
_p1 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_LISTXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(dest)))
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
sz = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func PivotRoot(newroot string, putold string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(newroot)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(putold)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func prlimit(pid int, resource int, old *Rlimit, newlimit *Rlimit) (err error) {
|
|
|
|
_, _, e1 := RawSyscall6(SYS_PRLIMIT64, uintptr(pid), uintptr(resource), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(newlimit)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-10-07 11:07:32 +03:00
|
|
|
func Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_PRCTL, uintptr(option), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func read(fd int, p []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Removexattr(path string, attr string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_REMOVEXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(oldpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(newpath)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setdomainname(p []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(_p0), uintptr(len(p)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sethostname(p []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(_p0), uintptr(len(p)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setpgid(pid int, pgid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setsid() (pid int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
|
|
|
|
pid = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Settimeofday(tv *Timeval) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-02-29 11:37:13 +03:00
|
|
|
func Setns(fd int, nstype int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETNS, uintptr(fd), uintptr(nstype), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func Setpriority(which int, who int, prio int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setxattr(path string, attr string, data []byte, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p1 *byte
|
|
|
|
_p1, err = BytePtrFromString(attr)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
var _p2 unsafe.Pointer
|
|
|
|
if len(data) > 0 {
|
|
|
|
_p2 = unsafe.Pointer(&data[0])
|
|
|
|
} else {
|
|
|
|
_p2 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall6(SYS_SETXATTR, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(_p2), uintptr(len(data)), uintptr(flags), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
use(unsafe.Pointer(_p1))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sync() {
|
|
|
|
Syscall(SYS_SYNC, 0, 0, 0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Sysinfo(info *Sysinfo_t) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
|
|
|
|
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
|
|
|
|
n = int64(int64(r1)<<32 | int64(r0))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-15 20:57:24 +04:00
|
|
|
func Tgkill(tgid int, tid int, sig syscall.Signal) (err error) {
|
2014-08-12 01:48:46 +04:00
|
|
|
_, _, e1 := RawSyscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Times(tms *Tms) (ticks uintptr, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0)
|
|
|
|
ticks = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Umask(mask int) (oldmask int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_UMASK, uintptr(mask), 0, 0)
|
|
|
|
oldmask = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Uname(buf *Utsname) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unmount(target string, flags int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(target)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UMOUNT2, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Unshare(flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Ustat(dev int, ubuf *Ustat_t) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func write(fd int, p []byte) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func exitThread(code int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func readlen(fd int, p *byte, np int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func writelen(fd int, p *byte, np int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func munmap(addr uintptr, length uintptr) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Madvise(b []byte, advice int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(advice))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mprotect(b []byte, prot int) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlock(b []byte) (err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(b) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&b[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Mlockall(flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Munlockall() (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-13 23:50:00 +03:00
|
|
|
func pipe(p *[2]_C_int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
2015-05-13 23:50:00 +03:00
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func pipe2(p *[2]_C_int, flags int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Dup2(oldfd int, newfd int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-03-26 07:58:20 +03:00
|
|
|
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))
|
|
|
|
if e1 != 0 {
|
2015-03-27 19:56:46 +03:00
|
|
|
err = errnoErr(e1)
|
2015-03-26 07:58:20 +03:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func Fchown(fd int, uid int, gid int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Fstat(fd int, stat *Stat_t) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Ftruncate(fd int, length int64) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getegid() (egid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETEGID32, 0, 0, 0)
|
|
|
|
egid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Geteuid() (euid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETEUID32, 0, 0, 0)
|
|
|
|
euid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getgid() (gid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETGID32, 0, 0, 0)
|
|
|
|
gid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Getuid() (uid int) {
|
|
|
|
r0, _, _ := RawSyscall(SYS_GETUID32, 0, 0, 0)
|
|
|
|
uid = int(r0)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2015-05-14 01:12:00 +03:00
|
|
|
func InotifyInit() (fd int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)
|
|
|
|
fd = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func Ioperm(from int, num int, on int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Iopl(level int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lchown(path string, uid int, gid int) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Lstat(path string, stat *Stat_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Pread(fd int, p []byte, offset int64) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(p) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&p[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
|
|
|
|
written = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setfsgid(gid int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setfsuid(uid int) (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setregid(rgid int, egid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setresgid(rgid int, egid int, sgid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setresuid(ruid int, euid int, suid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Setreuid(ruid int, euid int) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Stat(path string, stat *Stat_t) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
|
|
|
|
_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Truncate(path string, length int64) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
|
2014-09-17 00:36:53 +04:00
|
|
|
use(unsafe.Pointer(_p0))
|
2014-08-12 01:48:46 +04:00
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func getgroups(n int, list *_Gid_t) (nn int, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
|
|
|
|
nn = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func setgroups(n int, list *_Gid_t) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {
|
|
|
|
r0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))
|
|
|
|
xaddr = uintptr(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-04-12 12:10:46 +03:00
|
|
|
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
|
|
|
|
var _p0 unsafe.Pointer
|
|
|
|
if len(events) > 0 {
|
|
|
|
_p0 = unsafe.Pointer(&events[0])
|
|
|
|
} else {
|
|
|
|
_p0 = unsafe.Pointer(&_zero)
|
|
|
|
}
|
|
|
|
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2016-04-14 16:31:22 +03:00
|
|
|
func Pause() (err error) {
|
|
|
|
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
2014-08-12 01:48:46 +04:00
|
|
|
func getrlimit(resource int, rlim *rlimit32) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func setrlimit(resource int, rlim *rlimit32) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Gettimeofday(tv *Timeval) (err error) {
|
|
|
|
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Time(t *Time_t) (tt Time_t, err error) {
|
|
|
|
r0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)
|
|
|
|
tt = Time_t(r0)
|
|
|
|
if e1 != 0 {
|
2015-03-27 11:52:00 +03:00
|
|
|
err = errnoErr(e1)
|
2014-08-12 01:48:46 +04:00
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
2016-02-27 18:36:46 +03:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func Utime(path string, buf *Utimbuf) (err error) {
|
|
|
|
var _p0 *byte
|
|
|
|
_p0, err = BytePtrFromString(path)
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
|
|
|
|
use(unsafe.Pointer(_p0))
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|
2016-06-14 07:58:28 +03:00
|
|
|
|
|
|
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
|
|
|
|
|
|
|
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
|
|
|
|
r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
|
|
|
|
n = int(r0)
|
|
|
|
if e1 != 0 {
|
|
|
|
err = errnoErr(e1)
|
|
|
|
}
|
|
|
|
return
|
|
|
|
}
|