# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1172592788 0
# Node ID 69dec539c19f31c81e27cb16bad0a91e19eca39f
# Parent e506c3fd03c9f2e9e264c89b6c58517d6f867a47
Fix for Solaris compile/output for VBDs in xentop.
Signed-off-by: John Levon <john.levon@xxxxxxx>
---
tools/xenstat/xentop/xentop.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
diff -r e506c3fd03c9 -r 69dec539c19f tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c Tue Feb 27 15:40:37 2007 +0000
+++ b/tools/xenstat/xentop/xentop.c Tue Feb 27 16:13:08 2007 +0000
@@ -916,11 +916,19 @@ void do_vbd(xenstat_domain *domain)
num_vbds = xenstat_domain_num_vbds(domain);
for (i=0 ; i< num_vbds; i++) {
+ char details[20];
+
vbd = xenstat_domain_vbd(domain,i);
-
- print("VBD %4d [%2x:%2x] OO: %8llu RD: %8llu WR: %8llu\n",
- xenstat_vbd_dev(vbd),
- MAJOR(xenstat_vbd_dev(vbd)), MINOR(xenstat_vbd_dev(vbd)),
+
+#ifdef __sun__
+ details[0] = '\0';
+#else
+ snprintf(details, 20, "[%2x:%2x] ", MAJOR(xenstat_vbd_dev(vbd)),
+ MINOR(xenstat_vbd_dev(vbd)));
+#endif
+
+ print("VBD %4d %s OO: %8llu RD: %8llu WR: %8llu\n",
+ xenstat_vbd_dev(vbd), details,
xenstat_vbd_oo_reqs(vbd),
xenstat_vbd_rd_reqs(vbd),
xenstat_vbd_wr_reqs(vbd));
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|