From 8bfc8102be4a9f0d3da936f5b80f2fb4477a558a Mon Sep 17 00:00:00 2001 From: Qiang Huang Date: Wed, 3 Jun 2015 17:26:39 +0800 Subject: [PATCH] Don't check RESOURCE_COUNTERS in new kernel Closes: #13543 Signed-off-by: Qiang Huang --- contrib/check-config.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/contrib/check-config.sh b/contrib/check-config.sh index 1482777f1a..c9932f6d4b 100755 --- a/contrib/check-config.sh +++ b/contrib/check-config.sh @@ -23,6 +23,11 @@ if ! command -v zgrep &> /dev/null; then } fi +kernelVersion="$(uname -r)" +kernelMajor="${kernelVersion%%.*}" +kernelMinor="${kernelVersion#$kernelMajor.}" +kernelMinor="${kernelMinor%%.*}" + is_set() { zgrep "CONFIG_$1=[y|m]" "$CONFIG" > /dev/null } @@ -182,8 +187,12 @@ echo 'Optional Features:' echo " $(wrap_color '(note that cgroup swap accounting is not enabled in your kernel config, you can enable it by setting boot option "swapaccount=1")' bold black)" fi } + +if [ "$kernelMajor" -lt 3 ] || [ "$kernelMajor" -eq 3 -a "$kernelMinor" -le 18 ]; then + check_flags RESOURCE_COUNTERS +fi + flags=( - RESOURCE_COUNTERS BLK_CGROUP IOSCHED_CFQ CGROUP_PERF