Date: Tue, 9 Apr 1996 20:16:33 +0200 From: "Georg-W. Koltermann" <gwk@anaconda.dkrz.de> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/1132: "mt(1) -f /dev/rwt0 status" dumps core (Wangtek drive) Message-ID: <199604091816.UAA08627@anaconda.dkrz.de> Resent-Message-ID: <199604110910.CAA27634@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1132
>Category: bin
>Synopsis: "mt(1) -f /dev/rwt0 status" dumps core (Wangtek drive)
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Apr 11 02:10:01 PDT 1996
>Last-Modified:
>Originator: Georg-W. Koltermann
>Organization:
>Release: FreeBSD 2.1.0-RELEASE i386
>Environment:
FreeBSD pool.dkrz.de 2.1.0-RELEASE FreeBSD 2.1.0-RELEASE #0: Tue Mar 26 01:28:08 MET 1996 gwk@pool.dkrz.de:/usr/src/sys/compile/POOL i386
dmesg output (partial):
wt0 at 0x280-0x281 irq 7 drq 3 on isa
wt0: type <Wangtek>
>Description:
The command "mt -f /dev/rwt0 status" dumps core, dereferencing
a NULL pointer.
>How-To-Repeat:
Execute "mt -f /dev/rwt0 status" on a machine with a Wangtek drive.
>Fix:
--- mt.c.old Tue Mar 26 20:12:09 1996
+++ mt.c Tue Mar 26 20:07:12 1996
@@ -218,6 +218,10 @@
#include <tahoe/vba/cyreg.h>
#endif
+#ifdef __FreeBSD__
+#include <i386/isa/wtreg.h>
+#endif
+
struct tape_desc {
short t_type; /* type of magtape device */
char *t_name; /* printing name */
@@ -249,7 +253,7 @@
*/
{ MT_ISAR, "SCSI tape drive", 0, 0 },
{ MT_ISVIPER1, "Archive Viper", 0, 0 },
- { MT_ISMFOUR, "Wangtek", 0, 0 },
+ { MT_ISMFOUR, "Wangtek", WTDS_BITS, WTER_BITS },
#endif /* defined (__FreeBSD__) */
{ 0 }
};
------
Obviously the table entry for the Archive Viper needs fixing, too.
Since I only have a Wangtek and cannot test the Archive code, I left
it alone.
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199604091816.UAA08627>
