final batch for "declared and not used"

* update mksyscall.sh and rebuild syscall/z*.go
 * fix a few linux-only files

R=r
DELTA=455  (12 added, 1 deleted, 442 changed)
OCL=34637
CL=34655
This commit is contained in:
Russ Cox 2009-09-15 13:51:33 -07:00
parent 9b5eb305e1
commit 98c98192ec
8 changed files with 441 additions and 430 deletions

View file

@ -421,7 +421,6 @@ func (p *process) uninstallBreakpoints() os.Error {
// event. // event.
func (t *thread) wait() { func (t *thread) wait() {
for { for {
var err os.Error;
var ev debugEvent; var ev debugEvent;
ev.t = t; ev.t = t;
t.logTrace("beginning wait"); t.logTrace("beginning wait");
@ -764,7 +763,7 @@ func (p *process) do(f func () os.Error) os.Error {
// stopMonitor stops the monitor with the given error. If the monitor // stopMonitor stops the monitor with the given error. If the monitor
// is already stopped, does nothing. // is already stopped, does nothing.
func (p *process) stopMonitor(err os.Error) { func (p *process) stopMonitor(err os.Error) {
doNotBlock := p.stopReq <- err; _ = p.stopReq <- err; // do not block
// TODO(austin) Wait until monitor has exited? // TODO(austin) Wait until monitor has exited?
} }
@ -1215,7 +1214,7 @@ func (p *process) attachAllThreads() os.Error {
continue; continue;
} }
t, err := p.attachThread(tid); _, err = p.attachThread(tid);
if err != nil { if err != nil {
// There could have been a race, or // There could have been a race, or
// this process could be a zobmie. // this process could be a zobmie.
@ -1309,7 +1308,7 @@ func ForkExec(argv0 string, argv []string, envv []string, dir string, fd []*os.F
p.pid = pid; p.pid = pid;
// The process will raise SIGTRAP when it reaches execve. // The process will raise SIGTRAP when it reaches execve.
t, err := p.newThread(pid, syscall.SIGTRAP, false); _, err := p.newThread(pid, syscall.SIGTRAP, false);
return err; return err;
}); });
if err != nil { if err != nil {

View file

@ -135,7 +135,7 @@ func (p *pollster) WaitFD(nsec int64) (fd int, mode int, err os.Error) {
} }
// Other events are error conditions - wake whoever is waiting. // Other events are error conditions - wake whoever is waiting.
events, already := p.events[fd]; events, _ := p.events[fd];
if events & writeFlags != 0 { if events & writeFlags != 0 {
p.StopWaiting(fd, writeFlags); p.StopWaiting(fd, writeFlags);
return fd, 'w', nil; return fd, 'w', nil;

View file

@ -127,17 +127,21 @@ while(<>) {
# Actual call. # Actual call.
my $args = join(', ', @args); my $args = join(', ', @args);
$text .= "\tr0, r1, e1 := $asm($sysname, $args);\n"; my $call = "$asm($sysname, $args)";
# Assign return values. # Assign return values.
my $body = "";
my @ret = ("_", "_", "_");
for(my $i=0; $i<@out; $i++) { for(my $i=0; $i<@out; $i++) {
my $p = $out[$i]; my $p = $out[$i];
my ($name, $type) = parseparam($p); my ($name, $type) = parseparam($p);
my $reg = ""; my $reg = "";
if($name eq "errno") { if($name eq "errno") {
$reg = "e1"; $reg = "e1";
$ret[2] = $reg;
} else { } else {
$reg = sprintf("r%d", $i); $reg = sprintf("r%d", $i);
$ret[$i] = $reg;
} }
if($type eq "bool") { if($type eq "bool") {
$reg = "$reg != 0"; $reg = "$reg != 0";
@ -152,10 +156,18 @@ while(<>) {
} else { } else {
$reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i); $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
} }
$ret[$i] = sprintf("r%d", $i);
$ret[$i+1] = sprintf("r%d", $i+1);
$i++; # loop will do another $i++ $i++; # loop will do another $i++
} }
$text .= "\t$name = $type($reg);\n"; $body .= "\t$name = $type($reg);\n";
} }
if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
$text .= "\t$call;\n";
} else {
$text .= "\t$ret[0], $ret[1], $ret[2] := $call;\n";
}
$text .= $body;
$text .= "\treturn;\n"; $text .= "\treturn;\n";
$text .= "}\n\n"; $text .= "}\n\n";

View file

@ -180,7 +180,7 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
func Sleep(nsec int64) (errno int) { func Sleep(nsec int64) (errno int) {
tv := NsecToTimeval(nsec); tv := NsecToTimeval(nsec);
n, err := Select(0, nil, nil, nil, &tv); _, err := Select(0, nil, nil, nil, &tv);
return err; return err;
} }

View file

@ -6,20 +6,20 @@ package syscall
import "unsafe" import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) { func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0); r0, _, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setgroups(ngid int, gid *_Gid_t) (errno int) { func setgroups(ngid int, gid *_Gid_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0); _, _, e1 := Syscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) { func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0); r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
wpid = int(r0); wpid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -34,51 +34,51 @@ func pipe() (r int, w int, errno int) {
} }
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) { func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func bind(s int, addr uintptr, addrlen _Socklen) (errno int) { func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func connect(s int, addr uintptr, addrlen _Socklen) (errno int) { func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func socket(domain int, typ int, proto int) (fd int, errno int) { func socket(domain int, typ int, proto int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)); r0, _, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) { func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0); _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }
func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, timeout *Timespec) (n int, errno int) { func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, timeout *Timespec) (n int, errno int) {
r0, r1, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))); r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -87,147 +87,147 @@ func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, time
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (errno int) { func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (errno int) {
var _p0 *_C_int; var _p0 *_C_int;
if len(mib) > 0 { _p0 = &mib[0]; } if len(mib) > 0 { _p0 = &mib[0]; }
r0, r1, e1 := Syscall6(SYS___SYSCTL, uintptr(unsafe.Pointer(_p0)), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)); _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(unsafe.Pointer(_p0)), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func fcntl(fd int, cmd int, arg int) (val int, errno int) { func fcntl(fd int, cmd int, arg int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)); r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Access(path string, flags int) (errno int) { func Access(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Adjtime(delta *Timeval, olddelta *Timeval) (errno int) { func Adjtime(delta *Timeval, olddelta *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0); _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chdir(path string) (errno int) { func Chdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chflags(path string, flags int) (errno int) { func Chflags(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chmod(path string, mode int) (errno int) { func Chmod(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Chroot(path string) (errno int) { func Chroot(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Close(fd int) (errno int) { func Close(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup(fd int) (nfd int, errno int) { func Dup(fd int) (nfd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0); r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0);
nfd = int(r0); nfd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup2(from int, to int) (errno int) { func Dup2(from int, to int) (errno int) {
r0, r1, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0); _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Exchangedata(path1 string, path2 string, options int) (errno int) { func Exchangedata(path1 string, path2 string, options int) (errno int) {
r0, r1, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(StringBytePtr(path1))), uintptr(unsafe.Pointer(StringBytePtr(path2))), uintptr(options)); _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(StringBytePtr(path1))), uintptr(unsafe.Pointer(StringBytePtr(path2))), uintptr(options));
errno = int(e1); errno = int(e1);
return; return;
} }
func Exit(code int) () { func Exit(code int) () {
r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0); Syscall(SYS_EXIT, uintptr(code), 0, 0);
return; return;
} }
func Fchdir(fd int) (errno int) { func Fchdir(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchflags(path string, flags int) (errno int) { func Fchflags(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmod(fd int, mode int) (errno int) { func Fchmod(fd int, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchown(fd int, uid int, gid int) (errno int) { func Fchown(fd int, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Flock(fd int, how int) (errno int) { func Flock(fd int, how int) (errno int) {
r0, r1, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0); _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fpathconf(fd int, name int) (val int, errno int) { func Fpathconf(fd int, name int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0); r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0);
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstat(fd int, stat *Stat_t) (errno int) { func Fstat(fd int, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstatfs(fd int, stat *Statfs_t) (errno int) { func Fstatfs(fd int, stat *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fsync(fd int) (errno int) { func Fsync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ftruncate(fd int, length int64) (errno int) { func Ftruncate(fd int, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32)); _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32));
errno = int(e1); errno = int(e1);
return; return;
} }
@ -235,26 +235,26 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) { func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0); r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, r1, e1 := Syscall(SYS_GETDTABLESIZE, 0, 0, 0); r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0);
size = int(r0); size = int(r0);
return; return;
} }
func Getegid() (egid int) { func Getegid() (egid int) {
r0, r1, e1 := Syscall(SYS_GETEGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEGID, 0, 0, 0);
egid = int(r0); egid = int(r0);
return; return;
} }
func Geteuid() (uid int) { func Geteuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETEUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEUID, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
@ -262,145 +262,145 @@ func Geteuid() (uid int) {
func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) { func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) {
var _p0 *Statfs_t; var _p0 *Statfs_t;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags)); r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getgid() (gid int) { func Getgid() (gid int) {
r0, r1, e1 := Syscall(SYS_GETGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETGID, 0, 0, 0);
gid = int(r0); gid = int(r0);
return; return;
} }
func Getpgid(pid int) (pgid int, errno int) { func Getpgid(pid int) (pgid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
pgid = int(r0); pgid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgrp() (pgrp int) { func Getpgrp() (pgrp int) {
r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPGRP, 0, 0, 0);
pgrp = int(r0); pgrp = int(r0);
return; return;
} }
func Getpid() (pid int) { func Getpid() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getppid() (ppid int) { func Getppid() (ppid int) {
r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPPID, 0, 0, 0);
ppid = int(r0); ppid = int(r0);
return; return;
} }
func Getpriority(which int, who int) (prio int, errno int) { func Getpriority(which int, who int) (prio int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0); r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0);
prio = int(r0); prio = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrlimit(which int, lim *Rlimit) (errno int) { func Getrlimit(which int, lim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0); _, _, e1 := Syscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrusage(who int, rusage *Rusage) (errno int) { func Getrusage(who int, rusage *Rusage) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0); _, _, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getsid(pid int) (sid int, errno int) { func Getsid(pid int) (sid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETSID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETSID, uintptr(pid), 0, 0);
sid = int(r0); sid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getuid() (uid int) { func Getuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETUID, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
func Issetugid() (tainted bool) { func Issetugid() (tainted bool) {
r0, r1, e1 := Syscall(SYS_ISSETUGID, 0, 0, 0); r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0);
tainted = bool(r0 != 0); tainted = bool(r0 != 0);
return; return;
} }
func Kill(pid int, signum int, posix int) (errno int) { func Kill(pid int, signum int, posix int) (errno int) {
r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)); _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix));
errno = int(e1); errno = int(e1);
return; return;
} }
func Kqueue() (fd int, errno int) { func Kqueue() (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_KQUEUE, 0, 0, 0); r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Lchown(path string, uid int, gid int) (errno int) { func Lchown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Link(path string, link string) (errno int) { func Link(path string, link string) (errno int) {
r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0); _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Listen(s int, backlog int) (errno int) { func Listen(s int, backlog int) (errno int) {
r0, r1, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0); _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Lstat(path string, stat *Stat_t) (errno int) { func Lstat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdir(path string, mode int) (errno int) { func Mkdir(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkfifo(path string, mode int) (errno int) { func Mkfifo(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknod(path string, mode int, dev int) (errno int) { func Mknod(path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev)); _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
errno = int(e1); errno = int(e1);
return; return;
} }
func Open(path string, mode int, perm int) (fd int, errno int) { func Open(path string, mode int, perm int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm)); r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Pathconf(path string, name int) (val int, errno int) { func Pathconf(path string, name int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(name), 0); r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(name), 0);
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -409,7 +409,7 @@ func Pathconf(path string, name int) (val int, errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) { func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0); r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -418,7 +418,7 @@ func Pread(fd int, p []byte, offset int64) (n int, errno int) {
func Pwrite(fd int, p []byte, offset int64) (n int, errno int) { func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0); r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -427,7 +427,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) { func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -436,171 +436,171 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) { func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rename(from string, to string) (errno int) { func Rename(from string, to string) (errno int) {
r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(from))), uintptr(unsafe.Pointer(StringBytePtr(to))), 0); _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(from))), uintptr(unsafe.Pointer(StringBytePtr(to))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Revoke(path string) (errno int) { func Revoke(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rmdir(path string) (errno int) { func Rmdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) { func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) {
r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset >> 32), uintptr(whence), 0, 0); r0, r1, _ := Syscall6(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(offset >> 32), uintptr(whence), 0, 0);
newoffset = int64(int64(r1)<<32 | int64(r0)); newoffset = int64(int64(r1)<<32 | int64(r0));
return; return;
} }
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (errno int) { func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (errno int) {
r0, r1, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0); _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setegid(egid int) (errno int) { func Setegid(egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0); _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Seteuid(euid int) (errno int) { func Seteuid(euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETEUID, uintptr(euid), 0, 0); _, _, e1 := Syscall(SYS_SETEUID, uintptr(euid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setgid(gid int) (errno int) { func Setgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setlogin(name string) (errno int) { func Setlogin(name string) (errno int) {
r0, r1, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(StringBytePtr(name))), 0, 0); _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(StringBytePtr(name))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpgid(pid int, pgid int) (errno int) { func Setpgid(pid int, pgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0); _, _, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpriority(which int, who int, prio int) (errno int) { func Setpriority(which int, who int, prio int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)); _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setprivexec(flag int) (errno int) { func Setprivexec(flag int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0); _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setregid(rgid int, egid int) (errno int) { func Setregid(rgid int, egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0); _, _, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setreuid(ruid int, euid int) (errno int) { func Setreuid(ruid int, euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0); _, _, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setrlimit(which int, lim *Rlimit) (errno int) { func Setrlimit(which int, lim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0); _, _, e1 := Syscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setsid() (pid int, errno int) { func Setsid() (pid int, errno int) {
r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0); r0, _, e1 := Syscall(SYS_SETSID, 0, 0, 0);
pid = int(r0); pid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Settimeofday(tp *Timeval) (errno int) { func Settimeofday(tp *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0); _, _, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setuid(uid int) (errno int) { func Setuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Stat(path string, stat *Stat_t) (errno int) { func Stat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Statfs(path string, stat *Statfs_t) (errno int) { func Statfs(path string, stat *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Symlink(path string, link string) (errno int) { func Symlink(path string, link string) (errno int) {
r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0); _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Sync() (errno int) { func Sync() (errno int) {
r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0); _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Truncate(path string, length int64) (errno int) { func Truncate(path string, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32)); _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32));
errno = int(e1); errno = int(e1);
return; return;
} }
func Umask(newmask int) (errno int) { func Umask(newmask int) (errno int) {
r0, r1, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0); _, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Undelete(path string) (errno int) { func Undelete(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlink(path string) (errno int) { func Unlink(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unmount(path string, flags int) (errno int) { func Unmount(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -608,21 +608,21 @@ func Unmount(path string, flags int) (errno int) {
func Write(fd int, p []byte) (n int, errno int) { func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func read(fd int, buf *byte, nbuf int) (n int, errno int) { func read(fd int, buf *byte, nbuf int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func write(fd int, buf *byte, nbuf int) (n int, errno int) { func write(fd int, buf *byte, nbuf int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;

View file

@ -6,20 +6,20 @@ package syscall
import "unsafe" import "unsafe"
func getgroups(ngid int, gid *_Gid_t) (n int, errno int) { func getgroups(ngid int, gid *_Gid_t) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0); r0, _, e1 := Syscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setgroups(ngid int, gid *_Gid_t) (errno int) { func setgroups(ngid int, gid *_Gid_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0); _, _, e1 := Syscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) { func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0); r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
wpid = int(r0); wpid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -34,51 +34,51 @@ func pipe() (r int, w int, errno int) {
} }
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) { func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func bind(s int, addr uintptr, addrlen _Socklen) (errno int) { func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func connect(s int, addr uintptr, addrlen _Socklen) (errno int) { func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func socket(domain int, typ int, proto int) (fd int, errno int) { func socket(domain int, typ int, proto int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)); r0, _, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) { func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0); _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }
func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, timeout *Timespec) (n int, errno int) { func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, timeout *Timespec) (n int, errno int) {
r0, r1, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout))); r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -87,147 +87,147 @@ func kevent(kq int, change uintptr, nchange int, event uintptr, nevent int, time
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (errno int) { func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (errno int) {
var _p0 *_C_int; var _p0 *_C_int;
if len(mib) > 0 { _p0 = &mib[0]; } if len(mib) > 0 { _p0 = &mib[0]; }
r0, r1, e1 := Syscall6(SYS___SYSCTL, uintptr(unsafe.Pointer(_p0)), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen)); _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(unsafe.Pointer(_p0)), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func fcntl(fd int, cmd int, arg int) (val int, errno int) { func fcntl(fd int, cmd int, arg int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)); r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Access(path string, flags int) (errno int) { func Access(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Adjtime(delta *Timeval, olddelta *Timeval) (errno int) { func Adjtime(delta *Timeval, olddelta *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0); _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chdir(path string) (errno int) { func Chdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chflags(path string, flags int) (errno int) { func Chflags(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chmod(path string, mode int) (errno int) { func Chmod(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Chroot(path string) (errno int) { func Chroot(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Close(fd int) (errno int) { func Close(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup(fd int) (nfd int, errno int) { func Dup(fd int) (nfd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0); r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0);
nfd = int(r0); nfd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup2(from int, to int) (errno int) { func Dup2(from int, to int) (errno int) {
r0, r1, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0); _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Exchangedata(path1 string, path2 string, options int) (errno int) { func Exchangedata(path1 string, path2 string, options int) (errno int) {
r0, r1, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(StringBytePtr(path1))), uintptr(unsafe.Pointer(StringBytePtr(path2))), uintptr(options)); _, _, e1 := Syscall(SYS_EXCHANGEDATA, uintptr(unsafe.Pointer(StringBytePtr(path1))), uintptr(unsafe.Pointer(StringBytePtr(path2))), uintptr(options));
errno = int(e1); errno = int(e1);
return; return;
} }
func Exit(code int) () { func Exit(code int) () {
r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0); Syscall(SYS_EXIT, uintptr(code), 0, 0);
return; return;
} }
func Fchdir(fd int) (errno int) { func Fchdir(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchflags(path string, flags int) (errno int) { func Fchflags(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmod(fd int, mode int) (errno int) { func Fchmod(fd int, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchown(fd int, uid int, gid int) (errno int) { func Fchown(fd int, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Flock(fd int, how int) (errno int) { func Flock(fd int, how int) (errno int) {
r0, r1, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0); _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fpathconf(fd int, name int) (val int, errno int) { func Fpathconf(fd int, name int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0); r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0);
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstat(fd int, stat *Stat_t) (errno int) { func Fstat(fd int, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstatfs(fd int, stat *Statfs_t) (errno int) { func Fstatfs(fd int, stat *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fsync(fd int) (errno int) { func Fsync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ftruncate(fd int, length int64) (errno int) { func Ftruncate(fd int, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -235,26 +235,26 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) { func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0); r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getdtablesize() (size int) { func Getdtablesize() (size int) {
r0, r1, e1 := Syscall(SYS_GETDTABLESIZE, 0, 0, 0); r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0);
size = int(r0); size = int(r0);
return; return;
} }
func Getegid() (egid int) { func Getegid() (egid int) {
r0, r1, e1 := Syscall(SYS_GETEGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEGID, 0, 0, 0);
egid = int(r0); egid = int(r0);
return; return;
} }
func Geteuid() (uid int) { func Geteuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETEUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEUID, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
@ -262,145 +262,145 @@ func Geteuid() (uid int) {
func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) { func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) {
var _p0 *Statfs_t; var _p0 *Statfs_t;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags)); r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getgid() (gid int) { func Getgid() (gid int) {
r0, r1, e1 := Syscall(SYS_GETGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETGID, 0, 0, 0);
gid = int(r0); gid = int(r0);
return; return;
} }
func Getpgid(pid int) (pgid int, errno int) { func Getpgid(pid int) (pgid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
pgid = int(r0); pgid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgrp() (pgrp int) { func Getpgrp() (pgrp int) {
r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPGRP, 0, 0, 0);
pgrp = int(r0); pgrp = int(r0);
return; return;
} }
func Getpid() (pid int) { func Getpid() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getppid() (ppid int) { func Getppid() (ppid int) {
r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPPID, 0, 0, 0);
ppid = int(r0); ppid = int(r0);
return; return;
} }
func Getpriority(which int, who int) (prio int, errno int) { func Getpriority(which int, who int) (prio int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0); r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0);
prio = int(r0); prio = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrlimit(which int, lim *Rlimit) (errno int) { func Getrlimit(which int, lim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0); _, _, e1 := Syscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrusage(who int, rusage *Rusage) (errno int) { func Getrusage(who int, rusage *Rusage) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0); _, _, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getsid(pid int) (sid int, errno int) { func Getsid(pid int) (sid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETSID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETSID, uintptr(pid), 0, 0);
sid = int(r0); sid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getuid() (uid int) { func Getuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETUID, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
func Issetugid() (tainted bool) { func Issetugid() (tainted bool) {
r0, r1, e1 := Syscall(SYS_ISSETUGID, 0, 0, 0); r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0);
tainted = bool(r0 != 0); tainted = bool(r0 != 0);
return; return;
} }
func Kill(pid int, signum int, posix int) (errno int) { func Kill(pid int, signum int, posix int) (errno int) {
r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix)); _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), uintptr(posix));
errno = int(e1); errno = int(e1);
return; return;
} }
func Kqueue() (fd int, errno int) { func Kqueue() (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_KQUEUE, 0, 0, 0); r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Lchown(path string, uid int, gid int) (errno int) { func Lchown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Link(path string, link string) (errno int) { func Link(path string, link string) (errno int) {
r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0); _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Listen(s int, backlog int) (errno int) { func Listen(s int, backlog int) (errno int) {
r0, r1, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0); _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Lstat(path string, stat *Stat_t) (errno int) { func Lstat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdir(path string, mode int) (errno int) { func Mkdir(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkfifo(path string, mode int) (errno int) { func Mkfifo(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknod(path string, mode int, dev int) (errno int) { func Mknod(path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev)); _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
errno = int(e1); errno = int(e1);
return; return;
} }
func Open(path string, mode int, perm int) (fd int, errno int) { func Open(path string, mode int, perm int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm)); r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Pathconf(path string, name int) (val int, errno int) { func Pathconf(path string, name int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(name), 0); r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(name), 0);
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -409,7 +409,7 @@ func Pathconf(path string, name int) (val int, errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) { func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0); r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -418,7 +418,7 @@ func Pread(fd int, p []byte, offset int64) (n int, errno int) {
func Pwrite(fd int, p []byte, offset int64) (n int, errno int) { func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0); r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -427,7 +427,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) { func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -436,172 +436,172 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) { func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rename(from string, to string) (errno int) { func Rename(from string, to string) (errno int) {
r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(from))), uintptr(unsafe.Pointer(StringBytePtr(to))), 0); _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(from))), uintptr(unsafe.Pointer(StringBytePtr(to))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Revoke(path string) (errno int) { func Revoke(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rmdir(path string) (errno int) { func Rmdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) { func Seek(fd int, offset int64, whence int) (newoffset int64, errno int) {
r0, r1, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)); r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence));
newoffset = int64(r0); newoffset = int64(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (errno int) { func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (errno int) {
r0, r1, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0); _, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setegid(egid int) (errno int) { func Setegid(egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0); _, _, e1 := Syscall(SYS_SETEGID, uintptr(egid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Seteuid(euid int) (errno int) { func Seteuid(euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETEUID, uintptr(euid), 0, 0); _, _, e1 := Syscall(SYS_SETEUID, uintptr(euid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setgid(gid int) (errno int) { func Setgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setlogin(name string) (errno int) { func Setlogin(name string) (errno int) {
r0, r1, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(StringBytePtr(name))), 0, 0); _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(StringBytePtr(name))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpgid(pid int, pgid int) (errno int) { func Setpgid(pid int, pgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0); _, _, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpriority(which int, who int, prio int) (errno int) { func Setpriority(which int, who int, prio int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio)); _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setprivexec(flag int) (errno int) { func Setprivexec(flag int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0); _, _, e1 := Syscall(SYS_SETPRIVEXEC, uintptr(flag), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setregid(rgid int, egid int) (errno int) { func Setregid(rgid int, egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0); _, _, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setreuid(ruid int, euid int) (errno int) { func Setreuid(ruid int, euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0); _, _, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setrlimit(which int, lim *Rlimit) (errno int) { func Setrlimit(which int, lim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0); _, _, e1 := Syscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setsid() (pid int, errno int) { func Setsid() (pid int, errno int) {
r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0); r0, _, e1 := Syscall(SYS_SETSID, 0, 0, 0);
pid = int(r0); pid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Settimeofday(tp *Timeval) (errno int) { func Settimeofday(tp *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0); _, _, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setuid(uid int) (errno int) { func Setuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Stat(path string, stat *Stat_t) (errno int) { func Stat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Statfs(path string, stat *Statfs_t) (errno int) { func Statfs(path string, stat *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Symlink(path string, link string) (errno int) { func Symlink(path string, link string) (errno int) {
r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0); _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(StringBytePtr(link))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Sync() (errno int) { func Sync() (errno int) {
r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0); _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Truncate(path string, length int64) (errno int) { func Truncate(path string, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), 0); _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Umask(newmask int) (errno int) { func Umask(newmask int) (errno int) {
r0, r1, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0); _, _, e1 := Syscall(SYS_UMASK, uintptr(newmask), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Undelete(path string) (errno int) { func Undelete(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlink(path string) (errno int) { func Unlink(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unmount(path string, flags int) (errno int) { func Unmount(path string, flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0); _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -609,21 +609,21 @@ func Unmount(path string, flags int) (errno int) {
func Write(fd int, p []byte) (n int, errno int) { func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func read(fd int, buf *byte, nbuf int) (n int, errno int) { func read(fd int, buf *byte, nbuf int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func write(fd int, buf *byte, nbuf int) (n int, errno int) { func write(fd int, buf *byte, nbuf int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf)); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;

View file

@ -6,19 +6,19 @@ package syscall
import "unsafe" import "unsafe"
func pipe(p *[2]_C_int) (errno int) { func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0); _, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func utimes(path string, times *[2]Timeval) (errno int) { func utimes(path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0); _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) { func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times))); _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)));
errno = int(e1); errno = int(e1);
return; return;
} }
@ -26,98 +26,98 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) { func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0); r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) { func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0); r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
wpid = int(r0); wpid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func ptrace(request int, pid int, addr uintptr, data uintptr) (errno int) { func ptrace(request int, pid int, addr uintptr, data uintptr) (errno int) {
r0, r1, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0); _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Access(path string, mode int) (errno int) { func Access(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Acct(path string) (errno int) { func Acct(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Adjtimex(buf *Timex) (state int, errno int) { func Adjtimex(buf *Timex) (state int, errno int) {
r0, r1, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0); r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0);
state = int(r0); state = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chdir(path string) (errno int) { func Chdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chmod(path string, mode int) (errno int) { func Chmod(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chroot(path string) (errno int) { func Chroot(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Close(fd int) (errno int) { func Close(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Creat(path string, mode int) (fd int, errno int) { func Creat(path string, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup(oldfd int) (fd int, errno int) { func Dup(oldfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0); r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup2(oldfd int, newfd int) (fd int, errno int) { func Dup2(oldfd int, newfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0); r0, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func EpollCreate(size int) (fd int, errno int) { func EpollCreate(size int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0); r0, _, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) { func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
r0, r1, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0); _, _, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -125,74 +125,74 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent; var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; } if len(events) > 0 { _p0 = &events[0]; }
r0, r1, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0); r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Exit(code int) () { func Exit(code int) () {
r0, r1, e1 := Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0); Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return; return;
} }
func Faccessat(dirfd int, path string, mode int, flags int) (errno int) { func Faccessat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0); _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fallocate(fd int, mode int, off int64, len int64) (errno int) { func Fallocate(fd int, mode int, off int64, len int64) (errno int) {
r0, r1, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off >> 32), uintptr(len), uintptr(len >> 32)); _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off >> 32), uintptr(len), uintptr(len >> 32));
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchdir(fd int) (errno int) { func Fchdir(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmod(fd int, mode int) (errno int) { func Fchmod(fd int, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) { func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0); _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) { func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0); _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func fcntl(fd int, cmd int, arg int) (val int, errno int) { func fcntl(fd int, cmd int, arg int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)); r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fdatasync(fd int) (errno int) { func Fdatasync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fsync(fd int) (errno int) { func Fsync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ftruncate(fd int, length int64) (errno int) { func Ftruncate(fd int, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32)); _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), uintptr(length >> 32));
errno = int(e1); errno = int(e1);
return; return;
} }
@ -200,75 +200,75 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) { func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgid(pid int) (pgid int, errno int) { func Getpgid(pid int) (pgid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
pgid = int(r0); pgid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgrp() (pid int) { func Getpgrp() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPGRP, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getpid() (pid int) { func Getpid() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getppid() (ppid int) { func Getppid() (ppid int) {
r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPPID, 0, 0, 0);
ppid = int(r0); ppid = int(r0);
return; return;
} }
func Getrlimit(resource int, rlim *Rlimit) (errno int) { func Getrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0); _, _, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrusage(who int, rusage *Rusage) (errno int) { func Getrusage(who int, rusage *Rusage) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0); _, _, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Gettid() (tid int) { func Gettid() (tid int) {
r0, r1, e1 := Syscall(SYS_GETTID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETTID, 0, 0, 0);
tid = int(r0); tid = int(r0);
return; return;
} }
func Gettimeofday(tv *Timeval) (errno int) { func Gettimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0); _, _, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ioperm(from int, num int, on int) (errno int) { func Ioperm(from int, num int, on int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)); _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on));
errno = int(e1); errno = int(e1);
return; return;
} }
func Iopl(level int) (errno int) { func Iopl(level int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0); _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Kill(pid int, sig int) (errno int) { func Kill(pid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0); _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -276,70 +276,70 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) { func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Link(oldpath string, newpath string) (errno int) { func Link(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdir(path string, mode int) (errno int) { func Mkdir(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdirat(dirfd int, path string, mode int) (errno int) { func Mkdirat(dirfd int, path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode)); _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode));
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknod(path string, mode int, dev int) (errno int) { func Mknod(path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev)); _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknodat(dirfd int, path string, mode int, dev int) (errno int) { func Mknodat(dirfd int, path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0); _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Nanosleep(time *Timespec, leftover *Timespec) (errno int) { func Nanosleep(time *Timespec, leftover *Timespec) (errno int) {
r0, r1, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0); _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Open(path string, mode int, perm int) (fd int, errno int) { func Open(path string, mode int, perm int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm)); r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) { func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0); r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Pause() (errno int) { func Pause() (errno int) {
r0, r1, e1 := Syscall(SYS_PAUSE, 0, 0, 0); _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func PivotRoot(newroot string, putold string) (errno int) { func PivotRoot(newroot string, putold string) (errno int) {
r0, r1, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0); _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -347,7 +347,7 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) { func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0); r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -356,7 +356,7 @@ func Pread(fd int, p []byte, offset int64) (n int, errno int) {
func Pwrite(fd int, p []byte, offset int64) (n int, errno int) { func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0); r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset >> 32), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -365,7 +365,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) { func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -374,26 +374,26 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) { func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rename(oldpath string, newpath string) (errno int) { func Rename(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) { func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) {
r0, r1, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0); _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rmdir(path string) (errno int) { func Rmdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -401,7 +401,7 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) { func Setdomainname(p []byte) (errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0); _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -409,140 +409,140 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) { func Sethostname(p []byte) (errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0); _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpgid(pid int, pgid int) (errno int) { func Setpgid(pid int, pgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0); _, _, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setrlimit(resource int, rlim *Rlimit) (errno int) { func Setrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0); _, _, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setsid() (pid int) { func Setsid() (pid int) {
r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0); r0, _, _ := Syscall(SYS_SETSID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Settimeofday(tv *Timeval) (errno int) { func Settimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0); _, _, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setuid(uid int) (errno int) { func Setuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) { func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)); r0, r1, _ := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags));
n = int64(int64(r1)<<32 | int64(r0)); n = int64(int64(r1)<<32 | int64(r0));
return; return;
} }
func Symlink(oldpath string, newpath string) (errno int) { func Symlink(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Sync() () { func Sync() () {
r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0); Syscall(SYS_SYNC, 0, 0, 0);
return; return;
} }
func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) { func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off >> 32), uintptr(n), uintptr(n >> 32), uintptr(flags)); _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off >> 32), uintptr(n), uintptr(n >> 32), uintptr(flags));
errno = int(e1); errno = int(e1);
return; return;
} }
func Sysinfo(info *Sysinfo_t) (errno int) { func Sysinfo(info *Sysinfo_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0); _, _, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) { func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0); r0, r1, _ := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0);
n = int64(int64(r1)<<32 | int64(r0)); n = int64(int64(r1)<<32 | int64(r0));
return; return;
} }
func Tgkill(tgid int, tid int, sig int) (errno int) { func Tgkill(tgid int, tid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)); _, _, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig));
errno = int(e1); errno = int(e1);
return; return;
} }
func Time(t *Time_t) (tt Time_t, errno int) { func Time(t *Time_t) (tt Time_t, errno int) {
r0, r1, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0); r0, _, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0);
tt = Time_t(r0); tt = Time_t(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Times(tms *Tms) (ticks uintptr, errno int) { func Times(tms *Tms) (ticks uintptr, errno int) {
r0, r1, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0); r0, _, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0);
ticks = uintptr(r0); ticks = uintptr(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Truncate(path string, length int64) (errno int) { func Truncate(path string, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32)); _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), uintptr(length >> 32));
errno = int(e1); errno = int(e1);
return; return;
} }
func Umask(mask int) (oldmask int) { func Umask(mask int) (oldmask int) {
r0, r1, e1 := Syscall(SYS_UMASK, uintptr(mask), 0, 0); r0, _, _ := Syscall(SYS_UMASK, uintptr(mask), 0, 0);
oldmask = int(r0); oldmask = int(r0);
return; return;
} }
func Uname(buf *Utsname) (errno int) { func Uname(buf *Utsname) (errno int) {
r0, r1, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0); _, _, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlink(path string) (errno int) { func Unlink(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlinkat(dirfd int, path string) (errno int) { func Unlinkat(dirfd int, path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0); _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unshare(flags int) (errno int) { func Unshare(flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0); _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ustat(dev int, ubuf *Ustat_t) (errno int) { func Ustat(dev int, ubuf *Ustat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0); _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Utime(path string, buf *Utimbuf) (errno int) { func Utime(path string, buf *Utimbuf) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -550,161 +550,161 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) { func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func exitThread(code int) (errno int) { func exitThread(code int) (errno int) {
r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0); _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func read(fd int, p *byte, np int) (n int, errno int) { func read(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func write(fd int, p *byte, np int) (n int, errno int) { func write(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_CHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchown(fd int, uid int, gid int) (errno int) { func Fchown(fd int, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstat(fd int, stat *Stat_t) (errno int) { func Fstat(fd int, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstatfs(fd int, buf *Statfs_t) (errno int) { func Fstatfs(fd int, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_FSTATFS64, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getegid() (egid int) { func Getegid() (egid int) {
r0, r1, e1 := Syscall(SYS_GETEGID32, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEGID32, 0, 0, 0);
egid = int(r0); egid = int(r0);
return; return;
} }
func Geteuid() (euid int) { func Geteuid() (euid int) {
r0, r1, e1 := Syscall(SYS_GETEUID32, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEUID32, 0, 0, 0);
euid = int(r0); euid = int(r0);
return; return;
} }
func Getgid() (gid int) { func Getgid() (gid int) {
r0, r1, e1 := Syscall(SYS_GETGID32, 0, 0, 0); r0, _, _ := Syscall(SYS_GETGID32, 0, 0, 0);
gid = int(r0); gid = int(r0);
return; return;
} }
func Getuid() (uid int) { func Getuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETUID32, 0, 0, 0); r0, _, _ := Syscall(SYS_GETUID32, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
func Lchown(path string, uid int, gid int) (errno int) { func Lchown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Lstat(path string, stat *Stat_t) (errno int) { func Lstat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setfsgid(gid int) (errno int) { func Setfsgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setfsuid(uid int) (errno int) { func Setfsuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setgid(gid int) (errno int) { func Setgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGID32, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETGID32, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setregid(rgid int, egid int) (errno int) { func Setregid(rgid int, egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0); _, _, e1 := Syscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setresgid(rgid int, egid int, sgid int) (errno int) { func Setresgid(rgid int, egid int, sgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid)); _, _, e1 := Syscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setresuid(ruid int, euid int, suid int) (errno int) { func Setresuid(ruid int, euid int, suid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid)); _, _, e1 := Syscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setreuid(ruid int, euid int) (errno int) { func Setreuid(ruid int, euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0); _, _, e1 := Syscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Stat(path string, stat *Stat_t) (errno int) { func Stat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Statfs(path string, buf *Statfs_t) (errno int) { func Statfs(path string, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func getgroups(n int, list *_Gid_t) (nn int, errno int) { func getgroups(n int, list *_Gid_t) (nn int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0); r0, _, e1 := Syscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
nn = int(r0); nn = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setgroups(n int, list *_Gid_t) (errno int) { func setgroups(n int, list *_Gid_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0); _, _, e1 := Syscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) { func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) {
r0, r1, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0); 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); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;

View file

@ -6,19 +6,19 @@ package syscall
import "unsafe" import "unsafe"
func pipe(p *[2]_C_int) (errno int) { func pipe(p *[2]_C_int) (errno int) {
r0, r1, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0); _, _, e1 := Syscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func utimes(path string, times *[2]Timeval) (errno int) { func utimes(path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0); _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) { func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times))); _, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(times)));
errno = int(e1); errno = int(e1);
return; return;
} }
@ -26,98 +26,98 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) { func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0); r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) { func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, errno int) {
r0, r1, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0); r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0);
wpid = int(r0); wpid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func ptrace(request int, pid int, addr uintptr, data uintptr) (errno int) { func ptrace(request int, pid int, addr uintptr, data uintptr) (errno int) {
r0, r1, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0); _, _, e1 := Syscall6(SYS_PTRACE, uintptr(request), uintptr(pid), uintptr(addr), uintptr(data), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Access(path string, mode int) (errno int) { func Access(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Acct(path string) (errno int) { func Acct(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_ACCT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Adjtimex(buf *Timex) (state int, errno int) { func Adjtimex(buf *Timex) (state int, errno int) {
r0, r1, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0); r0, _, e1 := Syscall(SYS_ADJTIMEX, uintptr(unsafe.Pointer(buf)), 0, 0);
state = int(r0); state = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chdir(path string) (errno int) { func Chdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chmod(path string, mode int) (errno int) { func Chmod(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chroot(path string) (errno int) { func Chroot(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Close(fd int) (errno int) { func Close(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Creat(path string, mode int) (fd int, errno int) { func Creat(path string, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); r0, _, e1 := Syscall(SYS_CREAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup(oldfd int) (fd int, errno int) { func Dup(oldfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0); r0, _, e1 := Syscall(SYS_DUP, uintptr(oldfd), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Dup2(oldfd int, newfd int) (fd int, errno int) { func Dup2(oldfd int, newfd int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0); r0, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func EpollCreate(size int) (fd int, errno int) { func EpollCreate(size int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0); r0, _, e1 := Syscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) { func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
r0, r1, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0); _, _, e1 := Syscall6(SYS_EPOLL_CTL, uintptr(epfd), uintptr(op), uintptr(fd), uintptr(unsafe.Pointer(event)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -125,74 +125,74 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) { func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent; var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; } if len(events) > 0 { _p0 = &events[0]; }
r0, r1, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0); r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Exit(code int) () { func Exit(code int) () {
r0, r1, e1 := Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0); Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return; return;
} }
func Faccessat(dirfd int, path string, mode int, flags int) (errno int) { func Faccessat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0); _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fallocate(fd int, mode int, off int64, len int64) (errno int) { func Fallocate(fd int, mode int, off int64, len int64) (errno int) {
r0, r1, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0); _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchdir(fd int) (errno int) { func Fchdir(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmod(fd int, mode int) (errno int) { func Fchmod(fd int, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0); _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) { func Fchmodat(dirfd int, path string, mode int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0); _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) { func Fchownat(dirfd int, path string, uid int, gid int, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0); _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid), uintptr(flags), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func fcntl(fd int, cmd int, arg int) (val int, errno int) { func fcntl(fd int, cmd int, arg int) (val int, errno int) {
r0, r1, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg)); r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg));
val = int(r0); val = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fdatasync(fd int) (errno int) { func Fdatasync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FDATASYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fsync(fd int) (errno int) { func Fsync(fd int) (errno int) {
r0, r1, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0); _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ftruncate(fd int, length int64) (errno int) { func Ftruncate(fd int, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0); _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -200,75 +200,75 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) { func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgid(pid int) (pgid int, errno int) { func Getpgid(pid int) (pgid int, errno int) {
r0, r1, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0); r0, _, e1 := Syscall(SYS_GETPGID, uintptr(pid), 0, 0);
pgid = int(r0); pgid = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getpgrp() (pid int) { func Getpgrp() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPGRP, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPGRP, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getpid() (pid int) { func Getpid() (pid int) {
r0, r1, e1 := Syscall(SYS_GETPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Getppid() (ppid int) { func Getppid() (ppid int) {
r0, r1, e1 := Syscall(SYS_GETPPID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETPPID, 0, 0, 0);
ppid = int(r0); ppid = int(r0);
return; return;
} }
func Getrlimit(resource int, rlim *Rlimit) (errno int) { func Getrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0); _, _, e1 := Syscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getrusage(who int, rusage *Rusage) (errno int) { func Getrusage(who int, rusage *Rusage) (errno int) {
r0, r1, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0); _, _, e1 := Syscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Gettid() (tid int) { func Gettid() (tid int) {
r0, r1, e1 := Syscall(SYS_GETTID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETTID, 0, 0, 0);
tid = int(r0); tid = int(r0);
return; return;
} }
func Gettimeofday(tv *Timeval) (errno int) { func Gettimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0); _, _, e1 := Syscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ioperm(from int, num int, on int) (errno int) { func Ioperm(from int, num int, on int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on)); _, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on));
errno = int(e1); errno = int(e1);
return; return;
} }
func Iopl(level int) (errno int) { func Iopl(level int) (errno int) {
r0, r1, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0); _, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Kill(pid int, sig int) (errno int) { func Kill(pid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0); _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(sig), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -276,70 +276,70 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) { func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Link(oldpath string, newpath string) (errno int) { func Link(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdir(path string, mode int) (errno int) { func Mkdir(path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0); _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Mkdirat(dirfd int, path string, mode int) (errno int) { func Mkdirat(dirfd int, path string, mode int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode)); _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode));
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknod(path string, mode int, dev int) (errno int) { func Mknod(path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev)); _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev));
errno = int(e1); errno = int(e1);
return; return;
} }
func Mknodat(dirfd int, path string, mode int, dev int) (errno int) { func Mknodat(dirfd int, path string, mode int, dev int) (errno int) {
r0, r1, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0); _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(dev), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Nanosleep(time *Timespec, leftover *Timespec) (errno int) { func Nanosleep(time *Timespec, leftover *Timespec) (errno int) {
r0, r1, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0); _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Open(path string, mode int, perm int) (fd int, errno int) { func Open(path string, mode int, perm int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm)); r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(mode), uintptr(perm));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) { func Openat(dirfd int, path string, flags int, mode int) (fd int, errno int) {
r0, r1, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0); r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(flags), uintptr(mode), 0, 0);
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Pause() (errno int) { func Pause() (errno int) {
r0, r1, e1 := Syscall(SYS_PAUSE, 0, 0, 0); _, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func PivotRoot(newroot string, putold string) (errno int) { func PivotRoot(newroot string, putold string) (errno int) {
r0, r1, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0); _, _, e1 := Syscall(SYS_PIVOT_ROOT, uintptr(unsafe.Pointer(StringBytePtr(newroot))), uintptr(unsafe.Pointer(StringBytePtr(putold))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -347,7 +347,7 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) { func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0); r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -356,7 +356,7 @@ func Pread(fd int, p []byte, offset int64) (n int, errno int) {
func Pwrite(fd int, p []byte, offset int64) (n int, errno int) { func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0); r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -365,7 +365,7 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) { func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
@ -374,26 +374,26 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) { func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; } if len(buf) > 0 { _p0 = &buf[0]; }
r0, r1, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf))); r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rename(oldpath string, newpath string) (errno int) { func Rename(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) { func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (errno int) {
r0, r1, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0); _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(newdirfd), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Rmdir(path string) (errno int) { func Rmdir(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -401,7 +401,7 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) { func Setdomainname(p []byte) (errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0); _, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -409,142 +409,142 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) { func Sethostname(p []byte) (errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0); _, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setpgid(pid int, pgid int) (errno int) { func Setpgid(pid int, pgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0); _, _, e1 := Syscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setrlimit(resource int, rlim *Rlimit) (errno int) { func Setrlimit(resource int, rlim *Rlimit) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0); _, _, e1 := Syscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setsid() (pid int) { func Setsid() (pid int) {
r0, r1, e1 := Syscall(SYS_SETSID, 0, 0, 0); r0, _, _ := Syscall(SYS_SETSID, 0, 0, 0);
pid = int(r0); pid = int(r0);
return; return;
} }
func Settimeofday(tv *Timeval) (errno int) { func Settimeofday(tv *Timeval) (errno int) {
r0, r1, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0); _, _, e1 := Syscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setuid(uid int) (errno int) { func Setuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETUID, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) { func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags)); r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags));
n = int64(r0); n = int64(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Symlink(oldpath string, newpath string) (errno int) { func Symlink(oldpath string, newpath string) (errno int) {
r0, r1, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0); _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(StringBytePtr(oldpath))), uintptr(unsafe.Pointer(StringBytePtr(newpath))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Sync() () { func Sync() () {
r0, r1, e1 := Syscall(SYS_SYNC, 0, 0, 0); Syscall(SYS_SYNC, 0, 0, 0);
return; return;
} }
func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) { func SyncFileRange(fd int, off int64, n int64, flags int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0); _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Sysinfo(info *Sysinfo_t) (errno int) { func Sysinfo(info *Sysinfo_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0); _, _, e1 := Syscall(SYS_SYSINFO, uintptr(unsafe.Pointer(info)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) { func Tee(rfd int, wfd int, len int, flags int) (n int64, errno int) {
r0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0); r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0);
n = int64(r0); n = int64(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Tgkill(tgid int, tid int, sig int) (errno int) { func Tgkill(tgid int, tid int, sig int) (errno int) {
r0, r1, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig)); _, _, e1 := Syscall(SYS_TGKILL, uintptr(tgid), uintptr(tid), uintptr(sig));
errno = int(e1); errno = int(e1);
return; return;
} }
func Time(t *Time_t) (tt Time_t, errno int) { func Time(t *Time_t) (tt Time_t, errno int) {
r0, r1, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0); r0, _, e1 := Syscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0);
tt = Time_t(r0); tt = Time_t(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Times(tms *Tms) (ticks uintptr, errno int) { func Times(tms *Tms) (ticks uintptr, errno int) {
r0, r1, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0); r0, _, e1 := Syscall(SYS_TIMES, uintptr(unsafe.Pointer(tms)), 0, 0);
ticks = uintptr(r0); ticks = uintptr(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Truncate(path string, length int64) (errno int) { func Truncate(path string, length int64) (errno int) {
r0, r1, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), 0); _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(length), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Umask(mask int) (oldmask int) { func Umask(mask int) (oldmask int) {
r0, r1, e1 := Syscall(SYS_UMASK, uintptr(mask), 0, 0); r0, _, _ := Syscall(SYS_UMASK, uintptr(mask), 0, 0);
oldmask = int(r0); oldmask = int(r0);
return; return;
} }
func Uname(buf *Utsname) (errno int) { func Uname(buf *Utsname) (errno int) {
r0, r1, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0); _, _, e1 := Syscall(SYS_UNAME, uintptr(unsafe.Pointer(buf)), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlink(path string) (errno int) { func Unlink(path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0); _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unlinkat(dirfd int, path string) (errno int) { func Unlinkat(dirfd int, path string) (errno int) {
r0, r1, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0); _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(StringBytePtr(path))), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Unshare(flags int) (errno int) { func Unshare(flags int) (errno int) {
r0, r1, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0); _, _, e1 := Syscall(SYS_UNSHARE, uintptr(flags), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Ustat(dev int, ubuf *Ustat_t) (errno int) { func Ustat(dev int, ubuf *Ustat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0); _, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Utime(path string, buf *Utimbuf) (errno int) { func Utime(path string, buf *Utimbuf) (errno int) {
r0, r1, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
@ -552,225 +552,225 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) { func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte; var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; } if len(p) > 0 { _p0 = &p[0]; }
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p))); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func exitThread(code int) (errno int) { func exitThread(code int) (errno int) {
r0, r1, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0); _, _, e1 := Syscall(SYS_EXIT, uintptr(code), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func read(fd int, p *byte, np int) (n int, errno int) { func read(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)); r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func write(fd int, p *byte, np int) (n int, errno int) { func write(fd int, p *byte, np int) (n int, errno int) {
r0, r1, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np)); r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(p)), uintptr(np));
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Chown(path string, uid int, gid int) (errno int) { func Chown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Fchown(fd int, uid int, gid int) (errno int) { func Fchown(fd int, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstat(fd int, stat *Stat_t) (errno int) { func Fstat(fd int, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Fstatfs(fd int, buf *Statfs_t) (errno int) { func Fstatfs(fd int, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Getegid() (egid int) { func Getegid() (egid int) {
r0, r1, e1 := Syscall(SYS_GETEGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEGID, 0, 0, 0);
egid = int(r0); egid = int(r0);
return; return;
} }
func Geteuid() (euid int) { func Geteuid() (euid int) {
r0, r1, e1 := Syscall(SYS_GETEUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETEUID, 0, 0, 0);
euid = int(r0); euid = int(r0);
return; return;
} }
func Getgid() (gid int) { func Getgid() (gid int) {
r0, r1, e1 := Syscall(SYS_GETGID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETGID, 0, 0, 0);
gid = int(r0); gid = int(r0);
return; return;
} }
func Getuid() (uid int) { func Getuid() (uid int) {
r0, r1, e1 := Syscall(SYS_GETUID, 0, 0, 0); r0, _, _ := Syscall(SYS_GETUID, 0, 0, 0);
uid = int(r0); uid = int(r0);
return; return;
} }
func Lchown(path string, uid int, gid int) (errno int) { func Lchown(path string, uid int, gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid)); _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(uid), uintptr(gid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Listen(s int, n int) (errno int) { func Listen(s int, n int) (errno int) {
r0, r1, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0); _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Lstat(path string, stat *Stat_t) (errno int) { func Lstat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Seek(fd int, offset int64, whence int) (off int64, errno int) { func Seek(fd int, offset int64, whence int) (off int64, errno int) {
r0, r1, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence)); r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence));
off = int64(r0); off = int64(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) { func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, errno int) {
r0, r1, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0); r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0);
n = int(r0); n = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setfsgid(gid int) (errno int) { func Setfsgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setfsuid(uid int) (errno int) { func Setfsuid(uid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0); _, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setgid(gid int) (errno int) { func Setgid(gid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0); _, _, e1 := Syscall(SYS_SETGID, uintptr(gid), 0, 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setregid(rgid int, egid int) (errno int) { func Setregid(rgid int, egid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0); _, _, e1 := Syscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Setresgid(rgid int, egid int, sgid int) (errno int) { func Setresgid(rgid int, egid int, sgid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid)); _, _, e1 := Syscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setresuid(ruid int, euid int, suid int) (errno int) { func Setresuid(ruid int, euid int, suid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid)); _, _, e1 := Syscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid));
errno = int(e1); errno = int(e1);
return; return;
} }
func Setreuid(ruid int, euid int) (errno int) { func Setreuid(ruid int, euid int) (errno int) {
r0, r1, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0); _, _, e1 := Syscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Shutdown(fd int, how int) (errno int) { func Shutdown(fd int, how int) (errno int) {
r0, r1, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0); _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Stat(path string, stat *Stat_t) (errno int) { func Stat(path string, stat *Stat_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0); _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(stat)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func Statfs(path string, buf *Statfs_t) (errno int) { func Statfs(path string, buf *Statfs_t) (errno int) {
r0, r1, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0); _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(buf)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) { func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func bind(s int, addr uintptr, addrlen _Socklen) (errno int) { func bind(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func connect(s int, addr uintptr, addrlen _Socklen) (errno int) { func connect(s int, addr uintptr, addrlen _Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen)); _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen));
errno = int(e1); errno = int(e1);
return; return;
} }
func getgroups(n int, list *_Gid_t) (nn int, errno int) { func getgroups(n int, list *_Gid_t) (nn int, errno int) {
r0, r1, e1 := Syscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0); r0, _, e1 := Syscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
nn = int(r0); nn = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setgroups(n int, list *_Gid_t) (errno int) { func setgroups(n int, list *_Gid_t) (errno int) {
r0, r1, e1 := Syscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0); _, _, e1 := Syscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) { func setsockopt(s int, level int, name int, val uintptr, vallen int) (errno int) {
r0, r1, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0); _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0);
errno = int(e1); errno = int(e1);
return; return;
} }
func socket(domain int, typ int, proto int) (fd int, errno int) { func socket(domain int, typ int, proto int) (fd int, errno int) {
r0, r1, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto)); r0, _, e1 := Syscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto));
fd = int(r0); fd = int(r0);
errno = int(e1); errno = int(e1);
return; return;
} }
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) { func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
r0, r1, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))); _, _, e1 := Syscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)));
errno = int(e1); errno = int(e1);
return; return;
} }