~ubuntu-branches/ubuntu/trusty/systemd/trusty

« back to all changes in this revision

Viewing changes to src/core/bus-errors.h

Tags: upstream-202
ImportĀ upstreamĀ versionĀ 202

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
  along with systemd; If not, see <http://www.gnu.org/licenses/>.
22
22
***/
23
23
 
24
 
#include <string.h>
25
 
#include <dbus/dbus.h>
26
 
 
27
24
#define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit"
28
25
#define BUS_ERROR_NO_SUCH_JOB "org.freedesktop.systemd1.NoSuchJob"
29
26
#define BUS_ERROR_NOT_SUBSCRIBED "org.freedesktop.systemd1.NotSubscribed"
43
40
#define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic"
44
41
#define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown"
45
42
#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
46
 
 
47
 
static inline const char *bus_error(const DBusError *e, int r) {
48
 
        if (e && e->message)
49
 
                return e->message;
50
 
 
51
 
        if (r >= 0)
52
 
                return strerror(r);
53
 
 
54
 
        return strerror(-r);
55
 
}