[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] xenstat: Use local domain names
# HG changeset patch # User Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> # Date 1331653242 0 # Node ID e0d02f48a6123a137b8d9c91bbaa3d1963064b7f # Parent 83ae523c96b45f6a6a32c518b2f320563dc17ea1 xenstat: Use local domain names The domain name stored in /local/domain/$domid/name is simpler to access and is the only domain name modified by "xl rename". Use this domain name in libxenstat's reporting. Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- diff -r 83ae523c96b4 -r e0d02f48a612 tools/xenstat/libxenstat/src/xenstat.c --- a/tools/xenstat/libxenstat/src/xenstat.c Tue Mar 13 15:36:58 2012 +0000 +++ b/tools/xenstat/libxenstat/src/xenstat.c Tue Mar 13 15:40:42 2012 +0000 @@ -739,17 +739,9 @@ static char *xenstat_get_domain_name(xenstat_handle *handle, unsigned int domain_id) { - char path[80], *vmpath; + char path[80]; - snprintf(path, sizeof(path),"/local/domain/%i/vm", domain_id); - - vmpath = xs_read(handle->xshandle, XBT_NULL, path, NULL); - - if (vmpath == NULL) - return NULL; - - snprintf(path, sizeof(path),"%s/name", vmpath); - free(vmpath); + snprintf(path, sizeof(path),"/local/domain/%i/name", domain_id); return xs_read(handle->xshandle, XBT_NULL, path, NULL); } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |