Very cool idea, only it doesn't compile for me. Am I doing something
silly?
with pre3 I have problems with the __setup macros which I looked into
but looking at the processor output, couldn't figure out what was
wrong (I couldn't find docs on the __attribute_ magic):
[root:11] caffeine:/usr/src/linux-2.3.x# make
gcc -D__KERNEL__ -I/usr/src/linux-2.3.x/include -Wall -Wstrict-prototypes -O2 -f omit-frame-pointer -pipe -fno-strength-reduce -DCPU=686 -c -o init/main.o init/main.c
In file included from init/main.c:29:
/usr/src/linux-2.3.x/include/asm/bugs.h:32: parse error before `char'
/usr/src/linux-2.3.x/include/asm/bugs.h:32: parse error before `struct'
/usr/src/linux-2.3.x/include/asm/bugs.h:40: parse error before `char'
/usr/src/linux-2.3.x/include/asm/bugs.h:40: parse error before `struct'
/usr/src/linux-2.3.x/include/asm/bugs.h:49: parse error before `char'
/usr/src/linux-2.3.x/include/asm/bugs.h:49: parse error before `struct'
init/main.c:141: parse error before `char'
init/main.c:141: parse error before `struct'
init/main.c:237: parse error before `char'
init/main.c:237: parse error before `struct'
init/main.c:331: parse error before `char'
init/main.c:331: parse error before `struct'
init/main.c:332: parse error before `char'
init/main.c:332: parse error before `struct'
init/main.c:333: parse error before `char'
init/main.c:333: parse error before `struct'
/usr/src/linux-2.3.x/include/asm/bugs.h:27: warning: `no_halt' defined but not used
/usr/src/linux-2.3.x/include/asm/bugs.h:35: warning: `mca_pentium' defined but not used
/usr/src/linux-2.3.x/include/asm/bugs.h:43: warning: `no_387' defined but not used
init/main.c:136: warning: `profile_setup' defined but not used
init/main.c:232: warning: `root_dev_setup' defined but not used
init/main.c:308: warning: `readonly' defined but not used
init/main.c:316: warning: `readwrite' defined but not used
init/main.c:324: warning: `debug_kernel' defined but not used
make: *** [init/main.o] Error 1
[root:11] caffeine:/usr/src/linux-2.3.x# gcc --version
2.7.2.3
The preprocessor for this output is:
static __attribute__ ((__section__ (".data.init"))) char
__setup_str_no_halt [] = "no-hlt" ; static __attribute__
((unused,__section__ (".setup.init"))) struct kernel_param
__setup_no_halt = { __setup_str_no_halt , no_halt } ;
-cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/