]> Zhao Yanbai Git Server - minix.git/commitdiff
Remove a redundant getdomainname() implementation.
authorKees van Reeuwijk <reeuwijk@few.vu.nl>
Mon, 26 Apr 2010 12:43:43 +0000 (12:43 +0000)
committerKees van Reeuwijk <reeuwijk@few.vu.nl>
Mon, 26 Apr 2010 12:43:43 +0000 (12:43 +0000)
lib/libc/ip/Makefile.inc
lib/libc/ip/domainname.c [deleted file]

index e46f2c144c666cf288b4065d4730f8ed43607cba..c95e1ef71c9ffafa0c0f75a2ac6918756aeee345 100644 (file)
@@ -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 (file)
index 6ff13bb..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-domainname.c
-*/
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
-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;
-}