summaryrefslogtreecommitdiff
path: root/sys/arch/atari/dev/hdfd.c
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>1996-11-13 06:48:24 +0000
committerthorpej <thorpej@NetBSD.org>1996-11-13 06:48:24 +0000
commit490126b07a1bd5cf6744573a9bdac3d8508bf64b (patch)
tree9ebb514937dfae8b3643830706c34950c4634b47 /sys/arch/atari/dev/hdfd.c
parent5bbb546d4059e07309586ae5d9eb4f427266c484 (diff)
Use bitmask_snprintf().
Diffstat (limited to 'sys/arch/atari/dev/hdfd.c')
-rw-r--r--sys/arch/atari/dev/hdfd.c33
1 files changed, 21 insertions, 12 deletions
diff --git a/sys/arch/atari/dev/hdfd.c b/sys/arch/atari/dev/hdfd.c
index 9be7169120d..d533515f1b9 100644
--- a/sys/arch/atari/dev/hdfd.c
+++ b/sys/arch/atari/dev/hdfd.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hdfd.c,v 1.1 1996/11/09 22:27:25 leo Exp $ */
+/* $NetBSD: hdfd.c,v 1.2 1996/11/13 06:48:24 thorpej Exp $ */
/*-
* Copyright (c) 1996 Leo Weppelman
@@ -800,6 +800,7 @@ fdcstatus(dv, n, s)
char *s;
{
struct fdc_softc *fdc = (void *)dv->dv_parent;
+ char bits[64];
if (n == 0) {
out_fdc(NE7CMD_SENSEI);
@@ -814,15 +815,18 @@ fdcstatus(dv, n, s)
printf("\n");
break;
case 2:
- printf(" (st0 %b cyl %d)\n",
- fdc->sc_status[0], NE7_ST0BITS,
- fdc->sc_status[1]);
+ printf(" (st0 %s cyl %d)\n",
+ bitmask_snprintf(fdc->sc_status[0], NE7_ST0BITS,
+ bits, sizeof(bits)), fdc->sc_status[1]);
break;
case 7:
- printf(" (st0 %b st1 %b st2 %b cyl %d head %d sec %d)\n",
- fdc->sc_status[0], NE7_ST0BITS,
- fdc->sc_status[1], NE7_ST1BITS,
- fdc->sc_status[2], NE7_ST2BITS,
+ printf(" (st0 %s", bitmask_snprintf(fdc->sc_status[0],
+ NE7_ST0BITS, bits, sizeof(bits)));
+ printf(" st1 %s", bitmask_snprintf(fdc->sc_status[1],
+ NE7_ST1BITS, bits, sizeof(bits)));
+ printf(" st2 %s", bitmask_snprintf(fdc->sc_status[2],
+ NE7_ST2BITS, bits, sizeof(bits)));
+ printf(" cyl %d head %d sec %d)\n",
fdc->sc_status[3], fdc->sc_status[4], fdc->sc_status[5]);
break;
#ifdef DIAGNOSTIC
@@ -1148,6 +1152,7 @@ void
fdcretry(fdc)
struct fdc_softc *fdc;
{
+ char bits[64];
struct fd_softc *fd;
struct buf *bp;
@@ -1173,10 +1178,14 @@ fdcretry(fdc)
default:
diskerr(bp, "fd", "hard error", LOG_PRINTF,
fd->sc_skip / FDC_BSIZE, (struct disklabel *)NULL);
- printf(" (st0 %b st1 %b st2 %b cyl %d head %d sec %d)\n",
- fdc->sc_status[0], NE7_ST0BITS,
- fdc->sc_status[1], NE7_ST1BITS,
- fdc->sc_status[2], NE7_ST2BITS,
+
+ printf(" (st0 %s", bitmask_snprintf(fdc->sc_status[0],
+ NE7_ST0BITS, bits, sizeof(bits)));
+ printf(" st1 %s", bitmask_snprintf(fdc->sc_status[1],
+ NE7_ST1BITS, bits, sizeof(bits)));
+ printf(" st2 %s", bitmask_snprintf(fdc->sc_status[2],
+ NE7_ST2BITS, bits, sizeof(bits)));
+ printf(" cyl %d head %d sec %d)\n",
fdc->sc_status[3], fdc->sc_status[4], fdc->sc_status[5]);
bp->b_flags |= B_ERROR;