summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/fsutil/inode.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-12 22:31:07 +0000
committergVisor bot <gvisor-bot@google.com>2021-07-12 22:31:07 +0000
commitcbf3251b8d2ea4b6ab3eff2bd6a4b2804a11706c (patch)
tree24b26c36e631a803a71bffeff8f0658247db0fc2 /pkg/sentry/fs/fsutil/inode.go
parentf28c339def09aea90fe60b3abb38215c5e5c8e52 (diff)
parente3fdd1593217894328d5a917bbc356d0a7d145f0 (diff)
Merge release-20210705.0-11-ge3fdd1593 (automated)
Diffstat (limited to 'pkg/sentry/fs/fsutil/inode.go')
-rw-r--r--pkg/sentry/fs/fsutil/inode.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/pkg/sentry/fs/fsutil/inode.go b/pkg/sentry/fs/fsutil/inode.go
index d2b769007..7c2de04c1 100644
--- a/pkg/sentry/fs/fsutil/inode.go
+++ b/pkg/sentry/fs/fsutil/inode.go
@@ -237,7 +237,7 @@ func (i *InodeSimpleExtendedAttributes) SetXattr(_ context.Context, _ *fs.Inode,
_, ok := i.xattrs[name]
if ok && flags&linux.XATTR_CREATE != 0 {
- return syserror.EEXIST
+ return linuxerr.EEXIST
}
if !ok && flags&linux.XATTR_REPLACE != 0 {
return linuxerr.ENODATA
@@ -332,47 +332,47 @@ type InodeNotDirectory struct{}
// Lookup implements fs.InodeOperations.Lookup.
func (InodeNotDirectory) Lookup(context.Context, *fs.Inode, string) (*fs.Dirent, error) {
- return nil, syserror.ENOTDIR
+ return nil, linuxerr.ENOTDIR
}
// Create implements fs.InodeOperations.Create.
func (InodeNotDirectory) Create(context.Context, *fs.Inode, string, fs.FileFlags, fs.FilePermissions) (*fs.File, error) {
- return nil, syserror.ENOTDIR
+ return nil, linuxerr.ENOTDIR
}
// CreateLink implements fs.InodeOperations.CreateLink.
func (InodeNotDirectory) CreateLink(context.Context, *fs.Inode, string, string) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// CreateHardLink implements fs.InodeOperations.CreateHardLink.
func (InodeNotDirectory) CreateHardLink(context.Context, *fs.Inode, *fs.Inode, string) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// CreateDirectory implements fs.InodeOperations.CreateDirectory.
func (InodeNotDirectory) CreateDirectory(context.Context, *fs.Inode, string, fs.FilePermissions) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// Bind implements fs.InodeOperations.Bind.
func (InodeNotDirectory) Bind(context.Context, *fs.Inode, string, transport.BoundEndpoint, fs.FilePermissions) (*fs.Dirent, error) {
- return nil, syserror.ENOTDIR
+ return nil, linuxerr.ENOTDIR
}
// CreateFifo implements fs.InodeOperations.CreateFifo.
func (InodeNotDirectory) CreateFifo(context.Context, *fs.Inode, string, fs.FilePermissions) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// Remove implements fs.InodeOperations.Remove.
func (InodeNotDirectory) Remove(context.Context, *fs.Inode, string) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// RemoveDirectory implements fs.InodeOperations.RemoveDirectory.
func (InodeNotDirectory) RemoveDirectory(context.Context, *fs.Inode, string) error {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// Rename implements fs.FileOperations.Rename.
@@ -463,22 +463,22 @@ type InodeNoExtendedAttributes struct{}
// GetXattr implements fs.InodeOperations.GetXattr.
func (InodeNoExtendedAttributes) GetXattr(context.Context, *fs.Inode, string, uint64) (string, error) {
- return "", syserror.EOPNOTSUPP
+ return "", linuxerr.EOPNOTSUPP
}
// SetXattr implements fs.InodeOperations.SetXattr.
func (InodeNoExtendedAttributes) SetXattr(context.Context, *fs.Inode, string, string, uint32) error {
- return syserror.EOPNOTSUPP
+ return linuxerr.EOPNOTSUPP
}
// ListXattr implements fs.InodeOperations.ListXattr.
func (InodeNoExtendedAttributes) ListXattr(context.Context, *fs.Inode, uint64) (map[string]struct{}, error) {
- return nil, syserror.EOPNOTSUPP
+ return nil, linuxerr.EOPNOTSUPP
}
// RemoveXattr implements fs.InodeOperations.RemoveXattr.
func (InodeNoExtendedAttributes) RemoveXattr(context.Context, *fs.Inode, string) error {
- return syserror.EOPNOTSUPP
+ return linuxerr.EOPNOTSUPP
}
// InodeNoopRelease implements fs.InodeOperations.Release as a noop.
@@ -513,7 +513,7 @@ type InodeNotAllocatable struct{}
// Allocate implements fs.InodeOperations.Allocate.
func (InodeNotAllocatable) Allocate(_ context.Context, _ *fs.Inode, _, _ int64) error {
- return syserror.EOPNOTSUPP
+ return linuxerr.EOPNOTSUPP
}
// InodeNoopAllocate implements fs.InodeOperations.Allocate as a noop.