]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
build.h: include default cgroup hierarchy setting in --version output
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 19 Feb 2017 04:28:01 +0000 (23:28 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 20 Feb 2017 17:45:50 +0000 (12:45 -0500)
This is pretty important, and we print this string during startup, so putting
the default hierarchy information might help with diagnosis if things go awry.

$ ./systemctl --version
systemd 232
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN default-hierarchy=legacy

v2: make the message nicer by including the ./configure option argument
directly in output

configure.ac
src/basic/build.h

index 66ecde1a2238fbc3826fe9b87e5210f8b4471acc..f671d7e1b528151f9c0b4202a287f2907c773ed9 100644 (file)
@@ -626,6 +626,8 @@ AS_CASE("$DEFAULT_HIERARCHY",
         [unified], [mode=CGROUP_UNIFIED_ALL],
         AC_MSG_ERROR(Bad default hierarchy mode ${DEFAULT_HIERARCHY}))
 AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY, [$mode], [Default cgroup hierarchy])
+AC_DEFINE_UNQUOTED(DEFAULT_HIERARCHY_NAME, ["$DEFAULT_HIERARCHY"],
+                                           [Default cgroup hierarchy as string])
 
 # ------------------------------------------------------------------------------
 have_xz=no
index 633c2aaccb58bcdb72ab162733da18b60a77ba4c..91312bd2a3cb89692b781314b6799f22253c3134 100644 (file)
 #define _IDN_FEATURE_ "-IDN"
 #endif
 
+#define _CGROUP_HIEARCHY_ "default-hierarchy=" DEFAULT_HIERARCHY_NAME
+
 #define SYSTEMD_FEATURES                                                \
         _PAM_FEATURE_ " "                                               \
         _AUDIT_FEATURE_ " "                                             \
         _BLKID_FEATURE_ " "                                             \
         _ELFUTILS_FEATURE_ " "                                          \
         _KMOD_FEATURE_ " "                                              \
-        _IDN_FEATURE_
+        _IDN_FEATURE_ " "                                               \
+        _CGROUP_HIEARCHY_