Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 272294
b: refs/heads/master
c: 6c5a86f
h: refs/heads/master
v: v3
  • Loading branch information
Steffen Klassert authored and Herbert Xu committed Oct 21, 2011
1 parent 5eed60d commit 68220d9
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b6aa63c09ba3b150a1030f9c95c7647361e7910e
refs/heads/master: 6c5a86f529a9e9ca4c9aca5fa477e9557d4a3d3d
12 changes: 12 additions & 0 deletions trunk/crypto/crypto_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,23 @@ static int crypto_report_one(struct crypto_alg *alg,

NLA_PUT_U32(skb, CRYPTOCFGA_PRIORITY_VAL, alg->cra_priority);

if (alg->cra_flags & CRYPTO_ALG_LARVAL) {
struct crypto_report_larval rl;

snprintf(rl.type, CRYPTO_MAX_ALG_NAME, "%s", "larval");

NLA_PUT(skb, CRYPTOCFGA_REPORT_LARVAL,
sizeof(struct crypto_report_larval), &rl);

goto out;
}

if (alg->cra_type && alg->cra_type->report) {
if (alg->cra_type->report(skb, alg))
goto nla_put_failure;
}

out:
return 0;

nla_put_failure:
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/cryptouser.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum {
enum crypto_attr_type_t {
CRYPTOCFGA_UNSPEC,
CRYPTOCFGA_PRIORITY_VAL, /* __u32 */
CRYPTOCFGA_REPORT_LARVAL, /* struct crypto_report_larval */
__CRYPTOCFGA_MAX

#define CRYPTOCFGA_MAX (__CRYPTOCFGA_MAX - 1)
Expand All @@ -50,3 +51,7 @@ struct crypto_user_alg {
__u32 cru_refcnt;
__u32 cru_flags;
};

struct crypto_report_larval {
char type[CRYPTO_MAX_NAME];
};

0 comments on commit 68220d9

Please sign in to comment.