]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh domiflist: change output
authorTaku Izumi <izumi.taku@jp.fujitsu.com>
Fri, 13 Jan 2012 10:41:52 +0000 (19:41 +0900)
committerEric Blake <eblake@redhat.com>
Fri, 13 Jan 2012 15:16:17 +0000 (08:16 -0700)
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@jp.fujitsu.com>
tools/virsh.c

index f2235930bd8c1e93ff12436298fd65aa7d86536d..c511e2a6a47dcaef737168594d90f8bb394c140f 100644 (file)
@@ -2060,8 +2060,8 @@ cmdDomiflist(vshControl *ctl, const vshCmd *cmd)
     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++) {
@@ -2083,9 +2083,10 @@ cmdDomiflist(vshControl *ctl, const vshCmd *cmd)
         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 : "-");