From fd277ca7ecf0daa81ad185a4a2595778cb7bf639 Mon Sep 17 00:00:00 2001 From: lsy Date: Thu, 12 Oct 2006 15:57:27 +0000 Subject: [PATCH] give friendly error message if crypto failed. --- lustre/obdclass/capa.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lustre/obdclass/capa.c b/lustre/obdclass/capa.c index 28994f0..a3f495d 100644 --- a/lustre/obdclass/capa.c +++ b/lustre/obdclass/capa.c @@ -243,8 +243,11 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key) alg = &capa_hmac_algs[capa_alg(capa)]; tfm = crypto_alloc_tfm(alg->ha_name, 0); - if (!tfm) + if (!tfm) { + CERROR("crypto_alloc_tfm failed, check whether your kernel" + "has crypto support!\n"); return -ENOMEM; + } keylen = alg->ha_keylen; crypto_hmac(tfm, key, &keylen, &sl, 1, hmac); -- 1.8.3.1