The -netdev formatter code switched to a real virQEMUCaps flag so we can remove the old flags which used to enable JSON for -netdev for validation purposes. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_command.h | 4 ---- src/qemu/qemu_driver.c | 2 +- src/qemu/qemu_process.c | 10 ++-------- src/qemu/qemu_process.h | 3 +-- tests/qemuxml2argvtest.c | 11 ++++------- 5 files changed, 8 insertions(+), 22 deletions(-) diff --git a/src/qemu/qemu_command.h b/src/qemu/qemu_command.h index 6b8f90f737..00efcfd5fd 100644 --- a/src/qemu/qemu_command.h +++ b/src/qemu/qemu_command.h @@ -43,10 +43,6 @@ VIR_ENUM_DECL(qemuVideo); VIR_ENUM_DECL(qemuSoundCodec); -typedef enum { - QEMU_BUILD_COMMANDLINE_VALIDATE_KEEP_JSON = 1 << 0, -} qemuBuildCommandLineFlags; - virCommand *qemuBuildCommandLine(virQEMUDriver *driver, virLogManager *logManager, virSecurityManager *secManager, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 760d30a867..e0a3b4d978 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -6423,7 +6423,7 @@ static char *qemuConnectDomainXMLToNative(virConnectPtr conn, goto cleanup; if (!(cmd = qemuProcessCreatePretendCmdBuild(driver, vm, NULL, - qemuCheckFips(vm), true, false))) + qemuCheckFips(vm), true))) goto cleanup; ret = virCommandToString(cmd, false); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1d0165af6d..9faaeeadba 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -7756,14 +7756,8 @@ qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver, virDomainObj *vm, const char *migrateURI, bool enableFips, - bool standalone, - bool jsonPropsValidation) + bool standalone) { - unsigned int buildflags = 0; - - if (jsonPropsValidation) - buildflags = QEMU_BUILD_COMMANDLINE_VALIDATE_KEEP_JSON; - VIR_DEBUG("Building emulator command line"); return qemuBuildCommandLine(driver, NULL, @@ -7776,7 +7770,7 @@ qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver, enableFips, NULL, NULL, - buildflags); + 0); } diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h index f9fa140e6d..c0f1c85aab 100644 --- a/src/qemu/qemu_process.h +++ b/src/qemu/qemu_process.h @@ -105,8 +105,7 @@ virCommand *qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver, virDomainObj *vm, const char *migrateURI, bool enableFips, - bool standalone, - bool jsonPropsValidation); + bool standalone); int qemuProcessInit(virQEMUDriver *driver, virDomainObj *vm, diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 2190e03d18..7c6e3d3dd7 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -386,8 +386,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, virDomainObj *vm, const char *migrateURI, struct testQemuInfo *info, - unsigned int flags, - bool jsonPropsValidation) + unsigned int flags) { qemuDomainObjPrivate *priv = vm->privateData; bool enableFips = !!(flags & FLAG_FIPS_HOST); @@ -484,8 +483,7 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv, enableFips = false; return qemuProcessCreatePretendCmdBuild(drv, vm, migrateURI, - enableFips, false, - jsonPropsValidation); + enableFips, false); } @@ -538,8 +536,7 @@ testCompareXMLToArgvValidateSchema(virQEMUDriver *drv, if (virBitmapParse("0-3", &priv->autoNodeset, 4) < 0) return -1; - if (!(cmd = testCompareXMLToArgvCreateArgs(drv, vm, migrateURI, info, flags, - true))) + if (!(cmd = testCompareXMLToArgvCreateArgs(drv, vm, migrateURI, info, flags))) return -1; if (virCommandGetArgList(cmd, &args, &nargs) < 0) @@ -743,7 +740,7 @@ testCompareXMLToArgv(const void *data) virResetLastError(); if (!(cmd = testCompareXMLToArgvCreateArgs(&driver, vm, migrateURI, info, - flags, false))) { + flags))) { err = virGetLastError(); if (!err) { VIR_TEST_DEBUG("no error was reported for expected failure"); -- 2.31.1