From 3f79b7bd553a52fca7a098f5195b406ff9970491 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Sun, 15 Jan 2023 01:13:51 +0100 Subject: add list and static library builder --- lib/sys/getdents.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/sys/getdents.h (limited to 'lib/sys/getdents.h') 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 -- cgit v1.2.3-70-g09d2