From owner-svn-src-all@freebsd.org Fri Apr 8 09:59:42 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A160B0704D; Fri, 8 Apr 2016 09:59:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id 4A86A1E71; Fri, 8 Apr 2016 09:59:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c110-21-41-193.carlnfd1.nsw.optusnet.com.au (c110-21-41-193.carlnfd1.nsw.optusnet.com.au [110.21.41.193]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id 838701041717; Fri, 8 Apr 2016 19:26:58 +1000 (AEST) Date: Fri, 8 Apr 2016 19:26:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Maxim Sobolev cc: Bruce Evans , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org Subject: Re: svn commit: r297690 - head/sys/boot/forth In-Reply-To: Message-ID: <20160408173524.V827@besplex.bde.org> References: <201604080024.u380OL4Q087516@repo.freebsd.org> <20160408121934.H1779@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=c+ZWOkJl c=1 sm=1 tr=0 a=73JWPhLeruqQCjN69UNZtQ==:117 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=uBi6BwCJpX-U97XzUNkA:9 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 09:59:42 -0000 On Thu, 7 Apr 2016, Maxim Sobolev wrote: > Hi Bruce, thanks for the input! I will see if I can move that piece into > loader.8 and extend it a bit from the source "documentation". Thanks. I checked what happens for space and newline as field separators. They both to work in -current. The newline form is less backwards compatible and has other problems, so it should never be used. Quoting for the spaces and newlines is painful, and also unclearly documented. I noticed these problems: - in the static env source file, IIRC spaces don't work despite the strings being quoted, so I use hex escapes. Octal escapes might work. I doubt that the format is documented. It is either not just C string format, or there is a problem with outer quotes being removed. - in the default loader.conf and device.hints, everything is quoted with literal double quotes, even though most of the strings don't have whitespace. I don't know if this is needed. Quoting has a lot of documentation in loader.8 - the 'show' command in at least old versions of loader strips quotes, even in strings with whitespace. Setting setting foo=123 and foo="123" both give 123. Hex escapes are documented to work in the parser, but don't work from the command line (\x20 becomes x20), so so my use of them in kernel.env wouldn't work in loader. Octal escapes are docmented to work in the parser, and work from the command line. - when I got the octal escape sequence for newline wrong in loader, it did no OPOST processing like it does for newline, so it displayed a strange glyph (whatever is in the BIOS font). Kernel error messages did the same. For syscons, boot messages use the BIOS font. I think vt would not display anything for control characters. - when mountroot tries a device that doesn't exist, it prints the confusing errno 19. 19 is ENODEV. ENODEV means ENOENT for the device. Documentation of this was broken by nmount in mount.2. It still refers to the ufs_args struct which is not used by nmount and is no longer documented (except via this broken pointer) in mount.2. - quoting is needed for strings with spaces or escape sequences: setting either foo=1 2 3 or foo=1\0402\0403 are syntax errors. - loader.8, when viewed using man, has a few instances of excessive quoting too. I not see that this a markup error. Double quotes for string literals are rendered on a text terminal as 2 single quote characters each. The string literals should be marked up as literals, especially the quotes in them, so that the quotes are rendered literally. - loader.conf.5 barely documents quoting. It just says that settings have the form variable="value". The double quotes are correctly rendered for this but are misrendered in all examples. Bruce