From 9b92d4ba1cd6e7a87e02d5422d57d25e4e4c08c1 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 12 Dec 2018 11:42:40 -0600 Subject: [PATCH] xfs_db: add missing string name for DBM_COWDATA In db/check.c, typename[] is supposed to have strings for every DBM_ type, but we forgot one. Add it now. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- db/check.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/db/check.c b/db/check.c index 352aab3f6..442600be2 100644 --- a/db/check.c +++ b/db/check.c @@ -164,8 +164,19 @@ static const char *typename[] = { "btrmap", "btrefcnt", "rldata", + "cowdata", NULL }; + +/* + * Make sure typename has the same number of elements as there are DBM types. + * This function isn't called anywhere; we just use it to trip up the compiler. + */ +static inline void check_typename(void) +{ + BUILD_BUG_ON(ARRAY_SIZE(typename) != DBM_NDBM + 1); +} + static int verbose; #define CHECK_BLIST(b) (blist_size && check_blist(b)) -- 2.50.1