xl: Fix accidently waiting for domains to shutdown without --wait option
authorSander Eikelenboom <linux@eikelenboom>
Thu, 25 Oct 2012 15:04:54 +0000 (16:04 +0100)
committerSander Eikelenboom <linux@eikelenboom>
Thu, 25 Oct 2012 15:04:54 +0000 (16:04 +0100)
Introduced by changeset 26091: "xl: Add --wait and --all to xl reboot."

Signed-off-by: Sander Eikelenboom <linux@eikelenboom>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxl/xl_cmdimpl.c

index 92ac0c3751b141919e29842836892e633c16aeab..5a947da40971c58787d74b32cec0a16a9750de58 100644 (file)
@@ -3774,7 +3774,9 @@ static int main_shutdown_or_reboot(int do_reboot, int argc, char **argv)
                fallback_trigger);
         }
 
-        wait_for_domain_deaths(deathws, nb_domain - 1 /* not dom 0 */);
+        if (wait_for_it)
+            wait_for_domain_deaths(deathws, nb_domain - 1 /* not dom 0 */);
+
         libxl_dominfo_list_free(dominfo, nb_domain);
     } else {
         libxl_evgen_domain_death *deathw = NULL;