diff options
author | Roy Marples <roy@marples.name> | 2007-10-02 09:02:08 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2007-10-02 09:02:08 +0000 |
commit | cef0ad32157562efd93c7ce154a11c0abfd1a7b2 (patch) | |
tree | 6fbbb5f53e451be357826ad1dd3061e24a8b1e85 /src | |
parent | 52f33e2815c830094c851d7b6620c41470188433 (diff) |
rc_set_service_option -> rc_service_option_set, rc_get_service_option -> rc_service_option_get
Diffstat (limited to 'src')
-rw-r--r-- | src/librc.c | 8 | ||||
-rw-r--r-- | src/librc.h | 4 | ||||
-rw-r--r-- | src/rc.c | 4 | ||||
-rw-r--r-- | src/rc.h | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/librc.c b/src/librc.c index 00493d8d..a0ef6aa7 100644 --- a/src/librc.c +++ b/src/librc.c @@ -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) { diff --git a/src/librc.h b/src/librc.h index 84fe5a7a..9ec674d1 100644 --- a/src/librc.h +++ b/src/librc.h @@ -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) @@ -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); @@ -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 |