virsh: Add dir type for listing volumes with vol-list

Fix of output of detailed volume list. BZ #727088
This commit is contained in:
Peter Krempa 2011-08-11 11:37:18 +02:00 committed by Eric Blake
parent 6c55124f37
commit 594f564c75
1 changed files with 13 additions and 4 deletions

View File

@ -8989,10 +8989,19 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
/* Convert the returned volume info into output strings */ /* Convert the returned volume info into output strings */
/* Volume type */ /* Volume type */
if (volumeInfo.type == VIR_STORAGE_VOL_FILE) switch (volumeInfo.type) {
volInfoTexts[i].type = vshStrdup(ctl, _("file")); case VIR_STORAGE_VOL_FILE:
else volInfoTexts[i].type = vshStrdup(ctl, _("file"));
volInfoTexts[i].type = vshStrdup(ctl, _("block")); break;
case VIR_STORAGE_VOL_BLOCK:
volInfoTexts[i].type = vshStrdup(ctl, _("block"));
break;
case VIR_STORAGE_VOL_DIR:
volInfoTexts[i].type = vshStrdup(ctl, _("dir"));
break;
default:
volInfoTexts[i].type = vshStrdup(ctl, _("unknown"));
}
/* Create the capacity output string */ /* Create the capacity output string */
val = prettyCapacity(volumeInfo.capacity, &unit); val = prettyCapacity(volumeInfo.capacity, &unit);