diff options
author | Lukas Nykryn <lnykryn@redhat.com> | 2014-10-17 11:46:01 +0200 |
---|---|---|
committer | Lukas Nykryn <lnykryn@redhat.com> | 2014-10-17 16:05:57 +0200 |
commit | 7491ccf2cb237a2a88b831b2c7374ba2bb255cba (patch) | |
tree | 70731fb8bdcf9da0285b25f0bc9b64eaa4877e59 /src/shared/env-util.c | |
parent | c7e4a7bece7a5c4484d229dd5e8ff01a5d49c62e (diff) |
environment: append unit_id to error messages regarding EnvironmentFile
Diffstat (limited to 'src/shared/env-util.c')
-rw-r--r-- | src/shared/env-util.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/shared/env-util.c b/src/shared/env-util.c index 20b208f63c..d90b878d19 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); } |