diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2015-03-13 14:08:00 +0100 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2015-03-13 14:10:39 +0100 |
commit | 15411c0cb1192799b37ec8f25d6f30e8d7292fc6 (patch) | |
tree | 003adfa8f694890078b5fb6d901e420c9a966ece /src/core | |
parent | 32a568fb90bf0a22a3007fa670305403a5d0bb72 (diff) |
tree-wide: there is no ENOTSUP on linux
Replace ENOTSUP by EOPNOTSUPP as this is what linux actually uses.
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/bus-policy.c | 2 | ||||
-rw-r--r-- | src/core/job.c | 2 | ||||
-rw-r--r-- | src/core/load-fragment.c | 2 | ||||
-rw-r--r-- | src/core/unit-printf.c | 14 | ||||
-rw-r--r-- | src/core/unit.c | 4 |
5 files changed, 12 insertions, 12 deletions
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); } |