lkml.org 
[lkml]   [2004]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Shift key-related error codes up and insert ECANCELED
From
Date
On Gwe, 2004-10-22 at 17:57, David Howells wrote:
> This patch shifts the key-related error codes up by one and inserts an
> ECANCELED error code where not already defined. It seems that has been defined
> in glibc without passing it back to the kernel:-/
>
> Who arbitrates error number allocations anyway?

Generally nobody because new error codes are almost always a mistake in
the first place especially when they don't appear in standards so no
application will correctly or sanely handle them.

You should use existing codes IMHO. Lets see

EKEYEXPIRED - ETIME (ETIMEDOUT ? ENOLINK ?)
ENOKEY - ENOENT
EKEYREJECTED - EILSEQ / EMSGSIZE / EPROTOTYPE ..
EKEYREVOKED - EREMCHG / ESHUTDOWN

And now I can use your key stuff with an existing C library and in LSB
compliant or cross platform code and give more information. If you look
through the kernel history we've almost never ever added an error code,
adding them just causes compatibility pain for everyone


Alan

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

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.080 / U:4.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site