summaryrefslogtreecommitdiffstats
path: root/lib/command.c
diff options
context:
space:
mode:
authorMitesh Kanjariya <mitesh@cumulusnetworks.com>2017-08-26 01:36:31 +0200
committerMitesh Kanjariya <mitesh@cumulusnetworks.com>2017-08-26 01:36:31 +0200
commit0802e118dd634b37d580effb7e5df4d4c26fa35c (patch)
tree0045e3e79d0b7401ec01d9790b18542fd75c1335 /lib/command.c
parentFix compilation errors for domainname (diff)
downloadfrr-0802e118dd634b37d580effb7e5df4d4c26fa35c.tar.xz
frr-0802e118dd634b37d580effb7e5df4d4c26fa35c.zip
Handle hostname/domainname properly for FreeBSD
Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Diffstat (limited to 'lib/command.c')
-rw-r--r--lib/command.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/command.c b/lib/command.c
index 78d8dbdc6..2d262c114 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -130,12 +130,6 @@ struct host host;
*/
const char *hostname_get(void)
{
- struct utsname names;
-
- if (!host.name) {
- uname(&names);
- host.name = XSTRDUP(MTYPE_HOST, names.nodename);
- }
return host.name;
}
@@ -144,14 +138,6 @@ const char *hostname_get(void)
*/
const char *domainname_get(void)
{
- struct utsname names;
-
- if (!host.name || !host.domainname) {
-#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME
- uname(&names);
- host.domainname = XSTRDUP(MTYPE_HOST, names.domainname);
-#endif
- }
return host.domainname;
}