On 5/1/13 9:15 AM, Jiri Olsa wrote:
+int perf_formula__load_dir(struct perf_formula *f, char *path)
+{
+       struct dirent *ent;
+       DIR *dir;
+       int ret = 0;
+
+       dir = opendir(path);
+       if (!dir) {
+               pr_err("formula: can't open dir '%s' - %s\n",
+                      path, strerror(errno));
+               return -1;
+       }
+
+       while (!ret && (ent = readdir(dir))) {
+               char file[PATH_MAX];

readdir_r? this is going into libperf, so might as well be thread safe.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to