h8300: Assembly functions
[uclibc-ng.git] / test / misc / tst-scandir.c
blobe1c72e3c9c46eba544ee4bf04a715e79fd55e388
1 #include <dirent.h>
2 #include <errno.h>
3 #include <stdio.h> /* perror() */
4 #include <stdlib.h>
6 static int skip_all(const struct dirent *dirbuf)
8 errno = EBADF;
9 return 0;
12 int main(void)
14 struct dirent **namelist;
15 int n;
17 n = scandir(".", &namelist, skip_all, 0);
18 if (n < 0) {
19 perror("scandir");
20 return EXIT_FAILURE;
22 return EXIT_SUCCESS;