summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorSimon Peeters <peeters.simon@gmail.com>2013-04-11 00:39:01 +0200
committerLennart Poettering <lennart@poettering.net>2013-04-18 02:54:58 +0200
commit449101fce2757575c4813a9512890536365445f6 (patch)
treec0012796af10e30d588478b734e2982bb2a64f89 /src/login
parent951657bd0a5bb32b5f56cc6b91ad2ea4094bdfaf (diff)
Move bus_error to dbus-common and remove bus_error_message_or_strerror
bus_error and bus_error_message_or_strerror dit almost exactly the same, so use only one of them and place it in dbus-common.
Diffstat (limited to 'src/login')
-rw-r--r--src/login/inhibit.c4
-rw-r--r--src/login/logind-dbus.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/login/inhibit.c b/src/login/inhibit.c
index 9cb321fc8f..fbab42aff1 100644
--- a/src/login/inhibit.c
+++ b/src/login/inhibit.c
@@ -251,7 +251,7 @@ int main(int argc, char *argv[]) {
r = print_inhibitors(bus, &error);
if (r < 0) {
- log_error("Failed to list inhibitors: %s", bus_error_message_or_strerror(&error, -r));
+ log_error("Failed to list inhibitors: %s", bus_error(&error, r));
goto finish;
}
@@ -266,7 +266,7 @@ int main(int argc, char *argv[]) {
free(w);
if (fd < 0) {
- log_error("Failed to inhibit: %s", bus_error_message_or_strerror(&error, -r));
+ log_error("Failed to inhibit: %s", bus_error(&error, r));
r = fd;
goto finish;
}
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index 228a8389ee..b63b79d9a6 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -2457,7 +2457,7 @@ int manager_dispatch_delayed(Manager *manager) {
dbus_error_init(&error);
r = execute_shutdown_or_sleep(manager, manager->action_what, manager->action_unit, &error);
if (r < 0) {
- log_warning("Failed to send delayed message: %s", bus_error_message_or_strerror(&error, -r));
+ log_warning("Failed to send delayed message: %s", bus_error(&error, r));
dbus_error_free(&error);
manager->action_unit = NULL;