]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: don't complain about different normalization
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 12 Apr 2018 15:34:08 +0000 (10:34 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 12 Apr 2018 15:34:08 +0000 (10:34 -0500)
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 <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
scrub/unicrash.c

index 0b5d1fac6be2df89aa7b3edc3be92ad13c750e41..10d7c142450b6c1f9cb8479101fd01999418743e 100644 (file)
@@ -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;
 }