]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuBuildCommandLine: Sanitize debug logging
authorPeter Krempa <pkrempa@redhat.com>
Mon, 16 May 2022 11:20:42 +0000 (13:20 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 17 May 2022 17:31:07 +0000 (19:31 +0200)
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>
src/qemu/qemu_command.c
src/qemu/qemu_process.c

index 1a5fd20632cb6a502725f9dc31dd5db71dbd147a..d6c65257d1adef7bed6b8f3fb533c19afebd80f3 100644 (file)
@@ -10439,10 +10439,8 @@ qemuBuildCommandLine(virQEMUDriver *driver,
     virDomainDef *def = vm->def;
     virQEMUCaps *qemuCaps = priv->qemuCaps;
 
-    VIR_DEBUG("driver=%p def=%p mon=%p "
-              "qemuCaps=%p migrateURI=%s snapshot=%p vmop=%d flags=0x%x",
-              driver, def, priv->monConfig,
-              qemuCaps, migrateURI, snapshot, vmop, flags);
+    VIR_DEBUG("Building qemu commandline for def=%s(%p) migrateURI=%s snapshot=%p vmop=%d flags=0x%x",
+              def->name, def, migrateURI, snapshot, vmop, flags);
 
     if (qemuBuildCommandLineValidate(driver, def) < 0)
         return NULL;
index 38079ce159b5cc96d38aed6f926dbff5f2127165..1098c3bf93b834c30d27897977570700b90073e1 100644 (file)
@@ -7445,7 +7445,6 @@ qemuProcessLaunch(virConnectPtr conn,
     if (qemuExtDevicesStart(driver, vm, incoming != NULL) < 0)
         goto cleanup;
 
-    VIR_DEBUG("Building emulator command line");
     if (!(cmd = qemuBuildCommandLine(driver,
                                      vm,
                                      incoming ? "defer" : NULL,
@@ -7953,7 +7952,6 @@ qemuProcessCreatePretendCmdBuild(virQEMUDriver *driver,
                                  bool enableFips,
                                  unsigned int flags)
 {
-    VIR_DEBUG("Building emulator command line");
     return qemuBuildCommandLine(driver,
                                 vm,
                                 migrateURI,