From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-f65.google.com ([209.85.160.65]:41048 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbeERX4O (ORCPT ); Fri, 18 May 2018 19:56:14 -0400 Received: by mail-pl0-f65.google.com with SMTP id az12-v6so5439293plb.8 for ; Fri, 18 May 2018 16:56:14 -0700 (PDT) Date: Fri, 18 May 2018 16:56:10 -0700 From: "Luis R. Rodriguez" Subject: Re: [PATCH v2 5/5] mkfs.xfs: add configuration file parsing support using our own parser Message-ID: <20180518235610.GF24680@garbanzo.do-not-panic.com> References: <20180517192700.23457-1-mcgrof@kernel.org> <20180517192700.23457-6-mcgrof@kernel.org> <1f1e87df-aba5-e285-e3cb-820306f24f1c@sandeen.net> <20180518034600.GW23858@magnolia> <20180518153805.GE24680@garbanzo.do-not-panic.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: Eric Sandeen Cc: "Luis R. Rodriguez" , "Darrick J. Wong" , linux-xfs@vger.kernel.org, jack@suse.com, jeffm@suse.com, okurz@suse.com, lpechacek@suse.com, jtulak@redhat.com On Fri, May 18, 2018 at 12:09:23PM -0500, Eric Sandeen wrote: > On 5/18/18 10:38 AM, Luis R. Rodriguez wrote: > > On Thu, May 17, 2018 at 08:46:00PM -0700, Darrick J. Wong wrote: > > > On Thu, May 17, 2018 at 10:24:13PM -0500, Eric Sandeen wrote: > > ... > > Let us recall that the reason for -c set in stone on /@sysconfigdir@/mkfs.xfs.d/ > > was to allow clean simple code. > > > > The MKFS_XFS_CONFIG is simply a comopromise to allow flexibility on a > > full path in case you cannot use the /@sysconfigdir@/mkfs.xfs.d/ > > directory. > > > > Supporting both remains simple. > > > > If we wanted to support what you suggest, if a user specified -c hoogah > > we'd have to treat multiple possibilities in code, increasing complexity: > > > > a) Did the user mean the hoogah in the present directory? > > b) Did the user mean hoogah in /@sysconfigdir@/mkfs.xfs.d/ > > > > Granted, if the user specified a -c /tmp/hoogah its clearer that the > > full path would be desirable. So, I think what you suggest makes sense > > provided we get rid of a) option and require only an alternative path > > *iff* the first character in the path is '/'. Does this work for all > > cases we wish to support a full path in? > > Possibly include "./" as well. i.e. mkfs.xfs -c ./configdir/myconfig > > so: > > mkfs.xfs -c hoogah searches /@sysconfigdir@/mkfs.xfs.d/ > mkfs.xfs -c ./hoogah or > mkfs.xfs -c /path/to/hoogah do exactly what you'd expect. > > > > And the -c > > > option can be specified once to override the environment variable / > > > builtin detaults? > > I'd like to drop the environment variable altogether. If there is a strong > case to be made for keeping it, please make it. :) (I don't consider the > existence of MKE2FS_CONFIG to be a strong argument, FWIW, because our > semantics & mechanisms are quite different.) Sounds good. I'll drop the environment variable junk and only support the above 3 cases. Luis