mt reports absurd error message when pointed at a tty

Guy Harris guy at sun.uucp
Mon Dec 1 11:03:14 AEST 1986


> Repeat-By:
> 	Run "mt -f /dev/tty stat".  You will draw the error message "not a
> 	typewriter", which is a patently absurd thing to say about /dev/tty.
> 	The same thing happens on Sun 3.0.

"Fixed in 4.3" (and SunOS 3.2).  It now says "Inappropriate ioctl for
device".  One more piece of UNIX tradition bites the dust....  (S5 returns
EINVAL in this case, and only returns ENOTTY if the object that the "ioctl"
is being performed on is not a character special file.  A case can be made
that this is the right thing to do, although 4.3BSD supports some "ioctl"s
that can be made on files other than character special files, as well as
supporting "ioctl"s on sockets.)
-- 
	Guy Harris
	{ihnp4, decvax, seismo, decwrl, ...}!sun!guy
	guy at sun.com (or guy at sun.arpa)



More information about the Comp.bugs.4bsd.ucb-fixes mailing list