From f017db44202eff49e4444be5717476e6ce84e1b0 Mon Sep 17 00:00:00 2001 From: siboud Date: Sun, 10 Apr 2005 02:58:50 +0000 Subject: [PATCH] filter core: - minor modification to integrate enum values in tree for state.execution_mode, state.execution_submode and state.process_status git-svn-id: http://ltt.polymtl.ca/svn@923 04897980-b3bd-0310-b5e0-8ef037075253 --- ltt/branches/poly/lttv/lttv/filter.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/ltt/branches/poly/lttv/lttv/filter.c b/ltt/branches/poly/lttv/lttv/filter.c index bed1b489..8f3fea18 100644 --- a/ltt/branches/poly/lttv/lttv/filter.c +++ b/ltt/branches/poly/lttv/lttv/filter.c @@ -262,9 +262,6 @@ gboolean lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvEx */ case LTTV_FILTER_STATE_PID: case LTTV_FILTER_STATE_PPID: - case LTTV_FILTER_STATE_EX_MODE: - case LTTV_FILTER_STATE_EX_SUBMODE: - case LTTV_FILTER_STATE_P_STATUS: case LTTV_FILTER_EVENT_TSC: switch(op) { case LTTV_FIELD_EQ: @@ -290,6 +287,28 @@ gboolean lttv_simple_expression_assign_operator(LttvSimpleExpression* se, LttvEx return FALSE; } break; + /* + * Enums + * can only be compared with 'equal' or 'not equal' operators + * + * unsigned int of 16 bits are used here since enums + * should not over 2^16-1 values + */ + case LTTV_FILTER_STATE_EX_MODE: + case LTTV_FILTER_STATE_EX_SUBMODE: + case LTTV_FILTER_STATE_P_STATUS: + switch(op) { + case LTTV_FIELD_EQ: + se->op = lttv_apply_op_eq_uint16; + break; + case LTTV_FIELD_NE: + se->op = lttv_apply_op_ne_uint16; + break; + default: + g_warning("Error encountered in operator assignment = or != expected"); + return FALSE; + } + break; /* * Ltttime */ -- 2.34.1