summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>2014-09-26 22:01:32 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2014-10-26 18:23:45 -0400
commit48fe5cdcf1092f2ad817885d5ed506b63891ee9e (patch)
tree37777f20cf474255bc2b4b949025b23aa0baecdb
parent8597690cf9dd8334a20a3160980642a978ea4783 (diff)
bootchart: use 'n/a' if PRETTY_NAME is not found
Spotted with coverity. If parsing both /etc/os-release and /usr/lib/os-release fails then null would be passed on. The calls to parse the two files are allowed to fail. A empty /etc may not have had the /etc/os-release symlink restored yet and we just try again in the loop. If for whatever reason that does not happen then we now pass on 'n/a' instead of null. (cherry picked from commit 1c92ff85b786c423f4436ec26007e79369c9ac05)
-rw-r--r--src/bootchart/bootchart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
index eadf17c35..169d7c07e 100644
--- a/src/bootchart/bootchart.c
+++ b/src/bootchart/bootchart.c
@@ -433,7 +433,7 @@ int main(int argc, char *argv[]) {
exit (EXIT_FAILURE);
}
- svg_do(build);
+ svg_do(strna(build));
fprintf(stderr, "systemd-bootchart wrote %s\n", output_file);