mirror of
https://github.com/EnterpriseDB/repmgr.git
synced 2026-03-25 16:16:29 +00:00
Initial config file infrastructure
Also unify command line option structure/parsing so everything's in the same order in the code.
This commit is contained in:
44
config.c
44
config.c
@@ -10,6 +10,9 @@
|
||||
#include "config.h"
|
||||
|
||||
const static char *_progname = NULL;
|
||||
static void _parse_config(t_configuration_options *options, ItemList *error_list);
|
||||
static void exit_with_errors(ItemList *config_errors);
|
||||
|
||||
|
||||
void
|
||||
set_progname(const char *argv0)
|
||||
@@ -23,6 +26,47 @@ progname(void)
|
||||
return _progname;
|
||||
}
|
||||
|
||||
bool
|
||||
load_config(const char *config_file, bool verbose, t_configuration_options *options, char *argv0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
parse_config(t_configuration_options *options)
|
||||
{
|
||||
/* Collate configuration file errors here for friendlier reporting */
|
||||
static ItemList config_errors = { NULL, NULL };
|
||||
|
||||
_parse_config(options, &config_errors);
|
||||
|
||||
if (config_errors.head != NULL)
|
||||
{
|
||||
exit_with_errors(&config_errors);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void
|
||||
_parse_config(t_configuration_options *options, ItemList *error_list)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
reload_config(t_configuration_options *orig_options)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
exit_with_errors(ItemList *config_errors)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
item_list_append(ItemList *item_list, char *error_message)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user