|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
From 8eede524d4ec1806554982b67ccfc155fbeb272a Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
Date: Wed, 18 Apr 2018 19:50:07 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
Subject: [PATCH] core: fix resetting of Delegate= and properly ignore invalid
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
assignment
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
The default is false not true. If we say "ignoring" we must return 0.
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
(cherry picked from commit ff1b8455c26b560641d476b426209e297209333a)
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
src/core/load-fragment.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
index 5b30c47e83..f1b9b65d1a 100644
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
--- a/src/core/load-fragment.c
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
+++ b/src/core/load-fragment.c
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
@@ -3440,7 +3440,7 @@ int config_parse_delegate(
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
* mask to delegate. */
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
if (isempty(rvalue)) {
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
- c->delegate = true;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
+ c->delegate = false;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
c->delegate_controllers = 0;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
@@ -3461,7 +3461,7 @@ int config_parse_delegate(
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
if (r < 0) {
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
log_syntax(unit, LOG_ERR, filename, line, r, "Invalid syntax, ignoring: %s", rvalue);
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
- return r;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
+ return 0;
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
|
|
Zbigniew Jędrzejewski-Szmek |
bb3fb8 |
cc = cgroup_controller_from_string(word);
|