API change! rc_config_env is renamed to rc_make_env and takes no argument.
This commit is contained in:
parent
807e4afbed
commit
c8b03c96b7
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
18 Sep 2007; Roy Marples <uberlord@gentoo.org>:
|
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
|
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
|
a starting list as a first argument. Instead, use rc_strlist_join
|
||||||
to append or prepend the new list to an existing list.
|
to append or prepend the new list to an existing list.
|
||||||
|
@ -578,8 +578,9 @@ static bool file_regex (const char *file, const char *regex)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char **rc_config_env (char **env)
|
char **rc_make_env (void)
|
||||||
{
|
{
|
||||||
|
char **env = NULL;
|
||||||
char *line;
|
char *line;
|
||||||
int i;
|
int i;
|
||||||
char *p;
|
char *p;
|
||||||
@ -723,4 +724,4 @@ char **rc_config_env (char **env)
|
|||||||
|
|
||||||
return (env);
|
return (env);
|
||||||
}
|
}
|
||||||
librc_hidden_def(rc_config_env)
|
librc_hidden_def(rc_make_env)
|
||||||
|
@ -50,7 +50,6 @@
|
|||||||
#define librc_hidden_def(x) hidden_def(x)
|
#define librc_hidden_def(x) hidden_def(x)
|
||||||
|
|
||||||
librc_hidden_proto(rc_allow_plug)
|
librc_hidden_proto(rc_allow_plug)
|
||||||
librc_hidden_proto(rc_config_env)
|
|
||||||
librc_hidden_proto(rc_exists)
|
librc_hidden_proto(rc_exists)
|
||||||
librc_hidden_proto(rc_filter_env)
|
librc_hidden_proto(rc_filter_env)
|
||||||
librc_hidden_proto(rc_find_pids)
|
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_is_link)
|
||||||
librc_hidden_proto(rc_load_deptree)
|
librc_hidden_proto(rc_load_deptree)
|
||||||
librc_hidden_proto(rc_ls_dir)
|
librc_hidden_proto(rc_ls_dir)
|
||||||
|
librc_hidden_proto(rc_make_env)
|
||||||
librc_hidden_proto(rc_mark_service)
|
librc_hidden_proto(rc_mark_service)
|
||||||
librc_hidden_proto(rc_order_services)
|
librc_hidden_proto(rc_order_services)
|
||||||
librc_hidden_proto(rc_resolve_service)
|
librc_hidden_proto(rc_resolve_service)
|
||||||
|
2
src/rc.c
2
src/rc.c
@ -815,7 +815,7 @@ int main (int argc, char **argv)
|
|||||||
/* Ensure our environment is pure
|
/* Ensure our environment is pure
|
||||||
Also, add our configuration to it */
|
Also, add our configuration to it */
|
||||||
env = rc_filter_env ();
|
env = rc_filter_env ();
|
||||||
env = rc_config_env (env);
|
env = rc_strlist_join (env, rc_make_env ());
|
||||||
|
|
||||||
if (env) {
|
if (env) {
|
||||||
char *p;
|
char *p;
|
||||||
|
2
src/rc.h
2
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
|
/* Make an environment list which filters out all unwanted values
|
||||||
and loads it up with our RC config */
|
and loads it up with our RC config */
|
||||||
char **rc_filter_env (void);
|
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 ** */
|
/* Handy functions for dealing with string arrays of char ** */
|
||||||
char *rc_strlist_add (char ***list, const char *item);
|
char *rc_strlist_add (char ***list, const char *item);
|
||||||
|
@ -1049,7 +1049,7 @@ int runscript (int argc, char **argv)
|
|||||||
/* Ensure our environment is pure
|
/* Ensure our environment is pure
|
||||||
Also, add our configuration to it */
|
Also, add our configuration to it */
|
||||||
env = rc_filter_env ();
|
env = rc_filter_env ();
|
||||||
env = rc_config_env (env);
|
env = rc_strlist_join (env, rc_make_env ());
|
||||||
|
|
||||||
if (env) {
|
if (env) {
|
||||||
char *p;
|
char *p;
|
||||||
|
Loading…
Reference in New Issue
Block a user