diff --git a/cli/main.c b/cli/main.c index 5076d38f..78d3401e 100644 --- a/cli/main.c +++ b/cli/main.c @@ -796,9 +796,6 @@ static int get_events(struct switchtec_dev *dev, break; } - if (!show_all && e->partition != local_part) - continue; - if (clear_all || event_id & (1 << e->eid)) flags = SWITCHTEC_EVT_FLAG_CLEAR; else @@ -810,6 +807,9 @@ static int get_events(struct switchtec_dev *dev, return -1; } + if (!show_all && e->partition != local_part) + continue; + e->count = ret; e++; if (e - elist > elist_len)