[systemd-commits] 4 commits - Makefile.am TODO man/systemd.network.xml src/core src/fsck src/libsystemd src/login src/machine src/network src/nss-resolve src/resolve src/resolve-host src/shared src/systemctl src/timedate

Lennart Poettering lennart at kemper.freedesktop.org
Wed Dec 10 10:08:21 PST 2014


 Makefile.am                               |    4 -
 TODO                                      |    2 
 man/systemd.network.xml                   |    4 -
 src/core/dbus-manager.c                   |    2 
 src/core/dbus-scope.c                     |    2 
 src/core/dbus-unit.c                      |    2 
 src/core/dbus.c                           |    2 
 src/core/manager.c                        |    2 
 src/core/mount.c                          |    2 
 src/core/snapshot.c                       |    2 
 src/core/swap.c                           |    2 
 src/core/transaction.c                    |    2 
 src/core/unit.c                           |    2 
 src/fsck/fsck.c                           |    2 
 src/libsystemd/sd-bus/bus-common-errors.c |   76 ++++++++++++++++++++++++++++++
 src/libsystemd/sd-bus/bus-common-errors.h |   74 +++++++++++++++++++++++++++++
 src/libsystemd/sd-bus/bus-error.c         |    2 
 src/libsystemd/sd-bus/bus-error.h         |    4 -
 src/libsystemd/sd-bus/test-bus-error.c    |    2 
 src/login/logind-dbus.c                   |    2 
 src/login/logind-seat-dbus.c              |    2 
 src/login/logind-session-dbus.c           |    2 
 src/machine/machine-dbus.c                |    2 
 src/machine/machined-dbus.c               |    2 
 src/network/networkd-network-gperf.gperf  |    2 
 src/network/networkd-network.c            |    2 
 src/nss-resolve/nss-resolve.c             |    2 
 src/resolve-host/resolve-host.c           |    2 
 src/resolve/resolved-bus.c                |    2 
 src/shared/bus-errors.c                   |   76 ------------------------------
 src/shared/bus-errors.h                   |   74 -----------------------------
 src/systemctl/systemctl.c                 |    2 
 src/timedate/timedated.c                  |    2 
 33 files changed, 181 insertions(+), 183 deletions(-)

New commits:
commit fe666c198ea11b47c6fc9fa677e91915636518fe
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Dec 10 19:07:32 2014 +0100

    update TODO

diff --git a/TODO b/TODO
index dba1243..7d7f90a 100644
--- a/TODO
+++ b/TODO
@@ -2,8 +2,6 @@ Preparations for 218:
 
 * cgroup delegation issues
 
-* should networkd's [BridgePort] section really be called like that?
-
 * test-bus-kernel-bloom is borked
 
 * systemctl status reports all services as runtime-enabled?

commit 1776fff91735a3be5ad2b0a9dee727d614668fb7
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Dec 10 19:06:43 2014 +0100

    sd-bus: make BUS_ERROR_MAP_ELF_USE() use a const variable

diff --git a/src/libsystemd/sd-bus/bus-error.h b/src/libsystemd/sd-bus/bus-error.h
index 66c98b0..fb0199c 100644
--- a/src/libsystemd/sd-bus/bus-error.h
+++ b/src/libsystemd/sd-bus/bus-error.h
@@ -56,7 +56,7 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_lis
 
 #define BUS_ERROR_MAP_ELF_USE(errors)                                   \
         extern const sd_bus_error_map errors[];                         \
-        __attribute__ ((used)) static const sd_bus_error_map * CONCATENATE(errors ## _copy_, __COUNTER__) = errors;
+        __attribute__ ((used)) static const sd_bus_error_map * const CONCATENATE(errors ## _copy_, __COUNTER__) = errors;
 
 /* We use something exotic as end marker, to ensure people build the
  * maps using the macsd-ros. */

commit 7303ec8f3009d6630a994644ad9e539813badc52
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Dec 10 19:03:08 2014 +0100

    networkd: rename section [BridgePort] → [Bridge]
    
    Let's stick to generic sections that describe the general technology,
    instead of specific per-object sections, unless we really have a reason
    to do that otherwise.

diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 1edaa0b..79c7a23 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -536,8 +536,8 @@
         </refsect1>
 
         <refsect1>
-                <title>[BridgePort] Section Options</title>
-                        <para>The <literal>[BridgePort]</literal> section accepts the following keys.</para>
+                <title>[Bridge] Section Options</title>
+                        <para>The <literal>[Bridge]</literal> section accepts the following keys.</para>
                         <variablelist class='network-directives'>
                                 <varlistentry>
                                         <term><varname>Cost=</varname></term>
diff --git a/src/network/networkd-network-gperf.gperf b/src/network/networkd-network-gperf.gperf
index bd422e3..640a3a2 100644
--- a/src/network/networkd-network-gperf.gperf
+++ b/src/network/networkd-network-gperf.gperf
@@ -61,7 +61,7 @@ DHCP.RequestBroadcast,       config_parse_bool,                  0,
 DHCP.CriticalConnection,     config_parse_bool,                  0,                             offsetof(Network, dhcp_critical)
 DHCP.VendorClassIdentifier,  config_parse_string,                0,                             offsetof(Network, dhcp_vendor_class_identifier)
 DHCP.RouteMetric,            config_parse_unsigned,              0,                             offsetof(Network, dhcp_route_metric)
-BridgePort.Cost,             config_parse_unsigned,              0,                             offsetof(Network, cost)
+Bridge.Cost,                 config_parse_unsigned,              0,                             offsetof(Network, cost)
 /* backwards compatibility: do not add new entries to this section */
 DHCPv4.UseDNS,               config_parse_bool,                  0,                             offsetof(Network, dhcp_dns)
 DHCPv4.UseMTU,               config_parse_bool,                  0,                             offsetof(Network, dhcp_mtu)
diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c
index 075596a..ef9e0a8 100644
--- a/src/network/networkd-network.c
+++ b/src/network/networkd-network.c
@@ -97,7 +97,7 @@ static int network_load_one(Manager *manager, const char *filename) {
                          "Route\0"
                          "DHCP\0"
                          "DHCPv4\0"
-                         "BridgePort\0",
+                         "Bridge\0",
                          config_item_perf_lookup, network_network_gperf_lookup,
                          false, false, true, network);
         if (r < 0)

commit 96aad8d15a324d0e956a4e5653a11a67b209b41a
Author: Lennart Poettering <lennart at poettering.net>
Date:   Wed Dec 10 19:00:46 2014 +0100

    sd-bus: move common errors src/shared/bus-errors.h → src/libsystemd/sd-bus/bus-common-errors.h
    
    Stuff in src/shared/ should not use stuff from src/libsystemd/ really.

diff --git a/Makefile.am b/Makefile.am
index 6f02c74..c122707 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -757,8 +757,6 @@ libsystemd_shared_la_SOURCES = \
 	src/shared/sparse-endian.h \
 	src/shared/refcnt.h \
 	src/shared/udev-util.h \
-	src/shared/bus-errors.h \
-	src/shared/bus-errors.c \
 	src/shared/device-nodes.c \
 	src/shared/device-nodes.h \
 	src/shared/util.c \
@@ -2646,6 +2644,8 @@ libsystemd_internal_la_SOURCES = \
 	src/libsystemd/sd-bus/bus-control.h \
 	src/libsystemd/sd-bus/bus-error.c \
 	src/libsystemd/sd-bus/bus-error.h \
+	src/libsystemd/sd-bus/bus-common-errors.h \
+	src/libsystemd/sd-bus/bus-common-errors.c \
 	src/libsystemd/sd-bus/bus-internal.c \
 	src/libsystemd/sd-bus/bus-internal.h \
 	src/libsystemd/sd-bus/bus-socket.c \
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
index 140a413..6181ba8 100644
--- a/src/core/dbus-manager.c
+++ b/src/core/dbus-manager.c
@@ -39,7 +39,7 @@
 #include "dbus-unit.h"
 #include "dbus-snapshot.h"
 #include "dbus-execute.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 
 static int property_get_version(
                 sd_bus *bus,
diff --git a/src/core/dbus-scope.c b/src/core/dbus-scope.c
index a762223..60215a1 100644
--- a/src/core/dbus-scope.c
+++ b/src/core/dbus-scope.c
@@ -28,7 +28,7 @@
 #include "dbus.h"
 #include "bus-util.h"
 #include "bus-internal.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 
 static int bus_scope_abandon(sd_bus *bus, sd_bus_message *message, void *userdata, sd_bus_error *error) {
         Scope *s = userdata;
diff --git a/src/core/dbus-unit.c b/src/core/dbus-unit.c
index cc09a26..0850fb3 100644
--- a/src/core/dbus-unit.c
+++ b/src/core/dbus-unit.c
@@ -26,7 +26,7 @@
 #include "strv.h"
 #include "path-util.h"
 #include "fileio.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "dbus.h"
 #include "dbus-manager.h"
 #include "dbus-unit.h"
diff --git a/src/core/dbus.c b/src/core/dbus.c
index 87da933..260775c 100644
--- a/src/core/dbus.c
+++ b/src/core/dbus.c
@@ -39,7 +39,7 @@
 #include "dbus.h"
 #include "bus-util.h"
 #include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "strxcpyx.h"
 #include "bus-internal.h"
 #include "selinux-access.h"
diff --git a/src/core/manager.c b/src/core/manager.c
index cff24fa..6382400 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -69,7 +69,7 @@
 #include "audit-fd.h"
 #include "boot-timestamps.h"
 #include "env-util.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "bus-error.h"
 #include "bus-util.h"
 #include "dbus.h"
diff --git a/src/core/mount.c b/src/core/mount.c
index 6b415b4..e271d43 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -41,7 +41,7 @@
 #include "unit-name.h"
 #include "dbus-mount.h"
 #include "special.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "exit-status.h"
 #include "def.h"
 
diff --git a/src/core/snapshot.c b/src/core/snapshot.c
index 900d0d7..068a077 100644
--- a/src/core/snapshot.c
+++ b/src/core/snapshot.c
@@ -25,7 +25,7 @@
 #include "snapshot.h"
 #include "unit-name.h"
 #include "dbus-snapshot.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 
 static const UnitActiveState state_translation_table[_SNAPSHOT_STATE_MAX] = {
         [SNAPSHOT_DEAD] = UNIT_INACTIVE,
diff --git a/src/core/swap.c b/src/core/swap.c
index 346a5fd..a6a2355 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -35,7 +35,7 @@
 #include "unit-name.h"
 #include "dbus-swap.h"
 #include "special.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "exit-status.h"
 #include "def.h"
 #include "path-util.h"
diff --git a/src/core/transaction.c b/src/core/transaction.c
index 66ee90b..b0b3d6b 100644
--- a/src/core/transaction.c
+++ b/src/core/transaction.c
@@ -22,7 +22,7 @@
 #include <unistd.h>
 #include <fcntl.h>
 
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "bus-util.h"
 #include "bus-error.h"
 #include "transaction.h"
diff --git a/src/core/unit.c b/src/core/unit.c
index b3b0892..fe0dfb2 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -47,7 +47,7 @@
 #include "mkdir.h"
 #include "label.h"
 #include "fileio-label.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "dbus.h"
 #include "execute.h"
 #include "virt.h"
diff --git a/src/fsck/fsck.c b/src/fsck/fsck.c
index a7226ce..20b7940 100644
--- a/src/fsck/fsck.c
+++ b/src/fsck/fsck.c
@@ -35,7 +35,7 @@
 #include "special.h"
 #include "bus-util.h"
 #include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "fileio.h"
 #include "udev-util.h"
 #include "path-util.h"
diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c
new file mode 100644
index 0000000..3dc00b5
--- /dev/null
+++ b/src/libsystemd/sd-bus/bus-common-errors.c
@@ -0,0 +1,76 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
+  This file is part of systemd.
+
+  Copyright 2014 Zbigniew Jędrzejewski-Szmek
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include <errno.h>
+
+#include "sd-bus.h"
+#include "bus-error.h"
+#include "bus-common-errors.h"
+
+BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_UNIT,                 ENOENT),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_UNIT_FOR_PID,              ESRCH),
+        SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_EXISTS,                  EEXIST),
+        SD_BUS_ERROR_MAP(BUS_ERROR_LOAD_FAILED,                  EIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_JOB_FAILED,                   EREMOTEIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_JOB,                  ENOENT),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NOT_SUBSCRIBED,               EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_ALREADY_SUBSCRIBED,           EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_ONLY_BY_DEPENDENCY,           EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_JOBS_CONFLICTING, EDEADLOCK),
+        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC,  EDEADLOCK),
+        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE,   EDEADLOCK),
+        SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED,                  ENOSYS),
+        SD_BUS_ERROR_MAP(BUS_ERROR_JOB_TYPE_NOT_APPLICABLE,      EBADR),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_ISOLATION,                 EPERM),
+        SD_BUS_ERROR_MAP(BUS_ERROR_SHUTTING_DOWN,                ECANCELED),
+        SD_BUS_ERROR_MAP(BUS_ERROR_SCOPE_NOT_RUNNING,            EHOSTDOWN),
+
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_MACHINE,              ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_MACHINE_FOR_PID,           ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_MACHINE_EXISTS,               EEXIST),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRIVATE_NETWORKING,        ENOSYS),
+
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SESSION,              ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SESSION_FOR_PID,           ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_USER,                 ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_USER_FOR_PID,              ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SEAT,                 ENXIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_SESSION_NOT_ON_SEAT,          EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NOT_IN_CONTROL,               EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_IS_TAKEN,              EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_NOT_TAKEN,             EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_OPERATION_IN_PROGRESS,        EINPROGRESS),
+        SD_BUS_ERROR_MAP(BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED,     ENOSYS),
+
+        SD_BUS_ERROR_MAP(BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED,  EALREADY),
+
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_PROCESS,              ESRCH),
+
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_NAME_SERVERS,              EIO),
+        SD_BUS_ERROR_MAP(BUS_ERROR_INVALID_REPLY,                EINVAL),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_RR,                   ENOENT),
+        SD_BUS_ERROR_MAP(BUS_ERROR_NO_RESOURCES,                 ENOMEM),
+        SD_BUS_ERROR_MAP(BUS_ERROR_CNAME_LOOP,                   EDEADLOCK),
+        SD_BUS_ERROR_MAP(BUS_ERROR_ABORTED,                      ECANCELED),
+
+        SD_BUS_ERROR_MAP_END
+};
diff --git a/src/libsystemd/sd-bus/bus-common-errors.h b/src/libsystemd/sd-bus/bus-common-errors.h
new file mode 100644
index 0000000..5b7f41e
--- /dev/null
+++ b/src/libsystemd/sd-bus/bus-common-errors.h
@@ -0,0 +1,74 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+#pragma once
+
+/***
+  This file is part of systemd.
+
+  Copyright 2013 Lennart Poettering
+
+  systemd is free software; you can redistribute it and/or modify it
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
+  (at your option) any later version.
+
+  systemd is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public License
+  along with systemd; If not, see <http://www.gnu.org/licenses/>.
+***/
+
+#include "sd-bus.h"
+#include "bus-error.h"
+
+#define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit"
+#define BUS_ERROR_NO_UNIT_FOR_PID "org.freedesktop.systemd1.NoUnitForPID"
+#define BUS_ERROR_UNIT_EXISTS "org.freedesktop.systemd1.UnitExists"
+#define BUS_ERROR_LOAD_FAILED "org.freedesktop.systemd1.LoadFailed"
+#define BUS_ERROR_JOB_FAILED "org.freedesktop.systemd1.JobFailed"
+#define BUS_ERROR_NO_SUCH_JOB "org.freedesktop.systemd1.NoSuchJob"
+#define BUS_ERROR_NOT_SUBSCRIBED "org.freedesktop.systemd1.NotSubscribed"
+#define BUS_ERROR_ALREADY_SUBSCRIBED "org.freedesktop.systemd1.AlreadySubscribed"
+#define BUS_ERROR_ONLY_BY_DEPENDENCY "org.freedesktop.systemd1.OnlyByDependency"
+#define BUS_ERROR_TRANSACTION_JOBS_CONFLICTING "org.freedesktop.systemd1.TransactionJobsConflicting"
+#define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic"
+#define BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE "org.freedesktop.systemd1.TransactionIsDestructive"
+#define BUS_ERROR_UNIT_MASKED "org.freedesktop.systemd1.UnitMasked"
+#define BUS_ERROR_JOB_TYPE_NOT_APPLICABLE "org.freedesktop.systemd1.JobTypeNotApplicable"
+#define BUS_ERROR_NO_ISOLATION "org.freedesktop.systemd1.NoIsolation"
+#define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown"
+#define BUS_ERROR_SCOPE_NOT_RUNNING "org.freedesktop.systemd1.ScopeNotRunning"
+
+#define BUS_ERROR_NO_SUCH_MACHINE "org.freedesktop.machine1.NoSuchMachine"
+#define BUS_ERROR_NO_MACHINE_FOR_PID "org.freedesktop.machine1.NoMachineForPID"
+#define BUS_ERROR_MACHINE_EXISTS "org.freedesktop.machine1.MachineExists"
+#define BUS_ERROR_NO_PRIVATE_NETWORKING "org.freedesktop.machine1.NoPrivateNetworking"
+
+#define BUS_ERROR_NO_SUCH_SESSION "org.freedesktop.login1.NoSuchSession"
+#define BUS_ERROR_NO_SESSION_FOR_PID "org.freedesktop.login1.NoSessionForPID"
+#define BUS_ERROR_NO_SUCH_USER "org.freedesktop.login1.NoSuchUser"
+#define BUS_ERROR_NO_USER_FOR_PID "org.freedesktop.login1.NoUserForPID"
+#define BUS_ERROR_NO_SUCH_SEAT "org.freedesktop.login1.NoSuchSeat"
+#define BUS_ERROR_SESSION_NOT_ON_SEAT "org.freedesktop.login1.SessionNotOnSeat"
+#define BUS_ERROR_NOT_IN_CONTROL "org.freedesktop.login1.NotInControl"
+#define BUS_ERROR_DEVICE_IS_TAKEN "org.freedesktop.login1.DeviceIsTaken"
+#define BUS_ERROR_DEVICE_NOT_TAKEN "org.freedesktop.login1.DeviceNotTaken"
+#define BUS_ERROR_OPERATION_IN_PROGRESS "org.freedesktop.login1.OperationInProgress"
+#define BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED "org.freedesktop.login1.SleepVerbNotSupported"
+
+#define BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED "org.freedesktop.timedate1.AutomaticTimeSyncEnabled"
+
+#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
+
+#define BUS_ERROR_NO_NAME_SERVERS "org.freedesktop.resolve1.NoNameServers"
+#define BUS_ERROR_INVALID_REPLY "org.freedesktop.resolve1.InvalidReply"
+#define BUS_ERROR_NO_SUCH_RR "org.freedesktop.resolve1.NoSuchRR"
+#define BUS_ERROR_NO_RESOURCES "org.freedesktop.resolve1.NoResources"
+#define BUS_ERROR_CNAME_LOOP "org.freedesktop.resolve1.CNameLoop"
+#define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted"
+#define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError."
+
+BUS_ERROR_MAP_ELF_USE(bus_common_errors);
diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c
index 157b8d8..2955d9d 100644
--- a/src/libsystemd/sd-bus/bus-error.c
+++ b/src/libsystemd/sd-bus/bus-error.c
@@ -32,7 +32,7 @@
 #include "sd-bus.h"
 #include "bus-error.h"
 
-BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map standard_errors[] = {
+BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = {
         SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.Failed",                           EACCES),
         SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.NoMemory",                         ENOMEM),
         SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.ServiceUnknown",                   EHOSTUNREACH),
diff --git a/src/libsystemd/sd-bus/bus-error.h b/src/libsystemd/sd-bus/bus-error.h
index 5629715..66c98b0 100644
--- a/src/libsystemd/sd-bus/bus-error.h
+++ b/src/libsystemd/sd-bus/bus-error.h
@@ -62,4 +62,4 @@ int bus_error_set_errnofv(sd_bus_error *e, int error, const char *format, va_lis
  * maps using the macsd-ros. */
 #define BUS_ERROR_MAP_END_MARKER -'x'
 
-BUS_ERROR_MAP_ELF_USE(standard_errors);
+BUS_ERROR_MAP_ELF_USE(bus_standard_errors);
diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c
index f72bcdb..463fc81 100644
--- a/src/libsystemd/sd-bus/test-bus-error.c
+++ b/src/libsystemd/sd-bus/test-bus-error.c
@@ -23,7 +23,7 @@
 #include "bus-error.h"
 #include "bus-util.h"
 #include "errno-list.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 
 static void test_error(void) {
         _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL, second = SD_BUS_ERROR_NULL;
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c
index d412311..48395f6 100644
--- a/src/login/logind-dbus.c
+++ b/src/login/logind-dbus.c
@@ -41,7 +41,7 @@
 #include "bus-util.h"
 #include "bus-error.h"
 #include "logind.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "udev-util.h"
 
 static int property_get_idle_hint(
diff --git a/src/login/logind-seat-dbus.c b/src/login/logind-seat-dbus.c
index 1a2f09c..ff87f0f 100644
--- a/src/login/logind-seat-dbus.c
+++ b/src/login/logind-seat-dbus.c
@@ -26,7 +26,7 @@
 #include "util.h"
 #include "bus-util.h"
 #include "strv.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "bus-label.h"
 #include "logind.h"
 #include "logind-seat.h"
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c
index 58836fc..8607d03 100644
--- a/src/login/logind-session-dbus.c
+++ b/src/login/logind-session-dbus.c
@@ -26,7 +26,7 @@
 #include "util.h"
 #include "strv.h"
 #include "bus-util.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "bus-label.h"
 
 #include "logind.h"
diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c
index a2fc56f..72ae6c6 100644
--- a/src/machine/machine-dbus.c
+++ b/src/machine/machine-dbus.c
@@ -27,7 +27,7 @@
 #include "bus-util.h"
 #include "bus-label.h"
 #include "strv.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "copy.h"
 #include "fileio.h"
 #include "in-addr-util.h"
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c
index 20a98ee..0b57b36 100644
--- a/src/machine/machined-dbus.c
+++ b/src/machine/machined-dbus.c
@@ -36,7 +36,7 @@
 #include "utf8.h"
 #include "unit-name.h"
 #include "bus-util.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "time-util.h"
 #include "cgroup-util.h"
 #include "machined.h"
diff --git a/src/nss-resolve/nss-resolve.c b/src/nss-resolve/nss-resolve.c
index 6a029a3..3f32ed0 100644
--- a/src/nss-resolve/nss-resolve.c
+++ b/src/nss-resolve/nss-resolve.c
@@ -33,7 +33,7 @@
 
 #include "sd-bus.h"
 #include "bus-util.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "macro.h"
 #include "nss-util.h"
 #include "util.h"
diff --git a/src/resolve-host/resolve-host.c b/src/resolve-host/resolve-host.c
index 4950ca1..43ecf81 100644
--- a/src/resolve-host/resolve-host.c
+++ b/src/resolve-host/resolve-host.c
@@ -26,7 +26,7 @@
 #include "sd-bus.h"
 #include "bus-util.h"
 #include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "in-addr-util.h"
 #include "af-list.h"
 #include "build.h"
diff --git a/src/resolve/resolved-bus.c b/src/resolve/resolved-bus.c
index ff741cd..8161b53 100644
--- a/src/resolve/resolved-bus.c
+++ b/src/resolve/resolved-bus.c
@@ -19,7 +19,7 @@
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "bus-util.h"
 
 #include "resolved-dns-domain.h"
diff --git a/src/shared/bus-errors.c b/src/shared/bus-errors.c
deleted file mode 100644
index c347545..0000000
--- a/src/shared/bus-errors.c
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-/***
-  This file is part of systemd.
-
-  Copyright 2014 Zbigniew Jędrzejewski-Szmek
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include <errno.h>
-
-#include "sd-bus.h"
-#include "bus-error.h"
-#include "bus-errors.h"
-
-BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map shared_errors[] = {
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_UNIT,                 ENOENT),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_UNIT_FOR_PID,              ESRCH),
-        SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_EXISTS,                  EEXIST),
-        SD_BUS_ERROR_MAP(BUS_ERROR_LOAD_FAILED,                  EIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_JOB_FAILED,                   EREMOTEIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_JOB,                  ENOENT),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NOT_SUBSCRIBED,               EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_ALREADY_SUBSCRIBED,           EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_ONLY_BY_DEPENDENCY,           EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_JOBS_CONFLICTING, EDEADLOCK),
-        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC,  EDEADLOCK),
-        SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE,   EDEADLOCK),
-        SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED,                  ENOSYS),
-        SD_BUS_ERROR_MAP(BUS_ERROR_JOB_TYPE_NOT_APPLICABLE,      EBADR),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_ISOLATION,                 EPERM),
-        SD_BUS_ERROR_MAP(BUS_ERROR_SHUTTING_DOWN,                ECANCELED),
-        SD_BUS_ERROR_MAP(BUS_ERROR_SCOPE_NOT_RUNNING,            EHOSTDOWN),
-
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_MACHINE,              ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_MACHINE_FOR_PID,           ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_MACHINE_EXISTS,               EEXIST),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRIVATE_NETWORKING,        ENOSYS),
-
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SESSION,              ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SESSION_FOR_PID,           ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_USER,                 ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_USER_FOR_PID,              ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SEAT,                 ENXIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_SESSION_NOT_ON_SEAT,          EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NOT_IN_CONTROL,               EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_IS_TAKEN,              EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_NOT_TAKEN,             EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_OPERATION_IN_PROGRESS,        EINPROGRESS),
-        SD_BUS_ERROR_MAP(BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED,     ENOSYS),
-
-        SD_BUS_ERROR_MAP(BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED,  EALREADY),
-
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_PROCESS,              ESRCH),
-
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_NAME_SERVERS,              EIO),
-        SD_BUS_ERROR_MAP(BUS_ERROR_INVALID_REPLY,                EINVAL),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_RR,                   ENOENT),
-        SD_BUS_ERROR_MAP(BUS_ERROR_NO_RESOURCES,                 ENOMEM),
-        SD_BUS_ERROR_MAP(BUS_ERROR_CNAME_LOOP,                   EDEADLOCK),
-        SD_BUS_ERROR_MAP(BUS_ERROR_ABORTED,                      ECANCELED),
-
-        SD_BUS_ERROR_MAP_END
-};
diff --git a/src/shared/bus-errors.h b/src/shared/bus-errors.h
deleted file mode 100644
index e842f85..0000000
--- a/src/shared/bus-errors.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
-
-#pragma once
-
-/***
-  This file is part of systemd.
-
-  Copyright 2013 Lennart Poettering
-
-  systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU Lesser General Public License as published by
-  the Free Software Foundation; either version 2.1 of the License, or
-  (at your option) any later version.
-
-  systemd is distributed in the hope that it will be useful, but
-  WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  Lesser General Public License for more details.
-
-  You should have received a copy of the GNU Lesser General Public License
-  along with systemd; If not, see <http://www.gnu.org/licenses/>.
-***/
-
-#include "sd-bus.h"
-#include "bus-error.h"
-
-#define BUS_ERROR_NO_SUCH_UNIT "org.freedesktop.systemd1.NoSuchUnit"
-#define BUS_ERROR_NO_UNIT_FOR_PID "org.freedesktop.systemd1.NoUnitForPID"
-#define BUS_ERROR_UNIT_EXISTS "org.freedesktop.systemd1.UnitExists"
-#define BUS_ERROR_LOAD_FAILED "org.freedesktop.systemd1.LoadFailed"
-#define BUS_ERROR_JOB_FAILED "org.freedesktop.systemd1.JobFailed"
-#define BUS_ERROR_NO_SUCH_JOB "org.freedesktop.systemd1.NoSuchJob"
-#define BUS_ERROR_NOT_SUBSCRIBED "org.freedesktop.systemd1.NotSubscribed"
-#define BUS_ERROR_ALREADY_SUBSCRIBED "org.freedesktop.systemd1.AlreadySubscribed"
-#define BUS_ERROR_ONLY_BY_DEPENDENCY "org.freedesktop.systemd1.OnlyByDependency"
-#define BUS_ERROR_TRANSACTION_JOBS_CONFLICTING "org.freedesktop.systemd1.TransactionJobsConflicting"
-#define BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC "org.freedesktop.systemd1.TransactionOrderIsCyclic"
-#define BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE "org.freedesktop.systemd1.TransactionIsDestructive"
-#define BUS_ERROR_UNIT_MASKED "org.freedesktop.systemd1.UnitMasked"
-#define BUS_ERROR_JOB_TYPE_NOT_APPLICABLE "org.freedesktop.systemd1.JobTypeNotApplicable"
-#define BUS_ERROR_NO_ISOLATION "org.freedesktop.systemd1.NoIsolation"
-#define BUS_ERROR_SHUTTING_DOWN "org.freedesktop.systemd1.ShuttingDown"
-#define BUS_ERROR_SCOPE_NOT_RUNNING "org.freedesktop.systemd1.ScopeNotRunning"
-
-#define BUS_ERROR_NO_SUCH_MACHINE "org.freedesktop.machine1.NoSuchMachine"
-#define BUS_ERROR_NO_MACHINE_FOR_PID "org.freedesktop.machine1.NoMachineForPID"
-#define BUS_ERROR_MACHINE_EXISTS "org.freedesktop.machine1.MachineExists"
-#define BUS_ERROR_NO_PRIVATE_NETWORKING "org.freedesktop.machine1.NoPrivateNetworking"
-
-#define BUS_ERROR_NO_SUCH_SESSION "org.freedesktop.login1.NoSuchSession"
-#define BUS_ERROR_NO_SESSION_FOR_PID "org.freedesktop.login1.NoSessionForPID"
-#define BUS_ERROR_NO_SUCH_USER "org.freedesktop.login1.NoSuchUser"
-#define BUS_ERROR_NO_USER_FOR_PID "org.freedesktop.login1.NoUserForPID"
-#define BUS_ERROR_NO_SUCH_SEAT "org.freedesktop.login1.NoSuchSeat"
-#define BUS_ERROR_SESSION_NOT_ON_SEAT "org.freedesktop.login1.SessionNotOnSeat"
-#define BUS_ERROR_NOT_IN_CONTROL "org.freedesktop.login1.NotInControl"
-#define BUS_ERROR_DEVICE_IS_TAKEN "org.freedesktop.login1.DeviceIsTaken"
-#define BUS_ERROR_DEVICE_NOT_TAKEN "org.freedesktop.login1.DeviceNotTaken"
-#define BUS_ERROR_OPERATION_IN_PROGRESS "org.freedesktop.login1.OperationInProgress"
-#define BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED "org.freedesktop.login1.SleepVerbNotSupported"
-
-#define BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED "org.freedesktop.timedate1.AutomaticTimeSyncEnabled"
-
-#define BUS_ERROR_NO_SUCH_PROCESS "org.freedesktop.systemd1.NoSuchProcess"
-
-#define BUS_ERROR_NO_NAME_SERVERS "org.freedesktop.resolve1.NoNameServers"
-#define BUS_ERROR_INVALID_REPLY "org.freedesktop.resolve1.InvalidReply"
-#define BUS_ERROR_NO_SUCH_RR "org.freedesktop.resolve1.NoSuchRR"
-#define BUS_ERROR_NO_RESOURCES "org.freedesktop.resolve1.NoResources"
-#define BUS_ERROR_CNAME_LOOP "org.freedesktop.resolve1.CNameLoop"
-#define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted"
-#define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError."
-
-BUS_ERROR_MAP_ELF_USE(shared_errors);
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 17dfff7..b1441ad 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -72,7 +72,7 @@
 #include "bus-util.h"
 #include "bus-message.h"
 #include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "mkdir.h"
 
 static char **arg_types = NULL;
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 08ddc52..bf567a1 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -39,7 +39,7 @@
 #include "label.h"
 #include "bus-util.h"
 #include "bus-error.h"
-#include "bus-errors.h"
+#include "bus-common-errors.h"
 #include "event-util.h"
 
 #define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n"



More information about the systemd-commits mailing list