|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH] libxen-3.0 (libxc rewrite)
Christian Limpach wrote:
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...
You're not going to like this answer but I don't think I would use any
of those functions in a real management application. Management tools
should be using standard logging suites (like syslog).
strerror() still works with these return codes btw. My test code
usually likes like this:
domid_t domid;
int ret = dom_create_domain(3000, 0, &domid);
if (ret < 0) error("dom_create_domain: failed %s", strerror(-ret));
This would be even easier if the library returned errno instead of
-errno ;-)
Regards,
Anthony Liguori
-------------------------------------------------------
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
|
|
|
|
|