Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Package not found: openSUSE:Slowroll:Build:2/python-azure-cognitiveservices-search-entitysearch
openSUSE:Factory:Rings:1-MinimalX
syslogd
sysklogd-1.4.1-sysmap-prior-to-2.5.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File sysklogd-1.4.1-sysmap-prior-to-2.5.patch of Package syslogd
From: Jeff Mahoney <jeffm@suse.com> Subject: klogd: Silence System.map and symbol lookup warnings with modern kernels References: bnc#505421 klogd complains about not being able to parse the version of System.map and about not being able to load the kernel module symbol table. Since kernels starting with 2.5 accurately report their own symbol table in Oopses, this is no longer necessary. The warnings are a harmless annoyance, but an annoyance nonetheless. This patch detects if the running kernel is newer newer than 2.5.0 and disables the symbol lookup on startup, thus avoiding the warnings. Signed-off-by: Jeff Mahoney <jeffm@suse.com> --- klogd.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) --- klogd.c +++ klogd.c 2009-08-12 12:19:17.333901686 +0000 @@ -285,6 +285,8 @@ _syscall3(int,ksyslog,int, type, char *, #define ksyslog klogctl #endif +#include <sys/utsname.h> + #define LOG_BUFFER_SIZE 4096 #define LOG_LINE_LENGTH 1000 @@ -1014,6 +1016,23 @@ static void SetBufSize(void) } } +#ifndef KERNEL_VERSION +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +#endif + +static int +need_lookup(void) +{ + struct utsname utsname; + int major, minor, patch; + if (uname(&utsname) < 0) { + Syslog(LOG_ERR, "Cannot get kernel version information."); + return 0; + } + sscanf(utsname.release, "%d.%d.%d", &major, &minor, &patch); + + return (KERNEL_VERSION(major, minor, patch) < KERNEL_VERSION(2,5,0)); +} int main(argc, argv) @@ -1199,6 +1218,9 @@ int main(argc, argv) else openlog("kernel", 0, LOG_KERN); + /* We don't need lookups on kernels > 2.4 */ + if (symbol_lookup) + symbol_lookup = need_lookup(); /* Handle one-shot logging. */ if ( one_shot )
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor