summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-05-02 10:57:40 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-05-02 10:57:40 +0200
commit9e88340fe9b873929e7545d547616db24ca338e6 (patch)
tree5b8c9bfa2028c89b6d27c34acf5c069bee935406 /plugins
parent2dae354a0bcb85ac2dab28ef8ad8f8caded2556f (diff)
downloadrsyslog-9e88340fe9b873929e7545d547616db24ca338e6.tar.gz
rsyslog-9e88340fe9b873929e7545d547616db24ca338e6.tar.xz
rsyslog-9e88340fe9b873929e7545d547616db24ca338e6.zip
restored debug output
Diffstat (limited to 'plugins')
-rw-r--r--plugins/imklog/ksym.c32
-rw-r--r--plugins/imklog/ksym_mod.c2
2 files changed, 17 insertions, 17 deletions
diff --git a/plugins/imklog/ksym.c b/plugins/imklog/ksym.c
index f02589ce..f636a7bb 100644
--- a/plugins/imklog/ksym.c
+++ b/plugins/imklog/ksym.c
@@ -190,13 +190,13 @@ extern int InitKsyms(char *mapfile)
} else {
if ( (mapfile = FindSymbolFile()) == NULL ) {
imklogLogIntMsg(LOG_WARNING, "Cannot find map file.");
- ////dbgprintf("Cannot find map file.\n");
+ dbgprintf("Cannot find map file.\n");
return(0);
}
if ( (sym_file = fopen(mapfile, "r")) == NULL ) {
imklogLogIntMsg(LOG_WARNING, "Cannot open map file.");
- //dbgprintf("Cannot open map file.\n");
+ dbgprintf("Cannot open map file.\n");
return(0);
}
}
@@ -216,7 +216,7 @@ extern int InitKsyms(char *mapfile)
return(0);
}
if(dbgPrintSymbols)
- //dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
+ dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
if ( AddSymbol(address, sym) == 0 ) {
imklogLogIntMsg(LOG_ERR, "Error adding symbol - %s.", sym);
@@ -303,11 +303,11 @@ static char *FindSymbolFile(void)
return(0);
}
- //dbgprintf("Searching for symbol map.\n");
+ dbgprintf("Searching for symbol map.\n");
for(mf = system_maps; *mf != NULL && file == NULL; ++mf) {
snprintf(mysymfile, sizeof(mysymfile), "%s-%s", *mf, utsname.release);
- //dbgprintf("Trying %s.\n", mysymfile);
+ dbgprintf("Trying %s.\n", mysymfile);
if((sym_file = fopen(mysymfile, "r")) != NULL) {
if(CheckMapVersion(mysymfile) == 1)
file = mysymfile;
@@ -315,7 +315,7 @@ static char *FindSymbolFile(void)
}
if(sym_file == NULL || file == NULL) {
sprintf (mysymfile, "%s", *mf);
- //dbgprintf("Trying %s.\n", mysymfile);
+ dbgprintf("Trying %s.\n", mysymfile);
if((sym_file = fopen(mysymfile, "r")) != NULL ) {
if (CheckMapVersion(mysymfile) == 1)
file = mysymfile;
@@ -325,7 +325,7 @@ static char *FindSymbolFile(void)
}
/* At this stage of the game we are at the end of the symbol tables. */
- //dbgprintf("End of search list encountered.\n");
+ dbgprintf("End of search list encountered.\n");
ENDfunc
return(file);
}
@@ -396,8 +396,8 @@ static int CheckVersion(char *version)
patch = vnum & 0x000000FF;
minor = (vnum >> 8) & 0x000000FF;
major = (vnum >> 16) & 0x000000FF;
- //dbgprintf("Version string = %s, Major = %d, Minor = %d, Patch = %d.\n", version +
- // strlen(prefix), major, minor, patch);
+ dbgprintf("Version string = %s, Major = %d, Minor = %d, Patch = %d.\n", version +
+ strlen(prefix), major, minor, patch);
sprintf(vstring, "%d.%d.%d", major, minor, patch);
/* We should now have the version string in the vstring variable in
@@ -410,7 +410,7 @@ static int CheckVersion(char *version)
imklogLogIntMsg(LOG_ERR, "Cannot get kernel version information.");
return(0);
}
- //dbgprintf("Comparing kernel %s with symbol table %s.\n", utsname.release, vstring);
+ dbgprintf("Comparing kernel %s with symbol table %s.\n", utsname.release, vstring);
if ( sscanf (utsname.release, "%d.%d.%d", &major, &minor, &patch) < 3 ) {
imklogLogIntMsg(LOG_ERR, "Kernel send bogus release string `%s'.", utsname.release);
@@ -477,7 +477,7 @@ static int CheckMapVersion(char *fname)
return(0);
}
if(dbgPrintSymbols)
- //dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
+ dbgprintf("Address: %lx, Type: %c, Symbol: %s\n", address, type, sym);
version = CheckVersion(sym);
}
fclose(sym_file);
@@ -487,10 +487,10 @@ static int CheckMapVersion(char *fname)
imklogLogIntMsg(LOG_ERR, "Symbol table has incorrect version number.\n");
break;
case 0:
- //dbgprintf("No version information found.\n");
+ dbgprintf("No version information found.\n");
break;
case 1:
- //dbgprintf("Found table with matching version number.\n");
+ dbgprintf("Found table with matching version number.\n");
break;
}
@@ -790,8 +790,8 @@ extern char *ExpandKadds(char *line, char *el)
strcat(elp, symbol);
elp += strlen(symbol);
- //dbgprintf("Symbol: %s = %lx = %s, %x/%d\n", sl+1, value,
- // (sym.size==0) ? symbol+1 : symbol, sym.offset, sym.size);
+ dbgprintf("Symbol: %s = %lx = %s, %x/%d\n", sl+1, value,
+ (sym.size==0) ? symbol+1 : symbol, sym.offset, sym.size);
value = 2;
if ( sym.size != 0 ) {
@@ -807,7 +807,7 @@ extern char *ExpandKadds(char *line, char *el)
}
while ( kp != NULL);
- //dbgprintf("Expanded line: %s\n", el);
+ dbgprintf("Expanded line: %s\n", el);
return(el);
}
diff --git a/plugins/imklog/ksym_mod.c b/plugins/imklog/ksym_mod.c
index dae0e13d..6e48e89e 100644
--- a/plugins/imklog/ksym_mod.c
+++ b/plugins/imklog/ksym_mod.c
@@ -166,7 +166,7 @@ extern int InitMsyms(void)
return(0);
}
- //dbgprintf("Loading kernel module symbols - Source: %s\n", KSYMS);
+ dbgprintf("Loading kernel module symbols - Source: %s\n", KSYMS);
while ( fgets(buf, sizeof(buf), ksyms) != NULL ) {
if (num_syms > 0 && index(buf, '[') == NULL)