parent
7a293242e0
commit
bee38b5cf8
|
@ -3016,6 +3016,10 @@ int manager_serialize(Manager *m, FILE *f, FDSet *fds, bool switching_root) {
|
|||
fprintf(f, "taint-logged=%s\n", yes_no(m->taint_logged));
|
||||
fprintf(f, "service-watchdogs=%s\n", yes_no(m->service_watchdogs));
|
||||
|
||||
t = show_status_to_string(m->show_status);
|
||||
if (t)
|
||||
fprintf(f, "show-status=%s\n", t);
|
||||
|
||||
if (m->log_level_overridden)
|
||||
fprintf(f, "log-level-override=%i\n", log_get_max_level());
|
||||
if (m->log_target_overridden)
|
||||
|
@ -3205,6 +3209,15 @@ int manager_deserialize(Manager *m, FILE *f, FDSet *fds) {
|
|||
else
|
||||
m->service_watchdogs = b;
|
||||
|
||||
} else if ((val = startswith(l, "show-status="))) {
|
||||
ShowStatus s;
|
||||
|
||||
s = show_status_from_string(val);
|
||||
if (s < 0)
|
||||
log_notice("Failed to parse show-status flag %s", val);
|
||||
else
|
||||
manager_set_show_status(m, s);
|
||||
|
||||
} else if ((val = startswith(l, "log-level-override="))) {
|
||||
int level;
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "terminal-util.h"
|
||||
#include "util.h"
|
||||
|
||||
static const char* const show_status_table[] = {
|
||||
static const char* const show_status_table[_SHOW_STATUS_MAX] = {
|
||||
[SHOW_STATUS_NO] = "no",
|
||||
[SHOW_STATUS_AUTO] = "auto",
|
||||
[SHOW_STATUS_TEMPORARY] = "temporary",
|
||||
|
|
|
@ -12,6 +12,7 @@ typedef enum ShowStatus {
|
|||
SHOW_STATUS_AUTO,
|
||||
SHOW_STATUS_TEMPORARY,
|
||||
SHOW_STATUS_YES,
|
||||
_SHOW_STATUS_MAX,
|
||||
_SHOW_STATUS_INVALID = -1,
|
||||
} ShowStatus;
|
||||
|
||||
|
|
Loading…
Reference in New Issue