Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201179
b: refs/heads/master
c: 7453434
h: refs/heads/master
i:
  201177: 15b52d6
  201175: 1e27107
v: v3
  • Loading branch information
Gui Jianfeng authored and Arnaldo Carvalho de Melo committed Jul 16, 2010
1 parent 734d02b commit c02c6cb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58c3439083f8fde61de842c93d1407f0f881cd92
refs/heads/master: 74534341c1214ac5993904680616afe698dde3b6
17 changes: 10 additions & 7 deletions trunk/tools/perf/util/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,7 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,
{
struct dirent *dent;
DIR *dir = opendir(dir_name);
int ret = 0;

if (!dir) {
pr_debug("%s: cannot open %s dir\n", __func__, dir_name);
Expand All @@ -1465,8 +1466,9 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,

snprintf(path, sizeof(path), "%s/%s",
dir_name, dent->d_name);
if (map_groups__set_modules_path_dir(self, path) < 0)
goto failure;
ret = map_groups__set_modules_path_dir(self, path);
if (ret < 0)
goto out;
} else {
char *dot = strrchr(dent->d_name, '.'),
dso_name[PATH_MAX];
Expand All @@ -1487,17 +1489,18 @@ static int map_groups__set_modules_path_dir(struct map_groups *self,
dir_name, dent->d_name);

long_name = strdup(path);
if (long_name == NULL)
goto failure;
if (long_name == NULL) {
ret = -1;
goto out;
}
dso__set_long_name(map->dso, long_name);
dso__kernel_module_get_build_id(map->dso, "");
}
}

return 0;
failure:
out:
closedir(dir);
return -1;
return ret;
}

static char *get_kernel_version(const char *root_dir)
Expand Down

0 comments on commit c02c6cb

Please sign in to comment.