From: Pascal Bouchareine Subject: [patch] external-device-migrate infinite loop Date: Tue, 2 Oct 2007 10:36:21 +0200 Message-ID: <20071002083621.GA42057@bar.gandi.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="IS0zKkzwUGydFO0o" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. Proposed patch fixes this, I'll be looking at the wrong call too. -- \o/ Pascal Bouchareine - Gandi g 0170393757 15, place de la Nation - 75011 Paris --IS0zKkzwUGydFO0o Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="external-device-migrate.patch" diff -r 0b04a48f65cc tools/examples/external-device-migrate --- a/tools/examples/external-device-migrate Wed Sep 26 17:11:07 2007 +0100 +++ b/tools/examples/external-device-migrate Tue Oct 2 10:28:45 2007 +0200 @@ -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;; --IS0zKkzwUGydFO0o Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --IS0zKkzwUGydFO0o--