summaryrefslogtreecommitdiff
path: root/src/libsystemd-bus
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-bus')
-rw-r--r--src/libsystemd-bus/bus-util.c5
-rw-r--r--src/libsystemd-bus/bus-util.h2
2 files changed, 7 insertions, 0 deletions
diff --git a/src/libsystemd-bus/bus-util.c b/src/libsystemd-bus/bus-util.c
index 2b1cd0bc83..ae9733d01f 100644
--- a/src/libsystemd-bus/bus-util.c
+++ b/src/libsystemd-bus/bus-util.c
@@ -953,3 +953,8 @@ int bus_property_get_uid(
return sd_bus_message_append_basic(reply, 'u', userdata);
}
+
+int bus_log_parse_error(int r) {
+ log_error("Failed to parse message: %s", strerror(-r));
+ return r;
+}
diff --git a/src/libsystemd-bus/bus-util.h b/src/libsystemd-bus/bus-util.h
index f982e08ecd..5f0a0b3ffa 100644
--- a/src/libsystemd-bus/bus-util.h
+++ b/src/libsystemd-bus/bus-util.h
@@ -75,6 +75,8 @@ int bus_property_get_uid(sd_bus *bus, const char *path, const char *interface, c
#define bus_property_get_gid bus_property_get_uid
#define bus_property_get_pid bus_property_get_uid
+int bus_log_parse_error(int r);
+
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus*, sd_bus_unref);
DEFINE_TRIVIAL_CLEANUP_FUNC(sd_bus_message*, sd_bus_message_unref);