linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Dave Chinner <david@fromorbit.com>
Cc: Jan Tulak <jtulak@redhat.com>,
	linux-xfs <linux-xfs@vger.kernel.org>,
	Dmitri Pal <dpal@redhat.com>
Subject: Re: [PATCH] mkfs: rename defaultval to flagval in opts
Date: Thu, 24 Aug 2017 21:15:02 +0200	[thread overview]
Message-ID: <20170824191502.GT27873@wotan.suse.de> (raw)
In-Reply-To: <20170820015624.GP10621@dastard>

On Sun, Aug 20, 2017 at 11:56:24AM +1000, Dave Chinner wrote:
> Let me finish factoring all the code into a set of usable
> structures, then we can start looking at the option table and config
> files from a fresh perspective. This time, we need to come up with a
> clean design and clear direction before any patches are written...

While you're on it, I should mention I ran across a nice feature as part of one
of the libraries I evaluated when considering configuration file parsing. The
library libini_config has a rules checker which allows one to build rules from
yet-another file, it uses ini_rules_read_from_file() to let you pass your
rules, you then use ini_rules_check() to check if the configuration file
applies to rules previously loaded. An example INI file for rules is that
of the upstream SSSD:

https://github.com/SSSD/sssd/blob/master/src/config/cfg_rules.ini

I haven't yet dove too much into this but from what I gather the
validator can be a built-in one or a local one.

A curious thing about our use is we'd want a validator for both configuration
file and command line parameters. But such language above may allow us to
easily specify and handle both.

Food for thought as we're trying to come up with a clean design now.

  Luis

  parent reply	other threads:[~2017-08-24 19:15 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
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 [this message]
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=20170824191502.GT27873@wotan.suse.de \
    --to=mcgrof@kernel.org \
    --cc=david@fromorbit.com \
    --cc=dpal@redhat.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;
as well as URLs for NNTP newsgroup(s).