提交 0f88c7c1 编写于 作者: T Taku Izumi 提交者: Eric Blake

virsh domiflist: change output

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: NTaku Izumi <izumi.taku@jp.fujitsu.com>
上级 ed6bd4bc
......@@ -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 : "-");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册