> > As to /dev/3270/tub, believe me, devfs was the furthest thing from my
> > mind.  Here's what I was talking about.  Consider the device /dev/tty.
> > It exists to provide a path for the application to the current
> > controlling tty.  What would the application have to do (absent
> > stdout/stderr) to access its controlling terminal if there was no
> > /dev/tty device?  It wouldn't be easy, right?
>
> Hmm, the controlling terminal for a fullscreen application still is
> /dev/tty. If I start the test program on a ssh terminal any output to
> stdout goes the the ssh terminal. If I start the test program on the
> 3270 terminal I get nothing though. Kind of strange, the output should
> have gone to the tty view of the 3270. Needs more investigation.

Found the reason why the tty stopped while the fullscreen view is
activ: the tty is stopped... Removed the stop_tty/start_tty calls
from tty3270_deactivate/tty3270_activate.

> > Similarly, /dev/3270/tub needs to exist to provide a path for the
> > application to the fullscreen, when the controlling tty is in fact a
> > line-mode 3270 (and ENODEV otherwise).
> >
> > Notice that the permissions of /dev/tty are crw-rw-rw and those of
> > /dev/3270/tub are crw-rw-rw as well.  For /dev/tty notice the logic in
> > drivers/char/tty_io.c:tty_open(), right at retry_open:, where a test is
> > made for major 5, minor 0 (the maj/min of /dev/tty) and the device at
> > current->signal->tty is used.  That's what /dev/3270/tub wants as well,
> > only of course to use the corresponding full-screen major number 228
> > with the minor number of the current->signal->tty device.  In 2.4 I
> > reserved minor number 0 strictly for /dev/3270/tub, analogous to
> > /dev/tty, and I ensured that 227,N and 228,N referred to the same
> > physical device.  That is, there was no 227,0 device: the console would
> > probably come in at 227,1.  My test program should work with no operands
> > when invoked from a logged-on 3270: in that case, it opens /dev/3270/tub.
>
> Ok, I think I understand. You want some special device node analog to
> /dev/tty that redirects you automatically to the 3270 fullscreen node
> that corresponds to your controlling 3270 terminal. So that you can do
> a simple open("/dev/tub") in your application and that gets redirected
> to the fullscreen node. That shouldn't be too hard to implement.

Ok, used the old approach from the 2.4 driver to reserve the minor 0 as
multiplexer device. Open on char-major/minor 227/0 always returns -ENODEV,
open on char-major/minor 228/0 opens a fullscreen view on the 3270 device
that is associated with the current tty. If the controling tty isn't
a 3270 then again -ENODEV is returned.

In addition I fixed a few other bugs I found along the way. Latest patch
attached. Can you give it a try ?

blue skies,
   Martin

Martin Schwidefsky
Linux for zSeries Development & Services
IBM Deutschland Entwicklung GmbH

(See attached file: fs3270.diff)

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Attachment: fs3270.diff
Description: Binary data

Reply via email to