summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-01-20 10:54:55 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-01-20 10:54:55 +0000
commite607f38cd4c0d3a51ed929310492db9e76909d89 (patch)
treee56afd8277fc81952d1c6d411b4752de61e3a251 /sys/dev
parent4ce18d84996428d24fc91d7cd6ddf13650634bb8 (diff)
Return a user friendly error if we ever encounter an unknown crypto
algorithm.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid_crypto.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 73c2d8f4442..2910fbd2252 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.101 2014/01/20 04:38:58 jsing Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.102 2014/01/20 10:54:54 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -949,6 +949,7 @@ sr_crypto_alloc_resources(struct sr_discipline *sd)
sd->mds.mdd_crypto.scr_klen = 512;
break;
default:
+ sr_error(sd->sd_sc, "unknown crypto algorithm");
return (EINVAL);
}