mirror of
https://github.com/systemd/systemd.git
synced 2026-08-08 17:10:55 +00: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user