aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--src/librc-misc.c5
-rw-r--r--src/librc.h2
-rw-r--r--src/rc.c2
-rw-r--r--src/rc.h2
-rw-r--r--src/runscript.c2
6 files changed, 9 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index afeb6ece..011250da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
18 Sep 2007; Roy Marples <uberlord@gentoo.org>:
+ API change! rc_config_env is renamed to rc_make_env and takes no argument.
+
API change! rc_ls_dir, rc_get_config and rc_get_list no longer take
a starting list as a first argument. Instead, use rc_strlist_join
to append or prepend the new list to an existing list.
diff --git a/src/librc-misc.c b/src/librc-misc.c
index 8d73fed2..eef38d39 100644
--- a/src/librc-misc.c
+++ b/src/librc-misc.c
@@ -578,8 +578,9 @@ static bool file_regex (const char *file, const char *regex)
}
#endif
-char **rc_config_env (char **env)
+char **rc_make_env (void)
{
+ char **env = NULL;
char *line;
int i;
char *p;
@@ -723,4 +724,4 @@ char **rc_config_env (char **env)
return (env);
}
-librc_hidden_def(rc_config_env)
+librc_hidden_def(rc_make_env)
diff --git a/src/librc.h b/src/librc.h
index 6118f48b..ce97b357 100644
--- a/src/librc.h
+++ b/src/librc.h
@@ -50,7 +50,6 @@
#define librc_hidden_def(x) hidden_def(x)
librc_hidden_proto(rc_allow_plug)
-librc_hidden_proto(rc_config_env)
librc_hidden_proto(rc_exists)
librc_hidden_proto(rc_filter_env)
librc_hidden_proto(rc_find_pids)
@@ -71,6 +70,7 @@ librc_hidden_proto(rc_is_file)
librc_hidden_proto(rc_is_link)
librc_hidden_proto(rc_load_deptree)
librc_hidden_proto(rc_ls_dir)
+librc_hidden_proto(rc_make_env)
librc_hidden_proto(rc_mark_service)
librc_hidden_proto(rc_order_services)
librc_hidden_proto(rc_resolve_service)
diff --git a/src/rc.c b/src/rc.c
index 0ef76293..9ebcb5d6 100644
--- a/src/rc.c
+++ b/src/rc.c
@@ -815,7 +815,7 @@ int main (int argc, char **argv)
/* Ensure our environment is pure
Also, add our configuration to it */
env = rc_filter_env ();
- env = rc_config_env (env);
+ env = rc_strlist_join (env, rc_make_env ());
if (env) {
char *p;
diff --git a/src/rc.h b/src/rc.h
index 6357e720..4dca669a 100644
--- a/src/rc.h
+++ b/src/rc.h
@@ -194,7 +194,7 @@ char *rc_get_config_entry (char **list, const char *entry);
/* Make an environment list which filters out all unwanted values
and loads it up with our RC config */
char **rc_filter_env (void);
-char **rc_config_env (char **env);
+char **rc_make_env (void);
/* Handy functions for dealing with string arrays of char ** */
char *rc_strlist_add (char ***list, const char *item);
diff --git a/src/runscript.c b/src/runscript.c
index b7faac02..8057c99e 100644
--- a/src/runscript.c
+++ b/src/runscript.c
@@ -1049,7 +1049,7 @@ int runscript (int argc, char **argv)
/* Ensure our environment is pure
Also, add our configuration to it */
env = rc_filter_env ();
- env = rc_config_env (env);
+ env = rc_strlist_join (env, rc_make_env ());
if (env) {
char *p;