diff options
author | Anita Zhang <the.anitazha@gmail.com> | 2021-02-02 14:16:03 -0800 |
---|---|---|
committer | Anita Zhang <the.anitazha@gmail.com> | 2021-02-02 17:52:48 -0800 |
commit | 0a9f93443be9e04fa77317bc5e28742b433277c6 (patch) | |
tree | 9b17a938938730ac1035f57f4d4ff8e09e5db5a9 /src/shared/bus-get-properties.c | |
parent | 94a8e2d6db689b0349091829e809e751fff9b812 (diff) | |
download | systemd-0a9f93443be9e04fa77317bc5e28742b433277c6.tar.gz |
oom: rework *MemoryPressureLimit= properties to have 1/10000 precision
Requested in
https://github.com/systemd/systemd/pull/15206#discussion_r505506657,
preserve the full granularity for memory pressure limits (permyriad)
instead of capping out at percent.
Diffstat (limited to 'src/shared/bus-get-properties.c')
-rw-r--r-- | src/shared/bus-get-properties.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c index 32f68d5e6a..a5ce7ef17f 100644 --- a/src/shared/bus-get-properties.c +++ b/src/shared/bus-get-properties.c @@ -55,23 +55,6 @@ int bus_property_get_id128( return sd_bus_message_append_array(reply, 'y', id->bytes, 16); } -int bus_property_get_percent( - sd_bus *bus, - const char *path, - const char *interface, - const char *property, - sd_bus_message *reply, - void *userdata, - sd_bus_error *error) { - - char pstr[DECIMAL_STR_MAX(int) + 2]; - int p = *(int*) userdata; - - xsprintf(pstr, "%d%%", p); - - return sd_bus_message_append_basic(reply, 's', pstr); -} - #if __SIZEOF_SIZE_T__ != 8 int bus_property_get_size( sd_bus *bus, |