diff options
author | joerg <joerg@FreeBSD.org> | 1995-10-04 07:01:23 +0000 |
---|---|---|
committer | joerg <joerg@FreeBSD.org> | 1995-10-04 07:01:23 +0000 |
commit | 2ed6c5594318a1665f000c975e6a937548d2e334 (patch) | |
tree | 537a10bcd552b8423587d479d7f3f112f70f5445 /sys/isa | |
parent | e3dc667e862164886cbc0beb05e6d49a39c5fb8f (diff) | |
download | FreeBSD-src-2ed6c5594318a1665f000c975e6a937548d2e334.zip FreeBSD-src-2ed6c5594318a1665f000c975e6a937548d2e334.tar.gz |
Hide the "input/output timeout" messages behind the bootverbose case.
This message has been confusing innocent ft users.
It should go into 2.1 as well, it's a very simple fix.
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/fd.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c index d0748b1..5efd298 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -43,7 +43,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.63 1995/09/03 05:43:28 julian Exp $ + * $Id: fd.c,v 1.64 1995/09/16 17:03:36 bde Exp $ * */ @@ -65,6 +65,7 @@ #include <machine/ioctl_fd.h> #include <sys/disklabel.h> #include <sys/diskslice.h> +#include <machine/cpu.h> #include <sys/buf.h> #include <sys/uio.h> #include <sys/malloc.h> @@ -368,11 +369,13 @@ static int fdc_err(fdcu_t fdcu, const char *s) { fdc_data[fdcu].fdc_errs++; - if(fdc_data[fdcu].fdc_errs < FDC_ERRMAX) - printf("fdc%d: %s", fdcu, s); - else if(fdc_data[fdcu].fdc_errs == FDC_ERRMAX) - printf("fdc%d: too many errors, not logging any more\n", - fdcu); + if(s) { + if(fdc_data[fdcu].fdc_errs < FDC_ERRMAX) + printf("fdc%d: %s", fdcu, s); + else if(fdc_data[fdcu].fdc_errs == FDC_ERRMAX) + printf("fdc%d: too many errors, not logging any more\n", + fdcu); + } return FD_FAILED; } @@ -905,7 +908,7 @@ in_fdc(fdcu_t fdcu) if (i == NE7_RQM) return fdc_err(fdcu, "ready for output in input\n"); if (j <= 0) - return fdc_err(fdcu, "input ready timeout\n"); + return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0); #ifdef DEBUG i = inb(baseport+FDDATA); TRACE1("[FDDATA->0x%x]", (unsigned char)i); @@ -928,7 +931,7 @@ fd_in(fdcu_t fdcu, int *ptr) if (i == NE7_RQM) return fdc_err(fdcu, "ready for output in input\n"); if (j <= 0) - return fdc_err(fdcu, "input ready timeout\n"); + return fdc_err(fdcu, bootverbose? "input ready timeout\n": 0); #ifdef DEBUG i = inb(baseport+FDDATA); TRACE1("[FDDATA->0x%x]", (unsigned char)i); @@ -956,7 +959,8 @@ out_fdc(fdcu_t fdcu, int x) /* Check that the floppy controller is ready for a command */ i = 100000; while ((inb(baseport+FDSTS) & NE7_RQM) == 0 && i-- > 0); - if (i <= 0) return fdc_err(fdcu, "output ready timeout\n"); + if (i <= 0) + return fdc_err(fdcu, bootverbose? "output ready timeout\n": 0); /* Send the command and return */ outb(baseport+FDDATA, x); |