rc_get_runlevels -> rc_runlevel_list

This commit is contained in:
Roy Marples 2007-10-03 14:11:55 +00:00
parent 0ccf248afd
commit 260318f24f
5 changed files with 10 additions and 10 deletions

View File

@ -62,7 +62,7 @@ bool rc_runlevel_stopping (void)
} }
librc_hidden_def(rc_runlevel_stopping) librc_hidden_def(rc_runlevel_stopping)
char **rc_get_runlevels (void) char **rc_runlevel_list (void)
{ {
char **dirs = rc_ls_dir (RC_RUNLEVELDIR, 0); char **dirs = rc_ls_dir (RC_RUNLEVELDIR, 0);
char **runlevels = NULL; char **runlevels = NULL;
@ -79,7 +79,7 @@ char **rc_get_runlevels (void)
return (runlevels); return (runlevels);
} }
librc_hidden_def(rc_get_runlevels) librc_hidden_def(rc_runlevel_list)
char *rc_runlevel_get (void) char *rc_runlevel_get (void)
{ {

View File

@ -66,7 +66,6 @@ librc_hidden_proto(rc_find_pids)
librc_hidden_proto(rc_get_config) librc_hidden_proto(rc_get_config)
librc_hidden_proto(rc_get_config_entry) librc_hidden_proto(rc_get_config_entry)
librc_hidden_proto(rc_get_list) librc_hidden_proto(rc_get_list)
librc_hidden_proto(rc_get_runlevels)
librc_hidden_proto(rc_is_dir) librc_hidden_proto(rc_is_dir)
librc_hidden_proto(rc_is_exec) librc_hidden_proto(rc_is_exec)
librc_hidden_proto(rc_is_file) librc_hidden_proto(rc_is_file)
@ -74,8 +73,9 @@ librc_hidden_proto(rc_is_link)
librc_hidden_proto(rc_ls_dir) librc_hidden_proto(rc_ls_dir)
librc_hidden_proto(rc_make_env) librc_hidden_proto(rc_make_env)
librc_hidden_proto(rc_rm_dir) librc_hidden_proto(rc_rm_dir)
librc_hidden_proto(rc_runlevel_get)
librc_hidden_proto(rc_runlevel_exists) librc_hidden_proto(rc_runlevel_exists)
librc_hidden_proto(rc_runlevel_get)
librc_hidden_proto(rc_runlevel_list)
librc_hidden_proto(rc_runlevel_set) librc_hidden_proto(rc_runlevel_set)
librc_hidden_proto(rc_runlevel_starting) librc_hidden_proto(rc_runlevel_starting)
librc_hidden_proto(rc_runlevel_stopping) librc_hidden_proto(rc_runlevel_stopping)

View File

@ -93,10 +93,10 @@ int rc_status (int argc, char **argv)
while ((opt = getopt_long(argc, argv, getoptstring, longopts, (int *) 0)) != -1) while ((opt = getopt_long(argc, argv, getoptstring, longopts, (int *) 0)) != -1)
switch (opt) { switch (opt) {
case 'a': case 'a':
levels = rc_get_runlevels (); levels = rc_runlevel_list ();
break; break;
case 'l': case 'l':
levels = rc_get_runlevels (); levels = rc_runlevel_list ();
STRLIST_FOREACH (levels, level, i) STRLIST_FOREACH (levels, level, i)
printf ("%s\n", level); printf ("%s\n", level);
rc_strlist_free (levels); rc_strlist_free (levels);
@ -109,7 +109,7 @@ int rc_status (int argc, char **argv)
exit (EXIT_SUCCESS); exit (EXIT_SUCCESS);
case 'u': case 'u':
services = rc_services_in_runlevel (NULL); services = rc_services_in_runlevel (NULL);
levels = rc_get_runlevels (); levels = rc_runlevel_list ();
STRLIST_FOREACH (services, service, i) { STRLIST_FOREACH (services, service, i) {
bool found = false; bool found = false;
STRLIST_FOREACH (levels, level, j) STRLIST_FOREACH (levels, level, j)

View File

@ -208,7 +208,7 @@ int rc_update (int argc, char **argv)
if (service) if (service)
rc_strlist_add (&runlevels, service); rc_strlist_add (&runlevels, service);
if (! runlevels) if (! runlevels)
runlevels = rc_get_runlevels (); runlevels = rc_runlevel_list ();
show (runlevels, verbose); show (runlevels, verbose);
} else { } else {
@ -226,7 +226,7 @@ int rc_update (int argc, char **argv)
else else
eerrorx ("%s: invalid action", applet); eerrorx ("%s: invalid action", applet);
if (! runlevels) if (! runlevels)
runlevels = rc_get_runlevels (); runlevels = rc_runlevel_list ();
STRLIST_FOREACH (runlevels, runlevel, i) { STRLIST_FOREACH (runlevels, runlevel, i) {
ssize_t ret = actfunc (runlevel, service); ssize_t ret = actfunc (runlevel, service);
if (ret < 0) if (ret < 0)

View File

@ -180,7 +180,7 @@ bool rc_runlevel_exists (const char *runlevel);
/*! Return a NULL terminated list of runlevels /*! Return a NULL terminated list of runlevels
* @return a NULL terminated list of runlevels */ * @return a NULL terminated list of runlevels */
char **rc_get_runlevels (void); char **rc_runlevel_list (void);
/*! Is the runlevel starting? /*! Is the runlevel starting?
* @return true if yes, otherwise false */ * @return true if yes, otherwise false */