svn commit: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7

Andrew Thompson andy at fud.org.nz
Thu Dec 6 23:25:06 UTC 2018


On Fri, 7 Dec 2018 at 11:58, Warner Losh <imp at freebsd.org> wrote:

> Author: imp
> Date: Thu Dec  6 22:58:26 2018
> New Revision: 341657
> URL: https://svnweb.freebsd.org/changeset/base/341657
>
> Log:
>   Dynamically load .so modules to expand functionality
>
>   o Dynamically load all the .so files found in /libexec/nvmecontrol and
>     /usr/local/libexec/nvmecontrol.
>   o Link nvmecontrol -rdynamic so that its symbols are visible to the
>     libraries we load.
>   o Create concatinated linker sets that we dynamically expand.
>   o Add the linked-in top and logpage linker sets to the mirrors for them
>     and add those sets to the mirrors when we load a new .so.
>   o Add some macros to help hide the names of the linker sets.
>   o Update the man page.
>
...

>
> Modified: head/sbin/nvmecontrol/nvmecontrol.c
>
> ==============================================================================
> --- head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:35:07 2018
> (r341656)
> +++ head/sbin/nvmecontrol/nvmecontrol.c Thu Dec  6 22:58:26 2018
> (r341657)
> @@ -34,6 +34,8 @@ __FBSDID("$FreeBSD$");
>  #include <sys/stat.h>
> ...
>  int
>  main(int argc, char *argv[])
>  {
>
> +       add_to_top(NVME_CMD_BEGIN(top), NVME_CMD_LIMIT(top));
> +       add_to_logpage(NVME_LOGPAGE_BEGIN, NVME_LOGPAGE_LIMIT);
> +
> +       load_dir("/lib/nvmecontrol");
> +       load_dir("/usr/local/lib/nvmecontrol");
>
>
 You have /libexec/nvmecontrol in some places and /lib/nvmecontrol in
others. It seems it actually loads from the latter.


Andrew


More information about the svn-src-head mailing list