summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/memfs/memfs.go
diff options
context:
space:
mode:
authorKevin Krakauer <krakauer@google.com>2019-10-19 11:48:09 -0700
committergVisor bot <gvisor-bot@google.com>2019-10-19 11:49:38 -0700
commit652f7b1d0fef6f522baaed091d4820a48014092c (patch)
tree232c464eb49748ab5a57ad18f6912280a9f82dfe /pkg/sentry/fsimpl/memfs/memfs.go
parent74044f2cca498ed3144baccc5d3b7af534829966 (diff)
Add support for pipes in VFS2.
PiperOrigin-RevId: 275650307
Diffstat (limited to 'pkg/sentry/fsimpl/memfs/memfs.go')
-rw-r--r--pkg/sentry/fsimpl/memfs/memfs.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/memfs/memfs.go b/pkg/sentry/fsimpl/memfs/memfs.go
index b78471c0f..64c851c1a 100644
--- a/pkg/sentry/fsimpl/memfs/memfs.go
+++ b/pkg/sentry/fsimpl/memfs/memfs.go
@@ -227,6 +227,8 @@ func (i *inode) statTo(stat *linux.Statx) {
stat.Mask |= linux.STATX_SIZE | linux.STATX_BLOCKS
stat.Size = uint64(len(impl.target))
stat.Blocks = allocatedBlocksForSize(stat.Size)
+ case *namedPipe:
+ stat.Mode |= linux.S_IFIFO
default:
panic(fmt.Sprintf("unknown inode type: %T", i.impl))
}