From 2331285d76a7495ba01befaebcbb15539ae9ed10 Mon Sep 17 00:00:00 2001 From: Matt Jacob Date: Tue, 22 Dec 1998 17:28:25 +0000 Subject: [PATCH] Print out latched cdb's correlated to latched errors in MTIOCERRSTAT case. Complete the addition of the setmark support (from Martin.Birgmeier@aon.at). --- usr.bin/mt/mt.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/usr.bin/mt/mt.c b/usr.bin/mt/mt.c index 943699049772..7f27b7fce866 100644 --- a/usr.bin/mt/mt.c +++ b/usr.bin/mt/mt.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)mt.c 8.2 (Berkeley) 5/4/95"; #endif static const char rcsid[] = - "$Id: mt.c,v 1.18 1998/12/18 18:16:35 mjacob Exp $"; + "$Id: mt.c,v 1.19 1998/12/19 20:23:37 mjacob Exp $"; #endif /* not lint */ /* @@ -112,6 +112,10 @@ struct commands { { "density", MTSETDNSTY, 0, NEED_2ARGS|ZERO_ALLOWED|IS_DENSITY }, { "eom", MTEOD, 1 }, { "eod", MTEOD, 1 }, + { "smk", MTWSS, 0 }, + { "wss", MTWSS, 0 }, + { "fss", MTFSS, 1 }, + { "bss", MTBSS, 1 }, { "comp", MTCOMP, 0, NEED_2ARGS|ZERO_ALLOWED|IS_COMP }, { "retension", MTRETENS, 1 }, { "rdhpos", MTIOCRDHPOS, 0 }, @@ -235,6 +239,10 @@ main(argc, argv) if (ioctl(mtfd, comp->c_code, (caddr_t)&umn) < 0) err(2, "%s", tape); (void)printf("Last I/O Residual: %u\n", s->io_resid); + (void)printf(" Last I/O Command:"); + for (i = 0; i < sizeof (s->io_cdb); i++) + (void)printf(" %02X", s->io_cdb[i]); + (void)printf("\n"); (void)printf(" Last I/O Sense:\n\n\t"); for (i = 0; i < sizeof (s->io_sense); i++) { (void)printf(" %02X", s->io_sense[i]); @@ -245,6 +253,10 @@ main(argc, argv) (void)printf("\n"); (void)printf("Last Control Residual: %u\n", s->ctl_resid); + (void)printf(" Last Control Command:"); + for (i = 0; i < sizeof (s->ctl_cdb); i++) + (void)printf(" %02X", s->ctl_cdb[i]); + (void)printf("\n"); (void)printf(" Last Control Sense:\n\n\t"); for (i = 0; i < sizeof (s->ctl_sense); i++) { (void)printf(" %02X", s->ctl_sense[i]);