1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-25 01:34:28 +03:00

pid1: make more use of show_status_on()

No functional change.
This commit is contained in:
Franck Bui 2020-04-27 18:14:44 +02:00
parent 5a36324962
commit b309078ab9
2 changed files with 5 additions and 2 deletions

View File

@ -240,7 +240,7 @@ static int property_get_show_status(
assert(reply);
assert(m);
b = IN_SET(m->show_status, SHOW_STATUS_TEMPORARY, SHOW_STATUS_YES);
b = show_status_on(m->show_status);
return sd_bus_message_append_basic(reply, 'b', &b);
}

View File

@ -4265,6 +4265,8 @@ void manager_recheck_journal(Manager *m) {
}
void manager_set_show_status(Manager *m, ShowStatus mode, const char *reason) {
bool enabled;
assert(m);
assert(mode >= 0 && mode < _SHOW_STATUS_MAX);
@ -4274,11 +4276,12 @@ void manager_set_show_status(Manager *m, ShowStatus mode, const char *reason) {
if (mode == m->show_status)
return;
bool enabled = IN_SET(mode, SHOW_STATUS_TEMPORARY, SHOW_STATUS_YES);
enabled = show_status_on(mode);
log_debug("%s (%s) showing of status (%s).",
enabled ? "Enabling" : "Disabling",
strna(show_status_to_string(mode)),
reason);
m->show_status = mode;
if (enabled)