mirror of
https://github.com/troglobit/finit.git
synced 2026-10-15 10:29:35 +00:00
initctl: add PID and IDENT to 'cond dump' command
Instead of just walking /run/finit/cond, also show the source of each condition. The hook and net conditions are hard-coded to init[1] atm. and unknown conditions are shown as unknown[0]. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
3aeb150eef
commit
b175b4a2ae
5 files changed
+79
-15
No files matched your search
+14
-4
@@ -125,14 +125,14 @@ error:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
svc_t *client_svc_find(const char *arg)
|
||||
svc_t *do_cmd(int cmd, const char *arg)
|
||||
{
|
||||
int sd = -1;
|
||||
struct init_request rq = {
|
||||
.magic = INIT_MAGIC,
|
||||
.cmd = INIT_CMD_SVC_FIND,
|
||||
.cmd = cmd,
|
||||
};
|
||||
static svc_t svc;
|
||||
int sd = -1;
|
||||
|
||||
sd = client_connect();
|
||||
if (sd == -1)
|
||||
@@ -152,11 +152,21 @@ svc_t *client_svc_find(const char *arg)
|
||||
error:
|
||||
client_disconnect();
|
||||
perror("Failed communicating with finit");
|
||||
sd = -1;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
svc_t *client_svc_find(const char *arg)
|
||||
{
|
||||
return do_cmd(INIT_CMD_SVC_FIND, arg);
|
||||
}
|
||||
|
||||
|
||||
svc_t *client_svc_find_by_cond(const char *arg)
|
||||
{
|
||||
return do_cmd(INIT_CMD_SVC_FIND_BYC, arg);
|
||||
}
|
||||
|
||||
/**
|
||||
* Local Variables:
|
||||
* indent-tabs-mode: t
|
||||
|
||||
Reference in new issue
Block a user