Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/tty.c
Show First 20 Lines • Show All 608 Lines • ▼ Show 20 Lines | for (cc = 0; cc < NCCS; ++cc) | ||||
if (lock->c_cc[cc]) | if (lock->c_cc[cc]) | ||||
new->c_cc[cc] = old->c_cc[cc]; | new->c_cc[cc] = old->c_cc[cc]; | ||||
if (lock->c_ispeed) | if (lock->c_ispeed) | ||||
new->c_ispeed = old->c_ispeed; | new->c_ispeed = old->c_ispeed; | ||||
if (lock->c_ospeed) | if (lock->c_ospeed) | ||||
new->c_ospeed = old->c_ospeed; | new->c_ospeed = old->c_ospeed; | ||||
} | } | ||||
if (cmd == TIOCSFBAUD) { | |||||
struct termios *lock = TTY_CALLOUT(tp, dev) ? | |||||
&tp->t_termios_lock_out : &tp->t_termios_lock_in; | |||||
/* For lock state devices, just fail */ | |||||
if (lock->c_ispeed || lock->c_ospeed) { | |||||
error = EINVAL; | |||||
goto done; | |||||
} | |||||
error = tty_drain(tp, 0); | |||||
if (error) | |||||
goto done; | |||||
} | |||||
error = tty_ioctl(tp, cmd, data, fflag, td); | error = tty_ioctl(tp, cmd, data, fflag, td); | ||||
done: tty_unlock(tp); | done: tty_unlock(tp); | ||||
return (error); | return (error); | ||||
} | } | ||||
static int | static int | ||||
ttydev_poll(struct cdev *dev, int events, struct thread *td) | ttydev_poll(struct cdev *dev, int events, struct thread *td) | ||||
▲ Show 20 Lines • Show All 1,724 Lines • Show Last 20 Lines |