[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <64a000cc3b0fcd7c99b5cd41b0db7f1b5e9e6db7.camel@perches.com>
Date: Fri, 30 Aug 2019 14:53:25 -0700
From: Joe Perches <joe@...ches.com>
To: Rasmus Villemoes <linux@...musvillemoes.dk>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Uwe Kleine-König <uwe@...ine-koenig.org>,
Petr Mladek <pmladek@...e.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Juergen Gross <jgross@...e.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printf: add support for printing symbolic error codes
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?
Powered by blists - more mailing lists