]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_scrub: rename struct unicrash.normalizer
authorDarrick J. Wong <djwong@kernel.org>
Mon, 29 Jul 2024 23:23:11 +0000 (16:23 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Tue, 30 Jul 2024 00:01:08 +0000 (17:01 -0700)
We're about to introduce a second normalizer, so change the name of the
existing one to reflect the algorithm that you'll get if you use it.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
scrub/unicrash.c

index 74c0fe1f9f84bd1d014110614083060f31363d74..9cde9afffef0bc406431be32a1936b7c1e7b2252 100644 (file)
@@ -87,7 +87,7 @@ struct name_entry {
 struct unicrash {
        struct scrub_ctx        *ctx;
        USpoofChecker           *spoof;
-       const UNormalizer2      *normalizer;
+       const UNormalizer2      *nfkc;
        bool                    compare_ino;
        bool                    is_only_root_writeable;
        size_t                  nr_buckets;
@@ -242,7 +242,7 @@ name_entry_compute_checknames(
                goto out_unistr;
 
        /* Normalize the string. */
-       normstrlen = unorm2_normalize(uc->normalizer, unistr, unistrlen, NULL,
+       normstrlen = unorm2_normalize(uc->nfkc, unistr, unistrlen, NULL,
                        0, &uerr);
        if (uerr != U_BUFFER_OVERFLOW_ERROR || normstrlen < 0)
                goto out_unistr;
@@ -250,7 +250,7 @@ name_entry_compute_checknames(
        normstr = calloc(normstrlen + 1, sizeof(UChar));
        if (!normstr)
                goto out_unistr;
-       unorm2_normalize(uc->normalizer, unistr, unistrlen, normstr, normstrlen,
+       unorm2_normalize(uc->nfkc, unistr, unistrlen, normstr, normstrlen,
                        &uerr);
        if (U_FAILURE(uerr))
                goto out_normstr;
@@ -457,7 +457,7 @@ unicrash_init(
        p->ctx = ctx;
        p->nr_buckets = nr_buckets;
        p->compare_ino = compare_ino;
-       p->normalizer = unorm2_getNFKCInstance(&uerr);
+       p->nfkc = unorm2_getNFKCInstance(&uerr);
        if (U_FAILURE(uerr))
                goto out_free;
        p->spoof = uspoof_open(&uerr);