From: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: xen-devel@lists.sourceforge.net
Subject: Re: [PATCH] libxen-3.0 (libxc rewrite)
Date: Tue, 22 Mar 2005 16:41:54 +0000 [thread overview]
Message-ID: <20050322164154.GS31328@cl.cam.ac.uk> (raw)
In-Reply-To: <424045FF.5000908@us.ibm.com>
On Tue, Mar 22, 2005 at 10:21:19AM -0600, Anthony Liguori wrote:
> 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).
You mean like using `%m' in your format string to syslog(3)?
> 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));
While most other people's test code would look like this:
domid = dom_create_domain(3000, 0);
if (domid < 0)
err(1, "dom_create_domain");
I claim that this is what more people are used to since most libraries
support this interface, i.e. return _value_ with documented specific
error values, failure condition in errno and error reporting using one
of the various standard functions.
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
next prev parent reply other threads:[~2005-03-22 16:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-21 21:25 [PATCH] libxen-3.0 (libxc rewrite) Anthony Liguori
2005-03-22 3:33 ` Jacob Gorm Hansen
2005-03-22 4:24 ` Anthony Liguori
2005-03-22 19:28 ` Adam Heath
2005-03-22 20:12 ` Jacob Gorm Hansen
2005-03-22 11:02 ` Christian Limpach
2005-03-22 15:04 ` Anthony Liguori
2005-03-22 16:01 ` Christian Limpach
2005-03-22 16:06 ` Anthony Liguori
2005-03-22 16:13 ` Christian Limpach
2005-03-22 16:21 ` Anthony Liguori
2005-03-22 16:41 ` Christian Limpach [this message]
2005-03-22 17:05 ` Anthony Liguori
2005-03-22 17:28 ` Keir Fraser
2005-03-22 17:32 ` Ronald G. Minnich
2005-03-22 17:47 ` Christian Limpach
2005-03-22 17:53 ` Anthony Liguori
2005-03-22 13:50 ` Keir Fraser
2005-03-22 15:16 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2005-03-22 9:01 Ian Pratt
2005-03-22 15:03 ` Anthony Liguori
[not found] ` <1111504492.20157.26.camel@bree.local.net>
2005-03-22 15:18 ` Anthony Liguori
2005-03-22 15:31 ` Jeremy Katz
2005-03-22 15:55 ` Anthony Liguori
2005-03-22 16:25 ` Jeremy Katz
2005-03-22 21:58 ` Jeremy Katz
2005-03-22 22:18 ` Anthony Liguori
2005-03-22 15:13 Ian Pratt
2005-03-22 16:00 Ian Pratt
2005-03-22 16:13 ` Anthony Liguori
2005-03-22 16:29 ` Nivedita Singhvi
2005-03-22 16:34 ` Anthony Liguori
2005-03-22 16:39 ` Steven Hand
2005-03-22 16:25 Ian Pratt
2005-03-22 17:21 Ian Pratt
2005-03-22 17:31 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050322164154.GS31328@cl.cam.ac.uk \
--to=christian.limpach@cl.cam.ac.uk \
--cc=aliguori@us.ibm.com \
--cc=xen-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.