summaryrefslogtreecommitdiff
path: root/src/bootchart/bootchart.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bootchart/bootchart.c')
-rw-r--r--src/bootchart/bootchart.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index e34c08a5eb..7affacfdbf 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -82,6 +82,7 @@ static void signal_handler(int sig)
int main(int argc, char *argv[])
{
+ _cleanup_free_ char *build = NULL;
struct sigaction sig;
struct ps_struct *ps;
char output_file[PATH_MAX];
@@ -280,6 +281,12 @@ int main(int argc, char *argv[])
sysfd = open("/sys", O_RDONLY);
}
+ if (!build) {
+ parse_env_file("/etc/os-release", NEWLINE,
+ "PRETTY_NAME", &build,
+ NULL);
+ }
+
/* wait for /proc to become available, discarding samples */
if (!(graph_start > 0.0))
log_uptime();
@@ -350,7 +357,7 @@ int main(int argc, char *argv[])
exit (EXIT_FAILURE);
}
- svg_do();
+ svg_do(build);
fprintf(stderr, "bootchartd: Wrote %s\n", output_file);
fclose(of);