MCPcopy Create free account
hub / github.com/ClusterLabs/pacemaker / find_library_function

Function find_library_function

lib/common/utils.c:2129–2156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2127}
2128
2129void *
2130find_library_function(void **handle, const char *lib, const char *fn, gboolean fatal)
2131{
2132 char *error;
2133 void *a_function;
2134
2135 if (*handle == NULL) {
2136 *handle = dlopen(lib, RTLD_LAZY);
2137 }
2138
2139 if (!(*handle)) {
2140 crm_err("%sCould not open %s: %s", fatal?"Fatal: ":"", lib, dlerror());
2141 if(fatal) {
2142 crm_exit(100);
2143 }
2144 return NULL;
2145 }
2146
2147 a_function = dlsym(*handle, fn);
2148 if ((error = dlerror()) != NULL) {
2149 crm_err("%sCould not find %s in %s: %s", fatal?"Fatal: ":"", fn, lib, error);
2150 if(fatal) {
2151 crm_exit(100);
2152 }
2153 }
2154
2155 return a_function;
2156}
2157
2158char *
2159add_list_element(char *list, const char *value)

Callers 14

ccm_age_callbackFunction · 0.85
ccm_age_connectFunction · 0.85
try_heartbeatFunction · 0.85
cib_ccm_dispatchFunction · 0.85
cib_ccm_msg_callbackFunction · 0.85
ccm_connectFunction · 0.85
stonith_api_device_listFunction · 0.85
get_stonith_providerFunction · 0.85
crm_cluster_connectFunction · 0.85
register_heartbeat_connFunction · 0.85
do_ccm_controlFunction · 0.85

Calls 1

crm_exitFunction · 0.85

Tested by

no test coverage detected