aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-15 21:17:41 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-15 21:17:41 +0100
commit02062f0cf84e1cb7fb294de54b0c00db6323c529 (patch)
treec71b34ef1ffdeb95fabc0ec10516d13b81984309 /lib
parent828dd435725ea315abd2ea9875325ee3b17041a9 (diff)
add 'cd' to smash
Diffstat (limited to 'lib')
-rw-r--r--lib/sys/chdir.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/sys/chdir.h b/lib/sys/chdir.h
new file mode 100644
index 0000000..497698f
--- /dev/null
+++ b/lib/sys/chdir.h
@@ -0,0 +1,11 @@
+#ifndef CHDIR_H
+#define CHDIR_H
+
+#include "syscalls.h"
+
+static int chdir(const char *filename)
+{
+ return syscall(CHDIR, filename);
+}
+
+#endif