rc_set_service_option -> rc_service_option_set, rc_get_service_option -> rc_service_option_get

This commit is contained in:
Roy Marples 2007-10-02 09:02:08 +00:00
parent 52f33e2815
commit cef0ad3215
4 changed files with 10 additions and 10 deletions

View File

@ -441,7 +441,7 @@ rc_service_state_t rc_service_state (const char *service)
}
librc_hidden_def(rc_service_state)
char *rc_get_service_option (const char *service, const char *option)
char *rc_service_option_get (const char *service, const char *option)
{
FILE *fp;
char buffer[RC_LINEBUFFER];
@ -459,9 +459,9 @@ char *rc_get_service_option (const char *service, const char *option)
return (value);
}
librc_hidden_def(rc_get_service_option)
librc_hidden_def(rc_service_option_get)
bool rc_set_service_option (const char *service, const char *option,
bool rc_service_option_set (const char *service, const char *option,
const char *value)
{
FILE *fp;
@ -488,7 +488,7 @@ bool rc_set_service_option (const char *service, const char *option,
free (file);
return (retval);
}
librc_hidden_def(rc_set_service_option)
librc_hidden_def(rc_service_option_set)
static pid_t _exec_service (const char *service, const char *arg)
{

View File

@ -69,7 +69,6 @@ librc_hidden_proto(rc_get_config_entry)
librc_hidden_proto(rc_get_list)
librc_hidden_proto(rc_get_runlevel)
librc_hidden_proto(rc_get_runlevels)
librc_hidden_proto(rc_get_service_option)
librc_hidden_proto(rc_is_dir)
librc_hidden_proto(rc_is_exec)
librc_hidden_proto(rc_is_file)
@ -88,6 +87,8 @@ librc_hidden_proto(rc_service_delete)
librc_hidden_proto(rc_service_description)
librc_hidden_proto(rc_service_exists)
librc_hidden_proto(rc_service_in_runlevel)
librc_hidden_proto(rc_service_option_get)
librc_hidden_proto(rc_service_option_set)
librc_hidden_proto(rc_service_options)
librc_hidden_proto(rc_service_mark)
librc_hidden_proto(rc_service_resolve)
@ -102,7 +103,6 @@ librc_hidden_proto(rc_service_started_daemon)
librc_hidden_proto(rc_service_state)
librc_hidden_proto(rc_set_runlevel)
librc_hidden_proto(rc_set_service_daemon)
librc_hidden_proto(rc_set_service_option)
librc_hidden_proto(rc_strcatpaths)
librc_hidden_proto(rc_strlist_add)
librc_hidden_proto(rc_strlist_addu)

View File

@ -362,14 +362,14 @@ static int do_options (int argc, char **argv)
eerrorx ("%s: no option specified", applet);
if (strcmp (applet, "get_options") == 0) {
char *option = rc_get_service_option (service, argv[0]);
char *option = rc_service_option_get (service, argv[0]);
if (option) {
printf ("%s", option);
free (option);
ok = true;
}
} else if (strcmp (applet, "save_options") == 0)
ok = rc_set_service_option (service, argv[0], argv[1]);
ok = rc_service_option_set (service, argv[0], argv[1]);
else
eerrorx ("%s: unknown applet", applet);

View File

@ -135,13 +135,13 @@ bool rc_service_wait (const char *service);
* @param service to check
* @param option to load
* @return saved value */
char *rc_get_service_option (const char *service, const char *option);
char *rc_service_option_get (const char *service, const char *option);
/*! Save a persistent value for a service
* @param service to save for
* @param option to save
* @param value of the option
* @return true if saved, otherwise false */
bool rc_set_service_option (const char *service, const char *option,
bool rc_service_option_set (const char *service, const char *option,
const char *value);
/*! Save the arguments to find a running daemon
* @param service to save arguments for