[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [OSSTEST PATCH 17/29] Planner: ms-queuedaemon: Break out chan-plan-info



Also, refactor the space separator handling to use a list and `join'
(since we are going to maybe have desc be "").

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
v2: New patch
---
 ms-queuedaemon |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/ms-queuedaemon b/ms-queuedaemon
index 18d703e..72e22d0 100755
--- a/ms-queuedaemon
+++ b/ms-queuedaemon
@@ -375,14 +375,20 @@ proc cmd/get-last-plan {chan desc w} {
     return-plan-to-client $chan $w.final
 }
 
+proc chan-plan-info {chan desc} {
+    set l {}
+    lappend l [chan-get-info $chan {"$info(preinfo)"} ""]
+    lappend l [chan-get-info $chan {"job $info(job)"} $desc]
+    return [join $l " "]
+}
+
 proc cmd/book-resources {chan desc bytes} {
     read-chan-data $chan $bytes do-book-resources
 }
 proc do-book-resources {chan desc data} {
     global plan errorInfo
     set w [check-we-are-thinking $chan]
-    set info [chan-get-info $chan {"$info(preinfo) "} ""]
-    append info [chan-get-info $chan {"job $info(job)"} $desc]
+    set info [chan-plan-info $plan $desc]
     if {[catch {
        exec ./ms-planner -w$w book-resources $info << $data
     } emsg]} {
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.