> And, finally, errno and errstr. Plan 9 speaks strings, Unix integers,
> Windows strings IIRC. The solution for unix clients was reverse
> mapping of errstr to errno, which has not worked well for me. I'd
> still prefer the format I used before:
> sprint(rmsg.error, "%d:%s", errno, errstr);
> and let the client figure out which of these two things it wants.
> Obviously useless for Plan 9 servers but very useful for *nix
> clients/servers, which only want to talk errno. Even if the Plan 9
> client sees an errstr in the number:message format, that could be
> helpful to users.

since plan 9 assumes that strings are null-terminated but
9p has explicit rle, one could send uids/errorno after the 0,
but before the rle says the string is done.

sleezy, and hackish, but it should work.

also, one can always support many extensions by doing
the following
(a) extensions are [a-zA-Z]
(b) all extensions start with "."

then you can check for the existence of an extension
with
        if(strstr(version, ".myextension") != nil)
                extensions |= Myextension;

and
        P92000.l.op.xyz.pdq

will be legal.

- erik

Reply via email to