mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virsh-interface: Unify list column alignment
Before: $ virsh iface-list Name State MAC Address -------------------------------------------- br0 active f0🇩🇪f1:dc:b8:b0 virbr2 active 52:54:00:61:78:0c After: $ virsh iface-list Name State MAC Address --------------------------------------------------- br0 active f0🇩🇪f1:dc:b8:b0 virbr2 active 52:54:00:61:78:0c
This commit is contained in:
parent
75fe29e27d
commit
8cb426a25e
@ -360,14 +360,14 @@ cmdInterfaceList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
if (!(list = vshInterfaceListCollect(ctl, flags)))
|
if (!(list = vshInterfaceListCollect(ctl, flags)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
vshPrintExtra(ctl, "%-20s %-10s %s\n", _("Name"), _("State"),
|
vshPrintExtra(ctl, " %-20s %-10s %s\n", _("Name"), _("State"),
|
||||||
_("MAC Address"));
|
_("MAC Address"));
|
||||||
vshPrintExtra(ctl, "--------------------------------------------\n");
|
vshPrintExtra(ctl, "---------------------------------------------------\n");
|
||||||
|
|
||||||
for (i = 0; i < list->nifaces; i++) {
|
for (i = 0; i < list->nifaces; i++) {
|
||||||
virInterfacePtr iface = list->ifaces[i];
|
virInterfacePtr iface = list->ifaces[i];
|
||||||
|
|
||||||
vshPrint(ctl, "%-20s %-10s %s\n",
|
vshPrint(ctl, " %-20s %-10s %s\n",
|
||||||
virInterfaceGetName(iface),
|
virInterfaceGetName(iface),
|
||||||
virInterfaceIsActive(iface) ? _("active") : _("inactive"),
|
virInterfaceIsActive(iface) ? _("active") : _("inactive"),
|
||||||
virInterfaceGetMACString(iface));
|
virInterfaceGetMACString(iface));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user