summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/fd_map.go
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-08-09 16:49:23 -0700
committerShentubot <shentubot@google.com>2018-08-09 16:50:37 -0700
commit2e06b23aa61216fcdbefcd6b11a24bca7a456b16 (patch)
treeea4fd6afd814213ea1e13fe58adad4ad5e47cb08 /pkg/sentry/kernel/fd_map.go
parent4e171f7590284c1f4cedf90c92204873961b2e97 (diff)
Fix missing O_LARGEFILE from O_CREAT files
Cleanup some more syscall.O_* references while we're here. PiperOrigin-RevId: 208133460 Change-Id: I48db71a38f817e4f4673977eafcc0e3874eb9a25
Diffstat (limited to 'pkg/sentry/kernel/fd_map.go')
-rw-r--r--pkg/sentry/kernel/fd_map.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/sentry/kernel/fd_map.go b/pkg/sentry/kernel/fd_map.go
index d5d4aaacb..cad0b0a20 100644
--- a/pkg/sentry/kernel/fd_map.go
+++ b/pkg/sentry/kernel/fd_map.go
@@ -53,7 +53,8 @@ type FDFlags struct {
CloseOnExec bool
}
-// ToLinuxFileFlags converts a kernel.FDFlags object to a Linux file flags representation.
+// ToLinuxFileFlags converts a kernel.FDFlags object to a Linux file flags
+// representation.
func (f FDFlags) ToLinuxFileFlags() (mask uint) {
if f.CloseOnExec {
mask |= linux.O_CLOEXEC
@@ -61,7 +62,8 @@ func (f FDFlags) ToLinuxFileFlags() (mask uint) {
return
}
-// ToLinuxFDFlags converts a kernel.FDFlags object to a Linux descriptor flags representation.
+// ToLinuxFDFlags converts a kernel.FDFlags object to a Linux descriptor flags
+// representation.
func (f FDFlags) ToLinuxFDFlags() (mask uint) {
if f.CloseOnExec {
mask |= linux.FD_CLOEXEC