From: Ian Jackson Subject: Re: [PATCH for-4.6 1/3] xen/x86/libxl: replace non-POSIX error codes used by PSR code Date: Tue, 21 Jul 2015 17:17:21 +0100 Message-ID: <21934.28817.508906.998584@mariner.uk.xensource.com> References: <1437494178-10654-1-git-send-email-roger.pau@citrix.com> <1437494178-10654-2-git-send-email-roger.pau@citrix.com> <55AE8B6D0200007800093BD1@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZHaET-0008QN-OJ for xen-devel@lists.xenproject.org; Tue, 21 Jul 2015 16:17:29 +0000 In-Reply-To: <55AE8B6D0200007800093BD1@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , xen-devel@lists.xenproject.org, Roger Pau Monne List-Id: xen-devel@lists.xenproject.org Jan Beulich writes ("Re: [PATCH for-4.6 1/3] xen/x86/libxl: replace non-POSIX error codes used by PSR code"): > On 21.07.15 at 17:56, wrote: > > PSR was using EBADSLT and EUSERS which are not POSIX error codes, replace > > them with EINVAL and EOVERFLOW respectively. > > Considering that we use EINVAL for almost everything (well beyond > parameter checking I'm afraid), I don't think using this value for > something intended to yield a specific user mode error message is > really a good choice. Looking at the two respective hypervisor side > changes - how about e.g. using EDOM, EBADF, or ENXIO instead? EBADF is rather poor because it's the same error code you would get if your privcmd fd had been closed. Ian.