From 36a98790f47575822ff7e3fb6019825603a9e608 Mon Sep 17 00:00:00 2001 From: emax Date: Wed, 1 Aug 2007 21:38:11 +0000 Subject: Call ttyld_close() in nmdmclose() to ensure that nmdm(4) closes line discipline installed onto /dev/nmdmX device. Reviewed by: julian Approved by: re (hrs) MFC after: 3 days --- sys/dev/nmdm/nmdm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/dev/nmdm') diff --git a/sys/dev/nmdm/nmdm.c b/sys/dev/nmdm/nmdm.c index 31b1805..110553a 100644 --- a/sys/dev/nmdm/nmdm.c +++ b/sys/dev/nmdm/nmdm.c @@ -401,8 +401,13 @@ nmdmmodem(struct tty *tp, int sigon, int sigoff) static int nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) { + struct tty *tp = dev->si_tty; + int error; + + error = ttyld_close(tp, flag); + (void) tty_close(dev->si_tty); - return (tty_close(dev->si_tty)); + return (error); } static void -- cgit v1.1