From owner-freebsd-hackers Mon Dec 11 8:56:21 2000 From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 11 08:56:18 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from ringworld.nanolink.com (pool249-tch-1.Sofia.0rbitel.net [212.95.170.249]) by hub.freebsd.org (Postfix) with SMTP id 9CC0437B402 for ; Mon, 11 Dec 2000 08:56:16 -0800 (PST) Received: (qmail 3324 invoked by uid 1000); 11 Dec 2000 16:55:24 -0000 Date: Mon, 11 Dec 2000 18:55:24 +0200 From: Peter Pentchev To: Dag-Erling Smorgrav Cc: hackers@FreeBSD.ORG Subject: Re: eye-candy hack - warp_saver changing direction :) Message-ID: <20001211185524.E606@ringworld.oblivion.bg> Mail-Followup-To: Dag-Erling Smorgrav , hackers@FreeBSD.ORG References: <20001211161847.A606@ringworld.oblivion.bg> <20001211180346.C606@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001211180346.C606@ringworld.oblivion.bg>; from roam@orbitel.bg on Mon, Dec 11, 2000 at 06:03:46PM +0200 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, Dec 11, 2000 at 06:03:46PM +0200, Peter Pentchev wrote: > On Mon, Dec 11, 2000 at 05:01:22PM +0100, Dag-Erling Smorgrav wrote: > > Peter Pentchev writes: > > > This one defines two sysctl's - kern.warp_dir (zero to roll to the left, > > > non-zero to roll the other way), and kern.warp_period (number of iterations > > > before changing direction). The warp_period is measured in.. seconds, isn't > > > it - how often the saver is called to do its dance.. > > > > kern.* is not the right place for this. It should go in user.*, unless > > that is reserved for userland, in which case a subtree of kern.* is > > probably the Right Thing. > > Yes, I was wondering about user.*, but I decided it was reserved for > userland. OK, I'll put it in a subtree. How does kern.ss.warp.* sound? > Or kern.saver.warp.*? Or maybe even kern.syscons.saver.warp.*? (oif!) Well, I can't quite make it work with a kern.* sysctl subtree.. It's obvious that this has something to do with SYSCTL_DECL(), but - how? :) I currently have these in my warp_saver.c (just kern.saver for simplicity): SYSCTL_DECL(_kern_saver); SYSCTL_INT(_kern_saver, OID_AUTO, dir, CTLFLAG_RW, &warp_dir, 0, "") SYSCTL_INT(_kern_saver, OID_AUTO, step, CTLFLAG_RW, &warp_step, 0, "") SYSCTL_INT(_kern_saver, OID_AUTO, period, CTLFLAG_RW, &warp_period, 0, "") It builds and installs fine, and then: [root@ringworld:v0 /usr/mysrc/sys/modules/syscons/warp]# make load /sbin/kldload -v ./warp_saver.ko link_elf: symbol sysctl__kern_saver_children undefined kldload: can't load ./warp_saver.ko: Exec format error *** Error code 1 Stop in /usr/mysrcx/sys/modules/syscons/warp. [root@ringworld:v0 /usr/mysrc/sys/modules/syscons/warp]# Apparently I'm missing something.. Help? G'luck, Peter -- If wishes were fishes, the antecedent of this conditional would be true. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message