]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Remove the MINIMAL define.
authorRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 08:28:43 +0000 (08:28 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 08:28:43 +0000 (08:28 +0000)
client.c
dhcp.c
dhcpcd.c

index 7ef737381e4658f148a2d9c6d6c0efb10044368e..c100395e911610a0068b66af6df9096fa2863339 100644 (file)
--- a/client.c
+++ b/client.c
@@ -496,11 +496,9 @@ client_setup(struct if_state *state, const struct options *options)
        struct dhcp_lease *lease = &state->lease;
        struct in_addr addr;
        struct timeval tv;
-#ifndef MINIMAL
        size_t len = 0;
        unsigned char *duid = NULL;
        uint32_t ul;
-#endif
 
        state->state = STATE_INIT;
        state->nakoff = 1;
@@ -558,7 +556,6 @@ client_setup(struct if_state *state, const struct options *options)
                iface->net.s_addr = lease->net.s_addr;
        }
 
-#ifndef MINIMAL
        if (*options->clientid) {
                iface->clientid = xmalloc(options->clientid[0] + 1);
                memcpy(iface->clientid,
@@ -604,7 +601,6 @@ client_setup(struct if_state *state, const struct options *options)
                        memcpy(iface->clientid + 2, iface->hwaddr, iface->hwlen);
                }
        }
-#endif
 
        if (state->options & DHCPCD_LINK) {
                open_link_socket(iface);
diff --git a/dhcp.c b/dhcp.c
index 09bf4e6b98230087776b42ca882bd6cd7e22b28c..58d1628b68465c63edf840312cb1921db8783210 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -775,7 +775,6 @@ make_message(struct dhcp_message **message,
                p += 2;
        }
 
-#ifndef MINIMAL
        if (iface->clientid) {
                *p++ = DHCP_CLIENTID;
                memcpy(p, iface->clientid, iface->clientid[0] + 1);
@@ -795,7 +794,6 @@ make_message(struct dhcp_message **message,
                        p += options->classid[0] + 1;
                }
        }
-#endif
 
        if (type == DHCP_DISCOVER || type == DHCP_REQUEST) {
 #define PUTADDR(_type, _val) \
@@ -828,7 +826,6 @@ make_message(struct dhcp_message **message,
            type == DHCP_INFORM ||
            type == DHCP_REQUEST)
        {
-#ifndef MINIMAL
                if (options->hostname[0]) {
                        if (options->fqdn == FQDN_DISABLE) {
                                *p++ = DHCP_HOSTNAME;
@@ -872,7 +869,6 @@ make_message(struct dhcp_message **message,
                        memcpy(p, options->vendor, options->vendor[0] + 1);
                        p += options->vendor[0] + 1;
                }
-#endif
 
                *p++ = DHCP_PARAMETERREQUESTLIST;
                n_params = p;
index 5028073f41ce1f97477099a4c396a7f77d79cf76..db7e9087dc11c1525cb248480bb3923033abba71 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -209,7 +209,6 @@ add_environ(struct options *options, const char *value, int uniq)
        return newlist[i];
 }
 
-#ifndef MINIMAL
 #define parse_string(buf, len, arg) parse_string_hwaddr(buf, len, arg, 0)
 static ssize_t
 parse_string_hwaddr(char *sbuf, ssize_t slen, char *str, int clid)
@@ -307,7 +306,6 @@ parse_string_hwaddr(char *sbuf, ssize_t slen, char *str, int clid)
        }
        return l;
 }
-#endif
 
 static int
 parse_option(int opt, char *oarg, struct options *options)
@@ -315,9 +313,7 @@ parse_option(int opt, char *oarg, struct options *options)
        int i;
        char *p;
        ssize_t s;
-#ifndef MINIMAL
        struct in_addr addr;
-#endif
 
        switch(opt) {
        case 'b':
@@ -327,7 +323,6 @@ parse_option(int opt, char *oarg, struct options *options)
                strlcpy(options->script, oarg, sizeof(options->script));
                break;
        case 'h':
-#ifndef MINIMAL
                if (oarg)
                        s = parse_string(options->hostname + 1,
                                         MAXHOSTNAMELEN, oarg);
@@ -338,10 +333,8 @@ parse_option(int opt, char *oarg, struct options *options)
                        return -1;
                }
                options->hostname[0] = (uint8_t)s;
-#endif
                break;
        case 'i':
-#ifndef MINIMAL
                if (oarg)
                        s = parse_string((char *)options->classid + 1,
                                         CLASSID_MAX_LEN, oarg);
@@ -352,10 +345,8 @@ parse_option(int opt, char *oarg, struct options *options)
                        return -1;
                }
                *options->classid = (uint8_t)s;
-#endif
                break;
        case 'l':
-#ifndef MINIMAL
                if (*oarg == '-') {
                        logger(LOG_ERR,
                               "leasetime must be a positive value");
@@ -367,7 +358,6 @@ parse_option(int opt, char *oarg, struct options *options)
                        logger(LOG_ERR, "`%s' out of range", oarg);
                        return -1;
                }
-#endif
                break;
        case 'm':
                options->metric = atoint(oarg);
@@ -428,7 +418,6 @@ parse_option(int opt, char *oarg, struct options *options)
                }
                break;
        case 'u':
-#ifndef MINIMAL
                s = USERCLASS_MAX_LEN - options->userclass[0] - 1;
                s = parse_string((char *)options->userclass + options->userclass[0] + 2,
                                 s, oarg);
@@ -440,10 +429,8 @@ parse_option(int opt, char *oarg, struct options *options)
                        options->userclass[options->userclass[0] + 1] = s;
                        options->userclass[0] += s + 1;
                }
-#endif
                break;
        case 'v':
-#ifndef MINIMAL
                p = strchr(oarg, ',');
                if (!p || !p[1]) {
                        logger(LOG_ERR, "invalid vendor format");
@@ -478,7 +465,6 @@ parse_option(int opt, char *oarg, struct options *options)
                        options->vendor[options->vendor[0] + 2] = s;
                        options->vendor[0] += s + 2;
                }
-#endif
                break;
        case 'A':
                options->options &= ~DHCPCD_ARP;
@@ -505,7 +491,6 @@ parse_option(int opt, char *oarg, struct options *options)
                options->options |= DHCPCD_LASTLEASE;
                break;
        case 'F':
-#ifndef MINIMAL
                if (!oarg) {
                        options->fqdn = FQDN_BOTH;
                        break;
@@ -521,13 +506,11 @@ parse_option(int opt, char *oarg, struct options *options)
                               oarg);
                        return -1;
                }
-#endif
                break;
        case 'G':
                options->options &= ~DHCPCD_GATEWAY;
                break;
        case 'I':
-#ifndef MINIMAL
                /* Strings have a type of 0 */;
                options->classid[1] = 0;
                if (oarg)
@@ -544,7 +527,6 @@ parse_option(int opt, char *oarg, struct options *options)
                        options->options &= ~DHCPCD_DUID;
                        options->options &= ~DHCPCD_CLIENTID;
                }
-#endif
                break;
        case 'K':
                options->options &= ~DHCPCD_LINK;