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 Fri, 2019-08-30 at 23:46 +0200, Rasmus Villemoes wrote:
> It has been suggested several times to extend vsnprintf() to be able
> to convert the numeric value of ENOSPC to print "ENOSPC". This is yet
> another attempt. Rather than adding another %p extension, simply teach
> plain %p to convert ERR_PTRs. While the primary use case is

Thanks, this all this seems reasonable except for

> 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?

\
 
 \ /
  Last update: 2019-08-30 23:54    [W:0.258 / U:2.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site