20ad5f583e
- Add patch shut-up-rpmlint-on-var-log-journal.patch to avoid rpmlink warning - Add upstream patches 0001-bus-proxyd-fix-incorrect-comparison.patch 0002-shell-completion-prevent-mangling-unit-names.patch 0003-Always-check-asprintf-return-code.patch 0004-bash-completion-use-list-unit-files-to-get-all-units.patch 0005-core-only-set-the-kernel-s-timezone-when-the-RTC-run.patch 0006-parse_boolean-require-exact-matches.patch 0007-drop_duplicates-copy-full-BindMount-struct.patch 0008-shell-completion-prevent-mangling-unit-names-bash.patch 0009-journald-always-add-syslog-facility-for-messages-com.patch - Add patch shut-up-rpmlint-on-var-log-journal.patch to avoid rpmlink warning - Add upstream patches 0001-bus-proxyd-fix-incorrect-comparison.patch 0002-shell-completion-prevent-mangling-unit-names.patch 0003-Always-check-asprintf-return-code.patch 0004-bash-completion-use-list-unit-files-to-get-all-units.patch 0005-core-only-set-the-kernel-s-timezone-when-the-RTC-run.patch 0006-parse_boolean-require-exact-matches.patch 0007-drop_duplicates-copy-full-BindMount-struct.patch 0008-shell-completion-prevent-mangling-unit-names-bash.patch 0009-journald-always-add-syslog-facility-for-messages-com.patch OBS-URL: https://build.opensuse.org/request/show/242699 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=196
41 lines
1.7 KiB
Diff
41 lines
1.7 KiB
Diff
From 36dd072cdf03dcac0fcd2d6b42f261444dc7ac88 Mon Sep 17 00:00:00 2001
|
|
From: Michal Sekletar <msekleta@redhat.com>
|
|
Date: Fri, 25 Jul 2014 14:38:22 +0200
|
|
Subject: [PATCH] journald: always add syslog facility for messages coming
|
|
from kmsg
|
|
|
|
Set SYSLOG_FACILITY field for kernel log messages too. Setting only
|
|
SYSLOG_IDENTIFIER="kernel" is not sufficient and tools reading journal
|
|
maybe confused by missing SYSLOG_FACILITY field for kernel log messages.
|
|
---
|
|
src/journal/journald-kmsg.c | 6 +++---
|
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git src/journal/journald-kmsg.c src/journal/journald-kmsg.c
|
|
index 12992e7..bb62a76 100644
|
|
--- src/journal/journald-kmsg.c
|
|
+++ src/journal/journald-kmsg.c
|
|
@@ -274,6 +274,9 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
|
|
if (asprintf(&syslog_priority, "PRIORITY=%i", priority & LOG_PRIMASK) >= 0)
|
|
IOVEC_SET_STRING(iovec[n++], syslog_priority);
|
|
|
|
+ if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
|
|
+ IOVEC_SET_STRING(iovec[n++], syslog_facility);
|
|
+
|
|
if ((priority & LOG_FACMASK) == LOG_KERN)
|
|
IOVEC_SET_STRING(iovec[n++], "SYSLOG_IDENTIFIER=kernel");
|
|
else {
|
|
@@ -295,9 +298,6 @@ static void dev_kmsg_record(Server *s, char *p, size_t l) {
|
|
if (syslog_pid)
|
|
IOVEC_SET_STRING(iovec[n++], syslog_pid);
|
|
}
|
|
-
|
|
- if (asprintf(&syslog_facility, "SYSLOG_FACILITY=%i", LOG_FAC(priority)) >= 0)
|
|
- IOVEC_SET_STRING(iovec[n++], syslog_facility);
|
|
}
|
|
|
|
message = cunescape_length_with_prefix(p, pl, "MESSAGE=");
|
|
--
|
|
1.7.9.2
|
|
|