2003-08-14 13:56:23

by jurriaan

[permalink] [raw]
Subject: 2.6.0-test3-mm1 /proc/ikconfig/config adds space after numbers

2.6.0-test3-mm1:
After every number in /proc/ikconfig/config there's an extra space.

This leads to messages like

.config:244: symbol value '1 ' invalid for
SCSI_SYM53C8XX_DMA_ADDRESSING_MODE

and lots more.

Kind regards,
Jurriaan
--
Genius untempered by ethics is a deadly commodity.
Iain Irvine - A Shadow on the Glass
Debian (Unstable) GNU/Linux 2.6.0-test3-mm1 4276 bogomips load av: 1.14 1.11 1.09


2003-08-14 15:59:59

by Randy.Dunlap

[permalink] [raw]
Subject: Re: 2.6.0-test3-mm1 /proc/ikconfig/config adds space after numbers

On Thu, 14 Aug 2003 15:56:09 +0200 Jurriaan <[email protected]> wrote:

| 2.6.0-test3-mm1:
| After every number in /proc/ikconfig/config there's an extra space.
|
| This leads to messages like
|
| .config:244: symbol value '1 ' invalid for
| SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
|
| and lots more.

Yes, I've seen that and I have a patch for it somewhere.
I'll dig it up and post it.

Thanks,
--
~Randy

2003-08-14 16:42:58

by Randy.Dunlap

[permalink] [raw]
Subject: Re: 2.6.0-test3-mm1 /proc/ikconfig/config adds space after numbers

On Thu, 14 Aug 2003 15:56:09 +0200 Jurriaan <[email protected]> wrote:

| 2.6.0-test3-mm1:
| After every number in /proc/ikconfig/config there's an extra space.
|
| This leads to messages like
|
| .config:244: symbol value '1 ' invalid for
| SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
|
| and lots more.

Hi,

Here's the complete patch that needs to be added to 2.6.0-test3-bk-current.
It contains 3 fixes as described in the patch metadata.

Linus, please apply to bk-current.

Thanks,
--
~Randy


patch_name: ikconfig_260t3_update.patch
patch_version: 2003-08-14.09:38:17
author: Randy.Dunlap <[email protected]>
description: fix space at end of line in config files;
add error check on put_user();
(Daniele Bellucci <[email protected]>)
add missing Kconfig piece for ikconfig;
product: Linux
product_versions: 260-814
URL: http://developer.osdl.org/rddunlap/patches/ikconfig/ikconfig_260t3_update.patch
maintainer: [email protected]
diffstat: =
init/Kconfig | 25 +++++++++++++++++++++++++
kernel/configs.c | 3 ++-
scripts/mkconfigs | 4 ++--
3 files changed, 29 insertions(+), 3 deletions(-)


diff -Naurp ./scripts/mkconfigs~ikc ./scripts/mkconfigs
--- ./scripts/mkconfigs~ikc 2003-08-14 09:27:13.000000000 -0700
+++ ./scripts/mkconfigs 2003-08-14 09:33:29.000000000 -0700
@@ -76,6 +76,6 @@ echo "#else"
echo "static char *ikconfig_config __initdata __attribute__((unused)) = "
echo "#endif"
echo "\"CONFIG_BEGIN=n\\n\\"
-echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0, "\\\\n\\\\" }' `"
-echo "CONFIG_END=n\";"
+echo "`cat $config | sed 's/\"/\\\\\"/g' | grep "^#\? \?CONFIG_" | awk '{ print $0 "\\\\n\\\\" }' `"
+echo "CONFIG_END=n\\n\";"
echo "#endif /* _IKCONFIG_H */"
diff -Naurp ./kernel/configs.c~ikc ./kernel/configs.c
--- ./kernel/configs.c~ikc 2003-08-14 09:27:18.000000000 -0700
+++ ./kernel/configs.c 2003-08-14 09:37:04.000000000 -0700
@@ -64,7 +64,8 @@ ikconfig_output_current(struct file *fil
limit = (ikconfig_current_size > len) ? len : ikconfig_current_size;
for (i = file->f_pos, cnt = 0;
i < ikconfig_current_size && cnt < limit; i++, cnt++) {
- put_user(ikconfig_config[i], buf + cnt);
+ if (put_user(ikconfig_config[i], buf + cnt))
+ return -EFAULT;
}
file->f_pos = i;
return cnt;
diff -Naurp ./init/Kconfig~ikc ./init/Kconfig
--- ./init/Kconfig~ikc 2003-08-14 09:27:44.000000000 -0700
+++ ./init/Kconfig 2003-08-14 09:35:45.000000000 -0700
@@ -109,6 +109,31 @@ config LOG_BUF_SHIFT
13 => 8 KB
12 => 4 KB

+config IKCONFIG
+ bool "Kernel .config support"
+ ---help---
+ This option enables the complete Linux kernel ".config" file
+ contents, information on compiler used to build the kernel,
+ kernel running when this kernel was built and kernel version
+ from Makefile to be saved in kernel. It provides documentation
+ of which kernel options are used in a running kernel or in an
+ on-disk kernel. This information can be extracted from the kernel
+ image file with the script scripts/extract-ikconfig and used as
+ input to rebuild the current kernel or to build another kernel.
+ It can also be extracted from a running kernel by reading
+ /proc/ikconfig/config and /proc/ikconfig/built_with, if enabled.
+ /proc/ikconfig/config will list the configuration that was used
+ to build the kernel and /proc/ikconfig/built_with will list
+ information on the compiler and host machine that was used to
+ build the kernel.
+
+config IKCONFIG_PROC
+ bool "Enable access to .config through /proc/ikconfig"
+ depends on IKCONFIG
+ ---help---
+ This option enables access to kernel configuration file and build
+ information through /proc/ikconfig.
+

menuconfig EMBEDDED
bool "Remove kernel features (for embedded systems)"