summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2004-10-15 06:41:35 +0000
committerthorpej <thorpej@NetBSD.org>2004-10-15 06:41:35 +0000
commitfae7cbfa653940df0a39bb2ff4e4f1a0c8c5f306 (patch)
tree605abffe042c5bf2a9cf8ede5bb312bfbd893539 /sys
parent32ca684d7235c29c8f1824e5c69d70b1222a3378 (diff)
rf_find_raid_components():
- If DIOCGDINFO failed with ENOTTY, don't print an error message; wedges don't support that ioctl. Clean up the error message. - If DIOCGDINFO fails, don't proceed to examine an invalid disklabel structure.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 6b10e3f6f27..1a922c1adf7 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.180 2004/07/01 17:48:45 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.181 2004/10/15 06:41:35 thorpej Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.180 2004/07/01 17:48:45 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.181 2004/10/15 06:41:35 thorpej Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -2670,8 +2670,9 @@ rf_find_raid_components()
* XXX can't happen - open() would
* have errored out (or faked up one)
*/
- printf("can't get label for dev %s%c (%d)!?!?\n",
- dv->dv_xname, 'a' + RAW_PART, error);
+ if (error != ENOTTY)
+ printf("RAIDframe: can't get label for dev "
+ "%s (%d)\n", dv->dv_xname, error);
}
/* don't need this any more. We'll allocate it again
@@ -2680,6 +2681,9 @@ rf_find_raid_components()
VOP_CLOSE(vp, FREAD | FWRITE, NOCRED, 0);
vput(vp);
+ if (error)
+ continue;
+
for (i=0; i < label.d_npartitions; i++) {
/* We only support partitions marked as RAID */
if (label.d_partitions[i].p_fstype != FS_RAID)