tftpd: Make the -d option behave as documented.
Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D38965
This commit is contained in:
parent
92570f67c7
commit
9f6f64941c
@ -140,7 +140,7 @@ main(int argc, char *argv[])
|
|||||||
acting_as_client = 0;
|
acting_as_client = 0;
|
||||||
|
|
||||||
tftp_openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
|
tftp_openlog("tftpd", LOG_PID | LOG_NDELAY, LOG_FTP);
|
||||||
while ((ch = getopt(argc, argv, "cCd:F:lnoOp:s:u:U:wW")) != -1) {
|
while ((ch = getopt(argc, argv, "cCd::F:lnoOp:s:u:U:wW")) != -1) {
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'c':
|
case 'c':
|
||||||
ipchroot = 1;
|
ipchroot = 1;
|
||||||
@ -149,7 +149,9 @@ main(int argc, char *argv[])
|
|||||||
ipchroot = 2;
|
ipchroot = 2;
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
if (atoi(optarg) != 0)
|
if (optarg == NULL)
|
||||||
|
debug++;
|
||||||
|
else if (atoi(optarg) != 0)
|
||||||
debug += atoi(optarg);
|
debug += atoi(optarg);
|
||||||
else
|
else
|
||||||
debug |= debug_finds(optarg);
|
debug |= debug_finds(optarg);
|
||||||
|
Loading…
Reference in New Issue
Block a user