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

From: David Howells
Date: Mon Oct 25 2004 - 04:32:25 EST



> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/