From: Roy Marples Date: Fri, 2 May 2008 08:49:23 +0000 (+0000) Subject: Move some opts to compat. X-Git-Tag: v4.0.2~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=082fabc7e0e2751556f07a6958db67b2b1d06e43;p=thirdparty%2Fdhcpcd.git Move some opts to compat. --- diff --git a/Makefile b/Makefile index 7e26c90c..acc94e3b 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,8 @@ # Copyright 2008 Roy Marples PROG= dhcpcd +VERSION= 4.0.0-alpha4 + SRCS= common.c dhcp.c dhcpcd.c logger.c net.c signal.c SRCS+= configure.c client.c SRCS+= ${SRC_IF} ${SRC_SOCKET} @@ -10,8 +12,6 @@ SCRIPT= dhcpcd.sh CONF= dhcpcd.conf MAN5= dhcpcd.conf.5 MAN8= dhcpcd.8 dhcpcd.sh.8 - -VERSION= 4.0.0-alpha3 CLEANFILES= dhcpcd.sh dhcpcd.conf.5 dhcpcd.8 dhcpcd.sh.8 BINDIR= ${PREFIX}/sbin diff --git a/dhcpcd.c b/dhcpcd.c index 789902e8..209e7a2a 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -51,7 +51,7 @@ const char copyright[] = "Copyright (c) 2006-2008 Roy Marples"; /* Don't set any optional arguments here so we retain POSIX * compatibility with getopt */ -#define OPTS "c:df:h:i:kl:m:no:pr:s:t:u:xADEF:GHI:LO:STV" +#define OPTS "c:df:h:i:kl:m:no:pr:s:t:u:xADEF:GI:LO:TV" static int doversion = 0; static int dohelp = 0; @@ -72,9 +72,9 @@ static const struct option longopts[] = { {"timeout", required_argument, NULL, 't'}, {"userclass", required_argument, NULL, 'u'}, {"exit", no_argument, NULL, 'x'}, - {"lastlease", no_argument, NULL, 'E'}, {"noarp", no_argument, NULL, 'A'}, {"duid", no_argument, NULL, 'D'}, + {"lastlease", no_argument, NULL, 'E'}, {"fqdn", optional_argument, NULL, 'F'}, {"nogateway", no_argument, NULL, 'G'}, {"clientid", optional_argument, NULL, 'I'}, @@ -153,7 +153,7 @@ read_pid(const char *pidfile) static void usage(void) { - printf("usage: "PACKAGE" [-dknpADEGHLOSTV] [-c script] [-f file ] [-h hostname]\n" + printf("usage: "PACKAGE" [-dknpxADEGHLOSTV] [-c script] [-f file ] [-h hostname]\n" " [-i classID ] [-l leasetime] [-m metric] [-o option] [-r ipaddr]\n" " [-s ipaddr] [-t timeout] [-u userclass] [-F none|ptr|both]\n" " [-I clientID] \n"); @@ -665,7 +665,7 @@ main(int argc, char **argv) options->options |= DHCPCD_KEEPADDRESS; } - if (IN_LINKLOCAL(ntohl (options->request_address.s_addr))) { + if (IN_LINKLOCAL(ntohl(options->request_address.s_addr))) { logger(LOG_ERR, "you are not allowed to request a link local address"); goto abort; @@ -778,7 +778,6 @@ abort: close(pidfd); unlink(options->pidfile); } - free(options); #ifdef THERE_IS_NO_FORK