mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh-secret: Unify list column alignment
Before: $ virsh secret-list UUID Usage ----------------------------------------------------------- 0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f volume /var/lib/libvirt/images/puppyname.img 0a81f5b2-8403-7b23-c8d6-2deadbeefd6f Unused After: $ virsh secret-list UUID Usage -------------------------------------------------------------------------------- 0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f volume /var/lib/libvirt/images/puppyname.img 0a81f5b2-8403-7b23-c8d6-2deadbeefd6f Unused
This commit is contained in:
parent
8cb426a25e
commit
8d7800a554
@ -532,8 +532,9 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
if (!(list = vshSecretListCollect(ctl, flags)))
|
if (!(list = vshSecretListCollect(ctl, flags)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
vshPrintExtra(ctl, "%-36s %s\n", _("UUID"), _("Usage"));
|
vshPrintExtra(ctl, " %-36s %s\n", _("UUID"), _("Usage"));
|
||||||
vshPrintExtra(ctl, "-----------------------------------------------------------\n");
|
vshPrintExtra(ctl, "----------------------------------------"
|
||||||
|
"----------------------------------------\n");
|
||||||
|
|
||||||
for (i = 0; i < list->nsecrets; i++) {
|
for (i = 0; i < list->nsecrets; i++) {
|
||||||
virSecretPtr sec = list->secrets[i];
|
virSecretPtr sec = list->secrets[i];
|
||||||
@ -547,11 +548,11 @@ cmdSecretList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (usageType) {
|
if (usageType) {
|
||||||
vshPrint(ctl, "%-36s %s %s\n",
|
vshPrint(ctl, " %-36s %s %s\n",
|
||||||
uuid, usageStr,
|
uuid, usageStr,
|
||||||
virSecretGetUsageID(sec));
|
virSecretGetUsageID(sec));
|
||||||
} else {
|
} else {
|
||||||
vshPrint(ctl, "%-36s %s\n",
|
vshPrint(ctl, " %-36s %s\n",
|
||||||
uuid, _("Unused"));
|
uuid, _("Unused"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user