-static char *sccsid = "@(#)mt.c 4.3 (Berkeley) 81/11/12";
+/*
+ * 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.2 (Berkeley) %G%";
+#endif not lint
+
- if (argc < 2) {
- fprintf(stderr, "usage: mt [ -f device ] command [ count ]\n");
- exit(1);
- }
- if ((equal(argv[1], "-t") || equal(argv[1], "-f")) && argc > 2) {
+ if (argc > 2 && (equal(argv[1], "-t") || equal(argv[1], "-f"))) {
cp = argv[1];
for (comp = com; comp->c_name != NULL; comp++)
if (strncmp(cp, comp->c_name, strlen(cp)) == 0)
cp = argv[1];
for (comp = com; comp->c_name != NULL; comp++)
if (strncmp(cp, comp->c_name, strlen(cp)) == 0)
- fprintf(stderr, "%s %d ", comp->c_name,
+ fprintf(stderr, "%s %s %d ", tape, comp->c_name,
{ MT_ISTS, "ts11", 0, TSXS0_BITS },
{ MT_ISHT, "tm03", HTDS_BITS, HTER_BITS },
{ MT_ISTM, "tm11", 0, TMER_BITS },
{ MT_ISMT, "tu78", MTDS_BITS, 0 },
{ MT_ISUT, "tu45", UTDS_BITS, UTER_BITS },
{ MT_ISTS, "ts11", 0, TSXS0_BITS },
{ MT_ISHT, "tm03", HTDS_BITS, HTER_BITS },
{ MT_ISTM, "tm11", 0, TMER_BITS },
{ MT_ISMT, "tu78", MTDS_BITS, 0 },
{ MT_ISUT, "tu45", UTDS_BITS, UTER_BITS },
+#endif
+#ifdef sun
+ { MT_ISCPC, "TapeMaster", TMS_BITS, 0 },
+ { MT_ISAR, "Archive", ARCH_CTRL_BITS, ARCH_BITS },
+#endif
+#ifdef tahoe
+ { MT_ISCY, "cipher", CYS_BITS, CYCW_BITS },
+#endif
- printreg(" er", bp->mt_erreg, mt->t_erbits);
- printf("\nresidual=%d\n", bp->mt_resid);
+ printreg("\ner", bp->mt_erreg, mt->t_erbits);
+ putchar('\n');