From 1501400d9c6f4c5e82e7cb134d9a2bddac548611 Mon Sep 17 00:00:00 2001 From: Nicolas Lacasse Date: Mon, 20 Aug 2018 11:58:46 -0700 Subject: [PATCH] getdents should return type=DT_DIR for SpecialDirectories. It was returning DT_UNKNOWN, and this was breaking numpy. PiperOrigin-RevId: 209459351 Change-Id: Ic6f548e23aa9c551b2032b92636cb5f0df9ccbd4 --- pkg/sentry/syscalls/linux/sys_getdents.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/sentry/syscalls/linux/sys_getdents.go b/pkg/sentry/syscalls/linux/sys_getdents.go index 178714b07..29c0d7a39 100644 --- a/pkg/sentry/syscalls/linux/sys_getdents.go +++ b/pkg/sentry/syscalls/linux/sys_getdents.go @@ -150,7 +150,7 @@ func toType(nodeType fs.InodeType) uint8 { return syscall.DT_REG case fs.Symlink: return syscall.DT_LNK - case fs.Directory: + case fs.Directory, fs.SpecialDirectory: return syscall.DT_DIR case fs.Pipe: return syscall.DT_FIFO