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>
---
tools/xenstat/libxenstat/src/xenstat.c | 12 ++----------
1 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/tools/xenstat/libxenstat/src/xenstat.c
b/tools/xenstat/libxenstat/src/xenstat.c
index 2791cc1..104655d 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -739,17 +739,9 @@ unsigned long long
xenstat_tmem_succ_pers_gets(xenstat_tmem *tmem)
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);
}
--
1.7.6.4
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|