소스 검색

d_type might be DT_UNKNOWN on nfs. Better just simply use comparing against . and ..

Samuel Thibault 14 년 전
부모
커밋
b5994d6b1c
1개의 변경된 파일1개의 추가작업 그리고 8개의 파일을 삭제
  1. 1 8
      src/core/perfmodel/perfmodel_history.c

+ 1 - 8
src/core/perfmodel/perfmodel_history.c

@@ -504,15 +504,8 @@ int starpu_list_models(void)
         dp = opendir(path);
         if (dp != NULL) {
                 while ((ep = readdir(dp))) {
-#ifdef DT_REG
-                        if (ep->d_type == DT_REG)
-#else
-			if (strcmp(ep->d_name, ".")
-			 && strcmp(ep->d_name, ".."))
-#endif
-			{
+                        if (strcmp(ep->d_name, ".") && strcmp(ep->d_name, ".."))
                                 fprintf(stdout, "file: <%s>\n", ep->d_name);
-                        }
                 }
                 closedir (dp);
                 return 0;