qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: QEMU Trivial <qemu-trivial@nongnu.org>,
	xen-devel@lists.xensource.com, qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] xen-hvm.c: Improve the return method for xen_hvm_init()
Date: Thu, 04 Sep 2014 09:31:41 +0800	[thread overview]
Message-ID: <5407C0FD.6060406@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1409040024100.18866@kaball.uk.xensource.com>

On 9/4/14 7:32, Stefano Stabellini wrote:
> On Wed, 3 Sep 2014, Chen Gang wrote:
>> On 9/3/14 0:22, Chen Gang wrote:
[...]
>>> xen_hvm_init() may also return -errno, which may let upper caller think
>>> more (e.g. free some other related resources and try again), although at
>>> present, all related upper callers still exit(1).
> 
> I think we should return -1 in the other cases too
> 

[...]
>>> @@ -998,6 +999,7 @@ int xen_hvm_init(ram_addr_t *below_4g_mem_size, ram_addr_t *above_4g_mem_size,
>>>      state->xenstore = xs_daemon_open();
>>>      if (state->xenstore == NULL) {
>>>          perror("xen: xenstore open");
>>> +        xc_evtchn_close(state->xce_handle);
>>>          g_free(state);
>>>          return -errno;
>>>      }
> 
> just return -1 and do the same in the above check (xce_handle ==
> XC_HANDLER_INITIAL_VALUE)
> 
> 

OK thanks, what you said sounds OK to me. I shall send patch v2 for it
within the 2 days (within 2014-09-05).

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

      reply	other threads:[~2014-09-04  1:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02 16:22 [Qemu-devel] [PATCH] xen-hvm.c: Improve the return method for xen_hvm_init() Chen Gang
2014-09-03  1:31 ` Chen Gang
2014-09-03 23:32   ` Stefano Stabellini
2014-09-04  1:31     ` Chen Gang [this message]

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=5407C0FD.6060406@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).