aboutsummaryrefslogtreecommitdiff
path: root/lib/sys/getdents.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sys/getdents.h')
-rw-r--r--lib/sys/getdents.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/sys/getdents.h b/lib/sys/getdents.h
new file mode 100644
index 0000000..b5a0c74
--- /dev/null
+++ b/lib/sys/getdents.h
@@ -0,0 +1,18 @@
+#ifndef GETDENTS_H
+#define GETDENTS_H
+
+#include "syscalls.h"
+
+struct dirent {
+ unsigned long d_ino;
+ unsigned long d_off;
+ unsigned short d_reclen;
+ char d_name[];
+};
+
+static int getdents(unsigned int fd, char *buf, unsigned int count)
+{
+ return syscall(GETDENTS, fd, buf, count);
+}
+
+#endif