Date: Tue, 30 Jul 2024 13:09:27 -0700 From: Peter Wemm <peter@wemm.org> To: =?UTF-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>, Poul-Henning Kamp <phk@phk.freebsd.dk> Cc: Gary Jennejohn <garyj@gmx.de>, freebsd-current@freebsd.org, peter@freebsd.org Subject: Re: filemon Message-ID: <ac51752d-3ac9-4c6d-acab-29536107a113@wemm.org> In-Reply-To: <86o76f5ckt.fsf@ltc.des.dev> References: <ZqT6_a_0F8DCUsBm@int21h> <CAFDf7UKxhSu%2BqMGV1KahrSX9ho8vFut4avxNVX4D8QGa6%2B%2BTjQ@mail.gmail.com> <20240727170122.675f6bfe@ernst.home> <865xsn6ya9.fsf@ltc.des.dev> <202407301049.46UAnrXX011101@critter.freebsd.dk> <86o76f5ckt.fsf@ltc.des.dev>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 7/30/2024 4:44 AM, Dag-Erling
Smørgrav wrote:<br>
</div>
<blockquote type="cite" cite="mid:86o76f5ckt.fsf@ltc.des.dev">
<pre class="moz-quote-pre" wrap="">"Poul-Henning Kamp" <a class="moz-txt-link-rfc2396E" href="mailto:phk@phk.freebsd.dk"><phk@phk.freebsd.dk></a> writes:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Dag-Erling Smørgrav <a class="moz-txt-link-rfc2396E" href="mailto:des@FreeBSD.org"><des@FreeBSD.org></a> writes:
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">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.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">Apart from the internals of config(8) and it's input data, is there
any actual difference left ?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
>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</pre>
</blockquote>
<p>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.</p>
<p><span style="white-space: pre-wrap">-Peter</span></p>
<p><span style="white-space: pre-wrap">
</span></p>
</body>
</html>
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ac51752d-3ac9-4c6d-acab-29536107a113>
