[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200630193823.62573c0142ddda1f2bf92cf3@linux-foundation.org>
Date: Tue, 30 Jun 2020 19:38:23 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Pavel Machek <pavel@....cz>
Cc: Peter Zijlstra <peterz@...radead.org>,
Borislav Petkov <bp@...en8.de>,
Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
rjw@...ysocki.net, viresh.kumar@...aro.org, lenb@...nel.org,
dsmythies@...us.net, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, x86@...nel.org, jic23@....ac.uk,
keescook@...omium.org
Subject: Re: [PATCH] lib: Extend kstrtobool() to accept "true"/"false"
On Mon, 29 Jun 2020 14:09:38 +0200 Pavel Machek <pavel@....cz> wrote:
> > Extend the strings recognised by kstrtobool() to cover:
> >
> > - 1/0
> > - y/n
> > - yes/no (new)
> > - t/f (new)
> > - true/false (new)
> > - on/off
>
> Is it good idea to add more values there? It is easy to do, but... we don't want
> people to use this by hand, and ideally everyone would just use 1/0...
>
> I also see potential for confusion... as in echo off > enable_off_mode (ok, this is
> with existing code, but...)
>
> Plus, if programs learn to do "echo true > ..." they will stop working on older kernels.
I'm inclined to agree with this, It is indeed an invitation to write
non-back-compatible userspace and it simply makes the kernel interface
more complex.
Powered by blists - more mailing lists