Re: [patch] syscons/vt keymap: Norwegian country code conflicts with default value

From: Gyrd Thane Lange <gyrd-se_at_thanelange.no>
Date: Mon, 22 Sep 2014 21:35:24 +0200
On Mon, 22 Sep 2014 19:28:44 +0200
Tijl Coosemans <tijl_at_FreeBSD.org> wrote:

> On Mon, 22 Sep 2014 14:09:54 +0200 Stefan Esser <se_at_freebsd.org>
> wrote:
> > Am 21.09.2014 um 18:39 schrieb Gyrd Thane Lange:
> > > Hi,
> > > 
> > > Recent changes in keymap namning for syscons/vt to use shorter
> > > names has exposed a conflict with the value "no" both used as
> > > country code for Norway and as a default value indicating that no
> > > keymap is set.
> > > 
> > > The attached patch proposes to use "" (empty string) as default
> > > value instead.
> > 
> > Hi Gyrd,
> > 
> > thank you for reporting the issue!
> > 
> > I have just committed a slightly different patch to -CURRENT and
> > plan to merge it to 10-STABLE in time for the next BETA.
> > 
> > You may want to check-out r271958 ...
> > 
> > 
> > The approach I have chosen it to let "NO" continue to stand for "do
> > not load any keymap", while "no" is now recognized as equivalent to
> > "no.kbd".

Thanks! That'll get the keymap working. 

> > The new semantics of the keymap parameter in rc.conf are:
> > 
> > 	keymap='' ==> do not load any keymap (unchanged)
> > 	keymap=NO ==> do not load any keymap (unchanged)
> > 	keymap=no ==> load Norwegian keymap  (new)
> > 
> > This may still catch people that have edited rc.conf to use "no" in
> > the meaning "no keymap" by accident, but I see no other approach
> > that better complies with POLA ...
> 
> Maybe NONE.  It's already being used in a number of cases.

My original patch suggested an empty string '', and I still favour
that. That is already an accepted value for "no keyboard specified"
and thus requires no code change to work. The keyboard setting next to
keymap already use an empty string for a default value, so there is
already precedent.

Using NONE still risks the possibility of colliding
with a valid file name in the future, but anything is better than NO. In
general I think the use of NO as a default value should only be used
when there exists a complementing YES value.

In any case, whatever new default value (either empty or NONE) should be
documented in defaults/rc.conf as the preferred way, in order to
stop more users placing NO in the keymap setting. Additionally we can
provide a warning in the syscons script for users that have used
"NO" (capital case).

Gyrd ^_^
Received on Mon Sep 22 2014 - 17:41:28 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:52 UTC