static uint32_t __sys_linux_getdents(uint32_t arg[]) { int fd = (int)arg[0]; struct dirent *dir = (struct dirent*)arg[1]; uint32_t count = arg[2]; if(count < sizeof(struct dirent)) return -1; int ret = sysfile_getdirentry(fd, dir, &count); if(ret < 0) return -1; return count; }
static uint32_t sys_getdirentry(uint32_t arg[]) { int fd = (int)arg[0]; struct dirent *direntp = (struct dirent *)arg[1]; return sysfile_getdirentry(fd, direntp); }