Re: [PATCH v3 1/2] lib/kstrtox.c: Add "false"/"true" support to kstrtobool()

From: Andy Shevchenko
Date: Fri Jul 29 2022 - 11:32:45 EST


On Fri, Jul 29, 2022 at 5:21 PM Alexey Dobriyan <adobriyan@xxxxxxxxx> wrote:
> On Fri, Jul 29, 2022 at 05:35:26PM +0300, Andy Shevchenko wrote:
> > On Mon, Jul 25, 2022 at 04:21:11PM +0100, Matthew Wilcox wrote:
> > > On Mon, Jul 25, 2022 at 03:55:27PM +0100, Mark Rutland wrote:

...

> > > Well, that's going to break people who've started using the new option.
> > > As a quick fix, how about only allowing either "f\0" or "fa"?
> >
> > I think we need to be more strict in kstrtobool(), i.e. 'f\0' ('t\0') and 'fal'
> > ('tru') perhaps?
>
> lol what?
>
> the only way to be strict is to accept "0" and "1" with optional
> newline and delete all the rubbish entirely.

You have an anti-user mindset. Be more constructive, please.

--
With Best Regards,
Andy Shevchenko