summaryrefslogtreecommitdiff
path: root/sbin/bioctl/bioctl.c
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2008-06-14 00:05:48 +0000
committerDamien Miller <djm@cvs.openbsd.org>2008-06-14 00:05:48 +0000
commitde17e7c1d8c4586ffaf272279bbef5c73b486cab (patch)
treea088bcceb11215e56b309532a7efb4b52e406cc4 /sbin/bioctl/bioctl.c
parentf1f426b40e35612518deccb9303d6ea8d7e706a5 (diff)
friendly error message when key decryption fails; ok hshoexer@
Diffstat (limited to 'sbin/bioctl/bioctl.c')
-rw-r--r--sbin/bioctl/bioctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/bioctl/bioctl.c b/sbin/bioctl/bioctl.c
index 4953a03282f..71387212b8a 100644
--- a/sbin/bioctl/bioctl.c
+++ b/sbin/bioctl/bioctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bioctl.c,v 1.65 2008/06/13 21:03:40 hshoexer Exp $ */
+/* $OpenBSD: bioctl.c,v 1.66 2008/06/14 00:05:47 djm Exp $ */
/*
* Copyright (c) 2004, 2005 Marco Peereboom
@@ -673,8 +673,11 @@ bio_createraid(u_int16_t level, char *dev_list)
rv = ioctl(devh, BIOCCREATERAID, &create);
memset(&kdfinfo, 0, sizeof(kdfinfo));
- if (rv == -1)
+ if (rv == -1) {
+ if (errno == EPERM)
+ errx(1, "Incorrect passphrase");
err(1, "BIOCCREATERAID");
+ }
free(dt);
}