diff options
Diffstat (limited to 'pkg/sentry/fs')
-rw-r--r-- | pkg/sentry/fs/fdpipe/pipe.go | 5 | ||||
-rw-r--r-- | pkg/sentry/fs/host/fs_test.go | 6 | ||||
-rw-r--r-- | pkg/sentry/fs/host/socket.go | 5 |
3 files changed, 3 insertions, 13 deletions
diff --git a/pkg/sentry/fs/fdpipe/pipe.go b/pkg/sentry/fs/fdpipe/pipe.go index f7bbd4aff..7b318e35f 100644 --- a/pkg/sentry/fs/fdpipe/pipe.go +++ b/pkg/sentry/fs/fdpipe/pipe.go @@ -90,10 +90,7 @@ func (p *pipeOperations) init() error { if err := syscall.SetNonblock(p.file.FD(), true); err != nil { return err } - if err := fdnotifier.AddFD(int32(p.file.FD()), &p.Queue); err != nil { - return err - } - return nil + return fdnotifier.AddFD(int32(p.file.FD()), &p.Queue) } // EventRegister implements waiter.Waitable.EventRegister. diff --git a/pkg/sentry/fs/host/fs_test.go b/pkg/sentry/fs/host/fs_test.go index c000afc49..b08125ca8 100644 --- a/pkg/sentry/fs/host/fs_test.go +++ b/pkg/sentry/fs/host/fs_test.go @@ -141,11 +141,7 @@ func createTestDirs(ctx context.Context, t *testing.T, m *fs.MountNamespace) err return err } - if err := symlinks.CreateLink(ctx, r, "/symlinks", "recursive"); err != nil { - return err - } - - return nil + return symlinks.CreateLink(ctx, r, "/symlinks", "recursive") } // allPaths returns a slice of all paths of entries visible in the rootfs. diff --git a/pkg/sentry/fs/host/socket.go b/pkg/sentry/fs/host/socket.go index 8e36ed7ee..467633052 100644 --- a/pkg/sentry/fs/host/socket.go +++ b/pkg/sentry/fs/host/socket.go @@ -69,10 +69,7 @@ func (e *endpoint) init() error { } e.stype = unix.SockType(stype) - if err := fdnotifier.AddFD(int32(e.fd), &e.queue); err != nil { - return err - } - return nil + return fdnotifier.AddFD(int32(e.fd), &e.queue) } // newEndpoint creates a new host endpoint. |