Date: Mon, 14 Dec 1998 23:49:37 -0700 From: Warner Losh <imp@village.org> To: Mike Smith <mike@smith.net.au> Cc: current@FreeBSD.ORG Subject: Re: PAO Integration? Message-ID: <199812150649.XAA02978@harmony.village.org> In-Reply-To: Your message of "Sun, 13 Dec 1998 15:21:25 PST." <199812132321.PAA00350@dingo.cdrom.com> References: <199812132321.PAA00350@dingo.cdrom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <199812132321.PAA00350@dingo.cdrom.com> Mike Smith writes: : Drivers should export a set of options that are a union of the set of : options the driver supports plus a subset of the options for a device : provided by the bus. This can be determined by examining the driver : and bus data at probe/attach time; something that's easy with KLD/ : newbus/loader, but would require a bolt-on for newconfig. A sysctl-like mechanism would likely be a good idea. Let me explain what I have in mind. First, let us say that there are configuration files. Let us say these files use the sysctl syntax. Let us further suppose that we extend the sysctl notation to include wild cards. We'd have something similar to the xdefaults (xrdb actually) syntax. This sparse database would be kept around. When modules are initialized (either as being part of the base system, statically linked in, or when dynamically loaded by some means), the sysctl's variables are set (if they match this sparse database). Now, this would allow drivers and other modules to be dynamically configured in a user friendly manner. The "sparse database" would allow for the user to specify things (eg the band for a radio modem, the video signalling to use (ntsc vs pal), etc). Some examples: driver.aha*tune_bus: 1 driver.bt848*video_format: ntsc When the aha driver starts, it registers the sysctl variable driver.aha.unit0.tune_bus and then finds its value. Since it matchces the above sepecification, it will have a value of 1 when the driver checks its value. This would allow a very easy way to configure and customize the modules that are loaded and unloaded. Comments? Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812150649.XAA02978>