ftrace: Allow enabling of filters via index of available_filter_functions
[sfrench/cifs-2.6.git] / kernel / trace / trace_events_filter.c
index f052ecb085e96f7fe05b00953205c927601bb772..ade606c33231ce886494634fa5d57b85b4b4f43e 100644 (file)
@@ -825,6 +825,9 @@ enum regex_type filter_parse_regex(char *buff, int len, char **search, int *not)
 
        *search = buff;
 
+       if (isdigit(buff[0]))
+               return MATCH_INDEX;
+
        for (i = 0; i < len; i++) {
                if (buff[i] == '*') {
                        if (!i) {
@@ -862,6 +865,8 @@ static void filter_build_regex(struct filter_pred *pred)
        }
 
        switch (type) {
+       /* MATCH_INDEX should not happen, but if it does, match full */
+       case MATCH_INDEX:
        case MATCH_FULL:
                r->match = regex_match_full;
                break;