ggs@ulysses.homer.nj.att.com (Griff Smith) (08/11/87)
Index: /sys/vaxmba/mt.c 4.3BSD
Description:
The "blank tape" message in the TU78 device driver is written
with printf, which screams too loudly. Other error messages
are misdirected if the MTLERRM option is enabled.
Repeat-By:
Read a blank tape, step on a tape and try to read it, etc.
Fix:
Context diff follows.
*** /source/sys/vaxmba/mt.c Thu Jun 5 04:32:57 1986
--- /sys/vaxmba/mt.c Tue Aug 11 14:50:13 1987
***************
*** 38,43 ****
--- 38,44 ----
#include "cmap.h"
#include "uio.h"
#include "tty.h"
+ #include "syslog.h"
#include "../vax/cpu.h"
#include "mbareg.h"
***************
*** 493,499 ****
break;
case MTER_NOTCAP:
! printf("mu%d: blank tape\n", MUUNIT(bp->b_dev));
goto err;
case MTER_TM:
--- 498,504 ----
break;
case MTER_NOTCAP:
! tprintf("mu%d: blank tape\n", MUUNIT(bp->b_dev));
goto err;
case MTER_TM:
***************
*** 560,567 ****
MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! printf(" interrupt code = %o (octal) <%s>\n failure code = %o (octal) <%s>\n",
! er & MTER_INTCODE, sc->sc_mesg,
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
bp->b_flags |= B_ERROR;
--- 565,573 ----
MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! log(LOG_INFO, " interrupt code = %o (octal) <%s>\n",
! er & MTER_INTCODE, sc->sc_mesg);
! log(LOG_INFO, " failure code = %o (octal) <%s>\n",
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
bp->b_flags |= B_ERROR;
***************
*** 606,613 ****
unit, er, MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! printf(" interrupt code = %o (octal) <%s>\n failure code = %o (octal) <%s>\n",
! er & MTER_INTCODE, sc->sc_mesg,
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
if ( ((er & MTER_INTCODE) == MTER_TMFLTB)
--- 612,620 ----
unit, er, MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! printf(" interrupt code = %o (octal) <%s>\n",
! er & MTER_INTCODE, sc->sc_mesg);
! printf(" failure code = %o (octal) <%s>\n",
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
if ( ((er & MTER_INTCODE) == MTER_TMFLTB)
***************
*** 744,751 ****
er, MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! printf(" interrupt code = %o (octal) <%s>\n failure code = %o (octal) <%s>\n",
! (er & MTER_INTCODE), sc->sc_mesg,
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
if ( ((er & MTER_INTCODE) == MTER_TMFLTB)
--- 751,759 ----
er, MASKREG(sc->sc_dsreg), mtds_bits);
#ifdef MTLERRM
mtintfail(sc);
! log(LOG_INFO, " interrupt code = %o (octal) <%s>\n",
! (er & MTER_INTCODE), sc->sc_mesg);
! log(LOG_INFO, " failure code = %o (octal) <%s>\n",
(er & MTER_FAILCODE) >> 10, sc->sc_fmesg);
#endif
if ( ((er & MTER_INTCODE) == MTER_TMFLTB)
--
Griff Smith AT&T (Bell Laboratories), Murray Hill
Phone: 1-201-582-7736
UUCP: {allegra|ihnp4}!ulysses!ggs
Internet: ggs@ulysses.uucp