Skip to contentSkip to conversation

Remove inclusion of obsolete <linux/config.h>

GIT * David Woodhouse 5 participants 6 messages Jul 11, 2006 – Jul 12, 2006

lore
Share & tools
lore
#0 lore raw

Linus, please pull from git://git.infradead.org/~dwmw2/killconfig.h.git

This removes all inclusion of the obsolete <linux/config.h> and turns that file into a simple #error. I chose to add #error rather than just deleting the file, to make the error message more informative and hopefully prevent too many people from asking "where did config.h go?".

Sam thinks it should be a #warning instead, even though it's been unnecessary to include config.h for about eight months now. If you agree, pull from git://git.infradead.org/~dwmw2/woundconfig.h.git
instead -- that differs from the first in that it turns config.h into a #warning instead.

Please pull one or the other, as you see fit.

Signature · 1 line
dwmw2
#1 lore raw
Quoted 7 lines · David Woodhouse

Linus, please pull from git://git.infradead.org/~dwmw2/killconfig.h.git

Sam thinks it should be a #warning instead, even though it's been unnecessary to include config.h for about eight months now. If you agree, pull from git://git.infradead.org/~dwmw2/woundconfig.h.git
instead -- that differs from the first in that it turns config.h into a #warning instead.

Well, it is probably unnecessary to include config.h for about eight months, but as it is not present in feature-removal-schedule.txt I've missed it. Thanks for pointing it out...

FYI, fortunately (for you, unfortunately for VMware) 2.6.18's already broke our build script due to UTS_RELEASE being moved to separate file, so from VMware's viewpoint killconfig.h.git will not do any additional damage...

Quoted 1 line

Please pull one or the other, as you see fit.

Petr Vandrovec

#2 lore raw
Quoted 3 lines

Well, it is probably unnecessary to include config.h for about eight months, but as it is not present in feature-removal-schedule.txt I've missed it. Thanks for pointing it out...

Obsoleting a header is not a "feature-removal" per se.

Quoted 3 lines

FYI, fortunately (for you, unfortunately for VMware) 2.6.18's already broke our build script due to UTS_RELEASE being moved to separate file, so from VMware's viewpoint killconfig.h.git will not do any additional damage...

#include <linux/config.h>
#ifndef UTS_RELEASE
#include <linux/utsrelease.h>
#endif

Then one can wonder why WMware needs UTS_RELEASE?

Sam

#3 lore raw
Quoted 8 lines · Sam Ravnborg
Quoted 1 line

FYI, fortunately (for you, unfortunately for VMware) 2.6.18's already broke our build script due to UTS_RELEASE being moved to separate file, so from VMware's viewpoint killconfig.h.git will not do any additional damage...

#include <linux/config.h>
#ifndef UTS_RELEASE
#include <linux/utsrelease.h>
#endif

Then one can wonder why WMware needs UTS_RELEASE?

To make sure user is building modules for kernel it is really using. Without this test users were building modules for kernels they have run years ago, and then complained that modules do not fit to running kernel, or that kernel crashes when they do 'insmod -f ...'... So perl wrapper passes linux/version.h through C preprocessor and compares resulting UTS_RELEASE with uname -r, and complains loudly if they do not match.
Petr

#4 lore raw
Quoted 10 lines · Petr Vandrovec
Quoted 9 lines · Sam Ravnborg
Quoted 3 lines

FYI, fortunately (for you, unfortunately for VMware) 2.6.18's already broke our build script due to UTS_RELEASE being moved to separate file, so from VMware's viewpoint killconfig.h.git will not do any additional damage...

#include <linux/config.h>
#ifndef UTS_RELEASE
#include <linux/utsrelease.h>
#endif

Quoted 9 lines
Quoted 1 line

Then one can wonder why WMware needs UTS_RELEASE?

To make sure user is building modules for kernel it is really using. Without this test users were building modules for kernels they have run years ago, and then complained that modules do not fit to running kernel, or that kernel crashes when they do 'insmod -f ...'... So perl wrapper passes linux/version.h through C preprocessor and compares resulting UTS_RELEASE with uname -r, and complains loudly if they do not match.

isn't this exactly what VERMAGIC is for instead?

#5 lore raw
Quoted 4 lines · Arjan van de Ven
Quoted 2 lines · Petr Vandrovec

Sam Ravnborg wrote:

Quoted 8 lines
Quoted 6 lines

To make sure user is building modules for kernel it is really using. Without this test users were building modules for kernels they have run years ago, and then complained that modules do not fit to running kernel, or that kernel crashes when they do 'insmod -f ...'... So perl wrapper passes linux/version.h through C preprocessor and compares resulting UTS_RELEASE with uname -r, and complains loudly if they do not match.

isn't this exactly what VERMAGIC is for instead?

In newer kernels only. We still support 2.2.x kernels, and to find kernel version you have to parse some kernel headers... And unfortunately vermagic mismatch is printed into dmesg only, so it takes several iterations until customer is able to pinpoint problem down (to 586/686 mismatch, for example).
Petr