summaryrefslogtreecommitdiffstats
path: root/plugins/imklog/ksym_mod.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-12-17 13:08:34 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-12-17 13:08:34 +0000
commitf81d1bb377339d5452f0368ab67158f0ae5da918 (patch)
tree3439f5f4f75904b1bee0ade0bf4aac8451f65897 /plugins/imklog/ksym_mod.c
parent226a18087087e625f213afdd74d872565f9897cd (diff)
downloadrsyslog-f81d1bb377339d5452f0368ab67158f0ae5da918.tar.gz
rsyslog-f81d1bb377339d5452f0368ab67158f0ae5da918.tar.xz
rsyslog-f81d1bb377339d5452f0368ab67158f0ae5da918.zip
fixed compile problem (error during previous cvs commit)
Diffstat (limited to 'plugins/imklog/ksym_mod.c')
-rw-r--r--plugins/imklog/ksym_mod.c82
1 files changed, 1 insertions, 81 deletions
diff --git a/plugins/imklog/ksym_mod.c b/plugins/imklog/ksym_mod.c
index 51ca2fb8..c7869720 100644
--- a/plugins/imklog/ksym_mod.c
+++ b/plugins/imklog/ksym_mod.c
@@ -1,6 +1,5 @@
+#if 0
#include "config.h"
-
-#ifdef FEATURE_KLOGD
/*
ksym_mod.c - functions for building symbol lookup tables for klogd
Copyright (c) 1995, 1996 Dr. G.W. Wettstein <greg@wind.rmcc.com>
@@ -469,17 +468,12 @@ static int AddModule(address, symbol)
**************************************************************************/
static int AddSymbol(mp, address, symbol)
-
struct Module *mp;
-
unsigned long address;
-
char *symbol;
-
{
auto int tmp;
-
/* Allocate space for the symbol table entry. */
mp->sym_array = (struct sym_table *) realloc(mp->sym_array, \
(mp->num_syms+1) * sizeof(struct sym_table));
@@ -526,17 +520,12 @@ static int AddSymbol(mp, address, symbol)
**************************************************************************/
extern char * LookupModuleSymbol(value, sym)
-
unsigned long value;
-
struct symbol *sym;
-
{
auto int nmod,
nsym;
-
auto struct sym_table *last;
-
auto struct Module *mp;
@@ -567,7 +556,6 @@ extern char * LookupModuleSymbol(value, sym)
last = &mp->sym_array[nsym];
}
-
/*
* At this stage of the game we still cannot give up the
* ghost. There is the possibility that the address is
@@ -633,72 +621,4 @@ extern char * LookupModuleSymbol(value, sym)
/* It has been a hopeless exercise. */
return((char *) 0);
}
-
-
-/*
- * Setting the -DTEST define enables the following code fragment to
- * be compiled. This produces a small standalone program which will
- * dump the current kernel symbol table.
- */
-#if defined(TEST)
-
-#include <stdarg.h>
-
-
-extern int main(int, char **);
-
-
-int main(argc, argv)
-
- int argc;
-
- char *argv[];
-
-{
- auto int lp, syms;
-
-
- if ( !InitMsyms() )
- {
- fprintf(stderr, "Cannot load module symbols.\n");
- return(1);
- }
-
- printf("Number of modules: %d\n\n", num_modules);
-
- for(lp= 0; lp < num_modules; ++lp)
- {
- printf("Module #%d = %s, Number of symbols = %d\n", lp + 1, \
- sym_array_modules[lp].name, \
- sym_array_modules[lp].num_syms);
-
- for (syms= 0; syms < sym_array_modules[lp].num_syms; ++syms)
- {
- printf("\tSymbol #%d\n", syms + 1);
- printf("\tName: %s\n", \
- sym_array_modules[lp].sym_array[syms].name);
- printf("\tAddress: %lx\n\n", \
- sym_array_modules[lp].sym_array[syms].value);
- }
- }
-
- FreeModules();
- return(0);
-}
-
-extern void Syslog(int priority, char *fmt, ...)
-
-{
- va_list ap;
-
- va_start(ap, fmt);
- fprintf(stdout, "Pr: %d, ", priority);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- fputc('\n', stdout);
-
- return;
-}
-
#endif
-#endif /* #ifdef FEATURE_KLOGD */