diff options
| author | Marius Strobl <marius@FreeBSD.org> | 2016-01-19 23:34:27 +0000 |
|---|---|---|
| committer | Marius Strobl <marius@FreeBSD.org> | 2016-01-19 23:34:27 +0000 |
| commit | 9750d9e5b6f011a99da26a6f1e57c65545d26473 (patch) | |
| tree | 317f9c0bd52607efdfd2f6c62f25b5b2aa3842e2 /sys/dev/uart | |
| parent | eb2ad8724bbaa87ab9a264562075d28e5428e9c2 (diff) | |
Notes
Diffstat (limited to 'sys/dev/uart')
| -rw-r--r-- | sys/dev/uart/uart_tty.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c index ada49277c187..6b526aec4106 100644 --- a/sys/dev/uart/uart_tty.c +++ b/sys/dev/uart/uart_tty.c @@ -355,6 +355,18 @@ uart_tty_free(void *arg) */ } +static bool +uart_tty_busy(struct tty *tp) +{ + struct uart_softc *sc; + + sc = tty_softc(tp); + if (sc == NULL || sc->sc_leaving) + return (FALSE); + + return (sc->sc_txbusy); +} + static struct ttydevsw uart_tty_class = { .tsw_flags = TF_INITLOCK|TF_CALLOUT, .tsw_open = uart_tty_open, @@ -365,6 +377,7 @@ static struct ttydevsw uart_tty_class = { .tsw_param = uart_tty_param, .tsw_modem = uart_tty_modem, .tsw_free = uart_tty_free, + .tsw_busy = uart_tty_busy, }; int |
