Back to index

glibc  2.9
bug-ftw5.c
Go to the documentation of this file.
00001 #include <errno.h>
00002 #include <ftw.h>
00003 #include <stdio.h>
00004 
00005 static int
00006 fn (const char *file, const struct stat *sb, int flag, struct FTW *s)
00007 {
00008   puts (file);
00009   return FTW_STOP;
00010 }
00011 
00012 static int
00013 do_test (void)
00014 {
00015   if (nftw ("/", fn, 0, FTW_CHDIR | FTW_ACTIONRETVAL) < 0)
00016     {
00017       printf ("nftw / FTW_CHDIR: %m\n");
00018       return 1;
00019     }
00020 
00021   return 0;
00022 }
00023 
00024 #define TEST_FUNCTION do_test ()
00025 #include "../test-skeleton.c"