aboutsummaryrefslogtreecommitdiff
path: root/lib/sys/open.h
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-17 17:27:57 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-17 17:27:57 +0100
commit0e0f22cde8fa9a8c9e0ff509a90727092e0af58b (patch)
treece32216649fa8651d3ae29a4429427ed033f9c37 /lib/sys/open.h
parent48ab221a6d6e4d71e00e0258dd26d63f35bb6f38 (diff)
add errno and file support
Diffstat (limited to 'lib/sys/open.h')
-rw-r--r--lib/sys/open.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sys/open.h b/lib/sys/open.h
new file mode 100644
index 0000000..5aeab6d
--- /dev/null
+++ b/lib/sys/open.h
@@ -0,0 +1,11 @@
+#ifndef OPEN_H
+#define OPEN_H
+
+#include "syscalls.h"
+
+static int open(const char *filename, int flags, int mode)
+{
+ return syscall(OPEN, filename, flags, mode);
+}
+
+#endif