aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/plan9/syscall_plan9.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/sys/plan9/syscall_plan9.go')
-rw-r--r--vendor/golang.org/x/sys/plan9/syscall_plan9.go16
1 files changed, 14 insertions, 2 deletions
diff --git a/vendor/golang.org/x/sys/plan9/syscall_plan9.go b/vendor/golang.org/x/sys/plan9/syscall_plan9.go
index 84e1471..d079d81 100644
--- a/vendor/golang.org/x/sys/plan9/syscall_plan9.go
+++ b/vendor/golang.org/x/sys/plan9/syscall_plan9.go
@@ -115,6 +115,7 @@ func Write(fd int, p []byte) (n int, err error) {
var ioSync int64
//sys fd2path(fd int, buf []byte) (err error)
+
func Fd2path(fd int) (path string, err error) {
var buf [512]byte
@@ -126,14 +127,17 @@ func Fd2path(fd int) (path string, err error) {
}
//sys pipe(p *[2]int32) (err error)
+
func Pipe(p []int) (err error) {
if len(p) != 2 {
return syscall.ErrorString("bad arg in system call")
}
var pp [2]int32
err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
@@ -178,6 +182,7 @@ func (w Waitmsg) ExitStatus() int {
}
//sys await(s []byte) (n int, err error)
+
func Await(w *Waitmsg) (err error) {
var buf [512]byte
var f [5][]byte
@@ -299,42 +304,49 @@ func Getgroups() (gids []int, err error) {
}
//sys open(path string, mode int) (fd int, err error)
+
func Open(path string, mode int) (fd int, err error) {
fixwd()
return open(path, mode)
}
//sys create(path string, mode int, perm uint32) (fd int, err error)
+
func Create(path string, mode int, perm uint32) (fd int, err error) {
fixwd()
return create(path, mode, perm)
}
//sys remove(path string) (err error)
+
func Remove(path string) error {
fixwd()
return remove(path)
}
//sys stat(path string, edir []byte) (n int, err error)
+
func Stat(path string, edir []byte) (n int, err error) {
fixwd()
return stat(path, edir)
}
//sys bind(name string, old string, flag int) (err error)
+
func Bind(name string, old string, flag int) (err error) {
fixwd()
return bind(name, old, flag)
}
//sys mount(fd int, afd int, old string, flag int, aname string) (err error)
+
func Mount(fd int, afd int, old string, flag int, aname string) (err error) {
fixwd()
return mount(fd, afd, old, flag, aname)
}
//sys wstat(path string, edir []byte) (err error)
+
func Wstat(path string, edir []byte) (err error) {
fixwd()
return wstat(path, edir)