Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Dec 2018 12:24:50 +1300
From:      Andrew Thompson <andy@fud.org.nz>
To:        Warner Losh <imp@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r341657 - in head: etc/mtree sbin/nvmecontrol share/man/man7
Message-ID:  <CAFAOGNT1C0tYW6KBPHbKpSkE57S0agdn5nY9G6C5meXjMjRCTA@mail.gmail.com>
In-Reply-To: <201812062258.wB6MwQKb026274@repo.freebsd.org>
References:  <201812062258.wB6MwQKb026274@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 7 Dec 2018 at 11:58, Warner Losh <imp@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFAOGNT1C0tYW6KBPHbKpSkE57S0agdn5nY9G6C5meXjMjRCTA>