diff options
author | Keir Fraser <keir@xensource.com> | 2007-10-02 09:56:53 +0100 |
---|---|---|
committer | Keir Fraser <keir@xensource.com> | 2007-10-02 09:56:53 +0100 |
commit | 36f49d79ffbd913a0eb0cc93079b56e0a9b8fa7f (patch) | |
tree | 7d5f8080556eff45e84241477ca5033dccdeedb3 /tools | |
parent | 0741e7c2374f9fb899734e244248ed4db95e0d23 (diff) | |
download | xen-36f49d79ffbd913a0eb0cc93079b56e0a9b8fa7f.tar.gz xen-36f49d79ffbd913a0eb0cc93079b56e0a9b8fa7f.tar.bz2 xen-36f49d79ffbd913a0eb0cc93079b56e0a9b8fa7f.zip |
Fix external-device-migrate infinite loop.
For some (yet) unknown reason extern-device-migrate is called
twice, once with a missing domname argument.
The following invocation loops forever:
external-device-migrate -domname
because "shift 2" never shifts ($# < 2) and $# is always 1.
From: Pascal Bouchareine <pascal@gandi.net>
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/examples/external-device-migrate | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/examples/external-device-migrate b/tools/examples/external-device-migrate index c7c99afec3..a4113483a8 100644 --- a/tools/examples/external-device-migrate +++ b/tools/examples/external-device-migrate @@ -16,6 +16,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # +set -x # This script is called by XenD for migration of external devices # It does not handle the migration of those devices itself, but @@ -57,11 +58,11 @@ function evaluate_params() stype="" while [ $# -ge 1 ]; do case "$1" in - -step) step=$2; shift 2;; - -host) host=$2; shift 2;; - -domname) domname=$2; shift 2;; - -type) typ=$2; shift 2;; - -subtype) stype=$2; shift 2;; + -step) step=$2; shift; shift;; + -host) host=$2; shift; shift;; + -domname) domname=$2; shift; shift;; + -type) typ=$2; shift; shift;; + -subtype) stype=$2; shift; shift;; -recover) recover=1; shift;; -help) ext_dev_migrate_usage; exit 0;; *) break;; |