/* * * --- DDI/DKI entry points * */ int _init(void) { int error; #ifndef NPROBE (void) tnf_mod_load(); #endif error = ddi_soft_state_init(&av1394_statep, sizeof (av1394_inst_t), 1); if (error != 0) { #ifndef NPROBE (void) tnf_mod_unload(&av1394_modlinkage); #endif return (error); } if ((error = mod_install(&av1394_modlinkage)) != 0) { ddi_soft_state_fini(&av1394_statep); #ifndef NPROBE (void) tnf_mod_unload(&av1394_modlinkage); #endif } return (error); }
int _init() { int status; #ifndef NPROBE (void) tnf_mod_load(); #endif status = s1394_init(); if (status != 0) { TNF_PROBE_1(_init_error, S1394_TNF_SL_ERROR, "", tnf_string, msg, "s1394: failed in s1394_init"); #ifndef NPROBE (void) tnf_mod_unload(&s1394_modlinkage); #endif return (status); } status = mod_install(&s1394_modlinkage); if (status != 0) { TNF_PROBE_1(_init_error, S1394_TNF_SL_ERROR, "", tnf_string, msg, "s1394: failed in mod_install"); #ifndef NPROBE (void) tnf_mod_unload(&s1394_modlinkage); #endif } return (status); }
int _init() { int status; /* CONSTCOND */ ASSERT(NO_COMPETING_THREADS); #ifndef NPROBE (void) tnf_mod_load(); #endif ibmf_statep = &ibmf_state; /* * call ibmf_saa_init first so it can set up subnet list before being * contacted with ibt_async events */ status = ibmf_saa_impl_init(); if (status != IBMF_SUCCESS) { TNF_PROBE_1(_init_error, IBMF_TNF_ERROR, "", tnf_string, msg, "ibmf_saa_impl_init failed"); #ifndef NPROBE (void) tnf_mod_unload(&ibmf_modlinkage); #endif return (EACCES); } status = ibmf_init(); if (status != 0) { TNF_PROBE_1(_init_error, IBMF_TNF_ERROR, "", tnf_string, msg, "ibmf_init failed"); (void) ibmf_saa_impl_fini(); #ifndef NPROBE (void) tnf_mod_unload(&ibmf_modlinkage); #endif return (EACCES); } status = mod_install(&ibmf_modlinkage); if (status != 0) { TNF_PROBE_2(_init_error, IBMF_TNF_ERROR, "", tnf_string, msg, "mod_install failed", tnf_uint, status, status); #ifndef NPROBE (void) tnf_mod_unload(&ibmf_modlinkage); #endif (void) ibmf_fini(); ibmf_statep = (ibmf_state_t *)NULL; } return (status); }