1433d6423SLionel Sambuc #include <sys/cdefs.h> 2433d6423SLionel Sambuc #include "namespace.h" 3433d6423SLionel Sambuc #include <lib.h> 4433d6423SLionel Sambuc 5433d6423SLionel Sambuc #include <string.h> 6433d6423SLionel Sambuc #include <dirent.h> 7433d6423SLionel Sambuc getdents(int fd,char * buffer,size_t nbytes)8433d6423SLionel Sambucssize_t getdents(int fd, char *buffer, size_t nbytes) 9433d6423SLionel Sambuc { 10433d6423SLionel Sambuc message m; 11433d6423SLionel Sambuc 12433d6423SLionel Sambuc memset(&m, 0, sizeof(m)); 13433d6423SLionel Sambuc m.m_lc_vfs_readwrite.fd = fd; 14433d6423SLionel Sambuc m.m_lc_vfs_readwrite.len = nbytes; 15433d6423SLionel Sambuc m.m_lc_vfs_readwrite.buf = (vir_bytes)buffer; 16*232819ddSDavid van Moolenbroek m.m_lc_vfs_readwrite.cum_io = 0; 17433d6423SLionel Sambuc return _syscall(VFS_PROC_NR, VFS_GETDENTS, &m); 18433d6423SLionel Sambuc } 19433d6423SLionel Sambuc 20433d6423SLionel Sambuc #if defined(__minix) && defined(__weak_alias) 21433d6423SLionel Sambuc __weak_alias(getdents, __getdents30) 22433d6423SLionel Sambuc #endif 23