* and calling chdir() afterwards (see man 3 getcwd).
*/
int cwd_fd = open(".", O_RDONLY);
- struct stat s;
int ret = -1;
// PARA_DEBUG_LOG("dirname: %s\n", dirname);
while ((entry = readdir(dir))) {
mode_t m;
char *tmp;
+ struct stat s;
if (!strcmp(entry->d_name, "."))
continue;
if (!strcmp(entry->d_name, ".."))
continue;
- ret = -E_OSL_LSTAT;
if (lstat(entry->d_name, &s) == -1)
continue;
m = s.st_mode;