Use aprint*().

This commit is contained in:
thorpej 2003-05-13 03:00:07 +00:00
parent 50e0b3a100
commit 292b5a8b0c
2 changed files with 21 additions and 17 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsiconf.c,v 1.204 2003/05/02 12:27:49 fvdl Exp $ */
/* $NetBSD: scsiconf.c,v 1.205 2003/05/13 03:02:36 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.204 2003/05/02 12:27:49 fvdl Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.205 2003/05/13 03:02:36 thorpej Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -175,7 +175,8 @@ scsibusattach(parent, self, aux)
sc->sc_channel = chan;
chan->chan_name = sc->sc_dev.dv_xname;
printf(": %d target%s, %d lun%s per target\n",
aprint_naive(": SCSI bus\n");
aprint_normal(": %d target%s, %d lun%s per target\n",
chan->chan_ntargets,
chan->chan_ntargets == 1 ? "" : "s",
chan->chan_nluns,
@ -190,10 +191,10 @@ scsibusattach(parent, self, aux)
TAILQ_INSERT_TAIL(&scsi_initq_head, scsi_initq, scsi_initq);
config_pending_incr();
if (scsipi_channel_init(chan)) {
printf(": failed to init channel\n");
aprint_error("%s: failed to init channel\n",
sc->sc_dev.dv_xname);
return;
}
}
void
@ -209,7 +210,8 @@ scsibus_config(chan, arg)
#endif
if ((chan->chan_flags & SCSIPI_CHAN_NOSETTLE) == 0 &&
SCSI_DELAY > 0) {
printf("%s: waiting %d seconds for devices to settle...\n",
aprint_normal(
"%s: waiting %d seconds for devices to settle...\n",
sc->sc_dev.dv_xname, SCSI_DELAY);
/* ...an identifier we know no one will use... */
(void) tsleep(scsibus_config, PRIBIO,
@ -734,7 +736,8 @@ scsi_probe_device(sc, target, lun)
periph = scsipi_alloc_periph(M_NOWAIT);
if (periph == NULL) {
#ifdef DIAGNOSTIC
printf("%s: cannot allocate periph for target %d lun %d\n",
aprint_error(
"%s: cannot allocate periph for target %d lun %d\n",
sc->sc_dev.dv_xname, target, lun);
#endif
return (ENOMEM);
@ -950,7 +953,7 @@ scsi_probe_device(sc, target, lun)
(void) config_attach(&sc->sc_dev, cf, &sa, scsibusprint);
} else {
scsibusprint(&sa, sc->sc_dev.dv_xname);
printf(" not configured\n");
aprint_normal(" not configured\n");
goto bad;
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: sd.c,v 1.199 2003/05/10 23:12:47 thorpej Exp $ */
/* $NetBSD: sd.c,v 1.200 2003/05/13 03:00:07 thorpej Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -54,7 +54,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.199 2003/05/10 23:12:47 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: sd.c,v 1.200 2003/05/13 03:00:07 thorpej Exp $");
#include "opt_scsi.h"
#include "opt_bufq.h"
@ -187,7 +187,8 @@ sdattach(parent, sd, periph, ops)
/*
* Use the subdriver to request information regarding the drive.
*/
printf("\n");
aprint_naive("\n");
aprint_normal("\n");
error = scsipi_start(periph, SSS_START,
XS_CTL_DISCOVERY | XS_CTL_IGNORE_ILLEGAL_REQUEST |
@ -198,23 +199,23 @@ sdattach(parent, sd, periph, ops)
else
result = (*sd->sc_ops->sdo_get_parms)(sd, &sd->params,
XS_CTL_DISCOVERY);
printf("%s: ", sd->sc_dev.dv_xname);
aprint_normal("%s: ", sd->sc_dev.dv_xname);
switch (result) {
case SDGP_RESULT_OK:
format_bytes(pbuf, sizeof(pbuf),
(u_int64_t)dp->disksize * dp->blksize);
printf(
aprint_normal(
"%s, %ld cyl, %ld head, %ld sec, %ld bytes/sect x %llu sectors",
pbuf, dp->cyls, dp->heads, dp->sectors, dp->blksize,
(unsigned long long)dp->disksize);
break;
case SDGP_RESULT_OFFLINE:
printf("drive offline");
aprint_normal("drive offline");
break;
case SDGP_RESULT_UNFORMATTED:
printf("unformatted media");
aprint_normal("unformatted media");
break;
#ifdef DIAGNOSTIC
@ -223,7 +224,7 @@ sdattach(parent, sd, periph, ops)
break;
#endif
}
printf("\n");
aprint_normal("\n");
/*
* Establish a shutdown hook so that we can ensure that
@ -235,7 +236,7 @@ sdattach(parent, sd, periph, ops)
*/
if ((sd->sc_sdhook =
shutdownhook_establish(sd_shutdown, sd)) == NULL)
printf("%s: WARNING: unable to establish shutdown hook\n",
aprint_error("%s: WARNING: unable to establish shutdown hook\n",
sd->sc_dev.dv_xname);
#if NRND > 0