Re: [PATCH] Shift key-related error codes up and insert ECANCELED

David Howells
2004-10-25T09:31:26Z

> You should use existing codes IMHO. Lets see
>
> EKEYEXPIRED - ETIME (ETIMEDOUT ? ENOLINK ?)
> ENOKEY - ENOENT
> EKEYREJECTED - EILSEQ / EMSGSIZE / EPROTOTYPE ..
> EKEYREVOKED - EREMCHG / ESHUTDOWN

The problem with doing that is that these error codes have specific meanings
that we're then violating the standards by overloading. Take open() for
example: it's possible that this will return ENOENT because there's no file
there to be opened; I think it's a bad idea for it to return ENOENT when there
is a file there, but we don't have a key, hence ENOKEY.

David