From: Andries Brouwer <Andries.Brouwer@cwi.nl>
To: Roman Zippel <zippel@linux-m68k.org>
Cc: Andries.Brouwer@cwi.nl, akpm@osdl.org, torvalds@osdl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] report size of printk buffer
Date: Thu, 6 May 2004 15:36:39 +0200 [thread overview]
Message-ID: <20040506133639.GB14714@apps.cwi.nl> (raw)
In-Reply-To: <Pine.LNX.4.44.0405052236110.766-100000@serv.local>
On Wed, May 05, 2004 at 10:42:10PM +0200, Roman Zippel wrote:
> On Tue, 4 May 2004 Andries.Brouwer@cwi.nl wrote:
>
> > In the old days the printk log buffer had a constant size,
> > and dmesg asked for the 4096, later 8192, later 16384 bytes in there.
> > These days the printk log buffer has variable size, and it is not
> > easy for dmesg to do the right thing, especially when doing a
> > "read and clear".
>
> Why don't you simply change it into "read and clear read data"?
> E.g. something like below.
>
> bye, Roman
>
> Index: kernel/printk.c
> ===================================================================
> RCS file: /usr/src/cvsroot/linux-2.6/kernel/printk.c,v
> retrieving revision 1.1.1.6
> diff -u -p -r1.1.1.6 printk.c
> --- a/kernel/printk.c 11 Mar 2004 18:34:55 -0000 1.1.1.6
> +++ b/kernel/printk.c 5 May 2004 20:39:05 -0000
> @@ -305,7 +305,7 @@ int do_syslog(int type, char __user * bu
> if (count > logged_chars)
> count = logged_chars;
> if (do_clear)
> - logged_chars = 0;
> + logged_chars -= count;
> limit = log_end;
> /*
No, that is buggy.
If one asks for count bytes, one gets the last count bytes of output,
not the first.
Andries
next prev parent reply other threads:[~2004-05-06 13:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-04 16:09 Andries.Brouwer
2004-05-05 13:12 ` Olaf Dabrunz
2004-05-05 20:42 ` Roman Zippel
2004-05-06 13:36 ` Andries Brouwer [this message]
2004-05-06 15:11 ` Roman Zippel
2004-05-06 15:23 ` Andries Brouwer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040506133639.GB14714@apps.cwi.nl \
--to=andries.brouwer@cwi.nl \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
--cc=zippel@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®