From: Roy Marples Date: Wed, 6 Aug 2008 08:28:43 +0000 (+0000) Subject: Remove the MINIMAL define. X-Git-Tag: v4.0.2~86 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f692d054ca89f52ba7113efb14433445c45dafb;p=thirdparty%2Fdhcpcd.git Remove the MINIMAL define. --- diff --git a/client.c b/client.c index 7ef73738..c100395e 100644 --- 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 09bf4e6b..58d1628b 100644 --- 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; diff --git a/dhcpcd.c b/dhcpcd.c index 5028073f..db7e9087 100644 --- 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;