aboutsummaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'crypto')
-rw-r--r--crypto/proc.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/crypto/proc.c b/crypto/proc.c
index 37a13d05636d..5dc07e442fca 100644
--- a/crypto/proc.c
+++ b/crypto/proc.c
@@ -94,6 +94,17 @@ static int c_show(struct seq_file *m, void *p)
94 seq_printf(m, "selftest : %s\n", 94 seq_printf(m, "selftest : %s\n",
95 (alg->cra_flags & CRYPTO_ALG_TESTED) ? 95 (alg->cra_flags & CRYPTO_ALG_TESTED) ?
96 "passed" : "unknown"); 96 "passed" : "unknown");
97
98 if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
99 seq_printf(m, "type : larval\n");
100 seq_printf(m, "flags : 0x%x\n", alg->cra_flags);
101 goto out;
102 }
103
104 if (alg->cra_type && alg->cra_type->show) {
105 alg->cra_type->show(m, alg);
106 goto out;
107 }
97 108
98 switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) { 109 switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) {
99 case CRYPTO_ALG_TYPE_CIPHER: 110 case CRYPTO_ALG_TYPE_CIPHER:
@@ -115,16 +126,11 @@ static int c_show(struct seq_file *m, void *p)
115 seq_printf(m, "type : compression\n"); 126 seq_printf(m, "type : compression\n");
116 break; 127 break;
117 default: 128 default:
118 if (alg->cra_flags & CRYPTO_ALG_LARVAL) { 129 seq_printf(m, "type : unknown\n");
119 seq_printf(m, "type : larval\n");
120 seq_printf(m, "flags : 0x%x\n", alg->cra_flags);
121 } else if (alg->cra_type && alg->cra_type->show)
122 alg->cra_type->show(m, alg);
123 else
124 seq_printf(m, "type : unknown\n");
125 break; 130 break;
126 } 131 }
127 132
133out:
128 seq_putc(m, '\n'); 134 seq_putc(m, '\n');
129 return 0; 135 return 0;
130} 136}