lkml.org 
[lkml]   [2003]   [Jan]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel param and KBUILD_MODNAME name-munging mess
On Wed, 22 Jan 2003, Mikael Pettersson wrote:

> Ingo Oeser writes:
> > On Mon, Jan 20, 2003 at 02:41:03PM +0100, Mikael Pettersson wrote:
> > > Booting kernel 2.5.59 with the "-s" kernel boot parameter
> > > doesn't get you into single-user mode like it should.
> >
> > Try using "s" instead. This works since ever. I didn't even know,
> > that the other option exists, too.
>
> That's a workaround for this particular case, but the name-munging
> is still wrong and broken.
>
> With "foo-bar=fie-fum" passed to the kernel, "foo_bar=fie-fum" is
> what's put into init's environment. (I checked.)

I agree that the current behavior is unexpected and probably should be
fixed. There's basically two ways:
o Pass KBUILD_MODNAME as a string without munging
o Change the setup code to not alter the command line (either use a
special version of strcmp which knows about "-,_", or work on a
temporary copy)

KBUILD_BASENAME needs to be an un-stringified symbol following
certain conventions to make it possible to use it e.g. in
include/linux/spinlock.h, that's why '-' and ',' are escaped to '_'.

However, for all I can tell, this is not true for KBUILD_MODNAME, since
that seems to be only used for constructing an actual string, which of
course can contain all kinds of characters. So I think using the first
approach would be somewhat nicer, as it gets rid of the unintuitive
"ide-cd" -> "ide_cd" munging on the kernel command line.

Just needs to be done, of course ;)

--Kai


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.081 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site