From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH] libxen-3.0 (libxc rewrite) Date: Tue, 22 Mar 2005 10:06:44 -0600 Message-ID: <42404294.6000101@us.ibm.com> References: <423F3BB5.3020600@us.ibm.com> <3d8eece2050322030245ed31b@mail.gmail.com> <4240340F.8080600@us.ibm.com> <20050322160146.GQ31328@cl.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit In-Reply-To: <20050322160146.GQ31328@cl.cam.ac.uk> Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Christian Limpach Cc: xen-devel@lists.sourceforge.net List-Id: xen-devel@lists.xenproject.org Christian Limpach wrote: >I think it does what I expect. And it seems to work for a lot of >libraries just fine. By not using the global errno, you're preventing >people from using perror, warn, err and the likes. Also some of the >interfaces in your library are slightly awkward because you're wasting >the return parameter to return the failure reason. > > You're right. Some of the interfaces are a little awkward (especially the memory mapping ones). It seemed like a reasonable trade-off to make though. >Even if we don't use the global errno, I'm still wondering why you're >returning -errno and not errno? > > Good question. I guess since we never returned > 0 it would be reasonable to return errno instead of -errno. -errno is the convention used in the Linux kernel. That's what I was modelling. Regards, Anthony Liguori > christian > > > > ------------------------------------------------------- This SF.net email is sponsored by: 2005 Windows Mobile Application Contest Submit applications for Windows Mobile(tm)-based Pocket PCs or Smartphones for the chance to win $25,000 and application distribution. Enter today at http://ads.osdn.com/?ad_id=6882&alloc_id=15148&op=click