lkml.org 
[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH] printk: Add %pb to print bitmaps

* Joe Perches <joe@perches.com> wrote:

> On Wed, 2012-05-09 at 15:59 +0200, Peter Zijlstra wrote:
> > The current implementation limits both (field_width and precision) to
> > s16, which will limit us to printing 32Kb bitmaps. If need arises we
> > could increase printf_spec size I guess.
>
> Not sure that's a problem really.
> A single printk is limited to 1024 bytes.
>
> > diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> []
> > @@ -941,6 +947,26 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> > return netdev_feature_string(buf, end, ptr, spec);
> > }
> > break;
> > + case 'b':
> > + {
> > + int bits, len;
>
> trivia: a tab indent could be avoided by using
> case b: {

Nit: 'b'.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-05-09 18:01    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site