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.
This commit is contained in:
Tejun Heo 2016-07-31 21:38:47 -04:00 committed by Zbigniew Jędrzejewski-Szmek
parent 0d5299ef5a
commit cb3e441759

View file

@ -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 {