From fae7cbfa653940df0a39bb2ff4e4f1a0c8c5f306 Mon Sep 17 00:00:00 2001 From: thorpej Date: Fri, 15 Oct 2004 06:41:35 +0000 Subject: 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. --- sys/dev/raidframe/rf_netbsdkintf.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sys/dev/raidframe') 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 -__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 #include @@ -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) -- cgit