summaryrefslogtreecommitdiffstats
path: root/sys/dev/nmdm
diff options
context:
space:
mode:
authoremax <emax@FreeBSD.org>2007-08-01 21:38:11 +0000
committeremax <emax@FreeBSD.org>2007-08-01 21:38:11 +0000
commit36a98790f47575822ff7e3fb6019825603a9e608 (patch)
tree390054597c59fcc83140f48dd6c91e9a0e094002 /sys/dev/nmdm
parent86e4cc2cc9e4992ddeb4256ecbd0540fda8d7bb0 (diff)
downloadFreeBSD-src-36a98790f47575822ff7e3fb6019825603a9e608.zip
FreeBSD-src-36a98790f47575822ff7e3fb6019825603a9e608.tar.gz
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
Diffstat (limited to 'sys/dev/nmdm')
-rw-r--r--sys/dev/nmdm/nmdm.c7
1 files changed, 6 insertions, 1 deletions
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
OpenPOWER on IntegriCloud