trace-cmd/report: Fix switch statement for --filter-test
The long opt for the filter test "--filter-test" was not setting
the filter-test variable. It was not even tested and would cause
the help message to appear.
Also add comments around the long op case statements.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
diff --git a/trace-read.c b/trace-read.c
index d87a89d..15284f5 100644
--- a/trace-read.c
+++ b/trace-read.c
@@ -773,15 +773,18 @@
break;
case 0:
switch(option_index) {
- case 0:
+ case 0: /* cpu */
if (filter_cpu)
add_cpu(optarg);
else
filter_cpu = atoi(optarg);
break;
- case 1:
+ case 1: /* events */
print_events = 1;
break;
+ case 2: /* filter-test */
+ test_filters = 1;
+ break;
default:
usage(argv);
}