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 <[EMAIL PROTECTED]> 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.. <whine> Help? </whine>

G'luck,
Peter

-- 
If wishes were fishes, the antecedent of this conditional would be true.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to