]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - mkfs/xfs_mkfs.c
mkfs: table based parsing for converted parameters
authorDave Chinner <dchinner@redhat.com>
Tue, 10 May 2016 07:16:07 +0000 (17:16 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 10 May 2016 07:16:07 +0000 (17:16 +1000)
commit627e74fd97148a9e3417333aba744ec83264efe9
treefbd11d0d0bbf1457bf6f158f61e11c8521620d4e
parent9090e187bc3e6dfc1aa717b59e6f2bd946e8c2e4
mkfs: table based parsing for converted parameters

All the parameters that can be passed as block or sector sizes need
to be passed the block and sector sizes that they should be using
for conversion. For parameter parsing, it is always the same two
variables, so to make things easy just declare them as global
variables so we can avoid needing to pass them to getnum_checked().

We also need to mark these parameters are requiring conversion so
that we don't need to pass this information manually to
getnum_checked(). Further, some of these options are required to
have a power of 2 value, so add optional checking for that as well.

[ Eric Sandeen <sandeen@redhat.com>: fix min/max for "-l su" ]

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Jan Tulak <jtulak@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
mkfs/xfs_mkfs.c