Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-27 Thread Bernd Petrovitsch
Hi all! On Sun, 2017-06-25 at 15:47 -0700, Randy Dunlap wrote: > On 06/25/2017 02:18 PM, Enrico Weigelt, metux IT consult wrote: > > On 25.06.2017 22:10, Joe Perches wrote: > > > > > > Yeah, that's still an open problem. Actually, I still haven't found out, > > > > how it's done w/ all the other

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-27 Thread Bernd Petrovitsch
Hi all! On Sun, 2017-06-25 at 15:47 -0700, Randy Dunlap wrote: > On 06/25/2017 02:18 PM, Enrico Weigelt, metux IT consult wrote: > > On 25.06.2017 22:10, Joe Perches wrote: > > > > > > Yeah, that's still an open problem. Actually, I still haven't found out, > > > > how it's done w/ all the other

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 26.06.2017 00:47, Randy Dunlap wrote: > but why not just do that in userspace. Patch up syslogd (which one, actually?) to decode all the dozens of different cases that print out errno values ? Applying your argument more consequently - why do we have human-readable messages at all, instead

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 26.06.2017 00:47, Randy Dunlap wrote: > but why not just do that in userspace. Patch up syslogd (which one, actually?) to decode all the dozens of different cases that print out errno values ? Applying your argument more consequently - why do we have human-readable messages at all, instead

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Randy Dunlap
On 06/25/2017 02:18 PM, Enrico Weigelt, metux IT consult wrote: > On 25.06.2017 22:10, Joe Perches wrote: > >>> Yeah, that's still an open problem. Actually, I still haven't found out, >>> how it's done w/ all the other kernel-internal conversions. >> >> Everything else uses "%p", > > hmm, but

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Randy Dunlap
On 06/25/2017 02:18 PM, Enrico Weigelt, metux IT consult wrote: > On 25.06.2017 22:10, Joe Perches wrote: > >>> Yeah, that's still an open problem. Actually, I still haven't found out, >>> how it's done w/ all the other kernel-internal conversions. >> >> Everything else uses "%p", > > hmm, but

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 25.06.2017 22:10, Joe Perches wrote: >> Yeah, that's still an open problem. Actually, I still haven't found out, >> how it's done w/ all the other kernel-internal conversions. > > Everything else uses "%p", hmm, but errno's aren't pointers. Isn't %p checked for pointer values ? >> Already

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 25.06.2017 22:10, Joe Perches wrote: >> Yeah, that's still an open problem. Actually, I still haven't found out, >> how it's done w/ all the other kernel-internal conversions. > > Everything else uses "%p", hmm, but errno's aren't pointers. Isn't %p checked for pointer values ? >> Already

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Joe Perches
On Sun, 2017-06-25 at 21:53 +0200, Enrico Weigelt, metux IT consult wrote: > On 25.06.2017 19:27, Joe Perches wrote: > > > Every use of %M is going to cause gcc when using __printf to emit > > a warning like: > > > > unknown conversion type character ‘M’ in format [-Wformat=] > > Yeah, that's

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Joe Perches
On Sun, 2017-06-25 at 21:53 +0200, Enrico Weigelt, metux IT consult wrote: > On 25.06.2017 19:27, Joe Perches wrote: > > > Every use of %M is going to cause gcc when using __printf to emit > > a warning like: > > > > unknown conversion type character ‘M’ in format [-Wformat=] > > Yeah, that's

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 25.06.2017 19:27, Joe Perches wrote: > Every use of %M is going to cause gcc when using __printf to emit > a warning like: > > unknown conversion type character ‘M’ in format [-Wformat=] Yeah, that's still an open problem. Actually, I still haven't found out, how it's done w/ all the other

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
On 25.06.2017 19:27, Joe Perches wrote: > Every use of %M is going to cause gcc when using __printf to emit > a warning like: > > unknown conversion type character ‘M’ in format [-Wformat=] Yeah, that's still an open problem. Actually, I still haven't found out, how it's done w/ all the other

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Joe Perches
On Sun, 2017-06-25 at 19:12 +0200, Enrico Weigelt, metux IT consult wrote: > Adding a new format conversion for *printf() and friends. Every use of %M is going to cause gcc when using __printf to emit a warning like: unknown conversion type character ‘M’ in format [-Wformat=] Beyond that, why

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Joe Perches
On Sun, 2017-06-25 at 19:12 +0200, Enrico Weigelt, metux IT consult wrote: > Adding a new format conversion for *printf() and friends. Every use of %M is going to cause gcc when using __printf to emit a warning like: unknown conversion type character ‘M’ in format [-Wformat=] Beyond that, why

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Randy Dunlap
On 06/25/2017 10:12 AM, Enrico Weigelt, metux IT consult wrote: > Adding a new format conversion for *printf() and friends. > > If CONFIG_ERRNO_PRINTF_VERBOSE is enabled, prints human-readable > strerror()-like texts, otherwise just the number. > --- > lib/Kconfig| 19 +++ >

Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Randy Dunlap
On 06/25/2017 10:12 AM, Enrico Weigelt, metux IT consult wrote: > Adding a new format conversion for *printf() and friends. > > If CONFIG_ERRNO_PRINTF_VERBOSE is enabled, prints human-readable > strerror()-like texts, otherwise just the number. > --- > lib/Kconfig| 19 +++ >

[PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
Adding a new format conversion for *printf() and friends. If CONFIG_ERRNO_PRINTF_VERBOSE is enabled, prints human-readable strerror()-like texts, otherwise just the number. --- lib/Kconfig| 19 +++ lib/vsprintf.c | 172 - 2 files

[PATCH] lib: vsprintf: add printf format conversion %M for errno strings

2017-06-25 Thread Enrico Weigelt, metux IT consult
Adding a new format conversion for *printf() and friends. If CONFIG_ERRNO_PRINTF_VERBOSE is enabled, prints human-readable strerror()-like texts, otherwise just the number. --- lib/Kconfig| 19 +++ lib/vsprintf.c | 172 - 2 files