diff options
author | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-08-21 23:56:06 +0200 |
---|---|---|
committer | Mitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com> | 2017-08-25 01:37:16 +0200 |
commit | 419cd5a03f8bbf3d068ab99d1497dfe183753899 (patch) | |
tree | aa7eb92aef44848db554e24674b5ef2ddf08a57c /lib/vty.c | |
parent | zebra: lookup link by ifindex (diff) | |
download | frr-419cd5a03f8bbf3d068ab99d1497dfe183753899.tar.xz frr-419cd5a03f8bbf3d068ab99d1497dfe183753899.zip |
lib/bgpd: provide/use API to get hostname/domainname
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -250,16 +250,9 @@ void vty_hello(struct vty *vty) /* Put out prompt and wait input from user. */ static void vty_prompt(struct vty *vty) { - struct utsname names; - const char *hostname; - if (vty->type == VTY_TERM) { - hostname = host.name; - if (!hostname) { - uname(&names); - hostname = names.nodename; - } - vty_out(vty, cmd_prompt(vty->node), hostname); + vty_out(vty, cmd_prompt(vty->node), + hostname_get()); } } |