aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-06-05 16:51:47 -0700
committerEric Biggers <ebiggers@google.com>2020-06-05 16:51:47 -0700
commit40ba6849d74d217a87cbbb0291b03c50d77354f6 (patch)
treeebfc0960926088022eb2857e0b5029eb61e7eddf
parente1ddb1a97a2d22a8fde5d4a06d070b0f9572d9fc (diff)
downloadfsverity-utils-40ba6849d74d217a87cbbb0291b03c50d77354f6.tar.gz
lib/hash_algs.c: rename libfsverity_hash_algs[] => fsverity_hash_algs[]
Revert the renaming of fsverity_hash_algs[] to libfsverity_hash_algs[], since it ended up becoming a static variable. Signed-off-by: Eric Biggers <ebiggers@google.com>
-rw-r--r--lib/hash_algs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/hash_algs.c b/lib/hash_algs.c
index ac3acd3..9ba2969 100644
--- a/lib/hash_algs.c
+++ b/lib/hash_algs.c
@@ -143,7 +143,7 @@ void libfsverity_free_hash_ctx(struct hash_ctx *ctx)
/* ========== Hash algorithm definitions ========== */
-static const struct fsverity_hash_alg libfsverity_hash_algs[] = {
+static const struct fsverity_hash_alg fsverity_hash_algs[] = {
[FS_VERITY_HASH_ALG_SHA256] = {
.name = "sha256",
.digest_size = 32,
@@ -166,9 +166,9 @@ libfsverity_find_hash_alg_by_name(const char *name)
if (!name)
return 0;
- for (i = 0; i < ARRAY_SIZE(libfsverity_hash_algs); i++) {
- if (libfsverity_hash_algs[i].name &&
- !strcmp(name, libfsverity_hash_algs[i].name))
+ for (i = 0; i < ARRAY_SIZE(fsverity_hash_algs); i++) {
+ if (fsverity_hash_algs[i].name &&
+ !strcmp(name, fsverity_hash_algs[i].name))
return i;
}
return 0;
@@ -176,9 +176,9 @@ libfsverity_find_hash_alg_by_name(const char *name)
const struct fsverity_hash_alg *libfsverity_find_hash_alg_by_num(u32 alg_num)
{
- if (alg_num < ARRAY_SIZE(libfsverity_hash_algs) &&
- libfsverity_hash_algs[alg_num].name)
- return &libfsverity_hash_algs[alg_num];
+ if (alg_num < ARRAY_SIZE(fsverity_hash_algs) &&
+ fsverity_hash_algs[alg_num].name)
+ return &fsverity_hash_algs[alg_num];
return NULL;
}