Subject: Re: pstat fixes for ptys?
To: None <current-users@NetBSD.ORG>
From: Charles Hannum <>
List: current-users
Date: 10/04/1995 21:34:31
In article <9510031450.AA28756@cthulhu> (Mike
Long) writes:

   I looked into this last night.  The solution is nontrivial, because
   the pointer to the tty struct is now kept in each tty {pseudo-,}device
   driver's softc struct.  The type of the driver's softc is specific to
   that driver, so there is no generic way for pstat to get to the tty

There *is* a solution to this, similar to the hack Chris Torek did for
disks (which we currently don't use either).  The idea is to put a
well-known structure (a la struct dkdevice) at the beginning of the
softc, which contains the struct tty pointer, so that it can always be
found easily.  Then just look through the device list for tty devices.

This works for all hardware tty types.  A different solution needs to
be implemented for pseudo-ttys.

Unless someone does this rather quickly, it won't make it into 1.1.