]> www.infradead.org Git - users/hch/xfsprogs.git/commit
mkfs: Sanitise the superblock feature macros
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)
commit5f1a2100f6f5ad8d1313623628c5a900438aa6b7
tree502fcdca2faad479ace9fb46b3b8fd49333a4ca9
parentff21c709d393c73506c9888d6a4bd0f6b23c88aa
mkfs: Sanitise the superblock feature macros

They are horrible macros that simply obfuscate the code, so
let's factor the code and make them nice functions.

To do this, add a sb_feat_args structure that carries around the
variables rather than a strange assortment of variables. This means
all the default can be clearly defined in a structure
initialisation, and dependent feature bits are easy to check.

[ Eric Sandeen <sandeen@redhat.com>: Properly initialize
sb_feat.dirftype, remove unnecessary continuation chars. ]

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>
include/xfs_multidisk.h
mkfs/xfs_mkfs.c