瀏覽代碼

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;