From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] tools/xc: pass errno to callers of xc_domain_save Date: Tue, 11 Feb 2014 12:50:40 +0000 Message-ID: <1392123040.26657.108.camel@kazak.uk.xensource.com> References: <1392109492-17436-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1392109492-17436-1-git-send-email-olaf@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.Jackson@eu.citrix.com, xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Tue, 2014-02-11 at 10:04 +0100, Olaf Hering wrote: > Callers of xc_domain_save use errno to print diagnostics if the call > fails. But xc_domain_save does not preserve the actual errno in case of > a failure. > > This change preserves errno in all cases where code jumps to the label > "out". In addition a new label "exit" is added to catch also code which > used to do just "return 1". > > Now libxl_save_helper:complete can print the actual error string. > > Note: some of the functions used in xc_domain_save do not use errno to > indicate a reason. In these cases the errno remains undefined as it used > to be without this change. > > Signed-off-by: Olaf Hering I'm assuming this is 4.5 material at this point.