mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 14:56:13 +01:00
- Eliminate rpread(). Call generic ttyread(). (cf rev 1.33)
- Comment out deftermios. Termioschars() will give the default value. Pointed out by: bde
This commit is contained in:
parent
505f2a7ecf
commit
51e8791ed8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61581
@ -113,6 +113,8 @@ Byte_t rp_sBitMapSetTbl[8] =
|
||||
0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80
|
||||
};
|
||||
|
||||
/* Actually not used */
|
||||
#if notdef
|
||||
struct termios deftermios = {
|
||||
TTYDEF_IFLAG,
|
||||
TTYDEF_OFLAG,
|
||||
@ -124,6 +126,7 @@ struct termios deftermios = {
|
||||
TTYDEF_SPEED,
|
||||
TTYDEF_SPEED
|
||||
};
|
||||
#endif
|
||||
|
||||
/***************************************************************************
|
||||
Function: sReadAiopID
|
||||
@ -563,7 +566,6 @@ static timeout_t rpdtrwakeup;
|
||||
|
||||
static d_open_t rpopen;
|
||||
static d_close_t rpclose;
|
||||
static d_read_t rpread;
|
||||
static d_write_t rpwrite;
|
||||
static d_ioctl_t rpioctl;
|
||||
|
||||
@ -571,7 +573,7 @@ static d_ioctl_t rpioctl;
|
||||
struct cdevsw rp_cdevsw = {
|
||||
/* open */ rpopen,
|
||||
/* close */ rpclose,
|
||||
/* read */ rpread,
|
||||
/* read */ ttyread,
|
||||
/* write */ rpwrite,
|
||||
/* ioctl */ rpioctl,
|
||||
/* poll */ ttypoll,
|
||||
@ -1186,30 +1188,6 @@ rphardclose(struct rp_port *rp)
|
||||
wakeup(TSA_CARR_ON(tp));
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
rpread(dev, uio, flag)
|
||||
dev_t dev;
|
||||
struct uio *uio;
|
||||
int flag;
|
||||
{
|
||||
struct rp_port *rp;
|
||||
struct tty *tp;
|
||||
int unit, mynor, umynor, port, error = 0; /* SG */
|
||||
|
||||
umynor = (((minor(dev) >> 16) -1) * 32); /* SG */
|
||||
port = (minor(dev) & 0x1f); /* SG */
|
||||
mynor = (port + umynor); /* SG */
|
||||
unit = minor_to_unit[mynor]; /* SG */
|
||||
|
||||
if(IS_CONTROL(dev))
|
||||
return(ENODEV);
|
||||
rp = rp_addr(unit) + port;
|
||||
tp = rp->rp_tty;
|
||||
error = (*linesw[tp->t_line].l_read)(tp, uio, flag);
|
||||
return(error);
|
||||
}
|
||||
|
||||
static
|
||||
int
|
||||
rpwrite(dev, uio, flag)
|
||||
|
@ -81,4 +81,7 @@ struct rp_port {
|
||||
unsigned char RxBuf[RXFIFO_SIZE];
|
||||
};
|
||||
|
||||
/* Actually not used */
|
||||
#if notdef
|
||||
extern struct termios deftermios;
|
||||
#endif /* notdef */
|
||||
|
Loading…
Reference in New Issue
Block a user