From owner-freebsd-arch@FreeBSD.ORG Mon Mar 30 18:43:30 2009 Return-Path: Delivered-To: arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F43C106564A for ; Mon, 30 Mar 2009 18:43:30 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from phk.freebsd.dk (phk.freebsd.dk [130.225.244.222]) by mx1.freebsd.org (Postfix) with ESMTP id C612D8FC13 for ; Mon, 30 Mar 2009 18:43:29 +0000 (UTC) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (critter.freebsd.dk [192.168.61.3]) by phk.freebsd.dk (Postfix) with ESMTP id 7D2B878CCF; Mon, 30 Mar 2009 18:43:28 +0000 (UTC) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.14.3/8.14.3) with ESMTP id n2UIhRJp093379; Mon, 30 Mar 2009 18:43:28 GMT (envelope-from phk@critter.freebsd.dk) To: Marcel Moolenaar From: "Poul-Henning Kamp" In-Reply-To: Your message of "Mon, 30 Mar 2009 10:31:56 MST." <8321954E-5CFF-45F9-9F87-BE83659E4C8D@mac.com> Date: Mon, 30 Mar 2009 18:43:27 +0000 Message-ID: <93378.1238438607@critter.freebsd.dk> Sender: phk@critter.freebsd.dk Cc: FreeBSD Arch Subject: Re: On errno X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2009 18:43:30 -0000 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.