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] [xen-unstable] tools/hotplug: Do not recursively invoke

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/hotplug: Do not recursively invoke xenstore_write on error
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:34:58 -0800
Delivery-date: Thu, 23 Dec 2010 05:45:55 -0800
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Ian Campbell <ian.campbell@xxxxxxxxxx>
# Date 1292522280 0
# Node ID d461dd88ed2b1aa3210ec59992060e49ca1af48c
# Parent  1800f15da48a81d63635ceb6ca77dacbf50dc303
tools/hotplug: Do not recursively invoke xenstore_write on error

This fixes a possible infinite recursion.

From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/xen-hotplug-common.sh |   18 +++++++++++++-----
 1 files changed, 13 insertions(+), 5 deletions(-)

diff -r 1800f15da48a -r d461dd88ed2b tools/hotplug/Linux/xen-hotplug-common.sh
--- a/tools/hotplug/Linux/xen-hotplug-common.sh Thu Dec 16 17:39:24 2010 +0000
+++ b/tools/hotplug/Linux/xen-hotplug-common.sh Thu Dec 16 17:58:00 2010 +0000
@@ -29,8 +29,8 @@ unset $(set | grep ^LC_ | cut -d= -f1)
 unset $(set | grep ^LC_ | cut -d= -f1)
 
 fatal() {
-  xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
-                 "$XENBUS_PATH/hotplug-status" error
+  _xenstore_write "$XENBUS_PATH/hotplug-error" "$*" \
+                  "$XENBUS_PATH/hotplug-status" error
   log err "$@"
   exit 1
 }
@@ -80,15 +80,23 @@ xenstore_read_default() {
 
 
 ##
+# _xenstore_write (<path> <value>)+
+#
+# Write each of the key/value pairs to the store.
+#
+_xenstore_write() {
+  log debug "Writing $@ to xenstore."
+  xenstore-write "$@"
+}
+
+##
 # xenstore_write (<path> <value>)+
 #
 # Write each of the key/value pairs to the store, and exit this script if any
 # such writing fails.
 #
 xenstore_write() {
-  log debug "Writing $@ to xenstore."
-  xenstore-write "$@" || fatal "Writing $@ to xenstore failed."
+  _xenstore_write "$@" || fatal "Writing $@ to xenstore failed."
 }
 
-
 log debug "$@" "XENBUS_PATH=$XENBUS_PATH"

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools/hotplug: Do not recursively invoke xenstore_write on error, Xen patchbot-unstable <=