]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/xen.git/commitdiff
libxl: Introduce DOMAIN_DESTROYED error code
authorIan Jackson <ian.jackson@eu.citrix.com>
Tue, 10 Feb 2015 17:48:40 +0000 (17:48 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 26 Jun 2015 15:53:50 +0000 (16:53 +0100)
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.

Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
---
v4: Add a comment about the new error code's semantics
v2: New in this version of the series.

tools/libxl/libxl_bootloader.c
tools/libxl/libxl_types.idl

index 0263ef96925ec413d529f7d153d74352dd89746d..490ad5cc0e64104c03c6247e41f47c3f5c277faf 100644 (file)
@@ -613,7 +613,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,
index 9558d521badad0a6976a40c844f6621c8a6dc947..e1632fa35a678bb40a9c248698550a2dd1d54d16 100644 (file)
@@ -67,6 +67,7 @@ libxl_error = Enumeration("error", [
     (-21, "DOMAIN_NOTFOUND"),
     (-22, "ABORTED"),
     (-23, "NOTFOUND"),
+    (-24, "DOMAIN_DESTROYED"), # Target domain ceased to exist during op
     ], value_namespace = "")
 
 libxl_domain_type = Enumeration("domain_type", [