lttng UI: read opt_cmd_name opt arg for each command
[lttng-tools.git] / lttng / commands / enable_channels.c
index 715552b5b706a811a853028cfa9953db31e6c9b8..aac5fa4979c9d274b62f72ee61bcdd67c311dd9b 100644 (file)
@@ -36,6 +36,7 @@ static char *opt_cmd_name;
 static char *opt_session_name;
 static int opt_pid_all;
 static int opt_userspace;
+static char *opt_cmd_name;
 static pid_t opt_pid;
 static struct lttng_channel chan;
 
@@ -208,10 +209,6 @@ int cmd_enable_channels(int argc, const char **argv)
                        usage(stderr);
                        ret = CMD_SUCCESS;
                        goto end;
-               case OPT_USERSPACE:
-                       opt_userspace = 1;
-                       opt_cmd_name = poptGetOptArg(pc);
-                       break;
                case OPT_DISCARD:
                        chan.attr.overwrite = 0;
                        DBG("Channel set to discard");
@@ -236,6 +233,10 @@ int cmd_enable_channels(int argc, const char **argv)
                        chan.attr.read_timer_interval = atoi(poptGetOptArg(pc));
                        DBG("Channel read timer interval set to %d", chan.attr.read_timer_interval);
                        break;
+               case OPT_USERSPACE:
+                       opt_userspace = 1;
+                       opt_cmd_name = poptGetOptArg(pc);
+                       break;
                default:
                        usage(stderr);
                        ret = CMD_UNDEFINED;
This page took 0.024017 seconds and 4 git commands to generate.