diff options
author | Rainer Gerhards | 2015-03-05 16:54:34 +0100 |
---|---|---|
committer | Rainer Gerhards | 2015-03-05 16:54:34 +0100 |
commit | d4c814b18a489dc2aa41e768e6e3cad2f16a8af3 (patch) | |
tree | 8a7bd150b1b1b1f847cb8b13975dda81d1ac053d | |
parent | logger: messages are logged with kern.* priority by default (diff) | |
download | kernel-qcow2-util-linux-d4c814b18a489dc2aa41e768e6e3cad2f16a8af3.tar.gz kernel-qcow2-util-linux-d4c814b18a489dc2aa41e768e6e3cad2f16a8af3.tar.xz kernel-qcow2-util-linux-d4c814b18a489dc2aa41e768e6e3cad2f16a8af3.zip |
logger: fix -p kern.* priority is accepted regression
Pre 2.26, syslog(3) was used for local logging, and it did not
accept kern.* priorities. This is re-enabled by the patch.
-rw-r--r-- | misc-utils/logger.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/misc-utils/logger.c b/misc-utils/logger.c index 5ec722efe..06f0759b5 100644 --- a/misc-utils/logger.c +++ b/misc-utils/logger.c @@ -173,6 +173,8 @@ static int pencode(char *s) level = decode(s, prioritynames); if (level < 0) errx(EXIT_FAILURE, _("unknown priority name: %s"), s); + if(facility == LOG_KERN) + facility = LOG_USER; /* kern is forbidden */ return ((level & LOG_PRIMASK) | (facility & LOG_FACMASK)); } |