ia64/xen-unstable

changeset 14166:69dec539c19f

Fix for Solaris compile/output for VBDs in xentop.
Signed-off-by: John Levon <john.levon@sun.com>
author kfraser@localhost.localdomain
date Tue Feb 27 16:13:08 2007 +0000 (2007-02-27)
parents e506c3fd03c9
children d4cd2c70cdea
files tools/xenstat/xentop/xentop.c
line diff
     1.1 --- a/tools/xenstat/xentop/xentop.c	Tue Feb 27 15:40:37 2007 +0000
     1.2 +++ b/tools/xenstat/xentop/xentop.c	Tue Feb 27 16:13:08 2007 +0000
     1.3 @@ -916,11 +916,19 @@ void do_vbd(xenstat_domain *domain)
     1.4  	num_vbds = xenstat_domain_num_vbds(domain);
     1.5  
     1.6  	for (i=0 ; i< num_vbds; i++) {
     1.7 +		char details[20];
     1.8 +
     1.9  		vbd = xenstat_domain_vbd(domain,i);
    1.10 -				
    1.11 -		print("VBD %4d [%2x:%2x]  OO: %8llu   RD: %8llu   WR: %8llu\n",
    1.12 -		      xenstat_vbd_dev(vbd),
    1.13 -		      MAJOR(xenstat_vbd_dev(vbd)), MINOR(xenstat_vbd_dev(vbd)),
    1.14 +
    1.15 +#ifdef __sun__
    1.16 +		details[0] = '\0';
    1.17 +#else
    1.18 +		snprintf(details, 20, "[%2x:%2x] ", MAJOR(xenstat_vbd_dev(vbd)),
    1.19 +		         MINOR(xenstat_vbd_dev(vbd)));
    1.20 +#endif
    1.21 +
    1.22 +		print("VBD %4d %s OO: %8llu   RD: %8llu   WR: %8llu\n",
    1.23 +		      xenstat_vbd_dev(vbd), details,
    1.24  		      xenstat_vbd_oo_reqs(vbd),
    1.25  		      xenstat_vbd_rd_reqs(vbd),
    1.26  		      xenstat_vbd_wr_reqs(vbd));