From: Andi Kleen <ak@suse.de>
To: Igmar Palsenberg <i.palsenberg@jdimedia.nl>
Cc: Andi Kleen <ak@suse.de>, "David S. Miller" <davem@redhat.com>,
Harald Welte <laforge@gnumonks.org>,
linux-kernel@vger.kernel.org
Subject: Re: 2.4.0 + iproute2
Date: Sun, 14 Jan 2001 13:31:40 +0100 [thread overview]
Message-ID: <20010114133140.A23640@gruyere.muc.suse.de> (raw)
In-Reply-To: <20010114124659.A23188@gruyere.muc.suse.de> <Pine.LNX.4.30.0101141309160.16758-100000@jdi.jdimedia.nl>
In-Reply-To: <Pine.LNX.4.30.0101141309160.16758-100000@jdi.jdimedia.nl>; from i.palsenberg@jdimedia.nl on Sun, Jan 14, 2001 at 01:13:16PM +0100
On Sun, Jan 14, 2001 at 01:13:16PM +0100, Igmar Palsenberg wrote:
> On Sun, 14 Jan 2001, Andi Kleen wrote:
>
> > On Sun, Jan 14, 2001 at 03:36:55AM -0800, David S. Miller wrote:
> > >
> > > Andi Kleen writes:
> > > > How would you pass the extended errors? As strings or as to be
> > > > defined new numbers? I would prefer strings, because the number
> > > > namespace could turn out to be as nasty to maintain as the current
> > > > sysctl one.
> > >
> > > Textual error messages for system calls never belong in the kernel.
> > > Put it in glibc or wherever.
> >
> > This just means that a table needs to be kept in sync between glibc and
> > netlink, and if someone e.g. gets a new CBQ module he would need to update
> > glibc. It's also bad for maintainers, because patches for tables of number
> > tend to always reject ;)
>
> Agree, but textual strings are bad. I want to say :
>
> if (error) {
> perror("RTNETLINK");
> return -1;
> }
>
> Using textual strings means you can't use standard functions. An option
> would be to extend the call so that if the userspace app wants to know
> what really went wrong he can ask the kernel.
That will not work. Consider an application that has multiple rtnetlink
sockets open, which each have own errors.
rtnetlink is such a radical interface for unix, adding a few more changes
for a different error reporting system probably does not make much difference.
my problem with keeping the textual error messages out of kernel is that
it means that three entities (kernel module, number table in kernel and
external string table) need to be kept in sync. In practice that's usually
not the case.
David's /proc/errno_strings would only require keeping kernel table and
module in sync.
Text errors for rtnetlink would localize it to the module itself.
I could probably live with David's solution, although I would prefer the full
way.
-Andi
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-14 12:32 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-13 16:37 Igmar Palsenberg
2001-01-14 8:36 ` Harald Welte
2001-01-14 8:52 ` Igmar Palsenberg
2001-01-14 8:55 ` David S. Miller
2001-01-14 9:14 ` Igmar Palsenberg
2001-01-14 9:17 ` David S. Miller
2001-01-14 10:52 ` Andi Kleen
2001-01-17 17:04 ` Werner Almesberger
2001-01-17 21:21 ` Andi Kleen
2001-01-17 22:57 ` Igmar Palsenberg
2001-01-14 10:55 ` David S. Miller
2001-01-14 11:33 ` Andi Kleen
2001-01-14 11:36 ` David S. Miller
2001-01-14 11:46 ` Andi Kleen
2001-01-14 12:13 ` Igmar Palsenberg
2001-01-14 12:31 ` Andi Kleen [this message]
2001-01-15 0:51 ` Igmar Palsenberg
2001-01-14 13:15 ` David S. Miller
2001-01-14 15:23 ` Andi Kleen
2001-01-14 12:05 ` David S. Miller
2001-01-14 12:15 ` Igmar Palsenberg
2001-01-14 13:17 ` David S. Miller
2001-01-14 12:08 ` Igmar Palsenberg
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=20010114133140.A23640@gruyere.muc.suse.de \
--to=ak@suse.de \
--cc=davem@redhat.com \
--cc=i.palsenberg@jdimedia.nl \
--cc=laforge@gnumonks.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
all inboxes | Powered by JetHome®