From owner-freebsd-questions Wed May 20 09:40:25 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA27120 for freebsd-questions-outgoing; Wed, 20 May 1998 09:40:25 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from plains.NoDak.edu (tinguely@plains.NoDak.edu [134.129.111.64]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA26940 for ; Wed, 20 May 1998 09:40:04 -0700 (PDT) (envelope-from tinguely@plains.NoDak.edu) Received: (from tinguely@localhost) by plains.NoDak.edu (8.8.8/8.8.8) id LAA01349; Wed, 20 May 1998 11:39:53 -0500 (CDT) Date: Wed, 20 May 1998 11:39:53 -0500 (CDT) From: Mark Tinguely Message-Id: <199805201639.LAA01349@plains.NoDak.edu> To: dhw@whistle.com, druber@mail.kersur.net, freebsd-questions@FreeBSD.ORG Subject: Re: scsi tape status? Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Unfortunately, I found (when I brought the Perl script over to the > FreeBSD environment), "mt status" doesn't report that. when we open /dev/*st0, and the cartidge is not loaded, it should return an ENXIO error that could be displayed in mt as the wether the cartidge is loaded or not. > I tried hacking "mt.c" to report what was in the struct mtget (see > /usr/include/sys/mtio.h), but the "file" & "block" numbers are in the > "not yet implemented" section, as borne out by the results I was getting > -- 0, even after "mt -f /dev/nrst0 fsf". I pittled a file/block counter for the older versions of FreeBSD st driver. It counts reads/writes/movement requested and reports them in the mtget structure. I have the patch file in: ftp://ftp.cs.ndsu.nodak.edu/pub/freebsd-st-count/2.2-st-patch I have not tried it on recent version of sys/scsi/st.c. --mark. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message