summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2007-02-15 00:53:27 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2007-02-15 00:53:27 +0000
commit95282b6858723d99be5ee46ba619aaaaf5c3aadd (patch)
tree1f216ad3bfeb5ecbce45f9779c3d3c4fc87ba8e1 /sys
parent36dca6184bb3cf55c9ec2fa4270d3a9f57bc7ecc (diff)
Don't print the error strings returned by readdisklabel(). If you
need the debug info uncomment the printf's you need. Crude but effective way to suppress 'no disklabel' errors that pop up at the most innconvenient times to frighten users. More elegant method, DPRINTF-like constructs or something, later. "Yay!" marco@ ok deraadt@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/sparc/dev/fd.c4
-rw-r--r--sys/arch/sparc/dev/xd.c4
-rw-r--r--sys/arch/sparc/dev/xy.c4
-rw-r--r--sys/arch/sparc64/dev/fd.c4
-rw-r--r--sys/arch/vax/mba/hp.c7
-rw-r--r--sys/arch/vax/mscp/mscp_disk.c8
-rw-r--r--sys/arch/vax/vsa/hdc9224.c7
-rw-r--r--sys/dev/ata/wd.c4
-rw-r--r--sys/dev/flash.c7
-rw-r--r--sys/dev/isa/fd.c4
-rw-r--r--sys/dev/raidframe/rf_openbsdkintf.c4
11 files changed, 30 insertions, 27 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 9f1977266a1..257d83fe0a2 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.46 2006/11/29 12:24:17 miod Exp $ */
+/* $OpenBSD: fd.c,v 1.47 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -1985,7 +1985,7 @@ fdgetdisklabel(dev)
*/
errstring = readdisklabel(dev, fdstrategy, lp, clp, 0);
if (errstring) {
- printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);
+ /*printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);*/
}
}
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index 690fd0af3e4..1aa62b5e11e 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.33 2006/12/03 16:40:43 miod Exp $ */
+/* $OpenBSD: xd.c,v 1.34 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -309,7 +309,7 @@ xdgetdisklabel(xd, b)
xddummystrat,
xd->sc_dk.dk_label, xd->sc_dk.dk_cpulabel, 0);
if (err) {
- printf("%s: %s\n", xd->sc_dev.dv_xname, err);
+ /*printf("%s: %s\n", xd->sc_dev.dv_xname, err);*/
return(XD_ERR_FAIL);
}
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index 9b4b3a7c53c..b89291a05f1 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.29 2006/12/03 16:40:43 miod Exp $ */
+/* $OpenBSD: xy.c,v 1.30 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -249,7 +249,7 @@ xygetdisklabel(xy, b)
xydummystrat,
xy->sc_dk.dk_label, xy->sc_dk.dk_cpulabel, 0);
if (err) {
- printf("%s: %s\n", xy->sc_dev.dv_xname, err);
+ /*printf("%s: %s\n", xy->sc_dev.dv_xname, err);*/
return(XY_ERR_FAIL);
}
diff --git a/sys/arch/sparc64/dev/fd.c b/sys/arch/sparc64/dev/fd.c
index 2aaa9286441..2d722fbe8c8 100644
--- a/sys/arch/sparc64/dev/fd.c
+++ b/sys/arch/sparc64/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.8 2006/11/29 12:24:17 miod Exp $ */
+/* $OpenBSD: fd.c,v 1.9 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: fd.c,v 1.112 2003/08/07 16:29:35 agc Exp $ */
/*-
@@ -2035,7 +2035,7 @@ fdgetdisklabel(dev)
*/
errstring = readdisklabel(dev, fdstrategy, lp, clp, 0);
if (errstring) {
- printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);
+ /*printf("%s: %s\n", fd->sc_dv.dv_xname, errstring);*/
}
}
diff --git a/sys/arch/vax/mba/hp.c b/sys/arch/vax/mba/hp.c
index e0f8a55521d..21e603384d6 100644
--- a/sys/arch/vax/mba/hp.c
+++ b/sys/arch/vax/mba/hp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hp.c,v 1.15 2004/02/15 02:45:46 tedu Exp $ */
+/* $OpenBSD: hp.c,v 1.16 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: hp.c,v 1.22 2000/02/12 16:09:33 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -163,8 +163,9 @@ hpattach(parent, self, aux)
* Read in label.
*/
if ((msg = readdisklabel(makedev(0, self->dv_unit * 8), hpstrategy,
- dl, NULL)) != NULL)
- printf(": %s", msg);
+ dl, NULL)) != NULL) {
+ /*printf(": %s", msg);*/
+ }
printf(": %.*s, size = %d sectors\n",
(int)sizeof(dl->d_typename), dl->d_typename, dl->d_secperunit);
/*
diff --git a/sys/arch/vax/mscp/mscp_disk.c b/sys/arch/vax/mscp/mscp_disk.c
index 01e2baf26aa..1a3690bd8e4 100644
--- a/sys/arch/vax/mscp/mscp_disk.c
+++ b/sys/arch/vax/mscp/mscp_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mscp_disk.c,v 1.17 2006/07/12 19:56:18 thib Exp $ */
+/* $OpenBSD: mscp_disk.c,v 1.18 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -163,9 +163,9 @@ ra_putonline(ra)
ra->ra_state = DK_RDLABEL;
printf("%s", ra->ra_dev.dv_xname);
if ((msg = readdisklabel(MAKEDISKDEV(RAMAJOR, ra->ra_dev.dv_unit,
- RAW_PART), rastrategy, dl, NULL, 0)) != NULL)
- printf(": %s", msg);
- else {
+ RAW_PART), rastrategy, dl, NULL, 0)) != NULL) {
+ /*printf(": %s", msg);*/
+ } else {
ra->ra_havelabel = 1;
ra->ra_state = DK_OPEN;
}
diff --git a/sys/arch/vax/vsa/hdc9224.c b/sys/arch/vax/vsa/hdc9224.c
index c45fceaa751..692f059a240 100644
--- a/sys/arch/vax/vsa/hdc9224.c
+++ b/sys/arch/vax/vsa/hdc9224.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hdc9224.c,v 1.13 2006/11/06 20:28:23 miod Exp $ */
+/* $OpenBSD: hdc9224.c,v 1.14 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: hdc9224.c,v 1.16 2001/07/26 15:05:09 wiz Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
@@ -368,8 +368,9 @@ hdattach(struct device *parent, struct device *self, void *aux)
printf("%s: %luMB, %lu sectors\n",
hd->sc_dev.dv_xname, dl->d_secperunit / (1048576 / DEV_BSIZE),
dl->d_secperunit);
- if (msg)
- printf("%s: %s\n", hd->sc_dev.dv_xname, msg);
+ if (msg) {
+ /*printf("%s: %s\n", hd->sc_dev.dv_xname, msg);*/
+ }
#ifdef HDDEBUG
hdc_printgeom(&hd->sc_xbn);
#endif
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c
index 7b837ba1896..75814b4b3b4 100644
--- a/sys/dev/ata/wd.c
+++ b/sys/dev/ata/wd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wd.c,v 1.52 2007/02/06 03:17:24 krw Exp $ */
+/* $OpenBSD: wd.c,v 1.53 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -853,7 +853,7 @@ wdgetdisklabel(dev_t dev, struct wd_softc *wd, struct disklabel *lp,
wdstrategy, lp, clp, spoofonly);
}
if (errstring) {
- printf("%s: %s\n", wd->sc_dev.dv_xname, errstring);
+ /*printf("%s: %s\n", wd->sc_dev.dv_xname, errstring);*/
return;
}
diff --git a/sys/dev/flash.c b/sys/dev/flash.c
index 0fa721463e2..ed46c3f6c00 100644
--- a/sys/dev/flash.c
+++ b/sys/dev/flash.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: flash.c,v 1.1 2006/11/25 14:32:00 uwe Exp $ */
+/* $OpenBSD: flash.c,v 1.2 2007/02/15 00:53:26 krw Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@openbsd.org>
@@ -1030,8 +1030,9 @@ flashgetdisklabel(dev_t dev, struct flash_softc *sc,
labeldev = flashlabeldev(dev);
errstring = readdisklabel(labeldev, flashstrategy, lp, clp,
spoofonly);
- if (errstring != NULL)
- printf("%s: %s\n", sc->sc_dev.dv_xname, errstring);
+ if (errstring != NULL) {
+ /*printf("%s: %s\n", sc->sc_dev.dv_xname, errstring);*/
+ }
}
/*
diff --git a/sys/dev/isa/fd.c b/sys/dev/isa/fd.c
index 89722be6b6e..00be031c20e 100644
--- a/sys/dev/isa/fd.c
+++ b/sys/dev/isa/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.59 2007/02/14 00:53:48 jsg Exp $ */
+/* $OpenBSD: fd.c,v 1.60 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: fd.c,v 1.90 1996/05/12 23:12:03 mycroft Exp $ */
/*-
@@ -997,7 +997,7 @@ fdioctl(dev, cmd, addr, flag, p)
errstring = readdisklabel(dev, fdstrategy, lp, &cdl, 0);
if (errstring) {
- /*printf("%s: %s\n", fd->sc_dev.dv_xname, errstring); */
+ /*printf("%s: %s\n", fd->sc_dev.dv_xname, errstring);*/
}
*(struct disklabel *)addr = *lp;
diff --git a/sys/dev/raidframe/rf_openbsdkintf.c b/sys/dev/raidframe/rf_openbsdkintf.c
index 30301ffc157..d1e294f06cb 100644
--- a/sys/dev/raidframe/rf_openbsdkintf.c
+++ b/sys/dev/raidframe/rf_openbsdkintf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rf_openbsdkintf.c,v 1.33 2006/03/05 21:48:56 miod Exp $ */
+/* $OpenBSD: rf_openbsdkintf.c,v 1.34 2007/02/15 00:53:26 krw Exp $ */
/* $NetBSD: rf_netbsdkintf.c,v 1.109 2001/07/27 03:30:07 oster Exp $ */
/*-
@@ -2155,7 +2155,7 @@ raidgetdisklabel(dev_t dev)
errstring = readdisklabel(RAIDLABELDEV(dev), raidstrategy, lp,
rs->sc_dkdev.dk_cpulabel, 0);
if (errstring) {
- printf("%s: %s\n", rs->sc_xname, errstring);
+ /*printf("%s: %s\n", rs->sc_xname, errstring);*/
return;
/*raidmakedisklabel(rs);*/
}