From: Kees van Reeuwijk Date: Mon, 26 Apr 2010 12:43:43 +0000 (+0000) Subject: Remove a redundant getdomainname() implementation. X-Git-Tag: v3.1.7~126 X-Git-Url: http://zhaoyanbai.com/repos/%22/xml/v3/zones/static/dnssec-keyfromlabel.html?a=commitdiff_plain;h=5b0efc542f0ecadf5e2418a880999a55b66e6d6e;p=minix.git Remove a redundant getdomainname() implementation. --- diff --git a/lib/libc/ip/Makefile.inc b/lib/libc/ip/Makefile.inc index e46f2c144..c95e1ef71 100644 --- a/lib/libc/ip/Makefile.inc +++ b/lib/libc/ip/Makefile.inc @@ -8,7 +8,6 @@ SRCS+= \ connect.c \ dhcp_gettag.c \ dhcp_settag.c \ - domainname.c \ ether_line.c \ ethera2n.c \ ethere2a.c \ diff --git a/lib/libc/ip/domainname.c b/lib/libc/ip/domainname.c deleted file mode 100644 index 6ff13bb91..000000000 --- a/lib/libc/ip/domainname.c +++ /dev/null @@ -1,30 +0,0 @@ -/* -domainname.c -*/ - -#include -#include -#include - -int getdomainname(domain, size) -char *domain; -size_t size; -{ - FILE *domainfile; - char *line; - - domainfile= fopen("/etc/domainname", "r"); - if (!domainfile) - { - return -1; - } - - line= fgets(domain, size, domainfile); - fclose(domainfile); - if (!line) - return -1; - line= strchr(domain, '\n'); - if (line) - *line= '\0'; - return 0; -}