Luna/libs/libc/include/luna/dirent.h
apio 78d72c2f0c Kernel, libc: Add a getdents() system call
This is meant to be a low-level interface to implement dirent.h on top of.
2022-10-23 14:03:46 +02:00

26 lines
417 B
C

#ifndef _LUNA_DIRENT_H
#define _LUNA_DIRENT_H
#include <sys/types.h>
struct luna_dirent
{
ino_t inode;
char name[64];
size_t total;
off_t offset;
};
#ifdef __cplusplus
extern "C"
{
#endif
/* Retrieve directory entries from the kernel. This is the raw interface, use readdir() instead. */
ssize_t getdents(int fd, struct luna_dirent* buf, size_t count);
#ifdef __cplusplus
}
#endif
#endif