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

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Wed, 2012-05-09 at 19:24 +0200, Ingo Molnar wrote:
>
> > I don't think that's a significant limitation, because it's
> > fixed width anyway. So if this works then this would be a
> > pretty good and simple to use solution.
>
> Not quite following, there's nothing fixed width about
> bitmap_scnlistprintf() output.

There's a maximum field length possible, and we should/could use
that as padding.

Say for 8 bits, the worst-case is something like:

1-2,4-5,7-8

right? The max is roughly len*3/2.

I see a problem there: for something larger like 256 it would
lead to quite some padding ...

Well, we could just skip doing width for now - the ability to
easily print bitmaps is very valuable in itself.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-05-09 20:01    [W:0.083 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site