Date: Tue, 31 Mar 2009 02:20:56 -0400 (EDT) From: Garrett Wollman <wollman@hergotha.csail.mit.edu> To: phk@phk.freebsd.dk Cc: arch@freebsd.org Subject: Re: On errno Message-ID: <200903310620.n2V6Kudd072936@hergotha.csail.mit.edu> In-Reply-To: <95823.1238476941@critter.freebsd.dk> References: <49D1492C.5050101@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <95823.1238476941@critter.freebsd.dk>, phk@phk.freebsd.dk writes: >And the "standard" solution is stupid and useless, because more >often than not, some language, typically french, will want the >arguments in the opposite order... Which is why printf() supports putting the arguments in arbitrary order. A much more serious objection to this model is the desire someone will certainly have to use the %s format, with the attendent pain involved in moving variable-length strings along with the arguments across the user-kernel boundary. I'd much rather have plain integers, thank you very much. At most, a small structure, in which the only pointer is a reference to a user-space argument. (So [ENOENT] and [EACCES] could have an extended error code ECOMPONENTNAME which indicates that the pointer value is a substring of the pathname argument, and identifies the beginning of the pathname component being resolved when the failure occurred. You'd probably also want to have ENOTANERROR to indicate "error return indicates an expected success condition" and EFD to indicate "integer value is the file descriptor which caused the error condition.) But all this is really irrelevant if no other operating system or standard adopts the interface. Interfaces which are peculiar to FreeBSD are rarely useful. -GAWollman
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903310620.n2V6Kudd072936>