lkml.org 
[lkml]   [2019]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] printf: add support for printing symbolic error codes
From
Date
On Sat, 2019-08-31 at 00:03 +0200, Rasmus Villemoes wrote:
> On 30/08/2019 23.53, Joe Perches wrote:
> > > diff --git a/lib/vsprintf.c b/lib/vsprintf.c
> > []
> > > @@ -2178,8 +2204,6 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> > > return flags_string(buf, end, ptr, spec, fmt);
> > > case 'O':
> > > return kobject_string(buf, end, ptr, spec, fmt);
> > > - case 'x':
> > > - return pointer_string(buf, end, ptr, spec);
> > > }
> > >
> > > /* default is to _not_ leak addresses, hash before printing */
> >
> > why remove this?
> >
>
> The handling of %px is moved above the test for ptr being an ERR_PTR, so
> that %px, ptr continues to be (roughly) equivalent to %08lx, (long)ptr.

Ah.
Pity the flow of the switch/case is disrupted.
That now deserves a separate comment.

But why not just extend check_pointer_msg?


\
 
 \ /
  Last update: 2019-08-31 00:21    [W:0.067 / U:4.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site