about summary refs log tree commit diff
path: root/src/dirent/posix_getdents.c
blob: b19e8127cd5b8525f6a14b84cd28c3b7a809530d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <dirent.h>
#include <limits.h>
#include <errno.h>
#include "syscall.h"

int posix_getdents(int fd, void *buf, size_t len, int flags)
{
	if (flags) return __syscall_ret(-EOPNOTSUPP);
	if (len>INT_MAX) len = INT_MAX;
	return syscall(SYS_getdents, fd, buf, len);
}