login
Header Space

 
 

Re: [RFC] New kernel-message logging API

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Vegard Nossum <vegard.nossum@...>
Cc: LKML <linux-kernel@...>, Joe Perches <joe@...>, Rob Landley <rob@...>, Dick Streefland <dick.streefland@...>
Date: Monday, September 24, 2007 - 5:22 am

Hi Vegard,

On Sat, 2007-09-22 at 21:27 +0200, Vegard Nossum wrote:

Good luck :-)

[snip]


Together with the idea of not allowing multiple lines in the kprint_xxx
functions, that would go with our approach having message numbers to
identify a message. Multiple lines are combined explicitly to one
message. I think it is a good idea to be able to identify, which lines
of a message belong together.

[snip]


[snip]


Would be nice to have some code here. How do you want to implement that?
You have to allocate / preallocate memory for the argv array. Something
like:

kprint_err(const char* fmt, ...)
{
	va_list   ap;
	struct kprint_message *msg;

	msg = &message_arry[current];
	
	va_start(ap, fmt);
	msg->argv = kmalloc(sizeof(long) * argc, GFP_KERNEL);
	...
	for (i = 0; i < argc, i++) {
		msg->argv[i] = va_arg(ap, long);
	}

If you do it like that, you can't support "%s", since then you would
store only the pointer and not the whole string. I think, that we can't
live without %s.

Michael

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC] New kernel-message logging API, Vegard Nossum, (Sat Sep 22, 3:27 pm)
Re: [RFC] New kernel-message logging API, Jesse Barnes, (Mon Sep 24, 2:26 pm)
Re: [RFC] New kernel-message logging API, Michael Holzheu, (Mon Sep 24, 5:22 am)
Re: [RFC] New kernel-message logging API, Joe Perches, (Mon Sep 24, 11:19 am)
Re: [RFC] New kernel-message logging API, Michael Holzheu, (Tue Sep 25, 4:57 am)
Re: [RFC] New kernel-message logging API, Rob Landley, (Mon Sep 24, 7:51 pm)
Re: [RFC] New kernel-message logging API, Joe Perches, (Mon Sep 24, 8:10 pm)
Re: [RFC] New kernel-message logging API, Rob Landley, (Mon Sep 24, 9:46 pm)
Re: [RFC] New kernel-message logging API, Vegard Nossum, (Mon Sep 24, 12:43 pm)
Re: [RFC] New kernel-message logging API, Joe Perches, (Mon Sep 24, 1:00 pm)
Re: [RFC] New kernel-message logging API, Vegard Nossum, (Mon Sep 24, 4:37 pm)
Re: [RFC] New kernel-message logging API, Rob Landley, (Mon Sep 24, 9:18 pm)
Re: [RFC] New kernel-message logging API, Rob Landley, (Sun Sep 23, 4:05 pm)
Re: [RFC] New kernel-message logging API, Miguel Ojeda, (Sat Sep 22, 9:05 pm)
Re: [RFC] New kernel-message logging API, Vegard Nossum, (Tue Sep 25, 1:27 am)
Re: [RFC] New kernel-message logging API, Miguel Ojeda, (Tue Sep 25, 1:24 pm)
Re: [RFC] New kernel-message logging API, Joe Perches, (Sat Sep 22, 8:13 pm)
Re: [RFC] New kernel-message logging API, Vegard Nossum, (Sun Sep 23, 4:39 am)
Re: [RFC] New kernel-message logging API, Joe Perches, (Sun Sep 23, 3:25 pm)
Re: [RFC] New kernel-message logging API, Jan Engelhardt, (Sun Sep 23, 4:45 am)
Re: [RFC] New kernel-message logging API, Joe Perches, (Sun Sep 23, 3:23 pm)
Re: [RFC] New kernel-message logging API, Vegard Nossum, (Sun Sep 23, 5:20 am)
Re: [RFC] New kernel-message logging API, Jan Engelhardt, (Sun Sep 23, 5:38 am)
Re: [RFC] New kernel-message logging API, Kyle Moffett, (Sat Sep 22, 8:40 pm)
Re: [RFC] New kernel-message logging API, Joe Perches, (Sat Sep 22, 8:47 pm)
Re: [RFC] New kernel-message logging API, Kyle Moffett, (Sat Sep 22, 11:43 pm)
speck-geostationary