aboutsummaryrefslogtreecommitdiff
path: root/src/rc.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-09-18 14:08:56 +0000
committerRoy Marples <roy@marples.name>2007-09-18 14:08:56 +0000
commit75b5fdff29d00508dc62ff848e63561bd9fe06a7 (patch)
tree3d7137ac93543a23f23af6f3bf15e0d763d91d3e /src/rc.c
parentc8b03c96b7da55de503c8e3cdab8d49d7358dd17 (diff)
Match the recent api change to rc_strlist_join also. We now free the 2nd list for ease of use.
Diffstat (limited to 'src/rc.c')
-rw-r--r--src/rc.c29
1 files changed, 13 insertions, 16 deletions
diff --git a/src/rc.c b/src/rc.c
index 9ebcb5d6..561d895c 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_strlist_join (env, rc_make_env ());
+ rc_strlist_join (&env, rc_make_env ());
if (env) {
char *p;
@@ -1089,10 +1089,10 @@ int main (int argc, char **argv)
/* Build a list of all services to stop and then work out the
correct order for stopping them */
stop_services = rc_ls_dir (RC_SVCDIR_STARTING, RC_LS_INITD);
- stop_services = rc_strlist_join (stop_services,
- rc_ls_dir (RC_SVCDIR_INACTIVE, RC_LS_INITD));
- stop_services = rc_strlist_join (stop_services,
- rc_ls_dir (RC_SVCDIR_STARTED, RC_LS_INITD));
+ rc_strlist_join (&stop_services,
+ rc_ls_dir (RC_SVCDIR_INACTIVE, RC_LS_INITD));
+ rc_strlist_join (&stop_services,
+ rc_ls_dir (RC_SVCDIR_STARTED, RC_LS_INITD));
types = NULL;
rc_strlist_add (&types, "ineed");
@@ -1123,25 +1123,22 @@ int main (int argc, char **argv)
}
tmp = rc_strcatpaths (RC_RUNLEVELDIR, newlevel ? newlevel : runlevel,
(char *) NULL);
- start_services = rc_strlist_join (start_services,
- rc_ls_dir (tmp, RC_LS_INITD));
+ rc_strlist_join (&start_services, rc_ls_dir (tmp, RC_LS_INITD));
CHAR_FREE (tmp);
} else {
/* Store our list of coldplugged services */
- coldplugged_services = rc_strlist_join (coldplugged_services,
- rc_ls_dir (RC_SVCDIR_COLDPLUGGED, RC_LS_INITD));
+ rc_strlist_join (&coldplugged_services,
+ rc_ls_dir (RC_SVCDIR_COLDPLUGGED, RC_LS_INITD));
if (strcmp (newlevel ? newlevel : runlevel, RC_LEVEL_SINGLE) != 0 &&
strcmp (newlevel ? newlevel : runlevel, RC_LEVEL_SHUTDOWN) != 0 &&
strcmp (newlevel ? newlevel : runlevel, RC_LEVEL_REBOOT) != 0)
{
/* We need to include the boot runlevel services if we're not in it */
- char **services = rc_services_in_runlevel (bootlevel);
-
- start_services = rc_strlist_join (start_services, services);
- services = rc_services_in_runlevel (newlevel ? newlevel : runlevel);
- start_services = rc_strlist_join (start_services, services);
- services = NULL;
-
+ rc_strlist_join (&start_services,
+ rc_services_in_runlevel (bootlevel));
+ rc_strlist_join (&start_services,
+ rc_services_in_runlevel (newlevel ?
+ newlevel : runlevel));
STRLIST_FOREACH (coldplugged_services, service, i)
rc_strlist_add (&start_services, service);