From: Ian Campbell Subject: Re: [PATCH 02/15] libxl: domain save: rename variables etc. Date: Wed, 30 May 2012 18:32:38 +0100 Message-ID: <1338399158.14877.21.camel@dagon.hellion.org.uk> References: <1338394606-22693-1-git-send-email-ian.jackson@eu.citrix.com> <1338394606-22693-3-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1338394606-22693-3-git-send-email-ian.jackson@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: Ian Jackson Cc: "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org > @@ -921,71 +913,72 @@ int libxl__domain_suspend_common(libxl__gc *gc, uint32_t domid, int fd, > return ERROR_INVAL; > } > > - memset(&si, 0, sizeof(si)); > - flags = (live) ? XCFLAGS_LIVE : 0 > + xcflags = (live) ? XCFLAGS_LIVE : 0 > | (debug) ? XCFLAGS_DEBUG : 0 > | (hvm) ? XCFLAGS_HVM : 0; > > + dss->domid = domid; > + dss->xcflags = xcflags; > + dss->hvm = hvm; > + dss->gc = gc; > + dss->suspend_eventchn = -1; > + dss->guest_responded = 0; > + > if (r_info != NULL) { > - si.interval = r_info->interval; > + dss->interval = r_info->interval; > if (r_info->compression) > - flags |= XCFLAGS_CHECKPOINT_COMPRESS; > - si.save_fd = fd; > + xcflags |= XCFLAGS_CHECKPOINT_COMPRESS; You now do this after the "dss->xcflags = xcflags" (since you moved that block up), won't that mean you loose it? (xcflags gets used again below in the call to xc_domain_save, but I guess that'll go away during asyncification). > + dss->save_fd = fd; > } > else > - si.save_fd = -1; > - > - si.domid = domid; > - si.flags = flags; > - si.hvm = hvm; > - si.gc = gc; > - si.suspend_eventchn = -1; > - si.guest_responded = 0; > + dss->save_fd = -1;