summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus/bus-util.c
diff options
context:
space:
mode:
authorMarc-Antoine Perennou <Marc-Antoine@Perennou.com>2013-11-07 13:49:04 +0900
committerLennart Poettering <lennart@poettering.net>2013-11-08 14:07:27 +0100
commitf459b6025f9368116d8c410376546c157314c205 (patch)
treef3b781b205d334860481adc14e31df29869bad62 /src/libsystemd-bus/bus-util.c
parenta6c616024db23fef34152c1432892824a07799cc (diff)
systemctl: port to libsystemd-bus
Diffstat (limited to 'src/libsystemd-bus/bus-util.c')
-rw-r--r--src/libsystemd-bus/bus-util.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index ae9733d01f..2cf718b096 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -958,3 +958,27 @@ int bus_log_parse_error(int r) {
log_error("Failed to parse message: %s", strerror(-r));
return r;
}
+
+int bus_log_create_error(int r) {
+ log_error("Failed to create message: %s", strerror(-r));
+ return r;
+}
+
+int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
+ assert(message);
+ assert(u);
+
+ return sd_bus_message_read(
+ message,
+ "(ssssssouso)",
+ &u->id,
+ &u->description,
+ &u->load_state,
+ &u->active_state,
+ &u->sub_state,
+ &u->following,
+ &u->unit_path,
+ &u->job_id,
+ &u->job_type,
+ &u->job_path);
+}