etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libc / sys / getdents.c
blob175c615fba7f16b60de40c523194a6f464a891a3
1 #include <sys/cdefs.h>
2 #include "namespace.h"
3 #include <lib.h>
5 #include <string.h>
6 #include <dirent.h>
8 ssize_t getdents(int fd, char *buffer, size_t nbytes)
10 message m;
12 memset(&m, 0, sizeof(m));
13 m.m_lc_vfs_readwrite.fd = fd;
14 m.m_lc_vfs_readwrite.len = nbytes;
15 m.m_lc_vfs_readwrite.buf = (vir_bytes)buffer;
16 m.m_lc_vfs_readwrite.cum_io = 0;
17 return _syscall(VFS_PROC_NR, VFS_GETDENTS, &m);
20 #if defined(__minix) && defined(__weak_alias)
21 __weak_alias(getdents, __getdents30)
22 #endif