diff options
| author | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2017-08-25 16:36:31 -0700 |
|---|---|---|
| committer | Mitesh Kanjariya <mitesh@cumulusnetworks.com> | 2017-08-25 16:36:31 -0700 |
| commit | 0802e118dd634b37d580effb7e5df4d4c26fa35c (patch) | |
| tree | 0045e3e79d0b7401ec01d9790b18542fd75c1335 /lib/command.c | |
| parent | 1f53ef552de070d22a69558baafca8f8c5b9eecd (diff) | |
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.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/lib/command.c b/lib/command.c index 78d8dbdc62..2d262c1146 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; } |
