]> Cypherpunks repositories - gostls13.git/commitdiff
os, syscall: fix Plan 9 build
authorAnthony Martin <ality@pbrane.org>
Tue, 8 Nov 2011 14:06:02 +0000 (09:06 -0500)
committerRuss Cox <rsc@golang.org>
Tue, 8 Nov 2011 14:06:02 +0000 (09:06 -0500)
R=rsc
CC=golang-dev
https://golang.org/cl/5330067

src/pkg/os/env_plan9.go
src/pkg/os/error_plan9.go
src/pkg/os/exec_plan9.go
src/pkg/syscall/syscall_plan9.go

index 762734a54c480391d951c16c0a837484d27d3c88..9757aa902af8f23206ddce19cb2724921df05fe2 100644 (file)
@@ -7,7 +7,7 @@
 package os
 
 import (
-       "error"
+       "errors"
        "syscall"
 )
 
index 1e5114dc07f975d41532f47d6a4c6531ff470f95..e08707078eccfcfe2926c91ef917c3c2249f33b7 100644 (file)
@@ -28,7 +28,7 @@ func NewSyscallError(syscall string, err syscall.Error) error {
        if err == nil {
                return nil
        }
-       return &SyscallError{syscall, err.String()}
+       return &SyscallError{syscall, err.Error()}
 }
 
 var (
index a815c99d68da6a81ddd391f59b27ca540cb12a18..a1a335359dc7e581f696dc73fa36b9f80bbbb74e 100644 (file)
@@ -5,6 +5,7 @@
 package os
 
 import (
+       "errors"
        "runtime"
        "syscall"
 )
@@ -47,7 +48,7 @@ func (note Plan9Note) String() string {
 
 func (p *Process) Signal(sig Signal) error {
        if p.done {
-               return NewError("os: process already finished")
+               return errors.New("os: process already finished")
        }
 
        f, e := OpenFile("/proc/"+itoa(p.Pid)+"/note", O_WRONLY, 0)
index 16f8e7337e6655274b8237ef67cbb42df522de02..0cc8ee9555525deb902ecf6cedcae1d63502eba5 100644 (file)
@@ -19,13 +19,13 @@ const ImplementsGetwd = true
 
 // An Error can represent any printable error condition.
 type Error interface {
-       String() string
+       error
 }
 
 // ErrorString implements Error's String method by returning itself.
 type ErrorString string
 
-func (e ErrorString) String() string { return string(e) }
+func (e ErrorString) Error() string { return string(e) }
 
 // NewError converts s to an ErrorString, which satisfies the Error interface.
 func NewError(s string) Error { return ErrorString(s) }