diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-02-15 00:53:27 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2007-02-15 00:53:27 +0000 |
commit | 95282b6858723d99be5ee46ba619aaaaf5c3aadd (patch) | |
tree | 1f216ad3bfeb5ecbce45f9779c3d3c4fc87ba8e1 /sys/arch | |
parent | 36dca6184bb3cf55c9ec2fa4270d3a9f57bc7ecc (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/arch')
-rw-r--r-- | sys/arch/sparc/dev/fd.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc/dev/xy.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/fd.c | 4 | ||||
-rw-r--r-- | sys/arch/vax/mba/hp.c | 7 | ||||
-rw-r--r-- | sys/arch/vax/mscp/mscp_disk.c | 8 | ||||
-rw-r--r-- | sys/arch/vax/vsa/hdc9224.c | 7 |
7 files changed, 20 insertions, 18 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 |