lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHSET] printk: implement printk_header() and merging printk
From
Date

On Wed, 2008-01-16 at 10:00 +0900, Tejun Heo wrote:
> And mprintk the following.
>
> code:
> DEFINE_MPRINTK(mp, 2 * 80);
>
> mprintk_set_header(&mp, KERN_INFO "ata%u.%2u: ", 1, 0);
> mprintk_push(&mp, "ATA %d", 7);
> mprintk_push(&mp, ", %u sectors\n", 1024);
> mprintk(&mp, "everything seems dandy\n");

I prefer Matthew Wilcox's stringbuf approach which does proper memory
management and isn't specific to printk:

http://www.ussg.iu.edu/hypermail/linux/kernel/0710.3/0517.html

--
Mathematics is the supreme nostalgia of our time.



\
 
 \ /
  Last update: 2008-01-18 19:45    [W:0.098 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site