mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
qemu: always add -nodefaults
Since we always asumme support of QEMU_CAPS_DEVICE.
This commit is contained in:
parent
4bc8543401
commit
0586cf9800
@ -4213,13 +4213,8 @@ qemuBuildVideoCommandLine(virCommandPtr cmd,
|
|||||||
size_t i;
|
size_t i;
|
||||||
int primaryVideoType;
|
int primaryVideoType;
|
||||||
|
|
||||||
if (!def->nvideos) {
|
if (!def->videos)
|
||||||
/* If we have -device, then we set -nodefaults already */
|
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE) &&
|
|
||||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_NONE))
|
|
||||||
virCommandAddArgList(cmd, "-vga", "none", NULL);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
primaryVideoType = def->videos[0]->type;
|
primaryVideoType = def->videos[0]->type;
|
||||||
|
|
||||||
@ -8223,11 +8218,7 @@ qemuBuildNetCommandLine(virCommandPtr cmd,
|
|||||||
int last_good_net = -1;
|
int last_good_net = -1;
|
||||||
virErrorPtr originalError = NULL;
|
virErrorPtr originalError = NULL;
|
||||||
|
|
||||||
if (!def->nnets) {
|
if (def->nnets) {
|
||||||
/* If we have -device, then we set -nodefault already */
|
|
||||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
|
|
||||||
virCommandAddArgList(cmd, "-net", "none", NULL);
|
|
||||||
} else {
|
|
||||||
unsigned int bootNet = 0;
|
unsigned int bootNet = 0;
|
||||||
|
|
||||||
if (emitBootindex) {
|
if (emitBootindex) {
|
||||||
@ -8545,7 +8536,6 @@ qemuBuildSerialCommandLine(virLogManagerPtr logManager,
|
|||||||
virQEMUCapsPtr qemuCaps)
|
virQEMUCapsPtr qemuCaps)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
int actualSerials = 0;
|
|
||||||
bool havespice = false;
|
bool havespice = false;
|
||||||
|
|
||||||
if (def->nserials) {
|
if (def->nserials) {
|
||||||
@ -8582,13 +8572,8 @@ qemuBuildSerialCommandLine(virLogManagerPtr logManager,
|
|||||||
virCommandAddArg(cmd, devstr);
|
virCommandAddArg(cmd, devstr);
|
||||||
VIR_FREE(devstr);
|
VIR_FREE(devstr);
|
||||||
}
|
}
|
||||||
actualSerials++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If we have -device, then we set -nodefaults already */
|
|
||||||
if (!actualSerials && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
|
|
||||||
virCommandAddArgList(cmd, "-serial", "none", NULL);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -8601,10 +8586,6 @@ qemuBuildParallelsCommandLine(virLogManagerPtr logManager,
|
|||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
/* If we have -device, then we set -nodefaults already */
|
|
||||||
if (!def->nparallels && !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE))
|
|
||||||
virCommandAddArgList(cmd, "-parallel", "none", NULL);
|
|
||||||
|
|
||||||
for (i = 0; i < def->nparallels; i++) {
|
for (i = 0; i < def->nparallels; i++) {
|
||||||
virDomainChrDefPtr parallel = def->parallels[i];
|
virDomainChrDefPtr parallel = def->parallels[i];
|
||||||
char *devstr;
|
char *devstr;
|
||||||
@ -9477,14 +9458,12 @@ qemuBuildCommandLine(virQEMUDriverPtr driver,
|
|||||||
virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
|
virCommandAddEnvString(cmd, "QEMU_AUDIO_DRV=none");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
|
|
||||||
/* Disable global config files and default devices */
|
/* Disable global config files and default devices */
|
||||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_USER_CONFIG))
|
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_USER_CONFIG))
|
||||||
virCommandAddArg(cmd, "-no-user-config");
|
virCommandAddArg(cmd, "-no-user-config");
|
||||||
else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NODEFCONFIG))
|
else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NODEFCONFIG))
|
||||||
virCommandAddArg(cmd, "-nodefconfig");
|
virCommandAddArg(cmd, "-nodefconfig");
|
||||||
virCommandAddArg(cmd, "-nodefaults");
|
virCommandAddArg(cmd, "-nodefaults");
|
||||||
}
|
|
||||||
|
|
||||||
if (qemuBuildSgaCommandLine(cmd, def, qemuCaps) < 0)
|
if (qemuBuildSgaCommandLine(cmd, def, qemuCaps) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user