Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261734AbUJYJb0 (ORCPT ); Mon, 25 Oct 2004 05:31:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261732AbUJYJb0 (ORCPT ); Mon, 25 Oct 2004 05:31:26 -0400 Received: from mx1.redhat.com ([66.187.233.31]:15779 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261728AbUJYJbZ (ORCPT ); Mon, 25 Oct 2004 05:31:25 -0400 From: David Howells In-Reply-To: <1098470076.19458.37.camel@localhost.localdomain> References: <1098470076.19458.37.camel@localhost.localdomain> <20498.1098464262@redhat.com> To: Alan Cox Cc: torvalds@osdl.org, akpm@osdl.org, jakub@redhat.com, Linux Kernel Mailing List Subject: Re: [PATCH] Shift key-related error codes up and insert ECANCELED User-Agent: EMH/1.14.1 SEMI/1.14.5 (Awara-Onsen) FLIM/1.14.5 (Demachiyanagi) APEL/10.6 Emacs/21.3 (i386-redhat-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Date: Mon, 25 Oct 2004 10:31:01 +0100 Message-ID: <14486.1098696661@redhat.com> Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 819 Lines: 20 > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/