From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 22/29] libxl: Introduce DOMAIN_DESTROYED error code Date: Tue, 24 Mar 2015 11:56:37 +0000 Message-ID: <1427198197.21742.367.camel@citrix.com> References: <1423599016-32639-1-git-send-email-ian.jackson@eu.citrix.com> <1423599016-32639-23-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: <1423599016-32639-23-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 , Konrad Rzeszutek Wilk Cc: xen-devel@lists.xensource.com, Euan Harris List-Id: xen-devel@lists.xenproject.org On Tue, 2015-02-10 at 20:10 +0000, Ian Jackson wrote: > This is currently reported only by the bootloader code, if the domain > is destroyed while the bootloader is running. > > In the future it would be nice to return it for other circumstances > where the domain existed when the operation started but subsequently > vanished. Konrad has a semantically similar error code which he is adding, I think in his recent libxl series to do with vcpu-set. AIUI Konrad's semantics are simply "domain does not exist", which seems to be usefully distinct from your "did exist but doesn't any more". I just wanted to mention it in case I'd misunderstood one or both error codes. As it stands this patch seems fine to me: > Signed-off-by: Ian Jackson Acked-by: Ian Campbell I do wonder though if we ought to be better about documenting in the code|headers|idl what error codes mean and where they should be used (some are global, others specific to a subset of calls etc). Ian. > --- > v2: New in this version of the series. > --- > tools/libxl/libxl_bootloader.c | 2 +- > tools/libxl/libxl_types.idl | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_bootloader.c b/tools/libxl/libxl_bootloader.c > index 79947d4..c3f3a1f 100644 > --- a/tools/libxl/libxl_bootloader.c > +++ b/tools/libxl/libxl_bootloader.c > @@ -611,7 +611,7 @@ static void bootloader_display_copyfail(libxl__egc *egc, > static void bootloader_domaindeath(libxl__egc *egc, libxl__domaindeathcheck *dc) > { > libxl__bootloader_state *bl = CONTAINER_OF(dc, *bl, deathcheck); > - bootloader_stop(egc, bl, ERROR_FAIL); > + bootloader_stop(egc, bl, ERROR_DOMAIN_DESTROYED); > } > > static void bootloader_finished(libxl__egc *egc, libxl__ev_child *child, > diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl > index 193f22a..d91b70d 100644 > --- a/tools/libxl/libxl_types.idl > +++ b/tools/libxl/libxl_types.idl > @@ -66,6 +66,7 @@ libxl_error = Enumeration("error", [ > (-20, "CANCELLED"), > (-21, "NOTFOUND"), > (-22, "NOTIMPLEMENTED"), > + (-23, "DOMAIN_DESTROYED"), > ], value_namespace = "") > > libxl_domain_type = Enumeration("domain_type", [