From owner-freebsd-current@FreeBSD.ORG Fri Jul 27 00:50:56 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB7EC16A41B for ; Fri, 27 Jul 2007 00:50:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outY.internet-mail-service.net (outY.internet-mail-service.net [216.240.47.248]) by mx1.freebsd.org (Postfix) with ESMTP id D502613C48E for ; Fri, 27 Jul 2007 00:50:56 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Thu, 26 Jul 2007 17:50:56 -0700 Received: from julian-mac.elischer.org (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id EEE55125ADD; Thu, 26 Jul 2007 17:50:55 -0700 (PDT) Message-ID: <46A94194.5010207@elischer.org> Date: Thu, 26 Jul 2007 17:51:32 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.5 (Macintosh/20070716) MIME-Version: 1.0 To: Maksim Yevmenkin References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: nmdm(4) does not call .l_close X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2007 00:50:57 -0000 Maksim Yevmenkin wrote: > Dear All, > > it seems to me that nmdm(4) is not calling .l_close (i.e. does not > close whatever line discipline might be installed onto /dev/nmdmXX). > the problem is easy to reproduce - just open /dev/nmdm0A and install, > say, ng_tty(4) line discipline onto it. after that, simply close the > /dev/nmdm0A. in theory, the ng_tty(4) node should disappear when > device is closed, but it does not. when I originally wrote this I copied what the pty code was doing. This has all been redone since then however. I'm guessing it should do whatever the pty code is now doing :-) . > > the following patch fixes things for me > > === > > beetle% diff -u nmdm.c.orig nmdm.c > --- nmdm.c.orig 2006-11-21 16:59:40.000000000 -0800 > +++ nmdm.c 2007-07-26 17:01:47.000000000 -0700 > @@ -402,7 +402,7 @@ > nmdmclose(struct cdev *dev, int flag, int mode, struct thread *td) > { > > - return (tty_close(dev->si_tty)); > + return (ttyclose(dev, flag, mode, td)); sounds believable.. but I don't really know offhand. does it work with other disciplines? > } > > static void > > === > > please review and let me know if this is ok to commit. please ignore > tabs-to-spaces conversion. its just cut-and-paste from the screen. > > thanks, > max > > p.s. i also think ng_tty(4) should use NG_NODE_REVIVE() is its not dying. > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"