bus-util: change Default-chopping to Limit-searching
See https://github.com/systemd/systemd/pull/1534#commitcomment-13744013 Actually, thinking about this, maybe it would be nicer to actually look for "Limit" in the string rather than chopping off a "Default".... Sounds more generic...
This commit is contained in:
@@ -2163,7 +2163,7 @@ int bus_property_get_rlimit(
|
||||
struct rlimit buf = {};
|
||||
int z;
|
||||
|
||||
z = rlimit_from_string(startswith(property, "Default") ? property + 7 : property);
|
||||
z = rlimit_from_string(strstr(property, "Limit"));
|
||||
assert(z >= 0);
|
||||
|
||||
getrlimit(z, &buf);
|
||||
|
||||
Reference in New Issue
Block a user