Guest User

Untitled

a guest
Aug 16th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #define _FILE_OFFSET_BITS 64
  2. #include <stdio.h>
  3. #include <sys/types.h>
  4. #include <sys/stat.h>
  5. #include <unistd.h>
  6.  
  7. int scan(const char *path, const struct stat *stat_s, int st_mode)
  8. {
  9. /* nothing yet */
  10.  
  11. return 0;
  12. }
  13.  
  14. int main(int argc, char *argv[])
  15. {
  16. if (argv[1] == NULL) {
  17. printf("\nUsage: %s [path]\n\n", argv[0]);
  18. return -1;
  19. }
  20.  
  21. if (ftw(argv[1], &scan, 1)) {
  22. perror("ftw");
  23. return 2;
  24. }
  25. }
Add Comment
Please, Sign In to add comment