klogd: Add '-F' as alias for '-n', for compat with syslogd

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-12-01 21:17:02 +01:00
parent f6713bdb84
commit 163aa84cc4
2 changed files with 5 additions and 4 deletions

View File

@ -13,7 +13,7 @@
.Nd Kernel Log Daemon .Nd Kernel Log Daemon
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl 2ndnopsvx .Op Fl 2dFnopsvx
.Op Fl c Ar NUM .Op Fl c Ar NUM
.Op Fl f Ar FILE .Op Fl f Ar FILE
.Op Fl k Ar FILE .Op Fl k Ar FILE
@ -31,7 +31,7 @@ Enable debugging mode. This will generate potentially LOTS of output to
stderr. stderr.
.It Fl f Ar FILE .It Fl f Ar FILE
Log messages to the specified filename rather than to the syslog facility. Log messages to the specified filename rather than to the syslog facility.
.It Fl n .It Fl n | Fl F
Run in foreground, required when run from a modern init/supervisor. See Run in foreground, required when run from a modern init/supervisor. See
your system your system
.Xr init 1 .Xr init 1

View File

@ -606,7 +606,7 @@ int usage(int code)
" -d Enable debug mode\n" " -d Enable debug mode\n"
" -f FILE Log messages to FILE rather than the syslog facility\n" " -f FILE Log messages to FILE rather than the syslog facility\n"
" -k FILE Location of kernel symbols (System.map), default: auto\n" " -k FILE Location of kernel symbols (System.map), default: auto\n"
" -n Run in foreground, required when run from a modern init/supervisor\n" " -n | -F Run in foreground, required when run from a modern init/supervisor\n"
" -o Run once, read kernel log messages and syslog them, then exit\n" " -o Run once, read kernel log messages and syslog them, then exit\n"
" -p Paranoia mode, forces klogd to reload all kernel symbols on Ooops\n" " -p Paranoia mode, forces klogd to reload all kernel symbols on Ooops\n"
" -s Force use of system call interface to kernel message buffers\n" " -s Force use of system call interface to kernel message buffers\n"
@ -629,7 +629,7 @@ int main(int argc, char *argv[])
pid_t ppid = getpid(); pid_t ppid = getpid();
/* Parse the command-line. */ /* Parse the command-line. */
while ((ch = getopt(argc, argv, "c:df:k:nopsvx2?")) != EOF) { while ((ch = getopt(argc, argv, "c:dFf:k:nopsvx2?")) != EOF) {
switch (ch) { switch (ch) {
case '2': /* Print lines with symbols twice. */ case '2': /* Print lines with symbols twice. */
symbols_twice = 1; symbols_twice = 1;
@ -652,6 +652,7 @@ int main(int argc, char *argv[])
symfile = optarg; symfile = optarg;
break; break;
case 'F': /* compat with syslogd */
case 'n': /* don't fork */ case 'n': /* don't fork */
no_fork++; no_fork++;
break; break;