Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-05 Thread Rasmus Villemoes
On 04/09/2019 18.28, Uwe Kleine-König wrote: > On 9/4/19 6:19 PM, Andy Shevchenko wrote: >> On Sat, Aug 31, 2019 at 12:48 AM Rasmus Villemoes >> wrote: >>> >> >>> +/* >>> + * Ensure these tables to not accidentally become gigantic if some >>> + * huge errno makes it in. On most architectures, the

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-04 Thread Uwe Kleine-König
On 9/4/19 6:19 PM, Andy Shevchenko wrote: > On Sat, Aug 31, 2019 at 12:48 AM 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

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-04 Thread Andy Shevchenko
On Sat, Aug 31, 2019 at 12:48 AM 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 E

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-04 Thread Uwe Kleine-König
On 9/4/19 11:13 AM, Rasmus Villemoes wrote: > On 02/09/2019 17.29, Uwe Kleine-König wrote: >> Acked-by: Uwe Kleine-König > > Thanks. The buildbot apparently tried to compile the errcode.h header by > itself and complained that NULL was not defined, so I'll respin to make > it happy, and add a not

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-04 Thread Rasmus Villemoes
On 02/09/2019 17.29, Uwe Kleine-König wrote: > Hello Rasmus, > > On 8/30/19 11:46 PM, 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 anot

Re: [PATCH] printf: add support for printing symbolic error codes

2019-09-02 Thread Uwe Kleine-König
Hello Rasmus, On 8/30/19 11:46 PM, 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 E

RE: [PATCH] printf: add support for printing symbolic error codes

2019-09-02 Thread David Laight
From: Rasmus Villemoes > Sent: 30 August 2019 23:51 ... > > But why not just extend check_pointer_msg? > > Partly because that would rely on all %p actually eventually > passing ptr through to that (notably plain %p does not), partly because > the way check_pointer_msg works means that it has to r

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-31 Thread kbuild test robot
Hi Rasmus, Thank you for the patch! Yet something to improve: [auto build test ERROR on linus/master] [cannot apply to v5.3-rc6 next-20190830] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Ras

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Rasmus Villemoes
On 31/08/2019 00.21, Joe Perches wrote: > 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, >

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Joe Perches
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,

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Rasmus Villemoes
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 kobjec

Re: [PATCH] printf: add support for printing symbolic error codes

2019-08-30 Thread Joe Perches
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 ER