summaryrefslogtreecommitdiff
path: root/bin/mt
diff options
context:
space:
mode:
authormjacob <mjacob@NetBSD.org>1998-07-04 02:14:22 +0000
committermjacob <mjacob@NetBSD.org>1998-07-04 02:14:22 +0000
commit5433a0b6ca2aafbc18c0b15d3f55eafcb7f41a8b (patch)
tree6c0d0c394e46f8954aab033da99ea40d704dc8b5 /bin/mt
parente558885a0e26511465e6c6b4cb60089a08a22dd1 (diff)
More for kern/1275- and fix a bug in here that's been there forever.
Diffstat (limited to 'bin/mt')
-rw-r--r--bin/mt/mt.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/bin/mt/mt.c b/bin/mt/mt.c
index 350ffe05edf..e4b83df6fec 100644
--- a/bin/mt/mt.c
+++ b/bin/mt/mt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: mt.c,v 1.25 1997/10/21 20:04:55 thorpej Exp $ */
+/* $NetBSD: mt.c,v 1.26 1998/07/04 02:14:22 mjacob Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\n\
#if 0
static char sccsid[] = "@(#)mt.c 8.2 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: mt.c,v 1.25 1997/10/21 20:04:55 thorpej Exp $");
+__RCSID("$NetBSD: mt.c,v 1.26 1998/07/04 02:14:22 mjacob Exp $");
#endif
#endif /* not lint */
@@ -236,10 +236,12 @@ struct tape_desc {
#ifdef tahoe
{ MT_ISCY, "cipher", CYS_BITS, CYCW_BITS },
#endif
- { 0x7, "SCSI", "76543210", "76543210" },
+#define SCSI_DS_BITS "\20\5WriteProtect\2Mounted"
+ { 0x7, "SCSI", SCSI_DS_BITS, "76543210" },
{ 0 }
};
+
/*
* Interpret the status buffer returned
*/
@@ -287,7 +289,7 @@ printreg(s, v, bits)
else
printf("%s=%x", s, v);
bits++;
- if (v && bits) {
+ if (v && *bits) {
putchar('<');
while ((i = *bits++)) {
if (v & (1 << (i-1))) {