WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Christian.Limpach@xxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] libxen-3.0 (libxc rewrite)
From: Anthony Liguori <aliguori@xxxxxxxxxx>
Date: Tue, 22 Mar 2005 09:04:47 -0600
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 23 Mar 2005 12:17:55 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <3d8eece2050322030245ed31b@xxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Organization: IBM
References: <423F3BB5.3020600@xxxxxxxxxx> <3d8eece2050322030245ed31b@xxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)
Christian Limpach wrote:

On Mon, 21 Mar 2005 15:25:09 -0600, Anthony Liguori <aliguori@xxxxxxxxxx> wrote:
o Provide consistent error semantics for all functions (-errno is
returned on error).

Why -errno?  What's wrong with regular errno, like used everywhere
else in userspace?
errno's a global variable and it's way to easy to lose it's value. For instance:

if (read(fd, buffer, sizeof(buffer)) == -1) {
   close(fd);
   perror("read");
}

Doesn't do what you'd expect. It gets particularly hairy when you're not sure what functions modify errno and which functions don't.

Regards,
Anthony Liguori

   christian




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel