public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: torvalds@osdl.org, akpm@osdl.org, jakub@redhat.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Shift key-related error codes up and insert ECANCELED
Date: Fri, 22 Oct 2004 19:34:38 +0100	[thread overview]
Message-ID: <1098470076.19458.37.camel@localhost.localdomain> (raw)
In-Reply-To: <20498.1098464262@redhat.com>

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


  parent reply	other threads:[~2004-10-23  3:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-22 16:57 [PATCH] Shift key-related error codes up and insert ECANCELED David Howells
2004-10-22 17:14 ` Jakub Jelinek
2004-10-22 18:34 ` Alan Cox [this message]
2004-10-25  9:31   ` David Howells
2004-10-25  9:48     ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1098470076.19458.37.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=dhowells@redhat.com \
    --cc=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox