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

Function daemon_option

lib/common/logging.c:99–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99const char *
100daemon_option(const char *option)
101{
102 char env_name[NAME_MAX];
103 const char *value = NULL;
104
105 snprintf(env_name, NAME_MAX, "PCMK_%s", option);
106 value = getenv(env_name);
107 if (value != NULL) {
108 crm_trace("Found %s = %s", env_name, value);
109 return value;
110 }
111
112 snprintf(env_name, NAME_MAX, "HA_%s", option);
113 value = getenv(env_name);
114 if (value != NULL) {
115 crm_trace("Found %s = %s", env_name, value);
116 return value;
117 }
118
119 crm_trace("Nothing found for %s", option);
120 return NULL;
121}
122
123void
124set_daemon_option(const char *option, const char *value)

Callers 4

daemon_option_enabledFunction · 0.85
crm_log_initFunction · 0.85
read_configFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected