From owner-cvs-all Sat May 26 23:36:29 2001 Delivered-To: cvs-all@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 3EBC037B422; Sat, 26 May 2001 23:36:23 -0700 (PDT) (envelope-from dima@unixfreak.org) Received: from hornet.unixfreak.org (hornet [63.198.170.140]) by bazooka.unixfreak.org (Postfix) with ESMTP id 8F8323E28; Sat, 26 May 2001 23:36:22 -0700 (PDT) To: Warner Losh Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/kbdcontrol kbdcontrol.c In-Reply-To: <200105270524.f4R5ONE52094@harmony.village.org>; from imp@harmony.village.org on "Sat, 26 May 2001 23:24:23 -0600" Date: Sat, 26 May 2001 23:36:22 -0700 From: Dima Dorfman Message-Id: <20010527063622.8F8323E28@bazooka.unixfreak.org> Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Warner Losh 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