Commit fcfc1156 authored by Rob Pike's avatar Rob Pike

go.sys/plan9: delete Exec etc.

These are being deleted from go.sys because in general they can
only be implemented in close coordination with the runtime.

LGTM=0intro
R=golang-codereviews, 0intro
CC=golang-codereviews
https://golang.org/cl/132810043
parent 866b9d8a
......@@ -87,6 +87,38 @@ func copyenv() {
}
}
// readdirnames returns the names of files inside the directory represented by dirfd.
func readdirnames(dirfd int) (names []string, err error) {
names = make([]string, 0, 100)
var buf [STATMAX]byte
for {
n, e := Read(dirfd, buf[:])
if e != nil {
return nil, e
}
if n == 0 {
break
}
for i := 0; i < n; {
m, _ := gbit16(buf[i:])
m += 2
if m < STATFIXLEN {
return nil, ErrBadStat
}
s, _, ok := gstring(buf[i+41:])
if !ok {
return nil, ErrBadStat
}
names = append(names, s)
i += int(m)
}
}
return
}
func Getenv(key string) (value string, found bool) {
if len(key) == 0 {
return "", false
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment