summaryrefslogtreecommitdiffhomepage
path: root/pkg/errors
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-06-17 17:51:36 -0700
committergVisor bot <gvisor-bot@google.com>2021-06-17 17:54:11 -0700
commit1f2ce9f46100d6ff958f7c257d3c0a949ede4f4c (patch)
tree18db716601274c9e8bf1e0b9149113d9da3526b2 /pkg/errors
parentbc27a991851fdffa59f028eecfc22bdd17ccaa55 (diff)
[syserror] Change p9 server to use linuxerr.
Change the p9 server to use *errors.Error defined in pkg linuxerr. Done separate from the client so that we ensure different p9 server/client versions work with each other. PiperOrigin-RevId: 380084491
Diffstat (limited to 'pkg/errors')
-rw-r--r--pkg/errors/linuxerr/linuxerr.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/errors/linuxerr/linuxerr.go b/pkg/errors/linuxerr/linuxerr.go
index 23d9f9f75..bbdcdecd0 100644
--- a/pkg/errors/linuxerr/linuxerr.go
+++ b/pkg/errors/linuxerr/linuxerr.go
@@ -27,6 +27,7 @@ import (
const maxErrno uint32 = errno.EHWPOISON + 1
var (
+ NOERROR = errors.New(errno.NOERRNO, "not an error")
EPERM = errors.New(errno.EPERM, "operation not permitted")
ENOENT = errors.New(errno.ENOENT, "no such file or directory")
ESRCH = errors.New(errno.ESRCH, "no such process")
@@ -176,7 +177,7 @@ var errNotValidError = errors.New(errno.Errno(maxErrno), "not a valid error")
// errnos (especially uint32(sycall.Errno)) and *Error.
var errorSlice = []*errors.Error{
// Errno values from include/uapi/asm-generic/errno-base.h.
- errno.NOERRNO: nil,
+ errno.NOERRNO: NOERROR,
errno.EPERM: EPERM,
errno.ENOENT: ENOENT,
errno.ESRCH: ESRCH,