From: Tejun Heo Date: Mon, 1 Aug 2016 01:38:47 +0000 (-0400) Subject: logind: 0% and 100% should be valid for UserTasksMax (#3836) X-Git-Tag: v231.3~39 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=041046782d16a72e5ff169fc8a41b3ec60fd0d17 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) --- 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 {