minix/lib/libc/sys-minix/getdents.c

22 lines
446 B
C
Raw Normal View History

#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#include <string.h>
#include <dirent.h>
ssize_t getdents(int fd, char *buffer, size_t nbytes)
{
message m;
memset(&m, 0, sizeof(m));
m.VFS_READWRITE_FD = fd;
m.VFS_READWRITE_LEN = nbytes;
m.VFS_READWRITE_BUF = (char *) buffer;
return _syscall(VFS_PROC_NR, VFS_GETDENTS, &m);
}
2013-01-07 20:10:08 +01:00
2013-01-18 00:06:11 +01:00
#if defined(__minix) && defined(__weak_alias)
2013-01-07 20:10:08 +01:00
__weak_alias(getdents, __getdents30)
#endif