lkml.org 
[lkml]   [2004]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] CONFIG_CMDLINE broken on ppc
On Wed, Sep 08, 2004 at 04:03:23PM +0200, Olaf Hering wrote:
> On Wed, Sep 08, Tom Rini wrote:
>
> > On Wed, Sep 08, 2004 at 03:40:28PM +0200, Olaf Hering wrote:
> >
> > > CONFIG_CMDLINE can not work on ppc.
> > > machine_init() copies the string to cmd_line, then platform_init() is
> > > called. It truncates the string to length zero.
> >
> > This has come up before, actually. What happens if CMDLINE isn't set,
> > and we don't terminate cmd_line here? It's part of the BSS and is
> > zero'd out anyways?
>
> strlcpy generates a null-terminated string, if size != 0. Looks like
> that line can go.

... but strlcpy might not be called if no one passes a commandline.
Hence, is this part of the bss and already zeroed ? If yes, then just
remove the line.

> Or move it at the start of machine_init().

Or always define CMDLINE, ala the ADVANCED_OPTIONS || defaults, no #if's
that way :)

--
Tom Rini
http://gate.crashing.org/~trini/
-
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 14:06    [W:0.045 / U:0.800 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site