Rename variable
This commit is contained in:
parent
05201b514b
commit
023d66578b
@ -205,7 +205,7 @@ char **rc_service_options (const char *service)
|
||||
}
|
||||
librc_hidden_def(rc_service_options)
|
||||
|
||||
char *rc_service_description (const char *service, const char *function)
|
||||
char *rc_service_description (const char *service, const char *option)
|
||||
{
|
||||
char *svc;
|
||||
char cmd[PATH_MAX];
|
||||
@ -219,11 +219,11 @@ char *rc_service_description (const char *service, const char *function)
|
||||
|
||||
svc = rc_resolve_service (service);
|
||||
|
||||
if (! function)
|
||||
function = "";
|
||||
if (! option)
|
||||
option = "";
|
||||
|
||||
snprintf (cmd, sizeof (cmd), ". '%s'; echo \"${description%s%s}\"",
|
||||
svc, function ? "_" : "", function);
|
||||
svc, option ? "_" : "", option);
|
||||
if (! (fp = popen (cmd, "r"))) {
|
||||
eerror ("popen `%s': %s", svc, strerror (errno));
|
||||
free (svc);
|
||||
|
2
src/rc.h
2
src/rc.h
@ -45,7 +45,7 @@ typedef enum
|
||||
char *rc_resolve_service (const char *service);
|
||||
bool rc_service_exists (const char *service);
|
||||
char **rc_service_options (const char *service);
|
||||
char *rc_service_description (const char *service, const char *function);
|
||||
char *rc_service_description (const char *service, const char *option);
|
||||
bool rc_service_in_runlevel (const char *service, const char *runlevel);
|
||||
bool rc_service_state (const char *service, rc_service_state_t state);
|
||||
bool rc_mark_service (const char *service, rc_service_state_t state);
|
||||
|
Loading…
Reference in New Issue
Block a user