chiark / gitweb /
core: when enabling a generated unit file, return a clean error
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Feb 2016 15:02:48 +0000 (16:02 +0100)
committerSven Eden <yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:12:57 +0000 (10:12 +0200)
Let's be precise when the user tries to invoke an "enable" operation on a
generated unit file.

src/libelogind/sd-bus/bus-common-errors.c

index 6370061..f16878c 100644 (file)
@@ -38,6 +38,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = {
         SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC,  EDEADLK),
         SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE,   EDEADLK),
         SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED,                  ESHUTDOWN),
+        SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_GENERATED,               EADDRNOTAVAIL),
         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),