From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] tools/xc: pass errno to callers of xc_domain_save Date: Tue, 11 Feb 2014 07:58:53 +0100 Message-ID: <20140211065853.GB21167@aepfle.de> References: <1392033425-1863-1-git-send-email-olaf@aepfle.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1392033425-1863-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: xen-devel@lists.xen.org Cc: Ian.Jackson@eu.citrix.com, Ian.Campbell@citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, Feb 10, Olaf Hering wrote: > Now libxl_save_helper:complete can print the actual error string. Also > checkpoint is updated to pass the errno to its caller. > @@ -209,9 +209,11 @@ int checkpoint_start(checkpoint_state* s, int fd, > rc = xc_domain_save(s->xch, fd, s->domid, 0, 0, flags, callbacks, hvm, > vm_generationid_addr); > > + errnoval = errno; > if (hvm) > switch_qemu_logdirty(s, 0); > > + errno = errnoval; > return rc; It just occoured to me that this part is wrong: rc should have been 'rc ? -1 : 0;'. And in addition to that the caller pycheckpoint_start expects checkpoint_state->errstr should be set to some error string. So this part of the patch has to be dropped. Olaf