Subject: Re: @booted_kernel magic symlink?
To: None <tech-kern@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-kern
Date: 04/27/2006 10:05:28
On Wed, 26 Apr 2006, Bill Studenmund wrote:
> [This thread] was about making it easier to find the booted kernel.

There's already an easy way to find the booted kernel: $(sysctl
machdep.booted_kernel).  I suppose that's not easy enough for some people,
and I can see the attraction of a fixed name that would just DTRT when
used as an arg to open(3).

I see two obvious ways of allowing a fixed file name to DTRT: a magic
symlink, or a magic kernfs node.  I think I'd prefer a kernfs node,
like /kern/kernel, and it has the advantage that it would be possible
(in principle) to make it work in some situations where a magic symlink
would not work.

--apb (Alan Barrett)