From 6ed325a3c881565cc2473d1fbfa69d806b4b7bbf Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sun, 1 May 2011 18:11:40 -0700 Subject: core: pass the file flags down through the stack Pass the file flags down through the stack. This allows us to distinguish between open for read, open for write, or opendir in the low-level filesystem functions; this will matter for the PXE methods. Signed-off-by: H. Peter Anvin --- core/fs/readdir.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fs/readdir.c') diff --git a/core/fs/readdir.c b/core/fs/readdir.c index d071affd..a437011d 100644 --- a/core/fs/readdir.c +++ b/core/fs/readdir.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -12,7 +13,7 @@ DIR *opendir(const char *path) int rv; struct file *file; - rv = searchdir(path); + rv = searchdir(path, O_RDONLY|O_DIRECTORY); if (rv < 0) return NULL; -- cgit v1.2.1