[systemd-commits] configure.ac Makefile.am src/cgroup.c src/mount-setup.c

Lennart Poettering lennart at kemper.freedesktop.org
Mon May 17 14:54:51 PDT 2010


 Makefile.am       |    3 ++-
 configure.ac      |   23 ++++-------------------
 src/cgroup.c      |    2 +-
 src/mount-setup.c |   18 +++++++++---------
 4 files changed, 16 insertions(+), 30 deletions(-)

New commits:
commit 53f7d807bff9c39e9e565ad2fb20f29b4306af40
Author: Lennart Poettering <lennart at poettering.net>
Date:   Mon May 17 23:54:44 2010 +0200

    cgroup: don't require debug cgroup controller anymore, use name hierarchy instead

diff --git a/Makefile.am b/Makefile.am
index f67f22d..65ab133 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -406,7 +406,8 @@ install-data-hook:
 		$(DESTDIR)$(pkgsysconfdir)/system/graphical.target.wants \
 		$(DESTDIR)$(pkgsysconfdir)/session \
 		$(DESTDIR)$(sysconfdir)/xdg/systemd
-	$(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/debug || echo "Don't forget to create /cgroup/debug! Couldn't create it for you, continuing anyway."
+	$(MKDIR_P) -m 0755 $(DESTDIR)/cgroup/systemd || \
+		echo "Don't forget to create /cgroup/systemd! Couldn't create it for you, continuing anyway."
 	( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
 		rm -f session && \
 		$(LN_S) $(pkgsysconfdir)/session session )
diff --git a/configure.ac b/configure.ac
index b562c00..20024e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -104,6 +104,10 @@ PKG_CHECK_MODULES(DBUSGLIB, [ dbus-glib-1 ])
 AC_SUBST(DBUSGLIB_CFLAGS)
 AC_SUBST(DBUSGLIB_LIBS)
 
+PKG_CHECK_MODULES(CGROUP, [ libcgroup >= 0.36 ])
+AC_SUBST(CGROUP_CFLAGS)
+AC_SUBST(CGROUP_LIBS)
+
 have_gtk=no
 AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [disable GTK tools]))
 if test "x$enable_gtk" != "xno"; then
@@ -117,25 +121,6 @@ if test "x$enable_gtk" != "xno"; then
 fi
 AM_CONDITIONAL(HAVE_GTK, [test "$have_gtk" = "yes"])
 
-PKG_CHECK_MODULES( CGROUP, [ libcgroup >= 0.35 ], [], [
-        AC_CHECK_HEADER( [libcgroup.h], [], [AC_MSG_ERROR([*** libcgroup.h not found])], )
-        save_CPPFLAGS="$CPPFLAGS"
-        save_LIBS="$LIBS"
-        CGROUP_LIBS=${CGROUP_LIBS:--lcgroup}
-        LIBS="$LIBS $CGROUP_LIBS"
-        CPPFLAGS="$CPPFLAGS $CGROUP_CFLAGS"
-        AC_MSG_CHECKING([for libcgroup >= 0.35])
-        AC_LINK_IFELSE(
-                [AC_LANG_PROGRAM([[#include <libcgroup.h>]], [[ CGFLAG_DELETE_RECURSIVE; cgroup_init(); ]])],
-                [AC_MSG_RESULT([yes])],
-                [AC_MSG_RESULT([no]); AC_MSG_ERROR([*** systemd needs libcgroup 0.35 or newer])],
-                [${CGROUP_LIBS}])
-        CPPFLAGS="$save_CPPFLAGS"
-        LIBS="$save_LIBS"
-])
-AC_SUBST(CGROUP_CFLAGS)
-AC_SUBST(CGROUP_LIBS)
-
 AM_PROG_VALAC([0.8])
 AC_SUBST(VAPIDIR)
 
diff --git a/src/cgroup.c b/src/cgroup.c
index 301fc94..56529eb 100644
--- a/src/cgroup.c
+++ b/src/cgroup.c
@@ -422,7 +422,7 @@ int manager_setup_cgroup(Manager *m) {
         }
 
         free(m->cgroup_controller);
-        if (!(m->cgroup_controller = strdup("debug")))
+        if (!(m->cgroup_controller = strdup("name=systemd")))
                 return -ENOMEM;
 
         if ((r = cgroup_get_subsys_mount_point(m->cgroup_controller, &mp)))
diff --git a/src/mount-setup.c b/src/mount-setup.c
index cb91e18..e4f2b73 100644
--- a/src/mount-setup.c
+++ b/src/mount-setup.c
@@ -42,15 +42,15 @@ typedef struct MountPoint {
 } MountPoint;
 
 static const MountPoint mount_table[] = {
-        { "proc",        "/proc",                    "proc",        NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
-        { "sysfs",       "/sys",                     "sysfs",       NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
-        { "devtmps",     "/dev",                     "devtmpfs",    "mode=755",  MS_NOSUID,                    true },
-        { "tmpfs",       "/dev/shm",                 "tmpfs",       "mode=1777", MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
-        { "devpts",      "/dev/pts",                 "devpts",      NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
-        { "cgroup",      "/cgroup/debug",            "cgroup",      "debug",     MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
-        { "debugfs",     "/sys/kernel/debug",        "debugfs",     NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
-        { "binfmt_misc", "/proc/sys/fs/binfmt_misc", "binfmt_misc", NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
-        { "mqueue",      "/dev/mqueue",              "mqueue",      NULL,        MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+        { "proc",        "/proc",                    "proc",        NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+        { "sysfs",       "/sys",                     "sysfs",       NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+        { "devtmps",     "/dev",                     "devtmpfs",    "mode=755",          MS_NOSUID,                    true },
+        { "tmpfs",       "/dev/shm",                 "tmpfs",       "mode=1777",         MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+        { "devpts",      "/dev/pts",                 "devpts",      NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+        { "cgroup",      "/cgroup/systemd",          "cgroup",      "none,name=systemd", MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
+        { "debugfs",     "/sys/kernel/debug",        "debugfs",     NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+        { "binfmt_misc", "/proc/sys/fs/binfmt_misc", "binfmt_misc", NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
+        { "mqueue",      "/dev/mqueue",              "mqueue",      NULL,                MS_NOSUID|MS_NOEXEC|MS_NODEV, false },
 };
 
 bool mount_point_is_api(const char *path) {


More information about the systemd-commits mailing list