From 57387fb2cd00a01027b75e1d19f7ed905410deab Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Tue, 3 May 2016 19:59:41 +0200 Subject: [PATCH] lib: add api method to read current config path Signed-off-by: Christian Franke --- lib/command.c | 6 ++++++ lib/command.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/command.c b/lib/command.c index fd4b2e2427..4f5b727ac5 100644 --- a/lib/command.c +++ b/lib/command.c @@ -4154,6 +4154,12 @@ host_config_set (const char *filename) host.config = XSTRDUP (MTYPE_HOST, filename); } +const char * +host_config_get (void) +{ + return host.config; +} + void install_default (enum node_type node) { diff --git a/lib/command.h b/lib/command.h index fd0918f118..ad9ccf505e 100644 --- a/lib/command.h +++ b/lib/command.h @@ -602,7 +602,7 @@ extern struct cmd_element config_exit_cmd; extern struct cmd_element config_quit_cmd; extern struct cmd_element config_help_cmd; extern struct cmd_element config_list_cmd; -extern char *host_config_file (void); +extern const char *host_config_get (void); extern void host_config_set (const char *); extern void print_version (const char *); -- 2.39.5