From 1f2ce9f46100d6ff958f7c257d3c0a949ede4f4c Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Thu, 17 Jun 2021 17:51:36 -0700 Subject: [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 --- pkg/errors/linuxerr/linuxerr.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg/errors/linuxerr') 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, -- cgit v1.2.3