lib: add api method to read current config path
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
diff --git a/lib/command.c b/lib/command.c
index 56220da..12e8bb1 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -4108,6 +4108,12 @@
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 6a20e23..09bc516 100644
--- a/lib/command.h
+++ b/lib/command.h
@@ -556,7 +556,7 @@
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 (char *);
extern void print_version (const char *);