Skip to content

Commit

Permalink
crypto: acomp - search acomp with scomp backend in crypto_has_acomp
Browse files Browse the repository at this point in the history
users may call crypto_has_acomp to confirm the existence of acomp before using
crypto_acomp APIs. Right now, many acomp have scomp backend, for example, lz4,
lzo, deflate etc. crypto_has_acomp will return false for them even though they
support acomp APIs.

Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Barry Song authored and Herbert Xu committed May 8, 2020
1 parent 8d90822 commit c549226
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/crypto/acompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ static inline int crypto_has_acomp(const char *alg_name, u32 type, u32 mask)
{
type &= ~CRYPTO_ALG_TYPE_MASK;
type |= CRYPTO_ALG_TYPE_ACOMPRESS;
mask |= CRYPTO_ALG_TYPE_MASK;
mask |= CRYPTO_ALG_TYPE_ACOMPRESS_MASK;

return crypto_has_alg(alg_name, type, mask);
}
Expand Down

0 comments on commit c549226

Please sign in to comment.