Subject: re: opt_*.h vs. _KERNEL_OPT?
To: matthew green <mrg@eterna.com.au>
From: Hubert Feyrer <hubert@feyrer.de>
List: tech-kern
Date: 06/15/2005 04:15:10
On Wed, 15 Jun 2005, matthew green wrote:
>   What is _KERNEL_OPT, and should #includes of opt_*.h files be wrapped in a
>   check for it? I.e.
>
> _KERNEL_OPT is defined by all kernel builds and most opt_*.h files should
> be wrapped with it like your first example below.  it is not defined by LKM's
> and it useful for them.  you may want to add a way to enable this option in
> the vnd LKM (or just enable it always - i wouldn't object and i'm the author
> of that LKM.)

IC, so if I include the opt_*.h file only if _KERNEL_OPT is set,
the symbols in it won't be defined for LKMs. For my case, 
VND_WITH_COMPRESSION will not be defined, and hence no compression support 
will be available in the vnd(4) LKM.

I think that makes sense, as I assume the feature will not be used 
usually, to prevent bloat. Interested parties can still enable it.

I've uploaded the latest patch, maybe you can have another look:
http://www.feyrer.de/Misc/vnd.gz-HF20050615.patch

FWIW, the compression-related fields in the softc structure are left on in 
any case to assist kernel memory grovler.


  - Hubert