projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66713f7
)
shutdown: fix /proc/cmdline reading of 'quiet'
author
Kay Sievers
<kay@vrfy.org>
Wed, 10 Jul 2013 22:13:46 +0000
(
00:13
+0200)
committer
Kay Sievers
<kay@vrfy.org>
Wed, 10 Jul 2013 22:13:46 +0000
(
00:13
+0200)
src/core/shutdown.c
patch
|
blob
|
history
diff --git
a/src/core/shutdown.c
b/src/core/shutdown.c
index
c02a14d
..
fe7a073
100644
(file)
--- 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();