summaryrefslogtreecommitdiffstats
path: root/sys/dev/uart/uart_tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/uart/uart_tty.c')
-rw-r--r--sys/dev/uart/uart_tty.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/uart/uart_tty.c b/sys/dev/uart/uart_tty.c
index ada4927..6b526ae 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
OpenPOWER on IntegriCloud