From e9ddabc246ced239cbce436e16792dc4c3d1b52d Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 8 Nov 2010 00:31:09 -0500 Subject: manager: parse RD_TIMESTAMP passed from initrd --- src/util.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/util.c') 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", -- cgit v1.2.3-54-g00ecf