chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new function to filter fstab options
[elogind.git]
/
src
/
shared
/
env-util.c
diff --git
a/src/shared/env-util.c
b/src/shared/env-util.c
index d90b878d1920e56b7a455443be3cc3448d4d17c5..038246d21b7cd134fa34997be73d036d9ac036b2 100644
(file)
--- 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 "util.h"
#include "env-util.h"
#include "def.h"
-#include "unit.h"
#define VALID_CHARS_ENV_NAME \
DIGITS LETTERS \
#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));
}
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;
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)) {
bool duplicate = false;
if (!env_assignment_is_valid(*p)) {
- if (
message
)
-
log_error_unit(unit_id, "Ignoring invalid environment '%s': %s", *p, message
);
+ if (
invalid_callback
)
+
invalid_callback(*p, userdata
);
free(*p);
continue;
}
free(*p);
continue;
}
@@
-450,7
+449,3
@@
char **strv_env_clean_log(char **e, const char *unit_id, const char *message) {
return e;
}
return e;
}
-
-char **strv_env_clean(char **e) {
- return strv_env_clean_log(e, NULL, NULL);
-}