From 041046782d16a72e5ff169fc8a41b3ec60fd0d17 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Sun, 31 Jul 2016 21:38:47 -0400 Subject: [PATCH] logind: 0% and 100% should be valid for UserTasksMax (#3836) config_parse_user_tasks_max() was incorrectly accepting percentage value between 1 and 99. Update it to accept 0% and 100%. This brings it in line with TasksMax handling in elogind. (cherry picked from commit cb3e4417590196bd30e1b8097348dca6ba34bd15) --- src/login/logind-user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 5c2d9a57c..f24dd618f 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -936,7 +936,7 @@ int config_parse_user_tasks_max( /* First, try to parse as percentage */ r = parse_percent(rvalue); - if (r > 0 && r < 100) + if (r >= 0) k = system_tasks_max_scale(r, 100U); else { -- 2.30.2