diff options
Diffstat (limited to 'meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch')
-rw-r--r-- | meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch b/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch new file mode 100644 index 000000000..f63d98aee --- /dev/null +++ b/meta-oe/recipes-devtools/bootchart/bootchart/0002-svg-open-etc-os-release-and-use-PRETTY_NAME-for-the-.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From e3adb4c312c6ba3491b7c173559efac7a53e5abc Mon Sep 17 00:00:00 2001 | ||
2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
3 | Date: Sun, 20 May 2012 22:12:29 +0200 | ||
4 | Subject: [PATCH 2/2] svg: open /etc/os-release and use PRETTY_NAME for the | ||
5 | 'Build' name | ||
6 | |||
7 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
8 | --- | ||
9 | |||
10 | Upstream-Status: Submitted | ||
11 | |||
12 | svg.c | 11 +++++++++++ | ||
13 | 1 file changed, 11 insertions(+) | ||
14 | |||
15 | diff --git a/svg.c b/svg.c | ||
16 | index 53724b2..c675d84 100644 | ||
17 | --- a/svg.c | ||
18 | +++ b/svg.c | ||
19 | @@ -194,6 +194,17 @@ void svg_title(void) | ||
20 | fclose(f); | ||
21 | } | ||
22 | |||
23 | + f = fopen("/etc/os-release", "r"); | ||
24 | + if(f) { | ||
25 | + while (fgets(buf, 255, f)) { | ||
26 | + if (strstr(buf, "PRETTY_NAME=")) { | ||
27 | + strncpy(build, &buf[12], 255); | ||
28 | + break; | ||
29 | + } | ||
30 | + } | ||
31 | + fclose(f); | ||
32 | + } | ||
33 | + | ||
34 | svg("<text class=\"t1\" x=\"0\" y=\"30\">Bootchart for %s - %s</text>\n", | ||
35 | uts.nodename, date); | ||
36 | svg("<text class=\"t2\" x=\"20\" y=\"50\">System: %s %s %s %s</text>\n", | ||
37 | -- | ||
38 | 1.7.10 | ||
39 | |||