diff options
| author | christos <christos@NetBSD.org> | 1996-10-10 23:32:59 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 1996-10-10 23:32:59 +0000 |
| commit | 9beb92aad72de7d89a7d7ac135138a92132e205f (patch) | |
| tree | 84740ca815b3c4d8e51feb998a689b39cb569462 /sys/dev | |
| parent | 01d75c7c68ef11d6f056bcd76fdfa6757fa53477 (diff) | |
printf -> kprintf, sprintf -> ksprintf
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/scsipi/cd.c | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/ch.c | 22 | ||||
| -rw-r--r-- | sys/dev/scsipi/scsi_base.c | 88 | ||||
| -rw-r--r-- | sys/dev/scsipi/scsiconf.c | 18 | ||||
| -rw-r--r-- | sys/dev/scsipi/scsipi_debug.h | 6 | ||||
| -rw-r--r-- | sys/dev/scsipi/scsipi_ioctl.c | 16 | ||||
| -rw-r--r-- | sys/dev/scsipi/sd.c | 22 | ||||
| -rw-r--r-- | sys/dev/scsipi/ss.c | 4 | ||||
| -rw-r--r-- | sys/dev/scsipi/ss_mustek.c | 14 | ||||
| -rw-r--r-- | sys/dev/scsipi/st.c | 32 |
10 files changed, 114 insertions, 114 deletions
diff --git a/sys/dev/scsipi/cd.c b/sys/dev/scsipi/cd.c index 421d7c3a8ed..3ae7cf77700 100644 --- a/sys/dev/scsipi/cd.c +++ b/sys/dev/scsipi/cd.c @@ -1,4 +1,4 @@ -/* $NetBSD: cd.c,v 1.94 1996/08/13 08:55:38 explorer Exp $ */ +/* $NetBSD: cd.c,v 1.95 1996/10/10 23:34:14 christos Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -198,7 +198,7 @@ cdattach(parent, self, aux) if ((sa->sa_inqbuf->version & SID_ANSII) == 0) cd->flags |= CDF_ANCIENT; - printf("\n"); + kprintf("\n"); } /* @@ -588,7 +588,7 @@ cdstart(v) CDRETRIES, 30000, bp, SCSI_NOSLEEP | ((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) { disk_unbusy(&cd->sc_dk, 0); - printf("%s: not queued", cd->sc_dev.dv_xname); + kprintf("%s: not queued", cd->sc_dev.dv_xname); } } } diff --git a/sys/dev/scsipi/ch.c b/sys/dev/scsipi/ch.c index e184a9b7095..cfdb976d08d 100644 --- a/sys/dev/scsipi/ch.c +++ b/sys/dev/scsipi/ch.c @@ -1,4 +1,4 @@ -/* $NetBSD: ch.c,v 1.22 1996/09/18 02:34:31 thorpej Exp $ */ +/* $NetBSD: ch.c,v 1.23 1996/10/10 23:34:16 christos Exp $ */ /* * Copyright (c) 1996 Jason R. Thorpe <thorpej@and.com> @@ -145,16 +145,16 @@ chattach(parent, self, aux) link->device_softc = sc; link->openings = 1; - printf("\n"); + kprintf("\n"); /* * Get information about the device. Note we can't use * interrupts yet. */ if (ch_get_params(sc, SCSI_AUTOCONF)) - printf("%s: offline\n", sc->sc_dev.dv_xname); + kprintf("%s: offline\n", sc->sc_dev.dv_xname); else { - printf("%s: %d slot%s, %d drive%s, %d picker%s", + kprintf("%s: %d slot%s, %d drive%s, %d picker%s", sc->sc_dev.dv_xname, sc->sc_counts[CHET_ST], (sc->sc_counts[CHET_ST] > 1) ? "s" : "", @@ -163,15 +163,15 @@ chattach(parent, self, aux) sc->sc_counts[CHET_MT], (sc->sc_counts[CHET_MT] > 1) ? "s" : ""); if (sc->sc_counts[CHET_IE]) - printf(", %d portal%s", sc->sc_counts[CHET_IE], + kprintf(", %d portal%s", sc->sc_counts[CHET_IE], (sc->sc_counts[CHET_IE] > 1) ? "s" : ""); - printf("\n"); + kprintf("\n"); #ifdef CHANGER_DEBUG - printf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n", + kprintf("%s: move mask: 0x%x 0x%x 0x%x 0x%x\n", sc->sc_dev.dv_xname, sc->sc_movemask[CHET_MT], sc->sc_movemask[CHET_ST], sc->sc_movemask[CHET_IE], sc->sc_movemask[CHET_DT]); - printf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n", + kprintf("%s: exchange mask: 0x%x 0x%x 0x%x 0x%x\n", sc->sc_dev.dv_xname, sc->sc_exchangemask[CHET_MT], sc->sc_exchangemask[CHET_ST], sc->sc_exchangemask[CHET_IE], sc->sc_exchangemask[CHET_DT]); @@ -521,7 +521,7 @@ ch_usergetelemstatus(sc, chet, uptr) st_hdr = (struct read_element_status_header *)data; avail = _2btol(st_hdr->count); if (avail != sc->sc_counts[chet]) - printf("%s: warning, READ ELEMENT STATUS avail != count\n", + kprintf("%s: warning, READ ELEMENT STATUS avail != count\n", sc->sc_dev.dv_xname); user_data = (u_int8_t *)malloc(avail, M_DEVBUF, M_WAITOK); @@ -605,7 +605,7 @@ ch_get_params(sc, scsiflags) sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES, 6000, NULL, scsiflags | SCSI_DATA_IN); if (error) { - printf("%s: could not sense element address page\n", + kprintf("%s: could not sense element address page\n", sc->sc_dev.dv_xname); return (error); } @@ -634,7 +634,7 @@ ch_get_params(sc, scsiflags) sizeof(cmd), (u_char *)&sense_data, sizeof(sense_data), CHRETRIES, 6000, NULL, scsiflags | SCSI_DATA_IN); if (error) { - printf("%s: could not sense capabilities page\n", + kprintf("%s: could not sense capabilities page\n", sc->sc_dev.dv_xname); return (error); } diff --git a/sys/dev/scsipi/scsi_base.c b/sys/dev/scsipi/scsi_base.c index fedffbd2bba..b670dbf2d10 100644 --- a/sys/dev/scsipi/scsi_base.c +++ b/sys/dev/scsipi/scsi_base.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsi_base.c,v 1.38 1996/09/03 18:20:33 thorpej Exp $ */ +/* $NetBSD: scsi_base.c,v 1.39 1996/10/10 23:34:17 christos Exp $ */ /* * Copyright (c) 1994, 1995 Charles Hannum. All rights reserved. @@ -106,7 +106,7 @@ scsi_get_xs(sc_link, flags) ((flags & SCSI_NOSLEEP) != 0 ? M_NOWAIT : M_WAITOK)); if (!xs) { sc_print_addr(sc_link); - printf("cannot allocate scsi xs\n"); + kprintf("cannot allocate scsi xs\n"); return 0; } } @@ -217,7 +217,7 @@ scsi_size(sc_link, flags) sizeof(scsi_cmd), (u_char *)&rdcap, sizeof(rdcap), 2, 20000, NULL, flags | SCSI_DATA_IN) != 0) { sc_print_addr(sc_link); - printf("could not get size\n"); + kprintf("could not get size\n"); return 0; } @@ -563,7 +563,7 @@ sc_err1(xs, async) default: sc_print_addr(xs->sc_link); - printf("unknown error category from scsi driver\n"); + kprintf("unknown error category from scsi driver\n"); error = EIO; break; } @@ -623,25 +623,25 @@ scsi_interpret_sense(xs) #ifdef SCSIDEBUG if ((sc_link->flags & SDEV_DB1) != 0) { int count; - printf("code%x valid%x ", + kprintf("code%x valid%x ", sense->error_code & SSD_ERRCODE, sense->error_code & SSD_ERRCODE_VALID ? 1 : 0); - printf("seg%x key%x ili%x eom%x fmark%x\n", + kprintf("seg%x key%x ili%x eom%x fmark%x\n", sense->segment, sense->flags & SSD_KEY, sense->flags & SSD_ILI ? 1 : 0, sense->flags & SSD_EOM ? 1 : 0, sense->flags & SSD_FILEMARK ? 1 : 0); - printf("info: %x %x %x %x followed by %d extra bytes\n", + kprintf("info: %x %x %x %x followed by %d extra bytes\n", sense->info[0], sense->info[1], sense->info[2], sense->info[3], sense->extra_len); - printf("extra: "); + kprintf("extra: "); for (count = 0; count < sense->extra_len; count++) - printf("%x ", sense->extra_bytes[count]); - printf("\n"); + kprintf("%x ", sense->extra_bytes[count]); + kprintf("\n"); } #endif /*SCSIDEBUG */ /* @@ -663,7 +663,7 @@ scsi_interpret_sense(xs) case 0x71: /* delayed error */ sc_print_addr(sc_link); key = sense->flags & SSD_KEY; - printf(" DELAYED ERROR, key = 0x%x\n", key); + kprintf(" DELAYED ERROR, key = 0x%x\n", key); case 0x70: if ((sense->error_code & SSD_ERRCODE_VALID) != 0) info = _4btol(sense->info); @@ -725,7 +725,7 @@ scsi_interpret_sense(xs) if (key) { sc_print_addr(sc_link); - printf("%s", error_mes[key - 1]); + kprintf("%s", error_mes[key - 1]); if ((sense->error_code & SSD_ERRCODE_VALID) != 0) { switch (key) { case 0x2: /* NOT READY */ @@ -734,26 +734,26 @@ scsi_interpret_sense(xs) case 0x7: /* DATA PROTECT */ break; case 0x8: /* BLANK CHECK */ - printf(", requested size: %d (decimal)", + kprintf(", requested size: %d (decimal)", info); break; case 0xb: if (xs->retries) - printf(", retrying"); - printf(", cmd 0x%x, info 0x%x", + kprintf(", retrying"); + kprintf(", cmd 0x%x, info 0x%x", xs->cmd->opcode, info); break; default: - printf(", info = %d (decimal)", info); + kprintf(", info = %d (decimal)", info); } } if (sense->extra_len != 0) { int n; - printf(", data ="); + kprintf(", data ="); for (n = 0; n < sense->extra_len; n++) - printf(" %02x", sense->extra_bytes[n]); + kprintf(" %02x", sense->extra_bytes[n]); } - printf("\n"); + kprintf("\n"); } return error; @@ -762,15 +762,15 @@ scsi_interpret_sense(xs) */ default: sc_print_addr(sc_link); - printf("error code %d", + kprintf("error code %d", sense->error_code & SSD_ERRCODE); if ((sense->error_code & SSD_ERRCODE_VALID) != 0) { struct scsi_sense_data_unextended *usense = (struct scsi_sense_data_unextended *)sense; - printf(" at block no. %d (decimal)", + kprintf(" at block no. %d (decimal)", _3btol(usense->block)); } - printf("\n"); + kprintf("\n"); return EIO; } } @@ -788,7 +788,7 @@ sc_print_addr(sc_link) struct scsi_link *sc_link; { - printf("%s(%s:%d:%d): ", + kprintf("%s(%s:%d:%d): ", sc_link->device_softc ? ((struct device *)sc_link->device_softc)->dv_xname : "probe", ((struct device *)sc_link->adapter_softc)->dv_xname, @@ -803,18 +803,18 @@ void show_scsi_xs(xs) struct scsi_xfer *xs; { - printf("xs(%p): ", xs); - printf("flg(0x%x)", xs->flags); - printf("sc_link(%p)", xs->sc_link); - printf("retr(0x%x)", xs->retries); - printf("timo(0x%x)", xs->timeout); - printf("cmd(%p)", xs->cmd); - printf("len(0x%x)", xs->cmdlen); - printf("data(%p)", xs->data); - printf("len(0x%x)", xs->datalen); - printf("res(0x%x)", xs->resid); - printf("err(0x%x)", xs->error); - printf("bp(%p)", xs->bp); + kprintf("xs(%p): ", xs); + kprintf("flg(0x%x)", xs->flags); + kprintf("sc_link(%p)", xs->sc_link); + kprintf("retr(0x%x)", xs->retries); + kprintf("timo(0x%x)", xs->timeout); + kprintf("cmd(%p)", xs->cmd); + kprintf("len(0x%x)", xs->cmdlen); + kprintf("data(%p)", xs->data); + kprintf("len(0x%x)", xs->datalen); + kprintf("res(0x%x)", xs->resid); + kprintf("err(0x%x)", xs->error); + kprintf("bp(%p)", xs->bp); show_scsi_cmd(xs); } @@ -826,19 +826,19 @@ show_scsi_cmd(xs) int i = 0; sc_print_addr(xs->sc_link); - printf("command: "); + kprintf("command: "); if ((xs->flags & SCSI_RESET) == 0) { while (i < xs->cmdlen) { if (i) - printf(","); - printf("%x", b[i++]); + kprintf(","); + kprintf("%x", b[i++]); } - printf("-[%d bytes]\n", xs->datalen); + kprintf("-[%d bytes]\n", xs->datalen); if (xs->datalen) show_mem(xs->data, min(64, xs->datalen)); } else - printf("-RESET-\n"); + kprintf("-RESET-\n"); } void @@ -848,12 +848,12 @@ show_mem(address, num) { int x; - printf("------------------------------"); + kprintf("------------------------------"); for (x = 0; x < num; x++) { if ((x % 16) == 0) - printf("\n%03d: ", x); - printf("%02x ", *address++); + kprintf("\n%03d: ", x); + kprintf("%02x ", *address++); } - printf("\n------------------------------\n"); + kprintf("\n------------------------------\n"); } #endif /*SCSIDEBUG */ diff --git a/sys/dev/scsipi/scsiconf.c b/sys/dev/scsipi/scsiconf.c index 60d579a86c0..c621d390f18 100644 --- a/sys/dev/scsipi/scsiconf.c +++ b/sys/dev/scsipi/scsiconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsiconf.c,v 1.63 1996/09/03 18:20:35 thorpej Exp $ */ +/* $NetBSD: scsiconf.c,v 1.64 1996/10/10 23:34:20 christos Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -106,11 +106,11 @@ scsiprint(aux, pnp) /* only "scsibus"es can attach to "scsi"s; easy. */ if (pnp) - printf("scsibus at %s", pnp); + kprintf("scsibus at %s", pnp); /* don't print channel if the controller says there can be only one. */ if (l->channel != SCSI_CHANNEL_ONLY_ONE) - printf(" channel %d", l->channel); + kprintf(" channel %d", l->channel); return (UNCONF); } @@ -151,10 +151,10 @@ scsibusattach(parent, self, aux) sc_link_proto->scsibus = sb->sc_dev.dv_unit; sb->adapter_link = sc_link_proto; - printf("\n"); + kprintf("\n"); #if defined(SCSI_DELAY) && SCSI_DELAY > 2 - printf("%s: waiting for scsi devices to settle\n", + kprintf("%s: waiting for scsi devices to settle\n", sb->sc_dev.dv_xname); #else /* SCSI_DELAY > 2 */ #undef SCSI_DELAY @@ -436,7 +436,7 @@ scsibusprint(aux, pnp) int target, lun; if (pnp != NULL) - printf("%s", pnp); + kprintf("%s", pnp); inqbuf = sa->sa_inqbuf; @@ -512,7 +512,7 @@ scsibusprint(aux, pnp) scsi_strvis(product, inqbuf->product, 16); scsi_strvis(revision, inqbuf->revision, 4); - printf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s", + kprintf(" targ %d lun %d: <%s, %s, %s> SCSI%d %d/%s %s%s", target, lun, vendor, product, revision, inqbuf->version & SID_ANSII, type, dtype, removable ? "removable" : "fixed", qtype); @@ -643,7 +643,7 @@ scsi_probedev(scsi, target, lun) config_attach((struct device *)scsi, cf, &sa, scsibusprint); } else { scsibusprint(&sa, scsi->sc_dev.dv_xname); - printf(" not configured\n"); + kprintf(" not configured\n"); goto bad; } @@ -696,7 +696,7 @@ scsi_inqmatch(inqbuf, base, nmatches, matchsize, bestpriority) priority += len; #if SCSIDEBUG - printf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n", + kprintf("scsi_inqmatch: %d/%d/%d <%s, %s, %s>\n", priority, match->type, match->removable, match->vendor, match->product, match->revision); #endif diff --git a/sys/dev/scsipi/scsipi_debug.h b/sys/dev/scsipi/scsipi_debug.h index 68ab9ffd225..7cf19fea515 100644 --- a/sys/dev/scsipi/scsipi_debug.h +++ b/sys/dev/scsipi/scsipi_debug.h @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_debug.h,v 1.5 1994/12/28 19:43:00 mycroft Exp $ */ +/* $NetBSD: scsipi_debug.h,v 1.6 1996/10/10 23:34:18 christos Exp $ */ /* * Written by Julian Elischer (julian@tfs.com) @@ -28,11 +28,11 @@ #define SC_DEBUG(sc_link,Level,Printstuff) \ if ((sc_link)->flags & (Level)) { \ sc_print_addr(sc_link); \ - printf Printstuff; \ + kprintf Printstuff; \ } #define SC_DEBUGN(sc_link,Level,Printstuff) \ if ((sc_link)->flags & (Level)) { \ - printf Printstuff; \ + kprintf Printstuff; \ } #else #define SC_DEBUG(A,B,C) diff --git a/sys/dev/scsipi/scsipi_ioctl.c b/sys/dev/scsipi/scsipi_ioctl.c index 06ad2198f4a..bdd30e0a7c6 100644 --- a/sys/dev/scsipi/scsipi_ioctl.c +++ b/sys/dev/scsipi/scsipi_ioctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: scsipi_ioctl.c,v 1.21 1996/09/13 00:35:59 thorpej Exp $ */ +/* $NetBSD: scsipi_ioctl.c,v 1.22 1996/10/10 23:34:19 christos Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -127,13 +127,13 @@ scsi_user_done(xs) bp = xs->bp; if (!bp) { /* ALL user requests must have a buf */ sc_print_addr(xs->sc_link); - printf("User command with no buf\n"); + kprintf("User command with no buf\n"); return; } si = si_find(bp); if (!si) { sc_print_addr(xs->sc_link); - printf("User command with no ioctl\n"); + kprintf("User command with no ioctl\n"); return; } screq = &si->si_screq; @@ -156,7 +156,7 @@ scsi_user_done(xs) break; case XS_DRIVER_STUFFUP: sc_print_addr(sc_link); - printf("host adapter code inconsistency\n"); + kprintf("host adapter code inconsistency\n"); screq->retsts = SCCMD_UNKNOWN; break; case XS_TIMEOUT: @@ -169,7 +169,7 @@ scsi_user_done(xs) break; default: sc_print_addr(sc_link); - printf("unknown error category from host adapter code\n"); + kprintf("unknown error category from host adapter code\n"); screq->retsts = SCCMD_UNKNOWN; break; } @@ -205,7 +205,7 @@ scsistrategy(bp) si = si_find(bp); if (!si) { - printf("user_strat: No ioctl\n"); + kprintf("user_strat: No ioctl\n"); error = EINVAL; goto bad; } @@ -218,7 +218,7 @@ scsistrategy(bp) */ if (bp->b_bcount != screq->datalen) { sc_print_addr(sc_link); - printf("physio split the request.. cannot proceed\n"); + kprintf("physio split the request.. cannot proceed\n"); error = EIO; goto bad; } @@ -230,7 +230,7 @@ scsistrategy(bp) if (screq->cmdlen > sizeof(struct scsi_generic)) { sc_print_addr(sc_link); - printf("cmdlen too big\n"); + kprintf("cmdlen too big\n"); error = EFAULT; goto bad; } diff --git a/sys/dev/scsipi/sd.c b/sys/dev/scsipi/sd.c index 0c7a342e714..c870857f3ce 100644 --- a/sys/dev/scsipi/sd.c +++ b/sys/dev/scsipi/sd.c @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.102 1996/07/05 16:19:16 christos Exp $ */ +/* $NetBSD: sd.c,v 1.103 1996/10/10 23:34:22 christos Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -205,14 +205,14 @@ sdattach(parent, self, aux) * the drive. We cannot use interrupts yet, so the * request must specify this. */ - printf("\n"); - printf("%s: ", sd->sc_dev.dv_xname); + kprintf("\n"); + kprintf("%s: ", sd->sc_dev.dv_xname); if (scsi_start(sd->sc_link, SSS_START, SCSI_AUTOCONF | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT) || sd_get_parms(sd, SCSI_AUTOCONF) != 0) - printf("drive offline\n"); + kprintf("drive offline\n"); else - printf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n", + kprintf("%ldMB, %d cyl, %d head, %d sec, %d bytes/sec\n", dp->disksize / (1048576 / dp->blksize), dp->cyls, dp->heads, dp->sectors, dp->blksize); } @@ -603,7 +603,7 @@ sdstart(v) SDRETRIES, 10000, bp, SCSI_NOSLEEP | ((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT)); if (error) - printf("%s: not queued, error %d\n", + kprintf("%s: not queued, error %d\n", sd->sc_dev.dv_xname, error); } } @@ -801,7 +801,7 @@ sdgetdisklabel(sd) errstring = readdisklabel(MAKESDDEV(0, sd->sc_dev.dv_unit, RAW_PART), sdstrategy, lp, sd->sc_dk.dk_cpulabel); if (errstring) { - printf("%s: %s\n", sd->sc_dev.dv_xname, errstring); + kprintf("%s: %s\n", sd->sc_dev.dv_xname, errstring); return; } } @@ -918,12 +918,12 @@ sd_get_parms(sd, flags) fake_it: if ((sd->sc_link->quirks & SDEV_NOMODESENSE) == 0) { if (error == 0) - printf("%s: mode sense (%d) returned nonsense", + kprintf("%s: mode sense (%d) returned nonsense", sd->sc_dev.dv_xname, page); else - printf("%s: could not mode sense (4/5)", + kprintf("%s: could not mode sense (4/5)", sd->sc_dev.dv_xname); - printf("; using fictitious geometry\n"); + kprintf("; using fictitious geometry\n"); } /* * use adaptec standard fictitious geometry @@ -1070,7 +1070,7 @@ sddump(dev, blkno, va, size) return ENXIO; #else /* SD_DUMP_NOT_TRUSTED */ /* Let's just talk about this first... */ - printf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno); + kprintf("sd%d: dump addr 0x%x, blk %d\n", unit, va, blkno); delay(500 * 1000); /* half a second */ #endif /* SD_DUMP_NOT_TRUSTED */ diff --git a/sys/dev/scsipi/ss.c b/sys/dev/scsipi/ss.c index b7b040bc9e8..15302eea9e4 100644 --- a/sys/dev/scsipi/ss.c +++ b/sys/dev/scsipi/ss.c @@ -1,4 +1,4 @@ -/* $NetBSD: ss.c,v 1.11 1996/07/12 16:49:50 is Exp $ */ +/* $NetBSD: ss.c,v 1.12 1996/10/10 23:34:23 christos Exp $ */ /* * Copyright (c) 1995 Kenneth Stailey. All rights reserved. @@ -186,7 +186,7 @@ ssopen(dev, flag, mode, p) unit, ss_cd.cd_ndevs)); if (sc_link->flags & SDEV_OPEN) { - printf("%s: already open\n", ss->sc_dev.dv_xname); + kprintf("%s: already open\n", ss->sc_dev.dv_xname); return (EBUSY); } diff --git a/sys/dev/scsipi/ss_mustek.c b/sys/dev/scsipi/ss_mustek.c index b36840ee7f7..1474a748a06 100644 --- a/sys/dev/scsipi/ss_mustek.c +++ b/sys/dev/scsipi/ss_mustek.c @@ -1,4 +1,4 @@ -/* $NetBSD: ss_mustek.c,v 1.4 1996/05/05 19:52:57 christos Exp $ */ +/* $NetBSD: ss_mustek.c,v 1.5 1996/10/10 23:34:24 christos Exp $ */ /* * Copyright (c) 1995 Joachim Koenig-Baltes. All rights reserved. @@ -108,16 +108,16 @@ mustek_attach(ss, sa) SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: start\n")); ss->sio.scan_scanner_type = 0; - printf("\n%s: ", ss->sc_dev.dv_xname); + kprintf("\n%s: ", ss->sc_dev.dv_xname); /* first, check the model which determines resolutions */ if (!bcmp(sa->sa_inqbuf->product, "MFS-06000CX", 11)) { ss->sio.scan_scanner_type = MUSTEK_06000CX; - printf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n"); + kprintf("Mustek 6000CX Flatbed 3-pass color scanner, 3 - 600 dpi\n"); } if (!bcmp(sa->sa_inqbuf->product, "MFS-12000CX", 11)) { ss->sio.scan_scanner_type = MUSTEK_12000CX; - printf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n"); + kprintf("Mustek 12000CX Flatbed 3-pass color scanner, 6 - 1200 dpi\n"); } SC_DEBUG(sc_link, SDEV_DB1, ("mustek_attach: scanner_type = %d\n", @@ -485,7 +485,7 @@ mustek_read(ss, bp) if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd, sizeof(cmd), (u_char *) bp->b_data, bp->b_bcount, MUSTEK_RETRIES, 10000, bp, SCSI_NOSLEEP | SCSI_DATA_IN) != SUCCESSFULLY_QUEUED) - printf("%s: not queued\n", ss->sc_dev.dv_xname); + kprintf("%s: not queued\n", ss->sc_dev.dv_xname); else { ss->sio.scan_lines -= lines_to_read; ss->sio.scan_window_size -= bp->b_bcount; @@ -533,12 +533,12 @@ mustek_get_status(ss, timeout, update) bytes_per_line = _2ltol(data.bytes_per_line); lines = _3ltol(data.lines); if (lines != ss->sio.scan_lines) { - printf("mustek: lines actual(%d) != computed(%ld)\n", + kprintf("mustek: lines actual(%d) != computed(%ld)\n", lines, ss->sio.scan_lines); return (EIO); } if (bytes_per_line * lines != ss->sio.scan_window_size) { - printf("mustek: win-size actual(%d) != computed(%ld)\n", + kprintf("mustek: win-size actual(%d) != computed(%ld)\n", bytes_per_line * lines, ss->sio.scan_window_size); return (EIO); } diff --git a/sys/dev/scsipi/st.c b/sys/dev/scsipi/st.c index a5fef917bec..b1b09c297c5 100644 --- a/sys/dev/scsipi/st.c +++ b/sys/dev/scsipi/st.c @@ -1,4 +1,4 @@ -/* $NetBSD: st.c,v 1.67 1996/05/24 02:04:29 thorpej Exp $ */ +/* $NetBSD: st.c,v 1.68 1996/10/10 23:34:25 christos Exp $ */ /* * Copyright (c) 1994 Charles Hannum. All rights reserved. @@ -375,20 +375,20 @@ stattach(parent, self, aux) * the drive. We cannot use interrupts yet, so the * request must specify this. */ - printf("\n"); - printf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : ""); + kprintf("\n"); + kprintf("%s: %s", st->sc_dev.dv_xname, st->quirkdata ? "rogue, " : ""); if (scsi_test_unit_ready(sc_link, SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE) || st_mode_sense(st, SCSI_AUTOCONF | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE)) - printf("drive empty\n"); + kprintf("drive empty\n"); else { - printf("density code 0x%x, ", st->media_density); + kprintf("density code 0x%x, ", st->media_density); if (st->media_blksize > 0) - printf("%d-byte", st->media_blksize); + kprintf("%d-byte", st->media_blksize); else - printf("variable"); - printf(" blocks, write-%s\n", + kprintf("variable"); + kprintf(" blocks, write-%s\n", (st->flags & ST_READONLY) ? "protected" : "enabled"); } @@ -492,7 +492,7 @@ stopen(dev, flags, mode, p) * Only allow one at a time */ if (sc_link->flags & SDEV_OPEN) { - printf("%s: already open\n", st->sc_dev.dv_xname); + kprintf("%s: already open\n", st->sc_dev.dv_xname); return EBUSY; } @@ -672,7 +672,7 @@ st_mount_tape(dev, flags) return error; } if ((error = st_mode_select(st, 0)) != 0) { - printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname); + kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname); return error; } scsi_prevent(sc_link, PR_PREVENT, @@ -843,7 +843,7 @@ ststrategy(bp) */ if (st->flags & ST_FIXEDBLOCKS) { if (bp->b_bcount % st->blksize) { - printf("%s: bad request, must be multiple of %d\n", + kprintf("%s: bad request, must be multiple of %d\n", st->sc_dev.dv_xname, st->blksize); bp->b_error = EIO; goto bad; @@ -854,7 +854,7 @@ ststrategy(bp) */ else if (bp->b_bcount < st->blkmin || (st->blkmax && bp->b_bcount > st->blkmax)) { - printf("%s: bad request, must be between %d and %d\n", + kprintf("%s: bad request, must be between %d and %d\n", st->sc_dev.dv_xname, st->blkmin, st->blkmax); bp->b_error = EIO; goto bad; @@ -1026,7 +1026,7 @@ ststart(v) if (scsi_scsi_cmd(sc_link, (struct scsi_generic *) &cmd, sizeof(cmd), (u_char *) bp->b_data, bp->b_bcount, 0, 100000, bp, flags | SCSI_NOSLEEP)) - printf("%s: not queued\n", st->sc_dev.dv_xname); + kprintf("%s: not queued\n", st->sc_dev.dv_xname); } /* go back and see if we can cram more work in.. */ } @@ -1212,7 +1212,7 @@ try_new_value: * drive. If not, put it back the way it was. */ if ((error = st_mode_select(st, 0)) != 0) {/* put it back as it was */ - printf("%s: cannot set selected mode\n", st->sc_dev.dv_xname); + kprintf("%s: cannot set selected mode\n", st->sc_dev.dv_xname); st->density = hold_density; st->blksize = hold_blksize; if (st->blksize) @@ -1727,7 +1727,7 @@ st_interpret_sense(xs) bp->b_resid = xs->resid; if (sense->error_code & SSD_ERRCODE_VALID && (xs->flags & SCSI_SILENT) == 0) - printf("%s: block wrong size, %d blocks residual\n", + kprintf("%s: block wrong size, %d blocks residual\n", st->sc_dev.dv_xname, info); /* @@ -1768,7 +1768,7 @@ st_interpret_sense(xs) * the record was bigger than the read */ if ((xs->flags & SCSI_SILENT) == 0) - printf("%s: %d-byte record too big\n", + kprintf("%s: %d-byte record too big\n", st->sc_dev.dv_xname, xs->datalen - info); return EIO; |
