summaryrefslogtreecommitdiff
path: root/scripts/mkconfigs
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-09-09 10:19:11 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-09-09 10:19:11 -0700
commitf261ecb2f4e62a0d02925a4e549a2fe5dad503d8 (patch)
tree43292be369289f9ade3c935b7e60493ebdca0ca8 /scripts/mkconfigs
parentf5347e3042812699f550b30e81f0e3f96b401925 (diff)
[PATCH] Move ikconfig to /proc/config.gz
From: "Randy.Dunlap" <randy.dunlap@verizon.net> The SuSE kernels place their ikconfig info at /proc/config.gz: in a different place, and compressed. We thought it was a good idea to do it that way in 2.6 as well. - gzip the /proc config file, put it in /proc/config.gz; - Based on a SuSE patch by Oliver Xymoron <oxymoron@waste.org>, which was derived from a patch by Nicholas Leon <nicholas@binary9.net> - change /proc/ikconfig/built_with to /proc/config_build_info; - cleanup ikconfig init/exit entry points (static, __init, __exit); - Makefile help from Sam Ravnborg; DESC ikconfig cleanup EDESC From: Stephen Hemminger <shemminger@osdl.org> Simplify and cleanup the code: - use single interface to seq_file where possible - don't need to do as much of the /proc interface, only read - use copy_to_user to avoid char at a time copy - remove unneccesary globals - use const char[] rather than const char * where possible. Didn't change the version since interface doesn't change.
Diffstat (limited to 'scripts/mkconfigs')
-rwxr-xr-xscripts/mkconfigs10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/mkconfigs b/scripts/mkconfigs
index 7d5a6c214f1e..fc9c3dd978bc 100755
--- a/scripts/mkconfigs
+++ b/scripts/mkconfigs
@@ -66,15 +66,13 @@ echo \
*
*/"
-echo "static char *ikconfig_built_with ="
+echo "#ifdef CONFIG_IKCONFIG_PROC"
+echo "static char const ikconfig_build_info[] ="
echo " \"`uname -s` `uname -r` `uname -v` `uname -m`\";"
+echo "#endif"
echo
kernel_version $makefile
-echo "#ifdef CONFIG_IKCONFIG_PROC"
-echo "static char *ikconfig_config = "
-echo "#else"
-echo "static char *ikconfig_config __initdata __attribute__((unused)) = "
-echo "#endif"
+echo "static char const ikconfig_config[] __attribute__((unused)) = "
echo "\"CONFIG_BEGIN=n\\n\\"
echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `"
echo "CONFIG_END=n\\n\";"