From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Re: [PATCH v3 14/15] tools: don't stop xenstore domain when stopping dom0 Date: Fri, 15 Jan 2016 17:24:04 +0100 Message-ID: <56991D24.6060908@suse.com> References: <1452258526-4797-1-git-send-email-jgross@suse.com> <1452258526-4797-15-git-send-email-jgross@suse.com> <1452874359.6020.66.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1452874359.6020.66.camel@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 Campbell , xen-devel@lists.xen.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com, wei.liu2@citrix.com, dgdegra@tycho.nsa.gov List-Id: xen-devel@lists.xenproject.org On 15/01/16 17:12, Ian Campbell wrote: > On Fri, 2016-01-08 at 14:08 +0100, Juergen Gross wrote: >> +# get xenstore domain id (or 0 if no xenstore domain) >> +get_xsdomid() >> +{ >> + XS_DOMID=`${bindir}/xenstore-read /tool/xenstored/domid 2>/dev/null` >> + if test $? -ne 0; then >> + XS_DOMID=0 >> + fi > > In principal this could be: > + XS_DOMID=`${bindir}/xenstore-read /tool/xenstored/domid 2>/dev/null || echo 0` > > But I'm far from convinced that is an improvement. I think I'll leave it as before. > >> diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c >> index f9933cb..29f9d19 100644 >> --- a/tools/libxl/xl_cmdimpl.c >> +++ b/tools/libxl/xl_cmdimpl.c >> @@ -4856,15 +4856,17 @@ static int main_shutdown_or_reboot(int do_reboot, >> int argc, char **argv) >> if (wait_for_it) >> deathws = calloc(nb_domain, sizeof(*deathws)); >> >> + wait_for_it = 0; > > Please can we avoid reusing the boolean flag used for argument handling as > a counter. > > I think you will need to introduce a new nrdeathws. Okay, will do. Thanks, Juergen