Re: sysklogd 1.3-31


Martin Schulze (joey)
Sat, 21 Aug 1999 12:25:05 +0200


Florian La Roche wrote:
> I have several times submitted the klogd.c patch. With this patch, klofd can
> be used instead of dmesg to store the initial messages on bootup.
>
> Florian La Roche
>
> --- klogd.c
> +++ klogd.c 1999/01/28 09:53:59
> @@ -690,11 +690,11 @@
>
> if( *ptr == '\n' ) /* newline */
> {
> - *line++ = *ptr++; /* copy it in */
> + ptr++; /* copy it in */
> space -= 1;
> len -= 1;
>
> - *line = 0; /* force null terminator */
> + *line++ = 0; /* force null terminator */
> Syslog( LOG_INFO, line_buff );
> line = line_buff;
> space = sizeof(line_buff)-1;

Ich habe mir das Problem angesehen und die Sache leicht geaendert
geloest. Schreib mir bitte, ob's aus Deiner Sicht ok ist. Wenn
ich *line++ auf 0 setze, ist *line vorher undefiniert, soweit ich's
ueberblicke. Hier mein Patch.

Index: klogd.c
===================================================================
RCS file: /home/archive/debian/sysklogd/klogd.c,v
retrieving revision 1.16
diff -u -r1.16 klogd.c
--- klogd.c 1999/01/19 00:09:12 1.16
+++ klogd.c 1999/08/21 10:22:17
@@ -695,7 +695,7 @@
 
                if( *ptr == '\n' ) /* newline */
                {
- *line++ = *ptr++; /* copy it in */
+ ptr++; /* skip newline */
                   space -= 1;
                   len -= 1;
 

Gruesse,

        Joey

-- 
If you come from outside of Finland, you live in wrong country.
	-- motd of irc.funet.fi



This archive was generated by hypermail 2.0b3 on Sat Aug 21 1999 - 12:26:01 CEST