chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bootchart: parse /etc/os-release rather than system-release
[elogind.git]
/
src
/
bootchart
/
bootchart.c
diff --git
a/src/bootchart/bootchart.c
b/src/bootchart/bootchart.c
index e34c08a5eb54f16bb71e570f991ff4fb6c3464c0..7affacfdbfebb01e685d1584ec18a464a75bc627 100644
(file)
--- 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[])
{
int main(int argc, char *argv[])
{
+ _cleanup_free_ char *build = NULL;
struct sigaction sig;
struct ps_struct *ps;
char output_file[PATH_MAX];
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);
}
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();
/* 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);
}
exit (EXIT_FAILURE);
}
- svg_do();
+ svg_do(
build
);
fprintf(stderr, "bootchartd: Wrote %s\n", output_file);
fclose(of);
fprintf(stderr, "bootchartd: Wrote %s\n", output_file);
fclose(of);