Implement support for lttng-modules syscall filtering
[lttng-tools.git] / src / bin / lttng-sessiond / main.c
index c7fc178cdf09820809f14c218ac236f989439317..22dd28e1e9df1538baa242e595284580db67dc60 100644 (file)
@@ -157,6 +157,7 @@ static const struct option long_options[] = {
        { "config", 1, 0, 'f' },
        { "load", 1, 0, 'l' },
        { "kmod-probes", 1, 0, 'P' },
+       { "extra-kmod-probes", 1, 0, 'e' },
        { NULL, 0, 0, 0 }
 };
 
@@ -3121,17 +3122,21 @@ skip_domain:
        }
        case LTTNG_DISABLE_EVENT:
        {
+               /* FIXME: passing packed structure to non-packed pointer */
+               /* TODO: handle filter */
                ret = cmd_disable_event(cmd_ctx->session, cmd_ctx->lsm->domain.type,
                                cmd_ctx->lsm->u.disable.channel_name,
-                               cmd_ctx->lsm->u.disable.name);
+                               &cmd_ctx->lsm->u.disable.event);
                break;
        }
        case LTTNG_DISABLE_ALL_EVENT:
        {
                DBG("Disabling all events");
 
+               /* FIXME: passing packed structure to non-packed pointer */
                ret = cmd_disable_event_all(cmd_ctx->session, cmd_ctx->lsm->domain.type,
-                               cmd_ctx->lsm->u.disable.channel_name);
+                               cmd_ctx->lsm->u.disable.channel_name,
+                               &cmd_ctx->lsm->u.disable.event);
                break;
        }
        case LTTNG_ENABLE_CHANNEL:
@@ -4214,6 +4219,7 @@ static void usage(void)
        fprintf(stderr, "  -f  --config                       Load daemon configuration file\n");
        fprintf(stderr, "  -l  --load PATH                    Load session configuration\n");
        fprintf(stderr, "      --kmod-probes                  Specify kernel module probes to load\n");
+       fprintf(stderr, "      --extra-kmod-probes            Specify extra kernel module probes to load\n");
 }
 
 /*
@@ -4400,6 +4406,14 @@ static int set_option(int opt, const char *arg, const char *optname)
                        ret = -ENOMEM;
                }
                break;
+       case 'e':
+               free(kmod_extra_probes_list);
+               kmod_extra_probes_list = strdup(arg);
+               if (!kmod_extra_probes_list) {
+                       perror("strdup");
+                       ret = -ENOMEM;
+               }
+               break;
        case 'f':
                /* This is handled in set_options() thus silent break. */
                break;
This page took 0.024913 seconds and 5 git commands to generate.