1 /* SPDX-License-Identifier: LGPL-2.1-or-later */ 2 3 #include <errno.h> 4 5 #include "sd-bus.h" 6 7 #include "bus-common-errors.h" 8 #include "bus-error.h" 9 10 BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_common_errors[] = { 11 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_UNIT, ENOENT), 12 SD_BUS_ERROR_MAP(BUS_ERROR_NO_UNIT_FOR_PID, ESRCH), 13 SD_BUS_ERROR_MAP(BUS_ERROR_NO_UNIT_FOR_INVOCATION_ID, ENOENT), 14 SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_EXISTS, EEXIST), 15 SD_BUS_ERROR_MAP(BUS_ERROR_LOAD_FAILED, EIO), 16 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_UNIT_SETTING, ENOEXEC), 17 SD_BUS_ERROR_MAP(BUS_ERROR_JOB_FAILED, EREMOTEIO), 18 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_JOB, ENOENT), 19 SD_BUS_ERROR_MAP(BUS_ERROR_NOT_SUBSCRIBED, EINVAL), 20 SD_BUS_ERROR_MAP(BUS_ERROR_ALREADY_SUBSCRIBED, EINVAL), 21 SD_BUS_ERROR_MAP(BUS_ERROR_ONLY_BY_DEPENDENCY, EINVAL), 22 SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_JOBS_CONFLICTING, EDEADLK), 23 SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_ORDER_IS_CYCLIC, EDEADLK), 24 SD_BUS_ERROR_MAP(BUS_ERROR_TRANSACTION_IS_DESTRUCTIVE, EDEADLK), 25 SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_MASKED, ERFKILL), 26 SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_GENERATED, EADDRNOTAVAIL), 27 SD_BUS_ERROR_MAP(BUS_ERROR_UNIT_LINKED, ELOOP), 28 SD_BUS_ERROR_MAP(BUS_ERROR_JOB_TYPE_NOT_APPLICABLE, EBADR), 29 SD_BUS_ERROR_MAP(BUS_ERROR_NO_ISOLATION, EPERM), 30 SD_BUS_ERROR_MAP(BUS_ERROR_SHUTTING_DOWN, ECANCELED), 31 SD_BUS_ERROR_MAP(BUS_ERROR_SCOPE_NOT_RUNNING, EHOSTDOWN), 32 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_DYNAMIC_USER, ESRCH), 33 SD_BUS_ERROR_MAP(BUS_ERROR_NOT_REFERENCED, EUNATCH), 34 SD_BUS_ERROR_MAP(BUS_ERROR_DISK_FULL, ENOSPC), 35 36 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_MACHINE, ENXIO), 37 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_IMAGE, ENOENT), 38 SD_BUS_ERROR_MAP(BUS_ERROR_NO_MACHINE_FOR_PID, ENXIO), 39 SD_BUS_ERROR_MAP(BUS_ERROR_MACHINE_EXISTS, EEXIST), 40 SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRIVATE_NETWORKING, ENOSYS), 41 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_USER_MAPPING, ENXIO), 42 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_GROUP_MAPPING, ENXIO), 43 44 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_PORTABLE_IMAGE, ENOENT), 45 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_PORTABLE_IMAGE_TYPE, EMEDIUMTYPE), 46 47 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SESSION, ENXIO), 48 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SESSION_FOR_PID, ENXIO), 49 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_USER, ENXIO), 50 SD_BUS_ERROR_MAP(BUS_ERROR_NO_USER_FOR_PID, ENXIO), 51 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SEAT, ENXIO), 52 SD_BUS_ERROR_MAP(BUS_ERROR_SESSION_NOT_ON_SEAT, EINVAL), 53 SD_BUS_ERROR_MAP(BUS_ERROR_NOT_IN_CONTROL, EINVAL), 54 SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_IS_TAKEN, EINVAL), 55 SD_BUS_ERROR_MAP(BUS_ERROR_DEVICE_NOT_TAKEN, EINVAL), 56 SD_BUS_ERROR_MAP(BUS_ERROR_OPERATION_IN_PROGRESS, EINPROGRESS), 57 SD_BUS_ERROR_MAP(BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, EOPNOTSUPP), 58 SD_BUS_ERROR_MAP(BUS_ERROR_SESSION_BUSY, EBUSY), 59 SD_BUS_ERROR_MAP(BUS_ERROR_NOT_YOUR_DEVICE, EPERM), 60 61 SD_BUS_ERROR_MAP(BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED, EALREADY), 62 SD_BUS_ERROR_MAP(BUS_ERROR_NO_NTP_SUPPORT, EOPNOTSUPP), 63 64 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_PROCESS, ESRCH), 65 66 SD_BUS_ERROR_MAP(BUS_ERROR_NO_NAME_SERVERS, ESRCH), 67 SD_BUS_ERROR_MAP(BUS_ERROR_INVALID_REPLY, EINVAL), 68 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_RR, ENOENT), 69 SD_BUS_ERROR_MAP(BUS_ERROR_CNAME_LOOP, EDEADLK), 70 SD_BUS_ERROR_MAP(BUS_ERROR_ABORTED, ECANCELED), 71 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_SERVICE, EUNATCH), 72 SD_BUS_ERROR_MAP(BUS_ERROR_DNSSEC_FAILED, EHOSTUNREACH), 73 SD_BUS_ERROR_MAP(BUS_ERROR_NO_TRUST_ANCHOR, EHOSTUNREACH), 74 SD_BUS_ERROR_MAP(BUS_ERROR_RR_TYPE_UNSUPPORTED, EOPNOTSUPP), 75 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_LINK, ENXIO), 76 SD_BUS_ERROR_MAP(BUS_ERROR_LINK_BUSY, EBUSY), 77 SD_BUS_ERROR_MAP(BUS_ERROR_NETWORK_DOWN, ENETDOWN), 78 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SOURCE, ESRCH), 79 SD_BUS_ERROR_MAP(BUS_ERROR_STUB_LOOP, ELOOP), 80 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_DNSSD_SERVICE, ENOENT), 81 SD_BUS_ERROR_MAP(BUS_ERROR_DNSSD_SERVICE_EXISTS, EEXIST), 82 83 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "FORMERR", EBADMSG), 84 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "SERVFAIL", EHOSTDOWN), 85 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "NXDOMAIN", ENXIO), 86 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "NOTIMP", ENOSYS), 87 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "REFUSED", EACCES), 88 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "YXDOMAIN", EEXIST), 89 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "YRRSET", EEXIST), 90 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "NXRRSET", ENOENT), 91 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "NOTAUTH", EACCES), 92 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "NOTZONE", EREMOTE), 93 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADVERS", EBADMSG), 94 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADKEY", EKEYREJECTED), 95 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADTIME", EBADMSG), 96 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADMODE", EBADMSG), 97 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADNAME", EBADMSG), 98 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADALG", EBADMSG), 99 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADTRUNC", EBADMSG), 100 SD_BUS_ERROR_MAP(_BUS_ERROR_DNS "BADCOOKIE", EBADR), 101 102 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_TRANSFER, ENXIO), 103 SD_BUS_ERROR_MAP(BUS_ERROR_TRANSFER_IN_PROGRESS, EBUSY), 104 105 SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRODUCT_UUID, EOPNOTSUPP), 106 SD_BUS_ERROR_MAP(BUS_ERROR_FILE_IS_PROTECTED, EACCES), 107 SD_BUS_ERROR_MAP(BUS_ERROR_READ_ONLY_FILESYSTEM, EROFS), 108 109 SD_BUS_ERROR_MAP(BUS_ERROR_SPEED_METER_INACTIVE, EOPNOTSUPP), 110 SD_BUS_ERROR_MAP(BUS_ERROR_UNMANAGED_INTERFACE, EOPNOTSUPP), 111 112 SD_BUS_ERROR_MAP(BUS_ERROR_NO_SUCH_HOME, EEXIST), 113 SD_BUS_ERROR_MAP(BUS_ERROR_UID_IN_USE, EEXIST), 114 SD_BUS_ERROR_MAP(BUS_ERROR_USER_NAME_EXISTS, EEXIST), 115 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_EXISTS, EEXIST), 116 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_ALREADY_ACTIVE, EALREADY), 117 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_ALREADY_FIXATED, EALREADY), 118 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_UNFIXATED, EADDRNOTAVAIL), 119 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_NOT_ACTIVE, EALREADY), 120 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_ABSENT, EREMOTE), 121 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_BUSY, EBUSY), 122 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_PASSWORD, ENOKEY), 123 SD_BUS_ERROR_MAP(BUS_ERROR_LOW_PASSWORD_QUALITY, EUCLEAN), 124 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_PASSWORD_AND_NO_TOKEN, EBADSLT), 125 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_PIN_NEEDED, ENOANO), 126 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_PROTECTED_AUTHENTICATION_PATH_NEEDED, ERFKILL), 127 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_USER_PRESENCE_NEEDED, EMEDIUMTYPE), 128 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_USER_VERIFICATION_NEEDED, ENOCSI), 129 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_ACTION_TIMEOUT, ENOSTR), 130 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_PIN_LOCKED, EOWNERDEAD), 131 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_BAD_PIN, ENOLCK), 132 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_BAD_PIN_FEW_TRIES_LEFT, ETOOMANYREFS), 133 SD_BUS_ERROR_MAP(BUS_ERROR_TOKEN_BAD_PIN_ONE_TRY_LEFT, EUCLEAN), 134 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_SIGNATURE, EKEYREJECTED), 135 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_RECORD_MISMATCH, EUCLEAN), 136 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_RECORD_DOWNGRADE, ESTALE), 137 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_RECORD_SIGNED, EROFS), 138 SD_BUS_ERROR_MAP(BUS_ERROR_BAD_HOME_SIZE, ERANGE), 139 SD_BUS_ERROR_MAP(BUS_ERROR_NO_PRIVATE_KEY, ENOPKG), 140 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_LOCKED, ENOEXEC), 141 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_NOT_LOCKED, ENOEXEC), 142 SD_BUS_ERROR_MAP(BUS_ERROR_TOO_MANY_OPERATIONS, ENOBUFS), 143 SD_BUS_ERROR_MAP(BUS_ERROR_AUTHENTICATION_LIMIT_HIT, ETOOMANYREFS), 144 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_CANT_AUTHENTICATE, EKEYREVOKED), 145 SD_BUS_ERROR_MAP(BUS_ERROR_HOME_IN_USE, EADDRINUSE), 146 SD_BUS_ERROR_MAP(BUS_ERROR_REBALANCE_NOT_NEEDED, EALREADY), 147 148 SD_BUS_ERROR_MAP_END 149 }; 150