Subject: TMSCP tape mispositioning via 'mt -f ... rewind' (#321) Index: sys/pdpuba/tmscp.c 2.11BSD Description: When mt(1) is used to rewind a TMSCP tape device the tape positions to the end of the first file. Repeat-By: Create two tape files on a tape and then explicitly rewind the tape: tar -cf /dev/nrmt0 /unix tar -cf /dev/nrmt0 /unix mt -f /dev/rmt0 rewind The tape does indeed rewind but then: Note that the tape moves forward one file. Fix: It's a one line fix which clears the count of records to space forward. The TMSCP protocol apparently doesn't ignore the 'number of tapemarks to skip' parameter when doing a rewind - the rewind is done and then the skip parameter is used. This behavior was accidentally introduced when the TMSCP driver was rewritten a couple months ago. Thanks again to Terry for complaining about the problem and providing a machine for testing (spc11c got dizzy that night;-)) To install this fix cut where indicated saving to a file (/tmp/321). Then: patch -p0 < /tmp/321 If you have TMSCP (TK50, TU81, etc) drives present in the system: cd /sys/YOUR_KERNEL make make install reboot You may also wish to recompile the GENERIC kernel and keep it around as /genunix in case of emergencies: cd /sys/GENERIC make install -c -m 744 -o root -g kmem unix /genunix This and previous updates to 2.11BSD are available via anonymous FTP to either FTP.IIPO.GTEGSC.COM or FTP.2BSD.COM in the directory /pub/2.11BSD. ------------------------------cut here------------------------- *** /sys/pdpuba/tmscp.c.old Tue May 14 22:53:23 1996 --- /sys/pdpuba/tmscp.c Fri May 17 22:36:05 1996 *************** *** 1,6 **** #define TMSDEBUG 1 ! /* @(#)tmscp.c 1.6 (2.11BSD GTE) 1996/5/14 */ #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)tmscp.c 1.24 (ULTRIX) 1/21/86"; --- 1,6 ---- #define TMSDEBUG 1 ! /* @(#)tmscp.c 1.7 (2.11BSD GTE) 1996/5/17 */ #if !defined(lint) && defined(DOSCCS) static char *sccsid = "@(#)tmscp.c 1.24 (ULTRIX) 1/21/86"; *************** *** 991,996 **** --- 991,997 ---- i = M_MD_REWND; else i = M_MD_REWND | M_MD_IMMED; + bp->b_bcount = 0; /* XXX */ tms_repos_st(mp, sc, i); break; case TMS_OFFL: *** /VERSION.old Thu May 16 20:00:42 1996 --- /VERSION Mon May 20 19:50:04 1996 *************** *** 1,4 **** ! Current Patch Level: 320 2.11 BSD ============ --- 1,4 ---- ! Current Patch Level: 321 2.11 BSD ============