| Fix the outdated online usage string of ipmon(8). |
| Ported from IP Filter Rivoreo fork commit 4dcd677. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /usr/src/contrib/ipfilter/tools/ipmon.c freebsd-11.1/contrib/ipfilter/tools/ipmon.c |
| --- /usr/src/contrib/ipfilter/tools/ipmon.c 2017-07-21 07:42:32.000000000 +0800 |
| +++ freebsd-11.1/contrib/ipfilter/tools/ipmon.c 2020-01-26 00:05:42.884951000 +0800 |
| @@ -1479,8 +1479,11 @@ |
| static void usage(prog) |
| char *prog; |
| { |
| - fprintf(stderr, "%s: [-NFhstvxX] [-f <logfile>]\n", prog); |
| - exit(1); |
| + fprintf(stderr, "Usage: %s [-abDFhnpstvxX] [-B <output-binary-log-file>] [-C <config-file>]\n" |
| + " [-f <filter-input-file>] [-L <syslog-facility>] [-N <nat-input-file>]\n" |
| + " [-o <letters>] [-O <letters>] [-P <pid-file>] [-S <state-input-file>]\n" |
| + " [<output-log-file>]\n", prog); |
| + exit(-1); |
| } |
| |
| |
| @@ -1612,7 +1615,7 @@ |
| initconfig(&config); |
| |
| while ((c = getopt(argc, argv, |
| - "?abB:C:Df:FhL:nN:o:O:pP:sS:tvxX")) != -1) |
| + "abB:C:Df:FhL:nN:o:O:pP:sS:tvxX")) != -1) { |
| switch (c) |
| { |
| case 'a' : |
| @@ -1703,6 +1706,7 @@ |
| case '?' : |
| usage(argv[0]); |
| } |
| + } |
| |
| if (ipmonopts & IPMON_SYSLOG) |
| openlog(prog, LOG_NDELAY|LOG_PID, logfac); |