|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 1c92ff85b786c423f4436ec26007e79369c9ac05 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: Thomas Hindoe Paaboel Andersen <phomes@gmail.com>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Fri, 26 Sep 2014 22:01:32 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] bootchart: use 'n/a' if PRETTY_NAME is not found
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Spotted with coverity. If parsing both /etc/os-release and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
/usr/lib/os-release fails then null would be passed on. The calls
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
to parse the two files are allowed to fail. A empty /etc may not
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
have had the /etc/os-release symlink restored yet and we just
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
try again in the loop. If for whatever reason that does not happen
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
then we now pass on 'n/a' instead of null.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/bootchart/bootchart.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/bootchart/bootchart.c b/src/bootchart/bootchart.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 366a5ab5d0..813e38deeb 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/bootchart/bootchart.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/bootchart/bootchart.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -471,7 +471,7 @@ int main(int argc, char *argv[]) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
exit (EXIT_FAILURE);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- svg_do(build);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ svg_do(strna(build));
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
fprintf(stderr, "systemd-bootchart wrote %s\n", output_file);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|