aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-02-10 15:26:47 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2023-02-10 15:26:47 +0100
commit1a8731e797f030a84bb982007ee4477b506f7bd6 (patch)
tree3e31f3b6e791f58cc79454d35e6f940439c54725 /lib
parent6d42a1476ab5dd2893fd5ab8de4b473be120e796 (diff)
add 'new'
Diffstat (limited to 'lib')
-rw-r--r--lib/sys/creat.h11
-rw-r--r--lib/sys/mkdir.h11
2 files changed, 22 insertions, 0 deletions
diff --git a/lib/sys/creat.h b/lib/sys/creat.h
new file mode 100644
index 0000000..9c6e492
--- /dev/null
+++ b/lib/sys/creat.h
@@ -0,0 +1,11 @@
+#ifndef CREAT_H
+#define CREAT_H
+
+#include "syscalls.h"
+
+int creat(const char *pathname, unsigned int mode)
+{
+ return syscall(CREAT, pathname, mode);
+}
+
+#endif
diff --git a/lib/sys/mkdir.h b/lib/sys/mkdir.h
new file mode 100644
index 0000000..2de3b01
--- /dev/null
+++ b/lib/sys/mkdir.h
@@ -0,0 +1,11 @@
+#ifndef MKDIR_H
+#define MKDIR_H
+
+#include "syscalls.h"
+
+int mkdir(const char *pathname, unsigned int mode)
+{
+ return syscall(MKDIR, pathname, mode);
+}
+
+#endif