# HG changeset patch
# User john.levon@xxxxxxx
# Date 1172534164 28800
# Node ID 37fce3c0c10baee370ecc39b6a50fed8b232bd69
# Parent 4998793aa87729fbe8a582faa3a22c9ecfefe13c
Fix for Solaris compile/output for VBDs in xentop.
Signed-off-by: John Levon <john.levon@xxxxxxx>
diff --git a/tools/xenstat/xentop/xentop.c b/tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c
+++ b/tools/xenstat/xentop/xentop.c
@@ -918,11 +918,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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|