Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1688 - (hide annotations) (download)
Mon Mar 5 10:54:40 2012 UTC (12 years, 3 months ago) by niro
File size: 2023 byte(s)
-patch to enable magellan-color scheme like the old rc-scripts
1 niro 1688 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 12:45:09.305982796 +0100
4     @@ -939,7 +939,7 @@
5    
6     unit_add_to_dbus_queue(u);
7    
8     - unit_status_printf(u, NULL, "Starting %s...", unit_description(u));
9     + unit_status_printf(u, NULL, "ANSI_HIGHLIGHT_BLUE_ON(ANSI_HIGHLIGHT_GREEN_ON*)ANSI_HIGHLIGHT_OFF Starting %s...", unit_description(u));
10     return UNIT_VTABLE(u)->start(u);
11     }
12    
13     @@ -981,7 +981,7 @@
14    
15     unit_add_to_dbus_queue(u);
16    
17     - unit_status_printf(u, NULL, "Stopping %s...", unit_description(u));
18     + unit_status_printf(u, NULL, "ANSI_HIGHLIGHT_BLUE_ON(ANSI_HIGHLIGHT_GREEN_ON*)ANSI_HIGHLIGHT_OFF Stopping %s...", unit_description(u));
19     return UNIT_VTABLE(u)->stop(u);
20     }
21    
22     diff -Naur systemd-43-magellan/src/util.c systemd-43-color/src/util.c
23     --- systemd-43-magellan/src/util.c 2012-02-15 04:27:58.346029789 +0100
24     +++ systemd-43-color/src/util.c 2012-03-04 18:30:21.199982796 +0100
25     @@ -3748,9 +3748,9 @@
26     }
27    
28     if (status) {
29     - IOVEC_SET_STRING(iovec[n++], " [");
30     + IOVEC_SET_STRING(iovec[n++], " ANSI_HIGHLIGHT_BLUE_ON[ANSI_HIGHLIGHT_OFF");
31     IOVEC_SET_STRING(iovec[n++], status);
32     - IOVEC_SET_STRING(iovec[n++], "]\n");
33     + IOVEC_SET_STRING(iovec[n++], "ANSI_HIGHLIGHT_BLUE_ON]ANSI_HIGHLIGHT_OFF\n");
34     } else
35     IOVEC_SET_STRING(iovec[n++], "\n");
36    
37     diff -Naur systemd-43-magellan/src/util.h systemd-43-color/src/util.h
38     --- systemd-43-magellan/src/util.h 2012-02-15 04:27:55.969029674 +0100
39     +++ systemd-43-color/src/util.h 2012-03-04 18:29:05.661982796 +0100
40     @@ -72,6 +72,7 @@
41     #define ANSI_HIGHLIGHT_ON "\x1B[1;39m"
42     #define ANSI_HIGHLIGHT_RED_ON "\x1B[1;31m"
43     #define ANSI_HIGHLIGHT_GREEN_ON "\x1B[1;32m"
44     +#define ANSI_HIGHLIGHT_BLUE_ON "\x1B[1;34m"
45     #define ANSI_HIGHLIGHT_OFF "\x1B[0m"
46    
47     usec_t now(clockid_t clock);