]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-util: change `Default`-chopping to `Limit`-searching 1560/head
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 13 Oct 2015 18:45:11 +0000 (18:45 +0000)
committerEvgeny Vereshchagin <evvers@ya.ru>
Tue, 13 Oct 2015 18:45:11 +0000 (18:45 +0000)
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...

src/shared/bus-util.c

index 36a29fbdc03f33715adba877c6811dd5628e10e1..65922dd93bcf71399f9cea1a3fa9d31017b22b42 100644 (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);