38 bool dot_found =
false;
39 bool mount_found =
false;
44 return (errno == ENOENT) ? 0 : -1;
46 while (errno = 0, (file =
readdir(chkdir)) != NULL)
48 if (strcmp(
".", file->
d_name) == 0 ||
49 strcmp(
"..", file->
d_name) == 0)
56 else if (file->
d_name[0] ==
'.')
61 else if (strcmp(
"lost+found", file->
d_name) == 0)
77 readdir_errno = errno;
81 errno = readdir_errno;
84 if (result == 1 && mount_found)
88 if (result == 1 && dot_found)
struct dirent * readdir(DIR *)
DIR * opendir(const char *)
int pg_check_dir(const char *dir)