summaryrefslogtreecommitdiffstats
path: root/src/systemctl/systemctl-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-09 16:06:36 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-02-10 14:46:59 +0100
commit7211c853c26554ad1f58c2cfa1d5a0bfc059bf15 (patch)
tree8ec5ffd55875cf64df5df97d7cf10c6449d23fea /src/systemctl/systemctl-util.c
parentReturn -EINVAL from _from_string() functions (diff)
downloadsystemd-7211c853c26554ad1f58c2cfa1d5a0bfc059bf15.tar.xz
systemd-7211c853c26554ad1f58c2cfa1d5a0bfc059bf15.zip
tree-wide: propagate error code from _from_string() functions
Now that we know we have something useful, no need to make an answer up.
Diffstat (limited to 'src/systemctl/systemctl-util.c')
-rw-r--r--src/systemctl/systemctl-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/systemctl/systemctl-util.c b/src/systemctl/systemctl-util.c
index a854107cc8..89c342a0b1 100644
--- a/src/systemctl/systemctl-util.c
+++ b/src/systemctl/systemctl-util.c
@@ -143,7 +143,7 @@ int get_state_one_unit(sd_bus *bus, const char *unit, UnitActiveState *ret_activ
state = unit_active_state_from_string(buf);
if (state < 0)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Invalid unit state '%s' for: %s", buf, unit);
+ return log_error_errno(state, "Invalid unit state '%s' for: %s", buf, unit);
*ret_active_state = state;
return 0;