Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1674361

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

From "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
Newsgroups linux.kernel
Subject Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings
Date 2017-06-26 02:50 +0200
Message-ID <tWqo2-3Ek-9@gated-at.bofh.it> (permalink)
References (1 earlier) <tWjwd-7UO-1@gated-at.bofh.it> <tWlRo-NX-5@gated-at.bofh.it> <tWmaJ-1b8-1@gated-at.bofh.it> <tWn6P-1Mu-41@gated-at.bofh.it> <tWovT-2uQ-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 of just writing out message IDs as hexdumps or
binary stream (would make the kernel a lot smaller) ?

> but there's not really much need for it to be in the mainline kernel. 

The idea was having a generic and convenient solution that can be used
by other parts of the kernel, too. (just like w/ all the other logging
helpers). That's also the reason why I added into vsprintf().

> So when your driver prints "blah: foo bar error 49",
> just run a little program that converts 49 to <whatever>.

How could that help when userland isn't even up yet ?


--mtx

--
Enrico, Sohn von Wilfried, a.d.F. Weigelt,
metux IT consulting
+49-151-27565287

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] lib: vsprintf: add printf format conversion %M for errno strings "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-25 19:20 +0200
  Re: [PATCH] lib: vsprintf: add printf format conversion %M for  errno strings Joe Perches <joe@perches.com> - 2017-06-25 19:30 +0200
    Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno  strings "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-25 22:00 +0200
      Re: [PATCH] lib: vsprintf: add printf format conversion %M for  errno strings Joe Perches <joe@perches.com> - 2017-06-25 22:20 +0200
        Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno  strings "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-25 23:20 +0200
          Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno  strings Randy Dunlap <rdunlap@infradead.org> - 2017-06-26 00:50 +0200
            Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno  strings "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net> - 2017-06-26 02:50 +0200
            Re: [PATCH] lib: vsprintf: add printf format conversion %M for  errno strings Bernd Petrovitsch <bernd@petrovitsch.priv.at> - 2017-06-27 13:10 +0200
  Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno  strings Randy Dunlap <rdunlap@infradead.org> - 2017-06-25 19:30 +0200

csiph-web