From 499e349afa57536ce80497aa99f61c5492e3733e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 29 Jan 2011 03:15:44 +0100 Subject: More filesystem stuff working. devfs is now in place with stdin, stdout, and stderr. --- os/src/open.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 os/src/open.c (limited to 'os/src/open.c') diff --git a/os/src/open.c b/os/src/open.c new file mode 100644 index 0000000..7a2c147 --- /dev/null +++ b/os/src/open.c @@ -0,0 +1,15 @@ +#include +#include +#include +#include "fio.h" +#include "filesystem.h" + +int _open_r(struct _reent * reent, const char * path, int flags, int mode) { + int r = fs_open(path, flags, mode); + + if (r >= 0) + return r; + + reent->_errno = EACCES; + return -1; +} -- cgit v1.2.3