1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 02:57:16 +03:00

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:
Evgeny Vereshchagin 2015-10-13 18:45:11 +00:00
parent 400c32ef24
commit f6bcaf4cf6

View File

@ -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);