* Look up the class for an audit event in the class mapping table. */
| 112 | * Look up the class for an audit event in the class mapping table. |
| 113 | */ |
| 114 | au_class_t |
| 115 | au_event_class(au_event_t event) |
| 116 | { |
| 117 | struct evclass_list *evcl; |
| 118 | struct evclass_elem *evc; |
| 119 | au_class_t class; |
| 120 | |
| 121 | EVCLASS_RLOCK(); |
| 122 | evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE]; |
| 123 | class = 0; |
| 124 | LIST_FOREACH(evc, &evcl->head, entry) { |
| 125 | if (evc->event == event) { |
| 126 | class = evc->class; |
| 127 | goto out; |
| 128 | } |
| 129 | } |
| 130 | out: |
| 131 | EVCLASS_RUNLOCK(); |
| 132 | return (class); |
| 133 | } |
| 134 | |
| 135 | /* |
| 136 | * Insert a event to class mapping. If the event already exists in the |
no outgoing calls
no test coverage detected