Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 May 2001 23:36:22 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Warner Losh <imp@harmony.village.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.c 
Message-ID:  <20010527063622.8F8323E28@bazooka.unixfreak.org>
In-Reply-To: <200105270524.f4R5ONE52094@harmony.village.org>; from imp@harmony.village.org on "Sat, 26 May 2001 23:24:23 -0600"

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@harmony.village.org> writes:
> In message <20010527045057.A800E3E30@bazooka.unixfreak.org> Dima Dorfman writ
> es:
> : I agree that this is a better solution than what I committed, but I
> : still think `kbdcontrol -L` should be factored out into another
> : program.  It seems silly that kbdcontrol can't rely on up-to-date
> : headers like most other programs in the system.
> 
> I think that's likely an excellent idea.  However, there are some
> issues with this.  Some large number of items are defined in
> sys/kbdio.h, which makes it hard to disentangle.  A kludge version can
> be found at http://people.freebsd.org/~imp/kbddump.c.  It would be
> better to make this something that could be built into kbdcontrol, or
> built stand alone on a host to generate the keyboard .h files.

Are you suggesting that we factor out -L into a separate file under
src/usr.sbin/kbdcontrol, and make an option to compile *just* that
file (it would always be compiled with kbdcontrol itself)?  If so, I
like it!  It preserves backwards-compatibility (kbdcontrol will still
have an -L option) and doesn't create duplicate code.  The only
problem I see is that bootstrap-tools basically does a `cd ${DIR} &&
make all`; for this idea to work, it'd be necessary to have a
directory with just a Makefile which builds just the new file (e.g.,
builds just kbddump.c, which is still in usr.sbin/kbdcontrol).
Unless, of course, you want to change the bootstrap-tools target in
src/Makefile.inc1.

The way I'm seeing it is to take your kbddump.c from the URL above,
stick it in usr.sbin/kbdcontrol (after a little modification), remove
now-unnecessary stuff from kbdcontrol.c, then put kbddump.c in SRCS=
in usr.sbin/kbdcontrol/Makefile.  Then all we need is another Makefile
that builds *just* kbddump.c and we can stick that into
bootstrap-tools.

> 
> : > Consider the following untested patch:
> : 
> : If we can't/won't factor out `kbdcontrol -L`, I'll commit this.
> : Thanks!  I knew there had to be a better way than defining an ioctl in
> : the userland :-).
> 
> I'd commit this right away while people bikeshed the kbdcontrol :-)

Done!

					Dima Dorfman
					dima@unixfreak.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




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