From: Randy Dunlap <rdunlap@infradead.org>
To: "Enrico Weigelt, metux IT consult" <enrico.weigelt@gr13.net>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib: vsprintf: add printf format conversion %M for errno strings
Date: Sun, 25 Jun 2017 10:24:14 -0700 [thread overview]
Message-ID: <37d0f40f-2ea8-1fad-2cc7-2d8d45b1a43f@infradead.org> (raw)
In-Reply-To: <20170625171230.7613-1-enrico.weigelt@gr13.net>
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 +++++++
> lib/vsprintf.c | 172 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
> 2 files changed, 189 insertions(+), 2 deletions(-)
>
> diff --git a/lib/Kconfig b/lib/Kconfig
> index 0c8b78a9ae2e..b28ab2162435 100644
> --- a/lib/Kconfig
> +++ b/lib/Kconfig
> @@ -7,6 +7,25 @@ config BINARY_PRINTF
>
> menu "Library routines"
>
> +config ERRNO_PRINTF
> + bool "printf conversion %M for errno codes"
> + default n
> + help
> + This option adds an %M modifier for *printf() for errno values.
> + (and callers like printk() etc)
> +
> + In conjunction with ERRNO_PRINTF_VERBOSE, it prints human readable
> + strerror()-like textsm, otherwise just numeric values
text, values.
> +
> +config ERRNO_PRINTF_VERBOSE
> + bool "Verbose errno strings"
> + default y
> + depends on ERRNO_PRINTF
> + help
> + Enable verbose error strings for ERRNO_PRINTF.
> +
> + Small embedded systems might disable it for reducing kernel size.
> +
> config RAID6_PQ
> tristate
>
--
~Randy
next prev parent reply other threads:[~2017-06-25 17:24 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 [this message]
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
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=37d0f40f-2ea8-1fad-2cc7-2d8d45b1a43f@infradead.org \
--to=rdunlap@infradead.org \
--cc=enrico.weigelt@gr13.net \
--cc=linux-kernel@vger.kernel.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®