mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
qemu: Remove 'qemuBuildCommandLineFlags' and associated code
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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2464e5523c
commit
424dc5d2d2
@ -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,
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user