lkml.org 
[lkml]   [2021]   [May]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] init: Print out unknown kernel parameters
    On Mon, May 03, 2021 at 06:46:06PM -0400, Steven Rostedt wrote:
    > Note, the issue this is trying to solve is to catch "typos" when someone
    > adds a parameter. Perhaps we should add a parameter called "check" and/or a
    > config option to always check.

    Well, actually, you want this checking to always happen and
    unconditionally at that.

    The fact that we cannot differentiate between params given to init vs
    mistyped params, makes it harder to solve elegantly.

    > > > +void print_unknown_bootoptions(void)

    static

    > > > +{
    > > > + const char *const *p;
    > > > +
    > > > + if (panic_later || (!argv_init[1] && !envp_init[2]))
    > > > + return;
    > > > +
    > > > + pr_notice("Unknown command line parameters:\n");
    > > > + for (p = &argv_init[1]; *p; p++)
    > > > + pr_notice(" %s\n", *p);
    > > > + for (p = &envp_init[2]; *p; p++)
    > > > + pr_notice(" %s\n", *p);
    > > > +}
    >
    > Perhaps make this one line, like "Kernel command line:" has.

    Yap, only one newline at the end pls.

    --
    Regards/Gruss,
    Boris.

    SUSE Software Solutions Germany GmbH, GF: Felix Imendörffer, HRB 36809, AG Nürnberg

    \
     
     \ /
      Last update: 2021-05-04 17:02    [W:2.685 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site