1 #include <fcntl.h> 2 #include <stdio.h> 3 #include <stdlib.h> 4 #include <sys/stat.h> 5 #include <sys/types.h> 6 7 #include "resultgen.h" 8 main(int argc,char ** argv)9int main(int argc, char **argv) 10 { 11 int dirfd; 12 13 if (argc < 2) 14 exit(1); 15 16 dirfd = open(argv[1], O_DIRECTORY | O_RDONLY); 17 if (dirfd < 0) 18 exit(1); 19 20 if (generate_results(dirfd)) { 21 printf("Results generated\n"); 22 exit(0); 23 } 24 25 exit(1); 26 } 27