diff options
author | fabient <fabient@FreeBSD.org> | 2010-04-14 21:53:27 +0000 |
---|---|---|
committer | fabient <fabient@FreeBSD.org> | 2010-04-14 21:53:27 +0000 |
commit | d7c34a15b8684c6d9333e40ee8de208dfd3ae3e3 (patch) | |
tree | 0f2ef86dfd8880d12e16350481d03b612494a973 /usr.sbin/pmcstat/pmcpl_gprof.c | |
parent | 3afd1296580997857731527a83ee786bce434ff5 (diff) | |
download | FreeBSD-src-d7c34a15b8684c6d9333e40ee8de208dfd3ae3e3.zip FreeBSD-src-d7c34a15b8684c6d9333e40ee8de208dfd3ae3e3.tar.gz |
Move fatal error at the right place.
Fix exit from top mode when checking if PMC is available.
MFC after: 3 days
Diffstat (limited to 'usr.sbin/pmcstat/pmcpl_gprof.c')
-rw-r--r-- | usr.sbin/pmcstat/pmcpl_gprof.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/pmcstat/pmcpl_gprof.c b/usr.sbin/pmcstat/pmcpl_gprof.c index 9327eb9..2027ecf 100644 --- a/usr.sbin/pmcstat/pmcpl_gprof.c +++ b/usr.sbin/pmcstat/pmcpl_gprof.c @@ -171,6 +171,8 @@ pmcstat_gmon_create_name(const char *samplesdir, struct pmcstat_image *image, char fullpath[PATH_MAX]; pmcname = pmcstat_pmcid_to_name(pmcid); + if (!pmcname) + err(EX_SOFTWARE, "ERROR: cannot find pmcid"); (void) snprintf(fullpath, sizeof(fullpath), "%s/%s/%s", samplesdir, pmcname, |