From 237f6241f2b91a81b928ce4e3fc1364f61f11eaa Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Tue, 25 May 2010 23:00:45 +0200 Subject: [VTY] Introduce "struct vty_app_info" for vty_init() function --- include/osmocom/vty/command.h | 6 +----- include/osmocom/vty/vty.h | 10 +++++++++- 2 files changed, 10 insertions(+), 6 deletions(-) (limited to 'include/osmocom/vty') diff --git a/include/osmocom/vty/command.h b/include/osmocom/vty/command.h index 1db8ffea..0136f576 100644 --- a/include/osmocom/vty/command.h +++ b/include/osmocom/vty/command.h @@ -58,9 +58,7 @@ struct host { const char *motd; char *motdfile; - const char *prog_name; - const char *prog_version; - const char *prog_copyright; + const struct vty_app_info *app_info; }; /* There are some command levels which called from command node. */ @@ -387,6 +385,4 @@ void print_version(int print_copyright); extern void *tall_vty_cmd_ctx; -enum node_type (*vty_go_parent_cb)(struct vty *vty); - #endif /* _ZEBRA_COMMAND_H */ diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h index f82ada1c..f0174624 100644 --- a/include/osmocom/vty/vty.h +++ b/include/osmocom/vty/vty.h @@ -127,8 +127,16 @@ static inline char *vty_newline(struct vty *vty) return VTY_NEWLINE; } +struct vty_app_info { + char *name; + char *version; + char *copyright; + void *tall_ctx; + enum node_type (*go_parent_cb)(struct vty *vty); +}; + /* Prototypes. */ -void vty_init(const char *name, const char *version, const char *copyright); +void vty_init(struct vty_app_info *app_info); int vty_read_config_file(const char *file_name, void *priv); void vty_init_vtysh (void); void vty_reset (void); -- cgit v1.2.3