mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
Update QEMU JSON balloon command handling
The QEMU JSON monitor changed balloon commands to return/accept bytes instead of kilobytes. Update libvirt to cope with this * src/qemu/qemu_monitor_json.c: Expect/use bytes for ballooning
This commit is contained in:
parent
294adef356
commit
6fe15e357d
@ -723,14 +723,14 @@ int qemuMonitorJSONGetBalloonInfo(qemuMonitorPtr mon,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if (virJSONValueObjectGetNumberUlong(data, "balloon", &mem) < 0) {
|
||||
if (virJSONValueObjectGetNumberUlong(data, "actual", &mem) < 0) {
|
||||
qemuReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||
_("info balloon reply was missing balloon data"));
|
||||
ret = -1;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
*currmem = mem;
|
||||
*currmem = (mem/1024);
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
@ -885,7 +885,7 @@ int qemuMonitorJSONSetBalloon(qemuMonitorPtr mon,
|
||||
{
|
||||
int ret;
|
||||
virJSONValuePtr cmd = qemuMonitorJSONMakeCommand("balloon",
|
||||
"U:value", (unsigned long long)newmem,
|
||||
"U:value", ((unsigned long long)newmem)*1024,
|
||||
NULL);
|
||||
virJSONValuePtr reply = NULL;
|
||||
if (!cmd)
|
||||
|
Loading…
x
Reference in New Issue
Block a user