From: Lennart Poettering Date: Wed, 28 Jul 2021 16:22:00 +0000 (+0200) Subject: Revert "Make oom_score_adjust_is_valid() static" X-Git-Tag: v250-rc1~904^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4412d4d33fcad06728ac02f3e673ac1081b5931;p=thirdparty%2Fsystemd.git Revert "Make oom_score_adjust_is_valid() static" This reverts commit 6bf3c6c9007ca87376d5dff1e029186a38736cdc. --- diff --git a/src/basic/process-util.c b/src/basic/process-util.c index ce4bfb783da..ecb14306f8b 100644 --- a/src/basic/process-util.c +++ b/src/basic/process-util.c @@ -1037,6 +1037,10 @@ bool is_main_thread(void) { return cached > 0; } +bool oom_score_adjust_is_valid(int oa) { + return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX; +} + unsigned long personality_from_string(const char *p) { int architecture; diff --git a/src/basic/process-util.h b/src/basic/process-util.h index a591fc32a4a..c9536495023 100644 --- a/src/basic/process-util.h +++ b/src/basic/process-util.h @@ -82,6 +82,8 @@ int pid_from_same_root_fs(pid_t pid); bool is_main_thread(void); +bool oom_score_adjust_is_valid(int oa); + #ifndef PERSONALITY_INVALID /* personality(7) documents that 0xffffffffUL is used for querying the * current personality, hence let's use that here as error diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c index f7784bb73dc..f6783e924ab 100644 --- a/src/core/dbus-execute.c +++ b/src/core/dbus-execute.c @@ -1,6 +1,5 @@ /* SPDX-License-Identifier: LGPL-2.1-or-later */ -#include #include #include @@ -95,10 +94,6 @@ static int property_get_environment_files( return sd_bus_message_close_container(reply); } -static bool oom_score_adjust_is_valid(int oa) { - return oa >= OOM_SCORE_ADJ_MIN && oa <= OOM_SCORE_ADJ_MAX; -} - static int property_get_oom_score_adjust( sd_bus *bus, const char *path,