[PATCH 0/7] mkfs: save user input into opts table

Jan Tulak
2017-07-20T09:29:36Z

Hi guys

This is a respin of https://www.spinics.net/lists/linux-xfs/msg06158.html, but
I decided to split that set in two smaller ones. This first one implements the
infrastructure, but does not replace standalone variables with the opts table
fields, that happens in the other set.

To reiterate: The main goal of this set is to save user input into the opts
struct, instead of various ad-hoc variables. I'm adding the set and get
functions to do this and applying them where appropriate. Once all the values
are in a single place, we can expand the automated validation and use it e.g.
for loading up optional config file like Luis wants to do.

This set is now is based on for-next and not on my type-chaning set (which
will come some time later). Then there are some fixes in specific commits --
all issues you raised should be addressed.

You can see the tree for both sets at:
https://github.com/jtulak/xfsprogs-dev/tree/setters

Cheers,
Jan

Jan Tulak (7):
mkfs: Save raw user input field to the opts struct
mkfs: rename defaultval to flagval in opts
mkfs: remove intermediate getstr followed by getnum
mkfs: merge tables for opts parsing into one table
mkfs: move getnum within the file
mkfs: extend opt_params with a value field
mkfs: save user input values into opts

mkfs/xfs_mkfs.c | 1773 ++++++++++++++++++++++++++++++-------------------------
1 file changed, 970 insertions(+), 803 deletions(-)

--
2.11.0