Lines Matching refs:event
46 nvlist_t *event;
56 * When we add a controller we get an add event for each drive on the
60 * do a single walk. If an add event comes in after we start the walk, we
67 * While running (state 2), if event comes in, go back to waiting (state 1)
83 static void add_event_to_queue(nvlist_t *event);
95 nvlist_t *event = NULL;
99 /* wait until there is an event in the queue */
120 event = events->event;
128 if (*errp != 0 || event != NULL) {
133 return (event);
184 nvlist_t *event = NULL;
190 if (nvlist_alloc(&event, NVATTRS, 0) != 0) {
191 event = NULL;
197 nvlist_add_string(event, DM_EV_NAME, name) != 0) {
202 nvlist_add_uint32(event, DM_EV_DTYPE, dtype) != 0) {
206 if (nvlist_add_string(event, DM_EV_TYPE, etype) != 0) {
211 nvlist_free(event);
212 event = NULL;
216 add_event_to_queue(event);
231 /* Bind event handler and create subscriber handle */
265 add_event_to_queue(nvlist_t *event)
269 if (event == NULL) {
280 nvlist_free(event);
283 events->event = event;
297 nvlist_free(event);
300 new_event->event = event;
313 nvlist_t *event;
318 event = dm_get_event(&error);
323 callback(event, error);
436 * adds when we add a controller since we will get an add event for each
455 /* absorb the event and do nothing */