chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util.h: fix typo
[elogind.git]
/
src
/
shared
/
log.c
diff --git
a/src/shared/log.c
b/src/shared/log.c
index 3941e3e1c202d0015b42e9ebff3a93174003efb0..078ccdc35bf709b842c32bb0075fb6dc65cf5dcd 100644
(file)
--- a/
src/shared/log.c
+++ b/
src/shared/log.c
@@
-871,15
+871,17
@@
void log_parse_environment(void) {
if (r < 0)
log_warning("Failed to read /proc/cmdline. Ignoring: %s", strerror(-r));
else if (r > 0) {
if (r < 0)
log_warning("Failed to read /proc/cmdline. Ignoring: %s", strerror(-r));
else if (r > 0) {
- c
har *w
, *state;
+ c
onst char *word
, *state;
size_t l;
size_t l;
- FOREACH_WORD_QUOTED(w, l, line, state) {
- if (l == 5 && startswith(w, "debug")) {
+ FOREACH_WORD_QUOTED(w
ord
, l, line, state) {
+ if (l == 5 && startswith(w
ord
, "debug")) {
log_set_max_level(LOG_DEBUG);
break;
}
}
log_set_max_level(LOG_DEBUG);
break;
}
}
+ if (!isempty(state))
+ log_warning("Trailing garbage and the end of kernel commandline, ignoring.");
}
e = secure_getenv("SYSTEMD_LOG_TARGET");
}
e = secure_getenv("SYSTEMD_LOG_TARGET");