From owner-freebsd-current Thu Feb 23 07:20:15 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id HAA04411 for current-outgoing; Thu, 23 Feb 1995 07:20:15 -0800 Received: from dns.netvision.net.il (root@dns.NetVision.net.il [194.90.1.5]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id HAA04405 for ; Thu, 23 Feb 1995 07:20:09 -0800 Received: from ugen.NetManage.co.il (ugen.netmanage.co.il [192.114.78.165]) by dns.netvision.net.il (8.6.9/8.6.9) with SMTP id RAA25603; Thu, 23 Feb 1995 17:18:52 +0200 Date: Thu, 23 Feb 95 16:55:56 IST From: "Ugen J.S.Antsilevich" Subject: Re: snp(4)/watch(8) code review comments To: Paul Traina Cc: current@FreeBSD.org X-Mailer: Chameleon 4.00-Arm-25, TCP/IP for Windows, NetManage Inc. Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@FreeBSD.org Precedence: bulk >I want to add a new field to cdevsw[] that is a vector to a function in the >driver that will return a pointer to the right struct tty element given a >major/minor number. This sort of decision needs to be done locally to the >driver to account for things like major/minor number masking (e.g. cua0 vs >ttyd1 in the sio driver). > >Does anyone have an objection to my adding this new field? It will simply >be NULL for any device not supporting that vector and all invocations of it >test for non-NULL first before calling. Hmm...add the whole function just for such a thing like snoop...Too much:) Actually why can't you just use minor number as index in tty table already in cdevsw?? ok..i know that you'd have a problemm about serial lines with their weird minor number stuff but on the other hand you can put conversion of minor number to index in table as a part of watch utility..you anyway need some conversion if you want (at least I want:))) to use not only normal device names like ttyp0 but also pty0,vty0 and other symbolic names... Major change to cdevsw is may be nice but too big...:)) *IMHO* >Actually, I'm just doing it on general principles, I never actually intend >to use the snp drivers in real life, I was just digging through things and >didn't like the current interface so I started hacking on it. > >If you want, I can feed you what I've done so far, or just finish it up this >weekend. Hmm.if you already doing this-continue,it's ok with me 100% but better don't do that change to cdevsw-this still can be done another less radical ways..:) Thanx. -- -=Ugen J.S.Antsilevich=- NetVision - Israeli Commercial Internet | Learning E-mail: ugen@NetVision.net.il | To Fly. [c] Phone : +972-4-550330 |