[systemd-commits] 3 commits - README src/libsystemd src/systemctl

Zbigniew Jędrzejewski-Szmek zbyszek at kemper.freedesktop.org
Tue Dec 30 15:46:42 PST 2014


 README                                    |    5 ++++-
 src/libsystemd/sd-bus/bus-common-errors.c |    4 ++--
 src/systemctl/systemctl.c                 |    2 +-
 3 files changed, 7 insertions(+), 4 deletions(-)

New commits:
commit a39b4bdd10fc15654db37459fe8235a3de1ad817
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Dec 30 18:38:21 2014 -0500

    systemctl: do not repeat hibernate/sleep attempts
    
    If some sleep operation was not possible (e.g. because swap is missing),
    we would try twice: once through logind, which would result in a clean error:
      Failed to execute operation: Sleep verb not supported
    and then second time by starting the appropriate unit directly, which is
    more messy. If logind tells us that something is not possible (or already
    in progress), report that to the user and quit. If logind is present and working
    we should not try to work around it.
    
    Loosely based on https://bugs.freedesktop.org/show_bug.cgi?id=87832.

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a6c7e91..9c4b9ed 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -2966,7 +2966,7 @@ static int start_special(sd_bus *bus, char **args) {
              a == ACTION_HIBERNATE ||
              a == ACTION_HYBRID_SLEEP)) {
                 r = reboot_with_logind(bus, a);
-                if (r >= 0)
+                if (r >= 0 || IN_SET(r, -ENOTSUP, -EINPROGRESS))
                         return r;
         }
 

commit caffa4ef700fdd0eadd6c0b2ef9925611672a1bc
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Dec 30 18:22:53 2014 -0500

    bus: replace ENOSYS return codes with EBADR/ENOTSUP
    
    ENOSYS is used to signify compiled-out functionality. Using it for
    different kinds of error is misleading.
    
    For BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, logind-action.c uses ENOTSUP
    already, so changing it to ENOTSUP makes the dbus and action paths
    behave the same.

diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c
index 8e90738..635363c 100644
--- a/src/libsystemd/sd-bus/bus-common-errors.c
+++ b/src/libsystemd/sd-bus/bus-common-errors.c
@@ -38,7 +38,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
         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_UNIT_MASKED,                  EBADR),
         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),
@@ -60,7 +60,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
         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_SLEEP_VERB_NOT_SUPPORTED,     ENOTSUP),
 
         SD_BUS_ERROR_MAP(BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED,  EALREADY),
 

commit b52a4a3b05a2a0d69868d57fd54f6e4b8fa0e7ca
Author: Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl>
Date:   Tue Dec 30 09:57:01 2014 -0500

    README: CONFIG_DEVPTS_MULTIPLE_INSTANCES is necessary
    
    https://bugs.debian.org/773932

diff --git a/README b/README
index 73a09e4..fa95433 100644
--- a/README
+++ b/README
@@ -68,8 +68,11 @@ REQUIREMENTS:
         create additional symlinks in /dev/disk/ and /dev/tape:
           CONFIG_BLK_DEV_BSG
 
-        Required for PrivateNetwork in service units:
+        Required for PrivateNetwork and PrivateDevices in service units:
           CONFIG_NET_NS
+          CONFIG_DEVPTS_MULTIPLE_INSTANCES
+        Note that systemd-localed.service and other systemd units use
+        PrivateNetwork and PrivateDevices so this is effectively required.
 
         Optional but strongly recommended:
           CONFIG_IPV6



More information about the systemd-commits mailing list