[lttng-dev] [RFC PATCH lttng-tools 5/5] Add builtin modules support to kmod modprobe

Jérémie Galarneau jeremie.galarneau at efficios.com
Thu Mar 17 20:14:53 UTC 2016


All merged in master. I have fixed the typo Mathieu commented on and a
couple of others.

Thanks!
Jérémie

On Fri, Feb 12, 2016 at 4:31 PM, Michael Jeanson <mjeanson at efficios.com> wrote:
> Report success when loading a module that is builtin the kernel.
>
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
>  src/bin/lttng-sessiond/modprobe.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/src/bin/lttng-sessiond/modprobe.c b/src/bin/lttng-sessiond/modprobe.c
> index 3e41f5c..ca0467e 100644
> --- a/src/bin/lttng-sessiond/modprobe.c
> +++ b/src/bin/lttng-sessiond/modprobe.c
> @@ -180,9 +180,12 @@ static int modprobe_lttng(struct kern_modules_param *modules,
>                         goto error;
>                 }
>
> -               ret = kmod_module_probe_insert_module(mod, KMOD_PROBE_IGNORE_LOADED,
> +               ret = kmod_module_probe_insert_module(mod, 0,
>                                 NULL, NULL, NULL, NULL);
> -               if (ret < 0) {
> +               if (ret == -EEXIST) {
> +                       DBG("Module %s is already loaded", modules[i].name);
> +                       ret = 0;
> +               } else if (ret < 0) {
>                         if (required) {
>                                 ERR("Unable to load required module %s",
>                                                 modules[i].name);
> --
> 2.7.0
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list