[lkml]   [2012]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] printk: Add %pb to print bitmaps
    On Wed, 09 May 2012 15:27:23 +0200
    Peter Zijlstra <> wrote:

    > + * - 'b' For a bitmap, consumes 2 args, second is int

    There's a pretty widespread convention that %b is used to print in
    binary: printf("%b", 10) -> 1010. Regrettably it isn't part of
    standard C, but it's often supported anyway. Perl's printf does this
    as well. Perl uses %B also.

    If we later want to add binary printing to kernel print(), we'd presumably
    use %pb, to match this precedent.

    So perhaps it would be better to avoid consuming `b' for bitmaps?

     \ /
      Last update: 2012-05-09 21:41    [W:0.617 / U:7.852 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site