Unix Technical Digest V1 #18

Ron Heiby (The Moderator) unix-request at cbosgd.UUCP
Thu Mar 14 12:59:11 AEST 1985


Unix Technical Digest       Thu, 14 Feb 85       Volume  1 : Issue  18

Today's Topics:
                            Administrivia
                          4.2 tty driver bug
                    Sun keyboard driver? (2 msgs)
                            ULTRIX fuiword
----------------------------------------------------------------------

Date: Thu, 14 Feb 85 02:56:09 GMT
From: Ron Heiby (The Moderator) <unix-request at cbosgd.UUCP>
Subject: Administrivia

I have tentatively decided to lump all driver related questions into
digests together, without differentiating between the various flavors
of Unix system.  The main reason is that I don't really know when a
driver question is applicable to only the one system mentioned and when
it is more general.  Also, much involved with drivers is very similar
from version to version.  Let me know if this is not a good idea.
Thanks.  Ron.

------------------------------

Date: 8 Mar 85 17:54:31 GMT
From: mark at digi-g.UUCP (Mark Mendel)
Subject: 4.2 tty driver bug

This is a rather strange one.

I'm trying to get an EMACs-like editor running (jove).  I would like to
use ^S as a command character but I want to be in CBREAK mode so I can
interrupt stuff.

What I do is set ^S & ^Q to -1 with an ioctl.  This doesn't work.  THe
output processor still knows about ^S, even though an /bin/stty shows that
^S & ^Q are undefined. BUG #1!  I can solve this, howver, by doing a
/bin/stty litout from the editor. Everything works hunky-dory. However,
when I try to set LITOUT with an ioctl as part of the editors
initialization. THe following happens:
	1) ^S still stops stuff.
	2) a /bin/stty shows that litout is on & ^S undefined.
	3) if I do a /bin/stty litout  it works... but an stty everything
	  shows NO DIFFERENCE between the settings before & after.

I have traced /bin/stty's ioctl's when given the litout parameter.  It does
the exact same sequence of IOCTLs as the editor.  But for some reason,
stty works & the editor doesn't.

Now, our system is not a full BSD 4.2.  It's a Pixel kludge alwmost 4.2.
However, a friend running full 4.2 on a VAX has reported the same strange
problem. Try it your self.

Can someone give me some C code that puts the terminal in the state I want?

Please respond via mail: I don't read unix-wizards myself.


			Thanks in advance?
				Mark Mendel
				ihnp4!umn-cs!digi-g!mark

------------------------------

Date: 7 Mar 85 21:42:06 GMT
From: sid at linus.UUCP (Sid Stuart)
Subject: Sun keyboard driver?

	We are trying to modify the keyboard translation table in the sun
keyboard driver. The KB(4S) manual entry claims that the ioctl call 

		struct kiockey key
		err = ioctl(fd, KIOCSETKEY, &key) 

will allow one to change the translation for one key. When we compile this in
a program, we get the error message that "k" is undefined. The definition of
KIOCSETKEY in <sundev/kbio.h> is:

	#define KIOCSETKEY _IOW(k, 1, struct kiockey)

Okay, so there is the "k" that is undefined, but now I am lost. I thought
the second entry to an ioctl was supposed to be an integer. Well, maybe
_IOW returns an integer, but then what should "k" be defined as, and what
should it be initialized to? We looked around and we cannot find any mention
of it in the documentation. We can't find any mention of it in the .h files
either. It looks like I will have to go into the code for the kernal and
see if I can find what _IOW is and does.

	I won't be able to do this till next week though. If anybody out 
there has a helpful hint, I would really like to hear it.

	BTW, replys that tell me to call up Sun's much touted software
support number will be laughed at. The "engineer" I talked to there
wasn't much help. He did not know anything about it. He did know of
a consultant that knew about it, but he said the consultant did
not like to talk to people. The "engineer" is sending me a copy of a program
the consultant wrote that may do what I want done, but I won't know
that until it arrives via snail mail.


				Confused as usual,
				sid at linus

------------------------------

Date: 10 Mar 85 08:24:22 GMT
From: chris at umcp-cs.UUCP (Chris Torek)
Subject: Sun keyboard driver?

Probably you forgot to include <sys/ioctl.h> (<sundev/kbio.h> doesn't
do it for you, though there's no reason it can't).  4.2BSD uses the
"Reiserism"

  #define _IOW(x,y,t)	(IOC_IN|((sizeof(t)&IOCPARM_MASK)<<16)|('x'<<8)|y)

which is why there's an unquoted ``k'' in _IOW(k,1,struct kiockey).

(Personally, I think this is incredibly ugly.)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland

------------------------------

Date: 11 Mar 85 07:29:31 GMT
From: eric at plus5.UUCP (Eric W. Kiebler)
Subject: ULTRIX fuiword

[More Ultrix Braindamage...]

The DEC ULTRIX prototype driver wants a call to fuiword in the open
routine when it is called at boot time.  Any idea why they want to do
this?  Looks wrong to me.  

They also erroneously identify the bus address extension register as 
an int in the definition of the driver structure -- it is a char.

eric

-- 
..!ihnp4!wucs!plus5!eric	
..!ihnp4!plus5!eric
(314) 725-9492

------------------------------

End of Unix Technical Digest
******************************
-- 
Ronald W. Heiby / ihnp4!{wnuxa!heiby|wnuxb!netnews}
AT&T Information Systems, Inc.
Lisle, IL  (CU-D21)



More information about the Mod.unix mailing list