summaryrefslogtreecommitdiffstats
path: root/lib/vty.c
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-08-21 23:56:06 +0200
committerMitesh Kanjariya <mitesh@marvel-07.cumulusnetworks.com>2017-08-25 01:37:16 +0200
commit419cd5a03f8bbf3d068ab99d1497dfe183753899 (patch)
treeaa7eb92aef44848db554e24674b5ef2ddf08a57c /lib/vty.c
parentzebra: lookup link by ifindex (diff)
downloadfrr-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.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/vty.c b/lib/vty.c
index 59a882535..0caded4a8 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -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());
}
}