From 2ed6c5594318a1665f000c975e6a937548d2e334 Mon Sep 17 00:00:00 2001 From: joerg Date: Wed, 4 Oct 1995 07:01:23 +0000 Subject: 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. --- sys/isa/fd.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'sys/isa/fd.c') 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 #include #include +#include #include #include #include @@ -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); -- cgit v1.1