summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2011-06-05 11:09:01 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2011-06-05 11:09:01 +0000
commit58a27a8073a914242efde729c6eae51e3b826d94 (patch)
treeb29121165fefacde04cc8dda061f7a59f643d81e /sys/dev
parentf7d0db52e5fff77b2e0bfe31a8b6ec3b6623e606 (diff)
Fix function names in debug printfs and use a more user-friendly error
message if the key disk cannot be opened. ok marco (some time ago)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/softraid_crypto.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 4681d716a33..fd359681f7a 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.66 2011/05/20 19:37:58 mikeb Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.67 2011/06/05 11:09:00 stsp Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -671,13 +671,12 @@ sr_crypto_create_key_disk(struct sr_discipline *sd, dev_t dev)
/* Open device. */
if (bdevvp(dev, &vn)) {
- printf("%s:, sr_create_key_disk: can't allocate vnode\n",
- DEVNAME(sc));
+ printf("%s: cannot open key disk %s\n", DEVNAME(sc), devname);
goto done;
}
if (VOP_OPEN(vn, FREAD | FWRITE, NOCRED, curproc)) {
- DNPRINTF(SR_D_META,"%s: sr_create_key_disk cannot open %s\n",
- DEVNAME(sc), devname);
+ DNPRINTF(SR_D_META,"%s: sr_crypto_create_key_disk cannot "
+ "open %s\n", DEVNAME(sc), devname);
vput(vn);
goto fail;
}
@@ -687,8 +686,8 @@ sr_crypto_create_key_disk(struct sr_discipline *sd, dev_t dev)
part = DISKPART(dev);
if (VOP_IOCTL(vn, DIOCGDINFO, (caddr_t)&label,
FREAD, NOCRED, curproc)) {
- DNPRINTF(SR_D_META, "%s: sr_create_key_disk ioctl failed\n",
- DEVNAME(sc));
+ DNPRINTF(SR_D_META, "%s: sr_crypto_create_key_disk ioctl "
+ "failed\n", DEVNAME(sc));
VOP_CLOSE(vn, FREAD | FWRITE, NOCRED, curproc);
vput(vn);
goto fail;
@@ -834,13 +833,12 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, dev_t dev)
/* Open device. */
if (bdevvp(dev, &vn)) {
- printf("%s:, sr_read_key_disk: can't allocate vnode\n",
- DEVNAME(sc));
+ printf("%s: cannot open key disk %s\n", DEVNAME(sc), devname);
goto done;
}
if (VOP_OPEN(vn, FREAD | FWRITE, NOCRED, curproc)) {
- DNPRINTF(SR_D_META,"%s: sr_read_key_disk cannot open %s\n",
- DEVNAME(sc), devname);
+ DNPRINTF(SR_D_META,"%s: sr_crypto_read_key_disk cannot "
+ "open %s\n", DEVNAME(sc), devname);
vput(vn);
goto done;
}
@@ -850,8 +848,8 @@ sr_crypto_read_key_disk(struct sr_discipline *sd, dev_t dev)
part = DISKPART(dev);
if (VOP_IOCTL(vn, DIOCGDINFO, (caddr_t)&label, FREAD,
NOCRED, curproc)) {
- DNPRINTF(SR_D_META, "%s: sr_read_key_disk ioctl failed\n",
- DEVNAME(sc));
+ DNPRINTF(SR_D_META, "%s: sr_crypto_read_key_disk ioctl "
+ "failed\n", DEVNAME(sc));
VOP_CLOSE(vn, FREAD | FWRITE, NOCRED, curproc);
vput(vn);
goto done;