提交 268b4c84 编写于 作者: A Alexander Burluka 提交者: Ján Tomko

Parallels: fix error with video card RAM dimension

Libvirt measures vram in Kbytes, not in bytes, so calculation
of Mbytes was incorrect. PCS server can take vram argument
with units, so I added K postfix to make params a little bit clearer.
上级 75210ef0
......@@ -1628,13 +1628,13 @@ parallelsApplyVideoParams(parallelsDomObjPtr pdom,
}
if (old->vram != new->vram) {
if (new->vram % (1 << 20) != 0) {
if (new->vram % (1 << 10) != 0) {
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("Video RAM size should be multiple of 1Mb."));
return -1;
}
snprintf(str_vram, 31, "%d", new->vram >> 20);
snprintf(str_vram, 31, "%dK", new->vram);
str_vram[31] = '\0';
if (parallelsCmdRun(PRLCTL, "set", pdom->uuid,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
反馈
建议
客服 返回
顶部