[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150430122512.GE4996@twin.jikos.cz>
Date: Thu, 30 Apr 2015 14:25:12 +0200
From: David Sterba <dsterba@...e.cz>
To: Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc: Richard Weinberger <richard.weinberger@...il.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-kbuild <linux-kbuild@...r.kernel.org>
Subject: Re: [RFC] scripts: kerrno.sh - errno translator
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@...il.com>:
> > On Thu, Apr 30, 2015 at 12:53 PM, Bartosz Golaszewski
> > <bgolaszewski@...libre.com> wrote:
> >> Shell script allowing to find errno definitions and descriptions in the
> >> kernel source.
> >>
> >> Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists