summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-07-26 00:56:26 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-07-26 00:56:26 +0000
commit45430ffd362f97bc0b90e19bf6ed5def0be1183d (patch)
tree085b385d010cfc9889777d33fe43bbf71837fdf7 /sys/arch/i386
parent1a4982f160fb53ac0e92f2109021824e88a0c6ff (diff)
Reduce verbosity during dkcsum by moving open/read/close error
messages inside #ifdef DEBUG/#endif sections. Helps with usb card readers and such that will often have no media. ok weingart@ tom@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/dkcsum.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sys/arch/i386/i386/dkcsum.c b/sys/arch/i386/i386/dkcsum.c
index 958782494b2..4b703685f3a 100644
--- a/sys/arch/i386/i386/dkcsum.c
+++ b/sys/arch/i386/i386/dkcsum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dkcsum.c,v 1.17 2005/07/23 14:48:34 krw Exp $ */
+/* $OpenBSD: dkcsum.c,v 1.18 2005/07/26 00:56:25 krw Exp $ */
/*-
* Copyright (c) 1997 Niklas Hallqvist. All rights reserved.
@@ -94,9 +94,10 @@ dkcsumattach(void)
error = (*bdsw->d_open)(dev, FREAD, S_IFCHR, curproc);
if (error) {
/* XXX What to do here? */
- if (error != ENODEV)
- printf("dkcsum: open of %s failed (%d)\n",
- dv->dv_xname, error);
+#ifdef DEBUG
+ printf("dkcsum: open of %s failed (%d)\n",
+ dv->dv_xname, error);
+#endif
continue;
}
@@ -108,19 +109,25 @@ dkcsumattach(void)
(*bdsw->d_strategy)(bp);
if ((error = biowait(bp))) {
/* XXX What to do here? */
+#ifdef DEBUG
printf("dkcsum: read of %s failed (%d)\n",
dv->dv_xname, error);
+#endif
error = (*bdsw->d_close)(dev, 0, S_IFCHR, curproc);
+#ifdef DEBUG
if (error)
printf("dkcsum: close of %s failed (%d)\n",
dv->dv_xname, error);
+#endif
continue;
}
error = (*bdsw->d_close)(dev, FREAD, S_IFCHR, curproc);
if (error) {
/* XXX What to do here? */
+#ifdef DEBUG
printf("dkcsum: close of %s failed (%d)\n",
dv->dv_xname, error);
+#endif
continue;
}