Subject: 'mt status' prints 'unknown tape drive type' (#145) Index: bin/mt.c 2.11BSD Description: The command: mt -f /dev/rmt8 status gives the error: unknown tape drive type (n) Repeat-By: mt -f /dev/rmt8 status Fix: Apply the patch below and then recompile+install 'mt'. Thanks to Johnny Billquist (bqt@knase.update.uu.se) for this patch. ============================cut here============================ *** /usr/src/bin/mt.c.old Fri May 10 21:08:47 1991 --- /usr/src/bin/mt.c Tue Jul 6 19:55:36 1993 *************** *** 2,17 **** * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. */ ! #ifndef lint char copyright[] = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; - #endif not lint ! #ifndef lint ! static char sccsid[] = "@(#)mt.c 5.1 (Berkeley) 4/30/85"; #endif not lint /* --- 2,17 ---- * Copyright (c) 1980 Regents of the University of California. * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. + * + * Modified to handle pdp11 930707 /BQT */ ! #if !defined(lint) && defined(DOSCCS) char copyright[] = "@(#) Copyright (c) 1980 Regents of the University of California.\n\ All rights reserved.\n"; ! static char sccsid[] = "@(#)mt.c 2.0 (2.11BSD) 7/6/93"; #endif not lint /* *************** *** 116,121 **** --- 116,131 ---- #include #endif + #ifdef pdp11 + #include + #include + #undef b_repcnt /* argh */ + #include + #define NRSP 0 + #define NCMD 0 + #include + #endif + struct tape_desc { short t_type; /* type of magtape device */ char *t_name; /* printing name */ *************** *** 132,137 **** --- 142,153 ---- #ifdef sun { MT_ISCPC, "TapeMaster", TMS_BITS, 0 }, { MT_ISAR, "Archive", ARCH_CTRL_BITS, ARCH_BITS }, + #endif + #ifdef pdp11 + { MT_ISTS, "ts11", 0, TSXS0_BITS }, + { MT_ISHT, "tm03", HTFS_BITS, HTER_BITS }, + { MT_ISTM, "tm11", 0, TMER_BITS }, + { MT_ISTMSCP, "tmscp", 0, 0 }, #endif { 0 } };