X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=ucw%2Fconf-getopt.c;h=bbb81e1119e9cfe66c646897e355400d36247ccf;hb=ec6703bb4d58e504fde8ea8429f9b26ab6632696;hp=8e321cc00fdf55f661a54b703b436b837ab2d531;hpb=6efdc514c193f18c9ef840096750c37e78a01bf6;p=libucw.git diff --git a/ucw/conf-getopt.c b/ucw/conf-getopt.c index 8e321cc0..bbb81e11 100644 --- a/ucw/conf-getopt.c +++ b/ucw/conf-getopt.c @@ -26,8 +26,8 @@ char *cf_def_file = CONFIG_UCW_DEFAULT_CONFIG; #endif char *cf_env_file = CONFIG_UCW_ENV_VAR_CONFIG; -static void -load_default(struct cf_context *cc) +void +cf_load_default(struct cf_context *cc) { if (cc->config_loaded++) return; @@ -55,7 +55,7 @@ load_default(struct cf_context *cc) static void end_of_options(struct cf_context *cc) { - load_default(cc); + cf_load_default(cc); if (cc->postpone_commit && cf_close_group()) die("Loading of configuration failed"); } @@ -76,7 +76,7 @@ cf_getopt(int argc, char *const argv[], const char *short_opts, const struct opt die("The -S and -C options must precede all other arguments"); if (res == 'S') { - load_default(cc); + cf_load_default(cc); if (cf_set(optarg)) die("Cannot set %s", optarg); }