topo_module.c (c40d7343) topo_module.c (12cc75c8)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 186 unchanged lines hidden (view full) ---

195 topo_hdl_strfree(thp, mod->tm_rootdir);
196
197 topo_hdl_free(thp, mod, sizeof (topo_mod_t));
198}
199
200static topo_mod_t *
201set_create_error(topo_hdl_t *thp, topo_mod_t *mod, const char *path, int err)
202{
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 186 unchanged lines hidden (view full) ---

195 topo_hdl_strfree(thp, mod->tm_rootdir);
196
197 topo_hdl_free(thp, mod, sizeof (topo_mod_t));
198}
199
200static topo_mod_t *
201set_create_error(topo_hdl_t *thp, topo_mod_t *mod, const char *path, int err)
202{
203 topo_dprintf(thp, TOPO_DBG_ERR, "unable to load module %s: %s\n",
204 path, topo_strerror(err));
203 if (path != NULL)
204 topo_dprintf(thp, TOPO_DBG_ERR, "unable to load module %s: "
205 "%s\n", path, topo_strerror(err));
206 else
207 topo_dprintf(thp, TOPO_DBG_ERR, "unable to load module: "
208 "%s\n", topo_strerror(err));
205
206 if (mod != NULL)
207 topo_mod_destroy(mod);
208
209 (void) topo_hdl_seterrno(thp, err);
210
211 return (NULL);
212}

--- 192 unchanged lines hidden ---
209
210 if (mod != NULL)
211 topo_mod_destroy(mod);
212
213 (void) topo_hdl_seterrno(thp, err);
214
215 return (NULL);
216}

--- 192 unchanged lines hidden ---