diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2008-06-12 18:23:30 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2008-06-12 18:23:30 +0000 |
commit | e4e05ac80ffdbf195f5b8641c91481b313586144 (patch) | |
tree | 8997c79520578080a0dd1b7c8ffbfc1ecfd04450 /sys/dev/softraid_crypto.c | |
parent | 974e040829d476acd407f3380c0a7c8fea20d33e (diff) |
Pass error code via the crypto descriptor (ie. crp_etype) from crypto
callback.
ok marco@
Diffstat (limited to 'sys/dev/softraid_crypto.c')
-rw-r--r-- | sys/dev/softraid_crypto.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c index 26942181717..70170622f0f 100644 --- a/sys/dev/softraid_crypto.c +++ b/sys/dev/softraid_crypto.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid_crypto.c,v 1.20 2008/06/12 18:13:27 hshoexer Exp $ */ +/* $OpenBSD: softraid_crypto.c,v 1.21 2008/06/12 18:23:29 hshoexer Exp $ */ /* * Copyright (c) 2007 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org> @@ -357,6 +357,8 @@ sr_crypto_rw(struct sr_workunit *wu) s = splvm(); if (crypto_invoke(crp)) rv = 1; + else + rv = crp->crp_etype; splx(s); } else rv = sr_crypto_rw2(wu, NULL); @@ -456,6 +458,8 @@ queued: return (0); bad: /* wu is unwound by sr_put_wu */ + if (crp) + crp->crp_etype = EINVAL; return (1); } |