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

Function get_cluster_pref

lib/common/utils.c:238–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236}
237
238const char *
239get_cluster_pref(GHashTable * options, pe_cluster_option * option_list, int len, const char *name)
240{
241 int lpc = 0;
242 const char *value = NULL;
243 gboolean found = FALSE;
244
245 for (lpc = 0; lpc < len; lpc++) {
246 if (safe_str_eq(name, option_list[lpc].name)) {
247 found = TRUE;
248 value = cluster_option(options,
249 option_list[lpc].is_valid,
250 option_list[lpc].name,
251 option_list[lpc].alt_name, option_list[lpc].default_value);
252 }
253 }
254 CRM_CHECK(found, crm_err("No option named: %s", name));
255 CRM_ASSERT(value != NULL);
256 return value;
257}
258
259void
260config_metadata(const char *name, const char *version, const char *desc_short,

Callers 3

cib_prefFunction · 0.85
pe_prefFunction · 0.85
crmd_prefFunction · 0.85

Calls 1

cluster_optionFunction · 0.85

Tested by

no test coverage detected