[net.unix-wizards] End of tape fixes for ht.c

shp (04/14/83)

Several people have asked me for fixes to ht.c that prevent end of tape
run off.  These fixes DO NOT work if your tape drive is not up to the
proper ECO rev level.  There are one or more hardware ECO's to help solve
this problem.

	- sam praul
	  ...decvax!ittvax!shp

=========================================================================

diff -c /sys/dev/ht.c /sys/localdev/ht.c:
	*** /sys/dev/ht.c	Tue Nov 17 13:49:43 1981
	--- /sys/localdev/ht.c	Thu May 13 17:41:14 1982
	***************
	*** 1,4
	! /*	ht.c	4.18	81/05/10	*/
	  
	  #include "tu.h"
	  #if NHT > 0

	--- 1,4 -----
	! /*	ht.c	4.19	82/05/13	*/
	  
	  #include "tu.h"
	  #if NHT > 0
	***************
	*** 263,268
				}
				if (htaddr->htds & HTDS_EOT) {
					bp->b_resid = bp->b_bcount;
					return (MBU_NEXT);
				}
			}

	--- 263,269 -----
				}
				if (htaddr->htds & HTDS_EOT) {
					bp->b_resid = bp->b_bcount;
	+ 				bp->b_flags |= B_ERROR;
					return (MBU_NEXT);
				}
			}