[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] libxen-3.0 (libxc rewrite)



On Tue, Mar 22, 2005 at 10:06:44AM -0600, Anthony Liguori wrote:
> 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.

What about perror, warn, err and the likes, I really like to use those.
It seems very illogical having to stick the returned value into errno to be
able to use those...

> >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.

Again, it seems illogical having to negate the returned value to be
able to use it, when there's no reason to return a negative value in
the first place.

    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
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.