From: Dave Chinner <david@fromorbit.com>
To: Jan Tulak <jtulak@redhat.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH] mkfs: rename defaultval to flagval in opts
Date: Sat, 19 Aug 2017 11:03:00 +1000 [thread overview]
Message-ID: <20170819010300.GM10621@dastard> (raw)
In-Reply-To: <20170818103932.24607-1-jtulak@redhat.com>
On Fri, Aug 18, 2017 at 12:39:32PM +0200, Jan Tulak wrote:
> The old name 'defaultval' was misleading - it is not the default value,
> but the value the option has when used as a flag by an user.
Hmmm - ok, what we have here is the difference between design intent
and the current use of the field.
The design intent is that the defaultval field can contain the
default value for any type of config field. It gets used when a user
either doesn't specify the option or doesn't specify a value for the
option that is being parsed. The special "need value" value tells
the code that there isn't a defined default that can be used, so the
option must be specified with a value.
The current implementation only contains default values for flag
fields, but that doesn't mean we can't use it for fields that are
not flags. And if that's the case, then renaming the field "flagval"
isn't the right thing to do....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2017-08-19 1:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-18 10:39 [PATCH] mkfs: rename defaultval to flagval in opts Jan Tulak
2017-08-19 1:03 ` Dave Chinner [this message]
2017-08-19 6:40 ` Jan Tulak
2017-08-19 16:26 ` Darrick J. Wong
2017-08-20 1:56 ` Dave Chinner
2017-08-21 7:27 ` Jan Tulak
2017-08-24 19:15 ` Luis R. Rodriguez
2017-08-24 23:58 ` Dave Chinner
2017-08-25 0:39 ` Luis R. Rodriguez
2017-08-28 22:36 ` Dave Chinner
2017-08-29 17:38 ` Luis R. Rodriguez
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170819010300.GM10621@dastard \
--to=david@fromorbit.com \
--cc=jtulak@redhat.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox