From 74f350335ac06dbb5487029fa47fd8d445d05479 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 6 Nov 2008 14:39:16 +0800 Subject: [PATCH] --- yaml --- r: 120599 b: refs/heads/master c: 67cd080c5070b4f17520c1385f7684206f4987b3 h: refs/heads/master i: 120597: c055041275d690342a3ecca77defec690ca637a2 120595: 729e9f3b4e5af801c8277fbd88bbc5eae22dff00 120591: a3e8b1ce233e23b444f25b4ecb5ec2ae9ed083ce v: v3 --- [refs] | 2 +- trunk/crypto/proc.c | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 20428b3a3016..3b871252ae6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dec8b78606ebd5f309c38f2fb10196ce996dd18d +refs/heads/master: 67cd080c5070b4f17520c1385f7684206f4987b3 diff --git a/trunk/crypto/proc.c b/trunk/crypto/proc.c index 37a13d05636d..5dc07e442fca 100644 --- a/trunk/crypto/proc.c +++ b/trunk/crypto/proc.c @@ -94,6 +94,17 @@ static int c_show(struct seq_file *m, void *p) seq_printf(m, "selftest : %s\n", (alg->cra_flags & CRYPTO_ALG_TESTED) ? "passed" : "unknown"); + + if (alg->cra_flags & CRYPTO_ALG_LARVAL) { + seq_printf(m, "type : larval\n"); + seq_printf(m, "flags : 0x%x\n", alg->cra_flags); + goto out; + } + + if (alg->cra_type && alg->cra_type->show) { + alg->cra_type->show(m, alg); + goto out; + } switch (alg->cra_flags & (CRYPTO_ALG_TYPE_MASK | CRYPTO_ALG_LARVAL)) { case CRYPTO_ALG_TYPE_CIPHER: @@ -115,16 +126,11 @@ static int c_show(struct seq_file *m, void *p) seq_printf(m, "type : compression\n"); break; default: - 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"); + seq_printf(m, "type : unknown\n"); break; } +out: seq_putc(m, '\n'); return 0; }