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