From 02370bbd315d7e7c2783d7001d014870cf1ef534 Mon Sep 17 00:00:00 2001
From: Zach Koopmans <zkoopmans@google.com>
Date: Thu, 12 Aug 2021 15:16:45 -0700
Subject: [syserror] Convert remaining syserror definitions to linuxerr.

Convert remaining public errors (e.g. EINTR) from syserror to linuxerr.

PiperOrigin-RevId: 390471763
---
 pkg/sentry/fs/fsutil/inode.go | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

(limited to 'pkg/sentry/fs/fsutil/inode.go')

diff --git a/pkg/sentry/fs/fsutil/inode.go b/pkg/sentry/fs/fsutil/inode.go
index 7c2de04c1..06a994193 100644
--- a/pkg/sentry/fs/fsutil/inode.go
+++ b/pkg/sentry/fs/fsutil/inode.go
@@ -23,7 +23,6 @@ import (
 	"gvisor.dev/gvisor/pkg/sentry/memmap"
 	"gvisor.dev/gvisor/pkg/sentry/socket/unix/transport"
 	"gvisor.dev/gvisor/pkg/sync"
-	"gvisor.dev/gvisor/pkg/syserror"
 	"gvisor.dev/gvisor/pkg/waiter"
 )
 
@@ -167,7 +166,7 @@ func (i *InodeSimpleAttributes) DropLink() {
 // StatFS implements fs.InodeOperations.StatFS.
 func (i *InodeSimpleAttributes) StatFS(context.Context) (fs.Info, error) {
 	if i.fsType == 0 {
-		return fs.Info{}, syserror.ENOSYS
+		return fs.Info{}, linuxerr.ENOSYS
 	}
 	return fs.Info{Type: i.fsType}, nil
 }
@@ -294,7 +293,7 @@ type InodeNoStatFS struct{}
 
 // StatFS implements fs.InodeOperations.StatFS.
 func (InodeNoStatFS) StatFS(context.Context) (fs.Info, error) {
-	return fs.Info{}, syserror.ENOSYS
+	return fs.Info{}, linuxerr.ENOSYS
 }
 
 // InodeStaticFileGetter implements GetFile for a file with static contents.
@@ -401,7 +400,7 @@ type InodeIsDirTruncate struct{}
 
 // Truncate implements fs.InodeOperations.Truncate.
 func (InodeIsDirTruncate) Truncate(context.Context, *fs.Inode, int64) error {
-	return syserror.EISDIR
+	return linuxerr.EISDIR
 }
 
 // InodeNoopTruncate implements fs.InodeOperations.Truncate as a noop.
@@ -425,7 +424,7 @@ type InodeNotOpenable struct{}
 
 // GetFile implements fs.InodeOperations.GetFile.
 func (InodeNotOpenable) GetFile(context.Context, *fs.Dirent, fs.FileFlags) (*fs.File, error) {
-	return nil, syserror.EIO
+	return nil, linuxerr.EIO
 }
 
 // InodeNotVirtual can be used by Inodes that are not virtual.
@@ -529,5 +528,5 @@ type InodeIsDirAllocate struct{}
 
 // Allocate implements fs.InodeOperations.Allocate.
 func (InodeIsDirAllocate) Allocate(_ context.Context, _ *fs.Inode, _, _ int64) error {
-	return syserror.EISDIR
+	return linuxerr.EISDIR
 }
-- 
cgit v1.2.3