X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fcondition-util.c;h=ff4a8ecd15dfd69bfcc8a2220f514c115048d5d1;hb=7c63b23f499069b7bbdf5e74d3e7a622918341e9;hp=928edeeb9dbc9d7dfe5f1bbf5d0bf2fa88bdadf2;hpb=e26807239bd65bc17535a53cd540f38600e7ef24;p=elogind.git diff --git a/src/shared/condition-util.c b/src/shared/condition-util.c index 928edeeb9..ff4a8ecd1 100644 --- a/src/shared/condition-util.c +++ b/src/shared/condition-util.c @@ -26,7 +26,7 @@ #include #include -#include +#include "systemd/sd-id128.h" #include "util.h" #include "condition-util.h" #include "virt.h" @@ -74,7 +74,8 @@ void condition_free_list(Condition *first) { } bool condition_test_kernel_command_line(Condition *c) { - char *line, *w, *state, *word = NULL; + char *line, *word = NULL; + const char *w, *state; bool equal; int r; size_t l, pl; @@ -113,6 +114,8 @@ bool condition_test_kernel_command_line(Condition *c) { } } + if (!isempty(state)) + log_warning("Trailing garbage and the end of kernel commandline, ignoring."); free(word); free(line);