diff options
author | Tejun Heo <htejun@fb.com> | 2016-07-31 21:38:47 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-07-31 21:38:47 -0400 |
commit | cb3e4417590196bd30e1b8097348dca6ba34bd15 (patch) | |
tree | 8da48d958d5feda3acf909654e77769f296d9cd9 | |
parent | 0d5299ef5a5bedb8921275741d6cbdcc04d69286 (diff) |
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.
-rw-r--r-- | src/login/logind-user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/login/logind-user.c b/src/login/logind-user.c index 348e396292..63363035e7 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 { |