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

Make oom_score_adjust_is_valid() static

It has only one user and we don't need to put it in basic/.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2021-07-23 11:06:13 +02:00
parent 9c46228b7d
commit 6bf3c6c900
3 changed files with 5 additions and 6 deletions

View File

@ -1061,10 +1061,6 @@ _noreturn_ void freeze(void) {
pause();
}
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;

View File

@ -84,8 +84,6 @@ bool is_main_thread(void);
_noreturn_ void freeze(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

View File

@ -1,5 +1,6 @@
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <linux/oom.h>
#include <sys/mount.h>
#include <sys/prctl.h>
@ -94,6 +95,10 @@ 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,