Messages in this thread | | | Date | Wed, 9 May 2012 19:31:13 +0200 | From | Ingo Molnar <> | Subject | Re: [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
| |