Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 22 Jan 2003 12:16:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 22 Jan 2003 12:16:43 -0500 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:51073 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Wed, 22 Jan 2003 12:16:42 -0500 Date: Wed, 22 Jan 2003 11:25:28 -0600 (CST) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: Mikael Pettersson cc: Ingo Oeser , , Subject: Re: kernel param and KBUILD_MODNAME name-munging mess In-Reply-To: <15918.28753.632988.981832@harpo.it.uu.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org 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/