]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/nspawn/nspawn-settings.h
tree-wide: drop missing.h from headers and use relevant missing_*.h
[thirdparty/systemd.git] / src / nspawn / nspawn-settings.h
index 69fce584a9fe0bac6c3c2e35c3a22ecf58812364..a63aa32e909c247c40882b626b8764c3dc3110bf 100644 (file)
@@ -1,12 +1,6 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 #pragma once
 
-/***
-  This file is part of systemd.
-
-  Copyright 2015 Lennart Poettering
-***/
-
 #include <sched.h>
 #include <stdio.h>
 
@@ -14,6 +8,7 @@
 
 #include "conf-parser.h"
 #include "macro.h"
+#include "missing_resource.h"
 #include "nspawn-expose-ports.h"
 #include "nspawn-mount.h"
 
@@ -54,6 +49,17 @@ typedef enum LinkJournal {
         _LINK_JOURNAL_INVALID = -1
 } LinkJournal;
 
+typedef enum TimezoneMode {
+        TIMEZONE_OFF,
+        TIMEZONE_COPY,
+        TIMEZONE_BIND,
+        TIMEZONE_SYMLINK,
+        TIMEZONE_DELETE,
+        TIMEZONE_AUTO,
+        _TIMEZONE_MODE_MAX,
+        _TIMEZONE_MODE_INVALID = -1
+} TimezoneMode;
+
 typedef enum SettingsMask {
         SETTING_START_MODE        = UINT64_C(1) << 0,
         SETTING_ENVIRONMENT       = UINT64_C(1) << 1,
@@ -78,10 +84,12 @@ typedef enum SettingsMask {
         SETTING_CPU_AFFINITY      = UINT64_C(1) << 20,
         SETTING_RESOLV_CONF       = UINT64_C(1) << 21,
         SETTING_LINK_JOURNAL      = UINT64_C(1) << 22,
-        SETTING_RLIMIT_FIRST      = UINT64_C(1) << 23, /* we define one bit per resource limit here */
-        SETTING_RLIMIT_LAST       = UINT64_C(1) << (23 + _RLIMIT_MAX - 1),
-        _SETTINGS_MASK_ALL        = (UINT64_C(1) << (23 + _RLIMIT_MAX)) - 1,
-        _FORCE_ENUM_WIDTH         = UINT64_MAX
+        SETTING_TIMEZONE          = UINT64_C(1) << 23,
+        SETTING_EPHEMERAL         = UINT64_C(1) << 24,
+        SETTING_RLIMIT_FIRST      = UINT64_C(1) << 25, /* we define one bit per resource limit here */
+        SETTING_RLIMIT_LAST       = UINT64_C(1) << (25 + _RLIMIT_MAX - 1),
+        _SETTINGS_MASK_ALL        = (UINT64_C(1) << (25 + _RLIMIT_MAX)) -1,
+        _SETTING_FORCE_ENUM_WIDTH = UINT64_MAX
 } SettingsMask;
 
 /* We want to use SETTING_RLIMIT_FIRST in shifts, so make sure it is really 64 bits
@@ -96,6 +104,7 @@ assert_cc(sizeof(SETTING_RLIMIT_LAST) == 8);
 typedef struct Settings {
         /* [Run] */
         StartMode start_mode;
+        bool ephemeral;
         char **parameters;
         char **environment;
         char *user;
@@ -122,6 +131,7 @@ typedef struct Settings {
         ResolvConfMode resolv_conf;
         LinkJournal link_journal;
         bool link_journal_try;
+        TimezoneMode timezone;
 
         /* [Image] */
         int read_only;
@@ -171,8 +181,12 @@ CONFIG_PARSER_PROTOTYPE(config_parse_oom_score_adjust);
 CONFIG_PARSER_PROTOTYPE(config_parse_cpu_affinity);
 CONFIG_PARSER_PROTOTYPE(config_parse_resolv_conf);
 CONFIG_PARSER_PROTOTYPE(config_parse_link_journal);
+CONFIG_PARSER_PROTOTYPE(config_parse_timezone);
 
 const char *resolv_conf_mode_to_string(ResolvConfMode a) _const_;
 ResolvConfMode resolv_conf_mode_from_string(const char *s) _pure_;
 
+const char *timezone_mode_to_string(TimezoneMode a) _const_;
+TimezoneMode timezone_mode_from_string(const char *s) _pure_;
+
 int parse_link_journal(const char *s, LinkJournal *ret_mode, bool *ret_try);