From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v8 20/20] xenctx: Ensure errno is not zero on error in xc_translate_foreign_address() Date: Tue, 01 Apr 2014 16:49:26 -0400 Message-ID: <533B2656.9080800@terremark.com> References: <1395947147-5262-1-git-send-email-dslutz@verizon.com> <1395947147-5262-21-git-send-email-dslutz@verizon.com> <1396362617.8667.215.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1396362617.8667.215.camel@kazak.uk.xensource.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: Ian Campbell , Don Slutz Cc: George Dunlap , Stefano Stabellini , Ian Jackson , Jan Beulich , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 04/01/14 10:30, Ian Campbell wrote: > On Thu, 2014-03-27 at 15:05 -0400, Don Slutz wrote: >> This is because xc_translate_foreign_address() returns 0 in both the >> error case and when 0 is the mfn. By making sure that errno is set >> callers can now determine if it is an error or not. > I think it would be preferable to change the function to return the > translated address via an output pointer and make the formal return be > an int 0 (success) or -1 (error, sets errno). > > That would be both more normal and remove all the frobbing around with > errno. > > Ian. > I was not of mind to change an existing interface. Will drop this from this patch set. -Don Slutz