|
@@ -26,6 +26,7 @@
|
|
|
#include "util/string2.h"
|
|
|
#include "util/thread-stack.h"
|
|
|
#include "util/time-utils.h"
|
|
|
+#include "util/path.h"
|
|
|
#include "print_binary.h"
|
|
|
#include <linux/bitmap.h>
|
|
|
#include <linux/kernel.h>
|
|
@@ -2401,19 +2402,6 @@ out:
|
|
|
return rc;
|
|
|
}
|
|
|
|
|
|
-/* Helper function for filesystems that return a dent->d_type DT_UNKNOWN */
|
|
|
-static int is_directory(const char *base_path, const struct dirent *dent)
|
|
|
-{
|
|
|
- char path[PATH_MAX];
|
|
|
- struct stat st;
|
|
|
-
|
|
|
- sprintf(path, "%s/%s", base_path, dent->d_name);
|
|
|
- if (stat(path, &st))
|
|
|
- return 0;
|
|
|
-
|
|
|
- return S_ISDIR(st.st_mode);
|
|
|
-}
|
|
|
-
|
|
|
#define for_each_lang(scripts_path, scripts_dir, lang_dirent) \
|
|
|
while ((lang_dirent = readdir(scripts_dir)) != NULL) \
|
|
|
if ((lang_dirent->d_type == DT_DIR || \
|