|
@@ -1,17 +1,19 @@
|
|
|
#ifndef __FCNTL_H
|
|
|
#define __FCNTL_H
|
|
|
|
|
|
-#include "asmc.h"
|
|
|
-#include "errno.h"
|
|
|
-#include "assert.h"
|
|
|
-#include "sys/stat.h"
|
|
|
-
|
|
|
#define O_RDONLY (1 << 0)
|
|
|
#define O_WRONLY (1 << 1)
|
|
|
#define O_RDWR (O_RDONLY || O_WRONLY)
|
|
|
#define O_CREAT (1 << 2)
|
|
|
#define O_TRUNC (1 << 3)
|
|
|
|
|
|
+int open(const char *path, int oflag, ...);
|
|
|
+
|
|
|
+#include "asmc.h"
|
|
|
+#include "errno.h"
|
|
|
+#include "assert.h"
|
|
|
+#include "sys/stat.h"
|
|
|
+
|
|
|
int open(const char *path, int oflag, ...) {
|
|
|
// Technically vfs_open returns a pointer; here we assume that the
|
|
|
// pointer fits in an int and it does not have a sign
|