aboutsummaryrefslogtreecommitdiff
path: root/lib/sys/read.h
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-14 18:26:49 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-14 18:26:49 +0100
commitd179f1846f9372920ef02f08cfb4d3abe99b383f (patch)
tree4b6ddc71566be95a1ce520ef9d957f4cac1af6c9 /lib/sys/read.h
first commit
Diffstat (limited to 'lib/sys/read.h')
-rw-r--r--lib/sys/read.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/sys/read.h b/lib/sys/read.h
new file mode 100644
index 0000000..7dba6e7
--- /dev/null
+++ b/lib/sys/read.h
@@ -0,0 +1,9 @@
+#ifndef READ_H
+#define READ_H
+#include "syscalls.h"
+
+static int read(unsigned int fd, char * buf, unsigned long count) {
+ return syscall(READ, fd, buf, count, 0, 0);
+}
+
+#endif