From owner-freebsd-hackers Fri Sep 25 18:22:52 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA26390 for freebsd-hackers-outgoing; Fri, 25 Sep 1998 18:22:52 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from zippy.dyn.ml.org (sf3-30.ppp.wenet.net [206.15.84.30]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA26383 for ; Fri, 25 Sep 1998 18:22:50 -0700 (PDT) (envelope-from garbanzo@hooked.net) Received: from localhost (garbanzo@localhost) by zippy.dyn.ml.org (8.9.1/8.8.8) with SMTP id SAA01762; Fri, 25 Sep 1998 18:24:23 -0700 (PDT) (envelope-from garbanzo@hooked.net) X-Authentication-Warning: zippy.dyn.ml.org: garbanzo owned process doing -bs Date: Fri, 25 Sep 1998 18:24:23 -0700 (PDT) From: Alex X-Sender: garbanzo@zippy.dyn.ml.org To: Mike Smith cc: hackers@FreeBSD.ORG Subject: Re: sysctl descriptions.. sorta.. In-Reply-To: <199809250748.AAA01220@word.smith.net.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 25 Sep 1998, Mike Smith wrote: [..] > > So I've put some diffs that should add a new syscall (getsyscalldescr(2)) > > to achieve this (and also attempt to document a few more sysctls) at > > http://www.wenet.net/~garbanzo/junk. A small example of how to use this is > > also available at the afformentioned URL. > > Wrong way to do it. Use another "magic" method; see kern/kern_sysctl > for the existing "magic" methods. I'd use {0,5,...} in the same fashion > as {0,4,...} is already implemented. Should be very easy. Eck, always the easy way out. Anyways, what _is_ the proper way to do it? Pass it an int[4] to get at say hw.model {0,5,CTL_HW,HW_MODEL} and then SYSCTL_OUT the description? The comments that this interface should be beaten to death, and that SYSCTL_IN/OUT are rather untested is um, reassuring to say the least ;) - alex | "Contrary to popular belief, penguins are not the salvation of modern | | technology. Neither do they throw parties for the urban proletariat." | | Powered by FreeBSD http://www.freebsd.org/ | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message