From: Anthony Liguori <aliguori@us.ibm.com>
To: xen-devel <xen-devel@lists.sourceforge.net>
Subject: [PATCH] Cleanup error paths in xen/common/dom0_ops.c
Date: Wed, 09 Mar 2005 14:28:31 -0600 [thread overview]
Message-ID: <422F5C6F.2080107@us.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
I've written an automated dom0_op generator in an effort to test the
libxc rewrite. The tool is still awfully primative and the rewrite is
not yet complete but I wanted to post fixes for some bugs the tool found
so I wouldn't forget.
The first makes sure that builddomain returns ESRCH when passed an
invalid domain ID (this is what every other dom0_op returns).
The second makes sure that unpausedomain returns EINVAL if you try to
unpause yourself. This is the behavior of pausedomain and is a bit more
sane than just returning 0.
I've tested this on today's unstable (able to boot and create domains
with Xend just as before).
Regards,
Anthony Liguori
Signed-off-by: Anthony Liguori (aliguori@us.ibm.com)
[-- Attachment #2: dom0_op_error.diff --]
[-- Type: text/x-patch, Size: 951 bytes --]
--- xen-unstable/xen/common/dom0_ops.c~ 2005-03-08 22:12:28.000000000 -0600
+++ xen-unstable/xen/common/dom0_ops.c 2005-03-09 14:03:05.000000000 -0600
@@ -114,7 +114,7 @@
case DOM0_BUILDDOMAIN:
{
struct domain *d = find_domain_by_id(op->u.builddomain.domain);
- ret = -EINVAL;
+ ret = -ESRCH;
if ( d != NULL )
{
ret = final_setup_guest(d, &op->u.builddomain);
@@ -147,10 +147,13 @@
if ( d != NULL )
{
ret = -EINVAL;
- if ( test_bit(DF_CONSTRUCTED, &d->d_flags) )
+ if ( d != current->domain )
{
- domain_unpause_by_systemcontroller(d);
- ret = 0;
+ if ( test_bit(DF_CONSTRUCTED, &d->d_flags) )
+ {
+ domain_unpause_by_systemcontroller(d);
+ ret = 0;
+ }
}
put_domain(d);
}
reply other threads:[~2005-03-09 20:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=422F5C6F.2080107@us.ibm.com \
--to=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.