Messages in this thread | | | Date | Tue, 30 Jun 2020 19:38:23 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] lib: Extend kstrtobool() to accept "true"/"false" |
| |
On Mon, 29 Jun 2020 14:09:38 +0200 Pavel Machek <pavel@ucw.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.
| |