apply gofmt to auto-generated syscall files

R=gri
DELTA=4023  (104 added, 27 deleted, 3892 changed)
OCL=35416
CL=35418
This commit is contained in:
Russ Cox 2009-10-06 19:38:30 -07:00
parent a2cf914379
commit 6faacd2244
25 changed files with 3993 additions and 3916 deletions

View file

@ -126,7 +126,7 @@ linux_arm)
;;
esac
echo "$mkerrors >zerrors_$GOOSARCH.go"
echo "$mksyscall syscall_$GOOS.go syscall_$GOOSARCH.go >zsyscall_$GOOSARCH.go"
echo "$mksysnum >zsysnum_$GOOSARCH.go"
echo "$mktypes types_$GOOS.c >ztypes_$GOOSARCH.go"
echo "$mkerrors |gofmt >zerrors_$GOOSARCH.go"
echo "$mksyscall syscall_$GOOS.go syscall_$GOOSARCH.go |gofmt >zsyscall_$GOOSARCH.go"
echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"
echo "$mktypes types_$GOOS.c |gofmt >ztypes_$GOOSARCH.go"

View file

@ -257,4 +257,3 @@ var errors = [...]string {
65: "no route to host",
102: "operation not supported on socket",
}

View file

@ -257,4 +257,3 @@ var errors = [...]string {
65: "no route to host",
102: "operation not supported on socket",
}

View file

@ -313,4 +313,3 @@ var errors = [...]string {
20: "not a directory",
124: "wrong medium type",
}

View file

@ -313,4 +313,3 @@ var errors = [...]string {
20: "not a directory",
124: "wrong medium type",
}

View file

@ -313,4 +313,3 @@ var errors = [...]string {
76: "name not unique on network",
124: "wrong medium type",
}

View file

@ -86,7 +86,9 @@ 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) {
var _p0 *_C_int;
if len(mib) > 0 { _p0 = &mib[0]; }
if len(mib) > 0 {
_p0 = &mib[0];
}
_, _, 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);
return;
@ -166,7 +168,7 @@ func Exchangedata(path1 string, path2 string, options int) (errno int) {
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0);
return;
}
@ -234,7 +236,9 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0);
n = int(r0);
errno = int(e1);
@ -261,7 +265,9 @@ func Geteuid() (uid int) {
func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) {
var _p0 *Statfs_t;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags));
n = int(r0);
errno = int(e1);
@ -408,7 +414,9 @@ func Pathconf(path string, name int) (val int, errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -417,7 +425,9 @@ func Pread(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;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -426,7 +436,9 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -435,7 +447,9 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -607,7 +621,9 @@ func Unmount(path string, flags int) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -635,6 +651,3 @@ func gettimeofday(tp *Timeval) (sec int32, usec int32, errno int) {
errno = int(e1);
return;
}

View file

@ -86,7 +86,9 @@ 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) {
var _p0 *_C_int;
if len(mib) > 0 { _p0 = &mib[0]; }
if len(mib) > 0 {
_p0 = &mib[0];
}
_, _, 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);
return;
@ -166,7 +168,7 @@ func Exchangedata(path1 string, path2 string, options int) (errno int) {
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0);
return;
}
@ -234,7 +236,9 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0);
n = int(r0);
errno = int(e1);
@ -261,7 +265,9 @@ func Geteuid() (uid int) {
func Getfsstat(buf []Statfs_t, flags int) (n int, errno int) {
var _p0 *Statfs_t;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), uintptr(flags));
n = int(r0);
errno = int(e1);
@ -408,7 +414,9 @@ func Pathconf(path string, name int) (val int, errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0);
errno = int(e1);
@ -417,7 +425,9 @@ func Pread(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;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0);
errno = int(e1);
@ -426,7 +436,9 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -435,7 +447,9 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -608,7 +622,9 @@ func Unmount(path string, flags int) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -636,6 +652,3 @@ func gettimeofday(tp *Timeval) (sec int64, usec int32, errno int) {
errno = int(e1);
return;
}

View file

@ -25,7 +25,9 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0);
errno = int(e1);
@ -124,14 +126,16 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; }
if len(events) > 0 {
_p0 = &events[0];
}
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0);
errno = int(e1);
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return;
}
@ -199,7 +203,9 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -275,7 +281,9 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -346,7 +354,9 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -355,7 +365,9 @@ func Pread(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;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -364,7 +376,9 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -373,7 +387,9 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -400,7 +416,9 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -408,7 +426,9 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -456,7 +476,7 @@ func Symlink(oldpath string, newpath string) (errno int) {
return;
}
func Sync() () {
func Sync() {
Syscall(SYS_SYNC, 0, 0, 0);
return;
}
@ -549,7 +569,9 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -709,6 +731,3 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
errno = int(e1);
return;
}

View file

@ -25,7 +25,9 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0);
errno = int(e1);
@ -124,14 +126,16 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; }
if len(events) > 0 {
_p0 = &events[0];
}
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0);
errno = int(e1);
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return;
}
@ -199,7 +203,9 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -275,7 +281,9 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -346,7 +354,9 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0);
errno = int(e1);
@ -355,7 +365,9 @@ func Pread(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;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0);
n = int(r0);
errno = int(e1);
@ -364,7 +376,9 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -373,7 +387,9 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -400,7 +416,9 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -408,7 +426,9 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -457,7 +477,7 @@ func Symlink(oldpath string, newpath string) (errno int) {
return;
}
func Sync() () {
func Sync() {
Syscall(SYS_SYNC, 0, 0, 0);
return;
}
@ -551,7 +571,9 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -774,6 +796,3 @@ func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (errno int) {
errno = int(e1);
return;
}

View file

@ -25,7 +25,9 @@ func futimesat(dirfd int, path string, times *[2]Timeval) (errno int) {
func Getcwd(buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETCWD, uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)), 0);
n = int(r0);
errno = int(e1);
@ -124,14 +126,16 @@ func EpollCtl(epfd int, op int, fd int, event *EpollEvent) (errno int) {
func EpollWait(epfd int, events []EpollEvent, msec int) (n int, errno int) {
var _p0 *EpollEvent;
if len(events) > 0 { _p0 = &events[0]; }
if len(events) > 0 {
_p0 = &events[0];
}
r0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(unsafe.Pointer(_p0)), uintptr(len(events)), uintptr(msec), 0, 0);
n = int(r0);
errno = int(e1);
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT_GROUP, uintptr(code), 0, 0);
return;
}
@ -199,7 +203,9 @@ func Ftruncate(fd int, length int64) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETDENTS64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -263,7 +269,9 @@ func Kill(pid int, sig int) (errno int) {
func Klogctl(typ int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_SYSLOG, uintptr(typ), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -334,7 +342,9 @@ func PivotRoot(newroot string, putold string) (errno int) {
func Pread(fd int, p []byte, offset int64) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -343,7 +353,9 @@ func Pread(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;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0);
n = int(r0);
errno = int(e1);
@ -352,7 +364,9 @@ func Pwrite(fd int, p []byte, offset int64) (n int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -361,7 +375,9 @@ func Read(fd int, p []byte) (n int, errno int) {
func Readlink(path string, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(StringBytePtr(path))), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -388,7 +404,9 @@ func Rmdir(path string) (errno int) {
func Setdomainname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETDOMAINNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -396,7 +414,9 @@ func Setdomainname(p []byte) (errno int) {
func Sethostname(p []byte) (errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
_, _, e1 := Syscall(SYS_SETHOSTNAME, uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), 0);
errno = int(e1);
return;
@ -444,7 +464,7 @@ func Symlink(oldpath string, newpath string) (errno int) {
return;
}
func Sync() () {
func Sync() {
Syscall(SYS_SYNC, 0, 0, 0);
return;
}
@ -531,7 +551,9 @@ func Utime(path string, buf *Utimbuf) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -753,6 +775,3 @@ func Statfs(path string, buf *Statfs_t) (errno int) {
errno = int(e1);
return;
}

View file

@ -23,7 +23,7 @@ func Close(fd int) (errno int) {
return;
}
func Exit(code int) () {
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0);
return;
}
@ -36,7 +36,9 @@ func Fstat(fd int, stat *Stat_t) (errno int) {
func Getdents(fd int, buf []byte) (n int, errno int) {
var _p0 *byte;
if len(buf) > 0 { _p0 = &buf[0]; }
if len(buf) > 0 {
_p0 = &buf[0];
}
r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(buf)));
n = int(r0);
errno = int(e1);
@ -64,7 +66,9 @@ func Open(path string, mode int, perm int) (fd int, errno int) {
func Read(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -86,7 +90,9 @@ func Stat(path string, stat *Stat_t) (errno int) {
func Write(fd int, p []byte) (n int, errno int) {
var _p0 *byte;
if len(p) > 0 { _p0 = &p[0]; }
if len(p) > 0 {
_p0 = &p[0];
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)));
n = int(r0);
errno = int(e1);
@ -221,6 +227,3 @@ func AudioStream(data *uint16, size *uintptr) (errno int) {
errno = int(e1);
return;
}

View file

@ -315,5 +315,4 @@ const(
SYS_FALLOCATE = 324;
)
func _darwin_system_call_conflict() {
}
func _darwin_system_call_conflict() {}

View file

@ -292,5 +292,4 @@ const(
SYS_FALLOCATE = 285;
)
func _darwin_system_call_conflict() {
}
func _darwin_system_call_conflict() {}

View file

@ -335,5 +335,4 @@ const(
SYS_INOTIFY_INIT1 = (SYS_SYSCALL_BASE + 360);
)
func _darwin_system_call_conflict() {
}
func _darwin_system_call_conflict() {}

View file

@ -59,4 +59,3 @@ const(
SYS_SEM_POST = 102;
SYS_SEM_GET_VALUE = 103;
)

View file

@ -179,7 +179,7 @@ type Statfs_t struct {
Bavail uint64;
Files uint64;
Ffree uint64;
Fsid [8]byte /* fsid */;
Fsid [8]byte; /* fsid */
Owner uint32;
Type uint32;
Flags uint32;
@ -204,7 +204,7 @@ type RawSockaddrInet4 struct {
Len uint8;
Family uint8;
Port uint16;
Addr [4]byte /* in_addr */;
Addr [4]byte; /* in_addr */
Zero [8]int8;
}
@ -213,7 +213,7 @@ type RawSockaddrInet6 struct {
Family uint8;
Port uint16;
Flowinfo uint32;
Addr [16]byte /* in6_addr */;
Addr [16]byte; /* in6_addr */
Scope_id uint32;
}

View file

@ -181,7 +181,7 @@ type Statfs_t struct {
Bavail uint64;
Files uint64;
Ffree uint64;
Fsid [8]byte /* fsid */;
Fsid [8]byte; /* fsid */
Owner uint32;
Type uint32;
Flags uint32;
@ -206,7 +206,7 @@ type RawSockaddrInet4 struct {
Len uint8;
Family uint8;
Port uint16;
Addr [4]byte /* in_addr */;
Addr [4]byte; /* in_addr */
Zero [8]int8;
}
@ -215,7 +215,7 @@ type RawSockaddrInet6 struct {
Family uint8;
Port uint16;
Flowinfo uint32;
Addr [16]byte /* in6_addr */;
Addr [16]byte; /* in6_addr */
Scope_id uint32;
}

View file

@ -246,7 +246,7 @@ type Statfs_t struct {
Bavail uint64;
Files uint64;
Ffree uint64;
Fsid [8]byte /* __fsid_t */;
Fsid [8]byte; /* __fsid_t */
Namelen int32;
Frsize int32;
Spare [5]int32;
@ -264,7 +264,7 @@ type Dirent struct {
type RawSockaddrInet4 struct {
Family uint16;
Port uint16;
Addr [4]byte /* in_addr */;
Addr [4]byte; /* in_addr */
Zero [8]uint8;
}
@ -272,7 +272,7 @@ type RawSockaddrInet6 struct {
Family uint16;
Port uint16;
Flowinfo uint32;
Addr [16]byte /* in6_addr */;
Addr [16]byte; /* in6_addr */
Scope_id uint32;
}

View file

@ -246,7 +246,7 @@ type Statfs_t struct {
Bavail uint64;
Files uint64;
Ffree uint64;
Fsid [8]byte /* __fsid_t */;
Fsid [8]byte; /* __fsid_t */
Namelen int64;
Frsize int64;
Spare [5]int64;
@ -264,7 +264,7 @@ type Dirent struct {
type RawSockaddrInet4 struct {
Family uint16;
Port uint16;
Addr [4]byte /* in_addr */;
Addr [4]byte; /* in_addr */
Zero [8]uint8;
}
@ -272,7 +272,7 @@ type RawSockaddrInet6 struct {
Family uint16;
Port uint16;
Flowinfo uint32;
Addr [16]byte /* in6_addr */;
Addr [16]byte; /* in6_addr */
Scope_id uint32;
}

View file

@ -246,7 +246,7 @@ type Statfs_t struct {
Bavail uint64;
Files uint64;
Ffree uint64;
Fsid [8]byte /* __fsid_t */;
Fsid [8]byte; /* __fsid_t */
Namelen int32;
Frsize int32;
Spare [5]int32;
@ -264,7 +264,7 @@ type Dirent struct {
type RawSockaddrInet4 struct {
Family uint16;
Port uint16;
Addr [4]byte /* in_addr */;
Addr [4]byte; /* in_addr */
Zero [8]uint8;
}
@ -272,7 +272,7 @@ type RawSockaddrInet6 struct {
Family uint16;
Port uint16;
Flowinfo uint32;
Addr [16]byte /* in6_addr */;
Addr [16]byte; /* in6_addr */
Scope_id uint32;
}