From d2cf5c2868c726b28a4c72dad0140c6735e5574f Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 12 Apr 2018 10:34:08 -0500 Subject: [PATCH] xfs_scrub: don't complain about different normalization Since there are different ways to normalize utf8 names, don't complain when we find a name that is normalized in a different way than the NFKC that we use to find duplicate names. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- scrub/unicrash.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scrub/unicrash.c b/scrub/unicrash.c index 0b5d1fac6..10d7c1424 100644 --- a/scrub/unicrash.c +++ b/scrub/unicrash.c @@ -256,7 +256,6 @@ unicrash_complain( struct unicrash *uc, const char *descr, const char *what, - bool normal, bool unique, const char *name, uint8_t *uniname) @@ -267,10 +266,6 @@ unicrash_complain( bad1 = string_escape(name); bad2 = string_escape((char *)uniname); - if (!normal && should_warn_about_name(uc->ctx)) - str_info(uc->ctx, descr, -_("Unicode name \"%s\" in %s should be normalized as \"%s\"."), - bad1, what, bad2); if (!unique) str_warn(uc->ctx, descr, _("Duplicate normalized Unicode name \"%s\" found in %s."), @@ -342,20 +337,18 @@ __unicrash_check_name( { uint8_t uniname[(NAME_MAX * 2) + 1]; bool moveon; - bool normal; bool unique; memset(uniname, 0, (NAME_MAX * 2) + 1); - normal = unicrash_normalize(name, uniname, NAME_MAX * 2); + unicrash_normalize(name, uniname, NAME_MAX * 2); moveon = unicrash_add(uc, uniname, ino, &unique); if (!moveon) return false; - if (normal && unique) + if (unique) return true; - unicrash_complain(uc, descr, namedescr, normal, unique, name, - uniname); + unicrash_complain(uc, descr, namedescr, unique, name, uniname); return true; } -- 2.50.1