Deleted Added
full compact
rc.c (38246) rc.c (38485)
1/*
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 84 unchanged lines hidden (view full) ---

93static d_open_t rcopen;
94static d_close_t rcclose;
95static d_read_t rcread;
96static d_write_t rcwrite;
97static d_ioctl_t rcioctl;
98static d_stop_t rcstop;
99static d_devtotty_t rcdevtotty;
100
1/*
2 * Copyright (C) 1995 by Pavel Antonov, Moscow, Russia.
3 * Copyright (C) 1995 by Andrey A. Chernov, Moscow, Russia.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 84 unchanged lines hidden (view full) ---

93static d_open_t rcopen;
94static d_close_t rcclose;
95static d_read_t rcread;
96static d_write_t rcwrite;
97static d_ioctl_t rcioctl;
98static d_stop_t rcstop;
99static d_devtotty_t rcdevtotty;
100
101#define CDEV_MAJOR 63
102static struct cdevsw rc_cdevsw =
103 { rcopen, rcclose, rcread, rcwrite, /*63*/
104 rcioctl, rcstop, noreset, rcdevtotty,/* rc */
105 ttpoll, nommap, NULL, "rc", NULL, -1 };
101#define CDEV_MAJOR 63
102static struct cdevsw rc_cdevsw = {
103 rcopen, rcclose, rcread, rcwrite,
104 rcioctl, rcstop, noreset, rcdevtotty,
105 ttpoll, nommap, NULL, "rc",
106 NULL, -1, nodump, nopsize,
107 D_TTY,
108};
106
107/* Per-board structure */
108static struct rc_softc {
109 u_int rcb_probed; /* 1 - probed, 2 - attached */
110 u_int rcb_addr; /* Base I/O addr */
111 u_int rcb_unit; /* unit # */
112 u_char rcb_dtr; /* DTR status */
113 struct rc_chans *rcb_baserc; /* base rc ptr */

--- 658 unchanged lines hidden (view full) ---

772 else
773 tp->t_cflag &= ~CLOCAL;
774
775 error = rc_param(tp, &tp->t_termios);
776 if (error)
777 goto out;
778 (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
779
109
110/* Per-board structure */
111static struct rc_softc {
112 u_int rcb_probed; /* 1 - probed, 2 - attached */
113 u_int rcb_addr; /* Base I/O addr */
114 u_int rcb_unit; /* unit # */
115 u_char rcb_dtr; /* DTR status */
116 struct rc_chans *rcb_baserc; /* base rc ptr */

--- 658 unchanged lines hidden (view full) ---

775 else
776 tp->t_cflag &= ~CLOCAL;
777
778 error = rc_param(tp, &tp->t_termios);
779 if (error)
780 goto out;
781 (void) rc_modctl(rc, TIOCM_RTS|TIOCM_DTR, DMSET);
782
780 ttsetwater(tp);
781
782 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
783 (*linesw[tp->t_line].l_modem)(tp, 1);
784 }
785 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev)
786 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
787 rc->rc_dcdwaits++;
788 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0);
789 rc->rc_dcdwaits--;

--- 718 unchanged lines hidden ---
783 if ((rc->rc_msvr & MSVR_CD) || CALLOUT(dev))
784 (*linesw[tp->t_line].l_modem)(tp, 1);
785 }
786 if (!(tp->t_state & TS_CARR_ON) && !CALLOUT(dev)
787 && !(tp->t_cflag & CLOCAL) && !(flag & O_NONBLOCK)) {
788 rc->rc_dcdwaits++;
789 error = tsleep(TSA_CARR_ON(tp), TTIPRI | PCATCH, "rcdcd", 0);
790 rc->rc_dcdwaits--;

--- 718 unchanged lines hidden ---