]> git.ipfire.org Git - thirdparty/libvirt.git/commit
tools: fix check_guests_shutdown loop
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Thu, 19 Apr 2018 06:41:02 +0000 (08:41 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Apr 2018 08:43:42 +0000 (10:43 +0200)
commit08bb5eeba7925a5a9cbd5a8dc9368ca3d36d3d3f
tree3fe9aeba603592abf6e3123b561ce3a8941e2a51
parent6009d5124f1045b38bc499b8a171e5fd7f304a8a
tools: fix check_guests_shutdown loop

The recent fix to libvirt-guests.sh.in works for what it intended to fix
(variable scope) but failed to adapt the loop in check_guests_shutdown
correctly. Due to that it currently might detect all guests as "Failed to
determine state of guest" by bad var content or just assumes they are shut
down by picking up an empty variable.

This commit fixes loop to use the passed value and the call in the loop
to actually use the variable assigned in the iterated.

Fixes: 7e476356 "tools: fix variable scope in in check_guests_shutdown"
Fixes: https://bugs.launchpad.net/ubuntu/+source/libvirt/+bug/1764668
Reviewed-by: Dariusz Gadomski <dariusz.gadomski@canonical.com>
Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
tools/libvirt-guests.sh.in