提交 594f564c 编写于 作者: P Peter Krempa 提交者: Eric Blake

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

Fix of output of detailed volume list. BZ #727088
上级 6c55124f
......@@ -8989,10 +8989,19 @@ cmdVolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
/* Convert the returned volume info into output strings */
/* Volume type */
if (volumeInfo.type == VIR_STORAGE_VOL_FILE)
volInfoTexts[i].type = vshStrdup(ctl, _("file"));
else
volInfoTexts[i].type = vshStrdup(ctl, _("block"));
switch (volumeInfo.type) {
case VIR_STORAGE_VOL_FILE:
volInfoTexts[i].type = vshStrdup(ctl, _("file"));
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 */
val = prettyCapacity(volumeInfo.capacity, &unit);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册