--- tftpd/src/tftpd.c 2014/02/21 09:09:15 1.2 +++ tftpd/src/tftpd.c 2014/02/21 15:49:51 1.2.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: tftpd.c,v 1.2 2014/02/21 09:09:15 misho Exp $ +* $Id: tftpd.c,v 1.2.2.1 2014/02/21 15:49:51 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -76,6 +76,7 @@ Usage() "\t-c \tConfig file [default=/etc/tftpd.conf]\n" "\t-w\t\tSwitch to read-write mode [default=read-only]\n" "\t-b\t\tRun into batch mode (default is daemon mode)\n" + "\t-d\t\tDebug program\n" "\t-v\t\tVerbose (more -v, more verbosity ...)\n" "\t-h\t\tThis help screen!\n" "\n", compiled, compiledby, compilehost); @@ -128,7 +129,7 @@ main(int argc, char **argv) sockaddr_t sa; rpack_t *pkt = NULL; - while ((ch = getopt(argc, argv, "hvbwc:")) != -1) + while ((ch = getopt(argc, argv, "hvdbwc:")) != -1) switch (ch) { case 'c': strlcpy(szCfgName, optarg, sizeof szCfgName); @@ -138,6 +139,9 @@ main(int argc, char **argv) break; case 'v': e_incVerbose; + break; + case 'd': + elwix_Debug |= ELWIX_DEBUG_TRACE; break; case 'b': b = 42;