chiark / gitweb /
locale: unset locale vars that are not set any longer
[elogind.git] / src / load-fragment.c
index 103e0569616273b54618c0728a5ae70d3a4e8183..1190ef4accf50dd3645c91bd82a3193b11257c04 100644 (file)
@@ -42,8 +42,6 @@
 #include "unit-name.h"
 #include "bus-errors.h"
 
-#define COMMENTS "#;\n"
-
 static int config_parse_deps(
                 const char *filename,
                 unsigned line,
@@ -299,7 +297,7 @@ static int config_parse_nice(
         return 0;
 }
 
-static int config_parse_oom_adjust(
+static int config_parse_oom_score_adjust(
                 const char *filename,
                 unsigned line,
                 const char *section,
@@ -317,17 +315,17 @@ static int config_parse_oom_adjust(
         assert(data);
 
         if ((r = safe_atoi(rvalue, &oa)) < 0) {
-                log_error("[%s:%u] Failed to parse OOM adjust value, ignoring: %s", filename, line, rvalue);
+                log_error("[%s:%u] Failed to parse the OOM score adjust value, ignoring: %s", filename, line, rvalue);
                 return 0;
         }
 
-        if (oa < OOM_DISABLE || oa > OOM_ADJUST_MAX) {
-                log_error("[%s:%u] OOM adjust value out of range, ignoring: %s", filename, line, rvalue);
+        if (oa < OOM_SCORE_ADJ_MIN || oa > OOM_SCORE_ADJ_MAX) {
+                log_error("[%s:%u] OOM score adjust value out of range, ignoring: %s", filename, line, rvalue);
                 return 0;
         }
 
-        c->oom_adjust = oa;
-        c->oom_adjust_set = true;
+        c->oom_score_adjust = oa;
+        c->oom_score_adjust_set = true;
 
         return 0;
 }
@@ -1425,7 +1423,7 @@ static void dump_items(FILE *f, const ConfigItem *items) {
                 { config_parse_path,             "PATH" },
                 { config_parse_strv,             "STRING [...]" },
                 { config_parse_nice,             "NICE" },
-                { config_parse_oom_adjust,       "OOMADJUST" },
+                { config_parse_oom_score_adjust, "OOMSCOREADJUST" },
                 { config_parse_io_class,         "IOCLASS" },
                 { config_parse_io_priority,      "IOPRIORITY" },
                 { config_parse_cpu_sched_policy, "CPUSCHEDPOLICY" },
@@ -1515,7 +1513,7 @@ static int load_from_path(Unit *u, const char *path) {
                 { "Group",                  config_parse_string_printf,   &(context).group,                                section   }, \
                 { "SupplementaryGroups",    config_parse_strv,            &(context).supplementary_groups,                 section   }, \
                 { "Nice",                   config_parse_nice,            &(context),                                      section   }, \
-                { "OOMAdjust",              config_parse_oom_adjust,      &(context),                                      section   }, \
+                { "OOMScoreAdjust",         config_parse_oom_score_adjust,&(context),                                      section   }, \
                 { "IOSchedulingClass",      config_parse_io_class,        &(context),                                      section   }, \
                 { "IOSchedulingPriority",   config_parse_io_priority,     &(context),                                      section   }, \
                 { "CPUSchedulingPolicy",    config_parse_cpu_sched_policy,&(context),                                      section   }, \
@@ -1580,6 +1578,7 @@ static int load_from_path(Unit *u, const char *path) {
                 { "StopWhenUnneeded",       config_parse_bool,            &u->meta.stop_when_unneeded,                     "Unit"    },
                 { "RefuseManualStart",      config_parse_bool,            &u->meta.refuse_manual_start,                    "Unit"    },
                 { "RefuseManualStop",       config_parse_bool,            &u->meta.refuse_manual_stop,                     "Unit"    },
+                { "AllowIsolate",           config_parse_bool,            &u->meta.allow_isolate,                          "Unit"    },
                 { "DefaultDependencies",    config_parse_bool,            &u->meta.default_dependencies,                   "Unit"    },
                 { "IgnoreDependencyFailure",config_parse_bool,            &u->meta.ignore_dependency_failure,              "Unit"    },
                 { "JobTimeoutSec",          config_parse_usec,            &u->meta.job_timeout,                            "Unit"    },