From: Richard Weinberger <richard@nod.at>
To: dsterba@suse.cz, Bartosz Golaszewski <bgolaszewski@baylibre.com>,
LKML <linux-kernel@vger.kernel.org>,
linux-kbuild <linux-kbuild@vger.kernel.org>
Subject: Re: [RFC] scripts: kerrno.sh - errno translator
Date: Thu, 30 Apr 2015 14:33:48 +0200 [thread overview]
Message-ID: <5542212C.70102@nod.at> (raw)
In-Reply-To: <20150430122512.GE4996@twin.jikos.cz>
Am 30.04.2015 um 14:25 schrieb David Sterba:
> On Thu, Apr 30, 2015 at 01:29:41PM +0200, Bartosz Golaszewski wrote:
>> 2015-04-30 13:04 GMT+02:00 Richard Weinberger <richard.weinberger@gmail.com>:
>>> On Thu, Apr 30, 2015 at 12:53 PM, Bartosz Golaszewski
>>> <bgolaszewski@baylibre.com> wrote:
>>>> Shell script allowing to find errno definitions and descriptions in the
>>>> kernel source.
>>>>
>>>> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
>>>> ---
>>>> This is a simple script I use when seeing messages like:
>>>>
>>>> some_func() failed: -123
>>>
>>> What is wrong with a one-liner like:
>>> gcc -E -dD - < include/uapi/linux/errno.h |grep -E "^#define E.* 123$"
>>
>> Nothing really - the output is less nice, that's all.
>
> I'd find a helper script useful in situations where I don't know the
> error code immediatelly and have to convert it from a hexa value first.
> Eg. when RAX contains an error code after a BUG_ON:
>
> RAX: 00000000ffffffe4
>
> this translates to -28 == -ENOSPC.
You mean a script where you can pipe a register dump into and it tries to
translate all registers values to meaningful values?
Yes, that would be nice... :)
Thanks,
//richard
prev parent reply other threads:[~2015-04-30 12:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-30 10:53 [RFC] scripts: kerrno.sh - errno translator Bartosz Golaszewski
2015-04-30 11:04 ` Richard Weinberger
2015-04-30 11:29 ` Bartosz Golaszewski
2015-04-30 12:25 ` David Sterba
2015-04-30 12:33 ` Richard Weinberger [this message]
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=5542212C.70102@nod.at \
--to=richard@nod.at \
--cc=bgolaszewski@baylibre.com \
--cc=dsterba@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--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