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)
|
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 *svc;
|
||||||
char cmd[PATH_MAX];
|
char cmd[PATH_MAX];
|
||||||
@ -219,11 +219,11 @@ char *rc_service_description (const char *service, const char *function)
|
|||||||
|
|
||||||
svc = rc_resolve_service (service);
|
svc = rc_resolve_service (service);
|
||||||
|
|
||||||
if (! function)
|
if (! option)
|
||||||
function = "";
|
option = "";
|
||||||
|
|
||||||
snprintf (cmd, sizeof (cmd), ". '%s'; echo \"${description%s%s}\"",
|
snprintf (cmd, sizeof (cmd), ". '%s'; echo \"${description%s%s}\"",
|
||||||
svc, function ? "_" : "", function);
|
svc, option ? "_" : "", option);
|
||||||
if (! (fp = popen (cmd, "r"))) {
|
if (! (fp = popen (cmd, "r"))) {
|
||||||
eerror ("popen `%s': %s", svc, strerror (errno));
|
eerror ("popen `%s': %s", svc, strerror (errno));
|
||||||
free (svc);
|
free (svc);
|
||||||
|
2
src/rc.h
2
src/rc.h
@ -45,7 +45,7 @@ typedef enum
|
|||||||
char *rc_resolve_service (const char *service);
|
char *rc_resolve_service (const char *service);
|
||||||
bool rc_service_exists (const char *service);
|
bool rc_service_exists (const char *service);
|
||||||
char **rc_service_options (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_in_runlevel (const char *service, const char *runlevel);
|
||||||
bool rc_service_state (const char *service, rc_service_state_t state);
|
bool rc_service_state (const char *service, rc_service_state_t state);
|
||||||
bool rc_mark_service (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