diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-20 14:28:31 -0800 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2020-02-20 14:29:26 -0800 |
commit | d90d71474f4c82f742140fdf026821709845cece (patch) | |
tree | 055a133e58d5fbea0c852c1a8468977f30940dc9 /pkg/sentry/syscalls/linux | |
parent | 1bb0195079810773bd4457eecb1e7ac1890ddb74 (diff) |
Remove bytes read/written from marshal.Marshallable API.
Users of the API only care about whether the copy in/out succeeds in
their entirety, which is already signalled by the returned error.
PiperOrigin-RevId: 296297843
Diffstat (limited to 'pkg/sentry/syscalls/linux')
-rw-r--r-- | pkg/sentry/syscalls/linux/sys_stat.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/sentry/syscalls/linux/sys_stat.go b/pkg/sentry/syscalls/linux/sys_stat.go index 8b66a9006..11f25e00d 100644 --- a/pkg/sentry/syscalls/linux/sys_stat.go +++ b/pkg/sentry/syscalls/linux/sys_stat.go @@ -131,8 +131,7 @@ func stat(t *kernel.Task, d *fs.Dirent, dirPath bool, statAddr usermem.Addr) err return err } s := statFromAttrs(t, d.Inode.StableAttr, uattr) - _, err = s.CopyOut(t, statAddr) - return err + return s.CopyOut(t, statAddr) } // fstat implements fstat for the given *fs.File. @@ -142,8 +141,7 @@ func fstat(t *kernel.Task, f *fs.File, statAddr usermem.Addr) error { return err } s := statFromAttrs(t, f.Dirent.Inode.StableAttr, uattr) - _, err = s.CopyOut(t, statAddr) - return err + return s.CopyOut(t, statAddr) } // Statx implements linux syscall statx(2). |