summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/sys_inotify.go
diff options
context:
space:
mode:
authorZach Koopmans <zkoopmans@google.com>2021-07-12 15:24:04 -0700
committergVisor bot <gvisor-bot@google.com>2021-07-12 15:26:20 -0700
commite3fdd1593217894328d5a917bbc356d0a7d145f0 (patch)
tree1913cf79abb68fda218f249ffa32a7bf309330ac /pkg/sentry/syscalls/linux/sys_inotify.go
parentebe99977a47d93ee769121f9463650cfb924e243 (diff)
[syserror] Update syserror to linuxerr for more errors.
Update the following from syserror to the linuxerr equivalent: EEXIST EFAULT ENOTDIR ENOTTY EOPNOTSUPP ERANGE ESRCH PiperOrigin-RevId: 384329869
Diffstat (limited to 'pkg/sentry/syscalls/linux/sys_inotify.go')
-rw-r--r--pkg/sentry/syscalls/linux/sys_inotify.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_inotify.go b/pkg/sentry/syscalls/linux/sys_inotify.go
index 3738e4cfb..b7ad1922e 100644
--- a/pkg/sentry/syscalls/linux/sys_inotify.go
+++ b/pkg/sentry/syscalls/linux/sys_inotify.go
@@ -21,7 +21,6 @@ import (
"gvisor.dev/gvisor/pkg/sentry/fs"
"gvisor.dev/gvisor/pkg/sentry/fs/anon"
"gvisor.dev/gvisor/pkg/sentry/kernel"
- "gvisor.dev/gvisor/pkg/syserror"
)
const allFlags = int(linux.IN_NONBLOCK | linux.IN_CLOEXEC)
@@ -109,7 +108,7 @@ func InotifyAddWatch(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kern
err = fileOpOn(t, linux.AT_FDCWD, path, resolve, func(root *fs.Dirent, dirent *fs.Dirent, _ uint) error {
// "IN_ONLYDIR: Only watch pathname if it is a directory." -- inotify(7)
if onlyDir := mask&linux.IN_ONLYDIR != 0; onlyDir && !fs.IsDir(dirent.Inode.StableAttr) {
- return syserror.ENOTDIR
+ return linuxerr.ENOTDIR
}
// Copy out to the return frame.