From owner-freebsd-arch@FreeBSD.ORG Wed Jun 1 11:23:37 2005 Return-Path: X-Original-To: freebsd-arch@freebsd.org Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1996C16A41C for ; Wed, 1 Jun 2005 11:23:37 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EFC143D48 for ; Wed, 1 Jun 2005 11:23:36 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86]) by mailout2.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j51BNOkG007300; Wed, 1 Jun 2005 21:23:24 +1000 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailproxy1.pacific.net.au (8.12.3/8.12.3/Debian-7.1) with ESMTP id j51BNMqB019842; Wed, 1 Jun 2005 21:23:23 +1000 Date: Wed, 1 Jun 2005 21:23:23 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: delphij@delphij.net In-Reply-To: <1117613456.771.16.camel@spirit> Message-ID: <20050601211628.V96009@delplex.bde.org> References: <1117613456.771.16.camel@spirit> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-arch@freebsd.org Subject: Re: [PATCH RFC] Add a macro for null mount options to sbin/mount* X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jun 2005 11:23:37 -0000 On Wed, 1 Jun 2005, Xin LI wrote: > In our mount* utilities, the null mount option, which is usually be used > as a terminator of an option vector, is defined with some hand-rolled > terms, e.g.: {NULL}, {NULL, 0, 0, 0}, etc. "{ NULL }" is the documented way. See getmntopts.3. > I think it would be nice to have a new macro to deal with this, say, > MOPT_NULL, which would be extended to {NULL, 0, 0, 0}, which can act as > an explicit initialize. And in my opinion, something like: > > %%% > opt = { > MOPT_STD, > MOPT_NULL > }; > %%% MOPT_NULL is a poor name. It is not a null option, but a terminator that happens to have nulls in it. Bruce