From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gianni Tedesco Subject: Re: [PATCH]: xl: Check a domain exists before destroying it Date: Tue, 25 Jan 2011 17:17:22 +0000 Message-ID: <1295975842.25215.0.camel@qabil.uk.xensource.com> References: <1295888759.28333.14.camel@qabil.uk.xensource.com> <201101241827.46797.Christoph.Egger@amd.com> <1295891031.28333.25.camel@qabil.uk.xensource.com> <19775.832.127719.521977@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <19775.832.127719.521977@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Jackson Cc: Christoph Egger , "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2011-01-25 at 17:07 +0000, Ian Jackson wrote: > Gianni Tedesco writes ("[PATCH]: xl: Check a domain exists before destroying it"): > > This is quite a clever fix but I think Ian Jacksons comments are > > correct. We should do a libxl_domain_info() and bail early in the > > destroy path if that fails. > > Thanks, I have applied the libxl part of this patch. > > The xl_cmdimpl part: > > Also fix a mis-formatted error message in xl destroy command. > misses three other similar mistakes. > > $ egrep '\\n.\"' tools/libxl/*.c > tools/libxl/xl_cmdimpl.c: if (rc) { fprintf(stderr,"destroy failed (rc=%d)\n.",rc); exit(-1); } > tools/libxl/xl_cmdimpl.c: if (rc) { fprintf(stderr,"shutdown failed (rc=%d)\n.",rc);exit(-1); } > tools/libxl/xl_cmdimpl.c: if (rc) { fprintf(stderr,"reboot failed (rc=%d)\n.",rc);exit(-1); } > tools/libxl/xl_cmdimpl.c: if (rc) { fprintf(stderr,"core dump failed (rc=%d)\n.",rc);exit(-1); } > $ > > Also in general most of the messages from xl don't print full stops. > So I suggest the patch below instead. Good call, I must have barfed my regexp when I searched for the same error... Gianni