Subject: @booted_kernel magic symlink?
To: None <tech-kern@NetBSD.org>
From: Chapman Flack <nblists@anastigmatix.net>
List: tech-kern
Date: 04/24/2006 18:03:45
Would there be any objections to an additional magic symlink
pattern @booted_kernel, replaced from the corresponding
CTL_MACHDEP sysctl node if the platform supplies it?

It would be handy for those few remaining userland utilities
that try to open the kernel by a fixed name for groveling,
when you have a few built kernels in various stages of
debugging.

If there's no objection, what's the best way to do it?
vfs_lookup.c doesn't include <machine/cpu.h> - if it did,
it could contain an #ifdef on the CPU_BOOTED_KERNEL sysctl
key and provide the additional magic only if it is defined.
But is that considered an unacceptable machine dependency
in vfs_lookup?  Would it be preferable to have some machdep
helper interface that is implemented somewhere else? If so,
where?

-Chap