forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigdir.h
44 lines (35 loc) · 1.42 KB
/
configdir.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef LIGHTNING_COMMON_CONFIGDIR_H
#define LIGHTNING_COMMON_CONFIGDIR_H
#include "config.h"
#include <ccan/tal/tal.h>
/* Unless overridden, we exit with status 1 when option parsing fails */
extern int opt_exitcode;
/* Helper for options which are tal() strings. */
char *opt_set_talstr(const char *arg, char **p);
/* Initial options setup */
void setup_option_allocators(void);
/* Minimal config parsing for tools: use opt_early_parse/opt_parse after */
void minimal_config_opts(const tal_t *ctx,
int argc, char *argv[],
char **config_filename,
char **basedir,
char **config_netdir,
char **rpc_filename);
/* Parse initial config options and files */
struct configvar **initial_config_opts(const tal_t *ctx,
int *argc, char *argv[],
bool remove_args,
char **config_filename,
char **config_basedir,
char **config_netdir,
char **rpc_filename);
/* This is called before we know all the options. */
void parse_configvars_early(struct configvar **cvs, bool developer);
/* This is called once, after we know all the options (if full_knowledge
* is false, ignore unknown non-cmdline options). */
void parse_configvars_final(struct configvar **cvs,
bool full_knowledge, bool developer);
/* For listconfigs to detect. */
bool is_restricted_ignored(const void *fn);
bool is_restricted_print_if_nonnull(const void *fn);
#endif /* LIGHTNING_COMMON_CONFIGDIR_H */