mirror of
https://github.com/troglobit/finit.git
synced 2026-11-13 17:00:16 +00:00
initctl: the status views over D-Bus
The summary table, the per-service detail, JSON and the quiet and ident forms all read state Finit already publishes, so they read it from the bus like everything else rather than through a second path that has to be kept in step. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
1 parent
ebc0ef62e6
commit
6310d9e760
16 files changed
+1271
-315
No files matched your search
@@ -333,6 +333,7 @@ static int handle_properties_get(link_connection_t *conn, const struct link_msg
|
||||
if (!p->getter)
|
||||
break;
|
||||
__w_init(&w, conn->txbuf, sizeof(conn->txbuf));
|
||||
__w_sig(&w, p->sig ? p->sig : "s");
|
||||
if (p->getter(&w, e->userdata) != 0 || (blen = __w_finish(&w)) < 0)
|
||||
return __send_error(conn, m,
|
||||
"org.freedesktop.DBus.Error.Failed",
|
||||
@@ -380,6 +381,7 @@ static int handle_properties_get_all(link_connection_t *conn, const struct link_
|
||||
continue;
|
||||
__w_struct_begin(&w);
|
||||
__w_string(&w, p->name);
|
||||
__w_sig(&w, p->sig ? p->sig : "s");
|
||||
if (p->getter(&w, e->userdata) != 0)
|
||||
return __send_error(conn, m,
|
||||
"org.freedesktop.DBus.Error.Failed",
|
||||
|
||||
Reference in new issue
Block a user