Magellan Linux

Contents of /trunk/systemd/patches/systemd-43-color.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1689 - (show annotations) (download)
Mon Mar 5 11:16:40 2012 UTC (12 years, 1 month ago) by niro
File size: 2237 byte(s)
-fixed patch
1 diff -Naur systemd-43-magellan/src/unit.c systemd-43-color/src/unit.c
2 --- systemd-43-magellan/src/unit.c 2012-02-15 04:27:55.823029667 +0100
3 +++ systemd-43-color/src/unit.c 2012-03-05 13:08:46.302982796 +0100
4 @@ -43,6 +43,7 @@
5 #include "cgroup-util.h"
6 #include "missing.h"
7 #include "cgroup-attr.h"
8 +#include "util.h"
9
10 const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
11 [UNIT_SERVICE] = &service_vtable,
12 @@ -939,7 +940,7 @@
13
14 unit_add_to_dbus_queue(u);
15
16 - unit_status_printf(u, NULL, "Starting %s...", unit_description(u));
17 + unit_status_printf(u, NULL, "ANSI_HIGHLIGHT_BLUE_ON(ANSI_HIGHLIGHT_GREEN_ON*)ANSI_HIGHLIGHT_OFF Starting %s...", unit_description(u));
18 return UNIT_VTABLE(u)->start(u);
19 }
20
21 @@ -981,7 +982,7 @@
22
23 unit_add_to_dbus_queue(u);
24
25 - unit_status_printf(u, NULL, "Stopping %s...", unit_description(u));
26 + unit_status_printf(u, NULL, "ANSI_HIGHLIGHT_BLUE_ON(ANSI_HIGHLIGHT_GREEN_ON*)ANSI_HIGHLIGHT_OFF Stopping %s...", unit_description(u));
27 return UNIT_VTABLE(u)->stop(u);
28 }
29
30 diff -Naur systemd-43-magellan/src/util.c systemd-43-color/src/util.c
31 --- systemd-43-magellan/src/util.c 2012-02-15 04:27:58.346029789 +0100
32 +++ systemd-43-color/src/util.c 2012-03-04 18:30:21.199982796 +0100
33 @@ -3748,9 +3748,9 @@
34 }
35
36 if (status) {
37 - IOVEC_SET_STRING(iovec[n++], " [");
38 + IOVEC_SET_STRING(iovec[n++], " ANSI_HIGHLIGHT_BLUE_ON[ANSI_HIGHLIGHT_OFF");
39 IOVEC_SET_STRING(iovec[n++], status);
40 - IOVEC_SET_STRING(iovec[n++], "]\n");
41 + IOVEC_SET_STRING(iovec[n++], "ANSI_HIGHLIGHT_BLUE_ON]ANSI_HIGHLIGHT_OFF\n");
42 } else
43 IOVEC_SET_STRING(iovec[n++], "\n");
44
45 diff -Naur systemd-43-magellan/src/util.h systemd-43-color/src/util.h
46 --- systemd-43-magellan/src/util.h 2012-02-15 04:27:55.969029674 +0100
47 +++ systemd-43-color/src/util.h 2012-03-04 18:29:05.661982796 +0100
48 @@ -72,6 +72,7 @@
49 #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
50 #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
51 #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
52 +#define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m"
53 #define ANSI_HIGHLIGHT_OFF "\x1B[0m"
54
55 usec_t now(clockid_t clock);