summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index 6f9399b418..f41861b64e 100644
--- a/src/util.c
+++ b/src/util.c
@@ -3566,7 +3566,6 @@ void dual_timestamp_deserialize(const char *value, dual_timestamp *t) {
}
}
-
char *fstab_node_to_udev_node(const char *p) {
char *dn, *t, *u;
int r;
@@ -3617,6 +3616,24 @@ char *fstab_node_to_udev_node(const char *p) {
return strdup(p);
}
+void filter_environ(const char *prefix) {
+ int i, j;
+ assert(prefix);
+
+ if (!environ)
+ return;
+
+ for (i = 0, j = 0; environ[i]; i++) {
+
+ if (startswith(environ[i], prefix))
+ continue;
+
+ environ[j++] = environ[i];
+ }
+
+ environ[j] = NULL;
+}
+
static const char *const ioprio_class_table[] = {
[IOPRIO_CLASS_NONE] = "none",
[IOPRIO_CLASS_RT] = "realtime",