summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2008-08-04 14:22:29 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2008-08-29 15:48:56 +1000
commita7581a01fbc69771a2b391de4220ba670c0aa261 (patch)
treee406c8a4b9fc203cc1b5c3d2937aad53d2d3aeee
parentc51b6c8102a82239163c8c04e404c7cc2857b4be (diff)
downloadlinux-a7581a01fbc69771a2b391de4220ba670c0aa261.tar.gz
linux-a7581a01fbc69771a2b391de4220ba670c0aa261.tar.bz2
linux-a7581a01fbc69771a2b391de4220ba670c0aa261.zip
crypto: api - Display larval objects properly
Rather than displaying larval objects as real objects, this patch makes them show up under /proc/crypto as of type larval. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--crypto/proc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto/proc.c b/crypto/proc.c
index 02ff5670c158..c6ede1e9c875 100644
--- a/crypto/proc.c
+++ b/crypto/proc.c
@@ -47,7 +47,7 @@ static int c_show(struct seq_file *m, void *p)
seq_printf(m, "priority : %d\n", alg->cra_priority);
seq_printf(m, "refcnt : %d\n", atomic_read(&alg->cra_refcnt));
- switch (alg->cra_flags & CRYPTO_ALG_TYPE_MASK) {
+ switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) {
case CRYPTO_ALG_TYPE_CIPHER:
seq_printf(m, "type : cipher\n");
seq_printf(m, "blocksize : %u\n", alg->cra_blocksize);
@@ -67,7 +67,10 @@ static int c_show(struct seq_file *m, void *p)
seq_printf(m, "type : compression\n");
break;
default:
- if (alg->cra_type && alg->cra_type->show)
+ if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
+ seq_printf(m, "type : larval\n");
+ seq_printf(m, "flags : 0x%x\n", alg->cra_flags);
+ } else if (alg->cra_type && alg->cra_type->show)
alg->cra_type->show(m, alg);
else
seq_printf(m, "type : unknown\n");