From owner-freebsd-arch@FreeBSD.ORG Wed Jun 1 09:17:35 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 63E9116A41C for ; Wed, 1 Jun 2005 09:17:35 +0000 (GMT) (envelope-from mux@freebsd.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BB4843D49 for ; Wed, 1 Jun 2005 09:17:34 +0000 (GMT) (envelope-from mux@freebsd.org) Received: by elvis.mu.org (Postfix, from userid 1920) id D0F8E5C971; Wed, 1 Jun 2005 02:17:34 -0700 (PDT) Date: Wed, 1 Jun 2005 11:17:34 +0200 From: Maxime Henrion To: delphij@delphij.net Message-ID: <20050601091734.GA14661@elvis.mu.org> References: <1117613456.771.16.camel@spirit> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1117613456.771.16.camel@spirit> User-Agent: Mutt/1.4.2.1i 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 09:17:35 -0000 Xin LI wrote: > Hi, -arch@, > > 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. > > 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 > }; > %%% > > Looks better than: > > %%% > opt = { > MOPT_STD, > { NULL } > }; > %%% > > That has lead to the attached patchset. May I go ahead and commit it? This is definitely nice. Please commit! Cheers, Maxime