qemuBuildCommandLine: Sanitize debug logging

Improve the debug log inside 'qemuBuildCommandLine' to include the name
from the definition and remove useless data such as the pointer to the
qemuDriver object or qemuCaps.

Additionally remove the non-specific debug statements:

  VIR_DEBUG("Building emulator command line");

from the two callers of qemuBuildCommandLine.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Peter Krempa 2022-05-16 13:20:42 +02:00
parent b5fd6f2b68
commit 343920794d
2 changed files with 2 additions and 6 deletions

View File

@ -10439,10 +10439,8 @@ qemuBuildCommandLine(virQEMUDriver *driver,
virDomainDef *def = vm->def; virDomainDef *def = vm->def;
virQEMUCaps *qemuCaps = priv->qemuCaps; virQEMUCaps *qemuCaps = priv->qemuCaps;
VIR_DEBUG("driver=%p def=%p mon=%p " VIR_DEBUG("Building qemu commandline for def=%s(%p) migrateURI=%s snapshot=%p vmop=%d flags=0x%x",
"qemuCaps=%p migrateURI=%s snapshot=%p vmop=%d flags=0x%x", def->name, def, migrateURI, snapshot, vmop, flags);
driver, def, priv->monConfig,
qemuCaps, migrateURI, snapshot, vmop, flags);
if (qemuBuildCommandLineValidate(driver, def) < 0) if (qemuBuildCommandLineValidate(driver, def) < 0)
return NULL; return NULL;

View File

@ -7445,7 +7445,6 @@ qemuProcessLaunch(virConnectPtr conn,
if (qemuExtDevicesStart(driver, vm, incoming != NULL) < 0) if (qemuExtDevicesStart(driver, vm, incoming != NULL) < 0)
goto cleanup; goto cleanup;
VIR_DEBUG("Building emulator command line");
if (!(cmd = qemuBuildCommandLine(driver, if (!(cmd = qemuBuildCommandLine(driver,
vm, vm,
incoming ? "defer" : NULL, incoming ? "defer" : NULL,
@ -7953,7 +7952,6 @@ qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver,
bool enableFips, bool enableFips,
unsigned int flags) unsigned int flags)
{ {
VIR_DEBUG("Building emulator command line");
return qemuBuildCommandLine(driver, return qemuBuildCommandLine(driver,
vm, vm,
migrateURI, migrateURI,