1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-07 18:27:04 +03:00

machinectl: accept "none" and "infinity" as specifier when dropping quotas using "machinectl set-limit"

Previously, we already accepted "-" as special value for dropping
limits. Add "infinity", as that's what we support for RLIMITs and hence
should support here to. Also add "none" as that's what the btrfs tools
use.
This commit is contained in:
Lennart Poettering 2015-10-21 22:41:31 +02:00
parent 0d4c4b7141
commit 7705a4053d

View File

@ -2382,7 +2382,7 @@ static int set_limit(int argc, char *argv[], void *userdata) {
uint64_t limit;
int r;
if (streq(argv[argc-1], "-"))
if (STR_IN_SET(argv[argc-1], "-", "none", "infinity"))
limit = (uint64_t) -1;
else {
r = parse_size(argv[argc-1], 1024, &limit);