mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Add the monitor type to the domain state XML
There are no functional changes in this patch apart from adding the monitor type to the state XML. The patch mostly consists of switching to use virDomainChrDef every where to describe the monitor. * src/domain_conf.h: replace monitorpath with monitor_chr * src/domain_conf.c: handle parsing the monitor type and initializing monitor chr * src/qemu_conf.[ch]: make qemudBuildCommandLine take a virDomainChrDefPtr and use that to build the -monitor parameter * src/qemu_driver.c: split pty specific and common code from qemudOpenMonitor, have qemudStartVMDaemon() initialize monitor_chr * tests/qemuxml2argvtest.c: update for qemudBuildCommandLine() change
This commit is contained in:
@@ -34,6 +34,7 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
const char **tmp = NULL;
|
||||
int ret = -1, len, flags;
|
||||
virDomainDefPtr vmdef = NULL;
|
||||
virDomainChrDef monitor_chr;
|
||||
|
||||
if (virtTestLoadFile(cmd, &expectargv, MAX_FILE) < 0)
|
||||
goto fail;
|
||||
@@ -47,12 +48,15 @@ static int testCompareXMLToArgvFiles(const char *xml,
|
||||
else
|
||||
vmdef->id = -1;
|
||||
|
||||
monitor_chr.type = VIR_DOMAIN_CHR_TYPE_PTY;
|
||||
|
||||
flags = QEMUD_CMD_FLAG_VNC_COLON |
|
||||
QEMUD_CMD_FLAG_NO_REBOOT |
|
||||
extraFlags;
|
||||
|
||||
if (qemudBuildCommandLine(NULL, &driver,
|
||||
vmdef, flags, &argv, &qenv,
|
||||
vmdef, &monitor_chr, flags,
|
||||
&argv, &qenv,
|
||||
NULL, NULL, migrateFrom) < 0)
|
||||
goto fail;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user