Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Mar 2009 18:43:27 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        Marcel Moolenaar <xcllnt@mac.com>
Cc:        FreeBSD Arch <arch@freebsd.org>
Subject:   Re: On errno 
Message-ID:  <93378.1238438607@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 30 Mar 2009 10:31:56 MST." <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com>, Marcel Moolenaar wri
tes:

>With so many drivers returning ENXIO whenever something (i.e
>anything) is wrong, how meaningful is ENXIO in diagnosing
>problems?
>
>What do the various standards dictate or allow us to do?

Long time ago, I proposed a scheme where a process can register
a userland error-text buffer with the kernel.

Whenever a system call returns with error, the kernel has the
opportunity to write an explanatory text in the registered
buffer (if there is one).

That is not only backwards and standards compatible, but it is also
much more expressive than errno.

If we start with teaching err(3) function about it, we even get
a lot of coverage right away.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?93378.1238438607>