diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-06-06 22:37:27 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2014-06-06 22:37:27 +0000 |
commit | 6736ef96eab222e58e6294f42be981a5afb59811 (patch) | |
tree | 2bc668fae9bf96f9a3988e0b0a16685bde8c4f0b /libgo/go/net/file_plan9.go | |
parent | 38a138411da4206c53f9a153ee9c3624fce58a52 (diff) |
libgo: Merge to master revision 19184.
The next revision, 19185, renames several runtime files, and
will be handled in a separate change.
From-SVN: r211328
Diffstat (limited to 'libgo/go/net/file_plan9.go')
-rw-r--r-- | libgo/go/net/file_plan9.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libgo/go/net/file_plan9.go b/libgo/go/net/file_plan9.go index f6ee1c29e0f..068f0881dd3 100644 --- a/libgo/go/net/file_plan9.go +++ b/libgo/go/net/file_plan9.go @@ -43,7 +43,7 @@ func newFileFD(f *os.File) (net *netFD, err error) { } comp := splitAtBytes(path, "/") n := len(comp) - if n < 3 || comp[0] != "net" { + if n < 3 || comp[0][0:3] != "net" { return nil, syscall.EPLAN9 } @@ -58,7 +58,7 @@ func newFileFD(f *os.File) (net *netFD, err error) { } defer close(fd) - dir := "/net/" + comp[n-2] + dir := netdir + "/" + comp[n-2] ctl = os.NewFile(uintptr(fd), dir+"/"+file) ctl.Seek(0, 0) var buf [16]byte @@ -71,19 +71,19 @@ func newFileFD(f *os.File) (net *netFD, err error) { if len(comp) < 4 { return nil, errors.New("could not find control file for connection") } - dir := "/net/" + comp[1] + "/" + name + dir := netdir + "/" + comp[1] + "/" + name ctl, err = os.OpenFile(dir+"/ctl", os.O_RDWR, 0) if err != nil { return nil, err } defer close(int(ctl.Fd())) } - dir := "/net/" + comp[1] + "/" + name + dir := netdir + "/" + comp[1] + "/" + name laddr, err := readPlan9Addr(comp[1], dir+"/local") if err != nil { return nil, err } - return newFD(comp[1], name, ctl, nil, laddr, nil), nil + return newFD(comp[1], name, ctl, nil, laddr, nil) } func newFileConn(f *os.File) (c Conn, err error) { |