diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-10-08 17:58:34 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-10-08 18:49:45 +0200 |
commit | 787dfb82f5228e4d6c955385ed62ea204a675a58 (patch) | |
tree | 2743a01c5f27f0bfd8ece5c318b82da288000124 /src/libsystemd/sd-bus | |
parent | sd-bus: add three missing entries from bus-common.c that are listed in the .h... (diff) | |
download | systemd-787dfb82f5228e4d6c955385ed62ea204a675a58.tar.xz systemd-787dfb82f5228e4d6c955385ed62ea204a675a58.zip |
portabled: generate a more useful error when invalid image types are attempted to be attached
Fixes: #10095
Diffstat (limited to 'src/libsystemd/sd-bus')
-rw-r--r-- | src/libsystemd/sd-bus/bus-common-errors.c | 1 | ||||
-rw-r--r-- | src/libsystemd/sd-bus/bus-common-errors.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c index 8d6c595549..6e5fe00e06 100644 --- a/src/libsystemd/sd-bus/bus-common-errors.c +++ b/src/libsystemd/sd-bus/bus-common-errors.c @@ -42,6 +42,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = { SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_GROUP_MAPPING, ENXIO), SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_PORTABLE_IMAGE, ENOENT), + SD_BUS_ERROR_MAP(BUS_ERROR_BAD_PORTABLE_IMAGE_TYPE, EMEDIUMTYPE), SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SESSION, ENXIO), SD_BUS_ERROR_MAP(BUS_ERROR_NO_SESSION_FOR_PID, ENXIO), diff --git a/src/libsystemd/sd-bus/bus-common-errors.h b/src/libsystemd/sd-bus/bus-common-errors.h index a76a93644c..8339feb768 100644 --- a/src/libsystemd/sd-bus/bus-common-errors.h +++ b/src/libsystemd/sd-bus/bus-common-errors.h @@ -37,6 +37,7 @@ #define BUS_ERROR_NO_SUCH_GROUP_MAPPING "org.freedesktop.machine1.NoSuchGroupMapping" #define BUS_ERROR_NO_SUCH_PORTABLE_IMAGE "org.freedesktop.portable1.NoSuchImage" +#define BUS_ERROR_BAD_PORTABLE_IMAGE_TYPE "org.freedesktop.portable1.BadImageType" #define BUS_ERROR_NO_SUCH_SESSION "org.freedesktop.login1.NoSuchSession" #define BUS_ERROR_NO_SESSION_FOR_PID "org.freedesktop.login1.NoSessionForPID" |