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] This fixes a small race between when a domain is created

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] This fixes a small race between when a domain is created and when xentop
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 Nov 2005 12:30:08 +0000
Delivery-date: Thu, 24 Nov 2005 12:30:31 +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 kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e1728d3c18ca63ccc29b599caf24997cb93cf191
# Parent  9c631c4fe727d9148b7feecafe94df5b8439cea7
This fixes a small race between when a domain is created and when xentop
tries to read it's info from the xenstore. Instead of sending a NULL
pointer for the name the name will be displayed as a ' ' until the next
refresh where xentop will then properly display the name. 

Signed-off-by: Jerone Young <jyoung5@xxxxxxxxxx>
Signed-off-by: Anthony Liguori <aliguori@xxxxxxxxxx>

diff -r 9c631c4fe727 -r e1728d3c18ca tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Thu Nov 24 10:10:43 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Thu Nov 24 10:17:20 2005
@@ -702,19 +702,12 @@
 {
        char path[80];
        char *name;
-       struct xs_transaction_handle *xstranshandle;
 
        snprintf(path, sizeof(path),"/local/domain/%i/name", domain_id);
        
-       xstranshandle = xs_transaction_start(handle->xshandle);
-       if (xstranshandle == NULL) {
-               perror("Unable to get transcation handle from xenstore\n");
-               exit(1); /* Change this */
-       }
-
-       name = (char *) xs_read(handle->xshandle, xstranshandle, path, NULL);
-       
-       xs_transaction_end(handle->xshandle, xstranshandle, false);
+       name = xs_read(handle->xshandle, NULL, path, NULL);
+       if (name == NULL)
+               name = strdup(" ");
 
        return name;
 }      

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] This fixes a small race between when a domain is created and when xentop, Xen patchbot -unstable <=