aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstat
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-08-07 09:06:38 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-08-07 09:06:38 +0100
commitd1b295913fee1b6c7aaaf7ac8a26b085e0c854f0 (patch)
treea4040b61c76690163370bc14d81dc8b5343486ca /tools/xenstat
parent7b448e13e0f816fab36a5a9f46a12fce3d585de8 (diff)
downloadxen-d1b295913fee1b6c7aaaf7ac8a26b085e0c854f0.tar.gz
xen-d1b295913fee1b6c7aaaf7ac8a26b085e0c854f0.tar.bz2
xen-d1b295913fee1b6c7aaaf7ac8a26b085e0c854f0.zip
xentop: fix abnormal value cpu(%) when domain shutdown.
If we test multiple domain create/shutdown many times. sometimes abnormal values of cpu(%) are appeared. This is because shutdown domain remove failure. (in other words, memory corruption of struct ) This corruption makes abnormal cpu(%) values are shown xentop sometimes. Signed-off-by: Atsushi SAKAI <sakaia@jp.fujitsu.com>
Diffstat (limited to 'tools/xenstat')
-rw-r--r--tools/xenstat/libxenstat/src/xenstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/xenstat/libxenstat/src/xenstat.c b/tools/xenstat/libxenstat/src/xenstat.c
index a109960c41..461806ec7d 100644
--- a/tools/xenstat/libxenstat/src/xenstat.c
+++ b/tools/xenstat/libxenstat/src/xenstat.c
@@ -677,7 +677,7 @@ static void xenstat_prune_domain(xenstat_node *node, unsigned int entry)
/* shift entries following specified entry up by one */
if (entry < node->num_domains) {
xenstat_domain *domain = &node->domains[entry];
- memmove(domain,domain+1,node->num_domains-entry);
+ memmove(domain,domain+1,(node->num_domains - entry) * sizeof(xenstat_domain) );
}
/* zero out original last entry from node -- not