pacemaker  2.1.7-0f7f88312f
Scalable High-Availability cluster resource manager
Macros | Functions
options.c File Reference
#include <crm_internal.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <crm/crm.h>
Include dependency graph for options.c:

Go to the source code of this file.

Macros

#define _GNU_SOURCE
 

Functions

void pcmk__cli_help (char cmd)
 
const char * pcmk__env_option (const char *option)
 
void pcmk__set_env_option (const char *option, const char *value, bool compat)
 Set or unset a Pacemaker environment variable option. More...
 
bool pcmk__env_option_enabled (const char *daemon, const char *option)
 
bool pcmk__valid_interval_spec (const char *value)
 
bool pcmk__valid_boolean (const char *value)
 
bool pcmk__valid_number (const char *value)
 
bool pcmk__valid_positive_number (const char *value)
 
bool pcmk__valid_quorum (const char *value)
 
bool pcmk__valid_script (const char *value)
 
bool pcmk__valid_percentage (const char *value)
 
const char * pcmk__cluster_option (GHashTable *options, const pcmk__cluster_option_t *option_list, int len, const char *name)
 
gchar * pcmk__format_option_metadata (const char *name, const char *desc_short, const char *desc_long, pcmk__cluster_option_t *option_list, int len)
 
void pcmk__validate_cluster_options (GHashTable *options, pcmk__cluster_option_t *option_list, int len)
 

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 11 of file options.c.

Function Documentation

◆ pcmk__cli_help()

void pcmk__cli_help ( char  cmd)

Definition at line 25 of file options.c.

◆ pcmk__cluster_option()

const char* pcmk__cluster_option ( GHashTable *  options,
const pcmk__cluster_option_t option_list,
int  len,
const char *  name 
)

Definition at line 350 of file options.c.

◆ pcmk__env_option()

const char* pcmk__env_option ( const char *  option)

Definition at line 58 of file options.c.

◆ pcmk__env_option_enabled()

bool pcmk__env_option_enabled ( const char *  daemon,
const char *  option 
)

Definition at line 165 of file options.c.

◆ pcmk__format_option_metadata()

gchar* pcmk__format_option_metadata ( const char *  name,
const char *  desc_short,
const char *  desc_long,
pcmk__cluster_option_t option_list,
int  len 
)

Definition at line 426 of file options.c.

◆ pcmk__set_env_option()

void pcmk__set_env_option ( const char *  option,
const char *  value,
bool  compat 
)

Set or unset a Pacemaker environment variable option.

Set an environment variable option with a "PCMK_" prefix and optionally an "HA_" prefix for backward compatibility.

Parameters
[in]optionEnvironment variable name (without prefix)
[in]valueNew value (or NULL to unset)
[in]compatIf false and value is not NULL, set only "PCMK_<option>"; otherwise, set (or unset) both "PCMK_<option>" and "HA_<option>"
Note
compat is ignored when value is NULL. A NULL value means we're unsetting option. pcmk__get_env_option() checks for both prefixes, so we want to clear them both.

Definition at line 108 of file options.c.

◆ pcmk__valid_boolean()

bool pcmk__valid_boolean ( const char *  value)

Definition at line 187 of file options.c.

◆ pcmk__valid_interval_spec()

bool pcmk__valid_interval_spec ( const char *  value)

Definition at line 180 of file options.c.

◆ pcmk__valid_number()

bool pcmk__valid_number ( const char *  value)

Definition at line 195 of file options.c.

◆ pcmk__valid_percentage()

bool pcmk__valid_percentage ( const char *  value)

Definition at line 251 of file options.c.

◆ pcmk__valid_positive_number()

bool pcmk__valid_positive_number ( const char *  value)

Definition at line 209 of file options.c.

◆ pcmk__valid_quorum()

bool pcmk__valid_quorum ( const char *  value)

Definition at line 218 of file options.c.

◆ pcmk__valid_script()

bool pcmk__valid_script ( const char *  value)

Definition at line 224 of file options.c.

◆ pcmk__validate_cluster_options()

void pcmk__validate_cluster_options ( GHashTable *  options,
pcmk__cluster_option_t option_list,
int  len 
)

Definition at line 501 of file options.c.