[Ocfs2-tools-devel] [PATCH 03/22] libocfs2: Move printable feature flags to feature_string.c

Mark Fasheh mfasheh at suse.com
Wed Aug 6 17:51:01 PDT 2008


On Fri, Jul 25, 2008 at 07:07:41PM -0700, Joel Becker wrote:
> We currently have pretty-print strings for each feature flag in
> ocfs2/ocfs2.h  It's just a bunch of defines, but it was good to have the
> strings defined in one place.
> 
> However, we weren't even using them correctly.  tunefs.ocfs2/query.c
> used them, but debugfs.ocfs2/utils.c had its own strings.  They didn't
> even match.
> 
> In the end, we have a place for this sort of thing:
> libocfs2/feature_string.c.  This patch adds the entire feature<->string
> mapping, including tunefs INPROG flags.  The functions
> ocfs2_snprint_feature_flags() and ocfs2_snprint_tunefs_flags() have the
> capability of using the strings to print out a feature set.
> 
> The strings are removed from ocfs2/ocfs2.h.  tunefs.ocfs2/query.c and
> debugfs.ocfs2/utils.c are changed to use the ocfs2_snprint_*_flags()
> API.
> 
> As a bonus, tunefs.ocfs2 no longer needs glib.
> 
> While were there, a bug in tunefs.ocfs2/query.c is fixed.  The print
> format wasn't properly terminated, so we switch to ocfs2_malloc0() to
> ensure this.
> 
> Signed-off-by: Joel Becker <joel.becker at oracle.com>

This looks good...

Signed-off-by: Mark Fasheh <mfasheh at suse.com>
	--Mark

--
Mark Fasheh



More information about the Ocfs2-tools-devel mailing list