summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-settings.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-05-07 21:17:09 +0200
committerLennart Poettering <lennart@poettering.net>2018-05-17 20:48:12 +0200
commit81f345dfed63b660ee7b31e0f3737995cf78470f (patch)
treef188263819719e4124697c11cc6dc2639f0050dc /src/nspawn/nspawn-settings.h
parentc818eef1cdce45be65c9298a7d759c3d49c109c7 (diff)
downloadsystemd-81f345dfed63b660ee7b31e0f3737995cf78470f.tar.gz
nspawn: add a new --oom-score-adjust= command line switch
This is primarily useful in order to provide comprehensive OCI runtime compatibility with nspawn, but might have uses outside of it.
Diffstat (limited to 'src/nspawn/nspawn-settings.h')
-rw-r--r--src/nspawn/nspawn-settings.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-settings.h b/src/nspawn/nspawn-settings.h
index 130331ee18..7cf5be625b 100644
--- a/src/nspawn/nspawn-settings.h
+++ b/src/nspawn/nspawn-settings.h
@@ -51,9 +51,10 @@ typedef enum SettingsMask {
SETTING_SYSCALL_FILTER = UINT64_C(1) << 16,
SETTING_HOSTNAME = UINT64_C(1) << 17,
SETTING_NO_NEW_PRIVILEGES = UINT64_C(1) << 18,
- SETTING_RLIMIT_FIRST = UINT64_C(1) << 19, /* we define one bit per resource limit here */
- SETTING_RLIMIT_LAST = UINT64_C(1) << (19 + _RLIMIT_MAX - 1),
- _SETTINGS_MASK_ALL = (UINT64_C(1) << (19 + _RLIMIT_MAX)) - 1
+ SETTING_OOM_SCORE_ADJUST = UINT64_C(1) << 19,
+ SETTING_RLIMIT_FIRST = UINT64_C(1) << 20, /* we define one bit per resource limit here */
+ SETTING_RLIMIT_LAST = UINT64_C(1) << (20 + _RLIMIT_MAX - 1),
+ _SETTINGS_MASK_ALL = (UINT64_C(1) << (20 + _RLIMIT_MAX)) - 1
} SettingsMask;
typedef struct Settings {
@@ -78,6 +79,8 @@ typedef struct Settings {
struct rlimit *rlimit[_RLIMIT_MAX];
char *hostname;
int no_new_privileges;
+ int oom_score_adjust;
+ bool oom_score_adjust_set;
/* [Image] */
int read_only;
@@ -123,3 +126,4 @@ int config_parse_pid2(const char *unit, const char *filename, unsigned line, con
int config_parse_private_users(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_syscall_filter(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
int config_parse_hostname(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);
+int config_parse_oom_score_adjust(const char *unit, const char *filename, unsigned line, const char *section, unsigned section_line, const char *lvalue, int ltype, const char *rvalue, void *data, void *userdata);