From 96aad8d15a324d0e956a4e5653a11a67b209b41a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 10 Dec 2014 19:00:46 +0100 Subject: [PATCH] =?UTF-8?q?sd-bus:=20move=20common=20errors=20src/shared/b?= =?UTF-8?q?us-errors.h=20=E2=86=92=20src/libsystemd/sd-bus/bus-common-erro?= =?UTF-8?q?rs.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stuff in src/shared/ should not use stuff from src/libsystemd/ really. --- Makefile.am | 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 +- .../bus-errors.c => libsystemd/sd-bus/bus-common-errors.c} | 4 ++-- .../bus-errors.h => libsystemd/sd-bus/bus-common-errors.h} | 2 +- src/libsystemd/sd-bus/bus-error.c | 2 +- src/libsystemd/sd-bus/bus-error.h | 2 +- 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/nss-resolve/nss-resolve.c | 2 +- src/resolve-host/resolve-host.c | 2 +- src/resolve/resolved-bus.c | 2 +- src/systemctl/systemctl.c | 2 +- src/timedate/timedated.c | 2 +- 27 files changed, 29 insertions(+), 29 deletions(-) rename src/{shared/bus-errors.c => libsystemd/sd-bus/bus-common-errors.c} (97%) rename src/{shared/bus-errors.h => libsystemd/sd-bus/bus-common-errors.h} (98%) diff --git a/Makefile.am b/Makefile.am index 6f02c742a98..c12270762a1 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 140a413c170..6181ba8248b 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 a762223c81d..60215a19357 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 cc09a268c9d..0850fb3d468 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 87da9335a8d..260775cd85e 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 cff24fa68e3..6382400af49 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 6b415b44e98..e271d437cb5 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 900d0d793a2..068a077f153 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 346a5fd7121..a6a23554c9f 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 66ee90b7b27..b0b3d6bd60e 100644 --- a/src/core/transaction.c +++ b/src/core/transaction.c @@ -22,7 +22,7 @@ #include #include -#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 b3b0892f5eb..fe0dfb20834 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 a7226ce4df7..20b79409483 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/shared/bus-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c similarity index 97% rename from src/shared/bus-errors.c rename to src/libsystemd/sd-bus/bus-common-errors.c index c347545c71e..3dc00b5e4a1 100644 --- a/src/shared/bus-errors.c +++ b/src/libsystemd/sd-bus/bus-common-errors.c @@ -23,9 +23,9 @@ #include "sd-bus.h" #include "bus-error.h" -#include "bus-errors.h" +#include "bus-common-errors.h" -BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map shared_errors[] = { +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), diff --git a/src/shared/bus-errors.h b/src/libsystemd/sd-bus/bus-common-errors.h similarity index 98% rename from src/shared/bus-errors.h rename to src/libsystemd/sd-bus/bus-common-errors.h index e842f850c10..5b7f41ef193 100644 --- a/src/shared/bus-errors.h +++ b/src/libsystemd/sd-bus/bus-common-errors.h @@ -71,4 +71,4 @@ #define BUS_ERROR_ABORTED "org.freedesktop.resolve1.Aborted" #define _BUS_ERROR_DNS "org.freedesktop.resolve1.DnsError." -BUS_ERROR_MAP_ELF_USE(shared_errors); +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 157b8d890ad..2955d9dd2b5 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 56297156a98..66c98b0b388 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 f72bcdb6b5f..463fc81c755 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 d4123117a36..48395f6f949 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 1a2f09c615d..ff87f0f741d 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 58836fce259..8607d032657 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 a2fc56f7c9f..72ae6c65354 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 20a98ee8370..0b57b3699c2 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 6a029a331bd..3f32ed06507 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 4950ca14979..43ecf81ef62 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 ff741cdc675..8161b5321fa 100644 --- a/src/resolve/resolved-bus.c +++ b/src/resolve/resolved-bus.c @@ -19,7 +19,7 @@ along with systemd; If not, see . ***/ -#include "bus-errors.h" +#include "bus-common-errors.h" #include "bus-util.h" #include "resolved-dns-domain.h" diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 17dfff7887a..b1441ad86a3 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 08ddc52ca68..bf567a16245 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"