mirror of
https://github.com/systemd/systemd.git
synced 2024-11-02 10:51:20 +03:00
unit: tweak status output a bit
Let's highlight the unit description string in the status updates, to separate them a bit more the english sentence they are part of, and thus make the different casing less surprising.
This commit is contained in:
parent
ccfc08d4bc
commit
5b262f74e4
@ -46,6 +46,7 @@
|
||||
#include "string-table.h"
|
||||
#include "string-util.h"
|
||||
#include "strv.h"
|
||||
#include "terminal-util.h"
|
||||
#include "umask-util.h"
|
||||
#include "unit-name.h"
|
||||
#include "unit.h"
|
||||
@ -1644,12 +1645,17 @@ static bool unit_assert_test(Unit *u) {
|
||||
}
|
||||
|
||||
void unit_status_printf(Unit *u, const char *status, const char *unit_status_msg_format) {
|
||||
const char *d;
|
||||
|
||||
d = unit_description(u);
|
||||
if (log_get_show_color())
|
||||
d = strjoina(ANSI_HIGHLIGHT, d, ANSI_NORMAL);
|
||||
|
||||
DISABLE_WARNING_FORMAT_NONLITERAL;
|
||||
manager_status_printf(u->manager, STATUS_TYPE_NORMAL, status, unit_status_msg_format, unit_description(u));
|
||||
manager_status_printf(u->manager, STATUS_TYPE_NORMAL, status, unit_status_msg_format, d);
|
||||
REENABLE_WARNING;
|
||||
}
|
||||
|
||||
|
||||
int unit_start_limit_test(Unit *u) {
|
||||
const char *reason;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user