Lines Matching refs:moddef

1337 	MODLIST_T	*moddef;
1341 moddef = state.modlist;
1342 if (moddef != NULL) {
1343 cmp = strcasecmp(name, moddef->ml_mod->mod_name);
1345 return (moddef);
1347 *insdef = moddef;
1348 moddef = moddef->ml_next;
1350 while (moddef && (cmp < 0)) {
1351 cmp = strcasecmp(moddef->ml_mod->mod_name,
1354 return (moddef);
1356 *insdef = moddef;
1357 moddef = (*insdef)->ml_next;
1441 * moddef - NULL, or a module definition to be released via free()
1455 * use strings from moddef, or from the sharable library (which will
1459 load_module_err(MODLIST_T *moddef, void *dl_hdl, const char *dl_path,
1472 * moddef. If we free moddef, the printf() will die on access
1494 if (moddef != NULL)
1495 free(moddef);
1511 * moddef - If this function issues a non-returning error, it will
1512 * first return the memory referenced by moddef. This argument
1523 load_module_dlopen(const char *path, MODLIST_T *moddef, int must_exist)
1542 load_module_err(moddef, NULL, NULL,
1555 validate_optarg(elfedit_cmd_optarg_t *optarg, int isopt, MODLIST_T *moddef,
1581 load_module_err(moddef, dl_hdl, dl_path,
1692 load_module_err(moddef, dl_hdl, dl_path, MSG_INTL(errmsg),
1731 MODLIST_T *moddef, *insdef;
1757 moddef = module_loaded(name, &insdef);
1758 if (moddef != NULL)
1759 return (moddef->ml_mod);
1776 moddef = elfedit_malloc(MSG_INTL(MSG_ALLOC_MODDEF),
1777 sizeof (*moddef) + PATH_MAX + 1);
1778 moddef->ml_path = ((char *)moddef) + sizeof (*moddef);
1782 hdl = load_module_dlopen(name, moddef, must_exist);
1790 load_module_err(moddef, NULL, NULL,
1793 hdl = load_module_dlopen(path, moddef, 0);
1796 load_module_err(moddef, NULL, NULL,
1801 free(moddef);
1813 load_module_err(moddef, hdl, path,
1823 load_module_err(moddef, hdl, path,
1836 load_module_err(moddef, hdl, path,
1841 validate_optarg(cmd->cmd_args, 0, moddef, mod->mod_name,
1844 validate_optarg(cmd->cmd_opt, 1, moddef, mod->mod_name,
1856 free(moddef); /* Rare case: Don't need it */
1891 load_module_err(moddef, hdl, path,
1902 moddef->ml_next = state.modlist;
1903 state.modlist = moddef;
1905 moddef->ml_next = insdef->ml_next;
1906 insdef->ml_next = moddef;
1908 moddef->ml_mod = mod;
1909 moddef->ml_dl_hdl = hdl;
1910 (void) strlcpy((char *)moddef->ml_path, path, PATH_MAX + 1);
1913 moddef->ml_mod->mod_name, path);
1915 return (moddef->ml_mod);
1925 MODLIST_T *moddef, *insdef;
1927 moddef = module_loaded(name, &insdef);
1928 if (moddef == NULL)
1932 if (moddef->ml_dl_hdl == NULL)
1934 moddef->ml_mod->mod_name);
1941 moddef->ml_mod->mod_name, moddef->ml_path);
1948 if (dlclose(moddef->ml_dl_hdl) != 0)
1950 moddef->ml_path, dlerror());
1954 state.modlist = moddef->ml_next;
1956 insdef->ml_next = moddef->ml_next;
1959 free(moddef);