chiark / gitweb /
taint: add missing cgroups taint flag
[elogind.git] / src / main.c
index b7c24004030ae319cf15aef87733f68c6159fb58..176a4f5ecbbb4be8e9c6712ce32e657bbbf9a35d 100644 (file)
@@ -373,6 +373,7 @@ static int config_parse_level(
                 unsigned line,
                 const char *section,
                 const char *lvalue,
+                int ltype,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
@@ -390,6 +391,7 @@ static int config_parse_target(
                 unsigned line,
                 const char *section,
                 const char *lvalue,
+                int ltype,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
@@ -407,6 +409,7 @@ static int config_parse_color(
                 unsigned line,
                 const char *section,
                 const char *lvalue,
+                int ltype,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
@@ -424,6 +427,7 @@ static int config_parse_location(
                 unsigned line,
                 const char *section,
                 const char *lvalue,
+                int ltype,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
@@ -441,6 +445,7 @@ static int config_parse_cpu_affinity(
                 unsigned line,
                 const char *section,
                 const char *lvalue,
+                int ltype,
                 const char *rvalue,
                 void *data,
                 void *userdata) {
@@ -980,10 +985,26 @@ static void test_usr(void) {
 
         /* Check that /usr is not a separate fs */
 
-        if (dir_is_empty("/usr") > 0)
-                log_warning("/usr appears to be on a different file system than /. This is not supported anymore. "
-                            "Some things will probably break (sometimes even silently) in mysterious ways. "
-                            "Consult http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken for more information.");
+        if (dir_is_empty("/usr") <= 0)
+                return;
+
+        log_warning("/usr appears to be on a different file system than /. This is not supported anymore. "
+                    "Some things will probably break (sometimes even silently) in mysterious ways. "
+                    "Consult http://freedesktop.org/wiki/Software/systemd/separate-usr-is-broken for more information.");
+}
+
+static void test_cgroups(void) {
+
+        if (access("/proc/cgroups", F_OK) >= 0)
+                return;
+
+        log_warning("CONFIG_CGROUPS was not set when your kernel was compiled. "
+                    "Systems without control groups are not supported. "
+                    "We will now sleep for 10s, and then continue boot-up. "
+                    "Expect breakage and please do not file bugs. "
+                    "Instead fix your kernel and enable CONFIG_CGROUPS." );
+
+        sleep(10);
 }
 
 int main(int argc, char *argv[]) {
@@ -1166,6 +1187,7 @@ int main(int argc, char *argv[]) {
 
                 test_mtab();
                 test_usr();
+                test_cgroups();
         }
 
         if ((r = manager_new(arg_running_as, &m)) < 0) {