WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix for Solaris compile/output for VBDs in xentop

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix for Solaris compile/output for VBDs in xentop
From: john.levon@xxxxxxx
Date: Mon, 26 Feb 2007 15:56:07 -0700
Delivery-date: Mon, 26 Feb 2007 15:55:36 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix for Solaris compile/output for VBDs in xentop, john . levon <=