From e9eb2c02f0f08dd1d1de57918b277193aa529832 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 7 May 2018 20:26:38 +0200 Subject: basic: split parsing of the OOM score adjust value into its own function in parse-util.c And port config_parse_exec_oom_score_adjust() over to use it. While we are at it, let's also fix config_parse_exec_oom_score_adjust() to accept an empty string for turning off OOM score adjustments set earlier. --- src/basic/parse-util.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/basic/parse-util.h') diff --git a/src/basic/parse-util.h b/src/basic/parse-util.h index 742063c9a4..2b75b938c7 100644 --- a/src/basic/parse-util.h +++ b/src/basic/parse-util.h @@ -118,3 +118,5 @@ int parse_percent(const char *p); int parse_nice(const char *p, int *ret); int parse_ip_port(const char *s, uint16_t *ret); + +int parse_oom_score_adjust(const char *s, int *ret); -- cgit v1.2.1