Skip to contentSkip to conversation

Fix a form of xm block-list

PATCH New Masaki Kanno 1 participant 1 message Jun 5, 2008

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix a form of xm block-list

Hi,

The digit of Vdev is up to five.
This patch fixes a form of xm block-list.

Before:

 # xm block-list vm1
 Vdev  BE handle state evt-ch ring-ref BE-path
 51713    0    0     4      6      8     /local/domain/0/backend/tap/1/51713
 5632    0    0     3      7      9     /local/domain/0/backend/vbd/1/5632
 # xm block-list vm2
 Vdev  BE handle state evt-ch ring-ref BE-path
 769    0    0     4      6      8     /local/domain/0/backend/vbd/2/769
 5632    0    0     3      7      9     /local/domain/0/backend/vbd/2/5632

After:

 # xm block-list vm1
 Vdev  BE handle state evt-ch ring-ref BE-path
 51713  0    0     4      6      8     /local/domain/0/backend/tap/1/51713
 5632   0    0     3      7      9     /local/domain/0/backend/vbd/1/5632
 # xm block-list vm2
 Vdev  BE handle state evt-ch ring-ref BE-path
 769    0    0     4      6      8     /local/domain/0/backend/vbd/2/769
 5632   0    0     3      7      9     /local/domain/0/backend/vbd/2/5632

Best regards,
Kan

tools/python/xen/xm/main.py +1 -1
diff -r fe60bf79d96f tools/python/xen/xm/main.py
@@ -2037,7 +2037,7 @@
                 hdr = 1
             ni = parse_dev_info(x[1])
             ni['idx'] = int(x[0])
-            print ("%(idx)-3d    "
+            print ("%(idx)-5d  "
                    "%(backend-id)-3d  "
                    "%(handle)-3d   "
                    "%(state)-3d    "

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel