WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Use test ([) instead of expr to compare integers.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Use test ([) instead of expr to compare integers.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 04 Dec 2005 02:50:06 +0000
Delivery-date: Sun, 04 Dec 2005 02:50:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User cl349@xxxxxxxxxxxxxxxxxxxx
# Node ID 9b842cdbe0de02c1cc1dccfda8cb772168a499f7
# Parent  bbef89ec44b86b87cd0f108bf5d15a6e2b6562e7
Use test ([) instead of expr to compare integers.
expr $int1 '<' $int2 seems to be broken on some shells.
Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>

diff -r bbef89ec44b8 -r 9b842cdbe0de tools/examples/xen-hotplug-common.sh
--- a/tools/examples/xen-hotplug-common.sh      Sat Dec  3 20:53:01 2005
+++ b/tools/examples/xen-hotplug-common.sh      Sat Dec  3 23:49:51 2005
@@ -119,7 +119,7 @@
   local owner=$(_lock_owner "$lockdir")
   local retries=0
 
-  while expr $retries '<' $LOCK_RETRIES
+  while [ $retries -lt $LOCK_RETRIES ]
   do
     mkdir "$lockdir" && trap "release_lock $1; sigerr" ERR &&
       _update_lock_info "$lockdir" && return
@@ -131,7 +131,7 @@
       retries=0
     fi
 
-    if expr $retries '>' $LOCK_SPINNING_RETRIES
+    if [ $retries -gt $LOCK_SPINNING_RETRIES ]
     then
       sleep $LOCK_SLEEPTIME
     else

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Use test ([) instead of expr to compare integers., Xen patchbot -unstable <=