linux-mips
[Top] [All Lists]

Re: [PATCH] Honor CONFIG_CMDLINE on SiByte

To: Imre Kaloz <kaloz@openwrt.org>
Subject: Re: [PATCH] Honor CONFIG_CMDLINE on SiByte
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 2 Jun 2009 18:59:27 +0100
Cc: linux-mips@linux-mips.org
In-reply-to: <1243945334-5090-1-git-send-email-kaloz@openwrt.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1243945334-5090-1-git-send-email-kaloz@openwrt.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.18 (2008-05-17)
On Tue, Jun 02, 2009 at 02:22:14PM +0200, Imre Kaloz wrote:

> The SiByte platform code doesn't honor the CONFIG_CMDLINE kernel
> option. This patch fixes this issue.
> 
> Signed-off-by: Imre Kaloz <kaloz@openwrt.org>
> ---
>  arch/mips/sibyte/common/cfe.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/mips/sibyte/common/cfe.c b/arch/mips/sibyte/common/cfe.c
> index 3de30f7..97e997e 100644
> --- a/arch/mips/sibyte/common/cfe.c
> +++ b/arch/mips/sibyte/common/cfe.c
> @@ -293,7 +293,11 @@ void __init prom_init(void)
>                        * It's OK for direct boot to not provide a
>                        *  command line
>                        */
> +#ifdef CONFIG_CMDLINE
> +                     strlcpy(arcs_cmdline, CONFIG_CMDLINE, 
> COMMAND_LINE_SIZE);
> +#else
>                       strcpy(arcs_cmdline, "root=/dev/ram0 ");
> +#endif

I rather think the strcpy should go instead.  Hardwiring an option doesn't
seem a good idea.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>