From owner-freebsd-stable@FreeBSD.ORG Mon Sep 22 19:41:28 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35A80744; Mon, 22 Sep 2014 19:41:28 +0000 (UTC) Received: from bouvier.getmail.no (bouvier.getmail.no [84.210.184.8]) by mx1.freebsd.org (Postfix) with ESMTP id B095DCCB; Mon, 22 Sep 2014 19:41:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bouvier.getmail.no (Postfix) with ESMTP id E5D0240518; Mon, 22 Sep 2014 21:35:27 +0200 (CEST) Received: from bouvier.getmail.no ([127.0.0.1]) by localhost (bouvier.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id b1W6-s1m4Jue; Mon, 22 Sep 2014 21:35:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by bouvier.getmail.no (Postfix) with ESMTP id 7D28840591; Mon, 22 Sep 2014 21:35:27 +0200 (CEST) X-Virus-Scanned: amavisd-new at bouvier.get.c.bitbit.net Received: from bouvier.getmail.no ([127.0.0.1]) by localhost (bouvier.get.c.bitbit.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id xQPwuIU_cre9; Mon, 22 Sep 2014 21:35:27 +0200 (CEST) Received: from onyx.thanelange.no (cm-84.208.179.208.getinternet.no [84.208.179.208]) by bouvier.getmail.no (Postfix) with ESMTP id A668840518; Mon, 22 Sep 2014 21:35:26 +0200 (CEST) Date: Mon, 22 Sep 2014 21:35:24 +0200 From: Gyrd Thane Lange To: Tijl Coosemans Subject: Re: [patch] syscons/vt keymap: Norwegian country code conflicts with default value Message-ID: <20140922213524.3b95b9a5@onyx.thanelange.no> In-Reply-To: <20140922192844.7de1bb6b@kalimero.tijl.coosemans.org> References: <20140921183936.03617590@onyx.thanelange.no> <54201192.5080906@freebsd.org> <20140922192844.7de1bb6b@kalimero.tijl.coosemans.org> X-Mailer: Claws Mail 3.10.1 (GTK+ 2.24.22; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-stable stable , freebsd-current@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2014 19:41:28 -0000 On Mon, 22 Sep 2014 19:28:44 +0200 Tijl Coosemans wrote: > On Mon, 22 Sep 2014 14:09:54 +0200 Stefan Esser > 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 ^_^