lkml.org 
[lkml]   [2000]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subjectklogd -f logname "append to logname" patch
(For anyone else who shares the opinion that

klogd -f /var/log/kmsg -x

should append to its kmsg log file instead of overwriting it.)

-f insulates klogd messages from syslogd bugs (although you can't split
them up into multiple files the way that /etc/syslog.conf enables). You
can always solve any klogd-to-syslogd problem *after* you find out what
is otherwise wrong with your kernel (and lose the -f switch then if that's
what you prefer or require). But when you are debugging a kernel deadlock
with no oops, for example, and actually have local persistent storage
to write to, it helps if the next hard reset doesn't truncate the -f
pathname when klogd opens it.

--- klogd.c.orig Mon Sep 18 00:34:11 2000
+++ klogd.c Wed Nov 29 14:06:40 2000
@@ -1109,7 +1109,7 @@
{
if ( strcmp(output, "-") == 0 )
output_file = stdout;
- else if ( (output_file = fopen(output, "w")) == (FILE *) 0 )
+ else if ( (output_file = fopen(output, "a")) == (FILE *) 0 )
{
fprintf(stderr, "klogd: Cannot open output file " \
"%s - %s\n", output, strerror(errno));
Regards,

Clayton Weaver
<mailto:cgweav@eskimo.com>
(Seattle)

"Everybody's ignorant, just in different subjects." Will Rogers



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:52    [W:0.109 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site