Hi !
> > STOP ! One cannot send differentiated return codes with that diff !
> > I.e. you only ever get O.K. or EINVAL, no chance to give a better suited
> > code.
> This was intentional.
?? But it's not really good.
> Can't do that until the KGI error codes are fixed, or remapped to
> some KGIcon specific error codes (see below). The above patch is
> enough for a fully functional KGIcon anyway.
O.K. - we should fix it - right. I see the problem.
> No, it's correct to return a value < 0 && >= -4095 for errors, not
> any negative value. A comment in libc tells why:
This is sick. I've seen it before ... should have remembered it ...
O.K. - the correct solution would be to either remap all KGI codes to Linux
errnos or place a result-code somewhere in the returned structs.
I do not like the latter solution, as it breaks KGI severely.
So we should use remapping ... O.K. - what have we got:
UNKNOWN : EIO ?
BOGUS : EINVAL
FAILED : ENOENT ?
NOSUP_NOW_* : EAGAIN or EBUSY
NOSUP_MODE_* : EINVAL
NOSUP_ALWAYS_* : EINVAL
The various MODE_CHECK-stuff : EINVAL.
This is pretty much the same what your patch does now. However it allows to
tell the NOW_* from the others. The code would be pretty trivial - a switch
in place of the conditional that is there now. default: should be EINVAL
and we should just catch the NOW* stuff.
CU, Andy
--
= Andreas Beck | Email : <[EMAIL PROTECTED]> =