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-changelog

[Xen-changelog] [xen-unstable] Do not display -1 as the domid when a VM

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Do not display -1 as the domid when a VM is not running -- simply leave the
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Nov 2006 15:20:13 +0000
Delivery-date: Tue, 28 Nov 2006 07:19:48 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Node ID 723dbe1fc75199e9b6dfad64c7a8790b1d75cfd1
# Parent  4cd39f7f090dc6603f042ca7a43d8f55a81617b8
Do not display -1 as the domid when a VM is not running -- simply leave the
column blank.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>
---
 tools/python/xen/xm/main.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 4cd39f7f090d -r 723dbe1fc751 tools/python/xen/xm/main.py
--- a/tools/python/xen/xm/main.py       Tue Nov 28 12:24:24 2006 +0000
+++ b/tools/python/xen/xm/main.py       Tue Nov 28 13:32:07 2006 +0000
@@ -564,7 +564,7 @@ def parse_doms_info(info):
         return DOM_STATES[t(sxp.child_value(info, n, d))]
     
     return {
-        'domid'    : get_info('domid',        int,   -1),
+        'domid'    : get_info('domid',        str,   ''),
         'name'     : get_info('name',         str,   '??'),
         'mem'      : get_info('memory_dynamic_max', int,   0),
         'vcpus'    : get_info('online_vcpus', int,   0),
@@ -580,7 +580,7 @@ def parse_sedf_info(info):
         return t(sxp.child_value(info, n, d))
 
     return {
-        'domid'    : get_info('domid',        int,   -1),
+        'domid'    : get_info('domid',         int,   -1),
         'period'   : get_info('period',        int,   -1),
         'slice'    : get_info('slice',         int,   -1),
         'latency'  : get_info('latency',       int,   -1),
@@ -592,7 +592,7 @@ def xm_brief_list(doms):
     print '%-40s %3s %5s %5s %10s %9s' % \
           ('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)')
     
-    format = "%(name)-40s %(domid)3d %(mem)5d %(vcpus)5d %(state)10s " \
+    format = "%(name)-40s %(domid)3s %(mem)5d %(vcpus)5d %(state)10s " \
              "%(cpu_time)8.1f"
     
     for dom in doms:
@@ -604,7 +604,7 @@ def xm_label_list(doms):
           ('Name', 'ID', 'Mem', 'VCPUs', 'State', 'Time(s)', 'Label')
     
     output = []
-    format = '%(name)-32s %(domid)3d %(mem)5d %(vcpus)5d %(state)10s ' \
+    format = '%(name)-32s %(domid)3s %(mem)5d %(vcpus)5d %(state)10s ' \
              '%(cpu_time)8.1f %(seclabel)9s'
     
     for dom in doms:

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Do not display -1 as the domid when a VM is not running -- simply leave the, Xen patchbot-unstable <=