]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
mkfs: factor boolean option parsing
authorDave Chinner <dchinner@redhat.com>
Tue, 10 May 2016 07:16:06 +0000 (17:16 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 10 May 2016 07:16:06 +0000 (17:16 +1000)
commitc81c8460859b393db0223f7e66af0925cce4abb1
tree1c74a3f9a18e3dad864d688a392dc1a0976da7e3
parenta887c95016394441491e078e5305ae2f7da06ce7
mkfs: factor boolean option parsing

Many of the options passed to mkfs have boolean options (0 or 1) and
all hand roll the same code and validity checks. Factor these out
into a common function.

Note that the lazy-count option is now changed to match other
booleans in that if you don't specify a value, it reverts to the
default value (on) rather than throwing an error.

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