|
Zbigniew Jędrzejewski-Szmek |
696e2f |
From 821098286ee773662245254c11ada000ab32fa91 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
From: Tejun Heo <htejun@fb.com>
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
Date: Sun, 31 Jul 2016 21:38:47 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
Subject: [PATCH] logind: 0% and 100% should be valid for UserTasksMax (#3836)
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
config_parse_user_tasks_max() was incorrectly accepting percentage value
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
between 1 and 99. Update it to accept 0% and 100%. This brings it in line
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
with TasksMax handling in systemd.
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
(cherry picked from commit cb3e4417590196bd30e1b8097348dca6ba34bd15)
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
---
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
src/login/logind-user.c | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
diff --git a/src/login/logind-user.c b/src/login/logind-user.c
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
index 348e396292..63363035e7 100644
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
--- a/src/login/logind-user.c
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
+++ b/src/login/logind-user.c
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
@@ -893,7 +893,7 @@ int config_parse_user_tasks_max(
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
/* First, try to parse as percentage */
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
r = parse_percent(rvalue);
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
- if (r > 0 && r < 100)
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
+ if (r >= 0)
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
k = system_tasks_max_scale(r, 100U);
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
else {
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
--
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
2.9.0
|
|
Zbigniew Jędrzejewski-Szmek |
696e2f |
|