chiark / gitweb /
bootchart: use 'n/a' if PRETTY_NAME is not found
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Fri, 26 Sep 2014 20:01:32 +0000 (22:01 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Oct 2014 12:31:53 +0000 (08:31 -0400)
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.

src/bootchart/bootchart.c

index 366a5ab5d0225b5d34ae68cfaba96cf9433974ab..813e38deeb0afc34f1827aa8a2092692bf8c34b0 100644 (file)
@@ -471,7 +471,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);