Lines Matching refs:hdl

49 self_case_create(fmd_hdl_t *hdl, int kind, const char *name)
51 self_case_t *scp = fmd_hdl_alloc(hdl, sizeof (self_case_t), FMD_SLEEP);
54 scp->sc_name = fmd_hdl_strdup(hdl, name, FMD_SLEEP);
60 self_case_destroy(fmd_hdl_t *hdl, self_case_t *scp)
62 fmd_hdl_strfree(hdl, scp->sc_name);
63 fmd_hdl_free(hdl, scp, sizeof (self_case_t));
67 self_case_lookup(fmd_hdl_t *hdl, int kind, const char *name)
71 while ((cp = fmd_case_next(hdl, cp)) != NULL) {
72 self_case_t *scp = fmd_case_getspecific(hdl, cp);
82 self_recv(fmd_hdl_t *hdl, fmd_event_t *ep, nvlist_t *nvl, const char *class)
101 if ((cp = self_case_lookup(hdl, SC_MODULE, name)) == NULL) {
102 cp = fmd_case_open(hdl,
103 self_case_create(hdl, SC_MODULE, name));
106 fmd_case_add_ereport(hdl, cp, ep);
113 if (fmd_case_solved(hdl, cp))
119 fmd_case_add_suspect(hdl, cp, flt);
120 fmd_case_solve(hdl, cp);
157 if (self_case_lookup(hdl, SC_CLASS, class) != NULL)
164 cp = fmd_case_open(hdl, self_case_create(hdl, SC_CLASS, class));
165 fmd_case_add_ereport(hdl, cp, ep);
170 fmd_case_add_suspect(hdl, cp, flt);
171 fmd_case_solve(hdl, cp);
175 self_close(fmd_hdl_t *hdl, fmd_case_t *cp)
177 self_case_destroy(hdl, fmd_case_getspecific(hdl, cp));
189 self_init(fmd_hdl_t *hdl)
191 fmd_module_t *mp = (fmd_module_t *)hdl; /* see below */
209 if (fmd_hdl_register(hdl, FMD_API_VERSION, &info) != 0)
212 (void) fmd_stat_create(hdl, FMD_STAT_NOALLOC, sizeof (self_stats) /
217 self_fini(fmd_hdl_t *hdl)
221 while ((cp = fmd_case_next(hdl, cp)) != NULL)
222 self_case_destroy(hdl, fmd_case_getspecific(hdl, cp));