Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

[Xen-devel] Mind resizing xentop's domain name field? (and the null-dom0

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Mind resizing xentop's domain name field? (and the null-dom0-name thing)
From: Charles Duffy <cduffy@xxxxxxxxxxx>
Date: Tue, 29 Nov 2005 11:57:07 -0600
Delivery-date: Tue, 29 Nov 2005 18:11:03 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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
User-agent: Mozilla Thunderbird 1.0.6 (X11/20050716)
I have several domains with names in the region of 15 characters, making xentop's display less-than-readable. While code to dynamically resize the column to fit as appropriate would perhaps be ideal, this quick-and-dirty patch just changes the default from 10 to 15.

BTW, it still displays no name for my dom0 (presumably still getting a null return value from that call?) but no longer segfaults. "xm list", by contrast, correctly displays the name as "Domain-0".


diff -r 995e94c4802e tools/xenstat/xentop/xentop.c
--- a/tools/xenstat/xentop/xentop.c     Fri Nov 11 18:11:13 2005
+++ b/tools/xenstat/xentop/xentop.c     Tue Nov 29 11:45:37 2005
@@ -128,7 +128,7 @@
 } field;

 field fields[] = {
-       { FIELD_NAME,    "NAME",      10, compare_name,    print_name    },
+       { FIELD_NAME,    "NAME",      15, compare_name,    print_name    },
        { FIELD_STATE,   "STATE",      6, compare_state,   print_state   },
        { FIELD_CPU,     "CPU(sec)",  10, compare_cpu,     print_cpu     },
        { FIELD_CPU_PCT, "CPU(%)",     6, compare_cpu_pct, print_cpu_pct },
@@ -354,7 +354,7 @@
 /* Prints domain name */
 void print_name(xenstat_domain *domain)
 {
-       print("%10s", xenstat_domain_name(domain));
+       print("%15s", xenstat_domain_name(domain));
 }

 struct {


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Mind resizing xentop's domain name field? (and the null-dom0-name thing), Charles Duffy <=