Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Feb 95 16:55:56 IST
From:      "Ugen J.S.Antsilevich" <ugen@netvision.net.il>
To:        Paul Traina <pst@shockwave.com>
Cc:        current@FreeBSD.org
Subject:   Re: snp(4)/watch(8) code review comments 
Message-ID:  <Chameleon.950223170655.ugen@ugen.NetManage.co.il>

next in thread | raw e-mail | index | archive | help
>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                            |   





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Chameleon.950223170655.ugen>