mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>
To: Randy Dunlap <rdunlap@infradead.org>,
	Joe Perches <joe@perches.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings
Date: Mon, 26 Jun 2017 02:42:48 +0200	[thread overview]
Message-ID: <22ca3747-ad8a-666c-1d71-1def74103234@gr13.net> (raw)
In-Reply-To: <3a8df2e2-114c-9f2c-325a-49f234726b08@infradead.org>

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

  reply	other threads:[~2017-06-26  0:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-25 17:12 Enrico Weigelt, metux IT consult
2017-06-25 17:24 ` Randy Dunlap
2017-06-25 17:27 ` Joe Perches
2017-06-25 19:53   ` Enrico Weigelt, metux IT consult
2017-06-25 20:10     ` Joe Perches
2017-06-25 21:18       ` Enrico Weigelt, metux IT consult
2017-06-25 22:47         ` Randy Dunlap
2017-06-26  0:42           ` Enrico Weigelt, metux IT consult [this message]
2017-06-27 11:02           ` Bernd Petrovitsch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22ca3747-ad8a-666c-1d71-1def74103234@gr13.net \
    --to=enrico.weigelt@gr13.net \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®