From: Ian Jackson Subject: Re: [PATCH] tools/libxc: fix errno handling for HVM in xc_domain_save Date: Thu, 13 Mar 2014 18:01:48 +0000 Message-ID: <21281.62092.830875.326376@mariner.uk.xensource.com> References: <1394732071-14342-1-git-send-email-olaf@aepfle.de> <21281.61583.727192.311217@mariner.uk.xensource.com> <20140313175735.GA16807@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20140313175735.GA16807@aepfle.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Olaf Hering Cc: Ian.Campbell@citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Olaf Hering writes ("Re: [PATCH] tools/libxc: fix errno handling for HVM in xc_domain_save"): > On Thu, Mar 13, Ian Jackson wrote: > > I agree with Ian that this is very confusing. How about this instead ? > > That would fix the current bug, yes. Thanks for the review. I have pushed this, in the form below. Ian. commit 29f0712bc008a9d6e611785424f797cfc185c1d3 Author: Ian Jackson Date: Thu Mar 13 17:59:49 2014 +0000 tools/libxc: fix errno handling for HVM in xc_domain_save The previous patch (dda0b77d "tools/libxc: pass errno to callers of xc_domain_save") did not jump to the proper label if the domU is HVM. Signed-off-by: Ian Jackson Reviewed-by: Olaf Hering diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c index 9f96bb7..71f9b59 100644 --- a/tools/libxc/xc_domain_save.c +++ b/tools/libxc/xc_domain_save.c @@ -1836,8 +1836,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter } /* HVM guests are done now */ - errno = 0; - goto out; + goto success; } /* PV guests only from now on */ @@ -2037,6 +2036,7 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter } /* Success! */ + success: rc = errno = 0; goto out_rc;