From owner-freebsd-stable@FreeBSD.ORG Sat Apr 30 00:17:28 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBC27106566C for ; Sat, 30 Apr 2011 00:17:28 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta15.emeryville.ca.mail.comcast.net (qmta15.emeryville.ca.mail.comcast.net [76.96.27.228]) by mx1.freebsd.org (Postfix) with ESMTP id CF6FC8FC13 for ; Sat, 30 Apr 2011 00:17:28 +0000 (UTC) Received: from omta14.emeryville.ca.mail.comcast.net ([76.96.30.60]) by qmta15.emeryville.ca.mail.comcast.net with comcast id dcCH1g0051HpZEsAFcHUDg; Sat, 30 Apr 2011 00:17:28 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta14.emeryville.ca.mail.comcast.net with comcast id dcHS1g01Z1t3BNj8acHTvU; Sat, 30 Apr 2011 00:17:27 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 73E2E9B418; Fri, 29 Apr 2011 17:17:26 -0700 (PDT) Date: Fri, 29 Apr 2011 17:17:26 -0700 From: Jeremy Chadwick To: John Baldwin Message-ID: <20110430001726.GA58981@icarus.home.lan> References: <537A8F4F-A302-40F9-92DF-403388D99B4B@gsoft.com.au> <201104281727.04425.jhb@freebsd.org> <20110428215954.GA34030@icarus.home.lan> <201104290925.03607.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201104290925.03607.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-stable@freebsd.org Subject: Re: ZFS vs OSX Time Machine X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Apr 2011 00:17:29 -0000 On Fri, Apr 29, 2011 at 09:25:03AM -0400, John Baldwin wrote: > On Thursday, April 28, 2011 5:59:54 pm Jeremy Chadwick wrote: > > I've seen cases where entries in /boot/loader.conf throw parser errors > > during loader(8) when quotes aren't used. The man page denotes that > > quotes are required, which doesn't appear to be true? Possibly the > > parser only throws errors if non-numeric/non-integer values (e.g. > > strings) are specified without quotes. > > > > It's interesting that in the BUGS section of the man page the syntax > > shown for hw.ata.ata_dma=0 also ""violates"" the ""required"" syntax. > > Yes, it's confusing. My gut instinct is that quotes are only required > if the value contains whitespace. I've certainly used > 'autoboot_delay=NO' without quotes before. > > I just did some tests and it looks like quotes are only required for > values that contain whitespace, so > > foo=bar > bar=42G > baz="foo bar" > > are fine, but > > baz=foo bar > > will fail. > > This is similar to normal shell syntax for assigning to variables. As usual, thanks for the time you spent checking this out and verifying what reality is. :-) I'll file a PR to get the man page updated to reflect things. I believe what I've seen (re: parsing errors) is the latter case example you provided (baz=foo bar). So it seems that using quotes is the overall "safety mechanism" to ensure the value will work, but they're not required. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |