From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ipmail06.adl2.internode.on.net ([150.101.137.129]:26502 "EHLO ipmail06.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752630AbdLTD4E (ORCPT ); Tue, 19 Dec 2017 22:56:04 -0500 Date: Wed, 20 Dec 2017 14:56:01 +1100 From: Dave Chinner Subject: Re: [PATCH 6/7] mkfs: resolve sector size CLI conflicts Message-ID: <20171220035601.GE4094@dastard> References: <20171218091158.14537-1-david@fromorbit.com> <20171218091158.14537-7-david@fromorbit.com> <20171220025958.GN12613@magnolia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171220025958.GN12613@magnolia> Sender: linux-xfs-owner@vger.kernel.org List-ID: List-Id: xfs To: "Darrick J. Wong" Cc: linux-xfs@vger.kernel.org On Tue, Dec 19, 2017 at 06:59:58PM -0800, Darrick J. Wong wrote: > On Mon, Dec 18, 2017 at 08:11:57PM +1100, Dave Chinner wrote: > > From: Dave Chinner > > > > Now we have a two dimensional conflict array, convert the sector > > size CLI option conflict determination to use it. To get the error > > specification just right, we also need to tweak how we store > > and validate the sector size CLI parameter state in the options > > table. > > > > Old: > > > > $ mkfs.xfs -N -s size=4k -d sectsize=512 /dev/pmem0 > > Cannot specify both -d sectsize and -d sectlog > > ..... > > > > New: > > > > $ mkfs.xfs -N -s size=4k -d sectsize=512 /dev/pmem0 > > Cannot specify both -s size and -d sectsize > > ..... .... > > @@ -964,8 +991,8 @@ conflict( > > int conflict) > > { > > fprintf(stderr, _("Cannot specify both -%c %s and -%c %s\n"), > > - opts->name, opts->subopts[option], > > - con_opts->name, con_opts->subopts[conflict]); > > + con_opts->name, con_opts->subopts[conflict], > > + opts->name, opts->subopts[option]); > > Why is it necessary to change this around? Surely > > Cannot specify both -s barfu and -d fubar > > and > > Cannot specify both -d fubar and -s barfu > > aren't /that/ much different? > > Or is this one of those things that fixes up an xfstest or something? Ummm, that might be a stray hunk of code. if it's necessary it should be in the original patch that changed this error message, not in this patch. I'll have to go check. Too hot here to think right now. -Dave. -- Dave Chinner david@fromorbit.com