From 72c1bf76a4c2a9a6bb58c6c48a7fad25ab09e13d Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Thu, 31 Jan 2013 09:49:35 +0100 Subject: [PATCH 1/5] dbus: import struct unit_info from systemctl Signed-off-by: Marc-Antoine Perennou --- src/shared/dbus-common.h | 13 +++++++++++++ src/systemctl/systemctl.c | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/shared/dbus-common.h b/src/shared/dbus-common.h index e141c9e..800c0ea 100644 --- a/src/shared/dbus-common.h +++ b/src/shared/dbus-common.h @@ -199,6 +199,19 @@ int bus_parse_strv(DBusMessage *m, char ***_l); int bus_parse_strv_iter(DBusMessageIter *iter, char ***_l); int bus_parse_strv_pairs_iter(DBusMessageIter *iter, char ***_l); +struct unit_info { + const char *id; + const char *description; + const char *load_state; + const char *active_state; + const char *sub_state; + const char *following; + const char *unit_path; + uint32_t job_id; + const char *job_type; + const char *job_path; +}; + int bus_append_strv_iter(DBusMessageIter *iter, char **l); int bus_iter_get_basic_and_next(DBusMessageIter *iter, int type, void *data, bool next); diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 5deacbf..0d1be19 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -275,19 +275,6 @@ static bool avoid_bus(void) { return false; } -struct unit_info { - const char *id; - const char *description; - const char *load_state; - const char *active_state; - const char *sub_state; - const char *following; - const char *unit_path; - uint32_t job_id; - const char *job_type; - const char *job_path; -}; - static int compare_unit_info(const void *a, const void *b) { const char *d1, *d2; const struct unit_info *u = a, *v = b; -- 1.8.1.1