From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH v3 6/6] xl: Return error code on save Date: Wed, 16 Dec 2015 18:25:45 +0000 Message-ID: <5671ACA9.3020606@citrix.com> References: <1448970835-2706-1-git-send-email-george.dunlap@eu.citrix.com> <1448970835-2706-6-git-send-email-george.dunlap@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1448970835-2706-6-git-send-email-george.dunlap@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: George Dunlap , xen-devel@lists.xen.org Cc: Ian Jackson , Wei Liu , Ian Campbell List-Id: xen-devel@lists.xenproject.org On 01/12/15 11:53, George Dunlap wrote: > save_domain was already constructing an error code; it just wasn't > being used. > > Signed-off-by: George Dunlap > --- > CC: Ian Campbell > CC: Ian Jackson > CC: Wei Liu > --- > tools/libxl/xl_cmdimpl.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 5f21c37..52aedcf 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -4712,8 +4712,7 @@ int main_save(int argc, char **argv) > if ( argc - optind >= 3 ) > config_filename = argv[optind + 2]; > > - save_domain(domid, filename, checkpoint, leavepaused, config_filename); > - return 0; > + return save_domain(domid, filename, checkpoint, leavepaused, config_filename); Ah -- turns out the reason the return value "wasn't being used" was that save_domain() actually calls exit() itself directly. I'll drop this patch, as the headline feature (xl failing on the save failing) appears to be working properly. Maybe we can put this on a list of clean-up items. -George