|
@@ -145,7 +145,7 @@ static int perf_pmu__parse_scale(struct perf_pmu_alias *alias, char *dir, char *
|
|
|
int fd, ret = -1;
|
|
int fd, ret = -1;
|
|
|
char path[PATH_MAX];
|
|
char path[PATH_MAX];
|
|
|
|
|
|
|
|
- snprintf(path, PATH_MAX, "%s/%s.scale", dir, name);
|
|
|
|
|
|
|
+ scnprintf(path, PATH_MAX, "%s/%s.scale", dir, name);
|
|
|
|
|
|
|
|
fd = open(path, O_RDONLY);
|
|
fd = open(path, O_RDONLY);
|
|
|
if (fd == -1)
|
|
if (fd == -1)
|
|
@@ -175,7 +175,7 @@ static int perf_pmu__parse_unit(struct perf_pmu_alias *alias, char *dir, char *n
|
|
|
ssize_t sret;
|
|
ssize_t sret;
|
|
|
int fd;
|
|
int fd;
|
|
|
|
|
|
|
|
- snprintf(path, PATH_MAX, "%s/%s.unit", dir, name);
|
|
|
|
|
|
|
+ scnprintf(path, PATH_MAX, "%s/%s.unit", dir, name);
|
|
|
|
|
|
|
|
fd = open(path, O_RDONLY);
|
|
fd = open(path, O_RDONLY);
|
|
|
if (fd == -1)
|
|
if (fd == -1)
|
|
@@ -205,7 +205,7 @@ perf_pmu__parse_per_pkg(struct perf_pmu_alias *alias, char *dir, char *name)
|
|
|
char path[PATH_MAX];
|
|
char path[PATH_MAX];
|
|
|
int fd;
|
|
int fd;
|
|
|
|
|
|
|
|
- snprintf(path, PATH_MAX, "%s/%s.per-pkg", dir, name);
|
|
|
|
|
|
|
+ scnprintf(path, PATH_MAX, "%s/%s.per-pkg", dir, name);
|
|
|
|
|
|
|
|
fd = open(path, O_RDONLY);
|
|
fd = open(path, O_RDONLY);
|
|
|
if (fd == -1)
|
|
if (fd == -1)
|
|
@@ -223,7 +223,7 @@ static int perf_pmu__parse_snapshot(struct perf_pmu_alias *alias,
|
|
|
char path[PATH_MAX];
|
|
char path[PATH_MAX];
|
|
|
int fd;
|
|
int fd;
|
|
|
|
|
|
|
|
- snprintf(path, PATH_MAX, "%s/%s.snapshot", dir, name);
|
|
|
|
|
|
|
+ scnprintf(path, PATH_MAX, "%s/%s.snapshot", dir, name);
|
|
|
|
|
|
|
|
fd = open(path, O_RDONLY);
|
|
fd = open(path, O_RDONLY);
|
|
|
if (fd == -1)
|
|
if (fd == -1)
|