--- mt.c.orig	Sat Oct 22 22:35:22 1994
+++ mt.c	Sat Oct 29 15:12:14 1994
@@ -274,7 +274,18 @@
   if (rmtioctl (desc, MTIOCGET, &status))
     error (2, errno, "%s", dev);
 
-  printf ("drive type = %d\n", (int) status.mt_type);
+  if ((int) status.mt_type & 0x800000) {
+    printf ("qic-117 drive type = 0x%05x, ", (int) status.mt_type & 0x1ffff);
+    if (GMT_DR_OPEN( (long) status.mt_gstat)) {
+      printf ("no tape or door open\n");
+    } else {
+      printf ("%s-line%s\n",
+              GMT_ONLINE( (long) status.mt_gstat) ? "on" : "off",
+              GMT_WR_PROT( (long) status.mt_gstat) ? " and write-protected" : "");
+    }
+  } else {
+    printf ("drive type = %d\n", (int) status.mt_type);
+  }
 #if defined(hpux) || defined(__hpux__)
   printf ("drive status (high) = %d\n", (int) status.mt_dsreg1);
   printf ("drive status (low) = %d\n", (int) status.mt_dsreg2);
