Date: Fri, 28 Dec 2007 14:55:26 -0800 From: Alfred Perlstein <alfred@freebsd.org> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-arch@freebsd.org Subject: Re: kernel features MIB Message-ID: <20071228225526.GJ76698@elvis.mu.org> In-Reply-To: <200712281745.08144.jhb@freebsd.org> References: <200712271704.44796.jhb@FreeBSD.org> <200712281745.08144.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* John Baldwin <jhb@freebsd.org> [071228 14:54] wrote: > On Thursday 27 December 2007 05:04:44 pm John Baldwin wrote: > > At work we don't have a pretty API for this at all, but I'm thinking for > > FreeBSD we can do this: > > > > FEATURE(foo, "description of foo") > > > > which is a macro to create the 'kern.features.foo' node and set it to 1. Then > > we could have a routine in libc: > > > > int feature_present(const char *name); > > > > That returns a boolean to indicate if a given feature is present or not by > > invoking sysctlbyname(3), etc. > > > > Any objections to the idea? > > So here's a bikeshed question I have no idea for. Which header should > feature_present()'s prototype go in? I anticipate this routine being > used in libc itself, so I don't think it can go into libutil. Whereever sysconf/pathconf stuff is. -- - Alfred Perlstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071228225526.GJ76698>