summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/fsutil/host_mappable.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/fsutil/host_mappable.go')
-rw-r--r--pkg/sentry/fs/fsutil/host_mappable.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/fs/fsutil/host_mappable.go b/pkg/sentry/fs/fsutil/host_mappable.go
index 340f8d288..1bb5c6b6e 100644
--- a/pkg/sentry/fs/fsutil/host_mappable.go
+++ b/pkg/sentry/fs/fsutil/host_mappable.go
@@ -106,16 +106,16 @@ func (h *HostMappable) InvalidateUnsavable(ctx context.Context) error {
return nil
}
-// MapInto implements platform.File.MapInto.
-func (h *HostMappable) MapInto(as platform.AddressSpace, addr usermem.Addr, fr platform.FileRange, at usermem.AccessType, precommit bool) error {
- return as.MapFile(addr, h.backingFile.FD(), fr, at, precommit)
-}
-
// MapInternal implements platform.File.MapInternal.
func (h *HostMappable) MapInternal(fr platform.FileRange, at usermem.AccessType) (safemem.BlockSeq, error) {
return h.hostFileMapper.MapInternal(fr, h.backingFile.FD(), at.Write)
}
+// FD implements platform.File.FD.
+func (h *HostMappable) FD() int {
+ return h.backingFile.FD()
+}
+
// IncRef implements platform.File.IncRef.
func (h *HostMappable) IncRef(fr platform.FileRange) {
mr := memmap.MappableRange{Start: fr.Start, End: fr.End}