From 2ad19f2b437c4373c0bfd688dee9ef85fe0ea480 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Wed, 20 Jan 2010 20:38:42 +0100 Subject: [PATCH] Fix klogd fails on xen-kernel. --- config/rootfiles/core/35/filelists/files | 1 + lfs/sysklogd | 1 + ...ysklogd-1.4.1_xen_empty_buffer_check.patch | 30 +++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 src/patches/sysklogd-1.4.1_xen_empty_buffer_check.patch diff --git a/config/rootfiles/core/35/filelists/files b/config/rootfiles/core/35/filelists/files index c9d1fa6f92..f4df3034a6 100644 --- a/config/rootfiles/core/35/filelists/files +++ b/config/rootfiles/core/35/filelists/files @@ -14,3 +14,4 @@ lib/modules/2.6.27.42-ipfire-xen/kernel/net/ieee80211/ieee80211_crypt_wep.off srv/web/ipfire/cgi-bin/outgoingfw.cgi var/ipfire/outgoing/bin/outgoingfw.pl usr/bin/squidGuard +usr/sbin/klogd diff --git a/lfs/sysklogd b/lfs/sysklogd index 4c762839b6..9a4fda9daf 100644 --- a/lfs/sysklogd +++ b/lfs/sysklogd @@ -72,6 +72,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar jxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-fixes-1.patch cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)-8bit-1.patch + cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/$(THISAPP)_xen_empty_buffer_check.patch cd $(DIR_APP) && make $(MAKETUNING) cd $(DIR_APP) && make install touch /var/log/{dhcpcd.log,messages,ovpnserver.log} diff --git a/src/patches/sysklogd-1.4.1_xen_empty_buffer_check.patch b/src/patches/sysklogd-1.4.1_xen_empty_buffer_check.patch new file mode 100644 index 0000000000..3aece3abb4 --- /dev/null +++ b/src/patches/sysklogd-1.4.1_xen_empty_buffer_check.patch @@ -0,0 +1,30 @@ +diff -Naur sysklogd-1.4.1.org/klogd.c sysklogd-1.4.1/klogd.c +--- sysklogd-1.4.1.org/klogd.c 2001-03-11 20:40:10.000000000 +0100 ++++ sysklogd-1.4.1/klogd.c 2010-01-20 19:49:36.000000000 +0100 +@@ -1171,10 +1171,24 @@ + switch ( logsrc ) + { + case kernel: +- LogKernelLine(); ++ if (ksyslog(9, NULL, 0)>0) ++ { ++ LogKernelLine(); ++ } ++ else ++ { ++ usleep(100000); ++ } + break; + case proc: +- LogProcLine(); ++ if (ksyslog(9, NULL, 0)>0) ++ { ++ LogProcLine(); ++ } ++ else ++ { ++ usleep(100000); ++ } + break; + case none: + pause(); -- 2.39.2