diff options
author | Harald Welte <laforge@gnumonks.org> | 2010-05-25 23:00:45 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2010-05-25 23:38:19 +0200 |
commit | 237f6241f2b91a81b928ce4e3fc1364f61f11eaa (patch) | |
tree | 55367ceed33587f5511857a39d2f10448300a873 /src/vty/vty.c | |
parent | 4ebdf747286541c52311517fbedd0cb128631a61 (diff) |
[VTY] Introduce "struct vty_app_info" for vty_init() function
Diffstat (limited to 'src/vty/vty.c')
-rw-r--r-- | src/vty/vty.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/vty/vty.c b/src/vty/vty.c index 9012b5b5..ff17abf6 100644 --- a/src/vty/vty.c +++ b/src/vty/vty.c @@ -1633,17 +1633,15 @@ void vty_init_vtysh() extern void *tall_bsc_ctx; /* Install vty's own commands like `who' command. */ -void vty_init(const char *name, const char *version, const char *copyright) +void vty_init(struct vty_app_info *app_info) { - tall_vty_ctx = talloc_named_const(NULL, 0, "vty"); + tall_vty_ctx = talloc_named_const(app_info->tall_ctx, 0, "vty"); tall_vty_vec_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_vector"); tall_vty_cmd_ctx = talloc_named_const(tall_vty_ctx, 0, "vty_command"); cmd_init(1); - host.prog_name = name; - host.prog_version = version; - host.prog_copyright = copyright; + host.app_info = app_info; /* For further configuration read, preserve current directory. */ vty_save_cwd(); |