diff options
Diffstat (limited to 'src/pkg/syscall/zsyscall_linux_amd64.go')
| -rw-r--r-- | src/pkg/syscall/zsyscall_linux_amd64.go | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/src/pkg/syscall/zsyscall_linux_amd64.go b/src/pkg/syscall/zsyscall_linux_amd64.go index 59ceb74c3..597ba0558 100644 --- a/src/pkg/syscall/zsyscall_linux_amd64.go +++ b/src/pkg/syscall/zsyscall_linux_amd64.go @@ -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; } - - - |
