diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/shutdown.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c index c02a14d66e..fe7a0739db 100644 --- a/src/core/shutdown.c +++ b/src/core/shutdown.c @@ -144,11 +144,18 @@ int main(int argc, char *argv[]) { char *w, *state; size_t l; - FOREACH_WORD_QUOTED(w, l, line, state) - if (streq(w, "quiet")) { + FOREACH_WORD_QUOTED(w, l, line, state) { + _cleanup_free_ char *word; + + word = strndup(w, l); + if (!word) + break; + + if (streq(word, "quiet")) { log_set_max_level(LOG_WARNING); break; } + } } log_parse_environment(); |