Commit cabe0e6a authored by Anthony Martin's avatar Anthony Martin Committed by Russ Cox

os, syscall: fix Plan 9 build

R=rsc
CC=golang-dev
https://golang.org/cl/5330067
parent f2b602ed
......@@ -7,7 +7,7 @@
package os
import (
"error"
"errors"
"syscall"
)
......
......@@ -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 (
......
......@@ -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)
......
......@@ -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) }
......
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