summaryrefslogtreecommitdiff
path: root/src/shared/env-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-23 19:04:56 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-23 19:15:27 +0100
commit039f0e70a0fcd71dcf7cc2f3ba2cea2e3b186a60 (patch)
tree33cec7bc03e0dbc2d4c69117cf383f3d4d7d5c60 /src/shared/env-util.c
parent3c70e3bb022f0de3317f3600c9366a2f4597339e (diff)
env-util: don't include files from src/core/
Diffstat (limited to 'src/shared/env-util.c')
-rw-r--r--src/shared/env-util.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/shared/env-util.c b/src/shared/env-util.c
index fbdc73dd2c..038246d21b 100644
--- a/src/shared/env-util.c
+++ b/src/shared/env-util.c
@@ -28,7 +28,6 @@
#include "util.h"
#include "env-util.h"
#include "def.h"
-#include "unit.h"
#define VALID_CHARS_ENV_NAME \
DIGITS LETTERS \
@@ -415,7 +414,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 *unit_id, const char *message) {
+char **strv_env_clean_with_callback(char **e, void (*invalid_callback)(const char *p, void *userdata), void *userdata) {
char **p, **q;
int k = 0;
@@ -424,8 +423,8 @@ char **strv_env_clean_log(char **e, const char *unit_id, const char *message) {
bool duplicate = false;
if (!env_assignment_is_valid(*p)) {
- if (message)
- log_unit_error(unit_id, "Ignoring invalid environment '%s': %s", *p, message);
+ if (invalid_callback)
+ invalid_callback(*p, userdata);
free(*p);
continue;
}
@@ -450,7 +449,3 @@ char **strv_env_clean_log(char **e, const char *unit_id, const char *message) {
return e;
}
-
-char **strv_env_clean(char **e) {
- return strv_env_clean_log(e, NULL, NULL);
-}