VTY: pass program name, version and copyright to vty_init()
This enables us to make the VTY completely independent of any
compile-time program-specific information, i.e. one step closer
to using VTY as a shared library from multiple programs.
diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c
index c05847a..eaa0eac 100644
--- a/openbsc/src/vty_interface.c
+++ b/openbsc/src/vty_interface.c
@@ -41,6 +41,8 @@
#include <openbsc/vty.h>
#include <openbsc/gprs_ns.h>
+#include "../bscconfig.h"
+
static struct gsm_network *gsmnet;
/* FIXME: this should go to some common file */
@@ -1942,13 +1944,14 @@
}
extern int bsc_vty_init_extra(struct gsm_network *net);
+extern const char *openbsc_copyright;
int bsc_vty_init(struct gsm_network *net)
{
gsmnet = net;
cmd_init(1);
- vty_init();
+ vty_init("OpenBSC", PACKAGE_VERSION, openbsc_copyright);
install_element_ve(&show_net_cmd);
install_element_ve(&show_bts_cmd);