aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2021-05-17 18:54:21 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2021-05-17 18:54:23 +0200
commitebb6c1fc4df89fac6bbd4c36c1a286b6b96fd49e (patch)
tree633582d693cca992f860826c8c20b824e958a992
parentosmo_sock_*_ofd(): Mark OSMO_FD_WRITE on non-blocking connect() (diff)
downloadlibosmocore-ebb6c1fc4df89fac6bbd4c36c1a286b6b96fd49e.tar.xz
libosmocore-ebb6c1fc4df89fac6bbd4c36c1a286b6b96fd49e.zip
vty: Implement missing public API host_config_file()
The API was defined in the header file but not implemented. Change-Id: I69de9864fa7cd421557b9fc630beefea6d90b4cc
-rw-r--r--include/osmocom/vty/command.h2
-rw-r--r--src/vty/command.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h
index 228dc5b8..81333b48 100644
--- a/include/osmocom/vty/command.h
+++ b/include/osmocom/vty/command.h
@@ -457,7 +457,7 @@ extern struct cmd_element config_exit_cmd;
extern struct cmd_element config_help_cmd;
extern struct cmd_element config_list_cmd;
extern struct cmd_element config_end_cmd;
-char *host_config_file();
+const char *host_config_file(void);
void host_config_set(const char *);
char *osmo_asciidoc_escape(const char *inp);
diff --git a/src/vty/command.c b/src/vty/command.c
index 4825109e..6d63d841 100644
--- a/src/vty/command.c
+++ b/src/vty/command.c
@@ -4219,6 +4219,11 @@ void host_config_set(const char *filename)
host.config = talloc_strdup(tall_vty_cmd_ctx, filename);
}
+const char *host_config_file(void)
+{
+ return host.config;
+}
+
/*! Deprecated, now happens implicitly when calling install_node().
* Users of the API may still attempt to call this function, hence
* leave it here as a no-op. */