Re: filemon

From: Peter Wemm <peter_at_wemm.org>
Date: Tue, 30 Jul 2024 20:09:27 UTC
On 7/30/2024 4:44 AM, Dag-Erling Smørgrav wrote:
> "Poul-Henning Kamp"<phk@phk.freebsd.dk>  writes:
>> Dag-Erling Smørgrav<des@FreeBSD.org>  writes:
>>> There is very little difference between options and devices in kernel
>>> configuration files, but for what it's worth, filemon is a device, not
>>> an option.
>> Apart from the internals of config(8) and it's input data, is there
>> any actual difference left ?
>  From the perspective of including files in the build, there is no
> difference: `foo/foo.c optional foo` does not care whether "foo" is an
> option or a device.  However, options generate macros, while devices
> don't.  So adding `option FILEMON` to your kernel config will cause
> filemon to be compiled into the kernel, but it will also generate an
> unneeded opt_filemon.h with `#define FILEMON 1`.  Or it would, if it
> weren't for this:
>
>      % git annotate sys/conf/options |& grep -i filemon
>      6c6f1f0185b84	(Peter Wemm	2013-07-03 20:22:12 +0000	109)FILEMON	opt_dontuse.h
>
> which suggests Peter intended filemon to be an option rather than a
> device.
>
> DES

Yes it probably should have been a device from the start.  I do not 
recall why I picked one over the other.  It was originally not 
config(8)able at all.

-Peter