Incorporate bde's code-review comments.
(a) bring back ttselect, now that we have xxxdevtotty() it isn't dangerous. (b) remove all of the wrappers that have been replaced by ttselect (c) fix formatting in syscons.c and definition in syscons.h (d) add cxdevtotty NOT DONE: (e) make pcvt work... it was already broken...when someone fixes pcvt to link properly, just rename get_pccons to xxxdevtotty and we're done
This commit is contained in:
parent
db312e6697
commit
8c5c37cd75
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6782
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.2 1995/02/15 18:41:41 bde Exp $
|
||||
* $Id: cy.c,v 1.3 1995/02/25 20:09:12 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1511,16 +1511,6 @@ cydevtotty(dev_t dev)
|
||||
return info[unit]->tty;
|
||||
}
|
||||
|
||||
int
|
||||
cyselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
u_char unit = UNIT(dev);
|
||||
if (unit >= /* NCY * ? */ PORTS_PER_CYCLOM)
|
||||
return (ENXIO);
|
||||
|
||||
return (ttyselect(info[unit]->tty, rw, p));
|
||||
}
|
||||
|
||||
int
|
||||
cyspeed(int speed, int *prescaler_io)
|
||||
{
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.2 1995/02/15 18:41:41 bde Exp $
|
||||
* $Id: cy.c,v 1.3 1995/02/25 20:09:12 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1511,16 +1511,6 @@ cydevtotty(dev_t dev)
|
||||
return info[unit]->tty;
|
||||
}
|
||||
|
||||
int
|
||||
cyselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
u_char unit = UNIT(dev);
|
||||
if (unit >= /* NCY * ? */ PORTS_PER_CYCLOM)
|
||||
return (ENXIO);
|
||||
|
||||
return (ttyselect(info[unit]->tty, rw, p));
|
||||
}
|
||||
|
||||
int
|
||||
cyspeed(int speed, int *prescaler_io)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.67 1995/02/25 20:09:14 pst Exp $
|
||||
* $Id: sio.c,v 1.68 1995/02/26 02:30:18 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -1840,15 +1840,6 @@ siodevtotty(dev)
|
||||
return (&sio_tty[unit]);
|
||||
}
|
||||
|
||||
int
|
||||
sioselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
return (ttyselect(siodevtotty(dev), rw, p));
|
||||
}
|
||||
|
||||
static void
|
||||
commctl(com, bits, how)
|
||||
struct com_s *com;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.104 1995/02/22 13:40:19 sos Exp $
|
||||
* $Id: syscons.c,v 1.105 1995/02/25 20:09:16 pst Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -299,17 +299,6 @@ struct tty
|
||||
return VIRTUAL_TTY(unit);
|
||||
}
|
||||
|
||||
int
|
||||
scselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
struct tty *tp = scdevtotty(dev);
|
||||
|
||||
if (tp == NULL)
|
||||
return(ENXIO);
|
||||
|
||||
return (ttyselect(tp, rw, p));
|
||||
}
|
||||
|
||||
static scr_stat
|
||||
*get_scr_stat(dev_t dev)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.h,v 1.1 1995/02/22 13:40:21 sos Exp $
|
||||
* $Id: syscons.h,v 1.2 1995/02/25 20:09:21 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -175,7 +175,7 @@ void scintr(int unit);
|
||||
int pcmmap(dev_t dev, int offset, int nprot);
|
||||
static void scinit(void);
|
||||
static u_int scgetc(int noblock);
|
||||
static struct tty *get_tty_ptr(dev_t dev);
|
||||
struct tty *scdevtotty(dev_t dev);
|
||||
static scr_stat *get_scr_stat(dev_t dev);
|
||||
static scr_stat *alloc_scp();
|
||||
static void init_scp(scr_stat *scp);
|
||||
|
@ -1,6 +1,6 @@
|
||||
static char _ittyid[] = "@(#)$Id: iitty.c,v 1.2 1995/02/15 06:28:28 jkh Exp $";
|
||||
static char _ittyid[] = "@(#)$Id: iitty.c,v 1.3 1995/02/25 20:08:52 pst Exp $";
|
||||
/*******************************************************************************
|
||||
* II - Version 0.1 $Revision: 1.2 $ $State: Exp $
|
||||
* II - Version 0.1 $Revision: 1.3 $ $State: Exp $
|
||||
*
|
||||
* Copyright 1994 Dietmar Friede
|
||||
*******************************************************************************
|
||||
@ -10,6 +10,15 @@ static char _ittyid[] = "@(#)$Id: iitty.c,v 1.2 1995/02/15 06:28:28 jkh Exp
|
||||
*
|
||||
*******************************************************************************
|
||||
* $Log: iitty.c,v $
|
||||
* Revision 1.3 1995/02/25 20:08:52 pst
|
||||
* (a) remove the pointer to each driver's tty structure array from cdevsw
|
||||
* (b) add a function callback vector to tty drivers that will return a pointer
|
||||
* to a valid tty structure based upon a dev_t
|
||||
* (c) make syscons structures the same size whether or not APM is enabled so
|
||||
* utilities don't crash if NAPM changes (and make the damn kernel compile!)
|
||||
* (d) rewrite /dev/snp ioctl interface so that it is device driver and i386
|
||||
* independant
|
||||
*
|
||||
* Revision 1.2 1995/02/15 06:28:28 jkh
|
||||
* Fix up include paths, nuke some warnings.
|
||||
*
|
||||
@ -334,14 +343,4 @@ itydevtotty(dev_t dev)
|
||||
return (&ity_tty[unit]);
|
||||
}
|
||||
|
||||
int
|
||||
ityselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
register int unit = UNIT(dev);
|
||||
if (unit >= next_if)
|
||||
return (ENXIO);
|
||||
|
||||
return (ttyselect(&ity_tty[unit], rw, p));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -42,7 +42,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)conf.c 5.8 (Berkeley) 5/12/91
|
||||
* $Id: conf.c,v 1.68 1995/02/25 20:09:03 pst Exp $
|
||||
* $Id: conf.c,v 1.69 1995/02/27 19:46:27 ugen Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -354,7 +354,6 @@ int nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);
|
||||
d_open_t scopen;
|
||||
d_close_t scclose;
|
||||
d_rdwr_t scread, scwrite;
|
||||
d_select_t scselect;
|
||||
d_ioctl_t scioctl;
|
||||
d_mmap_t scmmap;
|
||||
d_ttycv_t scdevtotty;
|
||||
@ -363,7 +362,6 @@ d_ttycv_t scdevtotty;
|
||||
#define scclose nxclose
|
||||
#define scread nxread
|
||||
#define scwrite nxwrite
|
||||
#define scselect nxselect
|
||||
#define scioctl nxioctl
|
||||
#define scmmap nxmmap
|
||||
#define scdevtotty nxdevtotty
|
||||
@ -391,7 +389,6 @@ d_close_t ptsclose;
|
||||
d_rdwr_t ptsread;
|
||||
d_rdwr_t ptswrite;
|
||||
d_stop_t ptsstop;
|
||||
d_select_t ptsselect;
|
||||
d_open_t ptcopen;
|
||||
d_close_t ptcclose;
|
||||
d_rdwr_t ptcread;
|
||||
@ -404,7 +401,6 @@ d_ioctl_t ptyioctl;
|
||||
#define ptsclose nxclose
|
||||
#define ptsread nxread
|
||||
#define ptswrite nxwrite
|
||||
#define ptsselect nxselect
|
||||
#define ptcopen nxopen
|
||||
#define ptcclose nxclose
|
||||
#define ptcread nxread
|
||||
@ -599,7 +595,6 @@ d_open_t sioopen;
|
||||
d_close_t sioclose;
|
||||
d_rdwr_t sioread, siowrite;
|
||||
d_ioctl_t sioioctl;
|
||||
d_select_t sioselect;
|
||||
d_stop_t siostop;
|
||||
d_ttycv_t siodevtotty;
|
||||
#define sioreset nxreset
|
||||
@ -611,7 +606,6 @@ d_ttycv_t siodevtotty;
|
||||
#define sioioctl nxioctl
|
||||
#define siostop nxstop
|
||||
#define sioreset nxreset
|
||||
#define sioselect nxselect
|
||||
#define siodevtotty nxdevtotty
|
||||
#endif
|
||||
|
||||
@ -714,6 +708,7 @@ d_rdwr_t cxread, cxwrite;
|
||||
d_ioctl_t cxioctl;
|
||||
d_select_t cxselect;
|
||||
d_stop_t cxstop;
|
||||
d_ttycv_t cxdevtotty;
|
||||
#else
|
||||
#define cxopen nxopen
|
||||
#define cxclose nxclose
|
||||
@ -722,6 +717,7 @@ d_stop_t cxstop;
|
||||
#define cxioctl nxioctl
|
||||
#define cxstop nxstop
|
||||
#define cxselect nxselect
|
||||
#define cxdevtotty nxdevtotty
|
||||
#endif
|
||||
|
||||
#include "gp.h"
|
||||
@ -806,7 +802,6 @@ d_read_t cyread;
|
||||
d_write_t cywrite;
|
||||
d_ioctl_t cyioctl;
|
||||
d_stop_t cystop;
|
||||
d_select_t cyselect;
|
||||
d_ttycv_t cydevtotty;
|
||||
#define cyreset nxreset
|
||||
#define cymmap nxmmap
|
||||
@ -819,7 +814,6 @@ d_ttycv_t cydevtotty;
|
||||
#define cyioctl nxioctl
|
||||
#define cystop nxstop
|
||||
#define cyreset nxreset
|
||||
#define cyselect nxselect
|
||||
#define cymmap nxmmap
|
||||
#define cystrategy nxstrategy
|
||||
#define cydevtotty nxdevtotty
|
||||
@ -832,7 +826,6 @@ d_close_t ityclose;
|
||||
d_read_t ityread;
|
||||
d_write_t itywrite;
|
||||
d_ioctl_t ityioctl;
|
||||
d_select_t ityselect;
|
||||
d_ttycv_t itydevtotty;
|
||||
#define ityreset nxreset
|
||||
#else
|
||||
@ -842,7 +835,6 @@ d_ttycv_t itydevtotty;
|
||||
#define itywrite nxwrite
|
||||
#define ityioctl nxioctl
|
||||
#define ityreset nxreset
|
||||
#define ityselect nxselect
|
||||
#define itydevtotty nxdevtotty
|
||||
#endif
|
||||
|
||||
@ -932,7 +924,7 @@ struct cdevsw cdevsw[] =
|
||||
noselect, nommap, swstrategy },
|
||||
{ ptsopen, ptsclose, ptsread, ptswrite, /*5*/
|
||||
ptyioctl, ptsstop, nullreset, ptydevtotty,/* ttyp */
|
||||
ptsselect, nommap, NULL },
|
||||
ttselect, nommap, NULL },
|
||||
{ ptcopen, ptcclose, ptcread, ptcwrite, /*6*/
|
||||
ptyioctl, nullstop, nullreset, ptydevtotty,/* ptyp */
|
||||
ptcselect, nommap, NULL },
|
||||
@ -953,7 +945,7 @@ struct cdevsw cdevsw[] =
|
||||
spigot_select, spigot_mmap, NULL },
|
||||
{ scopen, scclose, scread, scwrite, /*12*/
|
||||
scioctl, nullstop, nullreset, scdevtotty,/* sc */
|
||||
scselect, scmmap, NULL },
|
||||
ttselect, scmmap, NULL },
|
||||
{ sdopen, sdclose, rawread, rawwrite, /*13*/
|
||||
sdioctl, nostop, nullreset, nodevtotty,/* sd */
|
||||
seltrue, nommap, sdstrategy },
|
||||
@ -1010,7 +1002,7 @@ struct cdevsw cdevsw[] =
|
||||
mseselect, nommap, NULL },
|
||||
{ sioopen, sioclose, sioread, siowrite, /*28*/
|
||||
sioioctl, siostop, sioreset, siodevtotty,/* sio */
|
||||
sioselect, nommap, NULL },
|
||||
ttselect, nommap, NULL },
|
||||
{ mcdopen, mcdclose, rawread, nowrite, /*29*/
|
||||
mcdioctl, nostop, nullreset, nodevtotty,/* mitsumi cd */
|
||||
seltrue, nommap, mcdstrategy },
|
||||
@ -1051,7 +1043,7 @@ struct cdevsw cdevsw[] =
|
||||
sockioctl, nostop, nullreset, nodevtotty,/* socksys */
|
||||
seltrue, nommap, NULL },
|
||||
{ cxopen, cxclose, cxread, cxwrite, /*42*/
|
||||
cxioctl, cxstop, nullreset, nodevtotty,/* cronyx */
|
||||
cxioctl, cxstop, nullreset, cxdevtotty,/* cronyx */
|
||||
cxselect, nommap, NULL },
|
||||
{ vnopen, vnclose, rawread, rawwrite, /*43*/
|
||||
vnioctl, nostop, nullreset, nodevtotty,/* vn */
|
||||
@ -1070,7 +1062,7 @@ struct cdevsw cdevsw[] =
|
||||
seltrue, nommap, NULL },
|
||||
{ cyopen, cyclose, cyread, cywrite, /*48*/
|
||||
cyioctl, cystop, cyreset, cydevtotty,/*cyclades*/
|
||||
cyselect, cymmap, cystrategy },
|
||||
ttselect, cymmap, cystrategy },
|
||||
{ sscopen, sscclose, sscread, sscwrite, /*49*/
|
||||
sscioctl, nostop, nullreset, nodevtotty,/* scsi super */
|
||||
sscselect, sscmmap, sscstrategy },
|
||||
@ -1094,7 +1086,7 @@ struct cdevsw cdevsw[] =
|
||||
seltrue, nommap, NULL },
|
||||
{ ityopen, ityclose, ityread, itywrite, /*56*/
|
||||
ityioctl, nostop, ityreset, itydevtotty,/* ity */
|
||||
ityselect, nommap, NULL },
|
||||
ttselect, nommap, NULL },
|
||||
{ itelopen, itelclose, itelread, itelwrite, /*57*/
|
||||
itelioctl, nostop, nullreset, nodevtotty,/* itel */
|
||||
seltrue, nommap, NULL },
|
||||
|
@ -672,13 +672,30 @@ int cxparam (struct tty *tp, struct termios *t)
|
||||
return (0);
|
||||
}
|
||||
|
||||
struct tty *cxdevtotty (dev_t dev)
|
||||
{
|
||||
int unit = UNIT(dev);
|
||||
|
||||
if (unit == UNIT_CTL)
|
||||
return (NULL);
|
||||
|
||||
if (unit > NCX*NCHAN)
|
||||
return (NULL);
|
||||
|
||||
return (cxchan[unit]->ttyp);
|
||||
}
|
||||
|
||||
int cxselect (dev_t dev, int flag, struct proc *p)
|
||||
{
|
||||
int unit = UNIT (dev);
|
||||
|
||||
if (unit == UNIT_CTL)
|
||||
return (0);
|
||||
return (ttyselect (cxchan[unit]->ttyp, flag, p));
|
||||
|
||||
if (unit > NCX*NCHAN)
|
||||
return (ENXIO);
|
||||
|
||||
return (ttyselect(cxchan[unit]->ttyp, flag, p));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -27,7 +27,7 @@
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: cy.c,v 1.2 1995/02/15 18:41:41 bde Exp $
|
||||
* $Id: cy.c,v 1.3 1995/02/25 20:09:12 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1511,16 +1511,6 @@ cydevtotty(dev_t dev)
|
||||
return info[unit]->tty;
|
||||
}
|
||||
|
||||
int
|
||||
cyselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
u_char unit = UNIT(dev);
|
||||
if (unit >= /* NCY * ? */ PORTS_PER_CYCLOM)
|
||||
return (ENXIO);
|
||||
|
||||
return (ttyselect(info[unit]->tty, rw, p));
|
||||
}
|
||||
|
||||
int
|
||||
cyspeed(int speed, int *prescaler_io)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.67 1995/02/25 20:09:14 pst Exp $
|
||||
* $Id: sio.c,v 1.68 1995/02/26 02:30:18 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -1840,15 +1840,6 @@ siodevtotty(dev)
|
||||
return (&sio_tty[unit]);
|
||||
}
|
||||
|
||||
int
|
||||
sioselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
return (ttyselect(siodevtotty(dev), rw, p));
|
||||
}
|
||||
|
||||
static void
|
||||
commctl(com, bits, how)
|
||||
struct com_s *com;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.104 1995/02/22 13:40:19 sos Exp $
|
||||
* $Id: syscons.c,v 1.105 1995/02/25 20:09:16 pst Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -299,17 +299,6 @@ struct tty
|
||||
return VIRTUAL_TTY(unit);
|
||||
}
|
||||
|
||||
int
|
||||
scselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
struct tty *tp = scdevtotty(dev);
|
||||
|
||||
if (tp == NULL)
|
||||
return(ENXIO);
|
||||
|
||||
return (ttyselect(tp, rw, p));
|
||||
}
|
||||
|
||||
static scr_stat
|
||||
*get_scr_stat(dev_t dev)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.h,v 1.1 1995/02/22 13:40:21 sos Exp $
|
||||
* $Id: syscons.h,v 1.2 1995/02/25 20:09:21 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -175,7 +175,7 @@ void scintr(int unit);
|
||||
int pcmmap(dev_t dev, int offset, int nprot);
|
||||
static void scinit(void);
|
||||
static u_int scgetc(int noblock);
|
||||
static struct tty *get_tty_ptr(dev_t dev);
|
||||
struct tty *scdevtotty(dev_t dev);
|
||||
static scr_stat *get_scr_stat(dev_t dev);
|
||||
static scr_stat *alloc_scp();
|
||||
static void init_scp(scr_stat *scp);
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)com.c 7.5 (Berkeley) 5/16/91
|
||||
* $Id: sio.c,v 1.67 1995/02/25 20:09:14 pst Exp $
|
||||
* $Id: sio.c,v 1.68 1995/02/26 02:30:18 bde Exp $
|
||||
*/
|
||||
|
||||
#include "sio.h"
|
||||
@ -1840,15 +1840,6 @@ siodevtotty(dev)
|
||||
return (&sio_tty[unit]);
|
||||
}
|
||||
|
||||
int
|
||||
sioselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
return (ttyselect(siodevtotty(dev), rw, p));
|
||||
}
|
||||
|
||||
static void
|
||||
commctl(com, bits, how)
|
||||
struct com_s *com;
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.c,v 1.104 1995/02/22 13:40:19 sos Exp $
|
||||
* $Id: syscons.c,v 1.105 1995/02/25 20:09:16 pst Exp $
|
||||
*/
|
||||
|
||||
#include "sc.h"
|
||||
@ -299,17 +299,6 @@ struct tty
|
||||
return VIRTUAL_TTY(unit);
|
||||
}
|
||||
|
||||
int
|
||||
scselect(dev_t dev, int rw, struct proc *p)
|
||||
{
|
||||
struct tty *tp = scdevtotty(dev);
|
||||
|
||||
if (tp == NULL)
|
||||
return(ENXIO);
|
||||
|
||||
return (ttyselect(tp, rw, p));
|
||||
}
|
||||
|
||||
static scr_stat
|
||||
*get_scr_stat(dev_t dev)
|
||||
{
|
||||
|
@ -25,7 +25,7 @@
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* $Id: syscons.h,v 1.1 1995/02/22 13:40:21 sos Exp $
|
||||
* $Id: syscons.h,v 1.2 1995/02/25 20:09:21 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -175,7 +175,7 @@ void scintr(int unit);
|
||||
int pcmmap(dev_t dev, int offset, int nprot);
|
||||
static void scinit(void);
|
||||
static u_int scgetc(int noblock);
|
||||
static struct tty *get_tty_ptr(dev_t dev);
|
||||
struct tty *scdevtotty(dev_t dev);
|
||||
static scr_stat *get_scr_stat(dev_t dev);
|
||||
static scr_stat *alloc_scp();
|
||||
static void init_scp(scr_stat *scp);
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.c 8.8 (Berkeley) 1/21/94
|
||||
* $Id: tty.c,v 1.32 1995/02/25 20:09:29 pst Exp $
|
||||
* $Id: tty.c,v 1.33 1995/02/27 19:47:31 ugen Exp $
|
||||
*/
|
||||
|
||||
#include "snp.h"
|
||||
@ -987,6 +987,19 @@ win: splx(s);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a wrapper for compatibility with the select vector used by
|
||||
* cdevsw. It relies on a proper xxxdevtotty routine.
|
||||
*/
|
||||
int
|
||||
ttselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc *p;
|
||||
{
|
||||
return ttyselect((*cdevsw[major(dev)].d_devtotty)(dev), rw, p);
|
||||
}
|
||||
|
||||
/*
|
||||
* This is now exported to the cy driver as well; if you hack this code,
|
||||
* then be sure to keep /sys/i386/isa/cy.c properly advised! -jkh
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty_pty.c 8.2 (Berkeley) 9/23/93
|
||||
* $Id: tty_pty.c,v 1.6 1994/10/29 23:59:48 ache Exp $
|
||||
* $Id: tty_pty.c,v 1.7 1995/02/25 20:09:30 pst Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -562,16 +562,6 @@ ptydevtotty(dev)
|
||||
return &pt_tty[minor(dev)];
|
||||
}
|
||||
|
||||
int
|
||||
ptsselect(dev, rw, p)
|
||||
dev_t dev;
|
||||
int rw;
|
||||
struct proc * p;
|
||||
{
|
||||
return ttyselect(ptydevtotty(dev), rw, p);
|
||||
}
|
||||
|
||||
|
||||
/*ARGSUSED*/
|
||||
int
|
||||
ptyioctl(dev, cmd, data, flag, p)
|
||||
|
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tty.h 8.6 (Berkeley) 1/21/94
|
||||
* $Id: tty.h,v 1.10 1995/02/14 21:23:48 ugen Exp $
|
||||
* $Id: tty.h,v 1.11 1995/02/25 20:09:44 pst Exp $
|
||||
*/
|
||||
|
||||
#ifndef _SYS_TTY_H_
|
||||
@ -209,6 +209,7 @@ int ttread __P((struct tty *tp, struct uio *uio, int flag));
|
||||
int ttnread __P((struct tty *));
|
||||
void ttrstrt __P((void *tp));
|
||||
int ttyselect __P((struct tty *tp, int rw, struct proc *p));
|
||||
int ttselect __P((dev_t dev, int rw, struct proc *p));
|
||||
void ttsetwater __P((struct tty *tp));
|
||||
int ttspeedtab __P((int speed, struct speedtab *table));
|
||||
int ttstart __P((struct tty *tp));
|
||||
|
Loading…
Reference in New Issue
Block a user