summaryrefslogtreecommitdiff
path: root/src/systemctl
diff options
context:
space:
mode:
authorFrantisek Sumsal <frantisek@sumsal.cz>2020-10-09 14:59:44 +0200
committerFrantisek Sumsal <frantisek@sumsal.cz>2020-10-09 15:02:23 +0200
commitd7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd (patch)
treef519b20cb0835f71bd553abeca761882cad3299b /src/systemctl
parent44e66de0f25e65d5bd8b2f7f848e0fc7b98199ed (diff)
downloadsystemd-d7a0f1f4f9910a1a2d290e31b2ba8cfa7126fbdd.tar.gz
tree-wide: assorted coccinelle fixes
Diffstat (limited to 'src/systemctl')
-rw-r--r--src/systemctl/systemctl-logind.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/systemctl/systemctl-logind.c b/src/systemctl/systemctl-logind.c
index cf28ea7d1c..20486c968e 100644
--- a/src/systemctl/systemctl-logind.c
+++ b/src/systemctl/systemctl-logind.c
@@ -187,11 +187,10 @@ int logind_check_inhibitors(enum action a) {
if (c <= 0)
return 0;
- log_error("Please retry operation after closing inhibitors and logging out other users.\n"
- "Alternatively, ignore inhibitors and users with 'systemctl %s -i'.",
- action_table[a].verb);
-
- return -EPERM;
+ return log_error_errno(SYNTHETIC_ERRNO(EPERM),
+ "Please retry operation after closing inhibitors and logging out other users.\n"
+ "Alternatively, ignore inhibitors and users with 'systemctl %s -i'.",
+ action_table[a].verb);
#else
return 0;
#endif