X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Fenv-util.c;h=d90b878d1920e56b7a455443be3cc3448d4d17c5;hb=f32d2db140150b9d38684a699c9875b6e24ca27c;hp=20b208f63c6a8bb0b0bf0647e0b2f5a76efd8d1f;hpb=6294aa76d818e831de4592b41a37e225fd0871f9;p=elogind.git diff --git a/src/shared/env-util.c b/src/shared/env-util.c index 20b208f63..d90b878d1 100644 --- a/src/shared/env-util.c +++ b/src/shared/env-util.c @@ -28,6 +28,7 @@ #include "util.h" #include "env-util.h" #include "def.h" +#include "unit.h" #define VALID_CHARS_ENV_NAME \ DIGITS LETTERS \ @@ -414,7 +415,7 @@ char *strv_env_get(char **l, const char *name) { return strv_env_get_n(l, name, strlen(name)); } -char **strv_env_clean_log(char **e, const char *message) { +char **strv_env_clean_log(char **e, const char *unit_id, const char *message) { char **p, **q; int k = 0; @@ -424,7 +425,7 @@ char **strv_env_clean_log(char **e, const char *message) { if (!env_assignment_is_valid(*p)) { if (message) - log_error("Ignoring invalid environment '%s': %s", *p, message); + log_error_unit(unit_id, "Ignoring invalid environment '%s': %s", *p, message); free(*p); continue; } @@ -451,5 +452,5 @@ char **strv_env_clean_log(char **e, const char *message) { } char **strv_env_clean(char **e) { - return strv_env_clean_log(e, NULL); + return strv_env_clean_log(e, NULL, NULL); }