Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157931
b: refs/heads/master
c: a873a5f
h: refs/heads/master
i:
  157929: 2a477da
  157927: 336177b
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed Jun 19, 2009
1 parent 8b1879f commit 7f2ec30
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 03b56ce54143a3a69d4fea6ff8130b1c903a47ce
refs/heads/master: a873a5f1c4eda125f506c059a4f8ea48b9f42eff
15 changes: 14 additions & 1 deletion trunk/crypto/tcrypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
*/
static unsigned int sec;

static char *alg = NULL;
static u32 type;
static int mode;
static char *tvmem[TVMEMSIZE];

Expand Down Expand Up @@ -885,6 +887,11 @@ static int do_test(int m)
return ret;
}

static int do_alg_test(const char *alg, u32 type)
{
return crypto_has_alg(alg, type, CRYPTO_ALG_TYPE_MASK);
}

static int __init tcrypt_mod_init(void)
{
int err = -ENOMEM;
Expand All @@ -896,7 +903,11 @@ static int __init tcrypt_mod_init(void)
goto err_free_tv;
}

err = do_test(mode);
if (alg)
err = do_alg_test(alg, type);
else
err = do_test(mode);

if (err) {
printk(KERN_ERR "tcrypt: one or more tests failed!\n");
goto err_free_tv;
Expand Down Expand Up @@ -928,6 +939,8 @@ static void __exit tcrypt_mod_fini(void) { }
module_init(tcrypt_mod_init);
module_exit(tcrypt_mod_fini);

module_param(alg, charp, 0);
module_param(type, uint, 0);
module_param(mode, int, 0);
module_param(sec, uint, 0);
MODULE_PARM_DESC(sec, "Length in seconds of speed tests "
Expand Down

0 comments on commit 7f2ec30

Please sign in to comment.