mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05:00
qemuMonitorDumpToFd: Drop 'detach' argument
The only caller always passes 'true'. We also don't want to ever use the blocking variant as it blocks the whole monitor until dump finishes. Hardcode it to 'true' in the monitor code. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
@@ -3045,7 +3045,7 @@ qemuDumpToFd(virQEMUDriver *driver,
|
||||
}
|
||||
}
|
||||
|
||||
rc = qemuMonitorDumpToFd(priv->mon, fd, dumpformat, true);
|
||||
rc = qemuMonitorDumpToFd(priv->mon, fd, dumpformat);
|
||||
|
||||
qemuDomainObjExitMonitor(vm);
|
||||
if (rc < 0)
|
||||
|
||||
@@ -2362,8 +2362,7 @@ qemuMonitorGetDumpGuestMemoryCapability(qemuMonitor *mon,
|
||||
int
|
||||
qemuMonitorDumpToFd(qemuMonitor *mon,
|
||||
int fd,
|
||||
const char *dumpformat,
|
||||
bool detach)
|
||||
const char *dumpformat)
|
||||
{
|
||||
int ret;
|
||||
VIR_DEBUG("fd=%d dumpformat=%s", fd, dumpformat);
|
||||
@@ -2373,7 +2372,7 @@ qemuMonitorDumpToFd(qemuMonitor *mon,
|
||||
if (qemuMonitorSendFileHandle(mon, "dump", fd) < 0)
|
||||
return -1;
|
||||
|
||||
ret = qemuMonitorJSONDump(mon, "fd:dump", dumpformat, detach);
|
||||
ret = qemuMonitorJSONDump(mon, "fd:dump", dumpformat);
|
||||
|
||||
if (ret < 0) {
|
||||
if (qemuMonitorCloseFileHandle(mon, "dump") < 0)
|
||||
|
||||
@@ -893,8 +893,7 @@ int qemuMonitorQueryDump(qemuMonitor *mon,
|
||||
|
||||
int qemuMonitorDumpToFd(qemuMonitor *mon,
|
||||
int fd,
|
||||
const char *dumpformat,
|
||||
bool detach);
|
||||
const char *dumpformat);
|
||||
|
||||
int qemuMonitorGraphicsRelocate(qemuMonitor *mon,
|
||||
int type,
|
||||
|
||||
@@ -3371,8 +3371,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon,
|
||||
int
|
||||
qemuMonitorJSONDump(qemuMonitor *mon,
|
||||
const char *protocol,
|
||||
const char *dumpformat,
|
||||
bool detach)
|
||||
const char *dumpformat)
|
||||
{
|
||||
g_autoptr(virJSONValue) cmd = NULL;
|
||||
g_autoptr(virJSONValue) reply = NULL;
|
||||
@@ -3381,7 +3380,7 @@ qemuMonitorJSONDump(qemuMonitor *mon,
|
||||
"b:paging", false,
|
||||
"s:protocol", protocol,
|
||||
"S:format", dumpformat,
|
||||
"B:detach", detach,
|
||||
"b:detach", true,
|
||||
NULL);
|
||||
if (!cmd)
|
||||
return -1;
|
||||
|
||||
@@ -193,8 +193,7 @@ qemuMonitorJSONGetDumpGuestMemoryCapability(qemuMonitor *mon,
|
||||
int
|
||||
qemuMonitorJSONDump(qemuMonitor *mon,
|
||||
const char *protocol,
|
||||
const char *dumpformat,
|
||||
bool detach);
|
||||
const char *dumpformat);
|
||||
|
||||
int
|
||||
qemuMonitorJSONGraphicsRelocate(qemuMonitor *mon,
|
||||
|
||||
@@ -1149,8 +1149,7 @@ GEN_TEST_FUNC(qemuMonitorJSONSaveVirtualMemory, 0, 1024, "/foo/bar")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONSavePhysicalMemory, 0, 1024, "/foo/bar")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONMigrate, 0, "tcp:localhost:12345")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONMigrateRecover, "tcp://destination.host:54321");
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf",
|
||||
true)
|
||||
GEN_TEST_FUNC(qemuMonitorJSONDump, "dummy_protocol", "elf")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONGraphicsRelocate, VIR_DOMAIN_GRAPHICS_TYPE_SPICE,
|
||||
"localhost", 12345, 12346, "certsubjectval")
|
||||
GEN_TEST_FUNC(qemuMonitorJSONRemoveNetdev, "net0")
|
||||
|
||||
Reference in New Issue
Block a user