Subject: mt asf 0
To: None <tech-userlevel@netbsd.org>
From: Mason Loring Bliss <mason@acheron.middleboro.ma.us>
List: tech-userlevel
Date: 02/13/2001 02:50:14
--hNweOTLwwbnii4NA
Content-Type: multipart/mixed; boundary="IGPMjTREWkoKVnU2"
Content-Disposition: inline


--IGPMjTREWkoKVnU2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hello, all.

"mt status" can report "current file number: 0", but "mt asf 0" gives
an "illegal count" message. SUS2 seems not to talk about mt(1), but
Solaris, for instance, allows and does the right thing with "mt asf 0".

Does anyone object to "mt asf" supporting "0" as a valid argument?

A pretty minimal diff to accomplish this is attached, for your perusal.

--=20
    Mason Loring Bliss  mason@acheron.middleboro.ma.us  I m m a n e n t i z=
 e
awake ? sleep : dream;  http://acheron.ne.mediaone.net  t h e E s c h a t o=
 n


--IGPMjTREWkoKVnU2
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="mt.patch"

82c82
< 	{ "asf",	MTIOCTOP,     MTASF,      1,  1 },
---
> 	{ "asf",	MTIOCTOP,     MTASF,      1,  0 },
179,182c179,184
< 			mt_com.mt_op = MTFSF;
< 			mt_com.mt_count = count;
< 			if (ioctl(mtfd, MTIOCTOP, &mt_com) < 0)
< 				err(2, "%s", tape);
---
> 			if (count > 0) {
> 				mt_com.mt_op = MTFSF;
> 				mt_com.mt_count = count;
> 				if (ioctl(mtfd, MTIOCTOP, &mt_com) < 0)
> 					err(2, "%s", tape);
> 			}

--IGPMjTREWkoKVnU2--

--hNweOTLwwbnii4NA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (NetBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE6iOc2ykMMY715wXIRAtdNAKCCtJt+bLmYMDdwL8W2ys0jEXGkYACfTuUS
9PWh+QD1jd3NsGob1SFEaIU=
=S95/
-----END PGP SIGNATURE-----

--hNweOTLwwbnii4NA--