[PATCH] virsh domiflist: change output

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When using "virsh domifstat" command or "virsh domiftune" command,
we pass an interface name as a parameter, so interface name is
important.

"virsh domiflist" output should display interface names 
on the first row. 


Signed-off-by: Taku Izumi <izumi.taku@xxxxxxxxxxxxxx>
---
 tools/virsh.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Index: libvirt.capability/tools/virsh.c
===================================================================
--- libvirt.capability.orig/tools/virsh.c
+++ libvirt.capability/tools/virsh.c
@@ -2034,8 +2034,8 @@ cmdDomiflist(vshControl *ctl, const vshC
     if (ninterfaces < 0)
         goto cleanup;
 
-    vshPrint(ctl, "%-10s %-10s %-10s %-11s %s\n", _("Type"), _("Source"),
-             _("Target"), _("Model"), _("MAC"));
+    vshPrint(ctl, "%-10s %-10s %-10s %-11s %s\n", _("Interface"), _("Type"),
+             _("Source"), _("Model"), _("MAC"));
     vshPrint(ctl, "-------------------------------------------------------\n");
 
     for (i = 0; i < ninterfaces; i++) {
@@ -2057,9 +2057,10 @@ cmdDomiflist(vshControl *ctl, const vshC
         model = virXPathString("string(./model/@type)", ctxt);
         mac = virXPathString("string(./mac/@address)", ctxt);
 
-        vshPrint(ctl, "%-10s %-10s %-10s %-11s %-10s\n", type,
-                 source ? source : "-",
+        vshPrint(ctl, "%-10s %-10s %-10s %-11s %-10s\n",
                  target ? target : "-",
+                 type,
+                 source ? source : "-",
                  model ? model : "-",
                  mac ? mac : "-");
 

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]