diff options
48 files changed, 104 insertions, 104 deletions
diff --git a/man/sd_event_add_time.xml b/man/sd_event_add_time.xml index c975f07de5..5692ee6008 100644 --- a/man/sd_event_add_time.xml +++ b/man/sd_event_add_time.xml @@ -223,7 +223,7 @@ </varlistentry> <varlistentry> - <term><constant>-ENOTSUP</constant></term> + <term><constant>-EOPNOTSUPP</constant></term> <listitem><para>The selected clock is not supported by the event loop implementation.</para></listitem> diff --git a/src/bus-proxyd/driver.c b/src/bus-proxyd/driver.c index e63a95d875..90ddd735dc 100644 --- a/src/bus-proxyd/driver.c +++ b/src/bus-proxyd/driver.c @@ -291,7 +291,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli return synthetic_reply_method_errno(m, r, &error); if (!(creds->mask & SD_BUS_CREDS_SELINUX_CONTEXT)) - return synthetic_reply_method_errno(m, -ENOTSUP, NULL); + return synthetic_reply_method_errno(m, -EOPNOTSUPP, NULL); return synthetic_reply_method_return(m, "y", creds->label, strlen(creds->label)); @@ -307,7 +307,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli return synthetic_reply_method_errno(m, r, &error); if (!(creds->mask & SD_BUS_CREDS_PID)) - return synthetic_reply_method_errno(m, -ENOTSUP, NULL); + return synthetic_reply_method_errno(m, -EOPNOTSUPP, NULL); return synthetic_reply_method_return(m, "u", (uint32_t) creds->pid); @@ -323,7 +323,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli return synthetic_reply_method_errno(m, r, &error); if (!(creds->mask & SD_BUS_CREDS_EUID)) - return synthetic_reply_method_errno(m, -ENOTSUP, NULL); + return synthetic_reply_method_errno(m, -EOPNOTSUPP, NULL); return synthetic_reply_method_return(m, "u", (uint32_t) creds->euid); @@ -360,7 +360,7 @@ int bus_proxy_process_driver(sd_bus *a, sd_bus *b, sd_bus_message *m, SharedPoli return synthetic_reply_method_errno(m, r, &error); if (!(creds->mask & SD_BUS_CREDS_UNIQUE_NAME)) - return synthetic_reply_method_errno(m, -ENOTSUP, NULL); + return synthetic_reply_method_errno(m, -EOPNOTSUPP, NULL); return synthetic_reply_method_return(m, "s", creds->unique_name); diff --git a/src/core/bus-policy.c b/src/core/bus-policy.c index 710283dcd1..064eee1c8a 100644 --- a/src/core/bus-policy.c +++ b/src/core/bus-policy.c @@ -160,7 +160,7 @@ int bus_kernel_make_starter( /* The higher 32bit of the bus_flags fields are considered * 'incompatible flags'. Refuse them all for now. */ if (hello->bus_flags > 0xFFFFFFFFULL) - return -ENOTSUP; + return -EOPNOTSUPP; return fd; } diff --git a/src/core/job.c b/src/core/job.c index 2ef9123ae4..bd63eb16ba 100644 --- a/src/core/job.c +++ b/src/core/job.c @@ -573,7 +573,7 @@ int job_run_and_invalidate(Job *j) { r = job_finish_and_invalidate(j, JOB_INVALID, true); else if (r == -EPROTO) r = job_finish_and_invalidate(j, JOB_ASSERT, true); - else if (r == -ENOTSUP) + else if (r == -EOPNOTSUPP) r = job_finish_and_invalidate(j, JOB_UNSUPPORTED, true); else if (r == -EAGAIN) job_set_state(j, JOB_WAITING); diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c index ea66ce0149..bbf3a8a7fd 100644 --- a/src/core/load-fragment.c +++ b/src/core/load-fragment.c @@ -373,7 +373,7 @@ int config_parse_socket_listen(const char *unit, } if (socket_address_family(&p->address) != AF_LOCAL && p->address.type == SOCK_SEQPACKET) { - log_syntax(unit, LOG_ERR, filename, line, ENOTSUP, + log_syntax(unit, LOG_ERR, filename, line, EOPNOTSUPP, "Address family not supported, ignoring: %s", rvalue); return 0; } diff --git a/src/core/unit-printf.c b/src/core/unit-printf.c index 7736899a35..90cb5040c1 100644 --- a/src/core/unit-printf.c +++ b/src/core/unit-printf.c @@ -81,7 +81,7 @@ static int specifier_instance_unescaped(char specifier, void *data, void *userda assert(u); if (!u->instance) - return -ENOTSUP; + return -EOPNOTSUPP; n = unit_name_unescape(u->instance); if (!n) @@ -164,7 +164,7 @@ static int specifier_runtime(char specifier, void *data, void *userdata, char ** else { e = getenv("XDG_RUNTIME_DIR"); if (!e) - return -ENOTSUP; + return -EOPNOTSUPP; } n = strdup(e); @@ -185,7 +185,7 @@ static int specifier_user_name(char specifier, void *data, void *userdata, char c = unit_get_exec_context(u); if (!c) - return -ENOTSUP; + return -EOPNOTSUPP; if (u->manager->running_as == SYSTEMD_SYSTEM) { @@ -248,7 +248,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char c = unit_get_exec_context(u); if (!c) - return -ENOTSUP; + return -EOPNOTSUPP; if (u->manager->running_as == SYSTEMD_SYSTEM) { @@ -258,7 +258,7 @@ static int specifier_user_home(char specifier, void *data, void *userdata, char if (!c->user || streq(c->user, "root") || streq(c->user, "0")) n = strdup("/root"); else - return -ENOTSUP; + return -EOPNOTSUPP; } else { @@ -296,7 +296,7 @@ static int specifier_user_shell(char specifier, void *data, void *userdata, char c = unit_get_exec_context(u); if (!c) - return -ENOTSUP; + return -EOPNOTSUPP; if (u->manager->running_as == SYSTEMD_SYSTEM) { @@ -306,7 +306,7 @@ static int specifier_user_shell(char specifier, void *data, void *userdata, char if (!c->user || streq(c->user, "root") || streq(c->user, "0")) n = strdup("/bin/sh"); else - return -ENOTSUP; + return -EOPNOTSUPP; } else { diff --git a/src/core/unit.c b/src/core/unit.c index ec4fa82ec1..f9aca0188c 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -1456,7 +1456,7 @@ int unit_start(Unit *u) { } if (UNIT_VTABLE(u)->supported && !UNIT_VTABLE(u)->supported(u->manager)) - return -ENOTSUP; + return -EOPNOTSUPP; /* If it is stopped, but we cannot start it, then fail */ if (!UNIT_VTABLE(u)->start) @@ -3016,7 +3016,7 @@ int unit_kill(Unit *u, KillWho w, int signo, sd_bus_error *error) { assert(signo < _NSIG); if (!UNIT_VTABLE(u)->kill) - return -ENOTSUP; + return -EOPNOTSUPP; return UNIT_VTABLE(u)->kill(u, w, signo, error); } diff --git a/src/import/import-compress.c b/src/import/import-compress.c index fa3f162bf6..d6b8133036 100644 --- a/src/import/import-compress.c +++ b/src/import/import-compress.c @@ -234,7 +234,7 @@ int import_compress_init(ImportCompress *c, ImportCompressType t) { break; default: - return -ENOTSUP; + return -EOPNOTSUPP; } c->encoding = true; @@ -365,7 +365,7 @@ int import_compress(ImportCompress *c, const void *data, size_t size, void **buf break; default: - return -ENOTSUP; + return -EOPNOTSUPP; } return 0; @@ -453,7 +453,7 @@ int import_compress_finish(ImportCompress *c, void **buffer, size_t *buffer_size break; default: - return -ENOTSUP; + return -EOPNOTSUPP; } return 0; diff --git a/src/import/qcow2-util.c b/src/import/qcow2-util.c index 9b0c23bb14..fd3cf1b0e3 100644 --- a/src/import/qcow2-util.c +++ b/src/import/qcow2-util.c @@ -177,7 +177,7 @@ static int normalize_offset( uint64_t sz, csize_shift, csize_mask; if (!compressed) - return -ENOTSUP; + return -EOPNOTSUPP; csize_shift = 64 - 2 - (HEADER_CLUSTER_BITS(header) - 8); csize_mask = (1ULL << (HEADER_CLUSTER_BITS(header) - 8)) - 1; @@ -216,10 +216,10 @@ static int verify_header(const Header *header) { if (HEADER_VERSION(header) != 2 && HEADER_VERSION(header) != 3) - return -ENOTSUP; + return -EOPNOTSUPP; if (HEADER_CRYPT_METHOD(header) != 0) - return -ENOTSUP; + return -EOPNOTSUPP; if (HEADER_CLUSTER_BITS(header) < 9) /* 512K */ return -EBADMSG; @@ -236,7 +236,7 @@ static int verify_header(const Header *header) { if (HEADER_VERSION(header) == 3) { if (header->incompatible_features != 0) - return -ENOTSUP; + return -EOPNOTSUPP; if (HEADER_HEADER_LENGTH(header) < sizeof(Header)) return -EBADMSG; diff --git a/src/journal-remote/journal-remote.c b/src/journal-remote/journal-remote.c index 64498ddda3..2e1c798fc1 100644 --- a/src/journal-remote/journal-remote.c +++ b/src/journal-remote/journal-remote.c @@ -698,7 +698,7 @@ static int setup_microhttpd_server(RemoteServer *s, info = MHD_get_daemon_info(d->daemon, MHD_DAEMON_INFO_EPOLL_FD_LINUX_ONLY); if (!info) { log_error("µhttp returned NULL daemon info"); - r = -ENOTSUP; + r = -EOPNOTSUPP; goto error; } diff --git a/src/journal/coredumpctl.c b/src/journal/coredumpctl.c index 62983a73e4..4026a1c26f 100644 --- a/src/journal/coredumpctl.c +++ b/src/journal/coredumpctl.c @@ -649,7 +649,7 @@ static int save_core(sd_journal *j, int fd, char **path, bool *unlink_temp) { } #else log_error("Cannot decompress file. Compiled without compression support."); - r = -ENOTSUP; + r = -EOPNOTSUPP; goto error; #endif } else { diff --git a/src/journal/journal-authenticate.c b/src/journal/journal-authenticate.c index b3e2601c4e..cdc80e2d26 100644 --- a/src/journal/journal-authenticate.c +++ b/src/journal/journal-authenticate.c @@ -106,7 +106,7 @@ static int journal_file_get_epoch(JournalFile *f, uint64_t realtime, uint64_t *e if (f->fss_start_usec == 0 || f->fss_interval_usec == 0) - return -ENOTSUP; + return -EOPNOTSUPP; if (realtime < f->fss_start_usec) return -ESTALE; @@ -446,7 +446,7 @@ int journal_file_hmac_setup(JournalFile *f) { e = gcry_md_open(&f->hmac, GCRY_MD_SHA256, GCRY_MD_FLAG_HMAC); if (e != 0) - return -ENOTSUP; + return -EOPNOTSUPP; return 0; } diff --git a/src/journal/journal-verify.c b/src/journal/journal-verify.c index 35c270cb34..146c10b4d4 100644 --- a/src/journal/journal-verify.c +++ b/src/journal/journal-verify.c @@ -817,7 +817,7 @@ int journal_file_verify( return r; } #else - return -ENOTSUP; + return -EOPNOTSUPP; #endif } else if (f->seal) return -ENOKEY; @@ -845,7 +845,7 @@ int journal_file_verify( if (le32toh(f->header->compatible_flags) & ~HEADER_COMPATIBLE_SUPPORTED) { log_error("Cannot verify file with unknown extensions."); - r = -ENOTSUP; + r = -EOPNOTSUPP; goto fail; } diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 4d45f5a691..7fbd518d3f 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -576,7 +576,7 @@ static int parse_argv(int argc, char *argv[]) { case ARG_INTERVAL: case ARG_FORCE: log_error("Forward-secure sealing not available."); - return -ENOTSUP; + return -EOPNOTSUPP; #endif case 'p': { @@ -1472,7 +1472,7 @@ finish: return r; #else log_error("Forward-secure sealing not available."); - return -ENOTSUP; + return -EOPNOTSUPP; #endif } diff --git a/src/libsystemd-network/lldp-internal.c b/src/libsystemd-network/lldp-internal.c index c6a989aac1..dee4ea474c 100644 --- a/src/libsystemd-network/lldp-internal.c +++ b/src/libsystemd-network/lldp-internal.c @@ -54,7 +54,7 @@ int lldp_read_chassis_id(tlv_packet *tlv, break; default: - r = -ENOTSUP; + r = -EOPNOTSUPP; break; } @@ -106,7 +106,7 @@ int lldp_read_port_id(tlv_packet *tlv, break; default: - r = -ENOTSUP; + r = -EOPNOTSUPP; break; } diff --git a/src/libsystemd/sd-bus/bus-common-errors.c b/src/libsystemd/sd-bus/bus-common-errors.c index da2c57bf74..52f8dfd3be 100644 --- a/src/libsystemd/sd-bus/bus-common-errors.c +++ b/src/libsystemd/sd-bus/bus-common-errors.c @@ -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, ENOTSUP), + SD_BUS_ERROR_MAP(BUS_ERROR_SLEEP_VERB_NOT_SUPPORTED, EOPNOTSUPP), SD_BUS_ERROR_MAP(BUS_ERROR_AUTOMATIC_TIME_SYNC_ENABLED, EALREADY), diff --git a/src/libsystemd/sd-bus/bus-control.c b/src/libsystemd/sd-bus/bus-control.c index c985b0e14a..25510f00c7 100644 --- a/src/libsystemd/sd-bus/bus-control.c +++ b/src/libsystemd/sd-bus/bus-control.c @@ -622,7 +622,7 @@ int bus_get_name_creds_kdbus( int r; if (streq(name, "org.freedesktop.DBus")) - return -ENOTSUP; + return -EOPNOTSUPP; r = bus_kernel_parse_unique_name(name, &id); if (r < 0) @@ -875,7 +875,7 @@ _public_ int sd_bus_get_name_creds( assert_return(bus, -EINVAL); assert_return(name, -EINVAL); - assert_return((mask & ~SD_BUS_CREDS_AUGMENT) <= _SD_BUS_CREDS_ALL, -ENOTSUP); + assert_return((mask & ~SD_BUS_CREDS_AUGMENT) <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP); assert_return(mask == 0 || creds, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); assert_return(service_name_is_valid(name), -EINVAL); @@ -989,7 +989,7 @@ static int bus_get_owner_creds_dbus1(sd_bus *bus, uint64_t mask, sd_bus_creds ** _public_ int sd_bus_get_owner_creds(sd_bus *bus, uint64_t mask, sd_bus_creds **ret) { assert_return(bus, -EINVAL); - assert_return((mask & ~SD_BUS_CREDS_AUGMENT) <= _SD_BUS_CREDS_ALL, -ENOTSUP); + assert_return((mask & ~SD_BUS_CREDS_AUGMENT) <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP); assert_return(ret, -EINVAL); assert_return(!bus_pid_changed(bus), -ECHILD); diff --git a/src/libsystemd/sd-bus/bus-creds.c b/src/libsystemd/sd-bus/bus-creds.c index d172dadbfd..cd1c5e232a 100644 --- a/src/libsystemd/sd-bus/bus-creds.c +++ b/src/libsystemd/sd-bus/bus-creds.c @@ -146,7 +146,7 @@ _public_ int sd_bus_creds_new_from_pid(sd_bus_creds **ret, pid_t pid, uint64_t m int r; assert_return(pid >= 0, -EINVAL); - assert_return(mask <= _SD_BUS_CREDS_ALL, -ENOTSUP); + assert_return(mask <= _SD_BUS_CREDS_ALL, -EOPNOTSUPP); assert_return(ret, -EINVAL); if (pid == 0) @@ -941,7 +941,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) { if (missing & SD_BUS_CREDS_AUDIT_SESSION_ID) { r = audit_session_from_pid(pid, &c->audit_session_id); if (r < 0) { - if (r != -ENOTSUP && r != -ENXIO && r != -ENOENT && r != -EPERM && r != -EACCES) + if (r != -EOPNOTSUPP && r != -ENXIO && r != -ENOENT && r != -EPERM && r != -EACCES) return r; } else c->mask |= SD_BUS_CREDS_AUDIT_SESSION_ID; @@ -950,7 +950,7 @@ int bus_creds_add_more(sd_bus_creds *c, uint64_t mask, pid_t pid, pid_t tid) { if (missing & SD_BUS_CREDS_AUDIT_LOGIN_UID) { r = audit_loginuid_from_pid(pid, &c->audit_login_uid); if (r < 0) { - if (r != -ENOTSUP && r != -ENXIO && r != -ENOENT && r != -EPERM && r != -EACCES) + if (r != -EOPNOTSUPP && r != -ENXIO && r != -ENOENT && r != -EPERM && r != -EACCES) return r; } else c->mask |= SD_BUS_CREDS_AUDIT_LOGIN_UID; diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c index 3bf0c5d3e4..dac157be16 100644 --- a/src/libsystemd/sd-bus/bus-error.c +++ b/src/libsystemd/sd-bus/bus-error.c @@ -40,7 +40,7 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.NoReply", ETIMEDOUT), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.IOError", EIO), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.BadAddress", EADDRNOTAVAIL), - SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.NotSupported", ENOTSUP), + SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.NotSupported", EOPNOTSUPP), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.LimitsExceeded", ENOBUFS), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.AccessDenied", EACCES), SD_BUS_ERROR_MAP("org.freedesktop.DBus.Error.AuthFailed", EACCES), @@ -168,7 +168,7 @@ static sd_bus_error errno_to_bus_error_const(int error) { case ECONNRESET: return SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_DISCONNECTED, "Disconnected"); - case ENOTSUP: + case EOPNOTSUPP: return SD_BUS_ERROR_MAKE_CONST(SD_BUS_ERROR_NOT_SUPPORTED, "Not supported"); case EADDRNOTAVAIL: diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c index 2294eac97e..35c2aa6bee 100644 --- a/src/libsystemd/sd-bus/bus-kernel.c +++ b/src/libsystemd/sd-bus/bus-kernel.c @@ -972,7 +972,7 @@ int bus_kernel_take_fd(sd_bus *b) { /* The higher 32bit of the bus_flags fields are considered * 'incompatible flags'. Refuse them all for now. */ if (hello->bus_flags > 0xFFFFFFFFULL) { - r = -ENOTSUP; + r = -EOPNOTSUPP; goto fail; } @@ -987,7 +987,7 @@ int bus_kernel_take_fd(sd_bus *b) { } if (!bloom || !bloom_validate_parameters((size_t) bloom->size, (unsigned) bloom->n_hash)) { - r = -ENOTSUP; + r = -EOPNOTSUPP; goto fail; } @@ -1395,7 +1395,7 @@ int bus_kernel_pop_memfd(sd_bus *bus, void **address, size_t *mapped, size_t *al assert(allocated); if (!bus || !bus->is_kernel) - return -ENOTSUP; + return -EOPNOTSUPP; assert_se(pthread_mutex_lock(&bus->memfd_cache_mutex) >= 0); diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index 199b13321b..a8b913e60c 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -420,7 +420,7 @@ static int message_append_reply_cookie(sd_bus_message *m, uint64_t cookie) { else { /* 64bit cookies are not supported on dbus1 */ if (cookie > 0xffffffffUL) - return -ENOTSUP; + return -EOPNOTSUPP; return message_append_field_uint32(m, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) cookie); } @@ -750,7 +750,7 @@ static int message_new_reply( t->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED; t->reply_cookie = BUS_MESSAGE_COOKIE(call); if (t->reply_cookie == 0) - return -ENOTSUP; + return -EOPNOTSUPP; r = message_append_reply_cookie(t, t->reply_cookie); if (r < 0) @@ -1463,7 +1463,7 @@ static int message_push_fd(sd_bus_message *m, int fd) { return -EINVAL; if (!m->allow_fds) - return -ENOTSUP; + return -EOPNOTSUPP; copy = fcntl(fd, F_DUPFD_CLOEXEC, 3); if (copy < 0) @@ -2942,7 +2942,7 @@ int bus_message_seal(sd_bus_message *m, uint64_t cookie, usec_t timeout) { if (cookie > 0xffffffffULL && !BUS_MESSAGE_IS_GVARIANT(m)) - return -ENOTSUP; + return -EOPNOTSUPP; /* In vtables the return signature of method calls is listed, * let's check if they match if this is a response */ @@ -4796,7 +4796,7 @@ _public_ int sd_bus_message_read_array( assert_return(bus_type_is_trivial(type), -EINVAL); assert_return(ptr, -EINVAL); assert_return(size, -EINVAL); - assert_return(!BUS_MESSAGE_NEED_BSWAP(m), -ENOTSUP); + assert_return(!BUS_MESSAGE_NEED_BSWAP(m), -EOPNOTSUPP); r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, CHAR_TO_STR(type)); if (r <= 0) diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c index 28b33ab8d0..dcad701980 100644 --- a/src/libsystemd/sd-bus/bus-util.c +++ b/src/libsystemd/sd-bus/bus-util.c @@ -132,7 +132,7 @@ int bus_event_loop_with_idle( /* Fallback for dbus1 connections: we * unregister the name and wait for the * response to come through for it */ - if (r == -ENOTSUP) { + if (r == -EOPNOTSUPP) { /* Inform the service manager that we * are going down, so that it will @@ -1170,7 +1170,7 @@ int bus_open_transport(BusTransport transport, const char *host, bool user, sd_b assert(bus); assert_return((transport == BUS_TRANSPORT_LOCAL) == !host, -EINVAL); - assert_return(transport == BUS_TRANSPORT_LOCAL || !user, -ENOTSUP); + assert_return(transport == BUS_TRANSPORT_LOCAL || !user, -EOPNOTSUPP); switch (transport) { @@ -1205,7 +1205,7 @@ int bus_open_transport_systemd(BusTransport transport, const char *host, bool us assert(bus); assert_return((transport == BUS_TRANSPORT_LOCAL) == !host, -EINVAL); - assert_return(transport == BUS_TRANSPORT_LOCAL || !user, -ENOTSUP); + assert_return(transport == BUS_TRANSPORT_LOCAL || !user, -EOPNOTSUPP); switch (transport) { @@ -1764,7 +1764,7 @@ static int check_wait_response(BusWaitForJobs *d, bool quiet) { else if (streq(d->result, "assert")) r = -EPROTO; else if (streq(d->result, "unsupported")) - r = -ENOTSUP; + r = -EOPNOTSUPP; else if (!streq(d->result, "done") && !streq(d->result, "skipped")) r = -EIO; diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c index e0b32730b7..2cb1aafa2b 100644 --- a/src/libsystemd/sd-bus/sd-bus.c +++ b/src/libsystemd/sd-bus/sd-bus.c @@ -1706,7 +1706,7 @@ static int bus_send_internal(sd_bus *bus, sd_bus_message *_m, uint64_t *cookie, if (r < 0) return r; if (r == 0) - return -ENOTSUP; + return -EOPNOTSUPP; } /* If the cookie number isn't kept, then we know that no reply @@ -3398,7 +3398,7 @@ _public_ int sd_bus_try_close(sd_bus *bus) { assert_return(!bus_pid_changed(bus), -ECHILD); if (!bus->is_kernel) - return -ENOTSUP; + return -EOPNOTSUPP; if (!BUS_IS_OPEN(bus->state)) return -ENOTCONN; diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c index 463fc81c75..5753c04b0e 100644 --- a/src/libsystemd/sd-bus/test-bus-error.c +++ b/src/libsystemd/sd-bus/test-bus-error.c @@ -35,11 +35,11 @@ static void test_error(void) { }; assert_se(!sd_bus_error_is_set(&error)); - assert_se(sd_bus_error_set(&error, SD_BUS_ERROR_NOT_SUPPORTED, "xxx") == -ENOTSUP); + assert_se(sd_bus_error_set(&error, SD_BUS_ERROR_NOT_SUPPORTED, "xxx") == -EOPNOTSUPP); assert_se(streq(error.name, SD_BUS_ERROR_NOT_SUPPORTED)); assert_se(streq(error.message, "xxx")); assert_se(sd_bus_error_has_name(&error, SD_BUS_ERROR_NOT_SUPPORTED)); - assert_se(sd_bus_error_get_errno(&error) == ENOTSUP); + assert_se(sd_bus_error_get_errno(&error) == EOPNOTSUPP); assert_se(sd_bus_error_is_set(&error)); sd_bus_error_free(&error); diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index a270849cd7..618d1b915c 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -919,7 +919,7 @@ _public_ int sd_event_add_time( callback = time_exit_callback; type = clock_to_event_source_type(clock); - assert_return(type >= 0, -ENOTSUP); + assert_return(type >= 0, -EOPNOTSUPP); d = event_get_clock_data(e, type); assert(d); diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c index 651fceb79d..7363be2794 100644 --- a/src/libsystemd/sd-path/sd-path.c +++ b/src/libsystemd/sd-path/sd-path.c @@ -323,7 +323,7 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { return from_user_dir("XDG_DESKTOP_DIR", buffer, ret); } - return -ENOTSUP; + return -EOPNOTSUPP; } _public_ int sd_path_home(uint64_t type, const char *suffix, char **path) { @@ -552,7 +552,7 @@ static int get_search(uint64_t type, char ***list) { NULL); } - return -ENOTSUP; + return -EOPNOTSUPP; } _public_ int sd_path_search(uint64_t type, const char *suffix, char ***paths) { diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index 8f7d50abbb..8bb7bcdd05 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -648,7 +648,7 @@ int sd_rtnl_message_get_family(sd_rtnl_message *m, int *family) { return 0; } - return -ENOTSUP; + return -EOPNOTSUPP; } int sd_rtnl_message_is_broadcast(sd_rtnl_message *m) { @@ -1560,7 +1560,7 @@ int socket_read_message(sd_rtnl *rtnl) { /* check that we support this message type */ r = type_system_get_type(NULL, &nl_type, new_msg->nlmsg_type); if (r < 0) { - if (r == -ENOTSUP) + if (r == -EOPNOTSUPP) log_debug("sd-rtnl: ignored message with unknown type: %i", new_msg->nlmsg_type); diff --git a/src/libsystemd/sd-rtnl/rtnl-types.c b/src/libsystemd/sd-rtnl/rtnl-types.c index 557dc59455..e21c898668 100644 --- a/src/libsystemd/sd-rtnl/rtnl-types.c +++ b/src/libsystemd/sd-rtnl/rtnl-types.c @@ -443,12 +443,12 @@ int type_system_get_type(const NLTypeSystem *type_system, const NLType **ret, ui assert(type_system->types); if (type > type_system->max) - return -ENOTSUP; + return -EOPNOTSUPP; nl_type = &type_system->types[type]; if (nl_type->type == NLA_UNSPEC) - return -ENOTSUP; + return -EOPNOTSUPP; *ret = nl_type; @@ -503,7 +503,7 @@ int type_system_union_get_type_system(const NLTypeSystemUnion *type_system_union type = type_system_union->lookup(key); if (type < 0) - return -ENOTSUP; + return -EOPNOTSUPP; assert(type < type_system_union->num); @@ -521,11 +521,11 @@ int type_system_union_protocol_get_type_system(const NLTypeSystemUnion *type_sys assert(ret); if (protocol >= type_system_union->num) - return -ENOTSUP; + return -EOPNOTSUPP; type_system = &type_system_union->type_systems[protocol]; if (type_system->max == 0) - return -ENOTSUP; + return -EOPNOTSUPP; *ret = type_system; diff --git a/src/libsystemd/sd-rtnl/sd-rtnl.c b/src/libsystemd/sd-rtnl/sd-rtnl.c index 7cdcc5d96a..268d366050 100644 --- a/src/libsystemd/sd-rtnl/sd-rtnl.c +++ b/src/libsystemd/sd-rtnl/sd-rtnl.c @@ -998,7 +998,7 @@ int sd_rtnl_add_match(sd_rtnl *rtnl, assert_return(!rtnl_pid_changed(rtnl), -ECHILD); assert_return(rtnl_message_type_is_link(type) || rtnl_message_type_is_addr(type) || - rtnl_message_type_is_route(type), -ENOTSUP); + rtnl_message_type_is_route(type), -EOPNOTSUPP); c = new0(struct match_callback, 1); if (!c) diff --git a/src/login/logind-action.c b/src/login/logind-action.c index 20c1c89eee..281e3c7569 100644 --- a/src/login/logind-action.c +++ b/src/login/logind-action.c @@ -112,7 +112,7 @@ int manager_handle_action( if (!supported) { log_warning("Requested operation not supported, ignoring."); - return -ENOTSUP; + return -EOPNOTSUPP; } if (m->action_what) { diff --git a/src/login/logind-session.c b/src/login/logind-session.c index ce5dbb4d5c..e9b179067c 100644 --- a/src/login/logind-session.c +++ b/src/login/logind-session.c @@ -461,7 +461,7 @@ int session_activate(Session *s) { assert(s->user); if (!s->seat) - return -ENOTSUP; + return -EOPNOTSUPP; if (s->seat->active == s) return 0; @@ -469,7 +469,7 @@ int session_activate(Session *s) { /* on seats with VTs, we let VTs manage session-switching */ if (seat_has_vts(s->seat)) { if (!s->vtnr) - return -ENOTSUP; + return -EOPNOTSUPP; return chvt(s->vtnr); } diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c index aaf9e9cf2c..688c510907 100644 --- a/src/machine/machinectl.c +++ b/src/machine/machinectl.c @@ -1155,7 +1155,7 @@ static int login_machine(int argc, char *argv[], void *userdata) { if (arg_transport != BUS_TRANSPORT_LOCAL && arg_transport != BUS_TRANSPORT_MACHINE) { log_error("Login only supported on local machines."); - return -ENOTSUP; + return -EOPNOTSUPP; } polkit_agent_open_if_enabled(); diff --git a/src/notify/notify.c b/src/notify/notify.c index a8ffbe9c8c..00db75314e 100644 --- a/src/notify/notify.c +++ b/src/notify/notify.c @@ -197,7 +197,7 @@ int main(int argc, char* argv[]) { } if (r == 0) - r = -ENOTSUP; + r = -EOPNOTSUPP; finish: return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index c851fdd136..136933ec6c 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -3125,7 +3125,7 @@ static int dissect_image( return 0; #else log_error("--image= is not supported, compiled without blkid support."); - return -ENOTSUP; + return -EOPNOTSUPP; #endif } @@ -3180,7 +3180,7 @@ static int mount_device(const char *what, const char *where, const char *directo if (streq(fstype, "crypto_LUKS")) { log_error("nspawn currently does not support LUKS disk images."); - return -ENOTSUP; + return -EOPNOTSUPP; } if (mount(what, p, fstype, MS_NODEV|(rw ? 0 : MS_RDONLY), NULL) < 0) @@ -3189,7 +3189,7 @@ static int mount_device(const char *what, const char *where, const char *directo return 0; #else log_error("--image= is not supported, compiled without blkid support."); - return -ENOTSUP; + return -EOPNOTSUPP; #endif } diff --git a/src/path/path.c b/src/path/path.c index 99a4f2f3c0..f7736a4202 100644 --- a/src/path/path.c +++ b/src/path/path.c @@ -115,7 +115,7 @@ static int print_home(const char *n) { } log_error("Path %s not known.", n); - return -ENOTSUP; + return -EOPNOTSUPP; } static void help(void) { diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index abdb2e0732..1039a5a846 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -144,7 +144,7 @@ int dns_scope_emit(DnsScope *s, DnsPacket *p) { DnsServer *srv; if (DNS_PACKET_QDCOUNT(p) > 1) - return -ENOTSUP; + return -EOPNOTSUPP; srv = dns_scope_get_dns_server(s); if (!srv) @@ -172,7 +172,7 @@ int dns_scope_emit(DnsScope *s, DnsPacket *p) { } else if (s->protocol == DNS_PROTOCOL_LLMNR) { if (DNS_PACKET_QDCOUNT(p) > 1) - return -ENOTSUP; + return -EOPNOTSUPP; if (!ratelimit_test(&s->ratelimit)) return -EBUSY; diff --git a/src/shared/copy.c b/src/shared/copy.c index f9ec6733be..9e4c3b0f72 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -285,7 +285,7 @@ static int fd_copy_directory( else if (S_ISBLK(buf.st_mode) || S_ISCHR(buf.st_mode)) q = fd_copy_node(dirfd(d), de->d_name, &buf, fdt, de->d_name); else - q = -ENOTSUP; + q = -EOPNOTSUPP; if (q == -EEXIST && merge) q = 0; @@ -317,7 +317,7 @@ int copy_tree_at(int fdf, const char *from, int fdt, const char *to, bool merge) else if (S_ISBLK(st.st_mode) || S_ISCHR(st.st_mode)) return fd_copy_node(fdf, from, &st, fdt, to); else - return -ENOTSUP; + return -EOPNOTSUPP; } int copy_tree(const char *from, const char *to, bool merge) { diff --git a/src/shared/fw-util.c b/src/shared/fw-util.c index ceb1ae508c..6b3599d90d 100644 --- a/src/shared/fw-util.c +++ b/src/shared/fw-util.c @@ -91,10 +91,10 @@ int fw_add_masquerade( int r; if (af != AF_INET) - return -ENOTSUP; + return -EOPNOTSUPP; if (protocol != 0 && protocol != IPPROTO_TCP && protocol != IPPROTO_UDP) - return -ENOTSUP; + return -EOPNOTSUPP; h = iptc_init("nat"); if (!h) @@ -175,10 +175,10 @@ int fw_add_local_dnat( assert(add || !previous_remote); if (af != AF_INET) - return -ENOTSUP; + return -EOPNOTSUPP; if (protocol != IPPROTO_TCP && protocol != IPPROTO_UDP) - return -ENOTSUP; + return -EOPNOTSUPP; if (local_port <= 0) return -EINVAL; diff --git a/src/shared/fw-util.h b/src/shared/fw-util.h index 698cc43daa..93152e3978 100644 --- a/src/shared/fw-util.h +++ b/src/shared/fw-util.h @@ -60,7 +60,7 @@ static inline int fw_add_masquerade( const char *out_interface, const union in_addr_union *destination, unsigned destination_prefixlen) { - return -ENOTSUP; + return -EOPNOTSUPP; } static inline int fw_add_local_dnat( @@ -76,7 +76,7 @@ static inline int fw_add_local_dnat( const union in_addr_union *remote, uint16_t remote_port, const union in_addr_union *previous_remote) { - return -ENOTSUP; + return -EOPNOTSUPP; } #endif diff --git a/src/shared/install.c b/src/shared/install.c index 95ba718559..7a7ec19f32 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -1535,7 +1535,7 @@ int unit_file_add_dependency( if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) { log_error("Failed to enable unit: Unit %s is masked", *i); - return -ENOTSUP; + return -EOPNOTSUPP; } r = install_info_add_auto(&c, *i); @@ -1613,7 +1613,7 @@ int unit_file_enable( state = unit_file_get_state(scope, root_dir, *i); if (state == UNIT_FILE_MASKED || state == UNIT_FILE_MASKED_RUNTIME) { log_error("Failed to enable unit: Unit %s is masked", *i); - return -ENOTSUP; + return -EOPNOTSUPP; } r = install_info_add_auto(&c, *i); diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c index 00337e7c9f..edf986d4db 100644 --- a/src/shared/machine-image.c +++ b/src/shared/machine-image.c @@ -369,7 +369,7 @@ int image_remove(Image *i) { return rm_rf_dangerous(i->path, false, true, false); default: - return -ENOTSUP; + return -EOPNOTSUPP; } } @@ -430,7 +430,7 @@ int image_rename(Image *i, const char *new_name) { } default: - return -ENOTSUP; + return -EOPNOTSUPP; } if (!new_path) @@ -498,7 +498,7 @@ int image_clone(Image *i, const char *new_name, bool read_only) { break; default: - return -ENOTSUP; + return -EOPNOTSUPP; } if (r < 0) @@ -563,7 +563,7 @@ int image_read_only(Image *i, bool b) { } default: - return -ENOTSUP; + return -EOPNOTSUPP; } return 0; @@ -622,7 +622,7 @@ int image_set_limit(Image *i, uint64_t referenced_max) { return -EROFS; if (i->type != IMAGE_SUBVOLUME) - return -ENOTSUP; + return -EOPNOTSUPP; return btrfs_quota_limit(i->path, referenced_max); } diff --git a/src/shared/selinux-util.c b/src/shared/selinux-util.c index 82c6924e36..a8d5fc4f3e 100644 --- a/src/shared/selinux-util.c +++ b/src/shared/selinux-util.c @@ -145,7 +145,7 @@ int mac_selinux_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { r = lsetfilecon(path, fcon); /* If the FS doesn't support labels, then exit without warning */ - if (r < 0 && errno == ENOTSUP) + if (r < 0 && errno == EOPNOTSUPP) return 0; } } diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c index 64e213489e..a73a996cf6 100644 --- a/src/shared/smack-util.c +++ b/src/shared/smack-util.c @@ -187,7 +187,7 @@ int mac_smack_fix(const char *path, bool ignore_enoent, bool ignore_erofs) { r = lsetxattr(path, "security.SMACK64", label, strlen(label), 0); /* If the FS doesn't support labels, then exit without warning */ - if (r < 0 && errno == ENOTSUP) + if (r < 0 && errno == EOPNOTSUPP) return 0; } diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index c832cfe3f9..4a6bf50b17 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -580,7 +580,7 @@ int sockaddr_pretty(const struct sockaddr *_sa, socklen_t salen, bool translate_ break; default: - return -ENOTSUP; + return -EOPNOTSUPP; } diff --git a/src/shared/util.c b/src/shared/util.c index 55de83023d..845c7ea91a 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -6668,7 +6668,7 @@ int getpeersec(int fd, char **ret) { if (isempty(s)) { free(s); - return -ENOTSUP; + return -EOPNOTSUPP; } *ret = s; diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 41f7b9f7aa..3158a38001 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -2618,7 +2618,7 @@ static int expand_names(sd_bus *bus, char **names, const char* suffix, char ***r _cleanup_free_ UnitInfo *unit_infos = NULL; if (!bus) - return log_error_errno(ENOTSUP, "Unit name globbing without bus is not implemented."); + return log_error_errno(EOPNOTSUPP, "Unit name globbing without bus is not implemented."); r = get_unit_list(bus, NULL, globs, &unit_infos, 0, &reply); if (r < 0) @@ -2956,7 +2956,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 || IN_SET(r, -ENOTSUP, -EINPROGRESS)) + if (r >= 0 || IN_SET(r, -EOPNOTSUPP, -EINPROGRESS)) return r; } diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c index 97b535f564..909575786a 100644 --- a/src/timedate/timedated.c +++ b/src/timedate/timedated.c @@ -43,7 +43,7 @@ #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n" static BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map timedated_errors[] = { - SD_BUS_ERROR_MAP("org.freedesktop.timedate1.NoNTPSupport", ENOTSUP), + SD_BUS_ERROR_MAP("org.freedesktop.timedate1.NoNTPSupport", EOPNOTSUPP), SD_BUS_ERROR_MAP_END }; diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c index 10c5a63dbf..a0ff76dcf0 100644 --- a/src/tmpfiles/tmpfiles.c +++ b/src/tmpfiles/tmpfiles.c @@ -753,7 +753,7 @@ static int path_set_acls(Item *item, const char *path) { if (r > 0) return -r; /* already warned */ - else if (r == -ENOTSUP) { + else if (r == -EOPNOTSUPP) { log_debug_errno(r, "ACLs not supported by file system at %s", path); return 0; } else if (r < 0) |