diff options
author | Simon Peeters <peeters.simon@gmail.com> | 2013-04-11 00:39:01 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-04-18 02:54:58 +0200 |
commit | 449101fce2757575c4813a9512890536365445f6 (patch) | |
tree | c0012796af10e30d588478b734e2982bb2a64f89 /src/core/bus-errors.h | |
parent | 951657bd0a5bb32b5f56cc6b91ad2ea4094bdfaf (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/core/bus-errors.h')
-rw-r--r-- | src/core/bus-errors.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/core/bus-errors.h b/src/core/bus-errors.h index 04c1b2849d..7a4084ea15 100644 --- a/src/core/bus-errors.h +++ b/src/core/bus-errors.h @@ -21,9 +21,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ -#include <string.h> -#include <dbus/dbus.h> - #define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit" #define BUS_ERROR_NO_SUCH_JOB "org.freedesktop.systemd1.NoSuchJob" #define BUS_ERROR_NOT_SUBSCRIBED "org.freedesktop.systemd1.NotSubscribed" @@ -43,13 +40,3 @@ #define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic" #define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown" #define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess" - -static inline const char *bus_error(const DBusError *e, int r) { - if (e && e->message) - return e->message; - - if (r >= 0) - return strerror(r); - - return strerror(-r); -} |