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: v232~358 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cb3e4417590196bd30e1b8097348dca6ba34bd15;p=thirdparty%2Fsystemd.git 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 systemd. --- diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 348e3962927..63363035e71 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -893,7 +893,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 {