]> xenbits.xensource.com Git - xen.git/commitdiff
libxl: do not blunder on if bootloader fails
authorIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Jul 2012 12:09:36 +0000 (13:09 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Mon, 23 Jul 2012 12:09:36 +0000 (13:09 +0100)
If the bootloader failed, we would call the creation failure callback
but _also_ blunder on trying to recreate the domain, due to a missing
"return".

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Reported-by: Roger Pau Monne <roger.pau@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_create.c

index 294a73fe57eb183a6da2eb12b67f2b16a40ca6f5..0bfa8babee15a914589281a5c8ed5f7406ff9373 100644 (file)
@@ -672,7 +672,10 @@ static void domcreate_bootloader_done(libxl__egc *egc,
     libxl__srm_restore_autogen_callbacks *const callbacks =
         &dcs->shs.callbacks.restore.a;
 
-    if (rc) domcreate_rebuild_done(egc, dcs, rc);
+    if (rc) {
+        domcreate_rebuild_done(egc, dcs, rc);
+        return;
+    }
 
     /* consume bootloader outputs. state->pv_{kernel,ramdisk} have
      * been initialised by the bootloader already.