pid1: add new mode systemd.show-status=error and use it when 'quiet' is passed
systemd.show-status=error is useful for the case where people care about errors only. If people want to have a quiet boot, they most likely don't want to see all status output even if there is a delay in boot, so make "quiet" imply systemd.show-status=error instead of systemd.show-status=auto. Fixes #14976.
This commit is contained in:
+1
-1
@@ -494,7 +494,7 @@ static int parse_proc_cmdline_item(const char *key, const char *value, void *dat
|
||||
} else if (streq(key, "quiet") && !value) {
|
||||
|
||||
if (arg_show_status == _SHOW_STATUS_INVALID)
|
||||
arg_show_status = SHOW_STATUS_AUTO;
|
||||
arg_show_status = SHOW_STATUS_ERROR;
|
||||
|
||||
} else if (streq(key, "debug") && !value) {
|
||||
|
||||
|
||||
+1
-1
@@ -4085,7 +4085,7 @@ void manager_recheck_journal(Manager *m) {
|
||||
|
||||
void manager_set_show_status(Manager *m, ShowStatus mode, const char *reason) {
|
||||
assert(m);
|
||||
assert(IN_SET(mode, SHOW_STATUS_AUTO, SHOW_STATUS_NO, SHOW_STATUS_YES, SHOW_STATUS_TEMPORARY));
|
||||
assert(mode >= 0 && mode < _SHOW_STATUS_MAX);
|
||||
|
||||
if (!MANAGER_IS_SYSTEM(m))
|
||||
return;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
static const char* const show_status_table[_SHOW_STATUS_MAX] = {
|
||||
[SHOW_STATUS_NO] = "no",
|
||||
[SHOW_STATUS_ERROR] = "error",
|
||||
[SHOW_STATUS_AUTO] = "auto",
|
||||
[SHOW_STATUS_TEMPORARY] = "temporary",
|
||||
[SHOW_STATUS_YES] = "yes",
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
typedef enum ShowStatus {
|
||||
SHOW_STATUS_NO, /* printing of status is disabled */
|
||||
SHOW_STATUS_ERROR, /* only print errors */
|
||||
SHOW_STATUS_AUTO, /* disabled but may flip to _TEMPORARY */
|
||||
SHOW_STATUS_TEMPORARY, /* enabled temporarily, may flip back to _AUTO */
|
||||
SHOW_STATUS_YES, /* printing of status is enabled */
|
||||
|
||||
Reference in New Issue
Block a user