mirror of
https://github.com/systemd/systemd.git
synced 2024-12-22 17:35:35 +03:00
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.
This commit is contained in:
parent
7889087d6e
commit
1c92ff85b7
Notes:
Lennart Poettering
2014-10-24 19:16:36 +02:00
Backport: bugfix
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user