Re: [PATCH] mkfs: rename defaultval to flagval in opts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux