On errno

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Mar 30 22:22:24 PDT 2009


In message <49D1492C.5050101 at freebsd.org>, Tim Kientzle writes:

>> The probelm with an integer is that you cannot give details
>> like:
>> 	"partition 3 overlaps bootcode"
>> without precreating the N^2 possible messages of that kind.
>
>The standard solution if you need variable parameters,
>of course, is to pass the parameters back:
>    int code: EPARTITIONOVERLAPSBOOTCODE
>    char *default_text: "partition %1d overlaps bootcode"
>    arg1: 3

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...

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at 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.


More information about the freebsd-arch mailing list