[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vdz6J_zx28LMtDvM7HDVOSsTU6pkXtyWoWSobM8MqMxJw@mail.gmail.com>
Date: Fri, 28 Feb 2025 20:59:29 +0200
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Adam Simonelli <adamsimonelli@...il.com>
Cc: Petr Mladek <pmladek@...e.com>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, Jiri Slaby <jirislaby@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Steven Rostedt <rostedt@...dmis.org>,
John Ogness <john.ogness@...utronix.de>, Sergey Senozhatsky <senozhatsky@...omium.org>
Subject: Re: [PATCH v5 1/2] ttynull: Add an option to allow ttynull to be used
as a console device
On Fri, Feb 28, 2025 at 6:39 AM Adam Simonelli <adamsimonelli@...il.com> wrote:
>
> On Wednesday, February 26, 2025 2:22:20 PM EST Andy Shevchenko wrote:
> > On Wed, Feb 26, 2025 at 3:39 PM Adam Simonelli <adamsimonelli@...il.com> wrote:
...
> > Just a side note: strstr() is fragile as theoretically "console=" can
> > be part of an argument unrelated to the console, like
> > foo="bar,baz,console=10,key=value". Although I haven't checked if this
> > is allowed by cmdline parser (lib/cmdline.c).
> >
> Dang, good call. As a crude test, console=ttynull= results in a panic, so it
> does look like it allows ='s in parameter values, as it looks like it is
> handling the =...
>
> Gotta find a better way to parse it if I'm to do the `add_preferred_console`
> route, Maybe I can try get_option...
It's rather next_arg() and its derivatives. I dunno if we have a
helper for the "give me an array of this options from the command
line", but it might be somewhere lurking as a static function. If that
is the case, one may make it global and visible to other C-files
inside the kernel.
> What do you think of the placement of it too?
No particular ideas.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists