Fix stupid bug in finddev.c which could cause things to loop if the
stat call failed.
struct dir_list *next;
};
-#ifdef sun
-#define DEVDIR "/devices"
-#else
-#define DEVDIR "/dev"
-#endif
-
/*
* This function adds an entry to the directory list
*/
goto skip_to_next;
sprintf(path, "%s/%s", dirname, dp->d_name);
if (stat(path, &st) < 0)
- continue;
+ goto skip_to_next;
if (S_ISDIR(st.st_mode))
add_to_dirlist(path, list);
if (S_ISBLK(st.st_mode) && st.st_rdev == device) {